:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f6f7fb;
  --card: #ffffff;
  --brand: #2350e6;
  --brand-ink: #1a3db5;
  --brand-soft: #eaf0ff;
  --volt: #f5b301;
  --crit: #dc2626; --crit-soft: #fee2e2;
  --high: #ea580c; --high-soft: #ffedd5;
  --med: #ca8a04;  --med-soft: #fef9c3;
  --low: #16a34a;  --low-soft: #dcfce7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Nastaliq Urdu", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* top navigation */
.topnav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topnav .in { max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--ink); display: grid; place-items: center; }
.topnav nav { display: flex; gap: 4px; margin-left: auto; }
.topnav nav a { color: var(--ink-2); padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.topnav nav a:hover { background: var(--bg); text-decoration: none; }
.topnav nav a.active { color: var(--brand); background: var(--brand-soft); }

/* buttons & fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 600; cursor: pointer; background: var(--brand); color: #fff; transition: background .15s, transform .05s; }
.btn:hover { background: var(--brand-ink); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: var(--bg); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea { resize: vertical; min-height: 140px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* urgency chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.chip.critical { background: var(--crit-soft); color: var(--crit); }
.chip.high { background: var(--high-soft); color: var(--high); }
.chip.medium { background: var(--med-soft); color: #a16207; }
.chip.low { background: var(--low-soft); color: var(--low); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.btn { white-space: nowrap; }
h1, h2, h3, strong, b { font-weight: 700; }
@media (max-width: 640px) {
  .topnav .in { gap: 8px; padding: 0 12px; }
  .logo { font-size: 0; gap: 0; }
  .topnav nav a { padding: 6px 9px; font-size: 13px; white-space: nowrap; }
}
