/*
 * shadows.css — Shared design system for War Monitor / Shadows
 * Dark military intelligence dashboard theme
 * Inter font, gold (#d4af37) accents, dark backgrounds
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Backgrounds */
  --bg:       #0a0e14;
  --bg-2:     #0f1319;

  /* Panels */
  --panel:    #12161e;
  --panel-2:  #171c26;
  --panel-3:  #1a1f2b;

  /* Text */
  --text:     #e8e6e1;
  --text-2:   #c2bfb8;
  --text-3:   #6b7280;

  /* Lines / Borders */
  --line:      rgba(255,255,255,.07);
  --line-gold: rgba(212,175,55,.18);

  /* Gold accent */
  --gold:      #d4af37;
  --gold-soft: #b8963a;
  --accent:    #d4af37;

  /* Risk / Status */
  --risk-high: #ef4444;
  --risk-mid:  #d4af37;
  --risk-low:  #22c55e;

  /* Event-type accent tokens */
  --event-iran: #f59e0b;

  /* Font */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-soft); }

img { max-width: 100%; display: block; }

/* Scrollbar theming */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.14); }

/* Selection */
::selection { background: rgba(212,175,55,.25); color: var(--text); }

/* ===== KEYFRAMES ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%     { opacity: .5; }
}

/* ===== TYPOGRAPHY ===== */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
}
.section-title.sm { font-size: 16px; }

.minor-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold-soft);
}

.editorial {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-2);
}

/* ===== LAYOUT: Page / Shell / Inner ===== */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell {
  flex: 1;
  width: 100%;
}

.inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 28px;
}

/* ===== NAV BAR ===== */
#shell-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 900;
  flex-shrink: 0;
}

#shell-nav .nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

#shell-nav .nav-brand .icon {
  color: var(--gold);
  font-size: 18px;
}

#shell-nav .nav-brand .brand-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
}

#shell-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

#shell-nav .nav-link {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-decoration: none;
  transition: color .15s, background .15s;
}
#shell-nav .nav-link:hover { color: var(--text); background: rgba(255,255,255,.04); }
#shell-nav .nav-link.active { color: var(--gold); background: rgba(212,175,55,.08); }

#shell-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Layer selector */
#shell-layer-selector {
  display: flex;
  gap: 4px;
  align-items: center;
}
#shell-layer-selector .layer-btn {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-3);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
}
#shell-layer-selector .layer-btn:hover { color: var(--text-2); background: rgba(255,255,255,.04); }
#shell-layer-selector .layer-btn.active {
  color: var(--gold);
  background: rgba(212,175,55,.08);
  border-color: rgba(212,175,55,.20);
}

/* Language toggle in nav */
.nav-lang-btn {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-3);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
}
.nav-lang-btn:hover { color: var(--text-2); }
.nav-lang-btn.active { color: var(--gold); }

/* Logout button */
.nav-logout {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-3);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
}
.nav-logout:hover { color: var(--risk-high); border-color: rgba(239,68,68,.25); }

/* ===== PANELS & CARDS ===== */
.panel {
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
}
.panel.gold {
  border-color: var(--line-gold);
  background: rgba(212,175,55,.03);
}

.card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 18px 20px;
}

.mini-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  padding: 14px 16px;
}

.event-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  padding: 14px 16px;
  border-left: 4px solid var(--line);
  transition: border-color .2s, background .2s;
}
.event-card:hover { background: rgba(255,255,255,.03); }

/* ===== GRID LAYOUTS ===== */
.grid-main {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}
@media (max-width: 1100px) {
  .grid-main { grid-template-columns: 1fr; }
}

.stack { display: flex; flex-direction: column; gap: 20px; }

.situation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 900px) {
  .situation-grid { grid-template-columns: 1fr; }
}

/* ===== STATS ROW ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  padding: 14px 18px;
  text-align: center;
}
.stat .k {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.stat .v {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat.accent { border-color: var(--line-gold); }
.stat.accent .v { color: var(--gold); }

/* File-switcher dropdown (theater selector on الملف النشط tile) */
.stat.stat-file-switcher {
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s;
}
.stat.stat-file-switcher:hover { border-color: var(--line-gold); background: rgba(212,175,55,.04); }
.stat.stat-file-switcher.open { border-color: var(--line-gold); background: rgba(212,175,55,.06); }
.stat.stat-file-switcher .v { display: inline-flex; align-items: center; gap: 6px; }
.stat.stat-file-switcher .caret {
  font-size: 12px;
  color: var(--gold);
  transition: transform .2s;
}
.stat.stat-file-switcher.open .caret { transform: rotate(180deg); }
.file-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--panel-2, #0f1419);
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  padding: 6px;
  z-index: 1100;
  box-shadow: 0 12px 32px rgba(0,0,0,.55);
  display: none;
}
.stat.stat-file-switcher.open .file-switcher-menu { display: block; }
.file-switcher-menu .file-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  margin: 2px 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-align: right;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background .12s, color .12s, border-color .12s;
}
.file-switcher-menu .file-opt:hover {
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-color: rgba(255,255,255,.08);
}
.file-switcher-menu .file-opt:active {
  background: rgba(212,175,55,.14);
}
.file-switcher-menu .file-opt:focus-visible {
  outline: none;
  border-color: var(--gold);
}
.file-switcher-menu .file-opt.active {
  color: var(--gold);
  background: rgba(212,175,55,.10);
  border-color: rgba(212,175,55,.25);
}
.file-switcher-menu .file-opt .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
}
.file-switcher-menu .file-opt.active .dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 6px rgba(212,175,55,.4);
}
.file-switcher-menu .file-opt > span:last-child { flex: 1; }

/* ===== BUTTONS ===== */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold) 0%, #b8942e 100%);
  color: #0a0e14;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 2px 12px rgba(212,175,55,.20);
}
.btn-gold:hover { opacity: .9; }
.btn-gold:active { transform: scale(.97); }
.btn-gold:disabled { opacity: .4; cursor: not-allowed; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-outline:hover { background: rgba(255,255,255,.04); border-color: var(--gold-soft); color: var(--text); }
.btn-outline:active { transform: scale(.97); }
.btn-outline:disabled { opacity: .4; cursor: not-allowed; }

.btn-sm {
  padding: 6px 14px;
  font-size: 11px;
  border-radius: 10px;
}

/* ===== CHIPS ===== */
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-3);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
  white-space: nowrap;
}
.chip:hover { color: var(--text-2); background: rgba(255,255,255,.04); }
.chip.active {
  color: var(--gold);
  background: rgba(212,175,55,.10);
  border-color: rgba(212,175,55,.30);
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel-2);
}
.view-toggle button {
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 650;
  font-family: var(--font);
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: all .15s;
}
.view-toggle button:hover { color: var(--text-2); }
.view-toggle button.active {
  background: rgba(212,175,55,.10);
  color: var(--gold);
}

/* ===== PILLS ===== */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  color: var(--text-3);
  white-space: nowrap;
}
.pill.high {
  background: rgba(239,68,68,.10);
  color: var(--risk-high);
  border-color: rgba(239,68,68,.20);
}
.pill.medium {
  background: rgba(212,175,55,.10);
  color: var(--risk-mid);
  border-color: rgba(212,175,55,.20);
}
.pill.low {
  background: rgba(34,197,94,.10);
  color: var(--risk-low);
  border-color: rgba(34,197,94,.18);
}
.pill.danger {
  background: rgba(239,68,68,.10);
  color: var(--risk-high);
  border-color: rgba(239,68,68,.20);
}

/* ===== TAGS ===== */
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 650;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-3);
}

/* ===== SOURCE BADGES ===== */
.src-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-3);
}
.src-badge[data-src="tg"] { color: #5bc0eb; border-color: rgba(0,136,204,.25); }
.src-badge[data-src="wa"] { color: #25d366; border-color: rgba(37,211,102,.25); }
.src-badge[data-src="rss"] { color: #ffa500; border-color: rgba(255,165,0,.25); }
.src-badge[data-src="x"] { color: #a3a3a3; border-color: rgba(163,163,163,.25); }

/* ===== STATUS DOT ===== */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-3);
  transition: background .3s;
}
.status-dot.live { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.status-dot.disconnected { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.status-dot.idle { background: #f59e0b; }

/* ===== FORMS / INPUTS ===== */
input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-family: var(--font);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(212,175,55,.08);
}
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: .6; }

select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 32px;
}
[dir="rtl"] select {
  background-position: right 12px center;
  padding-left: 14px;
  padding-right: 32px;
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
}
.table-wrap { overflow-x: auto; }
thead th {
  text-align: right;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold-soft);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
tbody td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.02); }

/* ===== RAIL (scrollable card list) ===== */
.rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.rail-item { flex-shrink: 0; }
.rail-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  padding: 14px 16px;
  transition: border-color .2s;
}
.rail-card:hover { border-color: var(--gold-soft); }
.rail-card .en {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold-soft);
  margin-bottom: 4px;
}
.rail-card .ar {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}
.rail-card p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-3);
  margin: 0;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.8;
}

/* ===== ALERT CARDS ===== */
.alert-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.alert-card {
  flex-shrink: 0;
  min-width: 280px;
  max-width: 400px;
  border-radius: 18px;
  border: 1px solid rgba(239,68,68,.20);
  background: rgba(239,68,68,.04);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ===== SPINNER ===== */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ===== HIDDEN ===== */
.hidden { display: none !important; }

/* ===== FLEX UTILITIES ===== */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== SPACING ===== */
.mt-sm  { margin-top: 8px; }
.mt-md  { margin-top: 16px; }
.mt-lg  { margin-top: 24px; }

/* ===== MARK (brand logo element) ===== */
.mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mark .icon {
  font-size: 24px;
  color: var(--gold);
}

/* ===== BELL / NOTIFICATIONS ===== */
.nav-bell {
  position: relative;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-bell:hover { color: var(--gold, #d4af37); }
.nav-bell .bell-icon { font-size: 18px; line-height: 1; }
.bell-badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 9px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg-2, #12121a);
  line-height: 1;
}

.notif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9998;
}
.notif-overlay.open { opacity: 1; pointer-events: auto; }

.notif-panel {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 100vh;
  width: min(420px, 92vw);
  background: var(--bg-2, #12121a);
  border-inline-end: 1px solid var(--line, #1e1e2e);
  z-index: 9999;
  transform: translateX(-105%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  direction: rtl;
}
/* In RTL, the panel is pinned to the right edge, so the off-screen
   resting position must translate to the right, not the left. */
[dir="rtl"] .notif-panel { transform: translateX(105%); }
.notif-panel.open,
[dir="rtl"] .notif-panel.open { transform: translateX(0); }

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line, #1e1e2e);
}
.notif-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #eaeaf0);
  letter-spacing: 0.5px;
}
.notif-actions { display: flex; gap: 8px; align-items: center; }
.notif-mark-all {
  background: none;
  border: 1px solid var(--line, #1e1e2e);
  color: #9ca3af;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.notif-mark-all:hover { color: var(--gold, #d4af37); border-color: var(--gold, #d4af37); }
.notif-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}
.notif-close:hover { color: var(--text, #eaeaf0); }

.notif-list { flex: 1; overflow-y: auto; padding: 8px; }
.notif-empty { padding: 32px 16px; text-align: center; color: #6b7280; font-size: 12px; }
.notif-item {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.notif-item:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--line, #1e1e2e); }
.notif-item.unread { background: rgba(212, 175, 55, 0.06); border-color: rgba(212, 175, 55, 0.2); }
.notif-item.critical { border-inline-start: 3px solid #ef4444; }
.notif-item.high { border-inline-start: 3px solid #f97316; }
.notif-item.elevated { border-inline-start: 3px solid #eab308; }
.notif-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.notif-type {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold, #d4af37);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.notif-time { font-size: 10px; color: #6b7280; }
.notif-headline {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #eaeaf0);
  line-height: 1.4;
  margin-bottom: 4px;
}
.notif-body { font-size: 11px; color: #9ca3af; line-height: 1.5; }

/* ===== TOASTS ===== */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
  direction: rtl;
}
.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 360px;
  background: var(--bg-2, #12121a);
  border: 1px solid var(--line, #1e1e2e);
  border-inline-start: 3px solid #f97316;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.toast.critical { border-inline-start-color: #ef4444; }
.toast.high { border-inline-start-color: #f97316; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast-headline {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #eaeaf0);
  line-height: 1.4;
  margin-bottom: 4px;
}
.toast-body { font-size: 11px; color: #9ca3af; line-height: 1.5; }

/* ===== DECISION SUPPORT ===== */
/* ===== Strategic Outlook (rendered inside the Executive Judgment card) ===== */
.exec-card { position: relative; }
.exec-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.exec-outlook-text {
  font-size: 14.5px; line-height: 1.85; color: var(--text, #f1f5f9);
  font-weight: 500;
  animation: so-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.so-meta {
  font-size: 10px; letter-spacing: 0.6px; color: var(--text-3, #94a3b8);
  text-transform: uppercase; font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}
.so-meta .so-meta-conf {
  display: inline-block; margin-inline-end: 8px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700;
  border: 1px solid;
}
.so-meta .so-meta-conf.high   { color: #22c55e; border-color: rgba(34,197,94,0.45); background: rgba(34,197,94,0.08); }
.so-meta .so-meta-conf.medium { color: #eab308; border-color: rgba(234,179,8,0.45); background: rgba(234,179,8,0.08); }
.so-meta .so-meta-conf.low    { color: #f97316; border-color: rgba(249,115,22,0.45); background: rgba(249,115,22,0.08); }
.so-loading { font-size: 13px; color: var(--text-3); padding: 14px 0; text-align: center; }
.so-body {
  font-size: 15.5px; line-height: 1.85; color: var(--text, #f1f5f9);
  font-weight: 500;
  /* Light pulse on first paint to draw the eye */
  animation: so-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes so-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.so-trigger-chip {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  color: var(--gold, #d4af37);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.30);
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: 0.4px;
}
.so-trigger-chip.major { color: #ef4444; border-color: rgba(239,68,68,0.40); background: rgba(239,68,68,0.06); }
.so-expand-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; padding: 8px 12px;
  background: transparent; border: 1px solid rgba(212,175,55,0.30);
  color: var(--gold, #d4af37);
  font-size: 11.5px; font-weight: 600;
  border-radius: 8px; cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.so-expand-btn:hover { background: rgba(212,175,55,0.08); }
.so-expand-btn:active { transform: translateY(1px); }
.so-expand-btn.open .so-chevron { transform: rotate(180deg); }
.so-chevron { transition: transform 0.2s ease; }
.so-detail {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  display: grid; gap: 14px;
}
.so-block { padding-inline-start: 12px; border-inline-start: 2px solid rgba(212,175,55,0.30); }
.so-block.israel    { border-inline-start-color: #ef4444; }
.so-block.resistance{ border-inline-start-color: #22c55e; }
.so-block.pattern   { border-inline-start-color: #a855f7; }
.so-block.short     { border-inline-start-color: #f97316; }
.so-block.long      { border-inline-start-color: #3b82f6; }
.so-block-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--text-3); text-transform: uppercase;
  margin-bottom: 6px;
}
.so-block-text {
  font-size: 13px; line-height: 1.75; color: var(--text-2, #cbd5e1);
}
.so-footer {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.06);
  font-size: 11px;
}
.so-link {
  background: none; border: none; color: var(--gold, #d4af37);
  font-size: 11.5px; font-weight: 600; padding: 0; cursor: pointer;
  font-family: inherit;
}
.so-link:hover { text-decoration: underline; }

.ds-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line, #1e1e2e);
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ds-card:hover { border-color: var(--gold, #d4af37); background: rgba(212, 175, 55, 0.05); }
.ds-card.critical { border-inline-start: 3px solid #ef4444; }
.ds-card.high { border-inline-start: 3px solid #f97316; }
.ds-card.elevated { border-inline-start: 3px solid #eab308; }
.ds-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--gold, #d4af37);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 700;
}
.ds-card-meta .ds-conf { color: #6b7280; }
.ds-card-headline {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #eaeaf0);
  line-height: 1.4;
  margin-bottom: 6px;
}
.ds-card-bottom { font-size: 11px; color: #9ca3af; line-height: 1.6; }

.ds-modal-section { margin-top: 18px; }
.ds-modal-section h4 {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold, #d4af37);
  margin: 0 0 8px 0;
  font-weight: 700;
}
.ds-source-item {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line, #1e1e2e);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.5;
}
.ds-source-item .ds-source-meta { font-size: 10px; color: #6b7280; margin-bottom: 4px; }
.ds-reasoning {
  padding: 12px;
  background: rgba(212, 175, 55, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: #c7c7d2;
  white-space: pre-wrap;
}

/* ===== MOBILE TAB BAR (bottom nav) ===== */
.mobile-tabbar { display: none; }
.mobile-menu-btn { display: none; }
#shell-layer-mobile { display: none; }
.mobile-drawer { display: none; }

/* Drawer internals (rendered always; only visible on mobile) */
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text);
}
.drawer-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  min-width: 44px;
  min-height: 44px;
}
.drawer-section { padding: 12px 8px; }
.drawer-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 12px 6px;
}
.drawer-link {
  display: block;
  padding: 14px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: start;
  cursor: pointer;
  font-family: var(--font);
  min-height: 48px;
}
.drawer-link:active { background: rgba(255,255,255,.04); }
.drawer-btn { color: var(--text-2); }
.drawer-danger { color: var(--risk-high); }

/* Scrollable region inside the drawer so controls stay reachable in a short
   (landscape) viewport — header stays pinned, the rest scrolls internally. */
.drawer-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* Drawer backdrop (tap to close) */
.mobile-drawer-overlay { display: none; }

/* Per-page action controls inside the burger drawer.
   Pages inject their own toolbar chips/toggles/buttons here. */
.drawer-page-actions .drawer-pa-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 12px 8px;
}
.drawer-page-actions .chips { padding: 4px 12px 8px; }
.drawer-page-actions .chip { min-height: 36px; padding: 8px 14px; font-size: 12px; }
.drawer-page-actions .view-toggle { width: calc(100% - 24px); margin: 0 12px 8px; }
.drawer-page-actions .view-toggle button { flex: 1; padding: 11px 8px; font-size: 13px; min-height: 44px; }
.drawer-page-actions .btn-gold,
.drawer-page-actions .btn-outline {
  width: calc(100% - 24px);
  margin: 4px 12px;
  min-height: 46px;
}
/* Generic full-width drawer action button (used for page toolbar buttons) */
.drawer-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 24px);
  margin: 4px 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  font-family: var(--font);
  text-align: start;
  cursor: pointer;
  min-height: 46px;
  transition: border-color .15s, color .15s, background .15s;
}
.drawer-action:hover, .drawer-action:active { border-color: var(--gold-soft); color: var(--text); }
.drawer-action.active { border-color: rgba(212,175,55,.30); background: rgba(212,175,55,.08); color: var(--gold); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .inner { padding: 16px 14px; }
  .panel { padding: 18px; border-radius: 18px; }
  .card { padding: 14px 16px; border-radius: 14px; }

  /* Top bar: collapse desktop links into hamburger */
  #shell-nav { height: 56px; padding: 0 14px; padding-top: env(safe-area-inset-top, 0); }
  #shell-nav .nav-links { display: none; }
  #shell-layer-selector { display: none; }
  .nav-logout { display: none; }
  .nav-settings { display: none; }
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: none;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 0;
  }
  .mobile-menu-btn:active { background: rgba(255,255,255,.05); }
  .nav-bell { width: 44px; height: 44px; }
  .nav-bell .bell-icon { font-size: 20px; }

  /* Layer chips strip below top bar */
  #shell-layer-mobile {
    display: flex;
    gap: 6px;
    padding: 8px 14px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: calc(56px + env(safe-area-inset-top, 0px));
    z-index: 800;
    scrollbar-width: none;
  }
  #shell-layer-mobile::-webkit-scrollbar { display: none; }
  #shell-layer-mobile .layer-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    min-height: 36px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    color: var(--text-3);
    background: rgba(255,255,255,.03);
    border: 1px solid var(--line);
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #shell-layer-mobile .layer-btn.active {
    color: var(--gold);
    background: rgba(212,175,55,.08);
    border-color: rgba(212,175,55,.30);
  }

  /* Bottom tab bar — primary nav on mobile */
  .mobile-tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    z-index: 950;
    justify-content: space-around;
    align-items: stretch;
  }
  .mobile-tabbar .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-3);
    font-size: 10px;
    font-weight: 600;
    padding: 6px 4px;
    min-width: 44px;
    transition: color .15s;
  }
  .mobile-tabbar .tab:active { background: rgba(255,255,255,.03); }
  .mobile-tabbar .tab .tab-icon {
    font-size: 20px;
    line-height: 1;
  }
  .mobile-tabbar .tab.active {
    color: var(--gold);
  }
  .mobile-tabbar .tab.active .tab-icon {
    transform: scale(1.08);
  }

  /* Pad body so bottom tab bar doesn't cover content */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

  /* Mobile drawer (more menu, opens from right edge in RTL) */
  .mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(320px, 88vw);
    background: var(--bg-2);
    border-inline-start: 1px solid var(--line);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,.4);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .mobile-drawer.open { transform: translateX(0); }
  .mobile-drawer .drawer-head { flex-shrink: 0; }

  /* Drawer backdrop */
  .mobile-drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .mobile-drawer-overlay.open { opacity: 1; pointer-events: auto; }

  /* Notification panel — pinned to inline-end (RTL: LEFT edge).
     The closed-state translate must exit toward that same edge: in RTL the
     panel sits at left:0, so a POSITIVE translateX parks it ON SCREEN
     whenever the viewport is wider than the panel (= every phone held
     horizontally — the "can't close notifications in landscape" bug). */
  .notif-panel {
    width: min(420px, 100vw);
    inset-inline-start: auto;
    inset-inline-end: 0;
    transform: translateX(100%);          /* LTR: pinned right → exit right */
    border-inline-end: none;
    border-inline-start: 1px solid var(--line);
    box-shadow: -4px 0 24px rgba(0,0,0,.4);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    height: 100dvh;
  }
  [dir="rtl"] .notif-panel {
    transform: translateX(-105%);          /* RTL: pinned LEFT → exit LEFT */
    box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }
  [dir="rtl"] .notif-panel.open { transform: translateX(0); }

  /* Floor typography */
  .panel { font-size: 13px; }
  .section-label { font-size: 10px; }
  .section-title { font-size: 16px; line-height: 1.4; }
  .section-title.sm { font-size: 14px; }

  /* Detail modal — mobile fullscreen with sticky header */
  .detail-overlay.open {
    display: flex !important;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }
  .detail-body {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100dvh !important;
    height: 100dvh;
    border-radius: 0 !important;
    margin: 0 !important;
    padding-top: calc(56px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto;
  }
  .dtl-close {
    position: fixed !important;
    top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
    inset-inline-end: 12px !important;
    z-index: 10001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-2) !important;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
  }

  /* Toasts — sit above the tab bar */
  .toast-wrap {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    inset-inline-end: 12px;
  }
  .toast { min-width: 260px; max-width: calc(100vw - 24px); }
}

@media (max-width: 600px) {
  .inner { padding: 14px 12px; }
  #shell-nav .nav-brand .brand-text { display: none; }
  .grid-main { grid-template-columns: 1fr !important; gap: 12px !important; }
  .panel { padding: 16px 14px; border-radius: 16px; }

  /* Compact stat cards on phone */
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .stat-grid .stat { padding: 12px 14px !important; }
  .stat-grid .k { font-size: 10px !important; }
  .stat-grid .v { font-size: 18px !important; }

  /* Ops grid → single column accordion */
  .ops-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .ops-col {
    max-height: 360px;
  }

  /* Event card touch sizing */
  .event-card, .mini-card, .raw-card, .alert-card, .ds-card {
    padding: 14px 16px;
    min-height: 60px;
  }
  .event-card { border-radius: 14px; }

  /* Tables: convert dense rows to padded blocks */
  .table-wrap table { font-size: 12px; }
  .table-wrap td, .table-wrap th { padding: 10px 8px; }

  /* Notification list — bigger touch zones */
  .notif-item { padding: 14px; }
  .notif-headline { font-size: 14px; }
  .notif-body { font-size: 12px; }
  .notif-type { font-size: 11px; }
  .notif-time { font-size: 11px; }

  /* Decision support cards — more presence */
  .ds-card { padding: 16px; min-height: 88px; }
  .ds-card-headline { font-size: 15px; line-height: 1.4; }
  .ds-card-bottom { font-size: 12px; line-height: 1.6; }

  /* Source filter chips: bigger */
  #ops-source-filter .chip { padding: 8px 14px; font-size: 12px; min-height: 36px; }

  /* View toggle: full width on mobile */
  .view-toggle { width: 100%; }
  .view-toggle button { flex: 1; padding: 12px 8px; font-size: 13px; min-height: 44px; }
}

/* iOS-specific: use 100dvh where 100vh is referenced */
@supports (height: 100dvh) {
  .notif-panel { height: 100dvh; }
  .mobile-drawer { height: 100dvh; }
}

/* ===== LANDSCAPE / SHORT-VIEWPORT HANDLING =====
   Phones held horizontally give a very short viewport. Slide-in panels and
   sheets must cap their height and scroll internally so their controls stay
   reachable; the bottom tab bar shrinks to claw back vertical space. */
@media (orientation: landscape) and (max-height: 500px) {
  /* Use dynamic viewport height; 100vh over-reports on mobile browsers. */
  .mobile-drawer { height: 100dvh; max-height: 100dvh; }
  .notif-panel { height: 100dvh; max-height: 100dvh; }

  /* Bottom tab bar: slimmer, drop labels so the map/content keeps room. */
  .mobile-tabbar {
    height: calc(46px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-tabbar .tab .tab-label { display: none; }
  .mobile-tabbar .tab .tab-icon { font-size: 18px; }
  body { padding-bottom: calc(46px + env(safe-area-inset-bottom, 0px)); }

  /* Toasts above the slimmer bar */
  .toast-wrap { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

  /* Any full-height modal body must scroll, not overflow the short viewport. */
  .detail-body,
  .notif-detail-modal,
  .src-modal,
  .wa-sheet {
    max-height: 100dvh !important;
    overflow-y: auto;
  }

  /* Floating sheets/popovers cap their height too. */
  .file-switcher-menu { max-height: 70dvh; overflow-y: auto; }
}

/* ===== PRINT ===== */
@media print {
  #shell-nav { display: none !important; }
  body { background: #fff; color: #1a1a1a; }
  .panel { background: #fff; border: 1px solid #d1d5db; }
  .card, .mini-card { background: #fff; border: 1px solid #d1d5db; }
}

/* ===== Notification Detail Modal ===== */
.notif-detail-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10001;
  opacity: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  transition: opacity 0.18s ease;
  direction: rtl;
}
.notif-detail-overlay.open { opacity: 1; pointer-events: auto; }
.notif-detail-modal {
  background: var(--bg-2, #12121a);
  border: 1px solid var(--line, #1e1e2e);
  border-radius: 16px;
  width: min(640px, 100%);
  max-height: min(85vh, 720px);
  overflow: auto;
  padding: 22px 24px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  transform: translateY(8px) scale(0.985);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}
.notif-detail-overlay.open .notif-detail-modal { transform: translateY(0) scale(1); }
.notif-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.notif-detail-badges {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.notif-detail-type {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold, #d4af37);
  background: rgba(212, 175, 55, 0.10);
  border: 1px solid rgba(212, 175, 55, 0.30);
  padding: 4px 10px; border-radius: 999px;
}
.notif-detail-sev {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid;
  background: rgba(0, 0, 0, 0.25);
}
.notif-detail-sev.critical { color: #ef4444; border-color: rgba(239,68,68,0.45); background: rgba(239,68,68,0.08); }
.notif-detail-sev.high     { color: #f97316; border-color: rgba(249,115,22,0.45); background: rgba(249,115,22,0.08); }
.notif-detail-sev.moderate { color: #eab308; border-color: rgba(234,179,8,0.45); background: rgba(234,179,8,0.08); }
.notif-detail-sev.low      { color: #22c55e; border-color: rgba(34,197,94,0.45); background: rgba(34,197,94,0.08); }
.notif-detail-time {
  font-size: 11px; color: var(--text-3, #6b7280);
  font-variant-numeric: tabular-nums;
}
.notif-detail-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-3, #9ca3af); font-size: 26px; line-height: 1;
  padding: 0 4px; transition: color 0.15s ease;
}
.notif-detail-close:hover { color: var(--text, #eaeaf0); }
.notif-detail-title {
  font-size: 18px; font-weight: 700; line-height: 1.45;
  color: var(--text, #eaeaf0);
  margin: 0 0 14px;
}
.notif-detail-body {
  font-size: 14.5px; line-height: 1.85; color: #cbd5e1;
  white-space: pre-wrap;
  margin-bottom: 14px;
}
.notif-detail-source {
  font-size: 12px; color: var(--gold, #d4af37);
  background: rgba(212, 175, 55, 0.06);
  border-inline-start: 3px solid rgba(212, 175, 55, 0.45);
  padding: 8px 12px; border-radius: 6px;
  margin-bottom: 14px;
}
.notif-detail-fulltext {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line, #1e1e2e);
}
.notif-detail-fulltext-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-3, #94a3b8);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 8px; padding-inline-start: 10px;
  border-inline-start: 2px solid var(--line, #475569);
}
.notif-detail-fulltext-content {
  font-size: 14px; line-height: 1.85; color: #e2e8f0;
  white-space: pre-wrap;
}
.notif-detail-loading {
  font-size: 12px; color: var(--text-3, #6b7280);
  text-align: center; padding: 12px 0;
}
@media (max-width: 600px) {
  .notif-detail-overlay { padding: 0; }
  .notif-detail-modal {
    width: 100%; height: 100%; max-height: 100vh;
    border-radius: 0; padding: 18px 16px 24px;
  }
}
.notif-item { cursor: pointer; }
