:root {
  --navy: #0e2433;
  --navy-2: #163447;
  --teal: #0f766e;
  --teal-d: #0b5c56;
  --gold: #c9a227;
  --gold-s: #e7c56a;
  --ink: #1c2b36;
  --muted: #6b7c86;
  --line: #e4ebe8;
  --bg: #f3f6f5;
  --white: #fff;
  --sidebar: 268px;
  --danger: #c2413b;
  --ok: #15803d;
  --warn: #b45309;
}
* { box-sizing: border-box; }
body.app-body { background: var(--bg); color: var(--ink); font-family: "Source Sans 3", "Segoe UI", sans-serif; }
a { text-decoration: none; }

/* Landing */
.lp { background: #071822; color: #eef6f4; min-height: 100vh; }
.lp-nav { padding: 1.1rem 0; }
.lp-brand { display: flex; align-items: center; gap: .7rem; color: #fff; font-weight: 700; font-size: 1.2rem; }
.lp-brand .mark { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(145deg, var(--gold), #8a6d14); display: grid; place-items: center; font-weight: 800; color: #142018; }
.lp-hero { padding: 4.5rem 0 3.5rem; position: relative; overflow: hidden; }
.lp-hero::before { content: ""; position: absolute; inset: -20% 20% auto auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(15,118,110,.35), transparent 65%); }
.lp-kicker { letter-spacing: .18em; text-transform: uppercase; color: var(--gold-s); font-size: .78rem; font-weight: 700; }
.lp-title { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 750; line-height: 1.12; margin: .6rem 0 1rem; }
.lp-title span { color: var(--gold-s); }
.lp-lead { color: #b7c9c5; font-size: 1.08rem; max-width: 34rem; }
.portal-card { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 1.6rem; height: 100%; transition: .2s transform, .2s border-color; }
.portal-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.portal-card h3 { color: #fff; }
.portal-card p { color: #9fb3af; }
.lp-section { background: #f3f6f5; color: var(--ink); padding: 4rem 0; }
.feature { background: #fff; border-radius: 16px; padding: 1.4rem; border: 1px solid var(--line); height: 100%; }
.feature .ic { width: 42px; height: 42px; border-radius: 10px; background: #e7f4f2; color: var(--teal); display: grid; place-items: center; margin-bottom: .8rem; }
.lp-footer { background: #071822; color: #8aa09b; padding: 1.5rem 0; }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.auth-art { background: radial-gradient(1200px 600px at 10% 10%, #1a4a55, #071822 55%); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-form { display: grid; place-items: center; padding: 2rem; background: #f7faf9; }
.auth-card { width: min(440px, 100%); background: #fff; border-radius: 18px; padding: 2rem; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(14,36,51,.08); }
.btn-gold { background: linear-gradient(180deg, var(--gold-s), var(--gold)); color: #1a1a12; border: 0; font-weight: 700; }
.btn-gold:hover { color: #111; filter: brightness(1.03); }
.btn-teal { background: var(--teal); color: #fff; border: 0; font-weight: 600; }
.btn-teal:hover { background: var(--teal-d); color: #fff; }

/* Shell */
.app-shell { min-height: 100vh; }
.sidebar { width: var(--sidebar); background: linear-gradient(180deg, var(--navy), #0a1b26); color: #d5e2de; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 30; }
.sidebar .brand { display: flex; gap: .7rem; align-items: center; padding: 1.15rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.06); color: #fff; font-weight: 700; }
.sidebar .brand .mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(145deg, var(--gold), #8a6d14); color: #142018; display: grid; place-items: center; font-weight: 800; }
.side-nav a { display: flex; gap: .7rem; align-items: center; color: #c5d4d0; padding: .55rem 1.15rem; margin: .1rem .55rem; border-radius: 8px; font-size: .92rem; }
.side-nav a:hover, .side-nav a.active { background: rgba(201,162,39,.16); color: #fff; }
.side-nav .label { padding: .85rem 1.3rem .25rem; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #7f9390; }
.main { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: .75rem 1.4rem; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 20; }
.content { padding: 1.4rem; }
.page-title { font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-sub { color: var(--muted); font-size: .9rem; }

.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; height: 100%; }
.stat-card .k { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.stat-card .v { font-size: 1.35rem; font-weight: 750; margin-top: .2rem; }
.stat-card.accent { background: linear-gradient(135deg, #0f766e, #134e4a); color: #fff; border: 0; }
.stat-card.accent .k { color: #c5ebe6; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.panel .panel-h { padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.panel .panel-b { padding: 1.1rem; }
.badge-st { font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .25rem .6rem; }
.st-SUCCESS { background: #dcfce7; color: #166534; }
.st-PENDING, .st-PROCESSING { background: #fef3c7; color: #92400e; }
.st-FAILED, .st-inactive, .st-revoked { background: #fee2e2; color: #991b1b; }
.st-REFUNDED, .st-CANCELLED { background: #e0e7ff; color: #3730a3; }
.st-active { background: #dcfce7; color: #166534; }
.table > :not(caption) > * > * { vertical-align: middle; }
.form-control, .form-select { border-radius: 10px; border-color: #d5e0dc; }
.form-control:focus, .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(15,118,110,.15); }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.4rem; }

@media (max-width: 992px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; }
  .sidebar { transform: translateX(-100%); transition: .2s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-block; }
}
