/* ============================================================================
   Balaji Basant Enclave — Design System
   Palette: deep indigo/violet gradient + heritage gold accent (society-seal feel)
   Type: Apple/macOS system font stack throughout (San Francisco on Apple
   devices, with matched fallbacks elsewhere) — no external font files loaded.
   ============================================================================ */

:root {
  /* Core gradient */
  --navy-900: #0c1230;
  --navy-800: #141b45;
  --indigo-700: #1e2a6b;
  --violet-600: #55368f;
  --gradient-primary: linear-gradient(135deg, #141c4d 0%, #2c3583 45%, #6a3f95 100%);
  --gradient-primary-hover: linear-gradient(135deg, #1a234f 0%, #333d94 45%, #79489f 100%);
  --gradient-gold: linear-gradient(135deg, #f0d580 0%, #c9a227 60%, #a9821c 100%);

  /* Accent */
  --gold-500: #c9a227;
  --gold-400: #e0bf5a;
  --gold-100: #faf3dd;

  /* Status */
  --success: #1f9d6f;
  --success-bg: #e6f6ef;
  --danger: #d6455a;
  --danger-bg: #fdeced;
  --warning: #c7871f;
  --warning-bg: #fbf1de;
  --info: #3465c9;
  --info-bg: #eaf1fd;

  /* Neutrals */
  --bg-app: #f4f5fb;
  --card-bg: #ffffff;
  --text-dark: #1a1d2e;
  --text-body: #363a53;
  --text-muted: #767b96;
  --border: #e7e8f3;
  --border-soft: #f0f1f9;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 10px rgba(20, 24, 60, 0.06), 0 1px 2px rgba(20, 24, 60, 0.04);
  --shadow-elevated: 0 12px 32px rgba(20, 24, 60, 0.14);
  --sidebar-width: 264px;

  /* Apple system font stack: resolves to San Francisco on macOS/iOS/iPadOS
     (Safari and Chrome both honor -apple-system / BlinkMacSystemFont),
     Segoe UI on Windows, Roboto on Android, with generic sans-serif as the
     final fallback. Used for every heading and body element in the app. */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-system);
  background: var(--bg-app);
  color: var(--text-body);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .brand-font {
  font-family: var(--font-system);
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

a { color: var(--indigo-700); text-decoration: none; }
a:hover { color: var(--violet-600); }

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background: var(--gold-100); color: #8a6a10;
  padding: 2px 7px; border-radius: 5px;
  font-size: 0.88em; font-weight: 600; white-space: nowrap;
}

img { max-width: 100%; }

::selection { background: var(--gold-400); color: var(--navy-900); }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   App shell: sidebar + topbar + content
   --------------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--gradient-primary);
  color: #eceafc;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.brand-seal {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-system);
  font-weight: 700;
  color: var(--navy-900);
  font-size: 16px;
  border: 2px solid rgba(255,255,255,0.5);
  flex-shrink: 0;
}

.sidebar-brand-text { line-height: 1.25; }
.sidebar-brand-text .name { font-family: var(--font-system); font-weight: 700; font-size: 16px; color: #fff; display: block; }
.sidebar-brand-text .tag { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-400); }

.sidebar-nav { padding: 18px 12px; flex: 1; }
.sidebar-section-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em;
  color: rgba(236,234,252,0.45); padding: 14px 12px 6px;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(236,234,252,0.85);
  font-size: 14px; font-weight: 500;
  margin-bottom: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: 15px; color: rgba(236,234,252,0.65); }
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,0.14); color: #fff; box-shadow: inset 3px 0 0 var(--gold-400); }
.sidebar-nav a.active i { color: var(--gold-400); }

.sidebar-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  color: rgba(236,234,252,0.5);
}

.main-area { margin-left: var(--sidebar-width); flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 68px; flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 40;
}
.topbar-title h1 { font-size: 21px; margin: 0; }
.topbar-title .subtitle { font-size: 12.5px; color: var(--text-muted); }

.topbar-user { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gradient-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}
.user-meta { line-height: 1.25; }
.user-meta .name { font-weight: 600; font-size: 13.5px; color: var(--text-dark); }
.user-meta .role { font-size: 11.5px; color: var(--text-muted); }

.menu-toggle {
  display: none; background: none; border: none; font-size: 20px; color: var(--text-dark); cursor: pointer;
}

.content { padding: 26px 28px 48px; flex: 1; }

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: 0 4px 14px rgba(43,49,120,0.28); }
.btn-primary:hover { background: var(--gradient-primary-hover); color: #fff; }
.btn-gold { background: var(--gradient-gold); color: var(--navy-900); box-shadow: 0 4px 14px rgba(201,162,39,0.3); }
.btn-outline { background: #fff; color: var(--indigo-700); border-color: var(--border); }
.btn-outline:hover { border-color: var(--indigo-700); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { padding: 8px 10px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }

/* ---------------------------------------------------------------------------
   Cards / stat cards
   --------------------------------------------------------------------------- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  padding: 22px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.card-header h3 { font-size: 16.5px; margin: 0; }
.card-header .subtitle { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  display: flex; align-items: flex-start; gap: 14px;
  position: relative; overflow: hidden;
}
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
}
.stat-icon.grad-1 { background: var(--gradient-primary); }
.stat-icon.grad-2 { background: linear-gradient(135deg, #1f9d6f, #57c193); }
.stat-icon.grad-3 { background: linear-gradient(135deg, #d6455a, #ef7c8e); }
.stat-icon.grad-4 { background: var(--gradient-gold); color: var(--navy-900); }
.stat-body .label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-body .value { font-family: var(--font-system); font-size: 24px; font-weight: 700; color: var(--text-dark); margin-top: 2px; }
.stat-body .hint { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-soft); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
table.data-table th {
  text-align: left; padding: 12px 14px; background: #f7f7fc;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); font-weight: 700; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data-table tbody tr:hover { background: #fafaff; }
table.data-table tbody tr:last-child td { border-bottom: none; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.fw-600 { font-weight: 600; }
.mono-amount { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-dark); }

/* ---------------------------------------------------------------------------
   Badges
   --------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  background: #eef0f8; color: var(--text-muted);
}
.badge-owner   { background: var(--info-bg); color: var(--info); }
.badge-rented  { background: var(--gold-100); color: #8a6a10; }
.badge-vacant  { background: #f1f1f7; color: #767b96; }
.badge-paid    { background: var(--success-bg); color: var(--success); }
.badge-partial { background: var(--warning-bg); color: var(--warning); }
.badge-pending { background: var(--danger-bg); color: var(--danger); }
.badge-role-president { background: var(--gold-100); color: #8a6a10; }
.badge-role-secretary { background: var(--info-bg); color: var(--info); }
.badge-role-treasurer { background: var(--success-bg); color: var(--success); }
.badge-role-member    { background: #f1f1f7; color: #767b96; }

/* ---------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--text-dark); }
.form-group .req { color: var(--danger); }
.form-group small.help { color: var(--text-muted); font-size: 11.5px; }

input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=number], input[type=date], input[type=month], select, textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 13.5px; color: var(--text-dark);
  background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--violet-600); }
textarea { resize: vertical; min-height: 80px; }

input[type=file] {
  padding: 9px 12px; border: 1px dashed var(--border); border-radius: 10px;
  font-family: inherit; font-size: 13px; color: var(--text-muted);
  background: var(--bg-app); width: 100%; cursor: pointer;
}
input[type=file]:hover { border-color: var(--indigo-700); }
input[type=file]::file-selector-button {
  padding: 7px 14px; margin-right: 12px; border: none; border-radius: 8px;
  background: var(--gradient-primary); color: #fff; font-family: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}

.radio-row, .check-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.radio-row label, .check-row label { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; }

.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filter-bar .form-group { margin-bottom: 0; min-width: 160px; }

/* ---------------------------------------------------------------------------
   Alerts / flash messages
   --------------------------------------------------------------------------- */
.alert { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 12px; font-size: 13.5px; margin-bottom: 18px; font-weight: 500; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger  { background: var(--danger-bg); color: var(--danger); }
.alert-info    { background: var(--info-bg); color: var(--info); }

/* ---------------------------------------------------------------------------
   Login page
   --------------------------------------------------------------------------- */
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1.5px),
    var(--gradient-primary);
  background-size: 28px 28px, 200% 200%;
  background-position: 0 0, 0% 50%;
  animation: gradientShift 16s ease infinite;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
@keyframes gradientShift {
  0% { background-position: 0 0, 0% 50%; }
  50% { background-position: 0 0, 100% 50%; }
  100% { background-position: 0 0, 0% 50%; }
}
.login-shell::before, .login-shell::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,191,90,0.2), transparent 70%);
}
.login-shell::before { width: 560px; height: 560px; top: -200px; right: -160px; }
.login-shell::after { width: 460px; height: 460px; bottom: -180px; left: -140px; background: radial-gradient(circle, rgba(255,255,255,0.09), transparent 70%); }

.login-shell-inner { position: relative; z-index: 2; width: 100%; max-width: 408px; display: flex; flex-direction: column; align-items: center; }

.login-card {
  position: relative; z-index: 2; overflow: hidden;
  width: 100%; max-width: 408px;
  background: #fff; border-radius: 22px;
  padding: 46px 38px 36px;
  box-shadow: 0 30px 60px -14px rgba(9,13,38,0.5), 0 10px 26px rgba(9,13,38,0.16);
  text-align: center;
  animation: cardRise 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cardRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--gold-400), var(--indigo-700) 52%, var(--violet-600));
}

.login-seal-ring {
  width: 94px; height: 94px; border-radius: 50%; margin: 6px auto 18px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(224,191,90,0.18), transparent 72%);
}
.login-seal {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--gradient-gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-system); font-weight: 700; font-size: 25px; letter-spacing: 0.02em;
  color: var(--navy-900); border: 3px solid #fff;
  box-shadow: 0 10px 24px rgba(201,162,39,0.38), 0 2px 8px rgba(201,162,39,0.28), inset 0 1px 1px rgba(255,255,255,0.5);
}
.login-card h1 { font-size: 22px; margin-bottom: 3px; letter-spacing: -0.01em; }
.login-card .tagline { font-size: 11px; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
.login-divider {
  height: 1px; margin: 26px 0 24px;
  background: linear-gradient(90deg, transparent, var(--border) 18%, var(--border) 82%, transparent);
}
.login-card .form-group { text-align: left; margin-bottom: 15px; }
.login-card .btn { margin-top: 10px; }
.login-card .btn-primary {
  box-shadow: 0 10px 24px rgba(43,49,120,0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.login-card .btn-primary:hover { box-shadow: 0 14px 30px rgba(43,49,120,0.42); transform: translateY(-1px); }

.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 13px; pointer-events: none;
  transition: color 0.15s ease;
}
.input-icon-wrap:focus-within .input-icon { color: var(--violet-600); }
input.input-with-icon[type=text], input.input-with-icon[type=password] { padding-left: 38px; }

.login-foot { margin-top: 24px; font-size: 11px; color: rgba(255,255,255,0.68); text-align: center; letter-spacing: 0.03em; }

@media (max-width: 420px) {
  .login-shell { padding: 16px; }
  .login-card { padding: 36px 24px 28px; border-radius: 18px; }
  .login-seal-ring { width: 78px; height: 78px; margin-bottom: 14px; }
  .login-seal { width: 62px; height: 62px; font-size: 20px; }
  .login-card h1 { font-size: 19px; }
  .login-divider { margin: 20px 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell { animation: none; }
  .login-card { animation: none; }
}

/* ---------------------------------------------------------------------------
   Misc: pagination, empty state, tabs, print
   --------------------------------------------------------------------------- */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state i { font-size: 34px; color: var(--border); margin-bottom: 12px; display: block; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--indigo-700); border-bottom-color: var(--gold-500); }

.progress-track { height: 8px; border-radius: 999px; background: var(--border-soft); overflow: hidden; }
.progress-fill { height: 100%; background: var(--gradient-gold); border-radius: 999px; }

.icon-circle {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-app); color: var(--indigo-700); font-size: 14px; flex-shrink: 0;
}

.action-icons { display: flex; gap: 8px; }
.action-icons a, .action-icons button {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; font-size: 13px;
}
.action-icons a:hover { color: var(--indigo-700); border-color: var(--indigo-700); }
.action-icons a.danger:hover { color: var(--danger); border-color: var(--danger); }

.doc-group-btn {
  position: relative; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text-muted);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; transition: color 0.15s ease, border-color 0.15s ease;
}
.doc-group-btn:hover { color: var(--indigo-700); border-color: var(--indigo-700); }
.doc-count-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--gradient-primary); color: #fff;
  font-size: 9.5px; font-weight: 700; line-height: 1;
  min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 2px solid #fff;
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .menu-toggle { display: block; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

input[type=checkbox], input[type=radio] { accent-color: var(--indigo-700); width: 16px; height: 16px; cursor: pointer; }

@media print {
  .sidebar, .topbar, .no-print, .btn { display: none !important; }
  .main-area { margin-left: 0 !important; }
  body { background: #fff; font-size: 12px; }
  .card { box-shadow: none; border: none; padding: 0; }
  .content { padding: 0 !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
  @page { margin: 14mm 12mm; }
}

/* ---------------------------------------------------------------------------
   Print / PDF document styling — "formal report" letterhead, shown only
   when printing or saving as PDF (screen never sees these).
   --------------------------------------------------------------------------- */
.print-only { display: none; }

@media print {
  .print-only { display: block; }

  .print-letterhead {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 4px;
  }
  .print-letterhead-brand { display: flex; align-items: center; gap: 12px; }
  .print-seal {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--gradient-gold);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-system); font-weight: 700; font-size: 15px;
    color: var(--navy-900); border: 2px solid #cbb35a;
  }
  .print-society-name { font-family: var(--font-system); font-weight: 700; font-size: 17px; color: var(--navy-900); }
  .print-society-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }
  .print-letterhead-doc { text-align: right; }
  .print-doc-title { font-family: var(--font-system); font-weight: 700; font-size: 15px; color: var(--navy-900); text-transform: uppercase; letter-spacing: 0.04em; }
  .print-doc-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

  .print-divider {
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin-bottom: 18px;
  }

  .print-footer-note {
    display: flex !important;
    justify-content: space-between;
    border-top: 1px solid #ccc;
    padding-top: 10px;
    margin-top: 22px;
    font-size: 9.5px;
    color: #888;
  }

  /* Formal grid-table look for report data, evocative of enterprise (SAP-style) reports */
  table.data-table { font-size: 11px; }
  table.data-table th {
    background: var(--navy-800) !important;
    color: #fff !important;
    border-bottom: none;
    font-size: 9.5px;
    padding: 9px 10px;
  }
  table.data-table td { padding: 8px 10px; border: 1px solid #e3e4ee; }
  table.data-table tbody tr:nth-child(even) { background: #f5f6fb !important; }
  table.data-table tfoot td { border-top: 2px solid var(--navy-800); font-weight: 700; background: #fff !important; }
  .table-wrap { border: none; }

  .badge { border: 1px solid currentColor; background: transparent !important; }

  h1, .topbar-title { display: none !important; }
}

/* ---------------------------------------------------------------------------
   Modal (used for quick-add category, etc.)
   --------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(12, 18, 48, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: #fff; border-radius: var(--radius-lg);
  padding: 24px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-elevated);
  transform: translateY(8px);
  transition: transform 0.18s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { font-size: 17px; margin: 0; }
.modal-close { background: none; border: none; font-size: 18px; color: var(--text-muted); cursor: pointer; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--text-dark); }
.icon-preview-row { display: flex; align-items: center; gap: 10px; }
.icon-preview-badge {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: var(--bg-app); display: flex; align-items: center; justify-content: center;
  color: var(--indigo-700); font-size: 16px; border: 1px solid var(--border);
}
.modal-error { display: none; }
.modal-error.show { display: flex; }
.usage-pill { font-size: 11.5px; color: var(--text-muted); background: var(--bg-app); padding: 3px 9px; border-radius: 999px; }

/* ---------------------------------------------------------------------------
   Payment Receipt / Bill document
   --------------------------------------------------------------------------- */
.receipt-card {
  background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card); padding: 36px 40px; max-width: 760px; margin: 0 auto;
  position: relative; overflow: hidden;
}
.receipt-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 2px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.receipt-brand { display: flex; align-items: center; gap: 14px; }
.receipt-seal { width: 56px; height: 56px; border-radius: 50%; background: var(--gradient-gold); display: flex; align-items: center; justify-content: center; font-family: var(--font-system); font-weight: 700; font-size: 19px; color: var(--navy-900); border: 2px solid #cbb35a; flex-shrink: 0; }
.receipt-society-name { font-family: var(--font-system); font-weight: 700; font-size: 20px; color: var(--text-dark); }
.receipt-society-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.receipt-doc-meta { text-align: right; }
.receipt-doc-title { font-family: var(--font-system); font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--indigo-700); }
.receipt-doc-number { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.receipt-doc-date { font-size: 12px; color: var(--text-muted); }

.receipt-stamp {
  position: absolute; top: 108px; right: 44px;
  border: 3px solid; border-radius: 10px; padding: 6px 20px;
  font-weight: 800; font-size: 19px; letter-spacing: 2px; text-transform: uppercase;
  transform: rotate(-10deg); opacity: 0.9; font-family: var(--font-system);
  pointer-events: none;
}
.receipt-stamp.stamp-paid { color: var(--success); border-color: var(--success); }
.receipt-stamp.stamp-partial { color: var(--warning); border-color: var(--warning); }
.receipt-stamp.stamp-pending { color: var(--danger); border-color: var(--danger); }

.receipt-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 640px) { .receipt-info-grid { grid-template-columns: 1fr; } }
.receipt-info-box { background: var(--bg-app); border-radius: 12px; padding: 16px 18px; }
.receipt-info-box .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin-bottom: 8px; }
.receipt-info-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.receipt-info-row .k { color: var(--text-muted); }
.receipt-info-row .v { font-weight: 600; color: var(--text-dark); text-align: right; }

.receipt-amount-box {
  background: var(--gradient-primary); border-radius: 14px; padding: 22px 24px; color: #fff;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.receipt-amount-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
.receipt-amount-value { font-family: var(--font-system); font-size: 30px; font-weight: 700; }
.receipt-amount-words { font-size: 12px; opacity: 0.9; margin-top: 6px; max-width: 420px; }

.receipt-note { font-size: 12.5px; color: var(--text-muted); background: var(--bg-app); border-radius: 10px; padding: 12px 16px; margin-bottom: 24px; }

.receipt-signatures { display: flex; justify-content: space-between; margin-top: 44px; gap: 24px; flex-wrap: wrap; }
.receipt-sig-block { text-align: center; min-width: 180px; }
.receipt-sig-line { border-top: 1px solid var(--text-dark); margin-bottom: 6px; padding-top: 6px; }
.receipt-sig-label { font-size: 11.5px; color: var(--text-muted); }

.receipt-footer-note { margin-top: 30px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 10.5px; color: var(--text-muted); text-align: center; }

@media print {
  .receipt-card { box-shadow: none; border: none; padding: 0; max-width: 100%; }
}
