:root {
  --bg-1: #061117;
  --bg-2: #0a1d25;
  --bg-3: #102831;
  --panel: rgba(8, 22, 29, 0.9);
  --panel-strong: rgba(11, 28, 36, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.03);
  --line: rgba(189, 228, 215, 0.12);
  --line-strong: rgba(255, 156, 84, 0.26);
  --text: #edf6f0;
  --muted: #9cb7ae;
  --soft: #c9ddd6;
  --accent: #ff9750;
  --accent-soft: #ffd8c0;
  --mint: #74d0a3;
  --mint-soft: #d7f6e7;
  --danger: #ff7b70;
  --discord: #5865f2;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  color-scheme: dark;
  background:
    radial-gradient(circle at top left, rgba(255, 151, 80, 0.16), transparent 22%),
    radial-gradient(circle at bottom right, rgba(116, 208, 163, 0.12), transparent 25%),
    linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 54%, var(--bg-3) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent);
}

.app-shell,
.login-shell {
  width: min(1600px, calc(100% - 40px));
  margin: 20px auto;
  position: relative;
  z-index: 1;
}

.panel,
.db-card,
.admin-card,
.player-banner,
.metric-card,
.result-card,
.vehicle-card,
.linked-card,
.subsection-card,
.entity-card,
.timeline-item,
.login-card {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand-block,
.db-card,
.admin-card,
.panel,
.player-banner,
.metric-card,
.result-card,
.vehicle-card,
.linked-card,
.subsection-card,
.entity-card,
.timeline-item,
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-bottom: 18px;
}

.brand-block {
  padding: 24px 28px;
}

.brand-block h1,
.login-card h1 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.topbar-copy,
.login-copy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 820px;
}

.topbar-premium .brand-block {
  background:
    linear-gradient(125deg, rgba(255, 151, 80, 0.08), rgba(116, 208, 163, 0.05)),
    var(--panel);
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.topbar-side {
  display: grid;
  gap: 14px;
}

.db-card,
.admin-card {
  padding: 20px 22px;
}

.db-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.db-label,
.admin-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.db-card strong {
  font-family: "Syne", sans-serif;
  font-size: 1.9rem;
}

#db-status[data-state="ok"] {
  color: var(--mint);
}

#db-status[data-state="error"] {
  color: var(--danger);
}

.admin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-meta strong {
  display: block;
  word-break: break-word;
}

.admin-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.logout-link,
.discord-button,
.restart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.logout-link {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
}

.restart-link {
  background: linear-gradient(135deg, rgba(255, 151, 80, 0.16), rgba(255, 124, 56, 0.22));
  color: var(--accent-soft);
  border: 1px solid rgba(255, 151, 80, 0.28);
  min-width: 132px;
}

.logout-link:hover,
.discord-button:hover,
.restart-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.restart-link:disabled {
  opacity: 0.7;
  cursor: wait;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-soft);
}

.dashboard {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.dashboard-single {
  grid-template-columns: 1fr;
}

/* Sidebar cachée : plus d'espace pour le workspace */
body.sidebar-hidden .sidebar {
  display: none;
}

body.sidebar-hidden .dashboard {
  grid-template-columns: 1fr;
}

.sidebar {
  position: sticky;
  top: 20px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.panel {
  padding: 22px;
}

.panel-head h2,
.results-header h3,
.section-head h3,
.subsection-head h4,
.info-card h3,
.empty-panel h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
}

.search-panel,
.section-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-label {
  color: var(--soft);
  font-size: 0.93rem;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 10px;
}

input,
button,
select {
  border: 0;
  border-radius: 16px;
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus {
  border-color: rgba(255, 151, 80, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 151, 80, 0.1);
}

button {
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.search-form button {
  background: linear-gradient(135deg, var(--accent), #ff7c38);
  color: #1e140d;
  font-weight: 700;
}

.search-help {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

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

.search-help-inline {
  color: var(--muted);
  font-size: 0.82rem;
}

.secondary-button,
.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Raccourci Wipe joueur (action sensible) */
.topbar-nav .nav-wipe-link {
  border-color: rgba(200, 100, 100, 0.42);
}
.topbar-nav .nav-wipe-link:hover {
  border-color: rgba(255, 140, 120, 0.55);
  background: rgba(200, 60, 60, 0.1);
}
.topbar-nav a.nav-wipe-link[aria-current="page"] {
  border-color: rgba(255, 140, 120, 0.65);
  background: rgba(200, 60, 60, 0.16);
  pointer-events: none;
  cursor: default;
}

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

.permission-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.permission-toggle input {
  width: auto;
  margin: 0;
}

.search-help span,
.section-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--soft);
  font-size: 0.82rem;
}

.results-header,
.section-head,
.subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 320px);
  overflow: auto;
  padding-right: 2px;
}

.result-card {
  width: 100%;
  padding: 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(
      145deg,
      rgba(255, 151, 80, 0.06),
      rgba(255, 255, 255, 0.02)
    ),
    var(--panel-strong);
}

.result-card strong {
  font-size: 1rem;
}

.result-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge-mini {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 151, 80, 0.1);
  border: 1px solid rgba(255, 151, 80, 0.2);
  color: var(--accent-soft);
  font-size: 0.75rem;
}

.result-card span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  word-break: break-word;
}

.result-card.active {
  border-color: var(--line-strong);
  background:
    linear-gradient(145deg, rgba(255, 151, 80, 0.12), rgba(255, 255, 255, 0.03)),
    var(--panel-strong);
}

.workspace {
  min-width: 0;
}

.empty-panel,
.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.compact {
  min-height: auto;
  padding: 28px 0;
}

.detail-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.live-summary-card,
.live-player-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(116, 208, 163, 0.2);
  background:
    linear-gradient(125deg, rgba(116, 208, 163, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.live-preview-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.live-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.live-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.live-stat span {
  color: var(--muted);
  font-size: 0.82rem;
}

.live-player-card.hidden-empty {
  display: none;
}

.priority-stack,
.priority-ribbon {
  display: grid;
  gap: 10px;
}

.priority-ribbon {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.priority-card,
.signal-card,
.command-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.priority-card strong,
.signal-card span,
.command-card strong {
  font-family: "Syne", sans-serif;
  font-size: 1.45rem;
  line-height: 1;
}

.priority-card small,
.signal-card small,
.command-card .metric-note {
  color: var(--muted);
}

.priority-ok {
  border-color: rgba(116, 208, 163, 0.25);
}

.priority-warning {
  border-color: rgba(255, 151, 80, 0.28);
}

.priority-danger {
  border-color: rgba(255, 123, 112, 0.28);
}

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

.compact-grid {
  align-content: start;
}

.live-preview-link {
  width: 100%;
}

.stack-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.stack-main,
.stack-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 0;
}

.stack-side {
  flex: 0 1 42%;
  max-width: 48%;
}

.stack-main strong,
.stack-side strong,
.stack-main span,
.stack-side span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stack-main span,
.stack-side span {
  color: var(--muted);
  font-size: 0.88rem;
}

.stack-side {
  text-align: right;
}

.audit-feed-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.audit-feed-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.audit-feed-action {
  font-size: 0.95rem;
  font-family: "Syne", sans-serif;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.audit-feed-time {
  color: var(--muted);
  font-size: 0.84rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.audit-feed-detail {
  font-size: 0.88rem;
  color: var(--soft);
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.audit-feed-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 0.84rem;
  color: var(--muted);
}

.audit-feed-status {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--soft);
}

.audit-feed-path {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-all;
  overflow-wrap: anywhere;
  opacity: 0.92;
}

.role-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hidden {
  display: none !important;
}

.player-banner {
  padding: 26px 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  background:
    linear-gradient(120deg, rgba(255, 151, 80, 0.12), rgba(116, 208, 163, 0.07)),
    var(--panel);
}

.player-banner h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.player-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.45;
  word-break: break-word;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 151, 80, 0.34);
  background: rgba(255, 151, 80, 0.09);
  color: var(--accent-soft);
}

.hero-pill-alt {
  border-color: rgba(116, 208, 163, 0.3);
  background: rgba(116, 208, 163, 0.08);
  color: var(--mint-soft);
}

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

.metric-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel-strong);
}

.metric-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-value {
  font-family: "Syne", sans-serif;
  font-size: 1.6rem;
  line-height: 1;
}

.metric-note {
  color: var(--soft);
  font-size: 0.86rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-grid-split {
  grid-template-columns: 1.15fr 0.85fr;
}

.info-card {
  min-width: 0;
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.info-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
  text-align: left;
}

.property-sections,
.banking-sections,
.sanctions-sections {
  display: grid;
  gap: 12px;
}

.subsection-card {
  padding: 18px;
  background: var(--panel-strong);
}

.subsection-head span {
  color: var(--soft);
  font-size: 0.85rem;
}

.subsection-head-end {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.subsection-card--collapsible .subsection-body {
  margin-top: 14px;
}

.subsection-card--collapsible.is-collapsed .subsection-body {
  display: none;
}

.subsection-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transform-origin: center;
  transition:
    background 0.15s ease,
    transform 0.2s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.subsection-collapse-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

.subsection-collapse-icon {
  display: block;
  font-size: 0.95rem;
  transform: translateY(1px);
}

.subsection-collapse-icon::before {
  content: "▾";
}

.subsection-card--collapsible.is-collapsed .subsection-collapse-btn {
  transform: rotate(-90deg);
}

.subcard-grid,
.linked-grid,
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.vehicle-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.vehicle-card-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

/* Deux boutons cote a cote : en flex-wrap, chaque ligne ne contient qu'un item
   qui s'etire a 100% — d'ou l'effet « Ranger au-dessus de Supprimer ». */
.vehicle-card-actions--row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.vehicle-card-actions--row .vehicle-delete-btn--footer,
.vehicle-card-actions--row .vehicle-park-btn--footer {
  width: 100%;
  min-width: 0;
}

@media (max-width: 520px) {
  .vehicle-card-actions--row {
    grid-template-columns: 1fr;
  }
}

.vehicle-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-end;
}

.vehicle-park-btn {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(116, 208, 163, 0.55) !important;
  background: rgba(60, 120, 95, 0.38) !important;
  color: var(--mint-soft) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.vehicle-park-btn:hover:not(:disabled) {
  background: rgba(80, 150, 115, 0.52) !important;
  border-color: rgba(140, 230, 190, 0.75) !important;
  filter: brightness(1.05);
}

.vehicle-park-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.vehicle-park-btn--header {
  width: auto;
  align-self: flex-start;
  white-space: nowrap;
}

.vehicle-park-btn--footer {
  width: 100%;
}

.park-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 12, 16, 0.72);
  backdrop-filter: blur(6px);
}

.park-modal-box {
  width: min(440px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.park-modal-title {
  margin: 0 0 10px;
  font-family: "Syne", sans-serif;
  font-size: 1.2rem;
}

.park-modal-hint {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

.park-modal-hint code {
  font-size: 0.82em;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 6px;
}

.park-modal-vehicle {
  margin: 0 0 14px;
  font-weight: 600;
  color: var(--accent-soft);
}

.park-modal-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.park-modal-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.park-modal-select:focus {
  outline: 2px solid rgba(255, 151, 80, 0.45);
  outline-offset: 2px;
}

.park-modal-empty {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--danger);
}

.park-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.park-modal-confirm {
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 151, 80, 0.55);
  background: rgba(255, 151, 80, 0.22);
  color: var(--accent-soft);
  font-family: inherit;
}

.park-modal-confirm:hover:not(:disabled) {
  background: rgba(255, 151, 80, 0.32);
}

.park-modal-confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.vehicle-delete-btn {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 120, 110, 0.65) !important;
  background: rgba(200, 60, 60, 0.35) !important;
  color: #ffc8c4 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.vehicle-delete-btn:hover:not(:disabled) {
  background: rgba(220, 80, 80, 0.5) !important;
  border-color: rgba(255, 140, 130, 0.85) !important;
  filter: brightness(1.05);
}

.vehicle-delete-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.vehicle-delete-btn--header {
  width: auto;
  align-self: flex-start;
  white-space: nowrap;
}

.vehicle-delete-btn--footer {
  width: 100%;
}

.vehicle-delete-btn--table {
  padding: 5px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.entity-card,
.linked-card,
.vehicle-card,
.timeline-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.entity-card-strong {
  background:
    linear-gradient(125deg, rgba(255, 151, 80, 0.1), rgba(116, 208, 163, 0.05)),
    rgba(255, 255, 255, 0.03);
}

.entity-card,
.linked-card,
.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entity-card span,
.linked-card span,
.timeline-item span {
  color: var(--muted);
  word-break: break-word;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: rgba(255, 255, 255, 0.02);
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  position: sticky;
  top: 0;
  background: rgba(10, 24, 32, 0.98);
  color: var(--accent-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.linked-inventories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.linked-title {
  color: var(--muted);
}

.vehicle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.vehicle-head-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.vehicle-head h4 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.16rem;
}

.plate {
  color: var(--accent-soft);
  font-weight: 700;
}

.vehicle-list {
  display: grid;
  gap: 10px;
}

.vehicle-list div {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.vehicle-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.alert-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.alert-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-card span {
  color: var(--muted);
}

.alert-warning {
  border-color: rgba(255, 151, 80, 0.24);
}

.alert-danger {
  border-color: rgba(255, 123, 112, 0.3);
}

.alert-info,
.alert-ok {
  border-color: rgba(116, 208, 163, 0.24);
}

.error-state,
.login-warning-error {
  color: #ffb7ad;
}

.login-page {
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(720px, calc(100% - 24px));
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
}

.login-card {
  width: 100%;
  padding: 30px;
  background:
    linear-gradient(145deg, rgba(88, 101, 242, 0.12), rgba(255, 151, 80, 0.08)),
    var(--panel);
}

.login-warning {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--soft);
  line-height: 1.5;
}

.discord-button {
  margin-top: 22px;
  width: 100%;
  background: linear-gradient(135deg, var(--discord), #7781ff);
  color: white;
}

.discord-button-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.login-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
}

.admin-role {
  display: inline-flex;
  margin-top: 4px;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.live-page-layout {
  display: grid;
  gap: 18px;
}

.players-page-layout {
  display: grid;
  gap: 18px;
}

.live-command-panel {
  background:
    linear-gradient(120deg, rgba(255, 151, 80, 0.1), rgba(116, 208, 163, 0.08)),
    var(--panel);
}

.players-command-panel {
  background:
    linear-gradient(120deg, rgba(255, 151, 80, 0.08), rgba(255, 255, 255, 0.03)),
    var(--panel);
}

.players-search-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.players-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.players-search-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.95rem;
}

.players-search-row input::placeholder {
  color: var(--muted);
}

.players-filters-accordion {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.players-filter-block {
  flex: 1 1 140px;
  min-width: 140px;
  max-width: 200px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: visible;
  position: relative;
  z-index: 1;
}

.players-filter-block:has(.custom-select.open) {
  z-index: 200;
}

.players-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
}

.players-filter-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.players-filter-chevron {
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.players-filter-block[data-expanded="true"] .players-filter-chevron {
  transform: rotate(180deg);
}

.players-filter-content {
  display: none;
  padding: 0 14px 12px;
}

.players-filter-block[data-expanded="true"] .players-filter-content {
  display: block;
}

.players-filter-content input,
.players-filter-content select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.88rem;
  box-sizing: border-box;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  padding: 0;
  border: none;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.custom-select-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.custom-select-arrow {
  font-size: 0.65rem;
  color: var(--muted);
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.custom-select.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  padding: 6px 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.custom-select.open .custom-select-dropdown {
  display: block;
}

.custom-select-option {
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.12s ease;
}

.custom-select-option:hover {
  background: rgba(255, 151, 80, 0.15);
}

.custom-select-option.selected {
  background: rgba(255, 151, 80, 0.2);
  color: var(--accent-soft);
}

.players-reset-btn {
  margin-top: 4px;
}

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

.players-toolbar-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.players-toolbar-copy span {
  color: var(--muted);
}

.players-pagination {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.players-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.directory-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 151, 80, 0.06), rgba(255, 255, 255, 0.02)),
    var(--panel-strong);
  color: var(--text);
  display: grid;
  gap: 14px;
  transition: transform 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
}

.directory-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 151, 80, 0.24);
  filter: brightness(1.04);
}

.directory-card-link {
  text-decoration: none;
  color: inherit;
  display: contents;
}

.directory-head-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.directory-badge {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.directory-badge-sanctions {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.directory-badge-veh-stored {
  background: rgba(116, 208, 163, 0.22);
  color: var(--mint-soft);
}

.directory-badge-veh-out {
  background: rgba(255, 151, 80, 0.18);
  color: var(--accent-soft);
}

.vehicles-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 12px;
}

.vehicles-filter-label {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.vehicles-filter-select {
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.vehicles-filter-select:focus {
  outline: 2px solid rgba(255, 151, 80, 0.45);
  outline-offset: 2px;
}

.directory-identifier {
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

.directory-wealth-negative {
  color: #f87171;
}

.directory-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.directory-btn {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.directory-btn-primary {
  background: rgba(255, 151, 80, 0.2);
  color: var(--accent);
}

.directory-btn-primary:hover {
  background: rgba(255, 151, 80, 0.35);
}

.directory-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.directory-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.directory-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.directory-head strong {
  display: block;
  font-size: 1.06rem;
}

.directory-head span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

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

.directory-grid span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--soft);
  font-size: 0.9rem;
}

.directory-grid strong {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.live-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.live-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 18px;
  align-items: start;
}

.live-ops-main,
.live-ops-side {
  display: grid;
  gap: 18px;
}

.live-map-shell {
  display: grid;
  gap: 14px;
}

.panel-soft-block {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.live-map-stage {
  position: relative;
  min-height: 520px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(rgba(7, 26, 34, 0.12), rgba(7, 26, 34, 0.18)),
    url("/maps/server-map.webp"),
    url("/fivem-map-backdrop.svg"),
    linear-gradient(180deg, rgba(15, 43, 52, 0.88), rgba(7, 22, 29, 0.96));
  background-position: center;
  background-size: cover;
}

.live-map-grid,
.live-map-canvas {
  position: absolute;
  inset: 0;
}

.live-map-grid {
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 12.5% 12.5%;
  mix-blend-mode: screen;
}

.live-map-grid::before,
.live-map-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.live-map-grid::before {
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255, 255, 255, 0.06) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(255, 255, 255, 0.06) 50%, transparent 50.2%);
}

.live-map-grid::after {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 26px;
}

.map-zone {
  position: absolute;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(6, 17, 23, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.map-zone-top {
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
}

.map-zone-bottom {
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
}

.map-zone-left {
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
}

.map-zone-right {
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
}

.live-map-canvas {
  isolation: isolate;
}

.live-map-marker {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  text-decoration: none;
  color: var(--text);
}

.live-map-pulse,
.live-map-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.live-map-pulse {
  background: currentColor;
  opacity: 0.2;
  animation: live-pulse 1.8s ease-out infinite;
}

.live-map-dot {
  display: grid;
  place-items: center;
  background: rgba(6, 17, 23, 0.96);
  border: 2px solid currentColor;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.live-map-marker:hover .live-map-dot {
  transform: scale(1.14);
}

.marker-vehicle .live-map-dot {
  transform: scale(1.12);
}

.tone-law {
  color: #72c5ff;
}

.tone-medical {
  color: #74d0a3;
}

.tone-service {
  color: #ffd166;
}

.tone-criminal {
  color: #ff7b70;
}

.tone-civil {
  color: #d4dde8;
}

.live-map-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.live-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-legend-item,
.live-map-focus {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.map-legend-item strong {
  font-size: 0.9rem;
}

.map-legend-item small,
.live-map-focus span {
  color: var(--muted);
}

.map-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.live-map-focus {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
}

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

.calibration-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calibration-grid span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.calibration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

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

.roster-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 151, 80, 0.06), rgba(116, 208, 163, 0.04)),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  display: grid;
  gap: 14px;
  transition: transform 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
}

.roster-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 151, 80, 0.24);
  filter: brightness(1.04);
}

.roster-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.roster-head strong {
  display: block;
  font-size: 1.08rem;
}

.roster-head span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-ok {
  color: var(--mint-soft);
  background: rgba(116, 208, 163, 0.09);
  border-color: rgba(116, 208, 163, 0.22);
}

.status-warn {
  color: var(--accent-soft);
  background: rgba(255, 151, 80, 0.09);
  border-color: rgba(255, 151, 80, 0.24);
}

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

.roster-grid span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--soft);
  font-size: 0.9rem;
}

.roster-grid strong {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

@media (max-width: 1360px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid,
  .detail-grid-wide,
  .detail-grid-split,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-command-grid,
  .live-ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-map-foot {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1100px) {
  .topbar,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .results-list {
    max-height: none;
  }

  .live-ops-grid {
    grid-template-columns: 1fr;
  }

  .live-map-stage {
    min-height: 420px;
  }
}

@media (max-width: 720px) {
  .app-shell,
  .login-shell {
    width: min(100% - 18px, 1600px);
    margin: 10px auto 18px;
  }

  .brand-block,
  .db-card,
  .admin-card,
  .panel,
  .player-banner,
  .metric-card,
  .login-card {
    padding: 18px;
    border-radius: 20px;
  }

  .search-row,
  .metrics-grid,
  .detail-grid,
  .detail-grid-wide,
  .detail-grid-split,
  .dashboard-grid,
  .filters-grid,
  .live-summary-grid,
  .permissions-grid,
  .live-preview-grid,
  .signal-grid,
  .live-command-grid,
  .roster-grid,
  .priority-ribbon,
  .directory-grid,
  .live-map-foot,
  .calibration-grid {
    grid-template-columns: 1fr;
  }

  .search-form button {
    min-height: 54px;
  }

  .player-banner,
  .results-header,
  .section-head,
  .subsection-head,
  .vehicle-head,
  .admin-card,
  .stack-item,
  .search-actions,
  .role-actions {
    align-items: start;
    flex-direction: column;
  }

  .stack-side {
    max-width: none;
    flex: 1 1 auto;
    width: 100%;
    text-align: left;
  }

  .audit-feed-time {
    white-space: normal;
  }

  .hero-tags,
  .hero-right,
  .quick-actions {
    justify-content: flex-start;
    align-items: flex-start;
  }

  .live-map-stage {
    min-height: 340px;
  }

  .info-list div,
  .vehicle-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@keyframes live-pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.3;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.changelog-page.dashboard-single {
  width: 100%;
  max-width: none;
}

.changelog-panel {
  width: 100%;
}

.changelog-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.changelog-filters-title h2 {
  margin: 4px 0 0;
}

.changelog-page .changelog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  flex: 1 1 520px;
  justify-content: flex-end;
}

.changelog-page .changelog-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.changelog-page .changelog-toolbar input,
.changelog-page .changelog-toolbar select {
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.changelog-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--soft);
  font-size: 0.92rem;
}

.changelog-meta code {
  color: var(--accent-soft);
}

.changelog-error {
  color: var(--danger);
}

.changelog-table .changelog-path {
  word-break: break-all;
  white-space: normal;
}

.changelog-badge {
  display: inline-flex;
  min-width: 1.5rem;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.changelog-badge-M,
.changelog-badge-A {
  background: rgba(116, 208, 163, 0.18);
  color: var(--mint);
}

.changelog-badge-D {
  background: rgba(255, 123, 112, 0.18);
  color: var(--danger);
}

.changelog-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  min-height: 62vh;
  width: 100%;
}

.changelog-sidebar {
  padding: 14px;
  border-radius: 14px;
  max-height: 72vh;
  overflow: auto;
}

.changelog-explorer-pane {
  min-width: 0;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
}

.changelog-table-wrap {
  max-height: calc(72vh - 90px);
  overflow: auto;
}

.changelog-explorer-pane .data-table {
  width: 100%;
  table-layout: auto;
}

.changelog-explorer-pane .data-table th:nth-child(1),
.changelog-explorer-pane .data-table td:nth-child(1) {
  min-width: 220px;
}

.changelog-explorer-pane .data-table th:nth-child(2),
.changelog-explorer-pane .data-table td:nth-child(2) {
  min-width: 160px;
  white-space: nowrap;
}

.changelog-tree {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.changelog-tree-item {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--soft);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}

.changelog-tree-item:hover,
.changelog-tree-item.active {
  background: rgba(255, 151, 80, 0.14);
  color: var(--text);
}

.changelog-address-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
}

.breadcrumb-link {
  border: 0;
  background: transparent;
  color: var(--accent-soft);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.breadcrumb-sep,
.breadcrumb-current {
  color: var(--muted);
}

.explorer-table .changelog-row-folder {
  cursor: pointer;
}

.explorer-table .changelog-row-folder:hover {
  background: rgba(255, 255, 255, 0.04);
}

.explorer-icon {
  margin-right: 6px;
}

.changelog-dates-view {
  display: grid;
  gap: 14px;
}

.changelog-date-group {
  padding: 12px;
  border-radius: 14px;
}

.changelog-date-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.changelog-delete-btn {
  font-size: 0.82rem;
  padding: 6px 10px;
}

.changelog-view-panel.is-hidden {
  display: none !important;
}

.changelog-history-view {
  width: 100%;
  min-height: 50vh;
  padding: 4px 0;
}

.changelog-history-help {
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.55;
  font-size: 0.92rem;
}

.changelog-history-toolbar {
  margin-bottom: 14px;
}

.changelog-history-list {
  display: grid;
  gap: 12px;
  width: 100%;
}

.changelog-history-scope {
  color: var(--accent-soft);
  margin: 0 0 14px;
}

.changelog-history-files {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--soft);
  font-size: 0.88rem;
}

.changelog-history-empty {
  color: var(--muted);
  padding: 24px;
  text-align: left;
  line-height: 1.6;
}

.changelog-history-card {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.changelog-history-card.is-manual {
  border-color: rgba(255, 151, 80, 0.35);
  background: rgba(255, 151, 80, 0.08);
}

.changelog-history-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.changelog-history-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-soft);
}

.changelog-history-card h3 {
  margin: 0 0 8px;
}

.changelog-history-author,
.changelog-history-folders {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0 0;
}

.changelog-history-detail {
  padding: 16px;
  margin-top: 12px;
}

.changelog-history-detail .table-wrap {
  max-height: 60vh;
  overflow: auto;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .changelog-workspace {
    grid-template-columns: 1fr;
  }

  .changelog-sidebar {
    max-height: 240px;
  }
}
