/* ============================================================
   SUGAM PLATFORM — Design System  ·  Rev 2 (Premium Refinement)
   Premium Indian Enterprise SaaS · light-first · Navy + Bhagwa
   LOCKED — future modules extend this, never fork it.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&display=swap');

:root {
  /* ---- ink (deep navy structure) ---- */
  --ink:        #101725;   /* headings, primary structure */
  --ink-soft:   #33405a;   /* strong body */
  --ink-2:      #5a6478;   /* secondary text */
  --ink-3:      #93a0b4;   /* muted / captions / icons-off */
  --navy-panel: #0f172a;   /* premium dark sections (rare) */

  /* ---- ground ---- */
  --bg:         #f8f6f1;   /* warm ivory page */
  --bg-tint:    #f3efe6;   /* faint warm wash */
  --surface:    #ffffff;   /* cards */
  --surface-2:  #f6f3ec;   /* warm hover / table head / inset */
  --surface-3:  #efeade;   /* warmer inset */

  --border:     #ebe5d8;   /* warm hairline */
  --border-2:   #ded6c5;   /* input / stronger */
  --border-3:   #cfc6b1;

  /* ---- bhagwa (controlled saffron accent) ---- */
  --accent:      #e07615;   /* actions, active, highlight */
  --accent-hi:   #f08a2c;   /* hover lift */
  --accent-ink:  #a9530b;   /* text on light / pressed */
  --accent-weak: #fcefe1;   /* tint — nav active, chips */
  --accent-line: #f2c9a1;   /* subtle border */
  --accent-glow: rgba(224,118,21,.18);

  /* ---- brand purple — LOGO / MARK ONLY ---- */
  --brand:      #5b2eff;

  /* ---- semantic ---- */
  --ok:     #147a3d;  --ok-weak:     #e6f3ea;  --ok-line: #bfe0c8;
  --warn:   #a35a0c;  --warn-weak:   #faefdb;  --warn-line: #ecd6ac;
  --danger: #b4271b;  --danger-weak: #fbe9e7;  --danger-line: #edc6c1;

  /* ---- elevation — soft, layered, premium (borders do most of the work) ---- */
  --sh-1: 0 1px 2px rgba(16,23,37,.04);
  --sh-2: 0 1px 2px rgba(16,23,37,.04), 0 2px 6px -1px rgba(16,23,37,.06);
  --sh-3: 0 2px 4px -1px rgba(16,23,37,.05), 0 12px 28px -12px rgba(16,23,37,.13);
  --sh-4: 0 8px 20px -8px rgba(16,23,37,.14), 0 32px 64px -24px rgba(16,23,37,.24);
  --sh-inset: inset 0 1px 0 rgba(255,255,255,.6);

  /* ---- radius — refined, consistent ---- */
  --r-xs: 7px; --r-sm: 9px; --r: 12px; --r-md: 14px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

  /* ---- type ---- */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", "Source Serif 4", Georgia, "Times New Roman", serif;  /* editorial headings (login etc.) */
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* ---- login CTA — reference saffron (a shade brighter than --accent, bhagwa family) ---- */
  --cta:    #f2691b;
  --cta-hi: #e15c12;

  --sidebar-w: 252px;
  --page-max: 1200px;

  /* ---- SUGAM Signature Wave — ONE reusable asset, reused everywhere ----
     ivory backgrounds: lavender lines + restrained bhagwa accent
     navy panels: the same geometry in refined bhagwa/gold           */
  --sig-wave:      url("sugam-wave.svg");
  --sig-wave-navy: url("sugam-wave-navy.svg");
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink-soft);
  font: 400 14px/1.55 var(--font); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-weak); color: var(--accent-ink); }
.mono { font-family: var(--mono); font-size: .84em; letter-spacing: 0; }

h1,h2,h3,h4,h5 { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.24; letter-spacing: -0.02em; }
h1 { font-size: 22px; letter-spacing: -0.025em; }
h2 { font-size: 17px; }
h3 { font-size: 14.5px; }
h4 { font-size: 12.5px; }
p { margin: 0 0 1rem; }
b, strong { font-weight: 600; color: var(--ink); }
code { font-family: var(--mono); font-size: .84em; background: var(--surface-2); padding: 1px 5px; border-radius: var(--r-xs); color: var(--ink-soft); }
a { color: var(--accent-ink); text-decoration: none; font-weight: 500; }
a:hover { color: var(--accent); }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
small, .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- buttons ---------- */
button, .btn {
  font: 500 13px/1 var(--font); letter-spacing: -0.01em; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--r-sm); padding: 0 15px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  background: var(--navy-panel); color: #fff;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
button:hover:not(:disabled), .btn:hover { background: #1c2740; }
button:active:not(:disabled), .btn:active { transform: translateY(.5px); }
button:disabled, .btn:disabled { opacity: .42; cursor: not-allowed; }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button.accent, .btn.accent { background: var(--accent); box-shadow: 0 1px 2px var(--accent-glow); }
button.accent:hover:not(:disabled) { background: var(--accent-hi); }

button.ghost, .btn.ghost, button.sec, button.secondary {
  background: var(--surface); color: var(--ink); border-color: var(--border-2); box-shadow: var(--sh-1);
}
button.ghost:hover:not(:disabled), button.sec:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-3); }

button.plain { background: transparent; color: var(--ink-2); border-color: transparent; box-shadow: none; }
button.plain:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }

button.danger {
  background: var(--surface); color: var(--danger); border-color: var(--danger-line); box-shadow: var(--sh-1);
}
button.danger:hover:not(:disabled) { background: var(--danger-weak); }

button.sm, .btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
button.xs, .btn.xs { height: 27px; padding: 0 10px; font-size: 11.5px; border-radius: var(--r-xs); }
button.block { width: 100%; }
button.link { background: none; border: 0; box-shadow: none; color: var(--accent-ink); padding: 0; height: auto; font-weight: 500; }
button.link:hover { background: none; color: var(--accent); }

/* ---------- form ---------- */
input, select, textarea {
  font: 400 13.5px/1.4 var(--font); width: 100%; padding: 10px 13px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-sm);
  transition: border-color .13s ease, box-shadow .13s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:hover, select:hover, textarea:hover { border-color: var(--border-3); }
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-weak);
}
label.fld { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); margin: 0 0 6px; letter-spacing: -0.005em; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-x: clip;
}
.sidebar > .brand { position: relative; padding-bottom: 26px; }
.sidebar > .brand::after {
  content: ""; position: absolute; left: -40px; right: -24px; bottom: -30px; height: 78px; pointer-events: none; z-index: 0;
  background: var(--sig-wave) left bottom / 290px auto no-repeat; opacity: .42;
}
.sidebar > .brand > * { position: relative; z-index: 1; }
.brand { padding: 22px 22px 18px; display: flex; align-items: center; gap: 12px; }
.brand .mk, .brand .mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; position: relative; overflow: hidden;
  background: linear-gradient(140deg, var(--brand) 0%, #7b3df0 42%, var(--accent) 100%);
  box-shadow: 0 4px 12px -3px rgba(91,46,255,.35), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand .mk::after, .brand .mark::after {
  content: "S"; position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 18px/1 var(--font); color: #fff; opacity: .95;
}
.brand b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.brand em, .brand span { font-style: normal; font-size: 11px; color: var(--ink-3); letter-spacing: -0.005em; }

nav.side { padding: 10px 10px 6px; display: flex; flex-direction: column; gap: 2px; }
/* CRM-style grouped sidebar — a plain uppercase divider label above a cluster of related links
   (Masters / Security / Reports / Order Management …). No collapse/expand — a professional sidebar
   groups by label, it doesn't need an accordion for a handful of items per group. */
nav.side .navlabel {
  padding: 16px 12px 6px; font: 700 10.5px/1.3 var(--font); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
}
nav.side .navlabel:first-child { padding-top: 4px; }
nav.side a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; font-size: 13.5px;
  letter-spacing: -0.005em; transition: background .13s ease, color .13s ease;
}
nav.side a svg { width: 17px; height: 17px; opacity: .62; transition: opacity .13s, color .13s; }
nav.side a:hover { background: var(--surface-2); color: var(--ink); }
nav.side a:hover svg { opacity: .9; }
nav.side a.active { background: var(--accent-weak); color: var(--accent-ink); font-weight: 600; }
nav.side a.active svg { opacity: 1; color: var(--accent); }
nav.side a.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}

.side-foot { margin-top: auto; padding: 14px 16px; border-top: 1px solid var(--border); position: relative; overflow: hidden; }
.side-foot::before {
  content: ""; position: absolute; left: -30px; right: 0; bottom: 0; height: 96px;
  background: var(--sig-wave) left bottom / 320px auto no-repeat;
  opacity: .7; pointer-events: none;
}
.side-foot .u { display: flex; align-items: center; gap: 10px; position: relative; }
.side-foot .av {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  background: var(--navy-panel); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px;
}
.side-foot b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.side-foot em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.side-foot button { margin-top: 12px; width: 100%; height: 32px; background: var(--surface); border: 1px solid var(--border-2); color: var(--ink-2); font-size: 12px; }
.side-foot button:hover { background: var(--surface-2); color: var(--ink); }

main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; padding: 0 30px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 6;
}
.topbar h1 { font-size: 16px; }
.topbar .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.content { padding: 28px 30px 64px; max-width: var(--page-max); width: 100%; }
.content > .page-head { margin-bottom: 22px; }
.content > .page-head h1 { font-size: 21px; }
.content > .page-head p { margin: 5px 0 0; color: var(--ink-3); font-size: 13.5px; }

/* ---------- card ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-2); }
.card-h { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card-h h3 { font-size: 14px; }
.card-b { padding: 22px; }
.card-b.flush { padding: 0; }
.card.pad-sm .card-b { padding: 16px; }

.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- KPI / stat ---------- */
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .k { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.stat .v { font-size: 27px; font-weight: 600; letter-spacing: -0.035em; margin-top: 8px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--ink-2); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.stat .s.up { color: var(--ok); } .stat .s.down { color: var(--danger); }
.stat .ico {
  position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: var(--accent-weak); color: var(--accent);
}
.stat .ico svg { width: 17px; height: 17px; }

/* ---------- table ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); padding: 11px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
th:first-child { border-top-left-radius: 0; }
td { padding: 13px 18px; border-bottom: 1px solid var(--border); color: var(--ink-2); font-size: 13px; vertical-align: middle; }
td b, td strong { color: var(--ink); font-weight: 600; }
td .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s ease; }
tbody tr.clk:hover, tbody tr.clickable:hover { background: var(--surface-2); cursor: pointer; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- badge / pill ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px 3px 8px; border-radius: var(--r-pill); border: 1px solid transparent; letter-spacing: -0.005em;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent); }
.pill.ok   { color: var(--ok);     background: var(--ok-weak);     border-color: var(--ok-line); }
.pill.off  { color: var(--ink-3);  background: var(--surface-3); }
.pill.warn { color: var(--warn);   background: var(--warn-weak);   border-color: var(--warn-line); }
.pill.err  { color: var(--danger); background: var(--danger-weak); border-color: var(--danger-line); }
.pill.accent { color: var(--accent-ink); background: var(--accent-weak); border-color: var(--accent-line); }

.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--ink-2); }
.tag.admin { background: var(--accent-weak); color: var(--accent-ink); }
.tag.navy  { background: var(--navy-panel); color: #fff; }

.check { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); color: #fff; flex: 0 0 auto; }
.check svg { width: 10px; height: 10px; }

/* ---------- progress ---------- */
.bar { height: 5px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); transition: width .4s ease; }
.bar.indet > i { width: 34%; animation: sg-slide 1.2s cubic-bezier(.45,0,.2,1) infinite; }
@keyframes sg-slide { 0% { margin-left: -34%; } 100% { margin-left: 100%; } }

/* ---------- empty state (with signature wave) ---------- */
.empty {
  position: relative; text-align: center; padding: 44px 24px 52px; color: var(--ink-3); overflow: hidden;
}
.empty::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 130px; pointer-events: none;
  background: var(--sig-wave) center bottom / 460px auto no-repeat; opacity: .55;
}
.empty > * { position: relative; }
.empty .em-ico {
  width: 42px; height: 42px; margin: 0 auto 12px; border-radius: var(--r); display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--border);
}
.empty .em-t { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.empty .em-s { font-size: 12.5px; margin-top: 4px; }

/* ---------- chips / toggles ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--border-2);
  border-radius: var(--r-sm); font-size: 13px; cursor: pointer; user-select: none; background: var(--surface);
  transition: border-color .12s, background .12s, color .12s;
}
.chip input { width: auto; margin: 0; accent-color: var(--accent); }
.chip:hover { border-color: var(--accent-line); }
.chip.on { background: var(--accent-weak); border-color: var(--accent-line); color: var(--accent-ink); font-weight: 600; }

/* ---------- drawer / modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(16,23,37,.34); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 512px; max-width: 96vw; background: var(--surface);
  box-shadow: var(--sh-4); transform: translateX(103%); transition: transform .26s cubic-bezier(.4,0,.2,1);
  z-index: 50; display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.d-h { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.d-h h2 { font-size: 16px; }
.d-h .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.d-b { padding: 24px; overflow-y: auto; flex: 1; }
.d-f { padding: 15px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface); }
.x { background: transparent; color: var(--ink-3); padding: 0; width: 30px; height: 30px; font-size: 18px; border: 0; box-shadow: none; }
.x:hover { background: var(--surface-2); color: var(--ink); }

.fg { margin-bottom: 22px; }
.fg-t { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(14px); opacity: 0;
  transition: .22s cubic-bezier(.4,0,.2,1); z-index: 60; background: var(--navy-panel); color: #fff;
  padding: 11px 18px; border-radius: var(--r-sm); font-size: 13px; max-width: 90vw; box-shadow: var(--sh-4);
  display: flex; align-items: center; gap: 9px;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--danger); }

/* ============================================================
   SUGAM SIGNATURE WAVE — hero visual (full-field flow + travelling light)
   ============================================================ */
.sgw-host { position: relative; isolation: isolate; }
.sgw { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.sgw use { fill: none; vector-effect: non-scaling-stroke; }

/* base geometry — whisper-faint white on navy (hero context) */
.sgw .sgw-base use { stroke: #ffffff; stroke-opacity: .10; stroke-width: 1; }
.sgw .sgw-mid  use { stroke: #ffffff; stroke-opacity: .20;  stroke-width: 1; }
.sgw .sgw-accent    { stroke: var(--accent); stroke-opacity: .42; stroke-width: 1.2; }

/* travelling light — a soft lit segment moving slowly along selected paths */
.sgw .sgw-run { stroke-linecap: round; stroke-dasharray: 340 1760; stroke-dashoffset: 2100; }
.sgw .sgw-run-w  { stroke: #ffffff;          stroke-opacity: .72; stroke-width: 1.9; animation: sgw-run 13s linear infinite; }
.sgw .sgw-run-b  { stroke: var(--accent-hi); stroke-opacity: .9;  stroke-width: 2;   animation: sgw-run 17s linear infinite; animation-delay: -7s; }
.sgw .sgw-run-w2 { stroke: #ffffff;          stroke-opacity: .4;  stroke-width: 1.5; animation: sgw-run 23s linear infinite; animation-delay: -13s; }
.sgw .sgw-l2 { filter: drop-shadow(0 0 4px rgba(255,255,255,.24)); }
@keyframes sgw-run { to { stroke-dashoffset: 0; } }

/* extremely subtle cursor parallax — depth by layer */
.sgw .sgw-l { transition: transform .7s cubic-bezier(.2,.85,.25,1); will-change: transform; }
.sgw .sgw-l0 { transform: translate(calc(var(--sgw-mx, 0) * 6px),  calc(var(--sgw-my, 0) * 4px)); }
.sgw .sgw-l1 { transform: translate(calc(var(--sgw-mx, 0) * 13px), calc(var(--sgw-my, 0) * 8px)); }
.sgw .sgw-l2 { transform: translate(calc(var(--sgw-mx, 0) * 22px), calc(var(--sgw-my, 0) * 13px)); }

/* ivory / warm-white variant — the animated field is replaced by a static
   corner-anchored contour wave (see .gate-visual.sgw-ivory::before below) */
.sgw-ivory .sgw { display: none; }

@media (prefers-reduced-motion: reduce) {
  .sgw .sgw-run { animation: none !important; stroke-dasharray: none; stroke-dashoffset: 0; stroke-opacity: .34; }
  .sgw .sgw-l { transition: none; }
}

/* ============================================================
   LOGIN GATE — premium light split  ·  reference-locked
   Navy / Purple + Bhagwa / Orange on warm white
   ============================================================ */
.gate {
  min-height: 100vh; position: relative; overflow: hidden;
  background: var(--surface); color: var(--ink-soft);
}
.gate.gate-split {
  display: grid; grid-template-columns: 1fr 1fr; place-items: stretch; padding: 0;
}
.gate.gate-split .gate-visual,
.gate.gate-split .gate-form { padding-bottom: clamp(88px, 11vh, 128px); }   /* clear the footer bar */

/* ---- left : branding ---- */
.gate-visual {
  position: relative; overflow: hidden;
  background: linear-gradient(176deg, #fbf9f6 0%, #f8f3ee 48%, #f6f0f3 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(20px, 3vh, 30px); padding: clamp(44px, 6vw, 92px) clamp(34px, 6vw, 96px);
}
.gate-visual > *:not(.sgw) { position: relative; z-index: 2; }
/* signature wave — fine bhagwa contour lines flowing out of the lower-left corner */
.gate-visual.sgw-ivory::before {
  content: ""; position: absolute; left: 0; bottom: 0; z-index: 0; pointer-events: none;
  width: min(118%, 1120px); height: 88%;
  background: var(--sig-wave) left bottom / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(72deg, #000 42%, transparent 82%);
          mask-image: linear-gradient(72deg, #000 42%, transparent 82%);
}
/* whisper of the same wave in the upper-right (reference) */
.gate-visual.sgw-ivory::after {
  content: ""; position: absolute; right: -8%; top: -6%; z-index: 0; pointer-events: none;
  width: 46%; height: 34%; opacity: .5; transform: scaleY(-1);
  background: var(--sig-wave) right top / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(210deg, #000 8%, transparent 52%);
          mask-image: linear-gradient(210deg, #000 8%, transparent 52%);
}

.gate-logo { display: flex; flex-direction: column; gap: 9px; }
.gate-logo .wm {
  display: inline-flex; align-items: center;
  font: 700 clamp(26px, 2.6vw, 32px)/1 var(--font); letter-spacing: .09em; color: var(--ink);
}
.gate-logo .wm .mk { width: .8em; height: 1em; margin: 0 .03em; transform: translateY(-.03em); }
.gate-logo .tagline { font: 600 10.5px/1 var(--font); letter-spacing: .26em; color: var(--ink-2); }

.gate-visual h1 {
  font: 500 clamp(33px, 4.3vw, 54px)/1.08 var(--font-display);
  letter-spacing: -0.012em; color: var(--ink); margin: 0; text-wrap: balance;
}
.gate-visual h1 .aw { color: var(--accent); }
.gate-visual .rule { width: 52px; height: 3px; border-radius: 2px; background: var(--accent); margin-top: 18px; }
.gate-visual .lede { font: 400 15px/1.62 var(--font); color: var(--ink-2); max-width: 40ch; margin: 0; }

.gate-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 500px; }
.gate-feat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.gate-feat .fic {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--surface); border: 1px solid var(--accent-line);
  box-shadow: 0 5px 16px -7px rgba(224,118,21,.28);
}
.gate-feat .fic svg { width: 23px; height: 23px; }
.gate-feat h3 { font: 600 13.5px/1.2 var(--font); color: var(--brand); margin: 0; }
.gate-feat p  { font: 400 12px/1.45 var(--font); color: var(--ink-2); margin: 0; max-width: 17ch; }

/* ---- right : form ---- */
.gate-form {
  position: relative; background: var(--surface);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(44px, 5vw, 80px) clamp(30px, 6vw, 104px);
}
.gate-form .fwrap { width: 100%; max-width: 384px; margin: 0 auto; }
.gate-lang {
  position: absolute; top: 26px; right: clamp(22px, 4vw, 52px);
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 13px/1 var(--font); color: var(--ink-2);
  background: none; border: 0; box-shadow: none; padding: 7px 9px; border-radius: var(--r-sm); cursor: pointer;
}
.gate-lang:hover { background: var(--surface-2); color: var(--ink); }
.gate-lang svg { width: 15px; height: 15px; }

.gate-form h2 { font: 500 clamp(27px, 3vw, 35px)/1.1 var(--font-display); letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.gate-form .h-rule { width: 46px; height: 3px; border-radius: 2px; background: var(--accent); margin: 15px 0 16px; }
.gate-form .sub { font: 400 14px/1.5 var(--font); color: var(--ink-2); margin: 0 0 28px; }

.gate-field { margin-bottom: 17px; }
.gate-field > label { display: block; font: 500 13px/1 var(--font); color: var(--ink-soft); margin-bottom: 8px; }
.gate-ipt { position: relative; }
.gate-ipt > svg.lead { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--accent); pointer-events: none; }
.gate-ipt > input {
  width: 100%; height: 50px; padding: 0 44px; border-radius: var(--r-md);
  border: 1px solid var(--border-2); background: var(--surface);
  font: 400 14px/1 var(--font); color: var(--ink);
}
.gate-ipt > input::placeholder { color: var(--ink-3); }
.gate-ipt > input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-weak); }
.gate-ipt > button.eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; padding: 0; background: none; border: 0; box-shadow: none;
  color: var(--ink-3); display: grid; place-items: center;
}
.gate-ipt > button.eye:hover { background: none; color: var(--accent); }
.gate-ipt > button.eye svg { width: 18px; height: 18px; }

.gate-forgot {
  display: block; margin: 2px 0 22px auto; text-align: right;
  font: 500 13px/1 var(--font); color: var(--accent-ink);
  background: none; border: 0; box-shadow: none; padding: 0; cursor: pointer;
}
.gate-forgot:hover { color: var(--accent); background: none; }

.gate-cta {
  width: 100%; height: 54px; border-radius: var(--r-md);
  background: var(--cta); color: #fff; border: 0;
  font: 600 15px/1 var(--font); letter-spacing: .005em;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 12px 26px -12px rgba(242,105,27,.6);
}
.gate-cta:hover:not(:disabled) { background: var(--cta-hi); }
.gate-cta:disabled { opacity: .55; }
.gate-cta svg { width: 18px; height: 18px; }

.gate-or { display: flex; align-items: center; gap: 14px; margin: 18px 0; font: 400 12px/1 var(--font); color: var(--ink-3); }
.gate-or::before, .gate-or::after { content: ""; flex: 1; height: 1px; background: var(--border-2); }

.gate-otp {
  width: 100%; height: 52px; border-radius: var(--r-md);
  background: var(--surface); color: var(--accent-ink);
  border: 1.5px solid var(--accent); box-shadow: none;
  font: 600 14px/1 var(--font);
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.gate-otp:hover:not(:disabled) { background: var(--accent-weak); color: var(--accent-ink); }
.gate-otp svg { width: 17px; height: 17px; }

.gate-err { color: var(--danger); font: 400 13px/1.45 var(--font); margin-top: 14px; min-height: 1.1em; }
.gate-err.note { color: var(--ink-2); }

/* ---- centre emblem straddling the split ---- */
.gate-emblem {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 94px; height: 94px; border-radius: 50%; z-index: 6;
  background: var(--surface); display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--border), 0 20px 42px -14px rgba(242,105,27,.4), 0 10px 22px -10px rgba(16,23,37,.16);
}
.gate-emblem::before {
  content: ""; position: absolute; inset: -16px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}
.gate-emblem svg { width: 44px; height: 44px; }

/* ---- footer ---- */
.gate-footer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px;
  padding: 15px clamp(24px, 4vw, 56px);
  border-top: 1px solid var(--border); background: rgba(255,255,255,.82); backdrop-filter: blur(6px);
  font: 400 12px/1 var(--font); color: var(--ink-3);
}
.gate-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.gate-footer a, .gate-footer button {
  background: none; border: 0; box-shadow: none; padding: 0; cursor: pointer;
  color: var(--ink-2); font: 400 12px/1 var(--font); display: inline-flex; align-items: center; gap: 6px;
}
.gate-footer a:hover, .gate-footer button:hover { color: var(--accent); background: none; }
.gate-footer svg { width: 13px; height: 13px; }

/* ---- responsive ---- */
@media (max-width: 940px) {
  .gate.gate-split { grid-template-columns: 1fr; }
  .gate.gate-split .gate-visual, .gate.gate-split .gate-form { padding-bottom: clamp(40px, 6vw, 64px); }
  .gate-emblem { display: none; }
  .gate-visual { border-right: 0; border-bottom: 1px solid var(--border); }
  .gate-footer { position: static; background: var(--surface); }
}
@media (max-width: 560px) {
  .gate-feats { grid-template-columns: 1fr; max-width: 340px; gap: 14px; }
  .gate-feat { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; text-align: left; }
  .gate-feat .fic { grid-row: 1 / span 2; align-self: center; }
  .gate-feat p { max-width: none; }
  .gate-lang { position: static; align-self: flex-end; margin-bottom: 6px; }
  .gate-form { padding-top: 40px; }
  .gate-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- deep navy panel (promo / feature / product-on-navy) ---------- */
.panel-navy {
  position: relative; overflow: hidden; background: var(--navy-panel); color: #e7ebf3;
  border-radius: var(--r-lg); padding: 24px; border: 1px solid #1c2740;
}
.panel-navy h1, .panel-navy h2, .panel-navy h3, .panel-navy b, .panel-navy strong { color: #fff; }
.panel-navy .muted { color: #93a0b8; }
.panel-navy::after {
  content: ""; position: absolute; left: -50px; bottom: -30px; width: 560px; height: 300px; pointer-events: none;
  background: var(--sig-wave-navy) left bottom / contain no-repeat; opacity: .9;
}
.panel-navy.sgw-host::after { display: none; } /* animated hero wave takes over */
.panel-navy > *:not(.sgw) { position: relative; z-index: 1; }
.panel-navy button.accent { box-shadow: 0 4px 14px -4px var(--accent-glow); }

/* ---------- utilities ---------- */
.row { display: flex; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2,1fr); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 6px; }
  .sidebar .brand { padding: 12px 14px; }
  nav.side { flex-direction: row; padding: 8px 4px; }
  nav.side .navlabel { display: none; }
  nav.side a.active::before { display: none; }
  .side-foot { display: none; }
  .side-foot::before { display: none; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px 44px; }
  .drawer { width: 100%; }
  .card-b { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
