:root {
  --bg: #0a0b09;
  --surface: #15160f;
  --surface-2: #1f1f16;
  --border: #38352a;
  --gold: #c9b06a;
  --gold-bright: #e3cd83;
  --gold-dim: #6f6340;
  --text: #ece8db;
  --muted: #8f8b7b;
  --correct: #74b446;
  --correct-bg: #1b2d12;
  --wrong: #cf5a3e;
  --wrong-bg: #331a12;
  --radius: 14px;
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 50% -5%, #1a1b12 0%, #0a0b09 55%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 620px; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)) 16px;
  min-height: 100vh;
}
#app.app-wide { max-width: 1120px; }
.loading { text-align: center; color: var(--muted); padding-top: 40vh; }

/* ===== Шапка/бренд ===== */
.brand-logo {
  display: block;
  width: 132px; height: 132px;
  margin: 6px auto 2px;
  filter: drop-shadow(0 0 18px rgba(201, 176, 106, 0.25));
}
.app-title {
  text-align: center;
  font-size: 1.4rem; font-weight: 800;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold-bright);
  margin: 6px 0 2px;
  text-shadow: 0 0 14px rgba(201, 176, 106, 0.2);
}
.app-sub {
  text-align: center; color: var(--muted);
  font-size: 0.82rem; letter-spacing: 1.5px;
  margin: 0 0 4px; text-transform: uppercase;
}
.app-sub::after {
  content: ""; display: block;
  width: 64px; height: 2px; margin: 14px auto 18px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-label {
  text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 0.78rem; color: var(--muted);
  margin: 26px 4px 10px;
}

/* ===== Кнопки ===== */
.btn {
  display: block; width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem; font-family: inherit; text-align: left;
  padding: 16px 18px; margin-bottom: 12px;
  border-radius: var(--radius); cursor: pointer;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:active { transform: scale(0.99); }
.btn:hover { border-color: var(--gold-dim); }

.btn-primary {
  background: linear-gradient(180deg, #1d1e13, #141509);
  border-color: var(--gold-dim);
  font-weight: 700;
}
.btn-primary .btn-title { color: var(--gold-bright); }
.btn-primary:hover { border-color: var(--gold); }

.btn-mistakes {
  background: linear-gradient(180deg, #2c1d16, #1d130d);
  border-color: #7a4f3f; font-weight: 700;
}
.btn-mistakes .btn-title { color: #e0936e; }
.btn-mistakes .count { color: #e0936e; }

.btn-danger {
  border-color: var(--wrong);
  color: var(--wrong);
  margin-top: 18px;
}
.btn-danger .btn-title { justify-content: center; }

.btn:disabled { opacity: 0.45; cursor: default; }
.btn:disabled:hover { border-color: var(--border); }

.btn-title { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.btn-desc { color: var(--muted); font-size: 0.85rem; margin-top: 3px; }
.btn .count { color: var(--gold); font-size: 0.9rem; font-weight: 700; }
.btn-row { display: flex; justify-content: space-between; align-items: center; }
.hub-btn {
  display: block; min-height: 78px;
}
.hub-btn > div { min-width: 0; }

/* ===== Шапка режима ===== */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.back-btn {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 8px 14px; font-size: 0.95rem; cursor: pointer;
}
.back-btn:hover { border-color: var(--gold-dim); }
.topbar h2 { font-size: 1.05rem; margin: 0; font-weight: 700; flex: 1; color: var(--gold-bright); letter-spacing: 1px; }
.progress { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }

.progress-bar { height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); transition: width .2s; }

/* ===== Вопрос ===== */
.theme-tag {
  display: inline-block; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--gold);
  border: 1px solid var(--gold-dim); border-radius: 20px;
  padding: 3px 10px; margin-bottom: 14px;
}
.question { font-size: 1.2rem; font-weight: 600; margin: 0 0 20px; line-height: 1.35; }

.option {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  text-align: left; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 1rem;
  padding: 14px 16px; margin-bottom: 11px; border-radius: 12px;
  cursor: pointer; transition: background .1s, border-color .1s;
}
.option:hover:not(:disabled) { border-color: var(--gold-dim); }
.option:disabled { cursor: default; }
.option .letter {
  flex: 0 0 26px; height: 26px; border-radius: 7px;
  background: var(--surface-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.option.correct { border-color: var(--correct); background: var(--correct-bg); }
.option.correct .letter { background: var(--correct); color: #0d130a; }
.option.wrong { border-color: var(--wrong); background: var(--wrong-bg); }
.option.wrong .letter { background: var(--wrong); color: #fff; }
.option.selected { border-color: var(--gold); background: var(--surface-2); }

.feedback { font-weight: 700; margin: 16px 0 8px; }
.feedback.ok { color: var(--correct); }
.feedback.no { color: var(--wrong); }

.explain {
  background: var(--surface-2); border-left: 3px solid var(--gold);
  border-radius: 8px; padding: 12px 14px; margin: 8px 0 16px;
  font-size: 0.97rem; line-height: 1.5; color: var(--text);
}
.explain b { color: var(--gold-bright); }

.review-expl {
  margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.88rem; line-height: 1.45;
}

/* ===== Карточки ===== */
.flashcard {
  border: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, #1c1d12, #131309);
  border-radius: 18px;
  padding: 28px 22px;
  min-height: 230px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; cursor: pointer; margin-bottom: 4px;
  animation: cardIn .18s ease;
}
.flashcard.back { cursor: default; align-items: stretch; justify-content: flex-start; text-align: left; }
@keyframes cardIn { from { opacity: .35; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.card-q { font-size: 1.35rem; font-weight: 700; line-height: 1.35; margin: 14px 0; }
.card-hint { color: var(--muted); font-size: 0.85rem; margin-top: 10px; }
.card-label { text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.74rem; color: var(--gold); margin-bottom: 10px; }
.card-a { font-size: 1.22rem; font-weight: 600; line-height: 1.4; margin: 0 0 14px; color: var(--gold-bright); }
.card-no { border-color: var(--wrong); }
.card-no .btn-title { color: var(--wrong); justify-content: center; }
.card-yes { border-color: var(--correct); }
.card-yes .btn-title { color: var(--correct); justify-content: center; }

/* ===== Навигация по вопросам ===== */
.nav-row { display: flex; gap: 10px; margin-top: 16px; }
.nav-row .nav-btn { flex: 1; margin-bottom: 0; }
.nav-row .nav-btn .btn-title { justify-content: center; }
.nav-btn:disabled { opacity: 0.4; cursor: default; }
.nav-btn:disabled:hover { border-color: var(--border); }

/* ===== Результаты ===== */
.result-score {
  text-align: center; font-size: 3.4rem; font-weight: 800;
  color: var(--gold-bright); margin: 10px 0 0;
  text-shadow: 0 0 18px rgba(201, 176, 106, 0.25);
}
.result-pct { text-align: center; color: var(--muted); margin-bottom: 6px; }
.result-line { text-align: center; font-size: 1.1rem; margin-bottom: 24px; }

.review-item {
  border: 1px solid var(--border); border-left: 3px solid var(--wrong);
  background: var(--surface); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 12px; font-size: 0.95rem;
}
.review-item.ok { border-left-color: var(--correct); }
.review-q { font-weight: 600; margin-bottom: 8px; }
.review-a { color: var(--muted); font-size: 0.9rem; }
.review-a.your-wrong { color: var(--wrong); }
.review-a.correct-ans { color: var(--correct); }

/* ===== Меню тем: прогресс ===== */
.hint { color: var(--muted); font-size: 0.82rem; margin: 0 4px 16px; line-height: 1.4; }
.theme-item .mini-bar { height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.theme-item .mini-bar > span { display: block; height: 100%; background: var(--gold); transition: width .2s; }
.theme-item.done { border-color: var(--correct); background: linear-gradient(180deg, #1b2d12, #16240f); }
.theme-item.done .mini-bar > span { background: var(--correct); }
.theme-item.done .count { color: var(--correct); }
.badge { font-size: 0.95rem; }

.reset-btn { margin-top: 22px; border-style: dashed; }
.reset-btn .btn-title { color: var(--muted); justify-content: center; }

.mode-desc {
  background: var(--surface-2); border-left: 3px solid var(--gold);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 20px;
  font-size: 0.92rem; line-height: 1.5; color: var(--text);
}

.spacer { height: 14px; }
.footnote { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 28px; }
.link-btn { color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.profile-note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px;
  color: var(--muted); font-size: 0.78rem; margin-top: 28px; text-align: center;
}
.profile-note b { color: var(--text); }
.profile-actions { display: inline-flex; gap: 8px; white-space: nowrap; }
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--gold-dim); border-radius: 20px;
  color: var(--gold-bright); padding: 3px 9px; font-weight: 700;
}
.shift-badge {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); border-radius: 20px;
  color: var(--muted); padding: 3px 9px; font-weight: 600;
}

/* ===== Поля ввода / экран входа ===== */
.text-input {
  display: block; width: 100%;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 15px 16px; font-size: 1.05rem; font-family: inherit;
  margin-bottom: 12px;
}
.text-input:focus { outline: none; border-color: var(--gold); }
.text-input { -webkit-user-select: text; user-select: text; touch-action: manipulation; }

.timer { color: var(--gold); font-weight: 700; }
.timer.low { color: var(--wrong); }
.gate-hint { color: var(--muted); font-size: 0.9rem; margin: 4px 4px 16px; line-height: 1.4; }
.gate-err { color: var(--wrong); font-size: 0.88rem; min-height: 18px; margin: 10px 4px 12px; }
.field-label {
  display: block; color: var(--gold-bright); font-size: 0.78rem;
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  margin: 0 4px 7px;
}
.role-label { margin-top: 18px; margin-bottom: 10px; }
.role-list { display: grid; gap: 10px; }
.role-btn {
  display: grid; grid-template-columns: 30px minmax(0, 1fr);
  align-items: center; gap: 10px; min-height: 56px; margin: 0;
  border-color: var(--gold-dim); background: linear-gradient(180deg, #1d1e13, #141509);
  color: var(--gold-bright); font-weight: 700;
}
.role-btn:hover { border-color: var(--gold); }
.role-icon {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; color: var(--gold);
  font-size: 1.05rem;
}

.access-panel {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0 10px;
}
.access-panel p { margin: 0 0 20px; color: var(--text); }
.admin-bootstrap-anchor {
  display: flex;
  justify-content: center;
  margin-top: 22px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.admin-bootstrap-link {
  border: 0;
  background: transparent;
  color: #6f6f6f;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  cursor: pointer;
}
.admin-bootstrap-link:hover { color: #8a8a8a; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 5, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}
.modal-backdrop[hidden] { display: none; }
.modal-panel {
  width: min(100%, 420px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px;
}
.modal-title {
  color: var(--gold-bright);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.telegram-link { text-decoration: none; text-align: center; }
.telegram-link .btn-title { justify-content: center; }
.access-code-input { letter-spacing: 2px; }
.login-panel { padding-bottom: 18px; }
.login-registration {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 16px;
}
.telegram-login-link {
  color: var(--gold);
  text-underline-offset: 3px;
}
.login-access-note { margin-top: 18px; }
.access-request-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}
.access-request-fields {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}
.access-request-fields b { color: var(--text); }
.access-request-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.access-request-actions .btn {
  width: auto;
  min-width: 130px;
  margin: 0;
  text-align: center;
}

.armory-owner-selector,
.person-role-admin {
  display: flex;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}
.armory-owner-selector { max-width: 560px; }
.armory-owner-selector > span,
.armory-owner-selector select { width: 100%; }
.owner-context {
  margin: 8px 0 14px;
  color: var(--muted);
}
.person-role-admin label { flex: 1; }

/* ===== Рабочие разделы ===== */
.tool-form {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px; margin-bottom: 18px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compact-command { margin: 2px 0 0; }
.compact-command .btn-title { justify-content: center; }
.inline-form {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: start; gap: 10px;
}
.inline-form .text-input, .inline-form .btn { margin-bottom: 0; }
.inline-form .btn { width: auto; white-space: nowrap; }
.text-area { min-height: 110px; resize: vertical; }
.data-list { display: grid; gap: 10px; }
.data-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); padding: 12px 12px 12px 14px;
}
.data-item-main { flex: 1; min-width: 0; }
.data-item-title { color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
.data-item-meta { color: var(--muted); font-size: 0.82rem; margin-top: 3px; }
.data-item-note { color: var(--text); font-size: 0.88rem; margin-top: 7px; overflow-wrap: anywhere; }
.compact-action {
  flex: 0 0 auto;
  min-height: 44px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--muted);
  font-family: inherit; font-size: 0.85rem; cursor: pointer;
  padding: 8px 12px;
}
.danger-action:hover { border-color: var(--wrong); color: var(--wrong); }
.empty-state {
  border: 1px dashed var(--border); border-radius: 10px;
  color: var(--muted); padding: 24px 16px; text-align: center;
}
.access-note {
  border: 1px solid var(--gold-dim); border-left: 3px solid var(--gold);
  border-radius: 8px; background: var(--surface);
  color: var(--muted); padding: 11px 13px; margin-bottom: 18px;
  font-size: 0.88rem;
}
.task-check {
  display: flex; align-items: flex-start; gap: 11px;
  flex: 1; min-width: 0; cursor: pointer;
}
.task-check input { margin-top: 4px; accent-color: var(--gold); }
.task-check span { overflow-wrap: anywhere; }
.task-item.is-done .task-check span { color: var(--muted); text-decoration: line-through; }
.task-card {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); padding: 13px 14px;
}
.task-card.is-done { opacity: 0.7; }
.task-card.is-done .task-check span { color: var(--muted); text-decoration: line-through; }
.task-card.is-open { border-color: #7a2d2a; background: linear-gradient(180deg, #211412, #17110f); }
.task-card.is-active { border-color: #7a2d2a; background: linear-gradient(180deg, #211412, #17110f); }
.task-card.is-overdue { border-color: #a6502a; background: linear-gradient(180deg, #2a1710, #1a110d); box-shadow: 0 0 0 1px rgba(207, 90, 62, 0.18); }
.task-card.is-completed { border-color: var(--correct); background: linear-gradient(180deg, #152015, #101610); }
.task-card-head { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.task-card-main { min-width: 0; flex: 1; }
.task-card-time { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.task-actions { display: flex; gap: 7px; margin-left: auto; }
.task-meta {
  display: flex; flex-wrap: wrap; gap: 5px 14px;
  color: var(--muted); font-size: 0.78rem; margin-top: 9px;
}
.task-meta b { color: var(--gold-bright); }
.task-status {
  flex: 0 0 auto;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.task-status.is-active { color: #f26d5d; border-color: #7a2d2a; background: rgba(122, 45, 42, 0.12); }
.task-status.is-overdue { color: #ff9c63; border-color: #a6502a; background: rgba(166, 80, 42, 0.14); }
.task-status.is-completed { color: var(--correct); border-color: var(--correct); background: rgba(116, 180, 70, 0.12); }
.task-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.task-actions-row .btn {
  width: auto;
  min-width: min(100%, 240px);
  margin-bottom: 0;
  text-align: center;
}
.segmented-control {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.segmented {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.segmented.is-active {
  color: var(--gold-bright);
  border-color: var(--gold-dim);
  background: #211d12;
}
.tasks-view-switch { margin-bottom: 14px; }
.tasks-footer {
  position: sticky;
  bottom: 0;
  padding-top: 14px;
  background: linear-gradient(180deg, rgba(10, 11, 9, 0), rgba(10, 11, 9, 0.9) 28%, rgba(10, 11, 9, 1));
  margin-top: 16px;
}
.tasks-create-button { margin-bottom: 0; text-align: center; }
.tasks-footer .trip-mode-button {
  margin: 10px 0 0;
  text-align: center;
}
.task-import-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.task-import-note { color: var(--muted); font-size: 0.85rem; }
.task-text-area { min-height: 82px; }
.task-date-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.task-date-input-row .text-input {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.task-calendar-toggle {
  width: auto;
  min-height: 44px;
  margin: 0;
}
.task-date-picker {
  position: relative;
  z-index: 5;
  min-width: 286px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.task-date-picker-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  text-align: center;
}
.task-date-nav {
  width: 38px;
  height: 38px;
}
.task-date-picker-head b {
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.task-date-weekdays,
.task-date-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.task-date-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}
.task-date-days button {
  min-width: 0;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}
.task-date-days button:hover,
.task-date-days button:focus-visible {
  border-color: var(--gold-dim);
  outline: none;
}
.task-date-days button.is-today {
  border-color: var(--correct);
  color: var(--correct);
}
.task-date-days button.is-selected {
  background: var(--gold-dim);
  color: #fff;
}
.command-row { display: flex; gap: 10px; }
.command-row .btn { flex: 1; }
.trip-list {
  display: grid;
  gap: 12px;
}
.trip-card {
  border: 1px solid #6b5329;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #17150f;
  padding: 14px;
}
.trip-card.is-completed {
  border-color: var(--correct);
  background: #101a11;
  box-shadow: 0 0 0 1px rgba(116, 180, 70, 0.12);
}
.trip-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.trip-composition {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}
.trip-composition b { color: var(--gold-bright); }
.trip-progress {
  --trip-line: #4d4d49;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding-top: 2px;
}
.trip-progress::before {
  content: "";
  position: absolute;
  left: 16.66%;
  right: 16.66%;
  top: 8px;
  height: 2px;
  background: var(--trip-line);
}
.trip-progress-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  text-align: center;
}
.trip-progress-dot {
  width: 14px;
  height: 14px;
  border: 2px solid #686963;
  border-radius: 50%;
  background: #17150f;
}
.trip-progress-step.is-done .trip-progress-dot {
  border-color: var(--correct);
  background: var(--correct);
}
.trip-progress-step.is-current .trip-progress-dot {
  box-shadow: 0 0 0 3px rgba(197, 159, 69, 0.2);
}
.trip-progress-label {
  width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.74rem;
  line-height: 1.25;
}
.trip-progress-step.is-done .trip-progress-label { color: var(--correct); }
.trip-progress-completed::before { background: var(--correct); }
.trip-progress-completed .trip-progress-step .trip-progress-dot {
  border-color: var(--correct);
  background: var(--correct);
}
.trip-progress-completed .trip-progress-step .trip-progress-label { color: var(--correct); }
.trip-progress-marker {
  position: absolute;
  z-index: 2;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  left: 16.66%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(197, 159, 69, 0.18);
  transform: translateX(-50%);
}
.trip-progress-departed .trip-progress-marker { left: 33.33%; }
.trip-progress-arrived .trip-progress-marker { left: 50%; }
.trip-progress-returning .trip-progress-marker { left: 66.66%; }
.trip-progress-completed .trip-progress-marker {
  left: 83.33%;
  background: var(--correct);
}
.trip-history {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}
.trip-history summary {
  color: var(--gold);
  cursor: pointer;
}
.trip-history div { margin-top: 6px; }
.trip-create-command {
  position: static;
  padding: 0;
  margin: 0 0 14px;
  background: none;
}
.trip-create-form { margin-bottom: 16px; }
.trip-member-picker { margin-top: 2px; }
.trip-selected-members {
  display: grid;
  gap: 7px;
  margin: 10px 0 14px;
}
.trip-selected-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
}
.trip-selected-member .compact-action {
  width: auto;
  margin: 0;
}
.trip-period-grid {
  display: grid;
  gap: 10px;
}
.trip-period-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.55fr);
  gap: 10px;
}
.personnel-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}
.personnel-command-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.personnel-command-bar .btn {
  flex: 1 1 210px;
  width: auto;
  min-height: 44px;
  margin: 0;
  text-align: center;
}
.personnel-search { display: block; }
.personnel-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.personnel-filters label { display: block; }
.person-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px;
}
.person-card + .person-card { margin-top: 10px; }
.person-card-main { min-width: 0; }
.person-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.person-action-btn, .person-save-btn, .person-cancel-btn {
  flex: 1 1 180px;
  width: auto;
  min-width: 0;
  min-height: 44px;
  margin-bottom: 0;
  text-align: center;
  white-space: normal;
}
.person-edit-panel {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.person-edit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.person-role-admin {
  flex-wrap: wrap;
}
.person-role-admin label {
  flex: 1 1 240px;
  min-width: 0;
}
.person-role-admin .compact-action {
  flex: 1 1 180px;
  white-space: normal;
}
.shift-supervisor-list,
.shift-location-list {
  display: grid;
  gap: 12px;
}
.shift-supervisor-card,
.shift-location-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}
.shift-supervisor-head,
.shift-location-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.shift-supervisor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.shift-supervisor-actions .compact-action {
  width: auto;
  margin: 0;
}
.shift-supervisor-editor {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.shift-supervisor-editor .text-input {
  width: 100%;
  max-width: none;
  margin-bottom: 12px;
}
.shift-location-day {
  margin-bottom: 24px;
}
.shift-location-day h3 {
  margin: 0 0 12px;
  color: var(--gold-bright);
  font-size: 1rem;
}
.shift-location-status {
  flex: 0 0 auto;
  color: var(--gold-bright);
  font-weight: 700;
  text-align: right;
}
.shift-location-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.compact-select {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 10px; font-family: inherit; font-size: 0.9rem;
}
.compact-select:focus { outline: none; border-color: var(--gold); }
.import-panel {
  border: 1px dashed var(--gold-dim); border-radius: 10px;
  padding: 14px; margin-bottom: 20px;
}
.armory-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.armory-select {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.armory-card-list {
  display: grid;
  gap: 12px;
}
.armory-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px;
}
.armory-card-best {
  border-color: var(--correct);
  background: linear-gradient(180deg, #182218, #101610);
}
.armory-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.armory-card-head > div { min-width: 0; }
.armory-badge {
  flex: 0 0 auto;
  color: var(--correct);
  border: 1px solid var(--correct);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.armory-details {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--text);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.armory-details b { color: var(--gold-bright); }
.armory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.armory-actions .compact-action.is-active {
  color: var(--gold-bright);
  border-color: var(--gold-dim);
}
.armory-form { border-bottom: 0; }
.armory-average-box {
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--gold-bright);
  padding: 12px 14px;
  margin: 12px 0;
  font-weight: 600;
}
.schedule-footer { margin-top: 22px; }
.schedule-management-list { margin: 18px 0 24px; }
.schedule-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 15px;
}
.schedule-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.schedule-card-head > div { min-width: 0; }
.schedule-detail {
  color: var(--text);
  font-size: 0.88rem;
  margin-top: 9px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.schedule-detail b { color: var(--gold-bright); }
.schedule-card-actions { margin-top: 14px; }
.schedule-command {
  padding: 11px 13px;
  margin: 0;
  font-size: 0.88rem;
}
.schedule-command .btn-title { justify-content: center; }
.schedule-form { border-bottom: 0; }
.schedule-topbar {
  gap: 12px;
}
.schedule-add-button {
  width: auto;
  margin: 0 0 0 auto;
  padding: 10px 14px;
}
.schedule-period-toolbar {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
.schedule-periods {
  width: 100%;
}
.schedule-periods .segmented {
  flex: 1 1 0;
}
.schedule-range-nav {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}
.icon-command {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--gold-bright);
  font: inherit;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}
.schedule-range-title {
  color: var(--text);
  text-align: center;
  font-weight: 700;
}
.schedule-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(124px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.schedule-day-card {
  position: relative;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.schedule-day-card:hover,
.schedule-day-card:focus-visible {
  border-color: var(--gold);
  outline: none;
}
.schedule-day-date {
  padding-right: 32px;
  color: var(--gold-bright);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
}
.schedule-day-card-week .schedule-day-date { font-size: 0.7rem; }
.schedule-day-card.is-today {
  border-color: var(--correct);
  box-shadow: inset 0 0 0 1px rgba(116, 180, 70, 0.25);
}
.schedule-day-count {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.75rem;
}
.schedule-day-event-dot {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--gold-dim);
}
.schedule-dot-shooting,
.schedule-dot-theory { background: #c79f45; }
.schedule-dot-shift { background: #5d9c7d; }
.schedule-dot-night_shift { background: #7188b8; }
.schedule-dot-recovery { background: #9270a0; }
.schedule-month-weekdays,
.schedule-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.schedule-month-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}
.schedule-month-grid .schedule-day-card {
  min-height: 92px;
  padding: 10px;
}
.schedule-month-grid .schedule-day-date {
  font-size: 0.92rem;
}
.schedule-month-blank {
  min-height: 92px;
  border: 1px dashed rgba(56, 53, 42, 0.45);
  border-radius: 8px;
}
.schedule-import {
  margin-top: 20px;
}
.schedule-import summary {
  color: var(--gold-bright);
  cursor: pointer;
  font-weight: 700;
}
.schedule-all-day {
  margin: 16px 0;
}
.schedule-all-day h3 {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-size: 0.96rem;
}
.schedule-all-day-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.schedule-today > h3 {
  margin: 18px 0 8px;
  color: var(--gold-bright);
  font-size: 1rem;
}
.schedule-timeline-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: var(--timeline-height);
  margin-top: 18px;
}
.schedule-time-labels,
.schedule-time-canvas {
  position: relative;
  height: var(--timeline-height);
}
.schedule-time-labels {
  border-right: 1px solid var(--border);
}
.schedule-time-labels span {
  position: absolute;
  right: 10px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.74rem;
  text-align: right;
  white-space: nowrap;
}
.schedule-time-canvas {
  min-width: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 83px,
    var(--border) 83px,
    var(--border) 84px
  );
}
.schedule-event {
  min-width: 0;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}
.schedule-timeline-event {
  position: absolute;
  top: var(--event-top);
  left: calc(var(--event-left) + 5px);
  width: calc(var(--event-width) - 10px);
  height: var(--event-height);
  min-width: 0;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 7px 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  z-index: 2;
}
.schedule-timeline-event:hover,
.schedule-timeline-event:focus-visible {
  border-color: var(--gold);
  outline: none;
  z-index: 3;
}
.schedule-timeline-event b,
.schedule-timeline-event span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-timeline-event b {
  font-size: 0.78rem;
  line-height: 1.2;
}
.schedule-timeline-event span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}
.schedule-current-time {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--correct);
  pointer-events: none;
  z-index: 4;
}
.schedule-current-time::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--correct);
}
.schedule-event-shooting,
.schedule-event-theory {
  border-left-color: #c79f45;
  background: #1b1912;
}
.schedule-event-shift {
  border-left-color: #5d9c7d;
  background: #101a16;
}
.schedule-event-night_shift {
  border-left-color: #7188b8;
  background: #111622;
}
.schedule-event-recovery {
  border-left-color: #9270a0;
  background: #19131d;
}
.schedule-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.schedule-card-actions .schedule-command {
  width: auto;
  margin: 0;
}
.schedule-event-modal-panel { max-width: 620px; }
.schedule-modal-close {
  margin: 12px 0 0;
  text-align: center;
}
.file-command { margin: 12px 0 8px; text-align: center; cursor: pointer; }
.file-command .btn-title { justify-content: center; }
.file-command input { display: none; }
.template-link {
  display: inline-block; color: var(--gold); font-size: 0.86rem;
  text-decoration: underline; text-underline-offset: 3px;
}
.success-text { color: var(--correct); }
.shooting-tabs { margin-bottom: 16px; }
.shooting-tabs .segmented { min-width: 0; }
.shooting-start-command { margin-bottom: 18px; }
.shooting-session-list,
.shooting-day-list,
.shooting-callsign-list,
.shooting-exercise-list,
.shooting-comment-list {
  display: grid;
  gap: 10px;
}
.shooting-card,
.shooting-day-card,
.shooting-callsign-card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.shooting-card:hover,
.shooting-day-card:hover,
.shooting-callsign-card:hover { border-color: var(--gold-dim); }
.shooting-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 82px;
  padding: 14px;
}
.shooting-card-main,
.shooting-card-side {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.shooting-card-main b { overflow-wrap: anywhere; }
.shooting-card-main span,
.shooting-card-side span:last-child {
  color: var(--muted);
  font-size: 0.8rem;
}
.shooting-card-side {
  justify-items: end;
  text-align: right;
  flex: 0 0 auto;
}
.shooting-status {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.shooting-status.is-progress { border-color: var(--gold-dim); color: var(--gold-bright); }
.shooting-status.is-completed { border-color: #4e765c; color: #8dc79d; }
.shooting-day-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  align-content: center;
  padding: 18px;
}
.shooting-day-card b { color: var(--gold-bright); font-size: 1rem; }
.shooting-day-card span { color: var(--muted); font-size: 0.82rem; }
.shooting-callsign-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 13px 15px;
}
.shooting-callsign-card > span:first-child { display: grid; gap: 2px; }
.shooting-callsign-card small,
.shooting-callsign-card > span:last-child { color: var(--muted); font-size: 0.78rem; }
.shooting-owner-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 0.84rem;
}
.shooting-owner-line b { color: var(--text); font-size: 1rem; }
.shooting-message {
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  padding: 11px 13px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}
.shooting-read-value {
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px 14px;
  margin-bottom: 12px;
}
.shooting-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.shooting-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 13px 2px;
  margin: 4px 0 12px;
}
.shooting-total span,
.shooting-date-line { color: var(--muted); font-size: 0.82rem; }
.shooting-total b { color: var(--gold-bright); text-align: right; }
.shooting-date-line { margin-bottom: 14px; }
.shooting-exercise {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}
.shooting-exercise .text-input { margin-bottom: 9px; }
.shooting-exercise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.shooting-inline-actions,
.shooting-exercise-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shooting-exercise-summary {
  justify-content: space-between;
  color: var(--muted);
  margin-top: 7px;
  font-size: 0.84rem;
}
.shooting-exercise-add { margin-top: 10px; }
.shooting-comment {
  border-left: 3px solid var(--gold-dim);
  border-radius: 4px;
  background: var(--surface);
  padding: 13px 14px;
}
.shooting-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.76rem;
}
.shooting-comment-head b { color: var(--text); }
.shooting-comment-body {
  margin: 9px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ===== Имущество отдела ===== */
.inventory-loading { padding-top: 22vh; }
.inventory-rooms,
.inventory-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.inventory-rooms .segmented,
.inventory-tabs .segmented {
  flex: 0 0 auto;
  white-space: nowrap;
  border-radius: 8px;
}
.inventory-tabs {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.inventory-message {
  border-left: 3px solid var(--correct);
  border-radius: 4px;
  background: var(--correct-bg);
  color: var(--text);
  padding: 11px 13px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}
.inventory-message.is-error {
  border-left-color: var(--wrong);
  background: var(--wrong-bg);
}
.inventory-responsibles {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  margin-bottom: 16px;
}
.inventory-section-head,
.inventory-issue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.inventory-section-head h3 {
  margin: 0 0 9px;
  color: var(--gold-bright);
  font-size: 0.92rem;
}
.inventory-person-list,
.inventory-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inventory-person {
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  color: var(--gold-bright);
  padding: 4px 9px;
  font-size: 0.8rem;
  font-weight: 700;
}
.inventory-muted { color: var(--muted); font-size: 0.84rem; }
.inventory-grid {
  display: grid;
  gap: 10px;
}
.inventory-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.inventory-card.is-expanded { border-color: var(--gold-dim); }
.inventory-card-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding: 9px 14px;
}
.inventory-card-actions .compact-action {
  width: auto;
  margin: 0;
}
.inventory-card-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 14px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.inventory-card-summary:disabled { cursor: default; }
.inventory-card-summary > span:first-child,
.inventory-issue-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.inventory-card-summary b,
.inventory-issue-head b {
  overflow-wrap: anywhere;
}
.inventory-card-summary small,
.inventory-issue-head small {
  color: var(--muted);
  font-size: 0.8rem;
}
.inventory-chevron {
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--gold-bright);
  font-weight: 700;
}
.inventory-card-detail {
  border-top: 1px solid var(--border);
  padding: 13px 14px;
}
.inventory-detail-label {
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.inventory-unit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border-top: 1px solid rgba(56, 53, 42, 0.72);
  padding: 8px 0;
}
.inventory-unit:first-of-type { border-top: 0; }
.inventory-unit > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.inventory-unit small {
  color: var(--muted);
  font-size: 0.72rem;
}
.inventory-unit-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.inventory-unit-actions .compact-action {
  width: auto;
  margin: 0;
}
.inventory-issue-card,
.inventory-consumable-card {
  padding: 14px;
}
.inventory-status,
.inventory-category {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  color: var(--gold-bright);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.inventory-category { margin-bottom: 2px; }
.inventory-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.inventory-facts div {
  min-width: 0;
  border-top: 1px solid var(--border);
  padding-top: 9px;
}
.inventory-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
}
.inventory-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
.inventory-return { width: 100%; color: var(--gold-bright); }
.inventory-note {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.inventory-add {
  margin-bottom: 14px;
  text-align: center;
}
.inventory-add .btn-title { justify-content: center; }
.inventory-modal-panel {
  max-height: min(720px, calc(100vh - 32px));
  overflow-y: auto;
}
.inventory-choice-list {
  display: grid;
  gap: 8px;
  max-height: 48vh;
  overflow-y: auto;
  margin-bottom: 12px;
}
.inventory-choice {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  cursor: pointer;
}
.inventory-choice input { accent-color: var(--gold); }
.inventory-choice span {
  display: grid;
  gap: 2px;
}
.inventory-choice small {
  color: var(--muted);
  font-size: 0.76rem;
}
.inventory-read-field {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.inventory-read-field span {
  color: var(--muted);
  font-size: 0.76rem;
}
.inventory-duplicate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 11px;
  margin: 12px 0;
}
.inventory-duplicate-actions[hidden] { display: none; }
.inventory-duplicate-actions > div {
  flex: 1 0 100%;
  color: var(--gold-bright);
  font-size: 0.84rem;
}
.inventory-duplicate-actions .compact-action {
  width: auto;
  margin: 0;
}

@media (max-width: 430px) {
  .form-grid, .inline-form { grid-template-columns: 1fr; }
  .inline-form .btn { width: 100%; }
  .command-row { flex-direction: column; }
  .access-request-actions { flex-direction: column; }
  .access-request-actions .btn { width: 100%; }
  .trip-card-head,
  .trip-selected-member {
    align-items: stretch;
    flex-direction: column;
  }
  .trip-period-grid { grid-template-columns: 1fr; }
  .trip-period-row { grid-template-columns: 1fr; }
  .task-date-input-row { grid-template-columns: 1fr; }
  .task-calendar-toggle { width: 100%; }
  .task-date-picker { min-width: 0; }
  .trip-selected-member .compact-action { width: 100%; }
  .trip-progress { gap: 3px; }
  .trip-progress-label { font-size: 0.68rem; }
  .personnel-filters { grid-template-columns: 1fr; }
  .personnel-command-bar,
  .person-role-admin,
  .shift-supervisor-head,
  .shift-location-head,
  .shift-supervisor-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .personnel-command-bar .btn,
  .person-role-admin .compact-action,
  .shift-supervisor-actions .compact-action {
    flex: none;
    width: 100%;
  }
  .person-role-admin label { flex: none; }
  .shift-location-status { text-align: left; }
  .armory-toolbar { grid-template-columns: 1fr; }
  .armory-card-head { flex-direction: column; }
  .armory-actions { flex-direction: column; }
  .armory-actions .compact-action { width: 100%; }
  .compact-select, .person-action-btn, .person-save-btn, .person-cancel-btn { width: 100%; max-width: none; }
  .person-edit-actions { flex-direction: column; }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topbar .progress { width: 100%; padding-left: 2px; }
  .schedule-card-head { flex-direction: column; }
  .schedule-add-button { width: 100%; margin-left: 0; }
  .schedule-week-grid { grid-template-columns: repeat(7, 112px); }
  .schedule-day-card { min-height: 116px; }
  .schedule-month-weekdays,
  .schedule-month-grid { gap: 4px; }
  .schedule-month-grid .schedule-day-card,
  .schedule-month-blank { min-height: 72px; }
  .schedule-month-grid .schedule-day-card { padding: 7px; }
  .schedule-month-grid .schedule-day-count {
    top: 5px;
    right: 5px;
    min-width: 20px;
    height: 20px;
  }
  .schedule-timeline-grid { grid-template-columns: 58px minmax(0, 1fr); }
  .schedule-time-labels span { right: 7px; font-size: 0.68rem; }
  .schedule-card-actions { flex-direction: column; }
  .schedule-card-actions .schedule-command { width: 100%; }
  .shooting-tabs { flex-direction: column; }
  .shooting-tabs .segmented { width: 100%; }
  .shooting-card,
  .shooting-callsign-card,
  .shooting-comment-head,
  .shooting-total {
    align-items: stretch;
    flex-direction: column;
  }
  .shooting-card-side {
    justify-items: start;
    text-align: left;
  }
  .shooting-exercise-grid { grid-template-columns: 1fr; }
  .shooting-inline-actions { flex-direction: column; }
  .shooting-inline-actions .compact-action { width: 100%; }
  .shooting-total b { text-align: left; }
  .inventory-section-head,
  .inventory-issue-head {
    align-items: stretch;
    flex-direction: column;
  }
  .inventory-inline-actions .compact-action { flex: 1; }
  .inventory-unit {
    align-items: stretch;
    flex-direction: column;
  }
  .inventory-unit-actions {
    justify-content: stretch;
  }
  .inventory-unit-actions .compact-action {
    flex: 1;
  }
  .inventory-card-actions .compact-action { width: 100%; }
  .inventory-facts { grid-template-columns: 1fr; }
}

/* ===== Дашборд «Админ» ===== */
.admin-card {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); padding: 14px 16px; margin-bottom: 12px;
}
.adm-head { display: flex; justify-content: space-between; align-items: baseline; }
.adm-name { font-weight: 700; color: var(--gold-bright); font-size: 1.05rem; }
.adm-pct { font-weight: 800; color: var(--gold); font-size: 1.15rem; }
.adm-sub { color: var(--muted); font-size: 0.82rem; margin: 4px 0 10px; }
.adm-themes { display: flex; flex-direction: column; gap: 5px; }
.adm-theme { display: flex; justify-content: space-between; font-size: 0.88rem; border-top: 1px solid var(--border); padding-top: 5px; }
.adm-theme > span:first-child { color: var(--text); }
.adm-th-num { color: var(--muted); white-space: nowrap; margin-left: 10px; }
