@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&family=DM+Mono:wght@400;500&display=swap');

/* ══════════════════════════════════════════
   DARK TOKEN SET (default)
══════════════════════════════════════════ */
:root {
  --bg-base:      #0d1520;
  --bg-raised:    #111d2e;
  --bg-card:      #152032;
  --bg-hover:     #1a2840;
  --bg-sidebar:   #0b1219;
  --bg-panel:     #0f1a28;

  --accent:       #1f5fc8;
  --accent-hi:    #2e74e8;
  --accent-dim:   rgba(31, 95, 200, 0.13);
  --accent-glow:  rgba(31, 95, 200, 0.22);

  --gold:         #c8881a;
  --gold-dim:     rgba(200, 136, 26, 0.12);

  --red:          #c03a3a;
  --red-hi:       #d95050;
  --red-dim:      rgba(192, 58, 58, 0.10);
  --red-border:   rgba(192, 58, 58, 0.26);

  --green:        #27a85f;

  --border:       rgba(255,255,255,0.06);
  --border-mid:   rgba(255,255,255,0.11);
  --border-hi:    rgba(255,255,255,0.20);

  /* ── Fehérebb szövegszínek ── */
  --text-100: #ffffff;
  --text-80:  #e8f0f8;
  --text-60:  #b8cfe8;
  --text-40:  #7a9ab8;
  --text-20:  #2e4a62;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.55);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.58);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.68);

  --sidebar-w: 228px;
  --panel-w:   296px;
  --header-h:  54px;
  --r:  3px;
  --r2: 5px;
}

/* ══════════════════════════════════════════
   LIGHT TOKEN SET
══════════════════════════════════════════ */
[data-theme="light"] {
  --bg-base:      #edf1f7;
  --bg-raised:    #e2e8f2;
  --bg-card:      #ffffff;
  --bg-hover:     #d8e0ee;
  --bg-sidebar:   #dce4f0;
  --bg-panel:     #e6ecf6;

  --accent:       #1a50a8;
  --accent-hi:    #2460c0;
  --accent-dim:   rgba(26, 80, 168, 0.08);
  --accent-glow:  rgba(26, 80, 168, 0.14);

  --gold:         #8c5e08;
  --gold-dim:     rgba(140, 94, 8, 0.10);

  --red:          #a82828;
  --red-hi:       #c03838;
  --red-dim:      rgba(168, 40, 40, 0.07);
  --red-border:   rgba(168, 40, 40, 0.20);

  --green:        #1a8a48;

  --border:       rgba(0,0,0,0.07);
  --border-mid:   rgba(0,0,0,0.12);
  --border-hi:    rgba(0,0,0,0.22);

  --text-100: #0a1628;
  --text-80:  #1a2e48;
  --text-60:  #3a5272;
  --text-40:  #6a88a8;
  --text-20:  #c0ccd8;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.09);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.11);
  --shadow-lg: 0 10px 36px rgba(0,0,0,0.14);
}

/* ══════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-base);
  color: var(--text-80);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
  transition: background 0.22s, color 0.22s;
}

/* Fine grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
#hdr {
  position: sticky;
  top: 0;
  z-index: 300;
  height: var(--header-h);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  gap: 16px;
  box-shadow: var(--shadow-md);
  transition: background 0.22s;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-toggle {
  display: none;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  cursor: pointer;
  color: var(--text-60);
  transition: background 0.13s, color 0.13s;
  flex-shrink: 0;
  user-select: none;
}
.sidebar-toggle:hover { background: var(--bg-hover); color: var(--text-100); }

.sidebar-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

.brand-mark {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(255,255,255,0.9);
  stroke-width: 1.5;
}

.brand-divider {
  width: 1px;
  height: 26px;
  background: var(--border-mid);
  flex-shrink: 0;
}

.header-wordmark { display: flex; flex-direction: column; gap: 2px; }

.header-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-100);
  line-height: 1;
}

.header-sub {
  font-family: 'DM Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-60);
  line-height: 1;
}

/* right side */
.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 7.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-60);
  line-height: 1;
}

.stat-value {
  font-family: 'DM Mono', monospace;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-100);
  line-height: 1;
  white-space: nowrap;
  transition: color 0.22s;
}
.stat-value.over-limit {
  color: var(--red-hi);
  animation: blink 1.3s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.40; }
}

.stat-bar {
  width: 90px;
  height: 2px;
  background: var(--border-mid);
  border-radius: 1px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 1px;
  background: var(--accent-hi);
  transition: width 0.35s ease, background 0.22s;
}
.stat-bar-fill.danger { background: var(--red-hi); }

.stat-sep {
  width: 1px;
  height: 30px;
  background: var(--border-mid);
  flex-shrink: 0;
}

/* ── Theme toggle ── */
.theme-toggle {
  display: flex;
  background: var(--bg-raised);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  overflow: hidden;
  flex-shrink: 0;
}

.theme-btn {
  font-family: 'DM Mono', monospace;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 10px;
  background: none;
  border: none;
  color: var(--text-60);
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
  line-height: 1.3;
  white-space: nowrap;
}
.theme-btn:hover { color: var(--text-100); }
.theme-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
.app-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--panel-w);
  min-height: calc(100vh - var(--header-h));
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-mid);
  padding: 14px 0 28px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  transition: background 0.22s;
}

.sidebar-heading {
  font-family: 'DM Mono', monospace;
  font-size: 7.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-60);
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.sidebar-cat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-80);
  cursor: pointer;
  transition: background 0.11s, color 0.11s;
  border-left: 2px solid transparent;
  user-select: none;
}
.sidebar-cat:hover { background: var(--bg-hover); color: var(--text-100); }
.sidebar-cat.active {
  background: var(--accent-dim);
  border-left-color: var(--accent-hi);
  color: var(--text-100);
}

/* Colour pip */
.cat-pip {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  flex-shrink: 0;
}
.cat-pip.kozlekedesi { background: #3a8fe8; }
.cat-pip.sebesseg    { background: #e87820; }
.cat-pip.szabalysrts { background: #f5a623; }
.cat-pip.vetseg      { background: #a855f7; }
.cat-pip.buncselekm  { background: #d95050; }
.cat-pip.adocsalas   { background: #10b981; }
.cat-pip.mellekbunt  { background: #94a3b8; }

.sidebar-cat-count {
  margin-left: auto;
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  color: var(--text-60);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: all 0.13s;
  min-width: 26px;
  text-align: center;
}
.sidebar-cat.active .sidebar-cat-count {
  color: #6aacf0;
  background: var(--accent-dim);
  border-color: rgba(31,95,200,0.3);
  font-weight: 600;
}

/* ══════════════════════════════════════════
   MAIN
══════════════════════════════════════════ */
main {
  padding: 18px 20px;
  overflow-y: auto;
  min-width: 0;
}

/* Search */
.search-bar { position: relative; margin-bottom: 11px; }

.search-icon-wrap {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-60);
  display: flex;
}
.search-icon-wrap svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  color: var(--text-100);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 8px 12px 8px 36px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.22s;
}
.search-input:focus {
  border-color: var(--accent-hi);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-input::placeholder { color: var(--text-60); }

/* Chips */
.filter-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }

.chip {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--border-mid);
  border-radius: 2px;
  cursor: pointer;
  color: var(--text-80);
  background: var(--bg-card);
  transition: all 0.11s;
}
.chip:hover { border-color: var(--border-hi); color: var(--text-100); background: var(--bg-hover); }
.chip.active { background: var(--accent); border-color: var(--accent-hi); color: #fff; }

/* ══════════════════════════════════════════
   CATEGORY BLOCK
══════════════════════════════════════════ */
.category-block { margin-bottom: 28px; }

.category-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}

.cat-stripe {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  flex-shrink: 0;
}
.cat-stripe.kozlekedesi { background: #3a8fe8; }
.cat-stripe.sebesseg    { background: #e87820; }
.cat-stripe.szabalysrts { background: #f5a623; }
.cat-stripe.vetseg      { background: #a855f7; }
.cat-stripe.buncselekm  { background: #d95050; }
.cat-stripe.adocsalas   { background: #10b981; }
.cat-stripe.mellekbunt  { background: #94a3b8; }

.cat-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-100);
}

.cat-count-label {
  margin-left: auto;
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  color: var(--text-60);
}

/* ══════════════════════════════════════════
   BTK ROW
══════════════════════════════════════════ */
.btk-item {
  display: grid;
  grid-template-columns: 20px 1fr 138px 74px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--r);
  padding: 7px 10px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background 0.10s, border-color 0.10s;
  position: relative;
}

.btk-item:hover { background: var(--bg-hover); border-color: var(--border-mid); }

.btk-item[data-sev="low"]  { border-left-color: rgba(58,143,232,0.22); }
.btk-item[data-sev="mid"]  { border-left-color: rgba(245,166,35,0.28); }
.btk-item[data-sev="high"] { border-left-color: rgba(217,80,80,0.32); }

.btk-item.checked {
  background: var(--accent-dim);
  border-color: rgba(31,95,200,0.32);
  border-left-color: var(--accent-hi);
}
.btk-item.checked .btk-name { color: #7ab4f4; }

.btk-item.buntett.checked {
  background: var(--red-dim);
  border-color: rgba(192,58,58,0.28);
  border-left-color: var(--red-hi);
}
.btk-item.buntett.checked .btk-name { color: #e09090; }

/* Checkbox */
.btk-checkbox {
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--text-60);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: transparent;
  background: var(--bg-base);
  transition: all 0.11s;
  flex-shrink: 0;
}
.btk-item.checked .btk-checkbox {
  border-color: var(--accent-hi);
  background: var(--accent);
  color: #fff;
}
.btk-item.buntett.checked .btk-checkbox {
  border-color: var(--red-hi);
  background: var(--red);
  color: #fff;
}

/* Info */
.btk-info { padding: 0 10px; min-width: 0; }

.btk-par {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--text-60);
  letter-spacing: 0.3px;
  margin-bottom: 1px;
}

.btk-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-100);
  transition: color 0.11s;
  line-height: 1.3;
}

.tag-row { margin-top: 3px; }

.birosag-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 7.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-dim);
  border: 1px solid var(--red-border);
  padding: 1px 5px;
  border-radius: 2px;
}

/* Bírság */
.btk-birsag { text-align: right; padding-right: 10px; min-width: 0; }

.btk-birsag-val {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-80);
  white-space: nowrap;
}

/* Börtön */
.btk-borton { text-align: right; min-width: 0; }

.btk-borton-val {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-80);
  white-space: nowrap;
}
.btk-borton-val.has-time { color: var(--gold); }

.lethal-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 7.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red-border);
  padding: 1px 5px;
  border-radius: 2px;
  background: var(--red-dim);
}

/* Checked row layout */
.btk-item.checked { align-items: flex-start; padding-top: 9px; padding-bottom: 9px; }
.btk-item.checked .btk-birsag,
.btk-item.checked .btk-borton { padding-top: 2px; }

/* ══════════════════════════════════════════
   VALUE SLIDERS
══════════════════════════════════════════ */
.val-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: var(--border-mid);
  border-radius: 2px;
  outline: none;
  margin-top: 6px;
  cursor: pointer;
  display: block;
}
.val-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-hi);
  border: 2px solid var(--bg-base);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.val-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-hi);
  border: 2px solid var(--bg-base);
  cursor: pointer;
}
.btk-item.buntett.checked .val-slider::-webkit-slider-thumb { background: var(--red-hi); }
.btk-item.buntett.checked .val-slider::-moz-range-thumb     { background: var(--red-hi); }

/* ══════════════════════════════════════════
   TOOLTIP
══════════════════════════════════════════ */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  background: var(--bg-sidebar);
  border: 1px solid var(--border-hi);
  color: var(--text-100);
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  padding: 5px 10px;
  border-radius: var(--r);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.14s, transform 0.14s;
  z-index: 600;
  box-shadow: var(--shadow-md);
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════
   PANEL (right column)
══════════════════════════════════════════ */
.panel {
  background: var(--bg-panel);
  border-left: 1px solid var(--border-mid);
  padding: 13px 11px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: background 0.22s;
}

.panel-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 11px 11px;
  transition: background 0.22s;
}

.panel-title {
  font-family: 'DM Mono', monospace;
  font-size: 7.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-60);
  margin-bottom: 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}

/* Severity row */
.severity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 6px;
}
.severity-label {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-60);
}
.severity-val {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: var(--text-60);
  transition: color 0.2s;
}
.severity-val.sev-none   { color: var(--text-60); }
.severity-val.sev-low    { color: #4a9fd4; }
.severity-val.sev-medium { color: var(--gold); }
.severity-val.sev-high   { color: #cc7020; }
.severity-val.sev-danger { color: var(--red-hi); }

/* Court warning */
.court-warning {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  background: var(--red-dim);
  border: 1px solid var(--red-border);
  border-radius: var(--r);
  margin-bottom: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.4px;
  color: var(--red-hi);
  font-weight: 500;
}
.court-warning.visible { display: flex; }

/* Final block */
.final-block {
  background: var(--accent-dim);
  border: 1px solid rgba(31,95,200,0.18);
  border-radius: var(--r);
  padding: 9px 11px;
}
.final-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.final-row:last-of-type { margin-bottom: 0; }
.final-label {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-60);
}
.final-val {
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-hi);
  transition: color 0.2s;
}
[data-theme="light"] .final-val { color: var(--accent); }
.final-val.danger { color: var(--red-hi); }

.capped-note {
  font-family: 'DM Mono', monospace;
  font-size: 8.5px;
  color: var(--red);
  margin-top: 6px;
  padding: 3px 7px;
  background: var(--red-dim);
  border: 1px solid var(--red-border);
  border-radius: var(--r);
  display: none;
  letter-spacing: 0.3px;
}
.capped-note.visible { display: block; }

/* Selected list */
.selected-list { display: flex; flex-direction: column; gap: 3px; }

.selected-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r);
  animation: fadein 0.12s ease;
  transition: background 0.22s;
}
@keyframes fadein {
  from { opacity: 0; transform: translateX(4px); }
  to   { opacity: 1; transform: none; }
}

.sel-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-hi);
  flex-shrink: 0;
  margin-top: 5px;
}
.sel-info { flex: 1; min-width: 0; }
.sel-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-100);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sel-detail {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--text-60);
  margin-top: 1px;
}
.sel-remove {
  background: none;
  border: none;
  color: var(--text-60);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.11s;
  flex-shrink: 0;
}
.sel-remove:hover { color: var(--red-hi); }

.empty-state {
  text-align: center;
  padding: 18px 10px;
  color: var(--text-60);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-group { display: flex; gap: 5px; }

.btn {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 8px 11px;
  border: 1px solid;
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.11s;
  flex: 1;
  text-align: center;
}

.btn-primary   { background: var(--accent); border-color: var(--accent-hi); color: #fff; }
.btn-primary:hover { background: var(--accent-hi); }

.btn-secondary {
  background: transparent;
  border-color: var(--border-mid);
  color: var(--text-80);
}
.btn-secondary:hover { border-color: var(--border-hi); color: var(--text-100); background: var(--bg-hover); }

.btn-danger {
  background: transparent;
  border-color: var(--red-border);
  color: var(--red);
}
.btn-danger:hover { background: var(--red-dim); border-color: var(--red); }

.btn-discord {
  width: 100%;
  background: #3c4bc8;
  border-color: #5865f2;
  color: #fff;
  margin-top: 2px;
}
.btn-discord:hover { background: #5865f2; }

/* ══════════════════════════════════════════
   DISCORD INPUTS
══════════════════════════════════════════ */
.discord-field { margin-bottom: 8px; }

.discord-field-label {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-60);
  display: block;
  margin-bottom: 4px;
}
.discord-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  color: var(--text-100);
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  padding: 6px 9px;
  outline: none;
  transition: border-color 0.14s, background 0.22s;
}
.discord-input:focus { border-color: var(--accent-hi); }
.discord-input::placeholder { color: var(--text-60); }

/* ══════════════════════════════════════════
   DISCORD MODAL
══════════════════════════════════════════ */
#discord-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.discord-modal-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--r5);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}
.discord-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
}
.discord-modal-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-100);
}
.discord-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-60);
  cursor: pointer;
  line-height: 1;
  transition: color 0.11s;
  padding: 0 3px;
}
.discord-modal-close:hover { color: var(--red-hi); }
.discord-modal-hint {
  padding: 8px 15px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.4px;
  color: var(--text-60);
  border-bottom: 1px solid var(--border);
}
#discord-preview-text {
  flex: 1;
  margin: 11px 15px;
  padding: 11px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  line-height: 1.6;
  background: #080e14;
  color: #b0c8dc;
  border: 1px solid #1e2e3e;
  border-radius: var(--r);
  resize: none;
  outline: none;
  overflow-y: auto;
  min-height: 200px;
}
.discord-modal-footer {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  padding: 11px 15px;
  border-top: 1px solid var(--border);
}
.discord-modal-footer .btn { flex: 0; padding: 7px 16px; }

/* ══════════════════════════════════════════
   MOBILE BOTTOM BAR
══════════════════════════════════════════ */
#mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 250;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-mid);
  padding: 9px 14px;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  transition: background 0.22s;
}
.mob-stat { flex: 1; min-width: 0; }
.mob-stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 7.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-60);
  margin-bottom: 2px;
}
.mob-stat-val {
  font-family: 'DM Mono', monospace;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-100);
  white-space: nowrap;
}
.mob-action-btn {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 8px 14px;
  background: var(--accent);
  border: 1px solid var(--accent-hi);
  border-radius: var(--r);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.11s;
}
.mob-action-btn:hover { background: var(--accent-hi); }

/* ══════════════════════════════════════════
   MOBILE DRAWER
══════════════════════════════════════════ */
#mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 350;
}
#mobile-drawer.open { display: block; }
#mobile-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.60);
  backdrop-filter: blur(3px);
}
#mobile-drawer-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-mid);
  border-radius: 8px 8px 0 0;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}
#mobile-drawer.open #mobile-drawer-content { transform: translateY(0); }

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-100);
  flex-shrink: 0;
}
.mobile-drawer-header button {
  background: none;
  border: none;
  color: var(--text-60);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: color 0.11s;
  padding: 0 3px;
}
.mobile-drawer-header button:hover { color: var(--red-hi); }

.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 22px;
}

/* ══════════════════════════════════════════
   SIDEBAR OVERLAY
══════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(0,0,0,0.5);
  z-index: 200;
}
.sidebar-overlay.visible { display: block; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .app-layout { grid-template-columns: var(--sidebar-w) 1fr; }
  .panel { display: none; }
}

@media (max-width: 860px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: var(--sidebar-w);
    z-index: 220;
    transform: translateX(-100%);
    transition: transform 0.20s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex !important; }
  main { padding: 12px 13px; }
  .btk-item { grid-template-columns: 20px 1fr 120px; }
  .btk-borton { display: none; }
  #mobile-bottom-bar { display: flex; }
  main { padding-bottom: 68px; }
}

@media (max-width: 560px) {
  #hdr { padding: 0 11px; }
  .header-title { font-size: 13.5px; letter-spacing: 2px; }
  .header-sub { display: none; }
  .brand-divider { display: none; }
  .stat-bar { width: 60px; }
  .stat-value { font-size: 11px; }
  .stat-sep { display: none; }
  .btk-item { grid-template-columns: 20px 1fr 96px; }
}

@media (min-width: 861px) {
  #mobile-bottom-bar { display: none !important; }
  #mobile-drawer      { display: none !important; }
}

/* Fallback mobile actions */
.mobile-actions { display: none; }
@media (max-width: 1100px) {
  .mobile-actions {
    display: flex !important;
    gap: 5px;
    padding: 9px 0 2px;
    flex-wrap: wrap;
  }
  .mobile-actions .btn { flex: 1; min-width: 90px; }
}

/* ══════════════════════════════════════════
   DISCORD SELECT & SEND RESULT
══════════════════════════════════════════ */
.discord-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aabbcc' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.discord-send-result {
  font-size: 12px;
  margin-top: 6px;
  min-height: 16px;
  transition: opacity .3s;
}
.discord-send-result.success { color: var(--green); }
.discord-send-result.error   { color: var(--red-hi); }