/* Світла тема — ДЕФОЛТ (premium light) */
:root {
  --bg: #f4f6fa;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #e2e6ee;
  --text: #16202e;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --success: #16a34a;
  --warning: #d97706;
  --radius: 12px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05);
}

/* Темна тема — вмикається атрибутом data-theme="dark" на <html> (JS, js/theme.js) */
:root[data-theme="dark"] {
  --bg: #0f1420;
  --bg-elevated: #161d2e;
  --bg-card: #1a2236;
  --border: #263047;
  --text: #e7ecf7;
  --text-muted: #8b96ad;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --success: #22c55e;
  --warning: #f59e0b;
  --shadow-card: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  width: 100%;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }

/* ---------- Login ---------- */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px 24px;
  text-align: center;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.login-logo i, .login-logo svg { width: 40px; height: 40px; color: var(--accent); }
.login-title { font-size: 22px; margin: 0 0 4px; }
.login-sub { color: var(--text-muted); margin: 0 0 24px; font-size: 14px; }
.login-form { display: flex; flex-direction: column; gap: 6px; text-align: left; }

.field-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

.field-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 15px;
  width: 100%;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-block { width: 100%; margin-top: 18px; }

/* ---------- App shell ---------- */

#shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  display: none;
}

.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  font-size: 17px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-icon i, .btn-icon svg { width: 18px; height: 18px; }
.btn-icon:hover { color: var(--text); border-color: var(--accent); }

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.btn-logout i, .btn-logout svg { width: 18px; height: 18px; }
.btn-logout:hover { color: var(--text); border-color: var(--accent); }

.content {
  flex: 1;
  padding: 16px;
  padding-bottom: 88px; /* простір під bottom-nav на мобільному */
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.loading, .error-box {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
}

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

/* ---------- Bottom nav (mobile) ---------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 10px;
}

.bottom-nav-link i,
.bottom-nav-link svg { width: 22px; height: 22px; }

.bottom-nav-link.active { color: var(--accent); }

/* ---------- Sidebar (desktop) ---------- */

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo i, .sidebar-logo svg { width: 22px; height: 22px; color: var(--accent); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.sidebar-link i, .sidebar-link svg { width: 20px; height: 20px; }

.sidebar-link:hover { background: var(--bg-card); color: var(--text); }
.sidebar-link.active { background: rgba(59, 130, 246, 0.15); color: var(--accent); }

.hide-mobile { display: none; }

@media (min-width: 768px) {
  .sidebar {
    display: block;
    width: 220px;
    flex-shrink: 0;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
  }
  .bottom-nav { display: none; }
  .content { padding-bottom: 24px; }
  .hide-mobile { display: inline; }
}

/* ---------- Dashboard ---------- */

.dashboard { display: flex; flex-direction: column; gap: 20px; }

.btn-hero {
  align-self: flex-start;
  padding: 14px 22px;
  font-size: 16px;
}

.btn-hero i, .btn-hero svg { width: 20px; height: 20px; }

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

@media (min-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
}

.kpi-value-small { font-size: 14px; font-weight: 600; line-height: 1.4; }

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
}

.empty-placeholder {
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px 0;
  text-align: center;
}

.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.data-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

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

.debt-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 14px;
}

.debt-amount { font-weight: 600; }

/* ---------- Stub pages ---------- */

.stub-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 16px;
  gap: 8px;
  color: var(--text-muted);
}

.stub-icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: 8px; }
.stub-page h2 { color: var(--text); margin: 0; }

/* ---------- Entity cards (vehicles/drivers with photo) ---------- */

.list-page { display: flex; flex-direction: column; gap: 16px; }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.entity-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.photo-upload-label {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  display: block;
}

.photo-thumb, .photo-slot {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  color: var(--text-muted);
}

.photo-fallback i, .photo-fallback svg { width: 26px; height: 26px; }

.photo-edit-hint {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

.photo-edit-hint i, .photo-edit-hint svg { width: 12px; height: 12px; color: #fff; }

.entity-info { min-width: 0; flex: 1; }

.entity-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

/* ---------- Footer ---------- */
/* Звичайний блок у кінці контенту (НЕ fixed) — не перекриває bottom-nav на мобільному */

.app-footer {
  margin-top: 28px;
  padding: 16px 0 4px;
  text-align: center;
}

.footer-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-link:hover { color: var(--accent); opacity: 0.85; }

/* ---------- List pages toolbar (Авто/Водії) ---------- */

.list-page-toolbar { display: flex; justify-content: flex-end; }

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
}

.modal-head h3 { margin: 0; font-size: 16px; }

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.modal-close i, .modal-close svg { width: 18px; height: 18px; }
.modal-close:hover { color: var(--text); background: var(--bg); }

.modal-body { padding: 16px; }

.modal-form { display: flex; flex-direction: column; gap: 4px; }

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 12px;
}

@media (min-width: 480px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

.new-company-fields {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

textarea.field-input { resize: vertical; font-family: inherit; }

/* ---------- Shift form ---------- */

.shift-page { display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin: 0 auto; }

.mode-toggle {
  display: flex;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}

.mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 7px;
  font-size: 14px;
  cursor: pointer;
}

.mode-btn i, .mode-btn svg { width: 18px; height: 18px; }
.mode-btn.active { background: var(--accent); color: #fff; }

.step-indicator {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.step-dot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.step-dot.active .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-dot.done .step-num { background: var(--success); border-color: var(--success); color: #fff; }

.step-label {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.2;
}

.step-dot.active .step-label { color: var(--text); font-weight: 600; }

@media (max-width: 480px) {
  .step-label { display: none; }
  .step-dot.active .step-label { display: block; }
}

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

.entity-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 4px;
  padding: 8px;
  background: var(--bg);
  border-radius: 8px;
}

.debt-badge {
  display: inline-block;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.preview-panel { background: var(--bg-card); }

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

@media (min-width: 640px) {
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
}

.preview-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.preview-item span { color: var(--text-muted); }
.preview-item b { font-size: 14px; }

.due-result { margin: 8px 0 4px; }

.due-line {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  padding: 6px 0;
}

.calc-note-preview { font-size: 12px; }

.debt-result { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }

.debt-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.debt-msg i, .debt-msg svg { width: 16px; height: 16px; flex-shrink: 0; }

.debt-msg-neutral { background: var(--bg); color: var(--text-muted); }
.debt-msg-danger { background: var(--danger-bg); color: var(--danger); }
.debt-msg-success { background: rgba(22, 163, 74, 0.1); color: var(--success); }
.debt-msg-warning { background: rgba(217, 119, 6, 0.1); color: var(--warning); }

.btn-save { margin-top: 4px; }

.result-panel { text-align: left; }

.result-head { display: flex; align-items: center; gap: 10px; }

.result-icon { width: 28px; height: 28px; color: var(--success); }

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-icon-wide {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
}

.btn-icon-wide i, .btn-icon-wide svg { width: 18px; height: 18px; }
.btn-icon-wide:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Confirm modal / danger button ---------- */

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

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger:hover { opacity: 0.9; }

/* ---------- Entity card actions (edit/delete/activate) ---------- */

.entity-card { align-items: flex-start; position: relative; }

.entity-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.entity-icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.entity-icon-btn i, .entity-icon-btn svg { width: 15px; height: 15px; }
.entity-icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.entity-icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

.inactive-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  margin-top: 4px;
}

.entity-card.is-inactive { opacity: 0.6; }

/* ---------- Maintenance status colors ---------- */

.mnt-ok { color: var(--success); }
.mnt-soon { color: var(--warning); }
.mnt-urgent { color: #f97316; }
.mnt-overdue { color: var(--danger); }
.mnt-unknown { color: var(--text-muted); }

.kpi-value-link { text-decoration: none; color: var(--text); display: block; }
.kpi-value-link:hover { text-decoration: underline; }

.mnt-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.mnt-dot.mnt-ok { background: var(--success); }
.mnt-dot.mnt-soon { background: var(--warning); }
.mnt-dot.mnt-urgent { background: #f97316; }
.mnt-dot.mnt-overdue { background: var(--danger); }
.mnt-dot.mnt-unknown { background: var(--text-muted); }

/* ---------- Vehicle maintenance panel (expand on card) ---------- */

.vehicle-card-wrap { display: flex; flex-direction: column; gap: 0; }

.btn-expand-mnt {
  align-self: flex-start;
  margin-top: 10px;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.mnt-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mnt-type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  gap: 8px;
}

.mnt-type-name { font-weight: 600; }
.mnt-type-meta { font-size: 12px; color: var(--text-muted); }

.mnt-type-actions { display: flex; gap: 4px; flex-shrink: 0; }

.mnt-history-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.mnt-history-item { font-size: 12px; color: var(--text-muted); padding: 4px 8px; }

/* ---------- Repairs page ---------- */

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

.repair-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.repair-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.repair-card-title { font-weight: 600; font-size: 15px; }
.reimbursed-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

/* ---------- Periods page ---------- */

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

.period-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  gap: 8px;
}

/* ---------- Stats page ---------- */

.stats-page { display: flex; flex-direction: column; gap: 16px; }

.stats-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.stats-filters .field-input { width: auto; min-width: 160px; flex: 1; }

.btn-fullscreen {
  margin-left: auto;
}

.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .stats-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .stats-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

.stats-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.stats-kpi-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.stats-kpi-value { font-size: 20px; font-weight: 700; }
.stats-kpi-note { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.stats-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.stats-delta i, .stats-delta svg { width: 13px; height: 13px; }
.stats-delta.up { color: var(--success); }
.stats-delta.down { color: var(--danger); }
.stats-delta.flat { color: var(--text-muted); }

.chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
  height: 280px;
  position: relative;
}

/* Повноекранний режим статистики */
.stats-page:fullscreen {
  background: var(--bg);
  padding: 24px;
  overflow-y: auto;
}

.stats-page:fullscreen .stats-kpi-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stats-page:fullscreen .stats-kpi-value { font-size: 34px; }
.stats-page:fullscreen .stats-kpi-card { padding: 24px; }
.stats-page:fullscreen .chart-wrap { height: 420px; }
