/* ==========================================================================
   CYBER POLICE GLASS OS — ГУ МВД России (mvd-province.site)
   ========================================================================== */

:root {
  --bg-deep: #040813;
  --bg-surface: #091224;
  --glass-bg: rgba(10, 19, 38, 0.78);
  --glass-bg-hover: rgba(15, 28, 56, 0.88);
  --glass-border: rgba(56, 189, 248, 0.18);
  --glass-border-strong: rgba(56, 189, 248, 0.4);

  --cyan: #38BDF8;
  --cyan-dim: rgba(56, 189, 248, 0.15);
  --gold: #F59E0B;
  --gold-dim: rgba(245, 158, 11, 0.16);
  --red: #EF4444;
  --red-dim: rgba(239, 68, 68, 0.18);
  --emerald: #10B981;
  --emerald-dim: rgba(16, 185, 129, 0.16);
  --purple: #A855F7;

  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;

  --shadow-glass: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --transition: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
}

.mono {
  font-family: var(--font-mono);
}

.hidden {
  display: none !important;
}

.text-cyan { color: var(--cyan); }
.text-gold { color: var(--gold); }
.text-red { color: var(--red); }
.text-emerald { color: var(--emerald); }

/* Ambient Cyber Background */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 50% 35%, black 35%, transparent 95%);
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.bg-glow-cyan {
  width: 460px;
  height: 460px;
  background: #0284C7;
  top: -140px;
  left: -120px;
}

.bg-glow-gold {
  width: 380px;
  height: 380px;
  background: #D97706;
  bottom: -140px;
  right: -100px;
  opacity: 0.2;
}

/* Glass Surfaces */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-glass);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(4, 8, 19, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.28);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
  color: var(--text-main);
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-lg {
  padding: 13px 20px;
  font-size: 15px;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

.btn-primary {
  background: linear-gradient(135deg, #0284C7, #38BDF8);
  color: #031120;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.3);
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.45);
}

.btn-gold {
  background: linear-gradient(135deg, #D97706, #F59E0B);
  color: #0F172A;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}
.btn-gold:hover {
  filter: brightness(1.08);
}

.btn-danger {
  background: linear-gradient(135deg, #B91C1C, #EF4444);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10B981);
  color: #031A12;
}

.btn-ghost {
  background: rgba(15, 28, 56, 0.6);
  border-color: var(--glass-border);
  color: var(--text-main);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
}

.btn-link {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
}
.btn-link:hover {
  text-decoration: underline;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 28, 56, 0.75);
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-icon:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.input-tactical {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(4, 10, 22, 0.72);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-tactical:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}
.input-tactical::placeholder {
  color: var(--text-dim);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

.sub-label {
  font-size: 12px;
  color: var(--text-muted);
}

.mini-badge {
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  background: rgba(9, 18, 36, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border-strong);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.22s ease-out;
}
.toast-success { border-color: var(--emerald); }
.toast-error { border-color: var(--red); }
.toast-gold { border-color: var(--gold); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
}

.crest-wrap {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crest-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.crest-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-surface);
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.login-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.login-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.login-subtitle {
  margin: 4px 0 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.pin-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: text;
}

.pin-dot {
  width: 40px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--glass-border);
  background: rgba(4, 10, 22, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan);
  transition: var(--transition);
}

.pin-dot.filled {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}

.pin-hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 270px;
  margin: 0 auto 14px;
}

.key-btn {
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 28, 56, 0.55);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.key-btn:hover {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.14);
}
.key-btn:active {
  transform: scale(0.95);
}
.key-action {
  color: var(--gold);
  font-size: 16px;
}

.login-error {
  min-height: 20px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 10px;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

/* ==========================================================================
   MAIN TABLET APP SHELL
   ========================================================================== */
.tablet-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
}

.top-hud {
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-crest {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  object-fit: cover;
}

.hud-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hud-domain {
  font-size: 11px;
  color: var(--cyan);
}

.hud-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

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

.status-online {
  background: var(--emerald-dim);
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.35);
}
.status-online .pulse-dot {
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse 1.8s infinite;
}

.status-minimized {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: rgba(245, 158, 11, 0.35);
}

.status-offline {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.35);
}

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

.hud-chip {
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(15, 28, 56, 0.8);
  border: 1px solid var(--glass-border);
}

.chip-gold {
  color: var(--gold);
  border-color: rgba(245, 158, 11, 0.35);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-hud-stop {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid rgba(239, 68, 68, 0.5);
  background: var(--red-dim);
  color: #FCA5A5;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-hud-stop:hover {
  background: var(--red);
  color: #fff;
}

.btn-hud-exit {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 28, 56, 0.65);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-hud-exit:hover {
  color: var(--text-main);
  border-color: var(--cyan);
}

/* App Shell: Sidebar + Content */
.app-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 12px;
  align-items: start;
}

.main-nav {
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.nav-item:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(2, 132, 199, 0.14));
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--cyan);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15);
}

.nav-icon {
  font-size: 18px;
}

.main-content {
  min-width: 0;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: fadeSlide 0.2s ease-out;
}
.tab-panel.active {
  display: flex;
}

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

/* ==========================================================================
   TAB 1: ПУЛЬТ
   ========================================================================== */
.pult-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.officer-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.officer-avatar {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(245, 158, 11, 0.25));
  border: 1.5px solid var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--cyan);
  flex-shrink: 0;
}

.officer-fio {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
}

.officer-rank {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.officer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-tag {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(4, 10, 22, 0.65);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.meta-gold {
  color: var(--gold);
  border-color: rgba(245, 158, 11, 0.35);
}

.officer-status-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
}

.stat-val {
  font-size: 13px;
  font-weight: 700;
}

.target-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.recent-targets-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 28, 56, 0.65);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.chip-btn:hover {
  border-color: var(--cyan);
  color: var(--text-main);
}
.chip-btn.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

.emergency-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-sos, .btn-f12 {
  position: relative;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-sos {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(153, 27, 27, 0.95));
  border: 1px solid #F87171;
  color: #fff;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.35);
}
.btn-sos:hover {
  box-shadow: 0 0 28px rgba(239, 68, 68, 0.6);
  transform: translateY(-1px);
}

.btn-f12 {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--gold);
}
.btn-f12:hover {
  background: rgba(245, 158, 11, 0.25);
}

.quick-cmd-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.quick-cmd-btn {
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 28, 56, 0.62);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quick-cmd-btn:hover {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
  transform: translateY(-2px);
}
.quick-cmd-btn:active {
  transform: scale(0.97);
}

.qcmd-code {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--cyan);
}

.qcmd-label {
  font-size: 12px;
  color: var(--text-muted);
}

.custom-line-form {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   TAB 2: БИНДЫ
   ========================================================================== */
.toolbar-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

.search-wrap .input-tactical {
  padding-left: 36px;
}

.bind-count-badge {
  font-size: 12px;
  color: var(--text-muted);
}

.binds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.bind-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color var(--transition), transform var(--transition);
}
.bind-card:hover {
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
}

.bind-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.bind-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.bind-cat {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
}

.bind-hotkey {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(4, 10, 22, 0.8);
  border: 1px solid var(--glass-border);
  color: var(--cyan);
  white-space: nowrap;
}

.bind-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.bind-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bind-cmd-preview {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   TAB 3: ЗАКОНЫ И /SU
   ========================================================================== */
.laws-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
  align-items: start;
}

.laws-browser {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.laws-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.law-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition);
}
.law-item:hover {
  border-color: var(--cyan);
}
.law-item.selected {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.09);
}

.law-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--glass-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 12px;
  color: #031120;
}
.law-item.selected .law-check {
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 800;
}

.law-main {
  flex: 1;
  min-width: 0;
}

.law-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.law-code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  color: var(--cyan);
}

.law-sanction-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(4, 10, 22, 0.75);
  border: 1px solid var(--glass-border);
  color: var(--gold);
}

.law-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.law-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.su-calculator {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.su-selected-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.su-sel-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(4, 10, 22, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 12px;
}

.su-totals {
  padding: 12px;
  border-radius: 12px;
  background: rgba(4, 10, 22, 0.65);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.total-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.su-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-hint {
  font-size: 12px;
  color: var(--text-dim);
  padding: 10px;
  text-align: center;
}

/* ==========================================================================
   TAB 4: СГУ
   ========================================================================== */
.sgu-panel {
  max-width: 820px;
}

.sgu-strobe {
  display: flex;
  gap: 6px;
  align-items: center;
}

.strobe-blue, .strobe-red {
  width: 24px;
  height: 8px;
  border-radius: 99px;
  opacity: 0.25;
  transition: opacity 0.15s;
}
.strobe-blue { background: #38BDF8; }
.strobe-red { background: #EF4444; }

.sgu-strobe.active .strobe-blue {
  animation: strobeB 0.45s infinite alternate;
}
.sgu-strobe.active .strobe-red {
  animation: strobeR 0.45s infinite alternate-reverse;
}

@keyframes strobeB {
  from { opacity: 0.2; box-shadow: none; }
  to { opacity: 1; box-shadow: 0 0 14px #38BDF8; }
}
@keyframes strobeR {
  from { opacity: 0.2; box-shadow: none; }
  to { opacity: 1; box-shadow: 0 0 14px #EF4444; }
}

.sgu-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.group-title {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pack-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(4, 10, 22, 0.65);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}
.pack-card:hover {
  border-color: var(--cyan);
}
.pack-card.active {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.18);
}

.pack-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}
.pack-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.sgu-volume-box {
  padding: 14px;
  border-radius: 12px;
  background: rgba(4, 10, 22, 0.6);
  border: 1px solid var(--glass-border);
  margin-bottom: 16px;
}

.volume-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.tactical-slider {
  width: 100%;
  accent-color: var(--cyan);
  cursor: pointer;
  margin-bottom: 10px;
}

.volume-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sgu-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

/* ==========================================================================
   TAB 5: РАДАР
   ========================================================================== */
.radar-layout {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 14px;
  align-items: start;
}

.radar-map-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.radar-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.radar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-gold.armed {
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.7);
  outline: 2px solid #fff;
}

.radar-viewport {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: 14px;
  overflow: hidden;
  background: #020611;
  border: 1px solid var(--glass-border-strong);
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.radar-viewport.placing {
  cursor: crosshair;
}
.radar-viewport:active:not(.placing) {
  cursor: grabbing;
}

.radar-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 1000px;
  height: 1000px;
  transform-origin: 0 0;
}

.radar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.radar-img.map-missing {
  opacity: 0;
}

.radar-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.1) 1px, transparent 1px);
  background-size: 100px 100px;
}

.radar-markers-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.radar-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.marker-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.marker-dot.status-Погоня { background: var(--gold); box-shadow: 0 0 16px var(--gold); }
.marker-dot.status-SOS { background: var(--red); box-shadow: 0 0 20px var(--red); animation: pulse 0.9s infinite; }
.marker-dot.status-Задержание { background: var(--purple); box-shadow: 0 0 14px var(--purple); }
.marker-dot.status-Пост\/КПП, .marker-dot.status-ДЧ { background: var(--emerald); box-shadow: 0 0 14px var(--emerald); }

.marker-label {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(4, 8, 19, 0.88);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.radar-hint-banner {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 99px;
  background: rgba(245, 158, 11, 0.92);
  color: #040813;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.radar-units-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 490px;
  overflow-y: auto;
}

.unit-row {
  padding: 10px;
  border-radius: 10px;
  background: rgba(4, 10, 22, 0.65);
  border: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.unit-callsign {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--cyan);
}

.unit-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   TAB 6: ЖУРНАЛ
   ========================================================================== */
.journal-title {
  margin: 4px 0 0;
  font-size: 17px;
}

.journal-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 540px;
  overflow-y: auto;
}

.journal-entry {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(4, 10, 22, 0.62);
  border-left: 3px solid var(--cyan);
}
.journal-entry.type-law { border-left-color: var(--gold); }
.journal-entry.type-radar { border-left-color: var(--red); }
.journal-entry.type-system { border-left-color: var(--emerald); }

.j-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.j-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.j-details {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(2, 6, 17, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-textarea {
  width: 100%;
  height: 300px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(4, 8, 19, 0.85);
  color: var(--text-main);
  font-size: 12px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & SMARTPHONE)
   ========================================================================== */
@media (max-width: 1024px) {
  .laws-layout,
  .radar-layout {
    grid-template-columns: 1fr;
  }

  .su-calculator {
    position: static;
  }

  .quick-cmd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .tablet-app {
    padding: 8px 8px 84px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .main-nav {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    top: auto;
    z-index: 500;
    flex-direction: row;
    justify-content: space-around;
    padding: 6px;
    border-radius: 18px;
  }

  .nav-item {
    flex-direction: column;
    gap: 3px;
    padding: 7px 6px;
    font-size: 10px;
    flex: 1;
    align-items: center;
    text-align: center;
  }

  .nav-icon {
    font-size: 17px;
  }

  .pult-grid,
  .sgu-groups,
  .sgu-actions {
    grid-template-columns: 1fr;
  }

  .sgu-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .radar-viewport {
    height: 380px;
  }

  .hidden-xs {
    display: none;
  }

  .custom-line-form {
    flex-direction: column;
  }
}
