.btn-compact {
  padding: 7px 10px;
  font-size: 10px;
}

.chip-user {
  border-color: rgba(24, 74, 145, 0.35);
  background: rgba(24, 74, 145, 0.16);
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 12px;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 16, 30, 0.48);
  backdrop-filter: blur(7px);
}

.access-card {
  width: min(620px, 95vw);
  border: 1px solid rgba(24, 74, 145, 0.2);
  box-shadow: 0 28px 54px rgba(7, 16, 30, 0.38);
}

.access-logo {
  width: min(290px, 70vw);
  margin-bottom: 8px;
}

.access-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.access-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.access-field input,
.access-field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  color: var(--text);
  background: #ffffff;
}

.access-field input:focus,
.access-field select:focus {
  outline: none;
  border-color: rgba(24, 74, 145, 0.52);
  box-shadow: 0 0 0 3px rgba(24, 74, 145, 0.15);
}

.access-error {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
  border: 1px solid rgba(175, 32, 48, 0.35);
  background: var(--danger-soft);
  border-radius: 10px;
  padding: 8px 10px;
}

.access-note {
  margin: 10px 0 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.app-locked .layout,
.app-locked .topbar {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

html[data-theme="dark"] {
  --bg: #0f1726;
  --bg-2: #0b1220;
  --panel: #131f33;
  --line: #27344a;
  --text: #eaf2ff;
  --muted: #9fb0c8;
  --brand: #ff3a4c;
  --brand-strong: #e01d30;
  --brand-soft: rgba(255, 58, 76, 0.16);
  --accent: #6aa8ff;
  --accent-soft: rgba(106, 168, 255, 0.2);
  --ok: #66d39a;
  --ok-soft: rgba(102, 211, 154, 0.15);
  --danger: #ff7890;
  --danger-soft: rgba(255, 120, 144, 0.16);
  --shadow: 0 18px 45px rgba(2, 6, 12, 0.42);
  --shadow-soft: 0 10px 26px rgba(2, 6, 12, 0.33);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 8% -8%, rgba(255, 58, 76, 0.2), transparent 34%),
    radial-gradient(circle at 90% 12%, rgba(106, 168, 255, 0.22), transparent 38%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-2) 100%);
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .app-button,
html[data-theme="dark"] .procedure-button,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .decision-option,
html[data-theme="dark"] .history-list li,
html[data-theme="dark"] .access-field input,
html[data-theme="dark"] .access-field select,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-danger {
  background: rgba(19, 31, 51, 0.95);
  border-color: rgba(106, 168, 255, 0.22);
  color: var(--text);
}

html[data-theme="dark"] .progress-track {
  background: rgba(159, 176, 200, 0.2);
}

html[data-theme="dark"] .chip {
  border-color: rgba(106, 168, 255, 0.3);
  background: rgba(106, 168, 255, 0.12);
  color: var(--accent);
}

html[data-theme="dark"] .chip-accent {
  border-color: rgba(255, 58, 76, 0.32);
  background: rgba(255, 58, 76, 0.14);
  color: #ff9eab;
}

@media (max-width: 760px) {
  .btn-compact,
  .chip-user {
    width: 100%;
  }

  .access-gate {
    padding: 14px;
  }
}
