:root {
  color-scheme: light;
  --ink:#07172f;
  --muted:#607892;
  --brand-blue:#0757b8;
  --brand-navy:#052a61;
  --brand-sky:#83d4ff;
  --brand-sky-soft:#edf8ff;
  --brand-orange:#ff9f1c;
  --brand-green:#1c8b46;
  --card:#ffffff;
  --line:rgba(7,87,184,.12);
  --shadow:0 22px 65px rgba(7,45,91,.10);
  --soft-shadow:0 10px 30px rgba(7,45,91,.08);
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  color:var(--ink);
  background-color:#f3fbff;
  font-feature-settings:"rlig" 1,"calt" 1;
}
[x-cloak] { display:none !important; }
.gov-shell-bg {
  background:
    radial-gradient(circle at 8% 6%, rgba(131,212,255,.38), transparent 28rem),
    radial-gradient(circle at 92% 10%, rgba(7,87,184,.14), transparent 32rem),
    radial-gradient(circle at 84% 82%, rgba(255,159,28,.11), transparent 26rem),
    linear-gradient(135deg,#fbfdff 0%,#ecf8ff 52%,#f8fcff 100%);
}
.gov-shell-bg:before {
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  opacity:.26;
  background-image:radial-gradient(circle,rgba(7,87,184,.24) 0 1.8px,transparent 2.4px);
  background-size:28px 28px;
  mask-image:linear-gradient(90deg,#000 0 18rem,transparent 48rem);
}
.side-panel {
  border-right:1px solid rgba(7,87,184,.13);
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(234,248,255,.92));
  backdrop-filter:blur(22px);
  box-shadow:18px 0 50px rgba(7,45,91,.07);
}
.side-panel::-webkit-scrollbar { width:8px; }
.side-panel::-webkit-scrollbar-track { background:transparent; }
.side-panel::-webkit-scrollbar-thumb { background:rgba(7,87,184,.18); border-radius:999px; }
.brand-card {
  display:flex;
  align-items:center;
  gap:.8rem;
  border-radius:1.65rem;
  background:rgba(255,255,255,.84);
  padding:.85rem;
  border:1px solid rgba(7,87,184,.10);
  box-shadow:var(--soft-shadow);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.brand-card:hover { transform:translateY(-1px); border-color:rgba(7,87,184,.18); box-shadow:0 16px 38px rgba(7,45,91,.10); }
.brand-emblem {
  display:grid;
  place-items:center;
  width:3.25rem;
  height:3.25rem;
  flex:0 0 auto;
  border-radius:1.12rem;
  background:linear-gradient(135deg,#fff,#e5f6ff);
  box-shadow:0 12px 28px rgba(7,87,184,.12);
  border:1px solid rgba(7,87,184,.12);
}
.brand-emblem img { width:2.45rem; height:2.45rem; object-fit:contain; }
.brand-emblem-sm { width:2.55rem; height:2.55rem; border-radius:1rem; }
.brand-emblem-sm img { width:1.95rem; height:1.95rem; }
.nav-link {
  position:relative;
  display:flex;
  align-items:center;
  gap:.65rem;
  border-radius:1.15rem;
  padding:.78rem .95rem;
  color:#294160;
  font-weight:900;
  letter-spacing:-.01em;
  transition:transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
  border:1px solid transparent;
}
.nav-link:before {
  content:"";
  width:.52rem;
  height:.52rem;
  border-radius:999px;
  background:rgba(7,87,184,.20);
  box-shadow:0 0 0 4px rgba(131,212,255,.15);
}
.nav-link:hover,
.nav-link.is-active {
  background:rgba(255,255,255,.90);
  color:var(--brand-blue);
  transform:translateX(3px);
  box-shadow:0 10px 26px rgba(7,87,184,.08);
  border-color:rgba(7,87,184,.08);
}
.nav-link-ai {
  background:linear-gradient(135deg,rgba(7,87,184,.08),rgba(131,212,255,.18));
  color:var(--brand-blue);
  border-color:rgba(7,87,184,.10);
}
.nav-link-ai:before { background:var(--brand-orange); box-shadow:0 0 0 4px rgba(255,159,28,.16); }
.mobile-link {
  border-radius:1rem;
  background:rgba(237,248,255,.92);
  border:1px solid rgba(7,87,184,.10);
  padding:.75rem 1rem;
  color:#253c5c;
  font-weight:900;
}
.scope-card {
  border-radius:1.55rem;
  border:1px solid rgba(7,87,184,.10);
  background:rgba(255,255,255,.72);
  padding:1rem;
  box-shadow:var(--soft-shadow);
}
.page-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  overflow:hidden;
  border-radius:2rem;
  border:1px solid rgba(255,255,255,.78);
  background:rgba(255,255,255,.90);
  padding:1rem 1.25rem;
  box-shadow:var(--shadow);
  backdrop-filter:blur(18px);
}
.btn-primary,
.btn-dark,
.btn-soft {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  border-radius:1.05rem;
  padding:.72rem 1.05rem;
  font-size:.875rem;
  font-weight:950;
  line-height:1;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
  white-space:nowrap;
}
.btn-primary {
  color:#fff;
  background:linear-gradient(135deg,var(--brand-blue),#0d72dd);
  box-shadow:0 14px 32px rgba(7,87,184,.24);
}
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 18px 42px rgba(7,87,184,.30); }
.btn-dark {
  color:#fff;
  background:linear-gradient(135deg,var(--brand-navy),#0b3f87);
  box-shadow:0 12px 30px rgba(6,42,91,.18);
}
.btn-dark:hover { transform:translateY(-1px); }
.btn-soft {
  color:#17375f;
  background:#fff;
  border:1px solid rgba(7,87,184,.12);
  box-shadow:0 10px 24px rgba(7,87,184,.06);
}
.btn-soft:hover { background:#f0f9ff; border-color:rgba(7,87,184,.20); transform:translateY(-1px); }
.control-strip,
.assistant-panel,
.gov-hero,
.command-hero {
  position:relative;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.86) !important;
  background:linear-gradient(120deg,rgba(255,255,255,.96),rgba(239,249,255,.94) 62%,rgba(229,246,255,.92)) !important;
  color:var(--ink) !important;
  box-shadow:var(--shadow);
  backdrop-filter:blur(18px);
}
.control-strip,
.assistant-panel { border-radius:1.8rem; padding:1rem; }
.gov-hero:before,
.command-hero:before,
.control-strip:before,
.assistant-panel:before {
  content:"";
  position:absolute;
  right:-6rem;
  top:-8rem;
  width:24rem;
  height:24rem;
  border-radius:999px;
  background:radial-gradient(circle,rgba(131,212,255,.40),rgba(131,212,255,.14) 48%,transparent 68%);
  pointer-events:none;
}
.gov-hero:after,
.command-hero:after {
  content:"";
  position:absolute;
  right:1.5rem;
  top:1.2rem;
  width:7.5rem;
  height:7.5rem;
  border-radius:2rem;
  background:linear-gradient(135deg,rgba(255,159,28,.95),rgba(255,159,28,.22));
  transform:rotate(10deg);
  clip-path:polygon(25% 0,100% 26%,52% 100%,0 62%);
  opacity:.18;
  pointer-events:none;
}
.gov-hero > *,
.command-hero > *,
.control-strip > *,
.assistant-panel > * { position:relative; z-index:1; }
.soft-panel,
.metric-card,
.rounded-\[2rem\].bg-white,
.rounded-\[2rem\].bg-white\/90 {
  border:1px solid rgba(255,255,255,.92);
  box-shadow:var(--shadow);
}
.metric-card {
  position:relative;
  overflow:hidden;
  border-radius:1.65rem;
  background:linear-gradient(145deg,rgba(255,255,255,.99),rgba(247,252,255,.96));
  padding:1.18rem;
  box-shadow:var(--shadow);
}
.metric-card:before {
  content:"";
  position:absolute;
  inset:auto -20% -42% auto;
  width:11rem;
  height:11rem;
  border-radius:999px;
  background:radial-gradient(circle,rgba(131,212,255,.24),transparent 65%);
  pointer-events:none;
}
.metric-card:after {
  content:"";
  position:absolute;
  left:0;
  top:1.08rem;
  height:2.2rem;
  width:.27rem;
  border-radius:999px;
  background:linear-gradient(var(--brand-blue),var(--brand-sky));
}
.metric-card span {
  display:block;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.18em;
  color:#607896;
  font-weight:950;
}
.metric-card strong {
  display:block;
  margin-top:.55rem;
  font-size:clamp(1.55rem,4vw,1.95rem);
  line-height:1;
  letter-spacing:-.045em;
  color:var(--ink);
}
.metric-card small { display:block; margin-top:.5rem; color:#607896; font-weight:800; }
.metric-card--compact strong { font-size:1.55rem; }
.badge {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  background:#eaf7ff;
  color:var(--brand-blue);
  border:1px solid rgba(7,87,184,.12);
  padding:.35rem .7rem;
  font-size:.72rem;
  font-weight:950;
}
.quick-chip {
  border-radius:999px;
  background:#eef8ff;
  color:#24405f;
  border:1px solid rgba(7,87,184,.10);
  padding:.55rem .8rem;
  transition:transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}
.quick-chip:hover { background:#ffffff; color:var(--brand-blue); border-color:rgba(7,87,184,.25); transform:translateY(-1px); }
.ai-result-shell {
  min-height:5.25rem;
  border-radius:1.5rem;
  border:1px solid rgba(7,87,184,.10);
  background:linear-gradient(180deg,#f8fcff,#eef8ff);
  padding:1rem;
  color:#38516f;
  font-size:.92rem;
  line-height:1.8;
}
.ai-empty {
  display:flex;
  align-items:center;
  justify-content:center;
  color:#7a90a9;
  font-weight:900;
}
.ai-answer {
  white-space:pre-line;
  border-radius:1.35rem;
  background:linear-gradient(180deg,#f8fcff,#eef8ff);
  border:1px solid rgba(7,87,184,.10);
  padding:1.1rem;
  color:#314866;
  line-height:1.85;
}
.ai-typing-cursor:after {
  content:"";
  display:inline-block;
  width:.55rem;
  height:1.05em;
  margin-left:.18rem;
  border-radius:.15rem;
  background:var(--brand-orange);
  vertical-align:-.15em;
  animation:blink .75s steps(2,start) infinite;
}
.ai-loading {
  display:flex;
  align-items:center;
  gap:.65rem;
  font-weight:950;
  color:var(--brand-blue);
}
.ai-loading:before {
  content:"";
  width:.85rem;
  height:.85rem;
  border-radius:999px;
  background:var(--brand-orange);
  box-shadow:1.1rem 0 0 var(--brand-sky),2.2rem 0 0 var(--brand-blue);
  animation:dots 1s infinite ease-in-out;
}
.iwacu-watermark {
  position:fixed;
  right:1rem;
  bottom:.8rem;
  z-index:20;
  pointer-events:none;
  border-radius:999px;
  border:1px solid rgba(7,87,184,.10);
  background:rgba(255,255,255,.68);
  padding:.4rem .78rem;
  color:rgba(5,42,97,.42);
  font-size:.58rem;
  font-weight:950;
  letter-spacing:.14em;
  text-transform:uppercase;
  backdrop-filter:blur(10px);
}
.line-clamp-2 { overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.table-kpi { border-radius:1.5rem; overflow:hidden; }
form p { margin-bottom:.75rem; }
form p label { display:block; margin-bottom:.35rem; font-size:.75rem; text-transform:uppercase; letter-spacing:.12em; color:#607896; font-weight:900; }
form p .helptext { display:block; margin-top:.25rem; font-size:.75rem; color:#607896; }
form p ul.errorlist { margin-bottom:.35rem; color:#be123c; font-size:.8rem; font-weight:700; }
input, select, textarea {
  border-color:rgba(7,87,184,.14) !important;
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}
input:focus, select:focus, textarea:focus {
  border-color:var(--brand-blue) !important;
  box-shadow:0 0 0 4px rgba(131,212,255,.22) !important;
  outline:none !important;
}
input, select, textarea, button, a { -webkit-tap-highlight-color:transparent; }
table { border-collapse:separate; border-spacing:0; }
thead { color:#607896; }
tbody tr { transition:background .14s ease; }
tbody tr:hover { background:#f5fbff; }
canvas { max-width:100%; }
.page-enter { animation:pageIn .36s ease both; }
.bg-emerald-400,.bg-emerald-500 { background-color:var(--brand-sky) !important; }
.hover\:bg-emerald-300:hover,.hover\:bg-emerald-400:hover { background-color:#a8defd !important; }
.text-emerald-700 { color:var(--brand-blue) !important; }
.text-emerald-900 { color:#074279 !important; }
.text-emerald-200 { color:#4d8bc6 !important; }
.bg-emerald-50 { background-color:#eaf7ff !important; }
.border-emerald-200 { border-color:rgba(7,87,184,.20) !important; }
.hover\:bg-emerald-50:hover,.hover\:bg-emerald-50\/40:hover,.hover\:bg-emerald-50\/50:hover { background-color:#eef8ff !important; }
.hover\:border-emerald-200:hover { border-color:rgba(7,87,184,.22) !important; }
.text-slate-300 { color:#52708f !important; }
.bg-slate-950\/40 { background-color:rgba(255,255,255,.62) !important; }
@keyframes pageIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes blink { 50% { opacity:0; } }
@keyframes dots { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-4px); } }
@media (max-width: 768px) {
  .metric-card { border-radius:1.35rem; padding:1rem; }
  .metric-card strong { font-size:1.5rem; }
  .btn-primary,.btn-dark,.btn-soft { padding:.68rem .9rem; }
  .page-head { border-radius:1.45rem; padding:1rem; }
  table { min-width:720px; }
  .iwacu-watermark { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}

/* MINALOC polish: page header scrolls naturally; sidebar remains fixed. */
.page-head { position:relative; top:auto; z-index:1; }
.ai-focus-input,
.assistant-panel textarea[name="prompt"] {
  box-shadow:0 0 0 5px rgba(131,212,255,.22), 0 18px 42px rgba(7,87,184,.08) !important;
  border-color:rgba(7,87,184,.32) !important;
}
.ai-focus-input:focus,
.assistant-panel textarea[name="prompt"]:focus {
  background:#fff !important;
  box-shadow:0 0 0 6px rgba(131,212,255,.32), 0 22px 55px rgba(7,87,184,.12) !important;
}
@keyframes focusBreath { 0%,100%{ box-shadow:0 0 0 5px rgba(131,212,255,.18), 0 18px 42px rgba(7,87,184,.07);} 50%{ box-shadow:0 0 0 8px rgba(255,159,28,.12), 0 18px 42px rgba(7,87,184,.09);} }
.assistant-panel textarea[name="prompt"]:placeholder-shown,
.ai-focus-input:placeholder-shown { animation:focusBreath 2.4s ease-in-out infinite; }
@media (max-width: 768px) {
  .assistant-panel textarea[name="prompt"], .ai-focus-input { animation:none; }
}
.ai-input-ping { outline:3px solid rgba(255,159,28,.28) !important; }


/* Status colors */
.badge.status-success,
.status-pill.status-success { background:#e8fbf0; color:#126b37; border-color:rgba(28,139,70,.24); }
.badge.status-warning,
.status-pill.status-warning { background:#fff6df; color:#9a5b00; border-color:rgba(255,159,28,.30); }
.badge.status-danger,
.status-pill.status-danger { background:#fff0f3; color:#b42342; border-color:rgba(244,63,94,.24); }
.badge.status-muted,
.status-pill.status-muted { background:#edf3f8; color:#52677e; border-color:rgba(82,103,126,.20); }
.badge.status-info,
.status-pill.status-info { background:#eaf7ff; color:#0757b8; border-color:rgba(7,87,184,.20); }
.status-pill {
  display:inline-flex; align-items:center; border-radius:999px; padding:.35rem .7rem;
  font-size:.72rem; font-weight:950; border:1px solid transparent;
}
.clean-empty { color:#7b91aa; font-weight:800; }
.location-name { color:#08264a; font-weight:950; }
.location-hidden-coords { display:none; }
.quick-ops {
  border-radius:1.7rem; border:1px solid rgba(7,87,184,.10); background:rgba(255,255,255,.92);
  box-shadow:var(--soft-shadow); overflow:hidden;
}
.quick-ops summary { cursor:pointer; list-style:none; }
.quick-ops summary::-webkit-details-marker { display:none; }
.quick-ops[open] summary { border-bottom:1px solid rgba(7,87,184,.08); }
@media (min-width: 1024px) {
  main.page-enter { padding-top:1.25rem; }
}
