/* SITFD v2 — hand-rolled design system (no build step, CSP-safe).
   Accessible (WCAG AA contrast), responsive, RTL-aware. */

:root {
  --navy: #123a63;
  --navy-700: #0f3050;
  --navy-900: #0a2340;
  --ink: #1a2230;
  --ink-soft: #4a5568;
  --line: #d7ddea;
  --bg: #f4f6fa;
  --card: #ffffff;
  --accent: #c8102e;   /* Sindh/gov red */
  --accent-600: #a50d26;
  --ok: #1a7f4b;
  --ok-bg: #e6f4ec;
  --warn: #93610b;
  --warn-bg: #fff4de;
  --danger: #b3152a;
  --danger-bg: #fde8eb;
  --info: #0f5aa8;
  --info-bg: #e6f0fb;
  --staff: #0f7a5f;
  --staff-bg: #e3f4ef;
  --client: #1c64c4;
  --client-bg: #e7f0fc;
  --internal: #8a5a00;
  --internal-bg: #fff3d1;
  --sys: #6b7280;
  --sys-bg: #eef1f5;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-lg: 0 10px 30px rgba(16,24,40,.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Naskh Arabic", "Urdu Typesetting", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
}
[dir="rtl"] body { font-family: "Noto Naskh Arabic", "Urdu Typesetting", var(--font); }

a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-600); }

/* Focus visibility (WCAG) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--info); outline-offset: 2px; border-radius: 3px;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 18px; }
.masthead {
  background: linear-gradient(135deg, var(--navy-900), var(--navy) 60%, var(--navy-700));
  color: #fff; border-bottom: 3px solid var(--accent);
}
.masthead-inner { display: flex; align-items: center; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-badge {
  width: 42px; height: 42px; border-radius: 9px; background: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; flex: none;
}
.brand-txt { line-height: 1.15; }
.brand-txt .t1 { font-weight: 800; font-size: 17px; letter-spacing: .2px; }
.brand-txt .t2 { font-size: 12px; opacity: .85; }

.topnav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topnav a {
  color: #e8eff7; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 14px; white-space: nowrap;
}
.topnav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.topnav a.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.topnav .sep { width: 1px; height: 22px; background: rgba(255,255,255,.22); margin-inline: 4px; }

.subbar { background: #fff; border-bottom: 1px solid var(--line); }
.subbar-inner { display: flex; align-items: center; gap: 14px; padding-block: 9px; flex-wrap: wrap; }
.subbar .greet { font-weight: 600; }
.subbar .role-chip { margin-inline-start: auto; }

main.wrap { padding-block: 24px 56px; min-height: 60vh; }
footer.site { border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
footer.site .inner { padding-block: 22px; font-size: 13px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 12px 24px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px){ .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .hd { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card .hd h2, .card .hd h3 { margin: 0; font-size: 16px; color: var(--navy-900); }
.card .bd { padding: 18px; }
.card .ft { padding: 12px 18px; border-top: 1px solid var(--line); background: #fafbfd; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

.stat { padding: 16px 18px; }
.stat .n { font-size: 30px; font-weight: 800; color: var(--navy-900); line-height: 1.1; }
.stat .l { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.stat.ok .n { color: var(--ok); } .stat.warn .n { color: var(--warn); }
.stat.danger .n { color: var(--danger); } .stat.info .n { color: var(--info); }

/* ---------- Typography ---------- */
h1 { font-size: 26px; margin: 0 0 6px; color: var(--navy-900); }
h2 { font-size: 20px; color: var(--navy-900); }
h3 { font-size: 16px; }
.pagehead { margin-bottom: 20px; }
.pagehead .lede { color: var(--ink-soft); margin: 6px 0 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 700; color: var(--accent); }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 15px; font-size: 14px; font-weight: 600; font-family: inherit;
  text-decoration: none; line-height: 1; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: #f0f4f8; color: var(--navy); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f2c2ca; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Forms ---------- */
label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 5px; color: var(--ink); }
.field { margin-bottom: 14px; }
.field .note { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; color: var(--ink); background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); }
.input-error { border-color: var(--danger) !important; }

/* ---------- Tables ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); background: #f7f9fc; }
table.tbl tr:hover td { background: #f7fafc; }
table.tbl .num { text-align: end; }

/* ---------- Pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-new { background: var(--sys-bg); color: var(--sys); }
.st-acknowledged, .st-assigned { background: var(--info-bg); color: var(--info); }
.st-in_progress { background: #eef0ff; color: #4338ca; }
.st-awaiting_client_info { background: var(--warn-bg); color: var(--warn); }
.st-pending_customer_confirmation { background: #f0e9ff; color: #6b21a8; }
.st-pending_it_verification { background: var(--staff-bg); color: var(--staff); }
.st-closed { background: var(--ok-bg); color: var(--ok); }
.st-withdrawn { background: #eee; color: #777; }

.pr-urgent { background: var(--danger-bg); color: var(--danger); }
.pr-high { background: var(--warn-bg); color: var(--warn); }
.pr-normal { background: var(--info-bg); color: var(--info); }
.pr-low { background: var(--sys-bg); color: var(--sys); }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge-esc { background: var(--danger-bg); color: var(--danger); }
.badge-ai { background: #f0e9ff; color: #6b21a8; }
.badge-live { background: var(--ok-bg); color: var(--ok); }

.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #eef1f7; color: var(--navy); font-size: 12px; font-weight: 600; }

/* ---------- Alerts / flash ---------- */
.alert { padding: 12px 15px; border-radius: var(--radius-sm); border: 1px solid transparent; margin-bottom: 16px; font-size: 14px; }
.alert-info { background: var(--info-bg); border-color: #bcd7f5; color: #0b3f73; }
.alert-success { background: var(--ok-bg); border-color: #bfe3cf; color: #0f5132; }
.alert-warn { background: var(--warn-bg); border-color: #f0d79a; color: #6b4407; }
.alert-danger { background: var(--danger-bg); border-color: #f4c3cd; color: #8a0f1d; }

/* ---------- Timeline (ticket thread) ---------- */
.timeline { display: flex; flex-direction: column; gap: 14px; }
.tl-item { display: grid; grid-template-columns: 46px 1fr; gap: 12px; }
.tl-item .av {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #fff; background: var(--sys); flex: none;
}
.tl-bubble { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; }
.tl-bubble.client { background: var(--client-bg); border-color: #c7dbf7; }
.tl-bubble.staff { background: var(--staff-bg); border-color: #bfe3d8; }
.tl-bubble.internal { background: var(--internal-bg); border-color: #f0dca0; }
.tl-bubble.system { background: var(--sys-bg); border-color: var(--line); font-style: italic; color: var(--sys); }
.tl-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; flex-wrap: wrap; }
.tl-meta .who { font-weight: 700; color: var(--ink); }

/* ---------- SLA bar ---------- */
.sla { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.sla .bar { width: 90px; height: 8px; border-radius: 6px; background: #e4e9f1; overflow: hidden; }
.sla .bar > i { display: block; height: 100%; border-radius: 6px; background: var(--ok); }
.sla.ok .bar > i { background: var(--ok); }
.sla.warn .bar > i { background: var(--warn); }
.sla.danger .bar > i { background: var(--danger); }

/* ---------- Nav pills / tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 9px 14px; color: var(--ink-soft); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--navy-900); border-bottom-color: var(--accent); }

/* ---------- Misc ---------- */
.empty { text-align: center; color: var(--ink-soft); padding: 40px 16px; }
.empty .big { font-size: 15px; margin-bottom: 6px; color: var(--ink); font-weight: 600; }
.kbd { background: #eef1f7; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 12px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt0{margin-top:0}.mb0{margin-bottom:0}.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}
.mb8{margin-bottom:8px}.mb16{margin-bottom:16px}
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }

/* Notification bell */
.bell { position: relative; }
.bell .count { position: absolute; top: -6px; inset-inline-end: -6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }

/* AI panel */
.nigraan { border: 1px dashed #cbb8ef; background: #faf8ff; border-radius: var(--radius); padding: 14px; }
.nigraan .ai-tag { font-size: 11px; font-weight: 700; color: #6b21a8; text-transform: uppercase; letter-spacing: .04em; }
.nigraan .ai-out { margin-top: 10px; white-space: pre-wrap; line-height: 1.6; }

.skip-link { position: absolute; inset-inline-start: -9999px; top: 0; background: #fff; color: var(--navy); padding: 8px 14px; z-index: 100; }
.skip-link:focus { inset-inline-start: 8px; top: 8px; box-shadow: var(--shadow-lg); }

.chip { display: inline-block; background: #eef1f7; border-radius: 6px; padding: 3px 9px; font-size: 12px; color: var(--ink-soft); margin: 2px; }

/* Charts */
.chart-box { position: relative; height: 300px; }
.chart-box canvas { max-width: 100%; }

/* Responsive masthead */
@media (max-width: 780px){
  .masthead-inner { flex-wrap: wrap; }
  .topnav { margin-inline-start: 0; }
}

/* ---------- Sitfd v2 compat classes (v0.3) ---------- */

/* Grid aliases */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.admin-grid { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px){ .grid-2, .grid-3, .admin-grid { grid-template-columns: 1fr; } }

/* Stat cards (views use .stat-card / .stat-num / .stat-label) */
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-num { font-size: 28px; font-weight: 800; color: var(--navy-900); line-height: 1.1; }
.stat-label { color: var(--ink-soft); font-size: 12px; margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* Page head alias */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

/* Input class alias */
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; color: var(--ink); background: #fff; display: block; }
.input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 2px rgba(18,58,99,.15); }

/* Stack / flex gaps */
.stack { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 18px; }
.flex { display: flex; align-items: center; gap: 10px; }
.gap { gap: 8px; }
.inline { display: inline-flex; gap: 4px; }
.field-row { margin-bottom: 14px; }

/* Badges (views use .badge-badge-*) */
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-muted { background: #eee; color: #777; }
.badge-new { background: var(--sys-bg); color: var(--sys); }
.badge-acknowledged, .badge-assigned { background: var(--info-bg); color: var(--info); }
.badge-in_progress { background: #eef0ff; color: #4338ca; }
.badge-awaiting_client_info { background: var(--warn-bg); color: var(--warn); }
.badge-pending_customer_confirmation { background: #f0e9ff; color: #6b21a8; }
.badge-pending_it_verification { background: var(--staff-bg); color: var(--staff); }
.badge-closed { background: var(--ok-bg); color: var(--ok); }
.badge-withdrawn { background: #eee; color: #777; }
.badge-submitted, .badge-pending { background: var(--info-bg); color: var(--info); }
.badge-under_review { background: var(--warn-bg); color: var(--warn); }
.badge-approved { background: var(--ok-bg); color: var(--ok); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }

/* Tags */
.tag { display: inline-block; background: #eef1f7; border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-staff { background: var(--staff-bg); color: var(--staff); }
.tag-internal { background: var(--internal-bg); color: var(--internal); }

/* Link more */
.link-more { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--navy); }

/* Date / count badge */
.date { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.count-badge { background: var(--navy); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }

/* Priority */
.pri-urgent { color: var(--danger); font-weight: 700; }
.pri-high { color: var(--warn); font-weight: 700; }
.pri-normal { color: var(--info); }
.pri-low { color: var(--ink-soft); }

/* Hero section */
.hero { text-align: center; padding: 40px 0 32px; }
.hero h1 { font-size: 34px; margin: 0 0 12px; }
.hero-sub { font-size: 18px; color: var(--ink-soft); max-width: 620px; margin: 0 auto 24px; }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* List items (views use .list-item) */
.list-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-item:last-child { border-bottom: none; }

/* Card variants */
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 16px; }
.card-inset { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.card-highlight { border-color: var(--ok); border-width: 2px; }
.card h2, .card h3 { padding: 0 18px; margin: 14px 0 6px; }
.card p { padding: 0 18px; margin: 6px 0; }
.card > :last-child { margin-bottom: 18px; }
.card .stack { padding: 14px 18px; margin: 0; }
.card table.tbl { margin: 0 -18px; }

/* DL */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 0; padding: 0 18px 18px; }
.dl dt { font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.dl dd { margin: 0; font-size: 14px; }

/* Ticket grid */
.ticket-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 900px){ .ticket-grid { grid-template-columns: 1fr; } }
.ticket-main, .ticket-side { min-width: 0; }
.ticket-side .card { margin-bottom: 14px; }

/* SLA bar variant */
.sla-bar { width: 100%; height: 10px; background: #e4e9f1; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.sla-bar > div { height: 100%; border-radius: 6px; background: var(--ok); transition: width .4s; }
.sla-ok > div { background: var(--ok); }
.sla-warn > div { background: var(--warn); }
.sla-danger > div { background: var(--danger); }
.sla.none > div { background: var(--sys); }
.sla.paused > div { background: #ccc; }

/* File list */
.file-list { list-style: none; padding: 0 18px 18px; margin: 0; }
.file-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.file-list li:last-child { border-bottom: none; }

/* Notifications */
.notif { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: none; }
.notif.unread { background: #f0f4ff; margin-inline: -18px; padding-inline: 18px; }
.notif-body { flex: 1; }

/* Filter bar */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar .input { width: auto; }

/* Auth */
.auth-wrap { max-width: 460px; margin: 2rem auto; }
.card-auth { padding: 28px; }
.card-auth h2 { margin-bottom: 16px; }
.demo-gallery { display: flex; flex-direction: column; gap: 4px; }
.demo-btn { margin: 0; }

/* Segmented / radio */
.seg { display: flex; gap: 8px; }
.seg label { display: flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.seg input[type=radio] { margin: 0; }
.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }

/* KB */
.kb-list { display: grid; gap: 10px; }
.kb-item { padding: 16px 18px; }
.kb-title { font-size: 16px; font-weight: 700; color: var(--navy); display: block; margin-bottom: 4px; }
.kb-article { padding: 28px; }
.kb-article h1 { margin-bottom: 10px; }
.prose { line-height: 1.7; }
.prose ul, .prose ol { padding-inline-start: 24px; }
.prose h2 { margin-top: 20px; }

/* Program card */
.program-card { padding: 18px; }
.program-card h3 { margin: 8px 0 4px; }
.deadline { font-size: 13px; }

/* Notice item */
.notice-item { padding: 18px; margin-bottom: 12px; }
.notice-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice-head h3 { margin: 0; }

/* Canned item */
.canned-item { padding: 10px 18px; border-bottom: 1px solid var(--line); }
.canned-item:last-child { border-bottom: none; }

/* Admin links grid */
.admin-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.admin-link { padding: 18px; font-size: 15px; font-weight: 600; color: var(--navy); text-decoration: none; transition: background .15s; }
.admin-link:hover { background: #f0f4f8; color: var(--navy-900); }

/* Service standard layout */
.ss-layout { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
@media (max-width: 780px){ .ss-layout { grid-template-columns: 1fr; } }
.ss-nav { list-style: none; padding: 0; }
.ss-nav a { display: block; padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none; color: var(--navy); font-weight: 500; margin-bottom: 2px; }
.ss-nav a:hover, .ss-nav a.active { background: var(--navy); color: #fff; }

/* Muted row in tables */
.muted-row { opacity: .55; }

/* Warn / danger classes on <td> */
td.warn { color: var(--warn); font-weight: 700; }
td.danger { color: var(--danger); font-weight: 700; }
h2.danger { color: var(--danger); }

/* Actions cell */
td.actions { white-space: nowrap; }

/* Pagination */
ul.pagination { display: flex; gap: 4px; padding: 16px 0; margin: 0; list-style: none; flex-wrap: wrap; }
ul.pagination li { margin: 0; }
ul.pagination a, ul.pagination span { padding: 6px 12px; border-radius: 6px; font-size: 13px; text-decoration: none; }
ul.pagination a.active, ul.pagination span.active { background: var(--navy); color: #fff; }

/* Responsive card padding */
.card:not(.card-auth):not(.card-head) { padding: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 14px; }
