/* ==========================================================================
   JVA WE LISTEN & WE JUDGE - MODERN BESPOKE APP ARCHITECTURE
   Sidebar Layout (Desktop) + Thumb-Docked Navigation (Mobile)
   High-Contrast Obsidian & Steel Aesthetic (No Generic AI-SaaS Clutter)
   ========================================================================== */

:root {
  --bg-app: #080a0f;
  --bg-sidebar: #0d1017;
  --bg-card: #121622;
  --bg-card-hover: #161b2a;
  --bg-card-inner: #0a0d14;
  
  --border-subtle: #1c2333;
  --border-focus: #3b82f6;
  --border-card: #1f273b;
  --border-card-hover: #334155;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #f59e0b;

  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;

  --sidebar-w: 275px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ================= APP LAYOUT: SIDEBAR + MAIN ================= */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ================= 1. DESKTOP SIDEBAR ================= */
.app-sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.15rem;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  margin-bottom: 1.75rem;
}

.badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.badge-mini .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.sidebar-brand h2 {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1.25;
  text-transform: uppercase;
}

.sidebar-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.35;
}

.sidebar-nav-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

/* Sidebar Navigation Buttons */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: auto;
}

.view-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.18s ease;
  user-select: none;
  text-align: left;
}

.view-btn svg {
  width: 17px;
  height: 17px;
  opacity: 0.75;
  flex-shrink: 0;
}

.view-btn .nav-btn-text {
  flex: 1;
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.view-btn.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.view-btn.active svg {
  opacity: 1;
  color: var(--accent-amber);
}

.view-btn-badge {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.view-btn.active .view-btn-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* Sidebar Compact Stats */
.sidebar-stats {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: auto;
  padding-bottom: 1rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.stat-row:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.stat-row-label {
  font-size: 0.78rem;
}

.stat-row-val {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 800;
  font-size: 0.85rem;
}

.val-red { color: #f87171; }
.val-amber { color: #fbbf24; }
.val-cyan { color: #38bdf8; }
.val-purple { color: #c084fc; }
.val-blue { color: #60a5fa; }

/* Sidebar Footer */
.sidebar-footer {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-sidebar-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.6rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-sidebar-action svg {
  width: 14px;
  height: 14px;
}

.btn-sidebar-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: #334155;
}

.btn-sound.sound-on {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.btn-sound.sound-off {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.sidebar-footnote {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.45;
  padding-top: 0.85rem;
  text-align: center;
}

.sidebar-mail-link {
  display: inline-block;
  color: #94a3b8;
  text-decoration: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.7rem;
  margin-top: 0.35rem;
  transition: color 0.15s ease;
}

.sidebar-mail-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* ================= COMPACT MAIN SITE FOOTER ================= */
.site-footer {
  padding: 1.25rem 1.75rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 13, 20, 0.4);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 1500px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
}

.footer-separator {
  color: #334155;
  font-size: 0.75rem;
  user-select: none;
}

.footer-desc {
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.4;
}

.footer-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.footer-mail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #94a3b8;
  text-decoration: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.28rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  transition: all 0.15s ease;
}

.footer-mail-link:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.06);
}

@media (max-width: 768px) {
  .site-footer {
    padding: 1.25rem 1rem 5.5rem; /* Space for mobile thumb navigation */
    margin-top: 1.5rem;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 0.65rem;
  }
  .footer-left {
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
  }
  .footer-separator {
    display: none;
  }
}

/* ================= 2. MAIN CONTENT AREA ================= */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 2rem 2.5rem 5rem 2.5rem;
  background: var(--bg-app);
}

/* Top Mobile Bar (Hidden on Desktop) */
.app-topbar {
  display: none;
}

/* Controls Strip (Compact search + Wings) */
.controls-strip {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.search-sort-group {
  display: flex;
  gap: 0.75rem;
}

/* ================= DEDICATED STATS & RICHTER-BILANZ VIEW ================= */
.stats-view-container {
  animation: fadeIn 0.3s ease-out;
  max-width: 1050px;
  margin: 0 auto;
  padding: 0.5rem 0 2rem;
}

.stats-view-header {
  margin-bottom: 2rem;
  text-align: center;
}

.stats-view-badge {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.75rem;
  border: 1.5px dashed #f59e0b;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.stats-view-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin-bottom: 0.45rem;
}

.stats-view-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.5;
}

/* 4 KPI Cards */
.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.summary-kpi-card {
  background: #0f131d;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.summary-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #334155;
}

.kpi-icon {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.kpi-num {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.25rem;
  line-height: 1.1;
}

.kpi-lbl {
  font-size: 0.76rem;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.kpi-sub {
  font-size: 0.68rem;
  color: #64748b;
}

.kpi-danger .kpi-num { color: #ff4d4d; }
.kpi-warning .kpi-num { color: #fbbf24; }
.kpi-blue .kpi-num { color: #38bdf8; }

/* Large Duel Progress Box */
.duel-box-main {
  background: #0f131d;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.duel-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.duel-judge-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sashka-label { color: #f43f5e; }
.matteo-label { color: #38bdf8; }

.judge-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot-sashka { background: #f43f5e; box-shadow: 0 0 6px rgba(244, 63, 94, 0.5); }
.dot-matteo { background: #38bdf8; box-shadow: 0 0 6px rgba(56, 189, 248, 0.5); }

.duel-middle-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #64748b;
}

.duel-progress-bar-large {
  height: 14px;
  background: #1e293b;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.duel-fill-sashka {
  background: linear-gradient(90deg, #ec4899, #f43f5e);
}

.duel-fill-matteo {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

/* 2 Large Judge Cards */
.stats-judges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.stats-judge-card {
  background: #0f131d;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stats-judge-card.card-sashka {
  border-top: 4px solid #f43f5e;
}

.stats-judge-card.card-matteo {
  border-top: 4px solid #38bdf8;
}

.judge-profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.judge-big-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 900;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.avatar-sashka {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1.5px solid #f43f5e;
}

.avatar-matteo {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1.5px solid #38bdf8;
}

.judge-full-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.judge-title-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  display: inline-block;
}

.tag-sashka {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

.tag-matteo {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.judge-details-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.detail-name { color: #94a3b8; }
.detail-val { font-family: 'Courier New', Courier, monospace; font-size: 0.85rem; }
.text-red { color: #ff4d4d; font-weight: 800; }
.text-orange { color: #fb923c; font-weight: 800; }
.text-yellow { color: #fbbf24; font-weight: 800; }
.text-blue { color: #38bdf8; font-weight: 800; }

.judge-notable-verdict {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid #64748b;
  border-radius: 0 6px 6px 0;
  padding: 0.75rem 1rem;
}

.notable-lbl {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.25rem;
}

.judge-notable-verdict p {
  font-size: 0.78rem;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.45;
  margin: 0;
}

/* Court Verdict Callout */
.stats-court-verdict {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.verdict-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.verdict-content h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 0.4rem;
}

.verdict-content p {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0;
}

.badge-duel {
  font-size: 0.75rem;
  line-height: 1;
}

@media (max-width: 850px) {
  .stats-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-judges-grid {
    grid-template-columns: 1fr;
  }
  .stats-view-title {
    font-size: 1.35rem;
  }
}

.search-input-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-box svg {
  position: absolute;
  left: 0.9rem;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-box input {
  width: 100%;
  background: #10141e;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.65rem 0.9rem 0.65rem 2.4rem;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-box input:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.search-input-box input::placeholder {
  color: #64748b;
}

.sort-select-custom {
  background: #10141e;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.sort-select-custom:focus {
  border-color: var(--accent-amber);
  color: #ffffff;
}

/* Wings Navigation (Horizontal Filter Chips) */
.wings-nav {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.wings-nav::-webkit-scrollbar {
  display: none;
}

.wing-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
}

.wing-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: #334155;
}

.wing-tab.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

.wing-count {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 5px;
  border-radius: 10px;
}

.wing-tab.active .wing-count {
  background: rgba(0, 0, 0, 0.15);
  color: #000000;
}

/* ================= 3. CARDS GRID ================= */
.prison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

/* ================= 1. PRISON CELL (INHAFTIERTE / ZELLENTRAKT) ================= */
.prison-cell {
  background: #101420;
  border: 1.5px solid var(--border-card);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.prison-cell:hover:not(.door-open) {
  transform: translateY(-4px);
  border-color: #475569;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.7);
}

.cell-header {
  background: #141a29;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 25;
}

.cell-body {
  padding: 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  background: var(--bg-card-inner);
}

.inmate-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

.inmate-penalty-banner {
  background: #131927;
  border-left: 3px solid #ef4444;
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
}

.penalty-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.penalty-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fef08a;
}

.cell-countdown-box {
  background: #090c13;
  border: 1px solid #1a2233;
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
}

.countdown-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.countdown-digits {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.06em;
}

.countdown-infinite {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 800;
  font-size: 0.88rem;
  color: #c084fc;
}

.countdown-infinite.countdown-red,
.countdown-red {
  color: #ff4d4d !important;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.countdown-closed {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: 0.82rem;
  color: #64748b;
}

/* ================= 2. PROBATION CARD ================= */
.probation-card {
  background: #111520;
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.probation-card:hover {
  transform: translateY(-4px);
  border-color: #f59e0b;
  box-shadow: 0 15px 30px rgba(245, 158, 11, 0.15);
}

.probation-card .cell-header {
  background: #171c2b;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.probation-card .cell-body {
  background: #0d111a;
}

.probation-card .inmate-penalty-banner {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
}

.probation-card .penalty-val {
  color: #fde68a;
}

.probation-card .countdown-digits {
  color: #fbbf24;
}

.probation-badge-box {
  width: 68px;
  height: 82px;
  border-radius: 4px;
  background: #151a26;
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-shrink: 0;
  color: #f59e0b;
}

.probation-badge-box svg {
  width: 26px;
  height: 26px;
}

.probation-badge-id {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fbbf24;
}

/* ================= 3. NORM CARD (GESETZBUCH) ================= */
.norm-card {
  background: #111420;
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.norm-card::before {
  content: "§";
  position: absolute;
  right: 14px;
  top: 40px;
  font-size: 7.5rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 900;
  color: rgba(168, 85, 247, 0.05);
  pointer-events: none;
  line-height: 1;
  z-index: 1;
}

.norm-card:hover {
  transform: translateY(-4px);
  border-color: #a855f7;
  box-shadow: 0 15px 30px rgba(168, 85, 247, 0.18);
}

.norm-card .cell-header {
  background: #171a2a;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.norm-card .cell-body {
  background: #0d101a;
}

.norm-verdict-box {
  background: rgba(168, 85, 247, 0.08);
  border-left: 3px solid #a855f7;
}

.norm-verdict-box .penalty-val {
  color: #e9d5ff;
}

.norm-quote-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 6px;
  padding: 0.75rem 0.95rem;
}

.norm-quote-text {
  font-style: italic;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.45;
  font-family: Georgia, 'Times New Roman', serif;
  margin: 0;
}

/* ================= INMATE PROFILE ROW ================= */
.inmate-profile {
  display: flex;
  gap: 0.95rem;
  align-items: center;
}

.inmate-mugshot {
  width: 68px;
  height: 82px;
  border-radius: 4px;
  background: #060910;
  border: 1px solid #1e2638;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.mugshot-lines {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 18px;
  background: repeating-linear-gradient(
    180deg,
    transparent,
    transparent 7px,
    rgba(255, 255, 255, 0.06) 7px,
    rgba(255, 255, 255, 0.06) 8px
  );
  pointer-events: none;
}

.mugshot-silhouette {
  width: 44px;
  height: 52px;
  color: #64748b;
  z-index: 2;
}

.mugshot-id {
  width: 100%;
  background: #000000;
  color: #94a3b8;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
  padding: 2px 0;
  z-index: 3;
  letter-spacing: 0.05em;
  border-top: 1px solid #1a2233;
}

.inmate-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.inmate-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.meta-pill {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 600;
}

/* ================= STEMPEL & BADGES ================= */
.official-stamp {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border: 1.5px dashed;
  border-radius: 3px;
  display: inline-block;
  white-space: nowrap;
  user-select: none;
}

.stamp-lebenslaenglich,
.stamp-dauerverbot {
  color: #ff4d4d;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.16);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
  transform: rotate(-3deg);
}

.stamp-vollzug {
  color: #fb923c;
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.12);
  transform: rotate(-2deg);
}

.stamp-bewaehrung {
  color: #fbbf24;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  transform: rotate(-2deg);
}

.stamp-sperre {
  color: #38bdf8;
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.12);
  transform: rotate(-3deg);
}

.stamp-rechtsnorm {
  color: #c084fc;
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.12);
  transform: rotate(-2deg);
}

.judge-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.judge-badge-sashka {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.judge-badge-sashka .judge-role {
  color: #fb7185;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.65rem;
}

.judge-badge-matteo {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.judge-badge-matteo .judge-role {
  color: #f59e0b;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.65rem;
}

.judge-badge-generic {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cell-number-badge {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.cell-number-badge.stencil-badge {
  background: #090d15;
  border: 1px solid #334155;
  color: #94a3b8;
}

.cell-number-badge.folder-badge {
  background: #18140c;
  border: 1px solid #b45309;
  color: #fbbf24;
}

.cell-number-badge.law-badge {
  background: #170d24;
  border: 1px solid #a855f7;
  color: #e9d5ff;
}

/* ================= DRAGGABLE CELL BARS OVERLAY ================= */
.cell-bars-overlay {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 54px;
  z-index: 15;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  background: 
    linear-gradient(90deg, #1e293b 0%, #334155 4%, #475569 8%, #1e293b 14%, transparent 14%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 35px,
      #1e293b 35px,
      #475569 38px,
      #94a3b8 39px,
      #334155 41px,
      transparent 42px
    ),
    linear-gradient(180deg, 
      transparent 18%, 
      rgba(30, 41, 59, 0.96) 18%, 
      rgba(71, 85, 105, 0.98) 20%, 
      rgba(15, 23, 42, 0.98) 22%, 
      transparent 22%,
      transparent 76%, 
      rgba(30, 41, 59, 0.96) 76%, 
      rgba(71, 85, 105, 0.98) 78%, 
      rgba(15, 23, 42, 0.98) 80%, 
      transparent 80%
    );
  box-shadow: inset 0 0 25px rgba(0,0,0,0.85);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 14px;
}

.cell-bars-overlay:active {
  cursor: grabbing;
}

.cell-door-handle {
  width: 20px;
  height: 80px;
  background: linear-gradient(90deg, #334155 0%, #64748b 45%, #1e293b 100%);
  border: 1px solid #94a3b8;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.85), inset 0 1px 2px rgba(255,255,255,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  z-index: 18;
}

.door-handle-grip {
  width: 6px;
  height: 42px;
  background: #090e17;
  border-radius: 3px;
  border: 1px solid #475569;
}

.door-handle-keyhole {
  width: 5px;
  height: 7px;
  background: #000;
  border-radius: 2px 2px 0 0;
}

.prison-cell.door-open {
  border-color: #f59e0b !important;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.35) !important;
  transform: translateY(-4px) scale(1.01);
  z-index: 25;
}

.prison-cell.door-open .cell-bars-overlay {
  transform: translateX(105%) !important;
  opacity: 0.1;
  pointer-events: none;
}

.prison-cell.door-open .cell-body {
  animation: cellLight 0.5s ease-out forwards;
}

@keyframes cellLight {
  0% { filter: brightness(0.8); }
  50% { filter: brightness(1.25); }
  100% { filter: brightness(1.1); box-shadow: inset 0 0 30px rgba(245, 158, 11, 0.2); }
}

/* ================= CARD FOOTER ================= */
.cell-footer {
  padding: 0.75rem 1rem;
  background: #0f131d;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.5rem;
  position: relative;
  z-index: 30;
}

.btn-open-dossier {
  flex: 1;
  background: #171d2b;
  border: 1px solid #29354d;
  color: #ffffff;
  padding: 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.btn-open-dossier svg {
  width: 14px;
  height: 14px;
}

.btn-open-dossier:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.btn-video-quick {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 800;
  transition: all 0.2s ease;
}

.btn-video-quick:hover {
  background: #ef4444;
  color: #ffffff;
}

/* ================= 4. DOSSIER MODAL ================= */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.dossier-card {
  background: #10141f;
  border: 1px solid #2d374d;
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  position: relative;
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .dossier-card {
  transform: scale(1);
}

.dossier-header {
  background: #151a28;
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.1rem 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dossier-cell-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.92rem;
  font-weight: 800;
  color: #94a3b8;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.dossier-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.dossier-profile-row {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.dossier-mugshot-large {
  width: 84px;
  height: 104px;
  background: #080c14;
  border: 1px solid #26324a;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.dossier-mugshot-large .mugshot-lines {
  bottom: 24px;
}

.dossier-mugshot-large .mugshot-silhouette {
  width: 56px;
  height: 66px;
  color: #64748b;
}

.dossier-mugshot-large .mugshot-id {
  font-size: 0.7rem;
  padding: 2px 0;
}

.dossier-names h2 {
  font-size: 1.35rem;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.25;
}

.dossier-names p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.dossier-box {
  background: #0c0f18;
  border: 1px solid #1a2233;
  border-radius: 6px;
  padding: 0.9rem 1rem;
}

.dossier-box h3 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 800;
}

.dossier-judge-text {
  font-weight: 700;
  color: #f8fafc;
  font-size: 0.95rem;
}

.dossier-verdict-highlight {
  border-left: 3px solid var(--accent-amber) !important;
  background: rgba(245, 158, 11, 0.06);
}

.dossier-penalty-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fef08a;
}

.dossier-context-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.dossier-quote-highlight {
  border-left: 3px solid var(--accent-purple) !important;
  background: rgba(168, 85, 247, 0.06);
}

.dossierQuote {
  font-style: italic;
  color: #e9d5ff;
  font-size: 1rem;
  line-height: 1.5;
  font-family: Georgia, 'Times New Roman', serif;
}

.dossier-timestamp-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  color: #38bdf8;
  font-weight: 900;
}

.dossier-court-seal {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'Courier New', Courier, monospace;
  text-align: right;
  line-height: 1.35;
}

.dossier-footer {
  padding: 1.1rem 1.35rem;
  background: #141926;
  border-top: 1px solid var(--border-subtle);
  display: flex;
}

.btn-video-large {
  flex: 1;
  background: var(--accent-red);
  color: #ffffff;
  padding: 0.8rem;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-video-large:hover {
  background: #dc2626;
}

/* ================= 5. MOBILE BOTTOM DOCKED NAV ================= */
.mobile-bottom-nav {
  display: none;
}

/* ================= 6. RESPONSIVE BREAKPOINT (< 860px) ================= */
@media (max-width: 860px) {
  /* Hide Desktop Sidebar */
  .app-sidebar {
    display: none !important;
  }

  /* Main takes 100% width */
  .app-main {
    margin-left: 0 !important;
    padding: 0 1rem 5.5rem 1rem !important; /* Bottom padding so bottom nav doesn't cover last cards */
  }

  /* Show Compact Mobile Topbar */
  .app-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .topbar-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
  }

  .topbar-brand h1 {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #ffffff;
    line-height: 1.2;
  }

  .topbar-brand p {
    font-size: 0.72rem;
    color: var(--text-muted);
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .btn-topbar-icon {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .btn-topbar-icon svg {
    width: 17px;
    height: 17px;
  }

  /* Controls Strip on Mobile */
  .controls-strip {
    gap: 0.65rem;
    margin-bottom: 1.15rem;
  }

  .search-sort-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-input-box input {
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem 0.55rem 2.25rem;
  }

  .sort-select-custom {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  .prison-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  /* SHOW MOBILE BOTTOM NAV (FIXED THUMB BAR) */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(10, 13, 20, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid #1a2233;
    z-index: 200;
    padding: 0 0.5rem;
    align-items: center;
    justify-content: space-around;
  }

  .mobile-nav-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 0;
    position: relative;
    user-select: none;
  }

  .mobile-nav-btn svg {
    width: 19px;
    height: 19px;
    stroke-width: 2;
  }

  .mobile-nav-btn.active {
    color: #ffffff;
  }

  .mobile-nav-btn.active svg {
    color: var(--accent-amber);
  }

  .mobile-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 22px);
    background: #1e293b;
    color: #94a3b8;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 8px;
    line-height: 1;
  }

  .mobile-nav-btn.active .mobile-badge {
    background: var(--accent-amber);
    color: #000000;
  }
}
