@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
  --navy: #0f2c59;
  --navy-deep: #071936;
  --navy-mid: #163a70;
  --teal: #0d9488;
  --teal-bright: #14b8a6;
  --teal-dark: #0f766e;
  --teal-soft: #e6f7f5;
  --gold: #f59e0b;
  --gold-soft: #fef3c7;
  --bg: #f3f6fb;
  --card: #ffffff;
  --surface-subtle: #f8fafd;
  --border: rgba(15, 44, 89, 0.08);
  --border-strong: #d5dfec;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --success: #059669;
  --success-soft: #ecfdf5;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-xs: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 6px 18px rgba(15, 44, 89, 0.06);
  --shadow-md: 0 12px 30px rgba(15, 44, 89, 0.10);
  --shadow-lg: 0 24px 54px rgba(7, 25, 54, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 13.5px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

.header-subrow {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 980px;
  margin: 10px auto 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.bell-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.55);
}
.brand-logo { width: 34px !important; height: 34px !important; border-radius: 10px !important; }
.brand-title { font-size: 0.98rem !important; white-space: normal !important; }
.brand-sub { font-size: 0.72rem !important; }
.app-header { padding: 11px 14px 10px !important; border-radius: 0 0 20px 20px !important; }
.kpi-card { padding: 10px 12px !important; }
.kpi-val { font-size: 1.05rem !important; }
.bottom-nav { padding: 6px 4px !important; }

body {
  margin: 0;
  font-family: 'Cairo', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  padding-bottom: 98px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* Keyframes */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sheetSlideUp {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-up { animation: fadeSlideUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Tabular numbers for fintech precision */
.kpi-val,
.hero-metric strong,
#resRem,
#resPaid,
#resPct,
table.data-table td {
  font-variant-numeric: tabular-nums;
}

/* ==================== 1. AUTH / LOGIN SCREEN ==================== */
.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: linear-gradient(155deg, var(--navy-deep) 0%, var(--navy) 46%, #0f5c63 82%, var(--teal) 100%);
}
.auth-screen::before,
.auth-screen::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
}
.auth-screen::before {
  width: 340px;
  height: 340px;
  top: -110px;
  right: -90px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.38) 0%, rgba(20, 184, 166, 0) 70%);
}
.auth-screen::after {
  width: 320px;
  height: 320px;
  bottom: -100px;
  left: -90px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.34) 0%, rgba(59, 130, 246, 0) 70%);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  padding: 36px 24px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.16), rgba(15, 44, 89, 0.10));
  box-shadow: 0 0 0 6px rgba(13, 148, 136, 0.06), 0 14px 30px rgba(15, 44, 89, 0.18);
  margin-bottom: 16px;
}
.auth-logo {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 21px;
  object-fit: cover;
}

.auth-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}
.auth-title {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.brand-en-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 44, 89, 0.09), rgba(13, 148, 136, 0.14));
  color: var(--teal-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth-subtitle {
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.auth-trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1f6fc;
  border: 1px solid rgba(15, 44, 89, 0.08);
  color: var(--navy-mid);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.trust-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 15px;
  border: 1.5px solid #d7e0ec;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.btn-google span {
  white-space: nowrap;
}
.btn-google:hover {
  border-color: #b7c8df;
  background: #fafcff;
  box-shadow: 0 8px 20px rgba(15, 44, 89, 0.12);
}
.btn-google:active {
  transform: scale(0.98);
  background: #f1f5f9;
}
.btn-google:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.auth-footnote {
  margin: 16px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ==================== 2. HEADER ==================== */
.app-header {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 48%, #115e59 100%);
  color: #fff;
  padding: 14px 16px 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 26px rgba(15, 44, 89, 0.22);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 980px;
  margin: 0 auto;
}
.brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.brand-title {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.header-month-select {
  width: auto !important;
  max-width: 132px;
  padding: 6px 12px !important;
  font-size: 0.76rem !important;
  font-weight: 700;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.header-month-select option {
  background: #ffffff;
  color: var(--navy);
}
.header-month-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16) !important;
}
.btn-header-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.14s ease;
  white-space: nowrap;
}
.btn-header-ghost:active { transform: scale(0.95); background: rgba(255, 255, 255, 0.24); }
.btn-header-icon {
  width: 34px;
  padding: 0;
}

/* ==================== 3. CONTAINER & CARDS ==================== */
.app-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 14px 18px;
}

.card-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.card-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.title-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #edf3fb;
  color: var(--navy);
  flex-shrink: 0;
}
.title-icon-badge.teal { background: var(--teal-soft); color: var(--teal-dark); }

/* ==================== 4. BUILDING HUB CARDS ==================== */
.hub-action-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.hub-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), #2563eb);
}
.hub-action-card.hub-accent-teal::before {
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
}
.hub-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(15, 44, 89, 0.10);
}
.hub-action-card.hub-accent-teal .hub-icon-circle {
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
  color: var(--teal-dark);
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.12);
}
.hub-action-title {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--navy);
}
.hub-action-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ==================== 5. BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 12px;
  padding: 10px 15px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, opacity 0.14s ease, background 0.16s ease;
  text-decoration: none;
  line-height: 1.3;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.22);
}
.btn-teal {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.24);
}
.btn-wa {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.22);
}
.btn-instapay {
  background: linear-gradient(135deg, #6d28d9 0%, #4c1d95 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.30);
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.20);
}
.btn-gold {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.22);
}
.btn-outline {
  background: #ffffff;
  color: var(--navy);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-outline:active { background: #f8fafc; }
.btn-sm { padding: 7px 11px; font-size: 0.77rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ==================== 6. INPUTS & FORMS ==================== */
.form-group { margin-bottom: 12px; text-align: right; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-control, .form-select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  background: #fbfdff;
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.form-control:focus, .form-select:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3.5px rgba(13, 148, 136, 0.14);
}
textarea.form-control { resize: vertical; }

/* ==================== 7. KPI GRID ==================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 720px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}
.kpi-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.kpi-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  border: 1px solid transparent;
}
.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.kpi-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-collected .kpi-icon-badge { background: #ecfdf5; color: #059669; }
.kpi-expenses .kpi-icon-badge { background: #fef2f2; color: #dc2626; }
.kpi-remaining .kpi-icon-badge { background: #fffbeb; color: #d97706; }
.kpi-net .kpi-icon-badge { background: #eff6ff; color: var(--navy); }

.kpi-collected { border-top: 2.5px solid #10b981; }
.kpi-expenses { border-top: 2.5px solid #ef4444; }
.kpi-remaining { border-top: 2.5px solid #f59e0b; }
.kpi-net { border-top: 2.5px solid var(--navy); }

.kpi-label {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.25;
}
.kpi-val {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ==================== 8. RESIDENT FINTECH HERO CARD ==================== */
.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-deep) 0%, #163a70 52%, #0f766e 100%);
  color: #fff;
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 16px 36px rgba(15, 44, 89, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(20, 184, 166, 0.28) 0%, transparent 42%),
    radial-gradient(circle at 88% 85%, rgba(59, 130, 246, 0.24) 0%, transparent 45%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 18px);
  pointer-events: none;
}
.hero-card > * {
  position: relative;
  z-index: 1;
}
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 15px 0;
}
.hero-metric {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
}
.hero-metric strong {
  display: block;
  margin-top: 2px;
  font-size: 0.92rem;
  font-weight: 800;
}
.progress-bg {
  height: 9px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #2dd4bf);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.55);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 14px;
  margin-top: 14px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==================== 9. FACILITY BAR & PILLS ==================== */
.facility-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  box-shadow: var(--shadow-xs);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
}
.pill-green { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.pill-yellow { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.pill-red { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.pill-blue { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.pill-gray { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.facility-bar .pill-green::before,
.facility-bar .pill-yellow::before,
.facility-bar .pill-red::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.facility-bar .pill-green::before { background: #10b981; }
.facility-bar .pill-yellow::before { background: #f59e0b; }
.facility-bar .pill-red::before { background: #ef4444; }

/* ==================== 10. BANNERS ==================== */
.ann-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-right: 4px solid #d97706;
  border-radius: 16px;
  padding: 11px 14px;
  margin-bottom: 12px;
  font-size: 0.84rem;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.09);
}
.approval-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  border-right: 4px solid #2563eb;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.10);
}

/* ==================== 11. ADMIN TOOLBAR, FILTERS & TABLE ==================== */
.toolbar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  margin-bottom: 12px;
  padding: 2px 1px 6px;
}
.toolbar::-webkit-scrollbar { display: none; }
.toolbar .btn {
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 13px;
}
@media (min-width: 760px) {
  .toolbar { flex-wrap: wrap; overflow-x: visible; }
}

.filter-btn {
  border: 1.5px solid var(--border-strong);
  background: #fff;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}
.filter-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  box-shadow: 0 4px 10px rgba(15, 44, 89, 0.22);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  background: #fff;
}
table.data-table th {
  background: #f4f7fc;
  color: var(--navy);
  font-weight: 800;
  padding: 10px 8px;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
}
table.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  vertical-align: middle;
}
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: #f8fbff; }

/* ==================== 12. LIST ITEMS, POLLS & COMMUNITY ==================== */
.poll-bar-bg {
  height: 9px;
  background: #e6edf5;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.poll-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #2563eb);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.row-flex { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.item-card {
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 13px 14px;
  background: var(--surface-subtle);
  margin-bottom: 9px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.item-card:last-child { margin-bottom: 0; }
.item-card:hover {
  border-color: rgba(13, 148, 136, 0.22);
  box-shadow: var(--shadow-xs);
}

/* ==================== 13. FLOATING BOTTOM NAVIGATION ==================== */
.bottom-nav {
  position: fixed;
  bottom: 10px;
  left: 12px;
  right: 12px;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 44, 89, 0.09);
  border-radius: 22px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 7px 6px;
  z-index: 150;
  box-shadow: 0 10px 30px rgba(15, 44, 89, 0.14), 0 2px 6px rgba(15, 23, 42, 0.05);
}
.nav-item {
  position: relative;
  flex: 1;
  background: transparent;
  border: none;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 16px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.14s ease;
}
.nav-item:active { transform: scale(0.95); }
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.nav-icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}
.nav-item.active {
  color: var(--navy);
  background: linear-gradient(135deg, rgba(15, 44, 89, 0.09), rgba(13, 148, 136, 0.13));
}
.nav-item.active .nav-icon svg {
  color: var(--teal-dark);
  transform: translateY(-1px);
}
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 18px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--navy), var(--teal));
}

/* ==================== 14. MODALS (MOBILE BOTTOM-SHEET + DESKTOP CARD) ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 25, 54, 0.56);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  z-index: 500;
}
.modal-backdrop.open { display: flex; }

.modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 12px 20px 26px;
  box-shadow: 0 -10px 40px rgba(7, 25, 54, 0.26);
  animation: sheetSlideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.modal-box::before {
  content: '';
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 12px;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 18px;
  }
  .modal-box {
    border-radius: 24px;
    max-height: 88vh;
    padding: 22px 24px;
    box-shadow: 0 24px 60px rgba(7, 25, 54, 0.34);
    animation: fadeSlideUp 0.22s ease both;
  }
  .modal-box::before { display: none; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e9eff6;
  padding-bottom: 11px;
  margin-bottom: 14px;
}
.modal-title { font-size: 1rem; font-weight: 800; color: var(--navy); margin: 0; }
.modal-close {
  background: #f1f5f9;
  color: var(--text-secondary);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.modal-close:hover { background: #e2e8f0; }

/* ==================== 15. TOAST & UTILITIES ==================== */
.toast-msg {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 900;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.d-none { display: none !important; }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.small { font-size: 0.78rem; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.receipt-thumb {
  max-width: 100%;
  max-height: 180px;
  border-radius: 12px;
  margin-top: 8px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

/* ==================== 16. SEARCH BOXES & PROPERTY LISTING CARDS ==================== */
.search-filter-box {
  background: #f8fafd;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}

.search-prompt-box {
  text-align: center;
  padding: 20px 14px;
  border-radius: 16px;
  border: 1.5px dashed #cbd5e1;
  background: #fafcff;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
}

.listing-card {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(15, 44, 89, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.listing-card:last-child { margin-bottom: 0; }

.listing-gallery {
  position: relative;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  background: #0f172a;
  padding: 0;
  scrollbar-width: none;
}
.listing-gallery::-webkit-scrollbar { display: none; }
.listing-gallery img {
  width: 100%;
  min-width: 100%;
  height: 185px;
  object-fit: cover;
  scroll-snap-align: start;
  display: block;
  cursor: pointer;
}
.listing-gallery.multi img {
  width: 82%;
  min-width: 82%;
  border-left: 2px solid #ffffff;
}
.listing-photo-count {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  pointer-events: none;
}

.listing-body {
  padding: 13px 14px 14px;
}

.listing-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.listing-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}
.listing-type-rent { background: #ccfbf1; color: #0f766e; }
.listing-type-sale { background: #dbeafe; color: #1e40af; }
.listing-type-garage { background: #fef3c7; color: #b45309; }

.listing-price-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 0.88rem;
  font-weight: 900;
}

.listing-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.4;
}

.listing-location-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 9px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.listing-loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px 9px;
  border-radius: 8px;
  font-weight: 700;
}

.listing-details-box {
  background: #f8fafd;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 11px;
  white-space: pre-line;
}

.listing-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid #eef2f7;
}
.listing-advertiser {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
}
.listing-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.listing-actions .btn {
  flex: 1;
  min-width: 84px;
  justify-content: center;
}

.tower-result-card {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 15px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(15, 44, 89, 0.06);
}
.tower-result-card:last-child { margin-bottom: 0; }

.tower-ads-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.74rem;
  font-weight: 800;
}
.tower-ads-badge.empty {
  background: #f1f5f9;
  color: #64748b;
}

.tower-expanded-ads {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

/* ==================== 17. IN-APP PRIVACY CHAT ==================== */
.chat-messages-box {
  min-height: 200px;
  max-height: 52vh;
  overflow-y: auto;
  background: #f8fafd;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-bubble {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.5;
  word-break: break-word;
}
.chat-bubble.mine {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
  align-self: flex-end;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #dbe4f0;
  border-bottom-left-radius: 4px;
}
.chat-bubble-meta {
  font-size: 0.68rem;
  opacity: 0.75;
  margin-bottom: 3px;
  font-weight: 700;
}
.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-input-row .form-control { flex: 1; margin: 0; }

.chats-inbox-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 10px 12px;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 16px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
}

.btn-chat-photo {
  padding: 8px 11px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-photo-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 6px 8px;
  margin-bottom: 8px;
}
.chat-photo-preview img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.chat-msg-img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  margin-top: 5px;
  cursor: pointer;
  object-fit: cover;
}

.chat-unread-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  margin-right: 4px;
}

.voice-rec-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 7px 10px;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

.chat-audio-player {
  display: block;
  width: 210px;
  max-width: 100%;
  height: 36px;
  margin-top: 5px;
}

.map-canvas {
  width: 100%;
  height: 290px;
  border-radius: 14px;
  border: 1.5px solid #cbd5e1;
  overflow: hidden;
  background: #e2e8f0;
  z-index: 1;
}

.map-search-results {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.map-result-item {
  padding: 8px 11px;
  font-size: 0.78rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  color: var(--text);
}
.map-result-item:last-child { border-bottom: none; }
.map-result-item:hover { background: #eff6ff; }

/* ==================== 18. ROLE-FIRST WELCOME & APPLE SIGN-IN ==================== */
.auth-welcome-card {
  max-width: 440px;
  padding: 26px 20px 22px;
}
.welcome-prompt-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
}
.role-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
  text-align: right;
}
.role-pick-card {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 15px;
  border: 1.5px solid #dbe4f0;
  background: #f8fafd;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.role-pick-card:hover {
  border-color: var(--teal);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 44, 89, 0.08);
}
.role-pick-card:active { transform: scale(0.985); }
.role-pick-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.role-pick-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.role-pick-text strong {
  font-size: 0.88rem;
  color: var(--navy);
  font-weight: 800;
}
.role-pick-text span {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
}

.welcome-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}
.welcome-divider::before,
.welcome-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dce5f0;
}

.btn-apple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 15px;
  border: 1.5px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.16s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}
.btn-apple:active { transform: scale(0.98); }
.btn-apple:disabled { opacity: 0.65; cursor: not-allowed; }

/* ==================== 19. SWIPEABLE LIGHTBOX GALLERY ==================== */
.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  touch-action: pan-y;
  user-select: none;
}
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}
.lightbox-nav-btn.prev { right: 8px; }
.lightbox-nav-btn.next { left: 8px; }
.lightbox-thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.lightbox-thumbs img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 9px;
  border: 2px solid transparent;
  opacity: 0.65;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.lightbox-thumbs img.active {
  border-color: var(--teal);
  opacity: 1;
}

/* ==================== V2.16: PERIOD TOGGLE, YEARLY CHARTS, VOICE, EXCEL, BIOMETRIC ==================== */
.period-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.period-segmented {
  display: inline-flex;
  background: #e8eef6;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(15, 44, 89, 0.08);
  flex: 1;
  max-width: 280px;
}
.period-seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.84rem;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.period-seg-btn.active {
  background: linear-gradient(135deg, var(--navy), #1e40af);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 44, 89, 0.22);
}
.yearly-chart-card {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 12px 14px;
}
.yearly-svg-wrap {
  width: 100%;
  overflow-x: auto;
}
.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
}
.yr-cat-row {
  margin-bottom: 9px;
}
.yr-cat-row:last-child { margin-bottom: 0; }
.yr-cat-bar-bg {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.yr-cat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #0f2c59);
  border-radius: 999px;
}
.btn-voice {
  background: linear-gradient(135deg, #2563eb, #0d9488);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-voice:hover { opacity: 0.94; }
.voice-mic-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0f2c59, #0d9488);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(13, 148, 136, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.voice-mic-circle.listening {
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  animation: mulakVoicePulse 1.1s infinite;
}
@keyframes mulakVoicePulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); transform: scale(1); }
  70% { box-shadow: 0 0 0 18px rgba(220, 38, 38, 0); transform: scale(1.06); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); transform: scale(1); }
}
.excel-upload-box {
  background: #f0f9ff;
  border: 1.5px dashed #38bdf8;
  border-radius: 14px;
  padding: 12px;
}
.acct-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 3px;
}
.acct-badge-linked {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.acct-badge-unlinked {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.mulak-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.mulak-switch input { opacity: 0; width: 0; height: 0; }
.mulak-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.25s;
  border-radius: 999px;
}
.mulak-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.mulak-switch input:checked + .mulak-slider { background-color: #0d9488; }
.mulak-switch input:checked + .mulak-slider:before { transform: translateX(22px); }
.bio-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(160deg, #071b3d 0%, #0f2c59 55%, #0d9488 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.bio-lock-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px 22px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.prepaid-pill {
  display: inline-block;
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}
.star-rating-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.star-btn {
  background: none;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 2px 3px;
  line-height: 1;
  color: #cbd5e1;
  transition: transform 0.12s ease;
}
.star-btn.filled { color: #f59e0b; }
.star-btn:hover { transform: scale(1.2); }
.guide-step-card {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-right: 4px solid var(--teal);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text-primary);
}

/* ==================== V2.20: ROYAL MIDNIGHT WELCOME SCREEN & LIVE NOTIF BANNER ==================== */
.live-notif-banner {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  max-width: 520px;
  margin: 0 auto;
  z-index: 9500;
  background: linear-gradient(135deg, #0f2c59, #0d9488);
  color: #fff;
  padding: 12px 15px;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 44, 89, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  animation: slideDownNotif 0.28s ease;
}
@keyframes slideDownNotif {
  from { transform: translateY(-24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.auth-screen.auth-midnight {
  position: relative;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #143a6e 0%, #091d3e 45%, #061329 100%);
  padding: 22px 16px 28px;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.midnight-skyline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  opacity: 0.9;
}
.midnight-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  text-align: center;
  color: #fff;
}
.midnight-logo-wrap {
  width: 78px;
  height: 78px;
  margin: 0 auto 10px;
  border-radius: 22px;
  padding: 4px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.55), rgba(250, 204, 21, 0.35));
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.35);
}
.midnight-logo {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}
.midnight-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}
.midnight-title {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
}
.midnight-en-pill {
  background: rgba(45, 212, 191, 0.16);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #5eead4;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 1px;
}
.midnight-subtitle {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.86);
}
.midnight-login-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
.midnight-returning-badge {
  font-size: 0.82rem;
  font-weight: 800;
  color: #5eead4;
  margin-bottom: 10px;
}
.midnight-google-btn {
  background: #ffffff !important;
  color: #0f2c59 !important;
  border: none !important;
  border-radius: 14px !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}
.midnight-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: #fde68a;
  font-size: 0.8rem;
  font-weight: 800;
}
.midnight-divider::before,
.midnight-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(250, 204, 21, 0.45), transparent);
}
.midnight-role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.midnight-role-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 14px 10px;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.midnight-role-card:hover,
.midnight-role-card:active {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.6);
  background: rgba(45, 212, 191, 0.13);
}
.midnight-role-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.midnight-role-card strong {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
}
.midnight-role-card span:last-child {
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.35;
}
.midnight-footnote {
  margin: 14px 0 0;
  font-size: 0.73rem;
  color: rgba(203, 213, 225, 0.7);
}

/* Reports printed from the browser (see printReportInBrowser) */
#printReport { display: none; }
@media print {
  body.printing-report > *:not(#printReport) { display: none !important; }
  body.printing-report { background: #fff !important; }
  body.printing-report #printReport { display: block; direction: rtl; padding: 12px; color: #0f172a; font-family: sans-serif; }
  #printReport h2 { color: #0f2c59; margin: 0 0 6px; }
  #printReport table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
  #printReport th, #printReport td { border: 1px solid #cbd5e1; padding: 6px; text-align: center; }
  #printReport th { background: #0f2c59; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #printReport tr { break-inside: avoid; }
}
