/* ================================================================
 * DHANAM 2026 THEME — White + Black + Antique-Gold
 * Drop-in patch from Emergent. No JS. No framework. No build step.
 * Loaded AFTER public/css/styles.css so cascade overrides take effect.
 * OWNERSHIP: Emergent. Claude Code does not edit this file.
 * ================================================================ */

/* Inter is self-hosted via @font-face in index.html <head> (Google Fonts CDN
   doesn't load reliably in the iOS/Android WebViews). Fraunces removed —
   the app uses Inter app-wide per the chosen typography. */

:root {
  /* Brand — same names, evolved values */
  --gold:           #B8860B;
  --gold-light:     #D4A843;
  --gold-pale:      rgba(184, 134, 11, 0.10);
  --gold-dark:      #8A6305;
  --red:            #C0392B;

  /* Promote near-black to the trust anchor (was navy) */
  --navy:           #0A0A0A;
  --navy-dark:      #000000;
  --navy-mid:       #1F1F1F;

  /* Semantic — primary moves from gold to black; gold becomes accent */
  --primary:        #0A0A0A;
  --primary-hover:  #1F1F1F;
  --primary-light:  rgba(10, 10, 10, 0.06);
  --accent:         #B8860B;
  --success:        #16A34A;
  --warning:        #D97706;
  --danger:         #C0392B;

  /* Surface — warmer off-white */
  --bg:             #FAFAF7;
  --bg-warm:        #F2F1EC;
  --card-bg:        #FFFFFF;
  --input-bg:       #FFFFFF;
  --text:           #0A0A0A;
  --text-light:     #52525B;
  --border:         #E7E5DF;

  --sidebar-dark:   #0A0A0A;
  --sidebar-darker: #000000;

  /* NEW — strict scales (additive, nothing else references these yet) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 9999px;

  --sh-soft:   0 2px  8px  rgba(0,0,0,0.04);
  --sh-card:   0 8px  18px rgba(0,0,0,0.06);
  --sh-lifted: 0 14px 28px rgba(0,0,0,0.10);
}

/* ---------- Typography ------------------------------------------------ */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  background: var(--bg);
  color: var(--text);
}

h1, h2,
.section-title,
.modal-header h2,
.login-box h1,
.welcome-title,
.stat-card-value,
#dashboardStats .stat-card-value {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.section-title { font-size: 22px; }

/* ---------- Buttons --------------------------------------------------- */
.btn {
  padding: 11px 18px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2px;
  border: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.btn:active { transform: scale(0.985); }

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10,10,10,0.18);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 18px rgba(10,10,10,0.22);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: var(--bg); border-color: #C8C5BD; }

/* NEW — reserved for premium / final-commit moments only */
.btn-gold {
  background: linear-gradient(135deg, #C8930E 0%, #B8860B 50%, #9C700A 100%);
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 18px rgba(184,134,11,0.30),
              inset 0 1px 0 rgba(255,255,255,0.20);
}
.btn-gold:hover {
  box-shadow: 0 8px 22px rgba(184,134,11,0.36),
              inset 0 1px 0 rgba(255,255,255,0.22);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #A83228; box-shadow: 0 4px 12px rgba(192,57,43,0.25); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #138A3E; }

/* ---------- Sidebar (now ink-black + gold rail + gold dot) ----------- */
.sidebar { background: var(--sidebar-dark) !important; }
.sidebar-header {
  padding: max(env(safe-area-inset-top), 12px) 22px 14px 22px !important;
}
.sidebar-header h1 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.sidebar-nav .nav-group-header {
  color: rgba(255,255,255,0.35);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(184,134,11,0.18), rgba(184,134,11,0)) !important;
  border-left-color: var(--gold) !important;
  color: #ffffff !important;
  position: relative;
}
.sidebar-nav a.active::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(184,134,11,0.18);
}

/* ---------- Stat cards (hair-line top accent, editorial value) -------- */
.stat-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--sh-soft);
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
  border-left: 1px solid var(--border);  /* override the old 4px coloured left rule */
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 20px; right: 20px; top: 0;
  height: 2px;
  background: transparent;
  transition: background .2s ease;
}
.stat-card:hover  { transform: translateY(-2px); box-shadow: var(--sh-card); }
.stat-card.primary::before { background: var(--text); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--gold); }
.stat-card.danger::before  { background: var(--danger); }

/* §A4 — Defeat legacy inline border-left:4px on stat cards.
 * Many stat-card render strings still set style="border-left:4px solid #xxx"
 * via inline JS. The new ::before top accent is the design direction;
 * the inline left-bar is the residue. We force-override to a 1px neutral
 * left edge so the new top accent is the only colour signal. */
#dashboardStats .stat-card[style*="border-left"],
#custDashboardContent .stat-card[style*="border-left"],
.stat-card[style*="border-left"] {
  border-left-width: 1px !important;
  border-left-style: solid !important;
  border-left-color: var(--border) !important;
}

.stat-card-label,
.stat-card .stat-label {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}
.stat-card-value,
.stat-card .stat-value {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  /* font-size NOT !important so a render can set a smaller size for long text
     values (e.g. member no / scheme name) and have it actually apply. */
  font-size: 30px;
  font-weight: 600;
  color: var(--text) !important;
  line-height: 1.2;
  letter-spacing: -0.02em;
  /* Wrap long values instead of clipping them (card has overflow:hidden). */
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.stat-card-subtext {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
}
/* Tonal variants colour only the value, not the whole card */
.stat-card.primary .stat-card-value { color: var(--text) !important; }
.stat-card.success .stat-card-value { color: var(--success) !important; }
.stat-card.warning .stat-card-value { color: var(--gold-dark) !important; }
.stat-card.danger  .stat-card-value { color: var(--danger) !important; }

/* HO dashboard — first 3 tiles get hero treatment */
#dashboardStats { gap: 16px; }
#dashboardStats .stat-card:nth-child(-n+3) { padding: 24px; }
#dashboardStats .stat-card:nth-child(-n+3) .stat-card-value { font-size: 36px !important; }

/* ---------- Tables --------------------------------------------------- */
.table-container {
  border-radius: var(--r-lg);
  box-shadow: var(--sh-soft);
  border: 1px solid var(--border);
  background: #ffffff;
  overflow: hidden;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--bg); border-bottom: 1px solid var(--border); }
th {
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
}
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: rgba(184,134,11,0.04); }
tbody tr:last-child td { border-bottom: 0; }
td strong:first-child,
td.t-name {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  font-size: 15px;
}

/* ---------- Badges --------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1;
}
.badge-primary  { background: rgba(10,10,10,0.06);   color: var(--text); }
.badge-info     { background: rgba(184,134,11,0.10); color: var(--gold-dark); }
.badge-success  { background: rgba(22,163,74,0.10);  color: var(--success); }
.badge-warning  { background: rgba(217,119,6,0.10);  color: var(--warning); }
.badge-danger   { background: rgba(192,57,43,0.10);  color: var(--danger); }
.badge-secondary{ background: rgba(82,82,91,0.10);   color: var(--text-light); }
.badge-gold {
  background: rgba(184,134,11,0.10);
  color: var(--gold-dark);
  border: 1px solid rgba(184,134,11,0.25);
}

/* ---------- Modals --------------------------------------------------- */
.modal { border-radius: var(--r-lg); }
.modal-header {
  padding: 22px 24px 18px !important;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  border-radius: 16px 16px 0 0;
}
.modal-header h2 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.modal-body   { padding: 24px; }
.modal-footer {
  padding: 18px 24px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-radius: 0 0 16px 16px;
  display: flex; gap: 12px; justify-content: flex-end;
}

/* ---------- Form fields — gold focus ring everywhere ----------------- */
.form-group input,
.form-group select,
.form-group textarea {
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  padding: 11px 13px;
  font-size: 15px;
  background: var(--input-bg);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184,134,11,0.14);
}

/* ---------- Empty states (used by .empty wrapper in <td colspan>) ---- */
.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-light);
  background: var(--card-bg);
}
.empty-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--text-light);
}
.empty h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.empty p {
  font-size: 13px;
  max-width: 360px;
  margin: 0 auto 16px;
  line-height: 1.5;
}

/* ---------- Customer dashboard (welcome + product cards) ------------- */
.welcome-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}
.welcome-sub {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 28px;
}
/* Populated customer dashboard: tighter, left-aligned welcome header
   (the centred 34px variant above is for the empty-state hub). */
.cust-dash-welcome {
  text-align: left;
  margin: 2px 0 18px;
}
.cust-dash-welcome .welcome-title {
  font-size: 26px;
  margin: 0 0 2px;
}
.cust-dash-welcome .welcome-sub {
  margin-bottom: 0;
}
@media (max-width: 480px) {
  .cust-dash-welcome .welcome-title { font-size: 22px; }
}
.portfolio-snapshot {
  background: var(--text);
  color: #ffffff;
  border-radius: var(--r-xl);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  box-shadow: var(--sh-card);
}
.portfolio-snapshot .ps-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
}
.portfolio-snapshot .ps-value {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.portfolio-snapshot .ps-delta { font-size: 12px; color: var(--gold-light); margin-top: 4px; }

.product-card-v2 {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow: var(--sh-soft);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
}
.product-card-v2:hover { transform: translateY(-2px); box-shadow: var(--sh-card); }
.product-card-v2 .pc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--gold-pale);
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  align-self: flex-start;
}
.product-card-v2 .pc-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.product-card-v2 .pc-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold-pale);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold-dark);
}
.product-card-v2 .pc-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.product-card-v2 .pc-tagline { color: var(--gold-dark); font-size: 13px; font-weight: 600; }
.product-card-v2 .pc-desc    { color: var(--text-light); font-size: 13px; line-height: 1.55; }
.product-card-v2 .pc-cta {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

/* ---------- Onboarding Ops grid — uniform-height button matrix ------- */
#onboardingOps .ops-grid,
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.ops-grid .btn {
  height: 56px;
  justify-content: flex-start;
  padding-left: 16px;
  font-weight: 500;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--sh-soft);
}
.ops-grid .btn:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}
/* Subtle gold tint — works anywhere, not only inside .ops-grid
   (iteration-2 §A1.8 bank-statement button + ops gold-group tabs). */
.btn.is-gold {
  background: var(--gold-pale);
  color: var(--gold-dark);
  border-color: rgba(184,134,11,0.25);
}

/* ---------- Notifications dropdown — gold "unread" tint --------------- */
.notif-item.unread  { background: rgba(184,134,11,0.06); }
.notif-header a     { color: var(--gold-dark); }
.notif-dot          { background: var(--gold); }

/* ---------- Login screen — promote existing polish to the rest -------- */
#loginSubmitBtn {
  background: linear-gradient(135deg, #C8930E 0%, #B8860B 50%, #9C700A 100%);
  border-radius: var(--r-pill);
  box-shadow: 0 6px 18px rgba(184,134,11,0.30),
              inset 0 1px 0 rgba(255,255,255,0.20);
}
.login-trust span {
  background: var(--gold-pale);
  color: var(--gold-dark);
  border-radius: var(--r-pill);
  padding: 6px 12px;
}
.login-input-wrap input {
  border-radius: var(--r-md);
  padding-left: 42px;
  padding-top: 13px;
  padding-bottom: 13px;
  background: #FDFDFB;
}
.login-input-wrap input:focus {
  background: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184,134,11,0.14);
}

/* ---------- Login showcase icon containers (now SVG, not emoji) ------- */
.login-product-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold-dark);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---------- Hover-only accent for "Renew (+1 Year)" CTA ----------- */
.action-buttons .btn-primary[onclick*="renewLease"] { background: var(--gold); }
.action-buttons .btn-primary[onclick*="renewLease"]:hover { background: var(--gold-dark); }

/* =====================================================================
 * NEW-2 — LOGIN RESPONSIVE (corrected for this codebase)
 * Context: the two-panel login already stacks AND hides the dark
 * showcase at <=480px (see styles.css). The only gap is 481–768px,
 * where it's still the cramped side-by-side split. This fills exactly
 * that gap, mirroring the existing phone behaviour.
 *
 * Notes vs the original NEW-2 paste:
 *  - The real flex container is .login-split (NOT .login-container /
 *    .login-page / .login-wrapper — those last two don't exist here),
 *    so .login-split is what must switch to column.
 *  - Showcase is HIDDEN (matches <=480px); not shown as a strip.
 *  - Scoped to min-width:481px so the working <=480px rules and the
 *    >=769px two-panel desktop layout are both left untouched.
 * ===================================================================== */
@media (min-width: 481px) and (max-width: 768px) {
  .login-split      { flex-direction: column; max-width: 100%; border-radius: 16px; }
  .login-showcase   { display: none; }
  .login-form-panel { width: 100%; max-width: 100%; padding: 40px 36px; }
  .login-box        { max-width: 100%; }
}

/* =====================================================================
 * APPOINTMENTS PAGE — calendar + day-agenda layout
 * ===================================================================== */
.appt-page { padding: 0; }
.appt-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.appt-title { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--text); }
.appt-subtitle { margin-top: 4px; font-size: 13px; color: var(--text-light); }
.appt-header-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.appt-range-toggle { display: inline-flex; background: var(--bg-warm); border-radius: var(--r-pill); padding: 4px; gap: 2px; }
.appt-range-pill { padding: 7px 16px; border-radius: var(--r-pill); background: transparent; border: none; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: var(--text-light); cursor: pointer; transition: background .15s ease, color .15s ease; }
.appt-range-pill.is-active { background: var(--text); color: #fff; }
.appt-range-pill:not(.is-active):hover { color: var(--text); }
.appt-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; margin-bottom: 32px; }
@media (max-width: 1023px) { .appt-grid { grid-template-columns: 1fr; } }
.appt-cal-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-soft); }
.appt-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.appt-cal-month { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -0.005em; color: var(--text); }
.appt-nav-btn { width: 32px; height: 32px; border-radius: 50%; background: transparent; border: 1px solid var(--border); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, border-color .15s; }
.appt-nav-btn:hover { background: var(--bg-warm); border-color: var(--text); }
.appt-cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; }
.appt-cal-weekdays span { text-align: center; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); padding: 8px 0; }
.appt-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.appt-cal-cell { min-height: 64px; background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); padding: 6px; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; cursor: pointer; position: relative; transition: background .12s ease, border-color .12s ease; }
.appt-cal-cell:hover { background: rgba(184,134,11,0.06); }
.appt-cal-cell.is-other-month { opacity: 0.35; cursor: default; }
.appt-cal-cell.is-other-month:hover { background: transparent; }
.appt-cal-cell.is-today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.appt-cal-cell.is-selected { background: var(--text); }
.appt-cal-cell.is-selected .appt-cal-day { color: #fff; }
.appt-cal-cell.is-selected .appt-cal-count { color: rgba(255,255,255,0.7); }
.appt-cal-day { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1; }
.appt-cal-dots { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.appt-cal-dots i { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.appt-cal-count { font-size: 9px; font-weight: 600; color: var(--text-light); letter-spacing: 0.04em; }
.appt-cal-legend { display: flex; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.appt-cal-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-light); font-weight: 500; }
.appt-cal-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.appt-day-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-soft); display: flex; flex-direction: column; }
.appt-day-head { padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.appt-day-weekday { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-dark); }
.appt-day-date { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); margin-top: 4px; }
.appt-day-list { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; padding-right: 4px; }
.appt-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: #fff; transition: background .12s, border-color .12s; }
.appt-item:hover { background: var(--bg-warm); border-color: var(--text); }
.appt-item-time { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.appt-item-body { min-width: 0; }
.appt-item-name { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-item-reason { font-size: 12px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-day-empty { padding: 40px 16px; text-align: center; color: var(--text-light); }
.appt-day-empty-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-warm); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; color: var(--text-light); }
.appt-day-empty h4 { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 16px; color: var(--text); margin: 0 0 4px; }
.appt-day-empty p { font-size: 13px; margin: 0; }
.appt-list-section { margin-top: 16px; }
.appt-list-title { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -0.005em; color: var(--text); margin: 0 0 12px; }

/* Walk-in / prospect appointments in the day agenda */
.appt-item.is-walkin { border-left: 3px dashed var(--gold); background: var(--gold-pale); }
.appt-item.is-walkin .appt-item-time { color: var(--gold-dark); }

/* Appointments screen — hide the chrome topbar title (editorial h1 carries it) */
body.screen-appointments .topbar-title,
body.screen-appointments #topbarTitle { display: none; }

/* ---------- Customer dashboard — unified recent-activity feed -------- */
.cust-activity {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 18px;
  box-shadow: var(--sh-soft); margin: 16px 0 24px;
}
.cust-activity-head {
  display: flex; justify-content: space-between;
  align-items: baseline; margin-bottom: 12px;
}
.cust-activity-head h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; font-weight: 600; margin: 0;
}
.cust-activity-head a {
  font-size: 12px; color: var(--text-light);
  text-decoration: none;
}
.cust-activity-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.cust-activity-item:last-child { border-bottom: none; }
.cust-activity-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-warm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-light);
}
.cust-activity-title {
  font-size: 13px; font-weight: 600; color: var(--text);
}
.cust-activity-meta {
  font-size: 11px; color: var(--text-light); margin-top: 2px;
}
.cust-activity-amount {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap;
}

/* ---------- Tenant Detail page (greenfield full-screen, iter 5) ------ */
.tenant-detail { padding: 0; }
.tenant-breadcrumb { font-size: 12px; color: var(--text-light); margin-bottom: 16px; }
.tenant-breadcrumb a { color: var(--text); text-decoration: none; }
.tenant-breadcrumb a:hover { text-decoration: underline; }

.tenant-hero {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
  box-shadow: var(--sh-soft); margin-bottom: 20px;
}
.tenant-hero-name {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 26px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text); margin: 0;
}
.tenant-hero-meta { display: flex; flex-direction: column; gap: 4px;
                    font-size: 13px; color: var(--text-light); margin-top: 4px; }
.tenant-hero-badges {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
  align-items: flex-start; justify-content: flex-end;
}
.tenant-hero-actions {
  display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; align-items: center;
}
.tenant-action-menu { position: relative; }
.tenant-action-menu-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; line-height: 1; color: var(--text);
}
.tenant-action-menu-dropdown {
  position: absolute; right: 0; top: 44px; z-index: 10;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 6px; min-width: 220px;
  box-shadow: var(--sh-lifted); display: none;
}
.tenant-action-menu.is-open .tenant-action-menu-dropdown { display: block; }
.tenant-action-menu-item {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; border-radius: var(--r-sm);
  background: transparent; border: none; cursor: pointer;
  font-size: 13px; color: var(--text);
}
.tenant-action-menu-item:hover { background: var(--bg-warm); }
.tenant-action-menu-item.is-danger { color: var(--danger); }

.tenant-body {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px;
}
.tenant-rail {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 8px; height: fit-content;
  position: sticky; top: 16px;
}
.tenant-rail-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: var(--r-sm);
  cursor: pointer; transition: background .12s;
  font-size: 13px; font-weight: 500; color: var(--text);
}
.tenant-rail-item:hover { background: var(--bg-warm); }
.tenant-rail-item.is-active {
  background: var(--text); color: #fff; font-weight: 600;
}
.tenant-rail-item.is-active::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); margin-left: auto;
}
.tenant-rail-item-count {
  font-size: 11px; color: var(--text-light);
  background: var(--bg-warm); padding: 2px 8px; border-radius: var(--r-pill);
}
.tenant-rail-item.is-active .tenant-rail-item-count {
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7);
}

.tenant-tab-content {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
  box-shadow: var(--sh-soft); min-height: 400px;
}
.tenant-tab-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.tenant-tab-field-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-light); margin-bottom: 4px;
}
.tenant-tab-field-value {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; font-weight: 500; color: var(--text);
  word-break: break-word;
}

/* Mobile: left rail collapses to a horizontal sticky chip row */
@media (max-width: 1023px) {
  .tenant-body { grid-template-columns: 1fr; }
  .tenant-rail {
    position: static; display: flex; gap: 6px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; padding: 8px;
  }
  .tenant-rail-item { white-space: nowrap; flex: 0 0 auto; }
  .tenant-rail-item.is-active::after { display: none; }
  .tenant-hero-badges { justify-content: flex-start; }
}

/* ─────────────────────────────────────────────────────────────────
   Mobile horizontal-overflow guard (phones ≤ 768px).
   Customer surfaces (My Gold, Gold Membership, Locker Auto-Pay, NCD,
   dashboards) were spilling sideways: long single-token values
   (member numbers like GM2606061449, "₹7500.00 / gram") had
   white-space:nowrap, and key-value tables couldn't wrap, so a single
   value pushed the content wider than the screen — labels clipped on
   the left, values on the right. Make content wrap/fit; data grids in
   .table-container keep their own horizontal scroll.
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Stat values must wrap when they can't fit (currency stays one line). */
  .stat-card .stat-value,
  .stat-value { white-space: normal; overflow-wrap: anywhere; }

  /* Any cell may break a long unbreakable token so one value can't force
     a page-wide horizontal scroll. */
  td, th { overflow-wrap: anywhere; }

  /* Bare label|value tables fit their card exactly… */
  .modal-body table,
  .screen table { table-layout: fixed; width: 100%; }
  /* …but real data grids keep natural column widths and scroll. */
  .table-container table { table-layout: auto; width: auto; min-width: 100%; }

  /* Belt-and-suspenders: no customer screen scrolls the whole page sideways. */
  .screen { overflow-x: hidden; }
}

/* ===================== END DHANAM 2026 THEME ===================== */
