/* 
  style.css - Ukrainakriget Dashboard
  Modern, högpresterande taktisk design med mörkt tema och adaptiv responsivitet.
*/

:root {
  --bg-main: #0b1120;
  --bg-card: #151f32;
  --bg-card-hover: #1e2c45;
  --bg-panel: #0f172a;
  --border-subtle: #24344d;
  --border-focus: #38bdf8;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-faint: #64748b;
  
  --ua-blue: #0284c7;
  --ua-blue-light: #38bdf8;
  --ua-yellow: #eab308;
  --ua-yellow-light: #fef08a;

  --accent-red: #ef4444;
  --accent-orange: #f97316;
  --accent-amber: #f59e0b;
  --accent-green: #10b981;
  --accent-purple: #a855f7;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* Site Header */
.site-header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.flag-badge {
  display: flex;
  flex-direction: column;
  width: 26px;
  height: 20px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.flag-stripe-blue {
  background-color: #0057b7;
  height: 50%;
}

.flag-stripe-yellow {
  background-color: #ffd700;
  height: 50%;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.site-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* System Status Box in Header */
.system-status-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.22);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  cursor: default;
}

.system-status-box:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.45);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-right: 0.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.status-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-times {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.status-time-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: nowrap;
}

.time-label {
  color: var(--text-faint);
  font-weight: 500;
}

.time-value {
  color: #fff;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  animation: pulse-glow 2s infinite;
}

.pulse-dot.delayed {
  background-color: #f59e0b;
  animation: pulse-glow-delayed 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-glow-delayed {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.lang-btn {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: #334155;
  border-color: var(--ua-blue-light);
}

/* Nav Tabs */
.site-nav {
  background: #0f172a;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  padding: 0 1.5rem;
  overflow-x: auto;
}

.nav-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.nav-tab-btn:hover {
  color: #fff;
}

.nav-tab-btn.active {
  color: var(--ua-blue-light);
  border-bottom-color: var(--ua-blue-light);
}

/* Main Container */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Situational Picture Header */
.situation-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.situation-header-bar .section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.situation-header-bar .section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* KPI Banner */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--ua-blue);
}

.kpi-card.kpi-warn::before { background: var(--accent-amber); }
.kpi-card.kpi-danger::before { background: var(--accent-red); }
.kpi-card.kpi-success::before { background: var(--accent-green); }

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.kpi-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-icon {
  font-size: 1.1rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.kpi-subtext {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* Flerdimensionellt filter / Multi-perspective matrix */
.filter-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-title-group h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.filter-title-group p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.filter-controls-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-input {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  width: 280px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--ua-blue-light);
}

.btn-reset {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset:hover {
  background: #334155;
  color: #fff;
}

.filter-dimensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.filter-item label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.filter-select {
  width: 100%;
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.filter-select:focus {
  border-color: var(--ua-blue-light);
}

.filter-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Map Section */
.map-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.map-header {
  margin-bottom: 1rem;
}

.map-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.map-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.tactical-map-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.tactical-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-label-faint {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: #475569;
  font-weight: 700;
  letter-spacing: 1px;
}

.map-label-sea {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: #0284c7;
  font-weight: 700;
  letter-spacing: 1px;
}

.map-sublabel-sea {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: #38bdf8;
  font-weight: 500;
}

.map-tag-text {
  font-family: var(--font-sans);
  font-size: 12px;
  fill: #fca5a5;
  font-weight: 700;
}

.hotspot-title {
  font-family: var(--font-sans);
  font-size: 12px;
  fill: #fff;
  font-weight: 600;
}

.hotspot-title-bold {
  font-family: var(--font-sans);
  font-size: 13px;
  fill: #ffd700;
  font-weight: 800;
}

.hotspot-desc {
  font-family: var(--font-sans);
  font-size: 10px;
  fill: #94a3b8;
}

.legend-text {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: #cbd5e1;
}

.map-hotspot {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.map-hotspot:hover {
  transform: scale(1.08);
}

.pulsing-radar {
  animation: radar-pulse 2s infinite ease-out;
  transform-origin: center;
}

@keyframes radar-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.feed-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.feed-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.feed-sync-badge .sync-icon {
  font-size: 0.85rem;
}

/* Event Cards Grid */
.events-stream {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.event-card:hover {
  border-color: #38bdf8;
  box-shadow: var(--shadow-md);
}

.event-card.helt_civila {
  border-left: 5px solid var(--accent-red);
}

.event-card.energiproduktion {
  border-left: 5px solid var(--accent-amber);
}

.event-card.krigsmaterielproduktion {
  border-left: 5px solid var(--accent-purple);
}

.event-card.militara_resurser {
  border-left: 5px solid var(--ua-blue-light);
}

.event-card.civil_infrastruktur {
  border-left: 5px solid var(--accent-orange);
}

.event-card.diplomatiskt_politiskt {
  border-left: 5px solid var(--accent-green);
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.event-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-date {
  background: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
}

.badge-geo {
  background: rgba(2, 132, 199, 0.2);
  color: var(--ua-blue-light);
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.badge-subloc {
  background: rgba(241, 245, 249, 0.1);
  color: #fff;
  font-weight: 700;
}

.actors-wrapper {
  display: inline-flex;
  gap: 0.3rem;
}

.badge-actor {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Verification Meter */
.verification-meter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.conf-verified {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-green);
}

.conf-high {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--ua-blue-light);
}

.conf-medium {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-amber);
}

.conf-claim {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--accent-red);
}

.meter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Target Badges */
.target-civ { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.target-infra { background: rgba(249, 115, 22, 0.2); color: #fdba74; border: 1px solid rgba(249, 115, 22, 0.4); }
.target-mil { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.4); }
.target-energy { background: rgba(234, 179, 8, 0.2); color: #fef08a; border: 1px solid rgba(234, 179, 8, 0.4); }
.target-ammo { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.4); }
.target-diplo { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }

.event-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.event-summary {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Dimension breakdown box */
.dimension-breakdown-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dimension-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.84rem;
}

.dim-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 140px;
  flex-shrink: 0;
}

.dim-val {
  color: #e2e8f0;
}

.dim-val.faint {
  color: var(--text-faint);
  font-size: 0.8rem;
}

/* Event Footer & Source Attribution */
.event-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.source-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.source-prefix {
  color: var(--text-faint);
}

.source-name {
  color: var(--ua-blue-light);
  font-weight: 600;
}

.source-cat {
  color: var(--text-faint);
  font-size: 0.75rem;
}

.source-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: #f1f5f9;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.source-link-btn:hover {
  background: var(--ua-blue);
  color: #fff;
  border-color: var(--ua-blue-light);
}

/* Sources Directory */
.sources-directory {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.source-category-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.source-cat-header {
  margin-bottom: 1.25rem;
}

.source-cat-title {
  font-size: 1.2rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.source-cat-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.source-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.source-card {
  background: #10192a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.source-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.source-card-name {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 700;
}

.source-card-tier {
  font-size: 0.7rem;
  background: rgba(56, 189, 248, 0.15);
  color: var(--ua-blue-light);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.source-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.source-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
}

.source-credibility {
  color: var(--accent-green);
  font-weight: 600;
}

.source-ext-link {
  color: var(--ua-blue-light);
  text-decoration: none;
  font-weight: 600;
}

.source-ext-link:hover {
  text-decoration: underline;
}

/* Methodology section */
.methodology-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.methodology-box h2 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.methodology-box p {
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.method-item {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.method-item h3 {
  font-size: 1rem;
  color: var(--ua-yellow-light);
  margin-bottom: 0.5rem;
}

.method-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #0f172a;
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer-links a {
  color: var(--ua-blue-light);
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .site-header { padding: 0.75rem 1rem; }
  .header-inner { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .header-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
  .system-status-box { flex: 1; min-width: 200px; }
  .main-content { padding: 1rem; }
  .filter-dimensions-grid { grid-template-columns: 1fr; }
  .search-input { width: 100%; }
  .filter-controls-bar { width: 100%; flex-direction: column; align-items: stretch; }
  .dimension-row { flex-direction: column; gap: 0.2rem; }
  .feed-header-bar { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (max-width: 480px) {
  .system-status-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
  }
  .status-indicator {
    padding-right: 0;
    border-right: none;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
  }
  .status-time-row {
    font-size: 0.68rem;
  }
}

/* ========================================================
   STRATEGISK LUFTKRIGSKARTA & VÄXLARE
   ======================================================== */
.map-view-switcher {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}

.map-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.map-mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.map-mode-btn.active {
  background: var(--ua-blue);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.strategic-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  background: rgba(30, 41, 59, 0.5);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.strategic-filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.strategic-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.strategic-pill-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.strategic-pill-btn:hover {
  background: #334155;
  color: #fff;
  border-color: var(--ua-blue-light);
}

.strategic-pill-btn.active {
  background: rgba(2, 132, 199, 0.25);
  color: var(--ua-blue-light);
  border-color: var(--ua-blue-light);
  font-weight: 600;
}

.strategic-pill-btn .pill-badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
}

.strategic-svg .map-city-ref text {
  font-family: var(--font-sans);
  pointer-events: none;
}

.strategic-target-pin {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.strategic-target-pin:hover {
  transform: scale(1.18);
}

.strategic-target-pin.selected circle:nth-child(2) {
  filter: drop-shadow(0 0 6px #38bdf8);
}

.strat-pin-title {
  font-family: var(--font-sans);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.strat-pin-sub {
  font-family: var(--font-sans);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Strategiskt måldossier */
.strategic-dossier-card {
  margin-top: 1.25rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dossier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.dossier-header-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.dossier-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-ua-deep {
  background: rgba(2, 132, 199, 0.25);
  color: var(--ua-blue-light);
  border: 1px solid rgba(2, 132, 199, 0.4);
}

.badge-ru-deep {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.dossier-badge.badge-category {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.dossier-badge.badge-range {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.dossier-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.dossier-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0.25rem 0 0.15rem 0;
}

.dossier-location {
  font-size: 0.85rem;
  color: var(--ua-yellow);
  margin-bottom: 1rem;
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.dossier-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dossier-item-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.dossier-item-val {
  font-size: 0.92rem;
  color: #f1f5f9;
}

.dossier-impact-box {
  background: rgba(15, 23, 42, 0.7);
  border-left: 4px solid #38bdf8;
  padding: 1rem 1.15rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 1.15rem;
}

.dossier-impact-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 0.4rem;
  letter-spacing: 0.3px;
}

.dossier-impact-desc {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.55;
  margin: 0;
}

.dossier-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.9rem;
}

.dossier-source-info {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.dossier-source-info strong {
  color: #ffffff;
}

/* ========================================================
   FEATURED ANALYSES PREVIEW (PÅ ÖVERSIKTSTABBEN)
   ======================================================== */
.featured-analyses-section {
  margin: 2rem 0;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.featured-analyses-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.featured-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.featured-section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.featured-analyses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.featured-analysis-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s;
}

.featured-analysis-card:hover {
  transform: translateY(-2px);
  border-color: var(--ua-blue-light);
}

.analysis-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.author-meta-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-badge-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.author-name-text {
  display: block;
  font-size: 0.95rem;
  color: #ffffff;
}

.author-title-text {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.analysis-date-badge {
  font-size: 0.75rem;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 4px;
}

.analysis-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.analysis-card-summary {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 0.9rem;
}

.analysis-takeaways-box {
  background: rgba(15, 23, 42, 0.6);
  border-left: 3px solid #eab308;
  padding: 0.75rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
}

.takeaways-header {
  display: block;
  font-size: 0.78rem;
  color: #eab308;
  margin-bottom: 0.35rem;
}

.takeaways-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.45;
}

.takeaways-list li {
  margin-bottom: 0.25rem;
}

.analysis-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  margin-top: auto;
}

.analysis-platform-tag {
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ========================================================
   FULL TAB: ANALYSER OCH EXPERTBEDÖMNINGAR
   ======================================================== */
.analyses-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.analyses-filter-container {
  margin-bottom: 1.5rem;
}

.analyses-author-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-btn {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  background: #334155;
  color: #ffffff;
}

.pill-btn.active {
  background: var(--ua-blue);
  color: #ffffff;
  border-color: var(--ua-blue-light);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

.analyses-stream {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.analysis-full-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.analysis-full-card:hover {
  border-color: var(--ua-blue-light);
  box-shadow: var(--shadow-md);
}

.analysis-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.9rem;
}

.author-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0284c7, #1e3a8a);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.author-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.analysis-author-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.badge-author-type {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
}

.analysis-author-bio {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.analysis-header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.analysis-date {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.badge-credibility {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.72rem;
}

.analysis-headline {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0.5rem 0 0.8rem 0;
  line-height: 1.4;
}

.analysis-body-text {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.analysis-takeaways-container {
  background: rgba(15, 23, 42, 0.65);
  border-left: 4px solid var(--ua-yellow);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 1.25rem;
}

.takeaways-lead {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ua-yellow);
  margin-bottom: 0.5rem;
}

.takeaways-bullet-points {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.55;
}

.takeaways-bullet-points li {
  margin-bottom: 0.4rem;
}

.takeaways-bullet-points li:last-child {
  margin-bottom: 0;
}

.analysis-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.analysis-topics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.topic-tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ua-blue-light);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.analysis-action-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.analysis-origin-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.analysis-origin-label strong {
  color: #fff;
}

/* ==========================================================================
   Casualties Section (Minfin / General Staff)
   ========================================================================== */

.casualties-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.casualties-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}

.casualties-title-group {
  flex: 1;
  min-width: 260px;
}

.casualties-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.casualties-title-row h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.casualties-sync-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-faint);
  background: rgba(15, 23, 42, 0.6);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
}

/* Casualties Highlights Grid (5 cards) */
.casualties-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.casualty-kpi-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.casualty-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.casualty-kpi-card.casualty-danger::before {
  background: #ef4444;
}

.casualty-kpi-card.casualty-warn::before {
  background: #f59e0b;
}

.casualty-kpi-card.casualty-primary::before {
  background: var(--ua-blue-light);
}

.casualty-kpi-card.casualty-highlight::before {
  background: #8b5cf6;
}

.casualty-kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.casualty-kpi-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.casualty-kpi-icon {
  font-size: 1.15rem;
}

.casualty-kpi-daily {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.casualty-delta-badge {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.casualty-delta-badge.delta-positive {
  color: #f87171;
}

.casualty-delta-badge.delta-zero {
  color: #94a3b8;
}

.casualty-daily-label {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-transform: lowercase;
}

.casualty-kpi-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
}

.casualty-kpi-total .total-label {
  color: var(--text-faint);
}

.casualty-kpi-total .total-value {
  color: #f1f5f9;
  font-weight: 600;
}

/* Detailed Category Breakdown */
.casualties-breakdown-wrapper {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.casualties-breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.breakdown-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.btn-toggle-categories {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: var(--ua-blue-light);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-categories:hover {
  background: #334155;
  border-color: var(--ua-blue-light);
  color: #fff;
}

.casualties-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.casualties-breakdown-grid.hidden {
  display: none;
}

.breakdown-category-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.breakdown-category-row:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(14, 165, 233, 0.25);
}

.breakdown-category-row.category-highlighted {
  border-left: 3px solid var(--ua-blue-light);
}

.category-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.category-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.category-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-stats {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.category-daily {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.badge-delta-pos {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-delta-zero {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.category-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  min-width: 75px;
  text-align: right;
}

.category-unit {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-faint);
  margin-left: 2px;
}

/* Casualties Footer / Methodology */
.casualties-footer {
  margin-top: 0.5rem;
}

.casualties-footnote {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
}

.casualties-footnote .footnote-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.casualties-footnote .footnote-content {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.casualties-footnote .footnote-content strong {
  color: #fff;
  margin-right: 0.35rem;
}

.casualties-source-link {
  color: var(--ua-blue-light);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.45rem;
  white-space: nowrap;
}

.casualties-source-link:hover {
  text-decoration: underline;
  color: #fff;
}

