/* ==========================================================================
   Vihav Circle — Application Styles
   ========================================================================== */

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--ink); letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--maroon); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-deep); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }
img { max-width: 100%; display: block; }
::selection { background: var(--gold-light); color: var(--maroon-dark); }

/* ---------- Boot Splash ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); }
.boot-medallion {
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--gold-grad);
  box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(74, 21, 37, .25);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } }

/* ---------- Brand Medallion ---------- */
.medallion {
  display: inline-grid; place-content: center; flex: 0 0 auto;
  background: var(--gold-grad); color: var(--maroon-dark);
  border-radius: 50%; font-family: var(--font-serif); font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(74, 21, 37, .25), var(--shadow-sm);
}
.medallion small { font-size: .5em; letter-spacing: .05em; }

/* ==========================================================================
   AUTH / LOGIN
   ========================================================================== */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-hero {
  position: relative; color: var(--on-maroon); padding: 56px 60px;
  background:
    radial-gradient(1000px 500px at 20% -10%, rgba(244, 232, 193, .18), transparent 60%),
    linear-gradient(150deg, #672518 0%, #4E1B11 60%, #3B140C 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.auth-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(244, 232, 193, .08) 1px, transparent 1.4px);
  background-size: 20px 20px; opacity: .6; pointer-events: none;
}
.auth-hero .brand-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.auth-hero .brand-row .medallion { width: 56px; height: 56px; font-size: 22px; }
.auth-hero h1 { font-family: var(--font-serif); font-size: clamp(32px, 4vw, 48px); color: #fff; line-height: 1.1; margin-top: 12px; }
.auth-hero .tagline { color: var(--gold-light); font-family: var(--font-serif); font-style: italic; font-size: 20px; }
.auth-hero .lead { max-width: 480px; color: #eed7c9; margin-top: 18px; position: relative; z-index: 1; font-size: 15px; line-height: 1.6; }
.auth-steps { display: flex; gap: 14px; margin-top: 32px; position: relative; z-index: 1; flex-wrap: wrap; }
.auth-steps .step { background: rgba(255,255,255,.07); border: 1px solid rgba(244, 232, 193, .22); border-radius: var(--radius); padding: 16px 18px; flex: 1 1 130px; backdrop-filter: blur(8px); }
.auth-steps .step b { color: var(--gold-light); letter-spacing: .12em; font-size: 11px; text-transform: uppercase; }
.auth-steps .step span { display: block; margin-top: 6px; font-size: 13.5px; color: #f5e4da; font-weight: 500; }
.auth-hero .foot { position: relative; z-index: 1; color: #d1b4a3; font-size: 13px; }

.auth-panel { display: grid; place-items: center; padding: 32px; background: var(--cream); }
.auth-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 36px 32px;
}
.auth-card h2 { font-family: var(--font-serif); font-size: 26px; color: var(--maroon-dark); font-weight: 700; }
.auth-card .sub { color: var(--muted); margin: 6px 0 24px; font-size: 14px; }

.console-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--cream-2); padding: 5px; border-radius: var(--radius-pill); margin-bottom: 22px; }
.console-toggle button {
  border: 0; background: transparent; padding: 10px; border-radius: var(--radius-pill);
  font-weight: 600; color: var(--muted); display: flex; gap: 8px; align-items: center; justify-content: center;
  transition: all .15s; font-size: 13px;
}
.console-toggle button.active { background: var(--surface); color: var(--maroon); box-shadow: var(--shadow-sm); }
.console-toggle button svg { width: 16px; height: 16px; }

.auth-card input[name="code"] {
  font-size: 24px; font-weight: 700; letter-spacing: .45em; text-align: center;
  padding: 12px 14px; border: 1.5px solid var(--line-strong); background: var(--surface-2);
  border-radius: var(--radius-md); transition: all .15s ease; color: var(--ink);
}
.auth-card input[name="code"]:focus {
  border-color: var(--maroon); background: #fff;
  box-shadow: 0 0 0 3px var(--maroon-tint);
}

.auth-card .btn-link {
  color: var(--maroon); font-weight: 600; text-decoration: none;
  font-size: 13px; padding: 8px 0; transition: color .15s;
}
.auth-card .btn-link:hover { color: var(--gold-dark); text-decoration: underline; }

.demo-hint { margin-top: 20px; font-size: 12px; color: var(--ink-2); background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 14px; line-height: 1.5; }
.demo-hint b { color: var(--maroon); }
.demo-hint code { background: rgba(0,0,0,.06); padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 11.5px; }

/* ==========================================================================
   APP SHELL
   ========================================================================== */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: var(--topbar-h) 1fr; grid-template-areas: "brand top" "nav main"; min-height: 100vh; }
.brand-cell { grid-area: brand; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: #672518; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.08); overflow: hidden; }
.brand-cell .medallion { width: 38px; height: 38px; font-size: 16px; flex-shrink: 0; }
.brand-cell .bt { line-height: 1.15; min-width: 0; flex: 1; }
.brand-cell .bt b { font-family: var(--font-serif); font-size: 18px; letter-spacing: .01em; color: #fff; display: block; white-space: nowrap; }
.brand-cell .bt small { display: block; color: var(--gold-light); font-size: 9px; letter-spacing: .08em; font-weight: 700; margin-top: 2px; white-space: nowrap; }

.topbar { grid-area: top; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.topbar .page-title { font-weight: 700; font-size: 17px; color: var(--ink); }
.topbar .page-title small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.topbar .spacer { flex: 1; }
.hamburger { display: none; background: none; border: 0; padding: 6px; color: var(--maroon); }
.hamburger svg { width: 24px; height: 24px; }

.iconbtn { position: relative; display: inline-grid; place-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); transition: all .15s; }
.iconbtn:hover { background: var(--cream-2); border-color: var(--line-strong); transform: translateY(-1px); }
.iconbtn svg { width: 19px; height: 19px; }
.badge-dot { position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-content: center; border: 2px solid var(--surface); box-shadow: var(--shadow-sm); }

.usermenu { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-2); }
.usermenu .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold-grad); color: var(--maroon-dark); display: grid; place-content: center; font-weight: 700; font-size: 13.5px; box-shadow: inset 0 0 0 1.5px rgba(74, 21, 37, 0.2); }
.usermenu .who { line-height: 1.15; }
.usermenu .who b { font-size: 13px; font-weight: 600; color: var(--ink); }
.usermenu .who small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }

.sidebar { grid-area: nav; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; overflow-y: auto; }
.nav-group-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10.5px 14px; border-radius: var(--radius); color: var(--ink-2); font-weight: 500; font-size: 14px; margin-bottom: 3px; transition: all .15s; }
.nav-item svg { width: 18px; height: 18px; opacity: .75; flex: 0 0 auto; transition: opacity .15s; }
.nav-item:hover { background: var(--cream-2); color: var(--maroon); }
.nav-item.active { background: var(--maroon-tint); color: var(--maroon); font-weight: 700; }
.nav-item.active svg { opacity: 1; color: var(--maroon); }
.nav-item .count { margin-left: auto; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }

.main { grid-area: main; padding: 28px; overflow-y: auto; }
.main-inner { max-width: 1200px; margin: 0 auto; }
.scrim { display: none; }

/* ==========================================================================
   CARDS / HERO BANNER / SECTIONS
   ========================================================================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.card-head h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.card-head .spacer { flex: 1; }
.section-title { font-family: var(--font-serif); color: var(--maroon-dark); font-size: 24px; margin-bottom: 4px; font-weight: 700; }
.section-sub { color: var(--muted); margin-bottom: 20px; font-size: 14px; }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .spacer { flex: 1; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- Hero Banner (High Contrast & Luxury) ---------- */
.hero-banner {
  background: #672518;
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 32px 34px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 10px 30px -5px rgba(103, 37, 24, 0.25);
}
.hero-banner::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(244, 232, 193, .12) 1px, transparent 1.4px);
  background-size: 18px 18px;
  opacity: .5;
  pointer-events: none;
}
.hero-banner h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  color: #FFFFFF !important;
  position: relative;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.25);
  margin-bottom: 8px;
}
.hero-banner p {
  color: #F3E3DE !important;
  margin-top: 6px;
  position: relative;
  max-width: 620px;
  font-size: 14.5px;
  line-height: 1.6;
}
.hero-banner .actions {
  margin-top: 22px;
  position: relative;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 2;
}

/* ---------- Stat Cards ---------- */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--gold-grad);
}
.stat .label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-size: 30px; font-weight: 800; color: var(--ink); margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .value.serif { font-family: var(--font-serif); color: var(--maroon-dark); font-weight: 700; }
.stat .foot { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.stat .foot .up { color: var(--success); font-weight: 600; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 18px; font-weight: 600; font-size: 14px;
  transition: all .15s ease; white-space: nowrap; outline: none;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }

.btn-primary {
  background: var(--gold-grad);
  color: #2E0B16;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(166, 124, 30, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 4px 12px rgba(166, 124, 30, 0.35);
}

.btn-maroon {
  background: var(--maroon);
  color: #fff;
  font-weight: 600;
}
.btn-maroon:hover:not(:disabled) {
  background: var(--maroon-dark);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--cream-2);
  border-color: var(--gold);
}

.btn-soft {
  background: var(--cream-2);
  color: var(--maroon-dark);
  font-weight: 600;
}
.btn-soft:hover:not(:disabled) {
  background: var(--sand);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.2);
}
.btn-danger:hover:not(:disabled) {
  background: #fbd5d5;
}

.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(27, 122, 75, 0.2);
}
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-block { width: 100%; }
.btn-link {
  background: none; border: 0; color: var(--maroon);
  font-weight: 600; padding: 6px 4px; font-size: 13.5px;
}
.btn-link:hover { color: var(--gold-deep); text-decoration: underline; }

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.field { margin-bottom: 18px; }
.field > label { display: block; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field .req { color: var(--danger); }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); transition: all .15s; outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, .22);
}
.textarea { resize: vertical; min-height: 90px; }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 12px; margin-top: 5px; display: none; }
.field.invalid .err { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.checkline { display: flex; gap: 10px; align-items: flex-start; }
.checkline input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--maroon); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

.choice-grid { display: grid; gap: 10px; }
.choice {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start;
  cursor: pointer; transition: all .15s; background: var(--surface);
}
.choice:hover { border-color: var(--gold); }
.choice.selected {
  border-color: var(--gold); background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, .18);
}
.choice input { margin-top: 3px; accent-color: var(--maroon); }
.choice .ct b { font-size: 14px; color: var(--ink); }
.choice .ct span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
table.data th {
  text-align: left; padding: 12px 16px; color: var(--muted);
  font-weight: 700; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 1px solid var(--line);
  background: var(--surface-2); position: sticky; top: 0;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .mono { font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--maroon); font-weight: 600; }
.cell-strong { font-weight: 600; color: var(--ink); }
.cell-sub { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .medallion { width: 52px; height: 52px; font-size: 18px; margin: 0 auto 12px; opacity: .6; }

/* ==========================================================================
   BADGES & CHIPS
   ========================================================================== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.s-success, .badge.BOOKED, .badge.ACCEPTED, .badge.APPROVED, .badge.ACTIVE, .badge.FULFILLED, .badge.SENT { color: var(--success); background: var(--success-bg); }
.badge.s-warning, .badge.SUBMITTED, .badge.REQUESTED, .badge.UNDER_REVIEW, .badge.UPCOMING, .badge.QUEUED { color: var(--warning); background: var(--warning-bg); }
.badge.s-info, .badge.SITE_VISIT, .badge.ONGOING { color: var(--info); background: var(--info-bg); }
.badge.s-danger, .badge.REJECTED, .badge.BLOCKED, .badge.FAILED, .badge.CANCELLED { color: var(--danger); background: var(--danger-bg); }
.badge.s-neutral, .badge.INACTIVE, .badge.COMPLETED { color: var(--ink-2); background: var(--neutral-bg); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; background: var(--cream-2); color: var(--maroon-dark); }
.chip.gold { background: var(--gold-light); color: var(--maroon-dark); }

.pill-channel { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; letter-spacing: .03em; }
.pill-channel.EMAIL { background: var(--info-bg); color: var(--info); }
.pill-channel.WHATSAPP { background: var(--success-bg); color: var(--success); }
.pill-channel.SMS { background: var(--warning-bg); color: var(--warning); }
.pill-channel.INAPP { background: var(--neutral-bg); color: var(--ink-2); }

/* ==========================================================================
   FILTER BAR + PAGINATION
   ========================================================================== */
.filterbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filterbar .search { position: relative; flex: 1 1 240px; min-width: 200px; }
.filterbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.filterbar .search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.filterbar select { padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); }
.filterbar .fb-spacer { flex: 1; }

.pagination { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 18px; color: var(--muted); font-size: 13px; }
.pagination button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 7px; padding: 6px 12px; color: var(--ink-2); }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(30, 10, 16, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; z-index: 60; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); animation: pop .16s; }
.modal.lg { width: min(760px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--font-serif); color: var(--maroon-dark); font-size: 20px; font-weight: 700; }
.modal-head .close { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; padding: 4px 8px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); }

/* ==========================================================================
   TOASTS
   ========================================================================== */
.toast-root { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.toast { min-width: 280px; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; animation: slidein .2s; }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }
.toast .t-title { font-weight: 700; font-size: 14px; color: var(--ink); }
.toast .t-msg { color: var(--muted); font-size: 13px; margin-top: 2px; }
.toast svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }

/* ==========================================================================
   NOTIFICATION POPOVER
   ========================================================================== */
.pop { position: absolute; top: calc(var(--topbar-h) - 6px); right: 20px; width: min(380px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 70; overflow: hidden; }
.pop-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pop-head h4 { font-size: 14px; font-weight: 700; }
.pop-head .spacer { flex: 1; }
.pop-list { max-height: 400px; overflow-y: auto; }
.noti { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); transition: background .12s; }
.noti:hover { background: var(--surface-2); }
.noti.unread { background: var(--maroon-tint); }
.noti.unread:hover { background: #fbeee8; }
.noti .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-content: center; flex: 0 0 auto; background: var(--cream-2); color: var(--maroon); }
.noti .ic svg { width: 17px; height: 17px; }
.noti .nt b { font-size: 13.5px; display: block; color: var(--ink); }
.noti .nt p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.noti .nt time { font-size: 11px; color: var(--muted); }

/* ==========================================================================
   MISC & WALLET
   ========================================================================== */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; }
.kv dt { color: var(--muted); font-size: 13px; font-weight: 500; }
.kv dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 24px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--maroon-tint); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }

.wallet-hero {
  background: linear-gradient(145deg, #672518, #4E1B11);
  color: #fff; border-radius: var(--radius-xl); padding: 28px 30px;
  position: relative; overflow: hidden; border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: var(--shadow-md);
}
.wallet-hero::after { content: ""; position: absolute; right: -30px; top: -30px; width: 160px; height: 160px; border-radius: 50%; background: var(--gold-grad); opacity: .2; pointer-events: none; }
.wallet-hero .lbl { color: var(--gold-light); letter-spacing: .12em; font-size: 12px; text-transform: uppercase; font-weight: 700; }
.wallet-hero .amt { font-size: 46px; font-weight: 800; font-family: var(--font-serif); margin: 6px 0; color: #fff; }
.wallet-hero .sub { color: #f5e4da; font-size: 13.5px; }

.util-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.hide { display: none !important; }
.spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: rot .8s linear infinite; margin: 30px auto; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ==========================================================================
   VIDEO PRELOADER
   ========================================================================== */
.preloader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}
.preloader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}
.preloader-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}
.preloader-skip-btn {
  position: absolute;
  bottom: 28px;
  right: 28px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 15, 15, 0.75);
  color: #F4E8C1;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.preloader-skip-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: #D4AF37;
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 760px) {
  :root { --sidebar-w: 250px; }
  .shell { grid-template-columns: 1fr; grid-template-rows: var(--topbar-h) 1fr; grid-template-areas: "top" "main"; }
  .brand-cell { display: none; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 55; transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(30,10,16,.5); z-index: 50; }
  .hamburger { display: inline-grid; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .main { padding: 18px 16px; }
  .hero-banner { padding: 24px 20px; }
  .usermenu .who { display: none; }
  .preloader-skip-btn { bottom: 20px; right: 20px; padding: 7px 14px; font-size: 12px; }
}


