/* ============================================================
   Banks Benchtops Referral Club — Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ============================================================
   CSS VARIABLES — BB Brand
   ============================================================ */
:root {
  --bb-blue:      #0016F4;
  --bb-blue-mid:  #253E8F;
  --bb-navy:      #000058;
  --bb-aqua:      #92FFD6;
  --bb-white:     #FFFFFF;
  --bb-off-white: #F4F5FF;
  --bb-black:     #000000;
  --bb-text:      #000058;
  --bb-muted:     #6B7280;
  --bb-border:    #D1D5FF;
  --bb-success:   #2d7a2d;
  --bb-error:     #c0392b;

  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 2px 12px rgba(0,22,244,0.08);
  --transition:   0.18s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: #1a1a3e;
  color: #fff;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--bb-aqua);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   HEADER — UNCHANGED
   ============================================================ */
.site-header {
  background-color: var(--bb-blue);
  color: var(--bb-white);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-brand .brand-logo {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--bb-white);
  border-radius: 6px;
  padding: 4px 8px;
}

.header-brand h1 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bb-white);
  line-height: 1.2;
}

.header-brand h1 span {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-user {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-content {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

/* ============================================================
   DASHBOARD CARD
   ============================================================ */
.dashboard-card {
  background: linear-gradient(160deg, #000058 0%, #00003a 100%);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,10,0.6), 0 0 0 1px rgba(255,255,255,0.06);
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 100%;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: #0016F4;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover:not(:disabled) { background: #253E8F; }

.btn-ghost {
  background: transparent;
  color: var(--bb-white);
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.12);
  border-color: var(--bb-white);
}

.btn-ghost-dark {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost-dark:hover { color: #fff; border-color: rgba(255,255,255,0.4); }

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(255,255,255,0.13);
  color: #fff;
}

.btn-danger {
  background: var(--bb-error);
  color: var(--bb-white);
}
.btn-danger:hover:not(:disabled) { background: #a93226; }

.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.78rem; }

.btn-aqua {
  background: rgba(146,255,214,0.15);
  color: #92FFD6;
  border: 1px solid rgba(146,255,214,0.3);
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s;
}
.btn-aqua:hover { background: rgba(146,255,214,0.25); }

/* ============================================================
   STATS CARDS (dark variant)
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  color: #fff;
}
.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #92FFD6;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
}
.stat-card .stat-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.15rem;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-wrapper { overflow-x: hidden; width: 100%; }

table { width: 100%; border-collapse: collapse; table-layout: fixed; }

thead th {
  text-align: left;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
  overflow: hidden;
}

/* Admin table column widths (8 columns) */
.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 15%; } /* Referred Person */
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 18%; } /* Email */
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 10%; } /* Phone */
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 13%; } /* Referred By */
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 9%;  } /* Status */
.admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 10%; } /* Visit Date */
.admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 10%; } /* Date Referred */
.admin-table th:nth-child(8), .admin-table td:nth-child(8) { width: 15%; } /* Actions */

/* Client table column widths (6 columns) */
.client-table th:nth-child(1), .client-table td:nth-child(1) { width: 20%; } /* Name */
.client-table th:nth-child(2), .client-table td:nth-child(2) { width: 25%; } /* Email */
.client-table th:nth-child(3), .client-table td:nth-child(3) { width: 15%; } /* Phone */
.client-table th:nth-child(4), .client-table td:nth-child(4) { width: 12%; } /* Status */
.client-table th:nth-child(5), .client-table td:nth-child(5) { width: 14%; } /* Visit Date */
.client-table th:nth-child(6), .client-table td:nth-child(6) { width: 14%; } /* Date Referred */

/* Report stats grid */
.report-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Leaderboard table */
.leaderboard-table th:nth-child(1) { width: 5%; }
.leaderboard-table th:nth-child(2) { width: 22%; }
.leaderboard-table th:nth-child(3) { width: 22%; }
.leaderboard-table th:nth-child(4) { width: 12%; text-align: right; }
.leaderboard-table th:nth-child(5) { width: 12%; text-align: right; }
.leaderboard-table th:nth-child(6) { width: 14%; text-align: right; }
.leaderboard-table th:nth-child(7) { width: 13%; text-align: right; }
.leaderboard-table td:nth-child(4),
.leaderboard-table td:nth-child(5),
.leaderboard-table td:nth-child(6),
.leaderboard-table td:nth-child(7) { text-align: right; }

/* Monthly breakdown table */
.monthly-table th:nth-child(1) { width: 20%; }
.monthly-table th:nth-child(2),
.monthly-table th:nth-child(3),
.monthly-table th:nth-child(4),
.monthly-table th:nth-child(5) { width: 20%; text-align: right; }
.monthly-table td:nth-child(2),
.monthly-table td:nth-child(3),
.monthly-table td:nth-child(4),
.monthly-table td:nth-child(5) { text-align: right; }

/* Rank badge */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
}
.rank-badge.gold   { background: rgba(245,197,0,0.2);    color: #f5c500; }
.rank-badge.silver { background: rgba(180,180,180,0.15); color: #bbb; }
.rank-badge.bronze { background: rgba(180,100,30,0.2);   color: #c87941; }

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.15s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.04); }

tbody td {
  padding: 0.7rem 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td.td-muted {
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
}
td.td-nowrap { white-space: nowrap; }

.td-person {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}
.td-person span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  color: #fff;
  flex-shrink: 0;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-visited {
  background: rgba(146,255,214,0.15);
  color: #92FFD6;
  border: 1px solid rgba(146,255,214,0.3);
}
.badge-pending {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.12);
}
.badge-active {
  background: rgba(146,255,214,0.12);
  color: #92FFD6;
  border: 1px solid rgba(146,255,214,0.25);
}
.badge-inactive {
  background: rgba(220,38,38,0.12);
  color: #f87171;
  border: 1px solid rgba(220,38,38,0.25);
}
.badge-admin {
  background: rgba(79,70,229,0.15);
  color: #a5b4fc;
  border: 1px solid rgba(79,70,229,0.3);
}

/* ============================================================
   SECTION HEADERS INSIDE CARD
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   SECTION TOOLBAR
   ============================================================ */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.section-toolbar h3 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   SEARCH INPUT (dark)
   ============================================================ */
.search-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  width: 240px;
}
.search-input::placeholder { color: rgba(255,255,255,0.3); }
.search-input:focus { border-color: rgba(146,255,214,0.4); }

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================================
   FORM CONTROLS (dark — used throughout dashboards)
   ============================================================ */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.4rem;
}

.form-group label .required {
  color: #f87171;
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.form-control:focus { border-color: rgba(146,255,214,0.4); }
.form-control::placeholder { color: rgba(255,255,255,0.25); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }

.form-input {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: rgba(146,255,214,0.4); }
.form-input::placeholder { color: rgba(255,255,255,0.25); }

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.4rem;
  display: block;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

.form-hint {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  margin-top: 0.3rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.form-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--bb-aqua);
  cursor: pointer;
}
.form-check label {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: normal;
}

/* ============================================================
   TABS (dark)
   ============================================================ */
.tab-nav, .tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
}
.tab-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  padding: 0.7rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  font-family: inherit;
}
.tab-btn:hover { color: rgba(255,255,255,0.7); }
.tab-btn.active { color: #92FFD6; border-bottom-color: #92FFD6; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   MODAL (dark)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: linear-gradient(160deg, #000058 0%, #00003a 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0,0,22,0.8);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.18s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-card {
  background: linear-gradient(160deg, #000058 0%, #00003a 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0,0,22,0.8);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
  transition: color 0.15s;
}
.modal-close:hover { color: #fff; }

.modal-body {
  /* inner padding handled by .modal itself */
}

.modal-footer {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ============================================================
   ALERTS / MESSAGES
   ============================================================ */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: none;
}
.alert.show { display: block; }

.alert-error {
  background: rgba(192,57,43,0.15);
  color: #f87171;
  border: 1px solid rgba(192,57,43,0.3);
}
.alert-success {
  background: rgba(146,255,214,0.1);
  color: #92FFD6;
  border: 1px solid rgba(146,255,214,0.25);
}
.alert-info {
  background: rgba(0,22,244,0.15);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,22,244,0.3);
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.5rem;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #92FFD6;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   EMPTY STATE (dark)
   ============================================================ */
.empty-state { text-align: center; padding: 3rem 1rem; color: rgba(255,255,255,0.35); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 1.05rem; font-weight: 600; color: rgba(255,255,255,0.5); margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.9rem; }

/* ============================================================
   EARNINGS
   ============================================================ */
.earnings-highlight {
  background: rgba(146,255,214,0.06);
  border: 1px solid rgba(146,255,214,0.15);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.earnings-highlight .earn-icon { font-size: 2rem; }
.earnings-highlight .earn-label {
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
}
.earnings-highlight .earn-amount {
  font-size: 1.9rem;
  font-weight: 700;
  color: #92FFD6;
  line-height: 1;
}
.earnings-highlight .earn-note {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin-top: 0.15rem;
}
.earnings-value { color: #92FFD6; font-weight: 700; font-size: 1.1rem; }

/* ============================================================
   LOGIN PAGE — KEEP LIGHT (index.html uses body.login-page)
   ============================================================ */
body.login-page {
  background: var(--bb-off-white);
  color: var(--bb-text);
}

.login-page .site-header {
  position: static;
}

.login-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bb-off-white);
}

.login-card {
  background: var(--bb-white);
  border: 1px solid var(--bb-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
}
.login-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bb-navy);
  margin-bottom: 0.4rem;
}
.login-card .login-subtitle {
  font-size: 0.9rem;
  color: var(--bb-muted);
  margin-bottom: 1.75rem;
}

/* Override dark form styles for login card */
.login-card .form-group label {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.875rem;
  color: var(--bb-text);
  font-weight: 600;
}
.login-card .form-control {
  color: var(--bb-text);
  background: var(--bb-white);
  border: 1.5px solid var(--bb-border);
}
.login-card .form-control:focus {
  border-color: var(--bb-blue);
  box-shadow: 0 0 0 3px rgba(0,22,244,0.1);
}
.login-card .form-control::placeholder { color: #b0b8d0; }

.login-card .alert-error {
  background: #fde8e8;
  color: var(--bb-error);
  border: 1px solid #f5c6c6;
}

.login-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--bb-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .header-brand h1 { font-size: 0.9rem; }

  .main-content { padding: 1.25rem 1rem; }

  .dashboard-card {
    padding: 1.25rem 1rem;
    margin: 1rem auto;
    border-radius: 12px;
  }

  .stats-row { grid-template-columns: 1fr 1fr; }

  .stat-card .stat-number { font-size: 1.75rem; }

  .tab-btn { padding: 0.6rem 1rem; font-size: 0.85rem; }

  .login-card { padding: 1.75rem 1.25rem; }

  .modal { max-width: 100%; }

  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }

  .earnings-highlight { flex-direction: column; text-align: center; }

  thead th:nth-child(n+4) { display: none; }

  .section-toolbar { flex-direction: column; align-items: flex-start; }

  .search-input { width: 100%; }
}

@media (max-width: 420px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ============================================================
   CSV IMPORT
   ============================================================ */

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-wide {
  max-width: 720px;
  width: 95vw;
}

.import-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.import-stat {
  flex: 1;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
}

.badge-paid    { background: rgba(146,255,214,0.15); color: #92FFD6; border: 1px solid rgba(146,255,214,0.4); }

.import-stat-matched   { background: rgba(146,255,214,0.08); border-color: rgba(146,255,214,0.25); }
.import-stat-review    { background: rgba(255,179,71,0.08);  border-color: rgba(255,179,71,0.25); }
.import-stat-already   { background: rgba(255,255,255,0.04); }
.import-stat-unmatched { background: rgba(220,80,80,0.07);  border-color: rgba(220,80,80,0.2); }

.review-check {
  width: 16px;
  height: 16px;
  accent-color: #92FFD6;
  cursor: pointer;
  vertical-align: middle;
}

.import-stat-num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.import-stat-matched  .import-stat-num { color: #92FFD6; }
.import-stat-already  .import-stat-num { color: rgba(255,255,255,0.4); }
.import-stat-unmatched .import-stat-num { color: #ff8080; }

.import-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .import-stats { flex-direction: column; }
  .modal-wide { max-width: 100%; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .search-input { flex: 1; }
}
