/* css/dashboard.css */

.dash-main { padding: 32px 24px 80px; }

/* Header */
.dash-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 32px; gap: 16px; flex-wrap: wrap;
}
.dash-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.9rem; color: #111; margin-bottom: 4px;
}
.dash-sub { font-size: 0.88rem; color: #999; }
.dash-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Date range */
.date-range-wrap {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid #e2e2de;
  border-radius: 999px; padding: 6px 16px; font-size: 0.82rem;
}
.date-range-wrap input[type=date] {
  border: none; outline: none; font-size: 0.82rem;
  font-family: 'DM Sans', sans-serif; color: #444;
  background: transparent; padding: 0;
}
.date-range-wrap span { color: #bbb; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 28px;
}

.stat-card {
  background: #fff; border: 1px solid #e2e2de;
  border-radius: 12px; padding: 20px 22px;
}
.stat-card.skeleton {
  min-height: 96px;
  background: linear-gradient(90deg, #f0f0ee 25%, #e8e8e5 50%, #f0f0ee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.stat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #aaa; margin-bottom: 6px; }
.stat-value { font-family: 'DM Serif Display', serif; font-size: 1.7rem; color: #111; line-height: 1.1; margin-bottom: 4px; }
.stat-sub { font-size: 0.78rem; color: #999; }

/* Cards */
.dash-card {
  background: #fff; border: 1px solid #e2e2de;
  border-radius: 14px; padding: 24px 28px; margin-bottom: 24px;
}

.dash-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.dash-card-header h3 { font-size: 1rem; font-weight: 600; color: #111; }

/* Chart */
.chart-wrap { position: relative; height: 260px; }
.chart-wrap-sm { height: 200px; }

/* Group selector */
.group-selector { display: flex; gap: 4px; }
.group-btn {
  font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 500;
  background: none; border: 1.5px solid #e2e2de; color: #888;
  border-radius: 999px; padding: 5px 14px; cursor: pointer; transition: all 0.2s;
}
.group-btn.active { background: #111; color: #fff; border-color: #111; }

/* Two-col layout */
.dash-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table thead tr { background: #f7f7f5; }
.data-table th { padding: 10px 14px; text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #aaa; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid #f0f0ee; color: #444; }
.data-table td small { color: #bbb; font-size: 0.78rem; }
.data-table tbody tr:hover { background: #fafaf8; }
.data-table td:last-child { text-align: right; }
.data-table th:last-child { text-align: right; }

/* Status badges */
.status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; text-transform: capitalize;
}
.status-badge.status-green  { background: #eaf5ef; color: #1a7a4a; }
.status-badge.status-red    { background: #fdf0f0; color: #b03030; }
.status-badge.status-orange { background: #fff8e6; color: #856404; }
.status-badge.status-default { background: #f0f0ee; color: #888; }

/* Tax totals */
.tax-totals {
  display: flex; gap: 24px; flex-wrap: wrap;
  background: #f7f7f5; border-radius: 8px; padding: 14px 16px;
  margin-bottom: 16px; font-size: 0.88rem; color: #555;
}
.tax-totals strong { color: #111; }

/* Pro badge */
.card-badge-pro {
  background: #111; color: #fff; font-size: 0.65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.06em;
}

/* Misc */
.empty-msg { color: #aaa; font-size: 0.88rem; padding: 12px 0; }
.link-sm { font-size: 0.85rem; color: #888; text-decoration: none; }
.link-sm:hover { color: #111; }

.history-notice {
  font-size: 0.82rem; color: #888; padding: 10px 14px; margin-top: 8px;
  background: #f7f7f5; border-radius: 6px;
  display: flex; align-items: center; gap: 8px;
}
.history-notice a { color: #111; font-weight: 600; }

/* Paywall overlay */
.paywall-overlay {
  position: fixed; inset: 0; background: rgba(247,247,245,0.95);
  z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.paywall-card {
  background: #fff; border: 1.5px solid #e2e2de;
  border-radius: 20px; padding: 48px 40px; max-width: 460px; width: 100%;
  text-align: center; box-shadow: 0 16px 64px rgba(0,0,0,0.10);
}

.paywall-card h2 {
  font-family: 'DM Serif Display', serif; font-size: 1.7rem;
  margin-bottom: 12px;
}

.paywall-card p { color: #777; font-size: 0.9rem; line-height: 1.6; margin-bottom: 28px; }
.paywall-trial { font-size: 0.78rem; color: #aaa; margin-top: 12px; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 768px) {
  .dash-two-col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-header { flex-direction: column; }
  .date-range-wrap { display: none; }
}
