/* ============================================================
   JAI — Judicial AI Intelligence  ·  powered by MEDHA AI
   MMG Infotech — Police-AI unified platform (DGP-grade DEMO)
   Light theme · Navy + Gold · Bilingual हिंदी/English
   ============================================================ */

:root{
  --navy:#0a1f44; --navy-2:#12305f; --navy-soft:#1b3a6b; --navy-ink:#0a1830;
  --gold:#c9a84c; --gold-2:#e3c977; --gold-deep:#a9842f;
  --bg:#eef2f8; --bg-2:#f6f8fc; --surface:#fff; --surface-2:#f9fbff;
  --border:#e2e8f2; --border-2:#d4deec;
  --ink:#14213d; --ink-2:#46587a; --ink-3:#8090ab;
  --green:#1e9e6a; --green-bg:#e6f6ee; --amber:#d68a1e; --amber-bg:#fcf2e0;
  --red:#d2483f; --red-bg:#fbe9e7; --blue:#2563c9; --blue-bg:#e7f0fd;
  --purple:#6b46c1; --purple-bg:#efeafc;
  --shadow-sm:0 1px 2px rgba(16,35,71,.06),0 1px 3px rgba(16,35,71,.05);
  --shadow:0 4px 14px rgba(16,35,71,.08),0 2px 6px rgba(16,35,71,.05);
  --shadow-lg:0 18px 50px rgba(16,35,71,.18);
  --radius:14px; --radius-sm:9px; --sidebar-w:252px; --topbar-h:66px;
  --ff-head:"Algerian","Sitka Heading","Cinzel",serif;
  --ff-body:"Sitka Text","Segoe UI","Inter",system-ui,sans-serif;
  --ff-hi:"Nirmala UI","Noto Sans Devanagari","Mangal",sans-serif;
  --ff-mono:"Consolas","SF Mono",monospace;
}
*{ box-sizing:border-box; margin:0; padding:0; }
html,body{ height:100%; }
body{ font-family:var(--ff-body); color:var(--ink); background:var(--bg); font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased; }
a{ color:inherit; text-decoration:none; } ::selection{ background:var(--gold-2); color:var(--navy); }
.hi{ font-family:var(--ff-hi); }
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:#c4d0e2; border-radius:20px; border:2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover{ background:#a9b8d0; }

/* ---------- crest / brand ---------- */
.brandmark{ display:flex; align-items:center; gap:12px; }
.crest{ width:46px; height:52px; flex:0 0 auto; position:relative; filter:drop-shadow(0 3px 5px rgba(16,35,71,.18)); }
.crest svg{ width:100%; height:100%; display:block; }
.brandmark .wordmark b{ font-family:var(--ff-head); font-weight:400; font-size:21px; letter-spacing:3px; color:var(--navy); display:block; line-height:1; }
.brandmark .wordmark small{ font-size:9.5px; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-3); display:block; margin-top:4px; }

/* ============================================================ LOGIN */
.login-wrap{ min-height:100vh; display:grid; grid-template-columns:1.12fr .88fr; }
.login-art{ position:relative; overflow:hidden; color:#eaf0fb; padding:50px 58px; display:flex; flex-direction:column; justify-content:space-between;
  background:radial-gradient(1200px 600px at 18% -10%,#1c3e76 0%,transparent 55%),radial-gradient(900px 700px at 110% 120%,#0c2750 0%,transparent 50%),linear-gradient(160deg,#0a1f44,#0c264f 55%,#0a1c3d); }
.login-art .art-grid{ position:absolute; inset:0; opacity:.5; background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px); background-size:46px 46px; mask-image:radial-gradient(900px 600px at 70% 30%,#000,transparent 80%); }
.gov-strip{ position:relative; z-index:2; display:flex; align-items:center; gap:14px; }
.gov-strip .wordmark b{ color:#fff; } .gov-strip .wordmark small{ color:var(--gold-2); }
.gov-strip .sep{ width:1px; height:40px; background:rgba(255,255,255,.18); }
.gov-strip .upp{ font-size:12.5px; line-height:1.5; }
.gov-strip .upp b{ color:#fff; font-family:var(--ff-hi); font-size:15px; } .gov-strip .upp span{ color:var(--gold-2); }
.login-art .hero{ position:relative; z-index:2; max-width:520px; }
.login-art .hero h1{ font-family:var(--ff-head); font-weight:400; font-size:38px; letter-spacing:1px; line-height:1.14; margin-bottom:12px; }
.login-art .hero h1 em{ color:var(--gold-2); font-style:normal; }
.login-art .hero .h-hi{ font-family:var(--ff-hi); font-size:22px; color:#dCEaff; color:#d6e3ff; margin-bottom:18px; font-weight:500; }
.login-art .hero p{ color:#b9c6de; font-size:14.5px; line-height:1.75; }
.login-art .pills{ position:relative; z-index:2; display:flex; flex-wrap:wrap; gap:9px; }
.pill{ font-size:12px; padding:7px 13px; border-radius:30px; background:rgba(255,255,255,.07); border:1px solid rgba(201,168,76,.3); color:#dfe7f4; }
.login-art .footnote{ position:relative; z-index:2; color:#8aa0c4; font-size:12px; }
.login-form-col{ background:var(--surface); display:grid; place-items:center; padding:40px; }
.login-card{ width:100%; max-width:392px; }
.login-card h2{ font-family:var(--ff-head); font-weight:400; font-size:24px; letter-spacing:1px; color:var(--navy); }
.login-card h2 .hi{ font-size:20px; color:var(--ink-2); }
.login-card .sub{ color:var(--ink-2); margin:8px 0 26px; font-size:13px; }
.field{ margin-bottom:16px; } .field label{ display:block; font-size:12px; font-weight:600; letter-spacing:.3px; color:var(--ink-2); margin-bottom:7px; }
.field label .hi{ color:var(--ink); }
.field input{ width:100%; padding:12px 14px; border:1.5px solid var(--border-2); border-radius:10px; font-family:var(--ff-body); font-size:14.5px; color:var(--ink); background:var(--surface-2); transition:.15s; }
.field input:focus{ outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(201,168,76,.18); background:#fff; }
.otp-row input{ text-align:center; letter-spacing:8px; font-size:18px; }
.login-meta{ display:flex; justify-content:space-between; align-items:center; font-size:12.5px; color:var(--ink-3); margin:2px 0 22px; }
.login-meta a{ color:var(--blue); font-weight:600; }

/* ============================================================ BUTTONS */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family:var(--ff-body); font-weight:600; font-size:13.5px; letter-spacing:.2px; padding:11px 18px; border-radius:10px; border:1.5px solid transparent; cursor:pointer; transition:transform .08s,box-shadow .15s,background .15s,border-color .15s,filter .15s; white-space:nowrap; }
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:linear-gradient(160deg,var(--navy),var(--navy-2)); color:#fff; box-shadow:var(--shadow-sm); }
.btn-primary:hover{ box-shadow:var(--shadow); }
.btn-gold{ background:linear-gradient(160deg,var(--gold),var(--gold-deep)); color:#2a2110; box-shadow:var(--shadow-sm); }
.btn-gold:hover{ filter:brightness(1.05); }
.btn-ghost{ background:var(--surface); color:var(--navy); border-color:var(--border-2); }
.btn-ghost:hover{ border-color:var(--gold); background:var(--surface-2); }
.btn-danger{ background:linear-gradient(160deg,#d2483f,#b23229); color:#fff; }
.btn-block{ width:100%; } .btn-sm{ padding:7px 12px; font-size:12.5px; border-radius:8px; }
.btn[disabled]{ opacity:.55; cursor:default; }

/* ============================================================ APP SHELL */
.app{ display:grid; grid-template-columns:var(--sidebar-w) 1fr; min-height:100vh; }
.sidebar{ background:linear-gradient(180deg,#0a1f44,#0b224a 60%,#0a1c3d); color:#cdd8ec; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.side-top{ padding:16px 16px 14px; border-bottom:1px solid rgba(255,255,255,.07); display:flex; align-items:center; gap:11px; }
.side-top .wordmark b{ color:#fff; } .side-top .wordmark small{ color:var(--gold-2); }
.nav{ padding:10px 12px; overflow-y:auto; flex:1; }
.nav .group{ font-size:10px; letter-spacing:1.4px; text-transform:uppercase; color:#6f83a6; margin:15px 10px 7px; }
.nav a{ display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:10px; color:#c2cfe6; font-size:13.5px; font-weight:500; margin-bottom:3px; position:relative; cursor:pointer; transition:.12s; }
.nav a .ic{ width:18px; height:18px; flex:0 0 auto; opacity:.85; }
.nav a .sub-hi{ font-family:var(--ff-hi); font-size:11px; color:#8499bb; margin-left:auto; }
.nav a:hover{ background:rgba(255,255,255,.06); color:#fff; }
.nav a.active{ background:linear-gradient(90deg,rgba(201,168,76,.22),rgba(201,168,76,.05)); color:#fff; }
.nav a.active::before{ content:""; position:absolute; left:-12px; top:8px; bottom:8px; width:3px; border-radius:0 4px 4px 0; background:var(--gold); }
.nav a.active .sub-hi{ color:var(--gold-2); }
.nav a .tag{ font-size:9.5px; padding:2px 7px; border-radius:20px; background:var(--gold); color:#2a2110; font-weight:700; margin-left:auto; }
.side-foot{ padding:13px 16px; border-top:1px solid rgba(255,255,255,.07); font-size:11.5px; color:#7388ab; }
.side-foot b{ color:#c8d4ea; font-weight:600; }
.live-dot{ width:8px; height:8px; border-radius:50%; background:#3ddc84; display:inline-block; box-shadow:0 0 0 0 rgba(61,220,132,.6); animation:livepulse 2s infinite; }
@keyframes livepulse{ 0%{ box-shadow:0 0 0 0 rgba(61,220,132,.5);} 70%{ box-shadow:0 0 0 7px rgba(61,220,132,0);} 100%{ box-shadow:0 0 0 0 rgba(61,220,132,0);} }

/* topbar */
.topbar{ height:var(--topbar-h); background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; gap:14px; padding:0 22px; position:sticky; top:0; z-index:30; }
.topbar .crumb{ font-size:13px; color:var(--ink-3); } .topbar .crumb b{ color:var(--ink); font-weight:600; }
.search{ margin-left:6px; flex:1; max-width:430px; display:flex; align-items:center; gap:9px; background:var(--bg-2); border:1.5px solid var(--border); border-radius:10px; padding:9px 13px; color:var(--ink-3); }
.search input{ border:none; background:none; outline:none; flex:1; font-family:var(--ff-body); font-size:13.5px; color:var(--ink); }
.topbar .spacer{ flex:1; }
.ticker{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--ink-2); background:var(--green-bg); border:1px solid #bfe6d2; padding:6px 12px; border-radius:20px; }
.ticker .live-dot{ box-shadow:none; }
.tb-icon{ width:38px; height:38px; border-radius:10px; display:grid; place-items:center; color:var(--ink-2); background:var(--bg-2); border:1px solid var(--border); cursor:pointer; position:relative; }
.tb-icon:hover{ border-color:var(--gold); color:var(--navy); }
.tb-icon .dot{ position:absolute; top:7px; right:8px; width:8px; height:8px; border-radius:50%; background:var(--red); border:2px solid #fff; }
.who{ display:flex; align-items:center; gap:10px; padding-left:8px; border-left:1px solid var(--border); }
.who .av{ width:38px; height:38px; border-radius:50%; background:linear-gradient(150deg,var(--navy),var(--navy-2)); color:var(--gold-2); display:grid; place-items:center; font-family:var(--ff-head); font-size:15px; }
.who .nm{ font-size:13px; font-weight:600; color:var(--ink); line-height:1.2; } .who .rl{ font-size:11px; color:var(--ink-3); }

.main{ display:flex; flex-direction:column; min-width:0; }
.content{ padding:24px; flex:1; }
.view{ display:none; } .view.active{ display:block; animation:fadeUp .3s ease; }
@keyframes fadeUp{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:none;} }

.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:20px; flex-wrap:wrap; }
.page-head h1{ font-family:var(--ff-head); font-weight:400; font-size:25px; letter-spacing:.5px; color:var(--navy); line-height:1.1; }
.page-head h1 .hi{ font-family:var(--ff-hi); font-size:21px; color:var(--ink-2); margin-left:8px; }
.page-head .lead{ color:var(--ink-2); font-size:13.5px; margin-top:7px; max-width:720px; }
.page-head .actions{ display:flex; gap:10px; }

/* grid + cards */
.grid{ display:grid; gap:18px; }
.g-4{ grid-template-columns:repeat(4,1fr);} .g-3{ grid-template-columns:repeat(3,1fr);} .g-2{ grid-template-columns:repeat(2,1fr);}
.g-21{ grid-template-columns:2fr 1fr;} .g-12{ grid-template-columns:1fr 2fr;}
@media(max-width:1180px){ .g-4{grid-template-columns:repeat(2,1fr);} .g-3{grid-template-columns:repeat(2,1fr);} .g-21,.g-12{grid-template-columns:1fr;} }
.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.card.pad{ padding:18px 20px; }
.card-h{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 20px; border-bottom:1px solid var(--border); }
.card-h h3{ font-size:14.5px; font-weight:700; color:var(--ink); letter-spacing:.2px; }
.card-h h3 .hi{ font-weight:500; color:var(--ink-2); font-size:13px; }
.card-h .sub{ font-size:12px; color:var(--ink-3); } .card-b{ padding:18px 20px; }
.card-foot{ padding:12px 20px; border-top:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }

.kpi .k-top{ display:flex; align-items:center; justify-content:space-between; }
.kpi .k-ic{ width:42px; height:42px; border-radius:12px; display:grid; place-items:center; }
.kpi .k-val{ font-family:var(--ff-head); font-weight:400; font-size:31px; letter-spacing:.5px; color:var(--navy); margin:13px 0 2px; line-height:1; }
.kpi .k-label{ font-size:12.5px; color:var(--ink-2); } .kpi .k-label .hi{ color:var(--ink-3); font-size:11.5px; display:block; }
.k-delta{ font-size:11.5px; font-weight:700; padding:3px 8px; border-radius:20px; }
.delta-up{ color:var(--green); background:var(--green-bg);} .delta-dn{ color:var(--red); background:var(--red-bg);} .delta-fl{ color:var(--ink-2); background:var(--bg-2);}

.badge{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; letter-spacing:.3px; padding:3px 9px; border-radius:20px; text-transform:uppercase; }
.b-green{color:var(--green);background:var(--green-bg);} .b-amber{color:var(--amber);background:var(--amber-bg);}
.b-red{color:var(--red);background:var(--red-bg);} .b-blue{color:var(--blue);background:var(--blue-bg);}
.b-purple{color:var(--purple);background:var(--purple-bg);} .b-gray{color:var(--ink-2);background:var(--bg-2);}
.dotmark{ width:8px; height:8px; border-radius:50%; display:inline-block; }

table.tbl{ width:100%; border-collapse:collapse; font-size:13px; }
table.tbl th{ text-align:left; font-size:11px; letter-spacing:.5px; text-transform:uppercase; color:var(--ink-3); font-weight:700; padding:11px 14px; border-bottom:1px solid var(--border); background:var(--surface-2); }
table.tbl td{ padding:11px 14px; border-bottom:1px solid var(--border); color:var(--ink); vertical-align:middle; }
table.tbl tr:hover td{ background:var(--surface-2); } table.tbl tbody tr:last-child td{ border-bottom:none; }
table.tbl .mono{ font-family:var(--ff-mono); font-size:12px; color:var(--ink-2); }
tr.flash td{ animation:rowflash 1.4s ease; }
@keyframes rowflash{ 0%{ background:var(--gold-2);} 100%{ background:transparent;} }

.lrow{ display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--border); }
.lrow:last-child{ border-bottom:none; }
.lrow .li-ic{ width:38px; height:38px; border-radius:11px; flex:0 0 auto; display:grid; place-items:center; }
.lrow .li-main{ flex:1; min-width:0; } .lrow .li-main b{ font-size:13.5px; color:var(--ink); display:block; } .lrow .li-main span{ font-size:12px; color:var(--ink-3); }
.lrow .li-time{ font-size:11.5px; color:var(--ink-3); white-space:nowrap; }

.meter{ height:8px; border-radius:20px; background:var(--bg-2); overflow:hidden; }
.meter>i{ display:block; height:100%; border-radius:20px; background:linear-gradient(90deg,var(--gold),var(--gold-deep)); transition:width 1s cubic-bezier(.2,.8,.2,1); }

.barchart{ display:flex; align-items:flex-end; gap:10px; height:150px; padding-top:10px; }
.barchart .bar{ flex:1; border-radius:7px 7px 0 0; background:linear-gradient(180deg,var(--navy-2),var(--navy)); position:relative; min-height:6px; transition:height .8s cubic-bezier(.2,.8,.2,1); }
.barchart .bar:hover{ background:linear-gradient(180deg,var(--gold),var(--gold-deep)); }
.barchart .bar span{ position:absolute; bottom:-22px; left:0; right:0; text-align:center; font-size:10.5px; color:var(--ink-3); }
.bc-x{ height:18px; }

.mapbox{ position:relative; height:340px; border-radius:var(--radius); overflow:hidden; border:1px solid var(--border);
  background:radial-gradient(circle at 30% 40%,rgba(37,99,201,.10),transparent 40%),radial-gradient(circle at 65% 60%,rgba(210,72,63,.10),transparent 35%),linear-gradient(180deg,#eef3fb,#e3ebf7); }
.mapbox .pin{ position:absolute; transform:translate(-50%,-50%); }
.mapbox .pin i{ display:block; width:14px; height:14px; border-radius:50% 50% 50% 0; transform:rotate(-45deg); box-shadow:0 2px 6px rgba(0,0,0,.25); }
.mapbox .pin.r i{background:var(--red);} .mapbox .pin.a i{background:var(--amber);} .mapbox .pin.b i{background:var(--blue);}
.mapbox .pin::after{ content:""; position:absolute; left:50%; top:50%; width:30px; height:30px; transform:translate(-50%,-50%); border-radius:50%; animation:pulse 2.4s infinite; }
.mapbox .pin.r::after{background:rgba(210,72,63,.25);} .mapbox .pin.a::after{background:rgba(214,138,30,.22);} .mapbox .pin.b::after{background:rgba(37,99,201,.2);}
@keyframes pulse{ 0%{transform:translate(-50%,-50%) scale(.4);opacity:.8;} 100%{transform:translate(-50%,-50%) scale(2.4);opacity:0;} }
.map-legend{ position:absolute; bottom:12px; left:12px; background:rgba(255,255,255,.92); border:1px solid var(--border); border-radius:10px; padding:9px 12px; font-size:11.5px; box-shadow:var(--shadow-sm); }
.map-legend div{ display:flex; align-items:center; gap:7px; margin:3px 0; }

.graphbox{ position:relative; height:340px; border-radius:var(--radius); border:1px solid var(--border); overflow:hidden; background:radial-gradient(circle at 50% 50%,#f6f9fe,#e9f0fa); }
.graphbox svg line{ stroke-dasharray:300; stroke-dashoffset:300; } .graphbox.drawn svg line{ animation:draw 1s ease forwards; }
.graphbox svg g{ opacity:0; } .graphbox.drawn svg g{ animation:fadeUp .5s ease forwards; animation-delay:.6s; }
@keyframes draw{ to{ stroke-dashoffset:0; } }

/* MEDHA panel */
.medha{ background:linear-gradient(160deg,#0d2552,#0a1f44); color:#e7eefb; border:1px solid var(--navy-soft); border-radius:var(--radius); overflow:hidden; }
.medha .m-h{ display:flex; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid rgba(255,255,255,.08); }
.medha .m-h .m-ic{ width:34px; height:34px; border-radius:10px; background:linear-gradient(150deg,var(--gold),var(--gold-deep)); display:grid; place-items:center; color:#2a2110; font-family:var(--ff-head); position:relative; }
.medha.thinking .m-ic::after{ content:""; position:absolute; inset:-3px; border-radius:12px; border:2px solid var(--gold-2); border-top-color:transparent; animation:spin .8s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg);} }
.medha .m-h b{ font-size:14px; color:#fff; letter-spacing:.4px; } .medha .m-h small{ display:block; color:var(--gold-2); font-size:11px; }
.medha .m-b{ padding:16px 18px; font-size:13px; line-height:1.65; color:#cdd9ee; }
.medha .m-b .sug{ background:rgba(255,255,255,.05); border:1px solid rgba(201,168,76,.25); border-radius:10px; padding:11px 13px; margin:9px 0; animation:fadeUp .4s ease; }
.medha .m-b .sug b{ color:var(--gold-2); }
.medha .m-foot{ padding:12px 18px; border-top:1px solid rgba(255,255,255,.08); display:flex; gap:9px; flex-wrap:wrap; }
.chip{ font-size:11.5px; padding:6px 11px; border-radius:20px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.12); color:#dbe6f7; cursor:pointer; transition:.12s; }
.chip:hover{ border-color:var(--gold); background:rgba(201,168,76,.12); }
.typing::after{ content:"▋"; color:var(--gold-2); animation:blink 1s step-end infinite; } @keyframes blink{ 50%{ opacity:0; } }

/* pipeline */
.pipe{ display:flex; align-items:center; gap:0; flex-wrap:wrap; }
.pipe .step{ display:flex; align-items:center; gap:9px; padding:10px 14px; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; font-size:12.5px; font-weight:600; color:var(--ink-2); transition:.3s; }
.pipe .step .n{ width:22px; height:22px; border-radius:50%; background:var(--navy); color:#fff; display:grid; place-items:center; font-size:11px; }
.pipe .step.done{ border-color:var(--green); color:var(--green);} .pipe .step.done .n{ background:var(--green);}
.pipe .step.now{ border-color:var(--gold); color:var(--gold-deep); box-shadow:0 0 0 3px rgba(201,168,76,.14);} .pipe .step.now .n{ background:var(--gold); color:#2a2110;}
.pipe .arr{ width:24px; height:2px; background:var(--border-2); margin:0 2px; }

.seal{ display:inline-flex; align-items:center; gap:8px; font-size:12px; padding:7px 12px; border-radius:9px; background:var(--green-bg); color:var(--green); border:1px solid #bfe6d2; font-weight:600; }
.seal .mono{ font-family:var(--ff-mono); font-size:11px; }

.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:18px; flex-wrap:wrap; }
.tabs a{ padding:10px 16px; font-size:13px; font-weight:600; color:var(--ink-2); border-bottom:2px solid transparent; cursor:pointer; }
.tabs a:hover{ color:var(--navy);} .tabs a.active{ color:var(--navy); border-bottom-color:var(--gold);}

textarea.inp{ width:100%; min-height:120px; padding:13px 15px; border:1.5px solid var(--border-2); border-radius:11px; font-family:var(--ff-hi); font-size:14px; color:var(--ink); background:var(--surface-2); resize:vertical; line-height:1.6; }
textarea.inp:focus,input.inp:focus{ outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(201,168,76,.16); background:#fff; }
input.inp{ width:100%; padding:11px 14px; border:1.5px solid var(--border-2); border-radius:10px; font-size:14px; color:var(--ink); background:var(--surface-2); font-family:var(--ff-body); }
.lbl{ font-size:12px; font-weight:600; color:var(--ink-2); margin-bottom:6px; display:block; }
.fieldbox{ background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:12px 14px; }
.fieldbox .fb-k{ font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:var(--ink-3); }
.fieldbox .fb-v{ font-size:14px; color:var(--ink); font-weight:600; margin-top:3px; min-height:20px; }
.fieldbox .fb-v.hi{ font-family:var(--ff-hi); }

.legal{ font-size:11.5px; color:var(--ink-3); background:var(--bg-2); border:1px dashed var(--border-2); border-radius:9px; padding:10px 13px; } .legal b{ color:var(--ink-2);}
.muted{color:var(--ink-3);} .small{font-size:12px;} .b700{font-weight:700;}
.flex{display:flex;} .ac{align-items:center;} .jb{justify-content:space-between;} .gap{gap:12px;} .gap8{gap:8px;} .wrap{flex-wrap:wrap;} .col{flex-direction:column;}
.mt{margin-top:14px;} .mt2{margin-top:22px;} .mb{margin-bottom:14px;} .mb2{margin-bottom:22px;}
.divider{ height:1px; background:var(--border); margin:16px 0; }
.icon{ width:18px; height:18px; stroke-width:1.9; }

/* spinner inline */
.spin{ width:16px; height:16px; border:2px solid currentColor; border-top-color:transparent; border-radius:50%; display:inline-block; animation:spin .7s linear infinite; }

/* ============================================================ TOAST */
.toast-wrap{ position:fixed; bottom:22px; right:22px; z-index:9000; display:flex; flex-direction:column; gap:10px; }
.toast{ min-width:300px; max-width:380px; background:#fff; border:1px solid var(--border); border-left:4px solid var(--green); border-radius:11px; box-shadow:var(--shadow-lg); padding:13px 16px; display:flex; gap:11px; align-items:flex-start; animation:toastIn .35s cubic-bezier(.2,.9,.2,1); }
.toast.out{ animation:toastOut .3s forwards; }
.toast .t-ic{ width:30px; height:30px; border-radius:8px; flex:0 0 auto; display:grid; place-items:center; background:var(--green-bg); color:var(--green); }
.toast.blue{ border-left-color:var(--blue);} .toast.blue .t-ic{ background:var(--blue-bg); color:var(--blue);}
.toast.amber{ border-left-color:var(--amber);} .toast.amber .t-ic{ background:var(--amber-bg); color:var(--amber);}
.toast.gold{ border-left-color:var(--gold);} .toast.gold .t-ic{ background:#f7eccb; color:var(--gold-deep);}
.toast b{ font-size:13px; color:var(--ink); display:block; } .toast span{ font-size:12px; color:var(--ink-2); }
@keyframes toastIn{ from{ opacity:0; transform:translateX(40px);} to{ opacity:1; transform:none;} }
@keyframes toastOut{ to{ opacity:0; transform:translateX(40px);} }

/* ============================================================ MODAL */
.overlay{ position:fixed; inset:0; background:rgba(10,24,48,.55); backdrop-filter:blur(3px); z-index:8000; display:none; align-items:center; justify-content:center; padding:24px; }
.overlay.show{ display:flex; animation:fadeUp .25s; }
.modal{ background:#fff; border-radius:16px; box-shadow:var(--shadow-lg); width:100%; max-width:640px; max-height:88vh; overflow:auto; }
.modal-h{ padding:18px 22px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; background:#fff; }
.modal-h h3{ font-family:var(--ff-head); font-weight:400; font-size:18px; letter-spacing:.5px; color:var(--navy); }
.modal-x{ width:32px; height:32px; border-radius:8px; border:1px solid var(--border); background:var(--bg-2); cursor:pointer; display:grid; place-items:center; color:var(--ink-2); }
.modal-b{ padding:22px; } .modal-f{ padding:14px 22px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:10px; }

/* legal certificate look */
.certificate{ border:2px solid var(--navy); border-radius:10px; padding:24px; background:linear-gradient(180deg,#fffdf6,#fff); position:relative; }
.certificate::before{ content:""; position:absolute; inset:7px; border:1px solid var(--gold); border-radius:6px; pointer-events:none; }
.certificate h4{ font-family:var(--ff-head); text-align:center; color:var(--navy); font-size:17px; letter-spacing:.5px; font-weight:400; }
.certificate .c-sub{ text-align:center; font-size:11.5px; color:var(--ink-3); margin-bottom:14px; }
.certificate .c-row{ display:flex; gap:10px; font-size:12.5px; padding:6px 0; border-bottom:1px dotted var(--border-2); }
.certificate .c-row b{ min-width:140px; color:var(--ink-2); } .certificate .c-row span{ color:var(--ink); }
.certificate .c-seal{ position:absolute; right:20px; bottom:18px; width:74px; height:74px; opacity:.9; }
.certificate .c-hash{ font-family:var(--ff-mono); font-size:11px; word-break:break-all; color:var(--green); }

/* ============================================================ ARCHITECTURE */
.arch{ position:relative; padding:10px; }
.arch-box{ background:#fff; border:1.5px solid var(--border-2); border-radius:12px; padding:14px 16px; box-shadow:var(--shadow-sm); text-align:center; }
.arch-box b{ font-size:13.5px; color:var(--navy); display:block; } .arch-box .hi{ font-family:var(--ff-hi); font-size:12px; color:var(--ink-2); }
.arch-box small{ font-size:11px; color:var(--ink-3); display:block; margin-top:3px; }
.arch-box.gold{ border-color:var(--gold); background:linear-gradient(180deg,#fffaf0,#fff);}
.arch-box.navy{ background:linear-gradient(150deg,var(--navy),var(--navy-2)); border-color:var(--navy);} .arch-box.navy b,.arch-box.navy .hi{ color:#fff;} .arch-box.navy small{ color:var(--gold-2);}
.arch-flow{ display:flex; align-items:center; justify-content:center; gap:8px; color:var(--ink-3); font-size:22px; }
.boundary{ border:2px dashed var(--gold-deep); border-radius:16px; padding:18px; position:relative; background:rgba(201,168,76,.04); }
.boundary .b-tag{ position:absolute; top:-11px; left:18px; background:var(--gold); color:#2a2110; font-size:11px; font-weight:700; padding:3px 12px; border-radius:20px; }

/* ============================================================ PRESENTATION MODE */
.present-btn{ position:fixed; bottom:22px; left:50%; transform:translateX(-50%); z-index:7000; background:linear-gradient(160deg,var(--gold),var(--gold-deep)); color:#2a2110; padding:13px 24px; border-radius:40px; font-weight:700; font-size:14px; box-shadow:var(--shadow-lg); cursor:pointer; border:none; display:flex; align-items:center; gap:10px; animation:floaty 3s ease-in-out infinite; }
@keyframes floaty{ 50%{ transform:translateX(-50%) translateY(-5px);} }
.present-btn:hover{ filter:brightness(1.05);}
body.presenting .present-btn{ display:none; }
.present-bar{ position:fixed; bottom:0; left:0; right:0; z-index:7500; background:linear-gradient(180deg,#0a1f44,#0a1830); color:#fff; padding:16px 24px; display:none; align-items:center; gap:18px; box-shadow:0 -8px 30px rgba(10,24,48,.3); }
body.presenting .present-bar{ display:flex; }
.present-bar .p-ic{ width:40px; height:40px; border-radius:11px; background:linear-gradient(150deg,var(--gold),var(--gold-deep)); display:grid; place-items:center; color:#2a2110; font-family:var(--ff-head); flex:0 0 auto; }
.present-bar .p-cap{ flex:1; } .present-bar .p-cap b{ font-size:14px; color:var(--gold-2); display:block; } .present-bar .p-cap span{ font-size:13px; color:#cdd9ee; }
.present-bar .p-cap span.hi{ font-family:var(--ff-hi); }
.present-bar .p-prog{ height:4px; background:rgba(255,255,255,.15); border-radius:4px; width:200px; overflow:hidden; } .present-bar .p-prog>i{ display:block; height:100%; background:var(--gold); transition:width .4s; }
.present-bar .p-stop{ background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2); color:#fff; padding:9px 16px; border-radius:9px; cursor:pointer; font-weight:600; font-size:13px; }
body.presenting .content{ pointer-events:none; }
.spotlight{ position:relative; z-index:7600 !important; box-shadow:0 0 0 4px var(--gold),0 0 0 9999px rgba(10,24,48,.5); border-radius:14px; transition:.3s; }

@media(max-width:880px){ .app{ grid-template-columns:1fr;} .sidebar{ display:none;} .login-wrap{ grid-template-columns:1fr;} .login-art{ display:none;} }
