:root {
  --bg: #f9fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #d72638;
  --brand-2: #b91c2c;
  --brand-dark: #2b0b11;
  --accent: #f04b5a;
  --slot-free-light: #e6f4ff;
  --slot-reserved-light: #ffd6db;
  --slot-inprogress-light: #ffe8b5;
  --slot-done-light: #ddf7e3;
  --slot-blocked-light: #f1f5f9;
  --slot-departed-light: #dbeafe;
  --slot-free: var(--slot-free-light);
  --slot-reserved: var(--slot-reserved-light);
  --slot-inprogress: var(--slot-inprogress-light);
  --slot-done: var(--slot-done-light);
  --slot-departed: color-mix(in srgb, var(--slot-done-light) 78%, var(--slot-departed-light) 22%);
  --slot-blocked: var(--slot-blocked-light);
  --slot-outline: #e5e7eb;
  --shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
  --input-bg: #f7f8fa;
  --input-border: #e2e7ef;
  --page-bg-blur: 0px;
  --status-free-text: color-mix(in srgb, var(--slot-free-light) 34%, #0f172a);
  --status-free-border: color-mix(in srgb, var(--slot-free-light) 70%, #0f172a);
  --status-reserved-text: color-mix(in srgb, var(--slot-reserved-light) 35%, #0f172a);
  --status-reserved-border: color-mix(in srgb, var(--slot-reserved-light) 72%, #0f172a);
  --status-inprogress-text: color-mix(in srgb, var(--slot-inprogress-light) 38%, #0f172a);
  --status-inprogress-border: color-mix(in srgb, var(--slot-inprogress-light) 74%, #0f172a);
  --status-done-text: color-mix(in srgb, var(--slot-done-light) 35%, #0f172a);
  --status-done-border: color-mix(in srgb, var(--slot-done-light) 72%, #0f172a);
  --status-blocked-text: color-mix(in srgb, var(--slot-blocked-light) 35%, #0f172a);
  --status-blocked-border: color-mix(in srgb, var(--slot-blocked-light) 72%, #0f172a);
}

body[data-theme="dark"] {
  --bg: #0b0f14;
  --panel: #141822;
  --ink: #f3f4f6;
  --muted: #9aa3b2;
  --line: #262b36;
  --brand: #ff4b55;
  --brand-2: #ff2e3d;
  --brand-dark: #0b0f14;
  --accent: #ff8a8a;
  --slot-free-dark: #102132;
  --slot-reserved-dark: #3a151b;
  --slot-inprogress-dark: #3a2c12;
  --slot-done-dark: #123024;
  --slot-departed-dark: #122847;
  --slot-blocked-dark: #0e131b;
  --slot-free: var(--slot-free-dark);
  --slot-reserved: var(--slot-reserved-dark);
  --slot-inprogress: var(--slot-inprogress-dark);
  --slot-done: var(--slot-done-dark);
  --slot-departed: color-mix(in srgb, var(--slot-done-dark) 62%, var(--slot-departed-dark) 38%);
  --slot-blocked: var(--slot-blocked-dark);
  --slot-outline: #2c3240;
  --shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
  --input-bg: #0e1218;
  --input-border: #2a3140;
  --status-free-text: color-mix(in srgb, var(--slot-free-light) 86%, #e2e8f0);
  --status-free-border: color-mix(in srgb, var(--slot-free-light) 70%, #e2e8f0);
  --status-reserved-text: color-mix(in srgb, var(--slot-reserved-light) 88%, #e2e8f0);
  --status-reserved-border: color-mix(in srgb, var(--slot-reserved-light) 72%, #e2e8f0);
  --status-inprogress-text: color-mix(in srgb, var(--slot-inprogress-light) 90%, #e2e8f0);
  --status-inprogress-border: color-mix(in srgb, var(--slot-inprogress-light) 74%, #e2e8f0);
  --status-done-text: color-mix(in srgb, var(--slot-done-light) 88%, #e2e8f0);
  --status-done-border: color-mix(in srgb, var(--slot-done-light) 72%, #e2e8f0);
  --status-blocked-text: color-mix(in srgb, var(--slot-blocked-light) 88%, #e2e8f0);
  --status-blocked-border: color-mix(in srgb, var(--slot-blocked-light) 72%, #e2e8f0);
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  background-color: var(--page-bg-color, var(--bg));
  color: var(--ink);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: var(--page-bg-color, var(--bg));
  background-image: var(--page-bg-image, none);
  background-size: var(--page-bg-size, auto);
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(var(--page-bg-blur, 0px));
  transform: scale(1.03);
  transform-origin: center;
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}


.sidebar {
  background: var(--brand-dark);
  color: #f8fafc;
  padding: 14px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  letter-spacing: 0.4px;
}

.sidebar span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.nav-section {
  display: grid;
  gap: 8px;
}

.sidebar .nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateX(2px);
}

.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  border-color: rgba(255, 255, 255, 0.95);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}
.main {
  padding: 14px 32px 140px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pending-approvals-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, #ef4444 28%, var(--line) 72%);
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.72));
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255,255,255,.65);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.pending-approvals-widget:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,.7);
}

.pending-approvals-widget__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.14);
}

.pending-approvals-widget.is-alert {
  border-color: rgba(124, 58, 237, 0.55);
  background: linear-gradient(135deg, rgba(245, 243, 255, 0.96), rgba(255, 247, 237, 0.94));
  box-shadow:
    0 10px 26px rgba(124, 58, 237, 0.16),
    inset 0 1px 0 rgba(255,255,255,.65);
  animation: pendingPulseWidget 1.15s ease-in-out infinite;
}

.pending-approvals-widget.is-alert .pending-approvals-widget__dot {
  background: #7c3aed;
  animation: pendingPulseDot 1.15s ease-in-out infinite;
}

.pending-approvals-widget.is-alert .pending-approvals-widget__count {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(124, 58, 237, 0.35);
  color: #6d28d9;
  animation: pendingPulseBadge 1.15s ease-in-out infinite;
}

@keyframes pendingPulseDot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.16); }
  50% { transform: scale(1.18); box-shadow: 0 0 0 12px rgba(124, 58, 237, 0.08); }
}

@keyframes pendingPulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes pendingPulseWidget {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 10px 26px rgba(124, 58, 237, 0.14),
      inset 0 1px 0 rgba(255,255,255,.65);
  }
  50% {
    transform: translateY(-1px) scale(1.02);
    box-shadow:
      0 16px 34px rgba(124, 58, 237, 0.22),
      0 0 0 5px rgba(124, 58, 237, 0.10),
      inset 0 1px 0 rgba(255,255,255,.75);
  }
}

.pending-approvals-widget__label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.pending-approvals-widget__count {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.24);
  color: #b91c1c;
  font-weight: 800;
  font-size: 13px;
}

.pending-approvals-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(124, 58, 237, 0.42);
  background:
    linear-gradient(135deg, rgba(237, 233, 254, 0.96), rgba(255, 247, 237, 0.92));
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.12);
  animation: pendingPulseWidget 1.4s ease-in-out infinite;
}

.pending-approvals-banner__icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #7c3aed;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.16);
}

.pending-approvals-banner__content {
  flex: 1 1 auto;
  min-width: 0;
}

.pending-approvals-banner__title {
  font-weight: 800;
  color: #5b21b6;
  margin-bottom: 2px;
}

.pending-approvals-banner__text {
  font-size: 13px;
  line-height: 1.45;
  color: #6b21a8;
}

.pending-approvals-banner__cta {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .pending-approvals-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .pending-approvals-banner__cta {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

.btn-primary,
.btn-secondary,
.btn-icon-only,
.filters button {
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 9px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary,
.filters button {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 12px 20px rgba(215, 38, 56, 0.2);
}

.btn-primary:hover,
.filters button:hover {
  background: var(--brand-2);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--panel);
  color: var(--brand);
  border-color: rgba(215, 38, 56, 0.35);
}

.btn-secondary:hover {
  background: rgba(215, 38, 56, 0.08);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.10);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.30);
  box-shadow: none;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.16);
}

.btn-success {
  background: rgba(34, 197, 94, 0.10);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.30);
  box-shadow: none;
}

.btn-success:hover {
  background: rgba(34, 197, 94, 0.16);
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border-color: var(--line);
  color: var(--brand);
}

.btn-today {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand-2);
  font-weight: 600;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.field span {
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 11px;
}

.field input,
.field select {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink);
}

input,
select,
textarea {
  font-family: inherit;
  color: var(--ink);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #7da2e3;
  box-shadow: 0 0 0 3px rgba(30, 78, 168, 0.12);
}

.layout {
  padding-bottom: 26px;
}

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

.group-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
}

.group-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(215, 38, 56, 0.08);
  color: var(--ink);
}

.group-header__main {
  display: grid;
  gap: 4px;
}

.group-header__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9f1239;
  background: linear-gradient(180deg, rgba(255,241,242,.95), rgba(255,228,230,.92));
  border: 1px solid rgba(244,114,182,.28);
}

.group-header__title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
}

.group-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.group-header__meta .slot-mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid rgba(148,163,184,.28);
  color: #334155;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92));
  box-shadow: 0 8px 18px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.8);
}

.group-header__meta .slot-mini-badge.is-neutral {
  color: #475569;
  border-color: rgba(148,163,184,.35);
  background: linear-gradient(180deg, rgba(248,250,252,.98), rgba(241,245,249,.92));
}

.group-header__meta .slot-mini-badge.is-info {
  color: #0c4a6e;
  border-color: rgba(56,189,248,.42);
  background: linear-gradient(180deg, rgba(240,249,255,.98), rgba(224,242,254,.92));
  box-shadow: 0 10px 22px rgba(14,116,144,.14), inset 0 1px 0 rgba(255,255,255,.86);
}

.group-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  padding: 16px;
}

.group-side {
  display: grid;
  gap: 8px;
  align-content: start;
}

.line-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.line-header,
.line-summary {
  height: 32px;
}

.line-item {
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
}

.timeline {
  overflow-x: auto;
  overflow-anchor: none;
  padding-bottom: 8px;
}

.timeline-header,
.timeline-row,
.summary-row {
  display: grid;
  gap: 8px;
}

.hour-cell {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  background: rgba(215, 38, 56, 0.08);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 0;
}

.slot-wrapper {
  width: 100%;
}

.slot-wrapper.slot-span {
  min-width: 0;
}

.slot-wrapper.slot-span .slot {
  height: 100%;
}

.slot {
  min-height: 72px;
  border-radius: 12px;
  border: 1px solid var(--slot-outline);
  padding: 9px;
  background: var(--slot-free);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.slot > div:first-child {
  min-width: 0;
}

.slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.slot.free { background: var(--slot-free); }
.slot.reserved { background: var(--slot-reserved); }
.slot.in_progress { background: var(--slot-inprogress); }
.slot.done { background: var(--slot-done); }
.slot.departed { background: var(--slot-departed); }
.slot.blocked {
  background:
    repeating-linear-gradient(
      -45deg,
      color-mix(in srgb, var(--slot-blocked) 88%, #ffffff 12%) 0 8px,
      color-mix(in srgb, var(--slot-blocked) 76%, #ffffff 24%) 8px 16px
    );
  color: var(--muted);
}

.slot.reserved.slot-provisional,
.slot.in_progress.slot-provisional,
.slot.waiting.slot-provisional,
.slot.slot-provisional {
  --slot-glow-color: rgba(168, 85, 247, 0.55);
  background:
    linear-gradient(135deg, #f5d0fe 0%, #ddd6fe 42%, #fde68a 100%) !important;
  color: #5b21b6 !important;
  border: 2px solid #7c3aed !important;
  animation: slotProvisionalPulse 1.15s ease-in-out infinite;
}

.slot.slot-provisional .slot-provisional-content {
  opacity: 1;
}

.slot.slot-provisional .slot-label--primary {
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #4c1d95;
}

body[data-theme="dark"] .slot.reserved.slot-provisional,
body[data-theme="dark"] .slot.in_progress.slot-provisional,
body[data-theme="dark"] .slot.waiting.slot-provisional,
body[data-theme="dark"] .slot.slot-provisional {
  background:
    linear-gradient(135deg, #4c1d95 0%, #6d28d9 48%, #a16207 100%) !important;
  color: #f5d0fe !important;
  border-color: #c084fc !important;
}

.slot.slot-pending-change {
  --slot-glow-color: rgba(6, 182, 212, 0.55);
  animation: slotPendingChangeCyanPulse 1.15s ease-in-out infinite;
  border: 2px solid #0891b2 !important;
  box-shadow:
    0 10px 22px rgba(8, 145, 178, 0.22),
    0 0 0 2px rgba(103, 232, 249, 0.35),
    0 0 18px rgba(6, 182, 212, 0.32);
}

@keyframes slotPendingChangePulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 10px 22px rgba(234, 88, 12, 0.22),
      0 0 0 2px rgba(251, 146, 60, 0.35),
      0 0 18px rgba(249, 115, 22, 0.28);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
      0 18px 36px rgba(234, 88, 12, 0.40),
      0 0 0 5px rgba(253, 224, 71, 0.50),
      0 0 28px rgba(249, 115, 22, 0.55);
  }
}

@keyframes slotProvisionalPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 10px 22px rgba(124, 58, 237, 0.22),
      0 0 0 2px rgba(168, 85, 247, 0.35),
      0 0 18px rgba(168, 85, 247, 0.28);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
      0 18px 36px rgba(124, 58, 237, 0.38),
      0 0 0 5px rgba(250, 204, 21, 0.45),
      0 0 28px rgba(168, 85, 247, 0.55);
  }
}

.slot.blocked::after {
  content: "\1F512";
  position: absolute;
  top: 6px;
  right: 7px;
  font-size: 12px;
  line-height: 1;
  opacity: .82;
  pointer-events: none;
}

.slot.reserved,
.slot.in_progress,
.slot.done,
.slot.departed,
.slot.blocked {
  --slot-glow-color: rgba(148, 163, 184, 0.22);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset,
    0 0 24px var(--slot-glow-color);
}

.slot.reserved { --slot-glow-color: color-mix(in srgb, var(--slot-reserved-light) 78%, transparent); }
.slot.in_progress { --slot-glow-color: color-mix(in srgb, var(--slot-inprogress-light) 82%, transparent); }
.slot.done { --slot-glow-color: color-mix(in srgb, var(--slot-done-light) 82%, transparent); }
.slot.departed { --slot-glow-color: color-mix(in srgb, var(--slot-departed-light) 82%, transparent); }
.slot.blocked { --slot-glow-color: rgba(148, 163, 184, 0.22); }

.slot.occupied {
  background: #dbe4ff;
  color: #1e3a8a;
  border-color: #93a4e0;
  cursor: default;
  box-shadow: none;
}
.slot.occupied:hover {
  transform: none;
  box-shadow: none;
}
body[data-theme="dark"] .slot.occupied {
  background: #1e2a4a;
  color: #dbe4ff;
  border-color: #4c5f99;
}

.slot.reserved:hover,
.slot.in_progress:hover,
.slot.done:hover,
.slot.departed:hover,
.slot.blocked:hover {
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset,
    0 0 34px var(--slot-glow-color);
}

/* Delikatnie szersze kafelki tylko dla awizacji */
.slot.reserved,
.slot.in_progress,
.slot.done,
.slot.departed {
  width: calc(100% + 10px);
  margin-left: -5px;
  margin-right: -5px;
  padding-left: 12px;
  padding-right: 12px;
  position: relative;
  z-index: 1;
}

.slot-wrapper.slot-span .slot.reserved,
.slot-wrapper.slot-span .slot.in_progress,
.slot-wrapper.slot-span .slot.done,
.slot-wrapper.slot-span .slot.departed {
  width: calc(100% + 6px);
  margin-left: -3px;
  margin-right: -3px;
}

@media (max-width: 900px) {
  .slot.reserved,
  .slot.in_progress,
  .slot.done,
  .slot.departed {
    width: calc(100% + 6px);
    margin-left: -3px;
    margin-right: -3px;
  }
}

.slot-label {
  font-weight: 600;
  font-size: 11px;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.slot-label--primary {
  font-size: 12px;
}

.slot-meta {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.slot-client-name {
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
}

.slot.gps-prealert {
  box-shadow: inset 0 0 0 2px rgba(217, 119, 6, 0.55), 0 10px 18px rgba(15, 23, 42, 0.12);
}

.slot.slot-arrival-new {
  animation: slot-arrival-blink 1.05s ease-in-out infinite;
}

@keyframes slot-arrival-blink {
  0%, 100% { outline: 2px solid transparent; outline-offset: -3px; }
  50% { outline: 3px solid #16a34a; outline-offset: -3px; }
}

.slot.slot-plate-mismatch {
  box-shadow: inset 0 0 0 3px #dc2626;
  background-image: linear-gradient(180deg, rgba(254, 226, 226, 0.72), rgba(255, 255, 255, 0));
}

.slot-badge-gps {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(217, 119, 6, 0.35);
  background: rgba(255, 251, 235, 0.95);
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  margin-top: 3px;
}

body[data-theme="dark"] .slot.gps-prealert {
  box-shadow: inset 0 0 0 2px rgba(251, 191, 36, 0.45), 0 10px 18px rgba(15, 23, 42, 0.20);
}

body[data-theme="dark"] .slot.slot-plate-mismatch {
  box-shadow: inset 0 0 0 3px #f87171;
  background-image: linear-gradient(180deg, rgba(127, 29, 29, 0.45), rgba(15, 23, 42, 0));
}

body[data-theme="dark"] .slot-badge-gps {
  background: rgba(146, 64, 14, 0.22);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.slot-sla {
  margin-top: 4px;
}

.slot-sla-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid transparent;
  letter-spacing: .02em;
}

.slot-sla-pill.sla-ok {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.24);
}

.slot-sla-pill.sla-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.26);
}

.slot-sla-pill.sla-breach {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.24);
}

body[data-theme="dark"] .slot-sla-pill.sla-ok {
  background: rgba(16, 185, 129, 0.18);
  color: #86efac;
  border-color: rgba(16, 185, 129, 0.32);
}

body[data-theme="dark"] .slot-sla-pill.sla-warn {
  background: rgba(245, 158, 11, 0.20);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.34);
}

body[data-theme="dark"] .slot-sla-pill.sla-breach {
  background: rgba(239, 68, 68, 0.20);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.34);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background: transparent;
}

.status-pill.free {
  background: color-mix(in srgb, var(--slot-free-light) 78%, #ffffff 22%);
  color: var(--status-free-text);
  border-color: color-mix(in srgb, var(--slot-free-light) 62%, var(--status-free-border) 38%);
}

.status-pill.reserved {
  background: color-mix(in srgb, var(--slot-reserved-light) 78%, #ffffff 22%);
  color: var(--status-reserved-text);
  border-color: color-mix(in srgb, var(--slot-reserved-light) 62%, var(--status-reserved-border) 38%);
}

.status-pill.in_progress {
  background: color-mix(in srgb, var(--slot-inprogress-light) 78%, #ffffff 22%);
  color: var(--status-inprogress-text);
  border-color: color-mix(in srgb, var(--slot-inprogress-light) 62%, var(--status-inprogress-border) 38%);
}

.status-pill.done {
  background: color-mix(in srgb, var(--slot-done-light) 78%, #ffffff 22%);
  color: var(--status-done-text);
  border-color: color-mix(in srgb, var(--slot-done-light) 62%, var(--status-done-border) 38%);
}

.status-pill.departed {
  background: color-mix(in srgb, #dbeafe 86%, #ffffff 14%);
  color: #1e40af;
  border-color: color-mix(in srgb, #93c5fd 62%, #1d4ed8 38%);
}

.status-pill.blocked {
  background: color-mix(in srgb, var(--slot-blocked-light) 84%, #ffffff 16%);
  color: var(--status-blocked-text);
  border-color: color-mix(in srgb, var(--slot-blocked-light) 60%, var(--status-blocked-border) 40%);
}

.status-pill.neutral {
  color: var(--muted);
  border-color: var(--line);
}

.steps {
  display: flex;
  gap: 4px;
}

.step {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.6);
}

.step.done { background: #38bdf8; }
.step.warn { background: #fbbf24; }
.step.ok { background: #34d399; }
.step.out { background: #f87171; }

.slot-process-steps-text {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.slot-process-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-elevated) 76%, #ffffff 24%);
}

.slot-process-pill.is-done {
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.16);
}

body[data-theme="dark"] .slot-process-pill {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.45);
  color: #cbd5e1;
}

body[data-theme="dark"] .slot-process-pill.is-done {
  color: #86efac;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.22);
}

.summary-row {
  margin-top: 6px;
}

.summary-cell {
  background: var(--input-bg);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  font-size: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.legend-item .box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

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

.notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(215, 38, 56, 0.3);
  background: rgba(215, 38, 56, 0.08);
  color: var(--brand);
  font-size: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.table th {
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 11px;
  color: var(--muted);
  background: #f6f7fb;
  text-align: left;
}

.table tr:last-child td { border-bottom: none; }


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

.form-divider {
  padding: 10px 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.change-date {
  font-size: 12px;
  color: var(--muted);
}

.slot-summary {
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.time-now {
  height: 32px;
  padding: 0 12px;
}

.test-login {
  white-space: nowrap;
}

.date-input {
  display: none;
}
body[data-theme="dark"] .btn-secondary {
  background: #0f141c;
  border-color: var(--line);
  color: var(--ink);
}
body[data-theme="dark"] .btn-danger {
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fca5a5;
}
body[data-theme="dark"] .btn-danger:hover {
  background: rgba(127, 29, 29, 0.34);
}
body[data-theme="dark"] .btn-success {
  background: rgba(20, 83, 45, 0.24);
  border-color: rgba(74, 222, 128, 0.24);
  color: #bbf7d0;
}
body[data-theme="dark"] .btn-success:hover {
  background: rgba(20, 83, 45, 0.36);
}
body[data-theme="dark"] .approval-single-action.btn-success {
  background: linear-gradient(180deg, rgba(20,83,45,.34), rgba(20,83,45,.16));
  border-color: rgba(74, 222, 128, 0.32);
  color: #dcfce7;
}
body[data-theme="dark"] .approval-single-action.btn-success:hover {
  background: linear-gradient(180deg, rgba(20,83,45,.46), rgba(20,83,45,.24));
}
body[data-theme="dark"] .approval-single-action.btn-danger {
  background: linear-gradient(180deg, rgba(127,29,29,.34), rgba(127,29,29,.16));
  border-color: rgba(248, 113, 113, 0.30);
  color: #fee2e2;
}
body[data-theme="dark"] .approval-single-action.btn-danger:hover {
  background: linear-gradient(180deg, rgba(127,29,29,.46), rgba(127,29,29,.24));
}

.approval-single-action {
  min-width: 90px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.approval-single-action.btn-success {
  background: linear-gradient(180deg, rgba(34,197,94,.16), rgba(34,197,94,.08));
  border-color: rgba(34, 197, 94, 0.40);
  color: #166534;
  box-shadow: 0 6px 14px rgba(34, 197, 94, 0.08);
}

.approval-single-action.btn-success:hover {
  background: linear-gradient(180deg, rgba(34,197,94,.24), rgba(34,197,94,.12));
  border-color: rgba(34, 197, 94, 0.56);
  color: #14532d;
}

.approval-single-action.btn-danger {
  background: linear-gradient(180deg, rgba(239,68,68,.14), rgba(239,68,68,.07));
  border-color: rgba(239, 68, 68, 0.36);
  color: #b91c1c;
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.07);
}

.approval-single-action.btn-danger:hover {
  background: linear-gradient(180deg, rgba(239,68,68,.22), rgba(239,68,68,.10));
  border-color: rgba(239, 68, 68, 0.50);
  color: #991b1b;
}

#slot-detail-approve,
#slot-detail-reject {
  min-width: 170px;
  font-weight: 700;
  min-height: 40px;
  border-radius: 14px;
  padding: 9px 16px;
  letter-spacing: 0.01em;
}

#slot-detail-approve {
  background: linear-gradient(180deg, rgba(34,197,94,.16), rgba(34,197,94,.08));
  border-color: rgba(34, 197, 94, 0.38);
  color: #166534;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.10);
}

#slot-detail-approve:hover {
  background: linear-gradient(180deg, rgba(34,197,94,.22), rgba(34,197,94,.12));
  border-color: rgba(34, 197, 94, 0.52);
  color: #14532d;
}

#slot-detail-reject {
  background: linear-gradient(180deg, rgba(239,68,68,.14), rgba(239,68,68,.07));
  border-color: rgba(239, 68, 68, 0.34);
  color: #b91c1c;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.08);
}

#slot-detail-reject:hover {
  background: linear-gradient(180deg, rgba(239,68,68,.20), rgba(239,68,68,.10));
  border-color: rgba(239, 68, 68, 0.48);
  color: #991b1b;
}

body[data-theme="dark"] #slot-detail-approve {
  background: linear-gradient(180deg, rgba(20,83,45,.34), rgba(20,83,45,.18));
  border-color: rgba(74, 222, 128, 0.34);
  color: #dcfce7;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.22);
}

body[data-theme="dark"] #slot-detail-approve:hover {
  background: linear-gradient(180deg, rgba(20,83,45,.46), rgba(20,83,45,.24));
}

body[data-theme="dark"] #slot-detail-reject {
  background: linear-gradient(180deg, rgba(127,29,29,.34), rgba(127,29,29,.18));
  border-color: rgba(248, 113, 113, 0.30);
  color: #fee2e2;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.22);
}

body[data-theme="dark"] #slot-detail-reject:hover {
  background: linear-gradient(180deg, rgba(127,29,29,.44), rgba(127,29,29,.24));
}

.slot-detail-top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
}

.slot-detail-top-actions-left,
.slot-detail-top-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.slot-detail-top-actions-right {
  margin-left: auto;
}

#slot-detail-history-toggle {
  min-height: 40px;
  border-radius: 14px;
  padding: 9px 16px;
  font-weight: 600;
  border-color: rgba(215, 38, 56, 0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72)),
    linear-gradient(180deg, rgba(215,38,56,0.06), rgba(215,38,56,0.02));
  color: #be123c;
  box-shadow: 0 8px 18px rgba(215, 38, 56, 0.07);
}

#slot-detail-history-toggle:hover {
  border-color: rgba(215, 38, 56, 0.36);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.84)),
    linear-gradient(180deg, rgba(215,38,56,0.08), rgba(215,38,56,0.03));
  color: #9f1239;
  box-shadow: 0 10px 22px rgba(215, 38, 56, 0.10);
  transform: translateY(-1px);
}

.slot-detail-bottom-actions {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.slot-detail-bottom-actions .btn-secondary,
.slot-detail-bottom-actions .btn-primary {
  min-height: 42px;
  border-radius: 14px;
  padding: 10px 15px;
  border-color: color-mix(in srgb, var(--line) 70%, #d72638 30%);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.68)),
    linear-gradient(180deg, rgba(215,38,56,0.04), rgba(215,38,56,0.01));
  box-shadow: 0 8px 20px rgba(12, 20, 40, 0.06);
  color: var(--ink);
  font-weight: 600;
}

.slot-detail-bottom-actions .btn-secondary:hover,
.slot-detail-bottom-actions .btn-primary:hover {
  border-color: rgba(215, 38, 56, 0.32);
  box-shadow: 0 10px 24px rgba(12, 20, 40, 0.10);
  transform: translateY(-1px);
}

/* Przycisk "Kopiuj transport" */
.slot-copy-transport-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
}
.slot-copy-transport-btn svg { flex-shrink: 0; }
.slot-copy-transport-btn.is-copied {
  background: linear-gradient(180deg, rgba(240,253,244,0.95), rgba(220,252,231,0.88)) !important;
  border-color: #86efac !important;
  color: #15803d !important;
}
.slot-mail-pop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
}
.slot-mail-pop.active {
  display: flex;
}
.slot-mail-pop-card {
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: #fff;
  color: #0f172a;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}
.slot-mail-pop-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.slot-mail-pop-head h3 {
  margin: 0 0 4px;
}
.slot-mail-pop-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}
.slot-mail-pop-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}
.slot-mail-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 16px 8px;
}
.dispatcher-driver-qr-card {
  width: min(420px, 100%);
}
.dispatcher-driver-qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
}
.dispatcher-driver-qr-preview img {
  width: 240px;
  height: 240px;
  image-rendering: pixelated;
}
.dispatcher-driver-qr-code {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.dispatcher-driver-qr-note {
  margin: 0;
  color: #64748b;
}
.slot-mail-letter {
  font-size: 14px;
  line-height: 1.45;
  color: #0f172a;
}
.slot-mail-hello {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}
.slot-mail-rows {
  margin: 12px 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px 12px;
}
.slot-mail-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
}
.slot-mail-row:last-child {
  border-bottom: 0;
}
.slot-mail-ico {
  width: 22px;
  text-align: center;
  font-size: 16px;
  line-height: 1.2;
}
.slot-mail-row em {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}
.slot-mail-row strong {
  font-size: 14px;
}
.slot-mail-warn {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-weight: 700;
}
.slot-mail-qr {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
}
.slot-mail-qr img {
  width: 132px;
  height: 132px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.slot-mail-qr span {
  font-size: 13px;
  color: #475569;
}
.slot-mail-sign {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #334155;
}
.slot-mail-sign img {
  width: 92px;
  height: auto;
  flex: 0 0 92px;
}
.slot-mail-format-box textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  box-sizing: border-box;
  font: 13px/1.45 Consolas, "Segoe UI", sans-serif;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
}
.slot-mail-format-side {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.slot-mail-format-side img {
  width: 148px;
  height: 148px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.slot-mail-format-side p {
  margin: 0;
  font-size: 12px;
}

/* ── Pasek szybkiej zmiany statusu ── */
.slot-quick-status-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.slot-qst-label {
  font: 600 11px/1 system-ui, sans-serif;
  color: var(--ink-muted, #64748b);
  white-space: nowrap;
  margin-right: 4px;
}
.slot-qst-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  font: 600 12px/1 system-ui, sans-serif;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}
.slot-qst-btn:disabled { opacity: .5; cursor: default; }
.slot-qst-btn svg { flex-shrink: 0; }
/* gate_in = Przyjechał (niebieski — bramka wjazdowa) */
.slot-qst-btn--gate-in    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.slot-qst-btn--gate-in:hover    { background: #dbeafe; border-color: #93c5fd; }
/* in_progress = Na rampę (pomarańczowy) */
.slot-qst-btn--in-progress{ background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.slot-qst-btn--in-progress:hover{ background: #ffedd5; border-color: #fdba74; }
/* done = Zakończono (zielony) */
.slot-qst-btn--done       { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.slot-qst-btn--done:hover       { background: #dcfce7; border-color: #86efac; }
/* gate_out = Odjechał (fioletowy — wyjazd) */
.slot-qst-btn--gate-out   { background: #f5f3ff; border-color: #ddd6fe; color: #5b21b6; }
.slot-qst-btn--gate-out:hover   { background: #ede9fe; border-color: #c4b5fd; }
.slot-qst-btn--may-exit   { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }
.slot-qst-btn--may-exit:hover   { background: #cffafe; border-color: #67e8f9; }
.slot-qst-btn--may-exit-cancel { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.slot-gate-exit-status {
  margin: 0.35rem 0 0.6rem;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
}
body[data-theme="dark"] .slot-quick-status-bar { background: var(--card); border-color: var(--line); }
body[data-theme="dark"] .slot-qst-btn--gate-in     { background: #1e3a5f; border-color: #2563eb; color: #93c5fd; }
body[data-theme="dark"] .slot-qst-btn--in-progress { background: #431407; border-color: #ea580c; color: #fdba74; }
body[data-theme="dark"] .slot-qst-btn--done        { background: #14532d; border-color: #16a34a; color: #86efac; }
body[data-theme="dark"] .slot-qst-btn--gate-out    { background: #2e1065; border-color: #7c3aed; color: #c4b5fd; }
body[data-theme="dark"] .slot-qst-btn--may-exit    { background: #083344; border-color: #0891b2; color: #67e8f9; }
body[data-theme="dark"] .slot-qst-btn--may-exit-cancel { background: #431407; border-color: #ea580c; color: #fdba74; }

body[data-theme="dark"] #slot-detail-history-toggle {
  border-color: rgba(248, 113, 113, 0.20);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.88));
  color: #fecaca;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.22);
}

body[data-theme="dark"] #slot-detail-history-toggle:hover {
  border-color: rgba(248, 113, 113, 0.34);
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.92), rgba(17, 24, 39, 0.92));
  color: #fee2e2;
}

body[data-theme="dark"] .slot-detail-bottom-actions .btn-secondary,
body[data-theme="dark"] .slot-detail-bottom-actions .btn-primary {
  border-color: rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(17, 24, 39, 0.88));
  color: #e5e7eb;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.20);
}

body[data-theme="dark"] .slot-detail-bottom-actions .btn-secondary:hover,
body[data-theme="dark"] .slot-detail-bottom-actions .btn-primary:hover {
  border-color: rgba(248, 113, 113, 0.22);
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.86), rgba(17, 24, 39, 0.92));
}

@media (max-width: 900px) {
  .slot-detail-top-actions {
    align-items: stretch;
  }
  .slot-detail-top-actions-right {
    margin-left: 0;
    width: 100%;
  }
  #slot-detail-history-toggle {
    width: 100%;
    justify-content: center;
  }
}

#slot-detail-time.slot-time-accent-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  border-color: #b91c1c;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 10px 22px rgba(185, 28, 28, 0.28);
}

#slot-detail-time.slot-time-accent-btn:hover {
  border-color: #991b1b;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  box-shadow: 0 12px 24px rgba(153, 27, 27, 0.32);
}

body[data-theme="dark"] #slot-detail-time.slot-time-accent-btn {
  color: #fff5f5;
  border-color: rgba(248, 113, 113, 0.62);
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  box-shadow: 0 10px 22px rgba(127, 29, 29, 0.45);
}

body[data-theme="dark"] #slot-detail-time.slot-time-accent-btn:hover {
  border-color: rgba(252, 165, 165, 0.74);
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

body[data-theme="dark"] .filters {
  background: #0f141c;
}

body[data-theme="dark"] .field span {
  color: var(--muted);
}

body[data-theme="dark"] .hour-cell {
  background: rgba(255, 77, 95, 0.16);
}

body[data-theme="dark"] .group-card {
  background: #141822;
}

body[data-theme="dark"] .table th {
  background: #10151f;
}

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

  .group-body {
    grid-template-columns: 1fr;
  }

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

/* Login redesign overrides */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: var(--brand-dark);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.login-quick-menu {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  min-width: 210px;
}

.login-quick-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 170px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 17, 34, 0.46);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
}

.login-quick-menu > summary::-webkit-details-marker {
  display: none;
}

.login-quick-menu > summary::after {
  content: 'Ä‚ËĂ˘â‚¬â€śĂ„Äľ';
  font-size: 12px;
  opacity: 0.9;
  transition: transform 0.16s ease;
}

.login-quick-menu[open] > summary::after {
  transform: rotate(180deg);
}

.login-quick-menu-panel {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

.login-quick-menu-panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid transparent;
}

.login-quick-menu-panel a:hover {
  background: rgba(215, 38, 56, 0.06);
  border-color: rgba(215, 38, 56, 0.18);
}

.login-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/piomar-truck.jpg') center/cover no-repeat;
  opacity: 0.35;
  filter: saturate(1.05) contrast(1.05);
  z-index: 0;
}

.login-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 27, 59, 0.85), rgba(30, 78, 168, 0.35));
  z-index: 0;
}

.login-backdrop {
  position: absolute;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(215, 38, 56, 0.28), rgba(240, 138, 75, 0));
  top: -160px;
  right: -180px;
  pointer-events: none;
  z-index: 0;
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  padding: 30px 32px 26px;
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(227, 233, 243, 0.9);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.login-head h1 {
  margin: 8px 0 6px;
  font-family: 'Sora', sans-serif;
  font-size: 28px;
}

.login-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.login-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(30, 78, 168, 0.12);
  color: var(--brand-dark);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 600;
}

.login-fields {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.login-fields label {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.login-fields input {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  padding: 0 12px;
  font-size: 14px;
  background: var(--input-bg);
}

.login-fields input:focus {
  outline: none;
  border-color: #7da2e3;
  box-shadow: 0 0 0 3px rgba(30, 78, 168, 0.12);
}

.login-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.login-actions .btn-primary {
  height: 40px;
  border-radius: 10px;
}

.login-actions .login-driver-link {
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .login-card {
    padding: 24px;
  }
  .login-quick-menu {
    top: 10px;
    right: 10px;
    min-width: 170px;
  }
  .login-quick-menu > summary {
    min-width: 150px;
    padding: 8px 10px;
    font-size: 12px;
  }
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--panel);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--panel);
  padding: 8px;
  border: 1px solid #e3e9f3;
}





.warehouse-block {
  margin: 10px 0 6px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.warehouse-label {
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.7;
}

.warehouse-name {
  font-weight: 600;
}

.warehouse-link {
  font-size: 12px;
  color: #ffffff;
  opacity: var(--main-overlay-opacity, 0.9);
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid #c7cfdd;
  background: #ffffff;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  vertical-align: middle;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

input[type="checkbox"]::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.16s ease;
  margin-top: -1px;
}

input[type="checkbox"]:hover {
  border-color: #acb8cd;
}

input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.22);
}

input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand-2);
  box-shadow: 0 4px 10px rgba(215, 38, 56, 0.25);
}

input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

input[type="checkbox"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

body[data-theme="dark"] input[type="checkbox"] {
  background: #0f1622;
  border-color: #33445f;
}

body[data-theme="dark"] input[type="checkbox"]:hover {
  border-color: #4a5e7f;
}

body[data-theme="dark"] input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 75, 85, 0.24);
}

.page-settings .settings-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-settings .settings-check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.page-settings .settings-check-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-settings .settings-check-row input[type="checkbox"],
.page-settings .settings-check-block input[type="checkbox"] {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.page-settings .settings-check-row input[type="checkbox"]::after,
.page-settings .settings-check-block input[type="checkbox"]::after {
  width: 4px;
  height: 7px;
}

.login-fields select {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  padding: 0 12px;
  font-size: 14px;
  background: var(--input-bg);
}

.window-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
  justify-content: flex-start;
  gap: 12px;
}

.window-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow);
}

.window-card .btn-primary {
  justify-self: start;
  min-width: 108px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12px;
}

.window-time {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-dark);
}

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

@media (max-width: 700px) {
  .window-grid {
    grid-template-columns: 1fr;
  }
  .window-card .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

.window-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--muted);
}
.test-accounts {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: #f4f7ff;
  display: grid;
  gap: 12px;
  font-size: 12px;
}

.test-accounts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.test-accounts-head strong {
  color: var(--ink);
  font-weight: 600;
}

.test-accounts-grid {
  display: grid;
  gap: 10px;
}

.test-account {
  background: var(--panel);
  border: 1px dashed #d8e0ec;
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.test-role {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-dark);
}

.test-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.test-fields input {
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  padding: 0 10px;
  font-size: 12px;
  background: var(--input-bg);
}

.test-fields .btn-secondary {
  height: 34px;
  padding: 0 14px;
}

@media (max-width: 520px) {
  .test-fields {
    grid-template-columns: 1fr;
  }
  .test-fields .btn-secondary {
    width: 100%;
  }
  .login-actions {
    justify-content: stretch;
  }
  .login-actions .btn-primary,
  .login-actions .login-driver-link {
    width: 100%;
    justify-content: center;
  }
}
.day-block {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.day-title {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  color: var(--brand-dark);
  padding: 10px 14px;
  background: #f1f5ff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.day-title.day-title-with-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(241, 245, 255, 0.9) 55%, rgba(248, 250, 252, 0.92) 100%);
  border-radius: 12px;
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
}

.day-title-left {
  justify-self: start;
  display: inline-flex;
  align-items: center;
}

.day-title .day-title-label {
  justify-self: center;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.day-title .day-title-spacer {
  min-width: 1px;
}

.day-title-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  justify-self: end;
}

.day-title-date-control {
  display: inline-grid;
  grid-template-columns: 28px minmax(148px, 168px) 28px auto;
  align-items: center;
  gap: 6px;
}

.day-title-date-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 28px;
  padding: 0 4px 0 8px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #fff 20%);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.day-title-date-field:focus-within {
  border-color: rgba(37, 99, 235, 0.52);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.day-title-date-picker {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.day-title-date-picker svg {
  width: 13px;
  height: 13px;
  display: block;
}

.day-title-date-picker:hover {
  background: rgba(37, 99, 235, 0.18);
  color: #1e40af;
  transform: translateY(-0.5px);
}

.day-title-btn-icon,
.day-title-btn-today,
.day-title-render-toggle {
  height: 28px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #fff 20%);
  background: linear-gradient(180deg, #ffffff, #f3f6fb);
  color: var(--brand-dark);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.day-title-btn-icon {
  width: 28px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.day-title-btn-today {
  padding: 0 10px;
  font-size: 11px;
}

.day-title-render-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  justify-content: center;
  letter-spacing: .01em;
  color: #1d4ed8;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid color-mix(in srgb, #93c5fd 55%, var(--line) 45%);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.08);
}

.day-title-render-toggle__svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.9;
}

.day-title-date-input,
.day-title-view-select {
  height: 28px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #fff 20%);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink);
  font-size: 12px;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.day-title-date-field .day-title-date-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 26px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 2px !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.day-title-date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 0;
  height: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.day-title-btn-icon:hover,
.day-title-btn-today:hover {
  border-color: rgba(191, 219, 254, .78);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.day-title-render-toggle:hover {
  border-color: rgba(59, 130, 246, 0.55);
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

.day-title-btn-icon:active,
.day-title-btn-today:active,
.day-title-render-toggle:active {
  transform: translateY(1px);
}

.day-title-date-input:focus,
.day-title-view-select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.52);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.day-title-date-input::-webkit-calendar-picker-indicator,
.time-date-input::-webkit-calendar-picker-indicator,
.time-input::-webkit-calendar-picker-indicator,
.schedule-filters .date-control #schedule-date::-webkit-calendar-picker-indicator {
  border-radius: 8px;
  padding: 2px;
  background: rgba(148, 163, 184, 0.16);
  cursor: pointer;
}

.day-title-view-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.day-title-view-control > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--muted);
  text-transform: uppercase;
}

.day-title-view-select {
  min-width: 100px;
}

.day-title-free-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #93c5fd 48%, var(--line) 52%);
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  box-shadow: 0 8px 16px rgba(30, 78, 168, 0.08);
}

.day-title-free-badge__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #4b5563;
}

.day-title-free-badge__value {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  line-height: 1;
  color: #1d4ed8;
}

body.page-schedule .schedule-filters-row-core .filter-date,
body.page-schedule .schedule-filters-row-core .filter-view {
  display: none;
}

body.page-schedule .schedule-filters-row-core {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

body.page-schedule .schedule-filters-row-core .filter-warehouse {
  grid-column: span 6;
}

body.page-schedule .schedule-filters-row-core .schedule-filters-actions {
  grid-column: span 6;
  grid-template-columns: 1fr 1fr;
}

body[data-theme="dark"] .day-title {
  background: linear-gradient(180deg, rgba(20,31,52,.9), rgba(12,20,36,.88));
  border-color: color-mix(in srgb, var(--line) 70%, #93c5fd 30%);
  color: #eef4ff;
}

body[data-theme="dark"] .day-title.day-title-with-controls {
  background:
    linear-gradient(135deg, rgba(20, 31, 52, 0.94) 0%, rgba(15, 23, 42, 0.9) 55%, rgba(12, 20, 36, 0.92) 100%);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .day-title-btn-icon,
body[data-theme="dark"] .day-title-btn-today,
body[data-theme="dark"] .day-title-render-toggle,
body[data-theme="dark"] .day-title-date-input,
body[data-theme="dark"] .day-title-view-select {
  background: linear-gradient(180deg, rgba(26, 37, 58, 0.94), rgba(14, 24, 41, 0.92));
  border-color: rgba(148,163,184,.16);
  color: #eef4ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .day-title-date-field {
  background: linear-gradient(180deg, rgba(26, 37, 58, 0.94), rgba(14, 24, 41, 0.92));
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .day-title-date-picker {
  background: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
}

body[data-theme="dark"] .day-title-date-picker:hover {
  background: rgba(96, 165, 250, 0.3);
  color: #eff6ff;
}

body[data-theme="dark"] .day-title-render-toggle {
  color: #bfdbfe;
  background: linear-gradient(180deg, rgba(30, 58, 95, 0.7), rgba(15, 23, 42, 0.85));
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .day-title-btn-icon:hover,
body[data-theme="dark"] .day-title-btn-today:hover {
  border-color: rgba(96, 165, 250, 0.44);
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.28);
}

body[data-theme="dark"] .day-title-render-toggle:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.9));
}

body[data-theme="dark"] .day-title-date-input:focus,
body[data-theme="dark"] .day-title-view-select:focus {
  border-color: rgba(96, 165, 250, 0.58);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

body[data-theme="dark"] .day-title-date-input::-webkit-calendar-picker-indicator,
body[data-theme="dark"] .time-date-input::-webkit-calendar-picker-indicator,
body[data-theme="dark"] .time-input::-webkit-calendar-picker-indicator,
body[data-theme="dark"] .schedule-filters .date-control #schedule-date::-webkit-calendar-picker-indicator {
  background: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .day-title-view-control > span {
  color: rgba(226, 232, 240, .72);
}

body[data-theme="dark"] .day-title-free-badge {
  background: linear-gradient(180deg, rgba(20,31,52,.88), rgba(12,20,36,.86));
  border-color: rgba(96,165,250,.26);
  box-shadow: none;
}

body[data-theme="dark"] .day-title-free-badge__label {
  color: rgba(226,232,240,.74);
}

body[data-theme="dark"] .day-title-free-badge__value {
  color: #bfdbfe;
}

@media (max-width: 1100px) {
  .day-title.day-title-with-controls {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .day-title .day-title-label {
    justify-self: start;
  }
  .day-title .day-title-spacer {
    display: none;
  }
  .day-title-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .day-title-date-control {
    grid-template-columns: 30px minmax(0, 1fr) 30px auto;
    width: 100%;
  }
}

.schedule-hourly-summary {
  border: 1px solid color-mix(in srgb, var(--line) 78%, #ffffff 22%);
  border-radius: 14px;
  padding: 7px 9px 9px;
  background:
    radial-gradient(circle at 90% -20%, rgba(59, 130, 246, 0.10), transparent 44%),
    linear-gradient(180deg, #ffffff, #f7faff);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  margin-top: 2px;
}

.schedule-hourly-summary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.schedule-hourly-summary__title {
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: .02em;
}

.schedule-hourly-summary__meta {
  font-size: 10px;
  color: var(--muted);
}

.schedule-hourly-summary__meta strong {
  color: var(--brand-dark);
}

.schedule-hourly-summary__list {
  display: grid;
  grid-template-columns: repeat(24, minmax(56px, 1fr));
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.schedule-hourly-summary__item {
  border: 1px solid color-mix(in srgb, var(--line) 74%, #ffffff 26%);
  border-radius: 9px;
  padding: 5px 5px 4px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  min-height: 50px;
  display: grid;
  align-content: center;
  gap: 1px;
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.07);
}

.schedule-hourly-summary__hour {
  font-size: 10px;
  font-weight: 800;
  color: #1d4ed8;
}

.schedule-hourly-summary__value {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.schedule-hourly-summary__capacity {
  font-size: 9px;
  color: var(--muted);
}

.schedule-hourly-summary__item.is-empty {
  opacity: .84;
}

.schedule-hourly-summary__item.is-peak {
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow:
    0 10px 20px rgba(37, 99, 235, 0.16),
    0 0 0 1px rgba(59, 130, 246, 0.22) inset;
}

.schedule-hourly-summary__item.is-current {
  border-color: rgba(34, 197, 94, 0.58);
  box-shadow:
    0 10px 24px rgba(22, 163, 74, 0.18),
    0 0 0 1px rgba(34, 197, 94, 0.30) inset;
}

body[data-theme="dark"] .schedule-hourly-summary {
  border-color: rgba(96, 165, 250, 0.24);
  background:
    radial-gradient(circle at 90% -18%, rgba(59, 130, 246, 0.20), transparent 45%),
    linear-gradient(180deg, rgba(17, 26, 44, 0.96), rgba(10, 17, 31, 0.95));
  box-shadow: 0 14px 26px rgba(2, 6, 23, 0.32);
}

body[data-theme="dark"] .schedule-hourly-summary__title,
body[data-theme="dark"] .schedule-hourly-summary__meta strong {
  color: #eaf2ff;
}

body[data-theme="dark"] .schedule-hourly-summary__meta {
  color: rgba(203, 213, 225, 0.86);
}

body[data-theme="dark"] .schedule-hourly-summary__item {
  border-color: rgba(96, 165, 250, 0.23);
  background: linear-gradient(180deg, rgba(20, 31, 52, 0.95), rgba(12, 20, 36, 0.92));
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.30);
}

body[data-theme="dark"] .schedule-hourly-summary__hour {
  color: #93c5fd;
}

body[data-theme="dark"] .schedule-hourly-summary__value {
  color: #e2e8f0;
}

body[data-theme="dark"] .schedule-hourly-summary__capacity {
  color: rgba(203, 213, 225, 0.82);
}

body[data-theme="dark"] .schedule-hourly-summary__item.is-empty {
  opacity: .9;
}

.schedule-visits {
  position: relative;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  padding: 14px;
  margin: 10px 0 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(239, 68, 68, 0.12), transparent 34%),
    radial-gradient(circle at 96% 12%, rgba(37, 99, 235, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.94));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.schedule-visits::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent 28%, transparent 70%, rgba(239, 68, 68, 0.08)),
    repeating-linear-gradient(135deg, rgba(37, 99, 235, 0.035) 0 1px, transparent 1px 16px);
  opacity: .9;
}

.schedule-visits__head,
.schedule-visits__form,
.schedule-visits__list {
  position: relative;
  z-index: 1;
}

.schedule-visits__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.schedule-visits__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  padding: 3px 9px;
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.86);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.schedule-visits__head h3 {
  margin: 7px 0 2px;
  color: var(--brand-dark);
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  line-height: 1.1;
}

.schedule-visits__head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.schedule-visits__badge {
  flex: 0 0 auto;
  border: 1px solid rgba(37, 99, 235, 0.20);
  border-radius: 999px;
  padding: 7px 10px;
  color: #1e3a8a;
  background: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.10);
}

.schedule-visits__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-visits__add {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #e11d48, #ef4444);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(225, 29, 72, 0.22);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.schedule-visits__add:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 16px 30px rgba(225, 29, 72, 0.28);
}

.schedule-visits__form {
  display: grid;
  grid-template-columns: minmax(110px, .7fr) minmax(220px, 1.2fr) minmax(260px, 1.6fr) auto;
  gap: 9px;
  align-items: end;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 15px;
  padding: 10px;
  margin-bottom: 11px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(10px);
}

.schedule-visits__form label {
  display: grid;
  gap: 5px;
  color: #456187;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.schedule-visits__form input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 11px;
  padding: 0 11px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.schedule-visits__form input:focus {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.schedule-visits__form .btn-primary {
  min-height: 36px;
  border-radius: 12px;
  padding-inline: 15px;
  white-space: nowrap;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.20);
}

.schedule-visits__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.schedule-visits__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.schedule-visits__item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.schedule-visits__details {
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  padding: 7px 10px;
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.schedule-visits__details:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.12);
}

.schedule-visits__time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 36px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #ef4444);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.16);
}

.schedule-visits__content {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.schedule-visits__content strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.18;
}

.schedule-visits__content span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.schedule-visits__delete {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 10px;
  color: #dc2626;
  background: rgba(254, 242, 242, 0.92);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.schedule-visits__delete:hover {
  transform: translateY(-1px);
  background: #fee2e2;
  box-shadow: 0 10px 18px rgba(220, 38, 38, 0.14);
}

.schedule-visits__empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(37, 99, 235, 0.26);
  border-radius: 14px;
  padding: 14px;
  color: #4b6386;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.schedule-visits__empty.is-error {
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
  background: rgba(254, 242, 242, 0.74);
}

body[data-theme="dark"] .schedule-visits {
  border-color: rgba(96, 165, 250, 0.24);
  background:
    radial-gradient(circle at 8% 0%, rgba(248, 113, 113, 0.16), transparent 34%),
    radial-gradient(circle at 96% 12%, rgba(96, 165, 250, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(9, 16, 31, 0.96));
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
}

body[data-theme="dark"] .schedule-visits__eyebrow {
  border-color: rgba(96, 165, 250, 0.34);
  color: #bfdbfe;
  background: rgba(30, 58, 138, 0.36);
}

body[data-theme="dark"] .schedule-visits__head h3,
body[data-theme="dark"] .schedule-visits__content strong {
  color: #f8fafc;
}

body[data-theme="dark"] .schedule-visits__head p,
body[data-theme="dark"] .schedule-visits__content span {
  color: rgba(203, 213, 225, 0.84);
}

body[data-theme="dark"] .schedule-visits__badge,
body[data-theme="dark"] .schedule-visits__form,
body[data-theme="dark"] .schedule-visits__item,
body[data-theme="dark"] .schedule-visits__empty {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.92);
}

body[data-theme="dark"] .schedule-visits__form label {
  color: rgba(191, 219, 254, 0.88);
}

body[data-theme="dark"] .schedule-visits__form input {
  border-color: rgba(96, 165, 250, 0.28);
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.72);
}

body[data-theme="dark"] .schedule-visits__form input::placeholder {
  color: rgba(203, 213, 225, 0.58);
}

.schedule-visit-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 25% 15%, rgba(37, 99, 235, 0.24), transparent 32%),
    radial-gradient(circle at 78% 80%, rgba(225, 29, 72, 0.22), transparent 34%),
    rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}

.schedule-visit-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.schedule-visit-modal__dialog {
  position: relative;
  width: min(620px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 26px;
  padding: 22px;
  background:
    radial-gradient(circle at 8% 0%, rgba(239, 68, 68, 0.13), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 255, 0.86));
  box-shadow:
    0 28px 90px rgba(2, 6, 23, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transform: translateY(10px) scale(.98);
  transition: transform .18s ease;
}

.schedule-visit-modal.active .schedule-visit-modal__dialog {
  transform: translateY(0) scale(1);
}

.schedule-visit-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 13px;
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.schedule-visit-modal__hero {
  padding-right: 42px;
  margin-bottom: 16px;
}

.schedule-visit-modal__eyebrow {
  display: inline-flex;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  padding: 4px 10px;
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.86);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.schedule-visit-modal__hero h3 {
  margin: 10px 0 4px;
  color: #0f172a;
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  line-height: 1.12;
}

.schedule-visit-modal__hero p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.schedule-visit-modal__lock {
  margin-top: 9px !important;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 13px;
  padding: 9px 11px;
  color: #b91c1c !important;
  background: rgba(254, 242, 242, 0.78);
  font-weight: 800;
}

.schedule-visit-modal__form {
  display: grid;
  gap: 12px;
}

.schedule-visit-modal__form[hidden],
.schedule-visit-modal__read[hidden] {
  display: none;
}

.schedule-visit-modal__form label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.schedule-visit-modal__form input,
.schedule-visit-modal__form textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 15px;
  padding: 12px 13px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.schedule-visit-modal__form input:focus,
.schedule-visit-modal__form textarea:focus {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.schedule-visit-modal__read {
  display: grid;
  gap: 12px;
}

.schedule-visit-modal__read-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.schedule-visit-modal__read-grid div,
.schedule-visit-modal__read-note {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 16px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.72);
}

.schedule-visit-modal__read-grid span,
.schedule-visit-modal__read-note span {
  display: block;
  margin-bottom: 5px;
  color: #587098;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.schedule-visit-modal__read-grid strong,
.schedule-visit-modal__read-note p {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.schedule-visit-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

body[data-theme="dark"] .schedule-visit-modal__dialog {
  border-color: rgba(96, 165, 250, 0.26);
  background:
    radial-gradient(circle at 8% 0%, rgba(248, 113, 113, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(10, 17, 31, 0.92));
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.58);
}

body[data-theme="dark"] .schedule-visit-modal__close {
  border-color: rgba(96, 165, 250, 0.25);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
}

body[data-theme="dark"] .schedule-visit-modal__hero h3 {
  color: #f8fafc;
}

body[data-theme="dark"] .schedule-visit-modal__hero p,
body[data-theme="dark"] .schedule-visit-modal__form label {
  color: rgba(203, 213, 225, 0.88);
}

body[data-theme="dark"] .schedule-visit-modal__form input,
body[data-theme="dark"] .schedule-visit-modal__form textarea {
  border-color: rgba(96, 165, 250, 0.28);
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.74);
}

body[data-theme="dark"] .schedule-visit-modal__read-grid div,
body[data-theme="dark"] .schedule-visit-modal__read-note {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(2, 6, 23, 0.46);
}

body[data-theme="dark"] .schedule-visit-modal__read-grid span,
body[data-theme="dark"] .schedule-visit-modal__read-note span {
  color: rgba(191, 219, 254, 0.86);
}

body[data-theme="dark"] .schedule-visit-modal__read-grid strong,
body[data-theme="dark"] .schedule-visit-modal__read-note p {
  color: #f8fafc;
}

body[data-theme="dark"] .schedule-visit-modal__form input::placeholder,
body[data-theme="dark"] .schedule-visit-modal__form textarea::placeholder {
  color: rgba(203, 213, 225, 0.58);
}

@media (max-width: 720px) {
  .schedule-visit-modal__read-grid {
    grid-template-columns: 1fr;
  }
}

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

.visits-hero {
  border: 1px solid rgba(37, 99, 235, 0.18);
  background:
    radial-gradient(circle at 9% 0%, rgba(239, 68, 68, 0.13), transparent 34%),
    radial-gradient(circle at 92% 16%, rgba(37, 99, 235, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 255, 0.92));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.visits-hero__eyebrow {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  padding: 4px 10px;
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.90);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.visits-hero__stats {
  display: flex;
  align-items: stretch;
  gap: 9px;
  flex-wrap: wrap;
}

.visits-hero__stats div {
  min-width: 96px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.76);
  text-align: center;
  box-shadow: 0 12px 26px rgba(30, 64, 175, 0.08);
}

.visits-hero__stats strong {
  display: block;
  color: var(--brand-dark);
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  line-height: 1;
}

.visits-hero__stats span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.visits-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-radius: 20px;
  padding: 18px;
}

.visits-toolbar h2 {
  margin: 0;
  color: var(--brand-dark);
  font-family: 'Sora', sans-serif;
}

.visits-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.visits-filter label {
  display: grid;
  gap: 6px;
  color: #496489;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.visits-filter select {
  min-width: 180px;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 13px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.visits-list {
  display: grid;
  gap: 14px;
}

.visits-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.visits-card--compact {
  min-height: 116px;
}

.visits-card__compact-main {
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}

.visits-card.needs-notes {
  border-color: rgba(239, 68, 68, 0.26);
}

.visits-card.has-notes {
  border-color: rgba(34, 197, 94, 0.28);
}

.visits-card.is-planned {
  border-color: rgba(37, 99, 235, 0.30);
}

.visits-card.is-locked {
  opacity: .86;
}

.visits-card__timeline {
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 18px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(145deg, #1d4ed8, #e11d48);
  text-align: center;
}

.visits-card__date {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
}

.visits-card__time {
  font-family: 'Sora', sans-serif;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.visits-card__body {
  padding: 18px;
  display: grid;
  gap: 12px;
}

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

.visits-card__status {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.78);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.visits-card.needs-notes .visits-card__status {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.82);
}

.visits-card.has-notes .visits-card__status {
  color: #166534;
  background: rgba(220, 252, 231, 0.86);
}

.visits-card.is-planned .visits-card__status {
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.88);
}

.visits-card.is-locked .visits-card__status {
  color: #475569;
  background: rgba(226, 232, 240, 0.92);
}

.visits-card h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-size: 20px;
}

.visits-card__meta {
  display: grid;
  gap: 3px;
  text-align: right;
  color: var(--muted);
  font-size: 11px;
}

.visits-card__before {
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  padding: 12px;
  background: rgba(239, 246, 255, 0.62);
}

.visits-card__before strong {
  display: block;
  margin-bottom: 5px;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.visits-card__before p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.visits-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.visits-card__details span {
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  color: #334155;
  background: rgba(239, 246, 255, 0.72);
  font-size: 12px;
}

.visits-card__details strong {
  color: #1e3a8a;
}

.visits-card__form {
  display: grid;
  gap: 10px;
}

.visits-card__form[hidden] {
  display: none;
}

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

.visits-card__read-grid div,
.visits-card__read-note {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 15px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.72);
}

.visits-card__read-grid span,
.visits-card__read-note span {
  display: block;
  margin-bottom: 5px;
  color: #587098;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.visits-card__read-grid strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.visits-card__read-note p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.visits-card__edit-toggle {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
  cursor: pointer;
}

.visits-card__drawer {
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.72);
  overflow: hidden;
}

.visits-card__drawer summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 13px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.visits-card__drawer summary::-webkit-details-marker {
  display: none;
}

.visits-card__drawer summary::after {
  content: "Rozwin";
  float: right;
  color: #64748b;
  font-size: 10px;
}

.visits-card__drawer[open] summary::after {
  content: "Zwin";
}

.visits-card__drawer .visits-card__body {
  border-top: 1px solid rgba(37, 99, 235, 0.12);
}

.visits-card__locked-note {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  padding: 8px 11px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.visits-card__form label {
  display: grid;
  gap: 7px;
  color: #456187;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

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

.visits-card__form input,
.visits-card__form textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
}

.visits-card__form textarea {
  resize: vertical;
  min-height: 118px;
}

.visits-card__form input:focus,
.visits-card__form textarea:focus {
  border-color: rgba(37, 99, 235, 0.46);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: none;
}

.visits-card__actions {
  display: flex;
  justify-content: flex-end;
}

.visits-empty {
  border-radius: 22px;
  padding: 30px;
  text-align: center;
}

.visits-empty__icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.82);
  font-family: 'Sora', sans-serif;
  font-weight: 900;
}

body[data-theme="dark"] .visits-hero,
body[data-theme="dark"] .visits-card,
body[data-theme="dark"] .visits-toolbar,
body[data-theme="dark"] .visits-empty {
  border-color: rgba(96, 165, 250, 0.22);
  background:
    radial-gradient(circle at 9% 0%, rgba(248, 113, 113, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(10, 17, 31, 0.94));
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34);
}

body[data-theme="dark"] .visits-hero__stats div,
body[data-theme="dark"] .visits-card__before,
body[data-theme="dark"] .visits-filter select,
body[data-theme="dark"] .visits-card__form input,
body[data-theme="dark"] .visits-card__form textarea {
  border-color: rgba(96, 165, 250, 0.24);
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.58);
}

body[data-theme="dark"] .visits-card__details span {
  border-color: rgba(96, 165, 250, 0.24);
  color: rgba(226, 232, 240, 0.92);
  background: rgba(30, 58, 138, 0.24);
}

body[data-theme="dark"] .visits-card__details strong {
  color: #bfdbfe;
}

body[data-theme="dark"] .visits-card__read-grid div,
body[data-theme="dark"] .visits-card__read-note {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(2, 6, 23, 0.42);
}

body[data-theme="dark"] .visits-card__read-grid strong,
body[data-theme="dark"] .visits-card__read-note p {
  color: #f8fafc;
}

body[data-theme="dark"] .visits-card__read-grid span,
body[data-theme="dark"] .visits-card__read-note span {
  color: rgba(191, 219, 254, 0.86);
}

body[data-theme="dark"] .schedule-visits__details,
body[data-theme="dark"] .visits-card__drawer {
  border-color: rgba(96, 165, 250, 0.24);
  color: #bfdbfe;
  background: rgba(30, 58, 138, 0.22);
}

body[data-theme="dark"] .visits-card__drawer summary {
  color: #bfdbfe;
}

body[data-theme="dark"] .visits-card__locked-note {
  border-color: rgba(148, 163, 184, 0.26);
  color: rgba(203, 213, 225, 0.88);
  background: rgba(15, 23, 42, 0.62);
}

body[data-theme="dark"] .visits-toolbar h2,
body[data-theme="dark"] .visits-hero__stats strong,
body[data-theme="dark"] .visits-card h3,
body[data-theme="dark"] .visits-card__before p {
  color: #f8fafc;
}

body[data-theme="dark"] .visits-toolbar p,
body[data-theme="dark"] .visits-card__meta,
body[data-theme="dark"] .visits-hero__stats span {
  color: rgba(203, 213, 225, 0.82);
}

@media (max-width: 900px) {
  .visits-card {
    grid-template-columns: 1fr;
  }
  .visits-card__timeline {
    grid-template-columns: auto auto;
    justify-content: start;
  }
  .visits-card__top,
  .visits-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .visits-card__meta {
    text-align: left;
  }
  .visits-card__edit-grid {
    grid-template-columns: 1fr;
  }
  .visits-card__read-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .schedule-visits__form {
    grid-template-columns: 1fr 1fr;
  }
  .schedule-visits__note,
  .schedule-visits__form .btn-primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .schedule-visits__head {
    flex-direction: column;
  }
  .schedule-visits__form {
    grid-template-columns: 1fr;
  }
  .schedule-visits__list {
    grid-template-columns: 1fr;
  }
}

.title-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(30, 78, 168, 0.12);
  color: var(--brand);
  margin-right: 10px;
  box-shadow: 0 10px 18px rgba(30, 78, 168, 0.15);
}

.page-header h1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.main {
  position: relative;
  overflow: hidden;
}

.main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.07)),
              radial-gradient(circle at 20% 20%, rgba(30, 78, 168, 0.12), transparent 55%),
              radial-gradient(circle at 85% 15%, rgba(215, 38, 56, 0.14), transparent 48%),
              radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.12), transparent 52%);
  opacity: var(--main-overlay-opacity, 0.9);
  -webkit-backdrop-filter: blur(var(--page-bg-blur, 0px));
  backdrop-filter: blur(var(--page-bg-blur, 0px));
  pointer-events: none;
  z-index: 0;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .main::after {
    content: '';
    position: absolute;
    inset: -10px;
    background-image: var(--page-bg-image, none);
    background-size: var(--page-bg-size, cover);
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: var(--page-bg-attachment, fixed);
    filter: blur(var(--page-bg-blur, 0px));
    transform: scale(1.03);
    opacity: 0.9;
    pointer-events: none;
    z-index: 0;
  }

  .main::before {
    z-index: 1;
  }

  .main > * {
    z-index: 2;
  }
}

.main > :not(.modal) {
  position: relative;
  z-index: 1;
}

.panel {
  position: relative;
}

.panel::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(30, 78, 168, 0.2), rgba(215, 38, 56, 0.12));
  opacity: 0.35;
  z-index: -1;
}

.group-card {
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(30, 78, 168, 0.06);
}
.detail-summary {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f8ff;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.time-form {
  display: grid;
  gap: 12px;
}

.time-actions {
  display: flex;
  justify-content: flex-start;
}

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

.time-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.time-row.is-missing {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14), 0 8px 20px rgba(239, 68, 68, 0.12);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.88), rgba(255, 255, 255, 0.96));
}

.time-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.time-row-fields {
  display: grid;
  grid-template-columns: 1fr 140px;
  align-items: center;
  gap: 8px;
}

.time-label {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.time-input {
  width: 100%;
  height: 40px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--input-border) 84%, #fff 16%);
  padding: 0 12px;
  font-size: 14px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.time-date-input {
  width: 100%;
  height: 40px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--input-border) 84%, #fff 16%);
  padding: 0 10px;
  font-size: 13px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.time-input:focus,
.time-date-input:focus,
.schedule-filters .date-control #schedule-date:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.time-now {
  min-width: 78px;
  padding: 7px 10px;
  border-radius: 10px;
}

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


.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle.floating {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
}

.sidebar .theme-toggle {
  width: 100%;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

body[data-theme="dark"] .sidebar {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 107, 126, 0.10) 0%, rgba(255, 107, 126, 0) 58%),
    radial-gradient(120% 110% at 0% 100%, rgba(96, 165, 250, 0.07) 0%, rgba(96, 165, 250, 0) 62%),
    #0b0d12;
}

body[data-theme="dark"] .sidebar .nav-link {
  color: #e5e7eb;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .sidebar .nav-link:hover {
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="dark"] .sidebar .nav-link.active {
  background: linear-gradient(180deg, rgba(255, 107, 126, 0.18), rgba(255, 107, 126, 0.10));
  color: #f8fafc;
  border-color: rgba(255, 107, 126, 0.32);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 107, 126, 0.10) inset;
}

body[data-theme="dark"] .sidebar .nav-link.active span,
body[data-theme="dark"] .sidebar .nav-link.active .menu-icon,
body[data-theme="dark"] .sidebar .nav-link.active .menu-icon svg,
body[data-theme="dark"] .sidebar .nav-link.active .nav-caret {
  color: #f8fafc !important;
}

body[data-theme="dark"] .sidebar .theme-toggle {
  background: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .sidebar .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="dark"] .panel::before {
  background: linear-gradient(135deg, rgba(255, 77, 95, 0.2), rgba(255, 122, 134, 0.1));
}
body[data-theme="dark"] .group-card {
  background: #141822;
  border-color: var(--line);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 77, 95, 0.08);
}

body[data-theme="dark"] .group-header {
  background: rgba(255, 77, 95, 0.14);
  color: var(--ink);
}

body[data-theme="dark"] .group-header__eyebrow {
  color: #fda4af;
  background: linear-gradient(180deg, rgba(76,29,39,.92), rgba(63,22,33,.9));
  border-color: rgba(244,114,182,.32);
}

body[data-theme="dark"] .group-header__title {
  color: #f8fafc;
}

body[data-theme="dark"] .group-header__meta .slot-mini-badge {
  color: rgba(226,232,240,.92);
  border-color: rgba(148,163,184,.32);
  background: linear-gradient(180deg, rgba(30,41,59,.9), rgba(15,23,42,.88));
  box-shadow: 0 8px 18px rgba(2,6,23,.35), inset 0 1px 0 rgba(148,163,184,.08);
}

body[data-theme="dark"] .group-header__meta .slot-mini-badge.is-neutral {
  color: rgba(203,213,225,.94);
  border-color: rgba(148,163,184,.34);
  background: linear-gradient(180deg, rgba(51,65,85,.86), rgba(30,41,59,.9));
}

body[data-theme="dark"] .group-header__meta .slot-mini-badge.is-info {
  color: #bae6fd;
  border-color: rgba(56,189,248,.42);
  background: linear-gradient(180deg, rgba(12,74,110,.55), rgba(14,116,144,.4));
}

body[data-theme="dark"] .hour-cell {
  background: rgba(255, 77, 95, 0.12);
  color: #f1f5f9;
}

body[data-theme="dark"] .slot.blocked {
  background: repeating-linear-gradient(45deg, #1a1f2a, #1a1f2a 6px, #1f2430 6px, #1f2430 12px);
  color: var(--muted);
}

body[data-theme="dark"] .group-side .line-item {
  background: #0f141c;
  border-color: var(--line);
  color: var(--ink);
}

body[data-theme="dark"] .summary-cell {
  background: #0f141c;
  border-color: var(--line);
  color: var(--ink);
}

body[data-theme="dark"] .summary-add {
  background: rgba(255, 77, 95, 0.12);
  color: var(--ink);
}

body[data-theme="dark"] .summary-add:hover {
  background: rgba(255, 77, 95, 0.2);
}

body[data-theme="dark"] .add-icon {
  background: var(--brand);
  color: #fff;
}

body[data-theme="dark"] .slot {
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .slot.free {
  color: #f8fafc;
}

body[data-theme="dark"] .slot.reserved {
  color: #fef2f2;
}

body[data-theme="dark"] .slot.in_progress {
  color: #fff7ed;
}

body[data-theme="dark"] .slot.done {
  color: #ecfdf3;
}

body[data-theme="dark"] .slot.departed {
  color: #dbeafe;
}

body[data-theme="dark"] .slot.reserved,
body[data-theme="dark"] .slot.in_progress,
body[data-theme="dark"] .slot.done,
body[data-theme="dark"] .slot.departed,
body[data-theme="dark"] .slot.blocked {
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.055) inset,
    0 0 28px var(--slot-glow-color);
}

body[data-theme="dark"] .slot.reserved:hover,
body[data-theme="dark"] .slot.in_progress:hover,
body[data-theme="dark"] .slot.done:hover,
body[data-theme="dark"] .slot.departed:hover,
body[data-theme="dark"] .slot.blocked:hover {
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(255, 255, 255, 0.09) inset,
    0 0 38px var(--slot-glow-color);
}

.summary-add {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(215, 38, 56, 0.08);
  border: 1px dashed rgba(215, 38, 56, 0.35);
}

.summary-add:hover {
  background: rgba(215, 38, 56, 0.18);
}

.add-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.modal.active {
  display: flex;
}



.modal-frame {
  width: 100%;
  height: 70vh;
  min-height: 520px;
  max-height: 78vh;
  border: none;
  border-radius: 12px;
  background: var(--panel);
}



.modal-card {
  width: min(980px, 92vw);
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  max-height: 88vh;
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-card.wide {
  max-width: 1180px;
  width: min(1180px, 96vw);
}

.modal .detail-summary {
  background: rgba(30, 41, 59, 0.06);
}

.modal .detail-list {
  margin-bottom: 14px;
}

.modal .form-grid label {
  color: var(--muted);
}

.modal .form-grid input:not([type="checkbox"]):not([type="radio"]),
.modal .form-grid select,
.modal .form-grid textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
}

.modal .form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
.modal .form-grid select:focus,
.modal .form-grid textarea:focus {
  box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.15);
}

body[data-theme="dark"] .modal {
  background: rgba(8, 12, 22, 0.65);
}

body[data-theme="dark"] .modal .detail-summary {
  background: rgba(148, 163, 184, 0.08);
  color: #d1d5db;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-header h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.modal-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
}


.date-control {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.date-arrow {
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  display: inline-block;
  transform: translateY(-1px);
}

.btn-icon-only svg {
  width: 16px;
  height: 16px;
  display: block;
}
.btn-icon-only:hover {
  background: rgba(215, 38, 56, 0.08);
}

.btn-today {
  height: 36px;
}

@media (max-width: 900px) {
  .date-control {
    grid-template-columns: auto 1fr auto;
  }
  .btn-today {
    grid-column: 1 / -1;
  }
}

.change-list {
  display: grid;
  gap: 16px;
  margin-top: 10px;
}

.change-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.change-card.added {
}

.change-card.changed {
}

.change-card.removed {
}

.change-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.change-meta-left,
.change-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.change-meta-left {
  flex-wrap: wrap;
}

.change-meta-right {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.change-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  background: var(--panel);
}

.change-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(30, 78, 168, 0.2);
  background: rgba(30, 78, 168, 0.08);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.change-scope {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.25);
  background: rgba(100, 116, 139, 0.08);
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.change-scope.user {
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(34, 197, 94, 0.09);
  color: #166534;
}

.change-scope.system {
  border-color: rgba(147, 51, 234, 0.22);
  background: rgba(147, 51, 234, 0.09);
  color: #7e22ce;
}

.change-badge.added {
  color: #15803d;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.change-badge.changed {
  color: #6b7280;
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.change-badge.removed {
  color: #b91c1c;
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}


.change-badge.added .badge-icon {
  background: #22c55e;
  color: #fff;
  border-color: #22c55e;
}

.change-badge.changed .badge-icon {
  background: #e5e7eb;
  color: #6b7280;
  border-color: #9ca3af;
}

.change-badge.removed .badge-icon {
  background: #f87171;
  color: #fff;
  border-color: #f87171;
}

.change-inline-version {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.08);
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.change-inline-version strong {
  color: var(--ink);
}
.badge-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.change-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  color: var(--ink);
}

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

.change-details-lines {
  margin-top: 6px;
  display: grid;
  gap: 6px;
}

.change-line-group-sep {
  height: 8px;
}

.change-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.06);
}

.change-line.plain {
  grid-template-columns: 1fr;
}

.change-line-prefix {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.25;
  margin-top: 1px;
}

.change-line-text {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.change-line.added {
  border-color: rgba(34, 197, 94, 0.26);
  background: rgba(34, 197, 94, 0.08);
}

.change-line.added .change-line-prefix {
  color: #16a34a;
}

.change-line.removed {
  border-color: rgba(239, 68, 68, 0.26);
  background: rgba(239, 68, 68, 0.08);
}

.change-line.removed .change-line-prefix {
  color: #dc2626;
}

.change-line.changed {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(148, 163, 184, 0.08);
}

.change-line.changed .change-line-prefix {
  color: #64748b;
}

.change-line-arrow {
  color: var(--muted);
  font-weight: 700;
  margin: 0 4px;
}

.change-line del {
  color: var(--muted);
  opacity: 0.95;
}

.change-line strong {
  color: var(--ink);
}

.change-footer {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 700px) {
  .change-meta {
    align-items: flex-start;
    flex-direction: column;
  }
  .change-meta-right {
    margin-left: 0;
    justify-content: flex-start;
  }
}

/* Changelog layout hardening (prevents card/content overflow and wrap breaks) */
body.page-changelog-list .change-list,
body.page-changelog-manage .change-list {
  min-width: 0;
}

body.page-changelog-list .change-card,
body.page-changelog-manage .change-card {
  min-width: 0;
  overflow: hidden;
}

body.page-changelog-list .change-meta,
body.page-changelog-manage .change-meta,
body.page-changelog-list .change-meta-left,
body.page-changelog-manage .change-meta-left,
body.page-changelog-list .change-meta-right,
body.page-changelog-manage .change-meta-right {
  min-width: 0;
  flex-wrap: wrap;
}

body.page-changelog-list .change-inline-version,
body.page-changelog-manage .change-inline-version {
  white-space: normal;
  overflow-wrap: anywhere;
}

body.page-changelog-list .change-title,
body.page-changelog-manage .change-title,
body.page-changelog-list .change-details,
body.page-changelog-manage .change-details,
body.page-changelog-list .change-line-text,
body.page-changelog-manage .change-line-text,
body.page-changelog-list .change-footer,
body.page-changelog-manage .change-footer {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.page-changelog-list .form-grid,
body.page-changelog-manage .form-grid {
  min-width: 0;
}

@media (max-width: 1100px) {
  body.page-changelog-list .form-grid[style*="repeat(3"],
  body.page-changelog-manage .form-grid[style*="repeat(3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.page-changelog-list .form-grid[style*="repeat(3"],
  body.page-changelog-manage .form-grid[style*="repeat(3"],
  body.page-changelog-manage .form-grid[style*="repeat(2"] {
    grid-template-columns: 1fr !important;
  }
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  font-size: 12px;
  color: var(--ink);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.check-chip:hover {
  border-color: #d8a8ae;
}

.check-chip:has(input[type="checkbox"]:checked) {
  border-color: #d75b69;
  background: #f8e7ea;
  box-shadow: 0 4px 10px rgba(215, 38, 56, 0.16);
}

body[data-theme="dark"] .check-chip:has(input[type="checkbox"]:checked) {
  background: #1b2230;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.permissions-panel {
  border: 1px solid color-mix(in srgb, var(--line) 82%, #cbd5e1 18%);
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 95%, #ffffff 5%), var(--panel-soft));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
}

.permissions-form {
  display: grid;
  gap: 14px;
}

.permission-users-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.permission-users-search,
.permission-users-role-filter {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.permission-users-search input,
.permission-users-role-filter select {
  height: 40px;
}

.permission-users-counter {
  align-self: center;
  justify-self: end;
  font-size: 12px;
  color: var(--muted);
}

.permission-users-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.permission-users-page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.permission-users-page-size select {
  width: 80px;
  height: 36px;
}

.permission-page-btn {
  padding: 8px 12px;
  min-height: 36px;
}

.permission-page-indicator {
  min-width: 62px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.permission-user-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.permission-users-toolbar--custom {
  margin-top: 4px;
}

.permissions-section-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.permission-assignment-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  overflow: hidden;
}

.permission-assignment-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--panel) 78%, #ffffff 22%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, #e2e8f0 18%);
}

.permission-assignment-body {
  padding: 12px 14px 14px;
}

.permission-warehouse-tile {
  border: 1px solid color-mix(in srgb, var(--line) 80%, #dbe7ff 20%);
  border-radius: 12px;
  padding: 11px;
  background: color-mix(in srgb, var(--panel) 92%, #ffffff 8%);
  display: grid;
  gap: 9px;
}

.permission-role-template-card,
.permission-group-card,
.permission-user-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.permission-role-template-card,
.permission-group-card {
  padding: 10px;
}

.permission-role-template-card {
  padding: 0;
  overflow: hidden;
}

.permission-role-template-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  font-weight: 700;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, #dbe7ff 20%);
  background: color-mix(in srgb, var(--panel) 90%, #ffffff 10%);
}

.permission-role-template-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.permission-role-template-body {
  padding: 10px;
}

.permission-user-card {
  margin-bottom: 12px;
  padding: 12px;
}

.permission-user-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.permission-functional-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin: -12px -12px 0;
  padding: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, #dbe7ff 20%);
  background: color-mix(in srgb, var(--panel) 90%, #ffffff 10%);
}

.permission-functional-body {
  padding-top: 10px;
}

body[data-theme="dark"] .permission-functional-summary {
  background: color-mix(in srgb, var(--panel) 94%, #0f172a 6%);
  border-bottom-color: color-mix(in srgb, var(--line) 88%, #111827 12%);
}

body[data-theme="dark"] .permission-role-template-summary {
  background: color-mix(in srgb, var(--panel) 94%, #0f172a 6%);
  border-bottom-color: color-mix(in srgb, var(--line) 88%, #111827 12%);
}

.permission-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

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

.permissions-actions {
  justify-content: flex-start;
}

body[data-theme="dark"] .permissions-panel {
  box-shadow: 0 20px 38px rgba(3, 10, 28, 0.38);
}

body[data-theme="dark"] .permission-assignment-summary {
  background: color-mix(in srgb, var(--panel) 92%, #111827 8%);
  border-bottom-color: color-mix(in srgb, var(--line) 90%, #0f172a 10%);
}

body[data-theme="dark"] .permission-warehouse-tile {
  background: color-mix(in srgb, var(--panel) 95%, #0f172a 5%);
}

@media (max-width: 980px) {
  .permission-users-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .permission-users-counter {
    justify-self: start;
  }
  .permission-users-pagination {
    justify-self: start;
    flex-wrap: wrap;
  }
  .permission-fields-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

input,
select,
textarea {
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.sidebar-controls {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.menu-icon svg {
  width: 16px;
  height: 16px;
}

body[data-menu-icons="off"] .nav-link .menu-icon {
  display: none;
}

body[data-menu-icons="off"] .nav-link {
  padding-left: 12px;
}

body[data-theme="dark"] .day-title {
  background: #1a2233;
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="dark"] .window-time {
  color: var(--ink);
}

body[data-theme="dark"] .login-pill {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .test-role {
  color: var(--accent);
}

body[data-theme="dark"] .time-date-input {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(26, 37, 58, 0.94), rgba(14, 24, 41, 0.92));
  border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .time-input {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(26, 37, 58, 0.94), rgba(14, 24, 41, 0.92));
  border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .time-input:focus,
body[data-theme="dark"] .time-date-input:focus,
body[data-theme="dark"] .schedule-filters .date-control #schedule-date:focus {
  border-color: rgba(96, 165, 250, 0.58);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

body[data-theme="dark"] .change-title {
  color: var(--ink);
}

body[data-theme="dark"] .change-version {
  border-color: rgba(96, 165, 250, 0.25);
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
}

body[data-theme="dark"] .change-scope {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
}

body[data-theme="dark"] .change-scope.user {
  border-color: rgba(34, 197, 94, 0.26);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

body[data-theme="dark"] .change-scope.system {
  border-color: rgba(168, 85, 247, 0.28);
  background: rgba(168, 85, 247, 0.12);
  color: #e9d5ff;
}

.slot.outside {
  border-style: dashed;
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.42);
}

.slot.free.outside .slot-label,
.slot.free.outside .slot-meta {
  color: #475569;
}

body[data-theme="dark"] .slot.outside {
  background: rgba(148, 163, 184, 0.10);
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="dark"] .slot.free.outside .slot-label,
body[data-theme="dark"] .slot.free.outside .slot-meta {
  color: #cbd5e1;
}

.slot-action {
  cursor: pointer;
}

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

.detail-item {
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.detail-item strong {
  font-size: 12px;
  color: var(--ink);
}






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

body.popup .sidebar {
  display: none;
}

body.popup .main {
  min-height: auto;
}

body.popup .main::before {
  display: none;
}

body.popup .page-header {
  padding: 16px 20px 8px;
}

body.popup .layout {
  padding: 0 20px 20px;
}

body.popup .page-header,
body.popup .layout {
  max-width: 1120px;
  margin: 0 auto;
}

body.popup .card {
  border-radius: 16px;
}

body.popup .page-footer {
  display: none;
}























.slot-wrapper.filtered {
  visibility: hidden;
}

.slot-wrapper.drag-over .slot {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.slot.dragging {
  opacity: 0.6;
}

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

.detail-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.detail-value {
  font-weight: 600;
  color: var(--ink);
}

body[data-theme="dark"] .detail-value {
  color: #f3f6ff;
}

.slot.optimistic-move {
  outline: 2px solid rgba(34, 197, 94, 0.55);
  outline-offset: 2px;
  box-shadow: 0 10px 18px rgba(16, 185, 129, 0.14);
}

.slot.focus-review-pulse {
  outline: 2px solid rgba(239, 68, 68, 0.8);
  outline-offset: 2px;
  animation: slotFocusPulse 1.1s ease-in-out 0s 3;
}

@keyframes slotFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.08); transform: scale(1.01); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.0); transform: scale(1); }
}

.import-review-page-banner,
.import-review-modal-banner {
  border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, #fff7ed 82%, var(--panel)), var(--panel));
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px -18px rgba(245, 158, 11, 0.45);
}

.import-review-page-banner__title,
.import-review-modal-banner__title {
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 6px;
}

.import-review-page-banner__hint,
.import-review-modal-banner__text {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.import-review-page-banner__actions,
.import-review-modal-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

body[data-theme="dark"] .import-review-page-banner,
body[data-theme="dark"] .import-review-modal-banner {
  background: linear-gradient(180deg, color-mix(in srgb, #78350f 24%, var(--panel)), var(--panel));
  border-color: color-mix(in srgb, #f59e0b 35%, var(--line));
}

.import-review-page-banner__target,
.import-review-modal-banner__target {
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--ink);
}

.import-review-page-banner__steps {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.import-review-target-match {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22);
  animation: slotFocusPulse 1.8s ease 2;
}

body[data-theme="dark"] .import-review-target-match {
  outline-color: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.18);
}






/* Layout fix: keep sidebar left */
.app-shell {
  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr) !important;
  grid-template-areas: "sidebar main";
  align-items: stretch;
}

.app-shell > .sidebar {
  grid-area: sidebar;
}

.app-shell > .main {
  grid-area: main;
  min-width: 0;
}

@media (max-width: 640px) {
  .app-shell {
    grid-template-columns: 1fr !important;
    grid-template-areas: "sidebar" "main";
  }
  .app-shell > .sidebar {
    width: 100%;
  }
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding: 6px 0 4px;
}

.settings-grid .btn-secondary {
  justify-content: center;
}
.user-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  font-weight: 600;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-greeting {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.7);
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.user-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}


.settings-page {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.settings-btn {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  gap: 8px;
  align-content: start;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(215, 38, 56, 0.35);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

.settings-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.settings-desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

/* Ustawienia systemu — hub posegregowany */
.page-settings .settings-hub-layout {
  display: grid;
  gap: 18px;
}

.settings-hub-notice {
  margin-bottom: 0;
}

.settings-hub-notice--success {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0c4a6e;
}

.settings-hub-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, #ffffff 22%);
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 38, 56, 0.1), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.08), transparent 40%),
    linear-gradient(155deg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%), var(--panel));
  box-shadow: var(--shadow);
}

.settings-hub-hero__eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}

.settings-hub-hero__title {
  margin: 0 0 8px;
  font-family: 'Sora', 'Manrope', sans-serif;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.25;
  color: var(--ink);
}

.settings-hub-hero__text {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.settings-hub-hero__stats {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-shrink: 0;
}

.settings-hub-stat {
  min-width: 92px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 86%, #ffffff 14%);
  display: grid;
  gap: 4px;
  text-align: center;
}

.settings-hub-stat__value {
  font-family: 'Sora', 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.settings-hub-stat__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.settings-hub {
  display: grid;
  gap: 16px;
}

.settings-hub-section {
  padding: 18px 18px 16px;
  border-radius: 16px;
}

.settings-hub-section__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.settings-hub-section__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
}

.settings-hub-section__icon svg,
.settings-hub-card__icon svg,
.settings-hub-card__arrow svg {
  width: 20px;
  height: 20px;
}

.settings-hub-section__icon--rose { background: linear-gradient(145deg, #e11d48, #be123c); box-shadow: 0 8px 16px rgba(225, 29, 72, 0.22); }
.settings-hub-section__icon--blue { background: linear-gradient(145deg, #2563eb, #1d4ed8); box-shadow: 0 8px 16px rgba(37, 99, 235, 0.22); }
.settings-hub-section__icon--violet { background: linear-gradient(145deg, #7c3aed, #6d28d9); box-shadow: 0 8px 16px rgba(124, 58, 237, 0.22); }
.settings-hub-section__icon--amber { background: linear-gradient(145deg, #d97706, #b45309); box-shadow: 0 8px 16px rgba(217, 119, 6, 0.22); }
.settings-hub-section__icon--orange { background: linear-gradient(145deg, #ea580c, #c2410c); box-shadow: 0 8px 16px rgba(234, 88, 12, 0.22); }
.settings-hub-section__icon--teal { background: linear-gradient(145deg, #0d9488, #0f766e); box-shadow: 0 8px 16px rgba(13, 148, 136, 0.22); }
.settings-hub-section__icon--slate { background: linear-gradient(145deg, #475569, #334155); box-shadow: 0 8px 16px rgba(71, 85, 105, 0.22); }

.settings-hub-section__title {
  margin: 0 0 4px;
  font-family: 'Sora', 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.settings-hub-section__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

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

.settings-hub-card {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 90%, #ffffff 10%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.settings-hub-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line) 66%);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
  background: color-mix(in srgb, var(--panel) 82%, #ffffff 18%);
}

.settings-hub-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 70%, #ffffff 30%);
  outline-offset: 2px;
}

.settings-hub-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.settings-hub-card__icon--rose { background: linear-gradient(145deg, rgba(225, 29, 72, 0.92), rgba(190, 18, 60, 0.92)); }
.settings-hub-card__icon--blue { background: linear-gradient(145deg, rgba(37, 99, 235, 0.92), rgba(29, 78, 216, 0.92)); }
.settings-hub-card__icon--violet { background: linear-gradient(145deg, rgba(124, 58, 237, 0.92), rgba(109, 40, 217, 0.92)); }
.settings-hub-card__icon--amber { background: linear-gradient(145deg, rgba(217, 119, 6, 0.92), rgba(180, 83, 9, 0.92)); }
.settings-hub-card__icon--orange { background: linear-gradient(145deg, rgba(234, 88, 12, 0.92), rgba(194, 65, 12, 0.92)); }
.settings-hub-card__icon--teal { background: linear-gradient(145deg, rgba(13, 148, 136, 0.92), rgba(15, 118, 110, 0.92)); }
.settings-hub-card__icon--slate { background: linear-gradient(145deg, rgba(71, 85, 105, 0.92), rgba(51, 65, 85, 0.92)); }

.settings-hub-card__body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.settings-hub-card__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-hub-card__title {
  font-weight: 650;
  font-size: 14px;
  color: var(--ink);
}

.settings-hub-card__desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.settings-hub-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.settings-hub-card__badge--ok {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
}

.settings-hub-card__badge--warn {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.28);
}

.settings-hub-card__badge--muted {
  color: var(--muted);
  background: var(--panel-soft);
  border-color: var(--line);
}

.settings-hub-card__arrow {
  color: var(--muted);
  opacity: 0.45;
  transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.settings-hub-card:hover .settings-hub-card__arrow {
  opacity: 1;
  color: var(--brand);
  transform: translateX(2px);
}

body[data-theme="dark"] .settings-hub-hero {
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 38, 56, 0.16), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.12), transparent 40%),
    linear-gradient(155deg, color-mix(in srgb, var(--panel) 96%, #000000 4%), var(--panel));
}

body[data-theme="dark"] .settings-hub-card {
  background: color-mix(in srgb, var(--panel) 94%, #000000 6%);
}

body[data-theme="dark"] .settings-hub-card:hover {
  background: color-mix(in srgb, var(--panel) 88%, #ffffff 12%);
}

@media (max-width: 860px) {
  .settings-hub-hero {
    flex-direction: column;
  }

  .settings-hub-hero__stats {
    width: 100%;
  }

  .settings-hub-stat {
    flex: 1 1 0;
  }
}

@media (max-width: 560px) {
  .settings-hub-grid {
    grid-template-columns: 1fr;
  }

  .settings-hub-section {
    padding: 14px;
  }
}

button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}


.settings-modal-card {
  max-width: 1100px;
  width: min(1100px, 94vw);
}

.settings-modal-body {
  padding: 6px 0 18px;
}

.settings-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.settings-modal-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.settings-kicker {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
}

.settings-summary {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}

.settings-points {
  display: grid;
  gap: 10px;
}

.settings-point {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(215, 38, 56, 0.2);
  background: rgba(215, 38, 56, 0.08);
  font-weight: 600;
  color: var(--ink);
}

.settings-point.muted {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--muted);
}

.settings-embed {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

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

.settings-embed-frame {
  width: 100%;
  height: 420px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}


.page-footer.modern-footer {
  position: fixed;
  left: calc(260px + 32px);
  right: 32px;
  bottom: 16px;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-top: 0;
}

.page-footer.modern-footer .footer-brand {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.page-footer.modern-footer .footer-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.page-footer.modern-footer .footer-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

.page-footer.modern-footer .footer-right {
  text-align: right;
  min-width: 220px;
}

.page-footer.modern-footer .footer-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(215, 38, 56, 0.12);
  border: 1px solid rgba(215, 38, 56, 0.2);
  font-weight: 700;
  font-size: 11px;
  color: var(--ink);
}

.page-footer.modern-footer .footer-chip.is-payday {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.slot-seal-check,
.seal-verify-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #92400e;
  cursor: pointer;
}
.slot-seal-check input,
.seal-verify-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #15803d;
}
.slot-seal-check.is-verified,
.seal-verify-check.is-verified {
  color: #166534;
}
.seal-number-with-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.seal-number-with-check__value {
  font-weight: 700;
}
.seal-verify-meta {
  display: inline;
  margin-top: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.carrier-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.carrier-edit select,
.carrier-edit input {
  min-width: 180px;
  max-width: 100%;
  flex: 1 1 180px;
}

@media (max-width: 900px) {
  .page-footer.modern-footer {
    flex-direction: column;
    text-align: left;
  }
  .page-footer.modern-footer .footer-right {
    text-align: left;
  }
}
@media (max-width: 640px) {
  .main {
    padding: 22px 18px 170px;
  }
  .page-footer.modern-footer {
    left: 16px;
    right: 16px;
    bottom: 12px;
  }
}





.settings-native-wrap {
  margin-top: 18px;
}

.settings-native {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  box-shadow: var(--shadow);
  max-height: 58vh;
  overflow: auto;
}

.settings-native .card {
  box-shadow: none;
  background: var(--panel);
}

.settings-placeholder {
  font-size: 13px;
  color: var(--muted);
}

/* Presentation polish: forms + modals */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: start;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--ink);
  padding: 0 12px;
  height: 40px;
  font-size: 14px;
}

.form-grid textarea {
  min-height: 92px;
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

.form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: none;
  border-color: rgba(215, 38, 56, 0.55);
  box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.16);
}

.form-grid .span-2 {
  grid-column: span 2;
}

.form-grid .span-3 {
  grid-column: 1 / -1;
}

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

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

.slot-create-grid .span-2 {
  grid-column: span 2;
}

.slot-presets-box {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(148, 163, 184, 0.06);
  display: grid;
  gap: 10px;
}

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

.page-change-proposals .proposal-compact-card {
  padding: 14px 15px;
  border-radius: 14px;
}

.page-change-proposals .change-card-preview {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.page-change-proposals .proposal-card-actions {
  margin-top: 6px;
}

.page-change-proposals .proposal-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.page-change-proposals .proposal-list-card {
  overflow: hidden;
}

.page-change-proposals .proposal-list-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 180px;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 90%, #ffffff 10%);
}

.page-change-proposals .proposal-list-toolbar label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.page-change-proposals .proposal-list-toolbar input,
.page-change-proposals .proposal-list-toolbar select {
  height: 36px;
  border-radius: 10px;
}

.page-change-proposals .proposal-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, #ffffff 86%, var(--panel-soft) 14%);
  margin-bottom: 12px;
}

.page-change-proposals .proposal-group[data-proposal-group="active"] {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.88), rgba(255, 255, 255, 0.96));
}

.page-change-proposals .proposal-group[data-proposal-group="done"] {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.86), rgba(255, 255, 255, 0.96));
}

.page-change-proposals .proposal-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.page-change-proposals .proposal-group__head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.page-change-proposals .proposal-card-actions--spread {
  display: flex;
  align-items: center;
  justify-content: space-between !important;
  gap: 8px;
}

.page-change-proposals .proposal-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.page-change-proposals .proposal-card-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.page-change-proposals .proposal-card-badges .status-pill {
  border-width: 1px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.page-change-proposals .proposal-card-badges .status-pill.pending-approval {
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(219, 234, 254, 0.72);
}

.page-change-proposals .proposal-card-badges .status-pill.in_progress {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(254, 243, 199, 0.78);
}

.page-change-proposals .proposal-card-badges .status-pill.done {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(220, 252, 231, 0.76);
}

.page-change-proposals .proposal-card-badges .status-pill.blocked {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.32);
  background: rgba(254, 226, 226, 0.78);
}

.page-change-proposals .proposal-card-date {
  color: var(--muted);
  font-size: 12px;
}

.page-change-proposals .proposal-card-title {
  margin: 8px 0 6px 0;
  line-height: 1.28;
}

.page-change-proposals .proposal-card-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.page-change-proposals .proposal-card-actions__left,
.page-change-proposals .proposal-card-actions__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-change-proposals .proposal-todo-form {
  margin: 0;
}

.page-change-proposals .proposal-details-panel {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 8px;
}

.page-change-proposals .proposal-card-details {
  white-space: pre-wrap;
  color: var(--ink-soft);
}

.page-change-proposals .proposal-admin-note {
  margin-top: 8px;
  background: #f8fafc;
  color: var(--ink-soft);
}

.page-change-proposals .proposal-attachments-grid {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-change-proposals .proposal-attachment-thumb {
  display: block;
  width: 90px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  background: #eef3fb;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.page-change-proposals .proposal-attachment-thumb:hover {
  transform: translateY(-2px);
  border-color: #c4d4ee;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.page-change-proposals .proposal-attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-change-proposals .proposal-compact-card {
  margin-bottom: 12px;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.page-change-proposals .proposal-compact-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.page-change-proposals .proposal-type-add {
  border-left: 4px solid rgba(34, 197, 94, 0.55);
}

.page-change-proposals .proposal-type-change {
  border-left: 4px solid rgba(59, 130, 246, 0.55);
}

.page-change-proposals .proposal-type-remove {
  border-left: 4px solid rgba(239, 68, 68, 0.48);
}

@media (max-width: 980px) {
  .page-change-proposals .proposal-list-toolbar {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"] .page-change-proposals .proposal-group[data-proposal-group="active"] {
  border-color: rgba(96, 165, 250, 0.36);
  background: linear-gradient(180deg, rgba(22, 38, 62, 0.85), rgba(11, 17, 31, 0.94));
}

body[data-theme="dark"] .page-change-proposals .proposal-group[data-proposal-group="done"] {
  border-color: rgba(74, 222, 128, 0.3);
  background: linear-gradient(180deg, rgba(20, 52, 38, 0.78), rgba(11, 17, 31, 0.94));
}

body[data-theme="dark"] .page-change-proposals .proposal-group__head h4 {
  color: #ecf4ff;
}

body[data-theme="dark"] .page-change-proposals .proposal-card-badges .status-pill.pending-approval {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(30, 58, 138, 0.4);
}

body[data-theme="dark"] .page-change-proposals .proposal-card-badges .status-pill.in_progress {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(120, 53, 15, 0.36);
}

body[data-theme="dark"] .page-change-proposals .proposal-card-badges .status-pill.done {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.36);
  background: rgba(20, 83, 45, 0.36);
}

body[data-theme="dark"] .page-change-proposals .proposal-card-badges .status-pill.blocked {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(127, 29, 29, 0.38);
}

.slot-meta--ramp {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
  font-size: 10.5px;
}
.slot-presets-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.05fr) auto minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.slot-presets-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.slot-presets-title {
  min-height: 42px;
}
.slot-presets-row > .btn-secondary,
.slot-presets-row > .btn-primary {
  width: auto;
  min-width: 116px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  align-self: end;
  justify-self: start;
  white-space: nowrap;
  font-size: 13px;
}
#slot-template-clear {
  min-width: 104px;
  padding-inline: 12px;
}
.slot-presets-msg {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}
.slot-presets-msg.success { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10); color: #166534; }
.slot-presets-msg.error { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10); color: #991b1b; }
.slot-presets-msg.warn { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.12); color: #92400e; }

.modal {
  background: radial-gradient(circle at 15% 15%, rgba(215, 38, 56, 0.2), rgba(6, 18, 43, 0.72));
  backdrop-filter: blur(9px);
}

.modal.active .modal-card {
  animation: modalIn 0.24s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-card {
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, #ffffff 22%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, #ffffff 8%), var(--panel));
  box-shadow: 0 26px 90px rgba(12, 20, 40, 0.35);
  padding: 20px;
}

.modal-card.wide {
  max-width: 1240px;
  width: min(1240px, 97vw);
}

.modal .modal-content {
  width: min(520px, 92vw);
  max-width: 520px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, #ffffff 22%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, #ffffff 8%), var(--panel));
  color: var(--ink);
  box-shadow: 0 26px 90px rgba(12, 20, 40, 0.35);
  padding: 20px;
  max-height: 88vh;
  overflow: auto;
  overscroll-behavior: contain;
}

.modal.active .modal-content {
  animation: modalIn 0.24s ease;
}

.modal .modal-body {
  margin-bottom: 16px;
}

.modal .modal-body label {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.modal .modal-body textarea {
  width: 100%;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
  min-height: 84px;
}

.modal .modal-body textarea::placeholder {
  color: var(--muted);
}

.modal .modal-body textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.15);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}

body[data-theme="dark"] .modal .modal-content {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%), var(--panel));
}

.help-modal-card {
  width: min(980px, 96vw);
  max-width: 980px;
  padding: 22px;
  background:
    radial-gradient(circle at 90% 8%, rgba(215, 38, 56, 0.08), transparent 46%),
    radial-gradient(circle at 8% 12%, rgba(59, 130, 246, 0.08), transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%), var(--panel));
}

.help-modal-card .modal-header {
  margin-bottom: 16px;
}

.help-modal-card .modal-header h3 {
  font-size: clamp(26px, 2.5vw, 34px);
}

.help-modal-card .modal-subtitle {
  max-width: 62ch;
}

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

.help-card {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--line) 85%, #ffffff 15%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--input-bg) 82%, #ffffff 18%), color-mix(in srgb, var(--panel) 88%, #ffffff 12%));
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.help-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(215, 38, 56, 0.95), rgba(215, 38, 56, 0.15));
}

.help-card h4 {
  margin: 2px 0 8px;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink);
}

.help-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.help-card li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.help-card strong {
  color: var(--ink);
}

#page-ui-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4000;
}

.page-ui-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(255, 255, 255, 0.98);
  color: #991b1b;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.16);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  font-size: 13px;
}

.page-ui-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.page-ui-toast.success {
  border-color: rgba(34, 197, 94, 0.25);
  color: #166534;
}

.page-ui-toast.warning {
  border-color: rgba(245, 158, 11, 0.35);
  color: #92400e;
}

.page-ui-toast.info {
  border-color: rgba(59, 130, 246, 0.28);
  color: #1e40af;
}

.page-ui-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.42);
  display: grid;
  place-items: center;
  padding: 14px;
  pointer-events: auto;
}

.page-ui-confirm {
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #ffffff 18%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%), var(--panel));
  box-shadow: 0 28px 80px rgba(12, 20, 40, 0.34);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.page-ui-confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, #ffffff 14%);
}

.page-ui-confirm-title {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .01em;
}

.page-ui-confirm-close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #ffffff 16%);
  background: color-mix(in srgb, var(--panel) 88%, #ffffff 12%);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s ease;
}

.page-ui-confirm-close:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.10);
  color: #b91c1c;
}

.page-ui-confirm-message {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-ui-confirm-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.page-ui-confirm-actions .btn-secondary,
.page-ui-confirm-actions .btn-primary,
.page-ui-confirm-actions .btn-danger {
  min-height: 38px;
  min-width: 98px;
  border-radius: 11px;
  font-weight: 700;
}

.page-ui-confirm-actions .btn-danger {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.18), rgba(220, 38, 38, 0.08));
  border-color: rgba(220, 38, 38, 0.38);
  color: #b91c1c;
}

.page-ui-confirm-actions .btn-danger:hover {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.24), rgba(220, 38, 38, 0.12));
  border-color: rgba(220, 38, 38, 0.52);
}

.page-ui-confirm--driver-blacklist {
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 28px 80px rgba(127, 29, 29, 0.28);
}

.page-ui-confirm--driver-blacklist .page-ui-confirm-title {
  color: #b91c1c;
}

.page-ui-confirm--driver-blacklist .page-ui-confirm-message {
  color: #7f1d1d;
}

body[data-theme="dark"] .page-ui-confirm--driver-blacklist {
  border-color: rgba(248, 113, 113, 0.35);
}

body[data-theme="dark"] .page-ui-confirm--driver-blacklist .page-ui-confirm-title {
  color: #fecaca;
}

body[data-theme="dark"] .page-ui-confirm--driver-blacklist .page-ui-confirm-message {
  color: #fee2e2;
}

.page-ui-confirm--shuttle-delete {
  width: min(680px, 100%);
}

.page-ui-confirm--shuttle-pick {
  width: min(460px, 100%);
}

.page-ui-confirm--shuttle-pick .page-ui-confirm-title {
  color: #1d4ed8;
}

.page-ui-confirm--shuttle-pick .page-ui-confirm-message {
  color: #334155;
  line-height: 1.5;
}

.page-ui-confirm-actions--single {
  justify-content: center;
}

.page-ui-confirm-actions--single .btn-primary {
  min-width: 132px;
}

body[data-theme="dark"] .page-ui-confirm--shuttle-pick .page-ui-confirm-title {
  color: #93c5fd;
}

body[data-theme="dark"] .page-ui-confirm--shuttle-pick .page-ui-confirm-message {
  color: #cbd5e1;
}

.shuttle-delete-options {
  display: grid;
  gap: 10px;
}

.shuttle-delete-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, #bfdbfe 22%);
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, #eff6ff 6%), var(--panel));
  cursor: pointer;
}

.shuttle-delete-option input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #dc2626;
}

.shuttle-delete-option span {
  display: grid;
  gap: 3px;
}

.shuttle-delete-option strong {
  color: var(--ink);
  font-size: 14px;
}

.shuttle-delete-option em {
  color: #b91c1c;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .02em;
}

.shuttle-delete-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

body[data-theme="dark"] .page-ui-confirm {
  border-color: color-mix(in srgb, var(--line) 70%, #93c5fd 30%);
  background: linear-gradient(180deg, rgba(10, 18, 34, 0.96), rgba(8, 14, 26, 0.94));
  box-shadow: 0 30px 84px rgba(2, 6, 23, 0.56);
}

body[data-theme="dark"] .page-ui-confirm-head {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .page-ui-confirm-title {
  color: #f8fafc;
}

body[data-theme="dark"] .page-ui-confirm-close {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

body[data-theme="dark"] .page-ui-confirm-close:hover {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

body[data-theme="dark"] .page-ui-confirm-message {
  color: #cbd5e1;
}

body[data-theme="dark"] .page-ui-confirm-actions .btn-danger {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.26), rgba(127, 29, 29, 0.22));
  border-color: rgba(248, 113, 113, 0.42);
  color: #fecaca;
}

body[data-theme="dark"] .shuttle-delete-option {
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.92));
}

body[data-theme="dark"] .shuttle-delete-option strong {
  color: #f8fafc;
}

body[data-theme="dark"] .shuttle-delete-option em {
  color: #fecaca;
}

body[data-theme="dark"] .shuttle-delete-option small {
  color: #cbd5e1;
}

@media (max-width: 560px) {
  .page-ui-confirm {
    border-radius: 14px;
    padding: 14px;
    gap: 10px;
  }

  .page-ui-confirm-head {
    padding-bottom: 8px;
  }

  .page-ui-confirm-title {
    font-size: 17px;
  }

  .page-ui-confirm-message {
    font-size: 14px;
    line-height: 1.45;
  }

  .page-ui-confirm-actions {
    justify-content: stretch;
    gap: 6px;
  }

  .page-ui-confirm-actions .btn-secondary,
  .page-ui-confirm-actions .btn-primary,
  .page-ui-confirm-actions .btn-danger {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    min-height: 40px;
  }
}

.page-ui-composer {
  width: min(640px, 100%);
}

.page-ui-composer .page-ui-confirm-message strong {
  color: var(--ink);
}

.page-ui-composer-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-ui-composer-template,
.page-ui-composer-custom,
.page-ui-composer-body {
  display: grid;
  gap: 6px;
}

.page-ui-composer-template label,
.page-ui-composer-custom label,
.page-ui-composer-body label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.page-ui-composer-template select,
.page-ui-composer-custom textarea,
.page-ui-composer-body textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
}

.page-ui-composer-custom textarea,
.page-ui-composer-body textarea {
  min-height: 96px;
  resize: vertical;
}

.page-ui-composer-counter {
  justify-self: end;
  font-size: 11px;
  color: var(--muted);
}

.page-ui-composer-preview {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 92%, #f8fafc 8%);
  padding: 10px;
}

.page-ui-composer-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.page-ui-composer-preview-warning {
  display: none;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 10px;
  padding: 8px 10px;
}

.page-ui-composer-preview-warning.is-warning {
  display: block;
  color: #92400e;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.page-ui-composer-preview-body {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 72px;
}

.page-ui-composer-preview-body.is-error {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.75);
}

.modal-header {
  margin-bottom: 14px;
  padding: 6px 2px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  font-family: 'Sora', sans-serif;
  font-size: 31px;
  margin: 0;
  line-height: 1.12;
}

.modal-subtitle {
  margin-top: 7px;
  font-size: 13px;
}

.modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  transition: all 0.18s ease;
}

.modal-close:hover {
  border-color: rgba(215, 38, 56, 0.45);
  background: rgba(215, 38, 56, 0.08);
}

.modal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-header-action-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.modal-copy-link {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.modal-copy-link svg {
  width: 17px;
  height: 17px;
}

.modal-copy-link:hover {
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.08);
}

.slot-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-soft) 82%, #ffffff 18%);
  margin-bottom: 14px;
}

.slot-detail-summary > div {
  font-size: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.slot-detail-summary strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#slot-modal .slot-detail-summary {
  overflow: hidden;
}

#slot-modal .slot-detail-summary .status-pill {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  line-height: 1.25;
  text-align: left;
}

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

.slot-incident-panel {
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-soft) 84%, #ffffff 16%);
  display: grid;
  gap: 10px;
}

.slot-incident-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.slot-incident-panel-head strong {
  font-size: 14px;
}

.slot-incident-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, .12);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, .28);
  font-size: 12px;
  font-weight: 700;
}

.slot-incident-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.slot-incident-form .span-3 {
  grid-column: 1 / -1;
}

.slot-incident-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.slot-incident-form input,
.slot-incident-form select,
.slot-incident-form textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
}

.slot-incident-list {
  display: grid;
  gap: 8px;
}

.slot-incident-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.slot-incident-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: rgba(226, 232, 240, .56);
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.slot-incident-summary-pill strong {
  font-weight: 800;
}

.slot-incident-summary-pill.is-open {
  color: #9f1239;
  border-color: rgba(244, 63, 94, .34);
  background: rgba(255, 228, 230, .92);
}

.slot-incident-summary-pill.is-closed {
  color: #166534;
  border-color: rgba(34, 197, 94, .32);
  background: rgba(220, 252, 231, .86);
}

.slot-incident-summary-pill.is-critical {
  color: #991b1b;
  border-color: rgba(239, 68, 68, .4);
  background: rgba(254, 226, 226, .95);
}

.slot-incident-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 88%, #ffffff 12%);
  padding: 10px 11px;
}

.slot-incident-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.slot-incident-copy-url {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.slot-incident-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.slot-incident-item-actions .btn-secondary,
.slot-incident-item-actions .btn-danger {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.slot-incident-item-title {
  font-weight: 700;
  color: var(--ink);
}

.slot-incident-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.slot-incident-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .30);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.slot-incident-badge.type-damage {
  color: #b91c1c;
  background: rgba(254, 226, 226, .78);
  border-color: rgba(239, 68, 68, .34);
}

.slot-incident-badge.type-nonconformity {
  color: #92400e;
  background: rgba(254, 243, 199, .78);
  border-color: rgba(245, 158, 11, .34);
}

.slot-incident-badge.type-other {
  color: #1e3a8a;
  background: rgba(219, 234, 254, .78);
  border-color: rgba(59, 130, 246, .34);
}

.slot-incident-badge.severity-critical,
.slot-incident-badge.severity-high {
  color: #991b1b;
  background: rgba(254, 226, 226, .9);
  border-color: rgba(239, 68, 68, .42);
}

.slot-incident-badge.status-closed {
  color: #166534;
  background: rgba(220, 252, 231, .85);
  border-color: rgba(34, 197, 94, .34);
}

.slot-incident-item-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.slot-incident-item-foot {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.detail-item {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--input-bg) 82%, #ffffff 18%);
  padding: 10px 12px;
}

.detail-item.is-driver-ok {
  border-color: #86efac;
  background: #ecfdf3;
}
.detail-item.is-driver-bad {
  border-color: #fca5a5;
  background: #fef2f2;
}
.driver-checkin-entered {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #991b1b;
}
body[data-theme="dark"] .detail-item.is-driver-ok {
  border-color: #166534;
  background: rgba(22, 163, 74, .2);
}
body[data-theme="dark"] .detail-item.is-driver-bad {
  border-color: #991b1b;
  background: rgba(220, 38, 38, .2);
}
body[data-theme="dark"] .driver-checkin-entered {
  color: #fecaca;
}

.detail-item strong {
  font-size: 14px;
}

.detail-list.is-times .detail-item {
  border-radius: 14px;
  border-color: color-mix(in srgb, var(--line) 76%, #cbd5e1 24%);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.9));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  padding: 9px 10px;
}

.detail-list.is-times .detail-item strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.detail-list.is-times .detail-item-head > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}

body[data-theme="dark"] .detail-list.is-times .detail-item {
  border-color: rgba(71, 85, 105, .4);
  background: linear-gradient(180deg, rgba(15,23,42,.9), rgba(15,23,42,.76));
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.22);
}

body[data-theme="dark"] .detail-list.is-times .detail-item strong {
  color: #f8fafc;
}

body[data-theme="dark"] .detail-list.is-times .detail-item-head > span {
  color: #94a3b8;
}

.detail-item.changed-by-client {
  border-color: rgba(239, 68, 68, 0.70);
  background:
    linear-gradient(180deg, rgba(239, 68, 68, 0.24), rgba(239, 68, 68, 0.14)),
    color-mix(in srgb, var(--input-bg) 82%, #ffffff 18%);
  box-shadow:
    inset 0 0 0 1px rgba(239, 68, 68, 0.24),
    0 10px 22px rgba(239, 68, 68, 0.14);
}

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

.detail-item-head > span {
  margin-bottom: 0;
}

.detail-section-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 -2px;
  padding: 10px 2px 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, #bfdbfe 22%);
}

.detail-section-title span {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.detail-section-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.detail-item-change-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 700;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.22);
}

.detail-item-value-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.detail-item-value-row strong {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.detail-item-copy-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.detail-item-copy-btn svg {
  width: 14px;
  height: 14px;
}

.detail-item:hover .detail-item-copy-btn,
.detail-item-copy-btn:focus-visible,
.detail-item-copy-btn.is-copied {
  opacity: 1;
}

.detail-item-copy-btn:hover {
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.08);
}

.detail-item-copy-btn.is-copied {
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
}

@media (hover: none) {
  .detail-item-copy-btn {
    opacity: 1;
  }
}

body[data-theme="dark"] .detail-item-copy-btn:hover {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.16);
}

body[data-theme="dark"] .detail-item-copy-btn.is-copied {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(34, 197, 94, 0.18);
}

#slot-detail-list .detail-item-copy-btn {
  opacity: 1;
  flex-shrink: 0;
}

/* ── Udoskonalenia wizualne panelu awizacji ── */

/* Nagłówki sekcji z ikonami — nadpisują starsze reguły */
.detail-section-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 2px;
  padding: 9px 12px 8px;
  border-radius: 10px;
  border-bottom: none;
  border-left: 3px solid #2563eb;
  background: linear-gradient(90deg, rgba(37,99,235,0.07) 0%, rgba(37,99,235,0.02) 100%);
}

.detail-section-title > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.detail-section-icon {
  display: inline-flex;
  align-items: center;
  color: #2563eb;
  flex-shrink: 0;
}

.detail-section-title small {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  letter-spacing: 0;
  text-transform: none;
}

.detail-subsection-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 0;
  padding: 8px 10px 6px;
  border-radius: 8px;
  border-left: 3px solid #7c3aed;
  background: linear-gradient(90deg, rgba(124,58,237,0.08) 0%, rgba(124,58,237,0.02) 100%);
}

.detail-subsection-title > span {
  color: #6d28d9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-subsection-title small {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  letter-spacing: 0;
  text-transform: none;
}

body[data-theme="dark"] .detail-subsection-title {
  background: linear-gradient(90deg, rgba(124,58,237,0.16) 0%, rgba(124,58,237,0.04) 100%);
}

body[data-theme="dark"] .detail-subsection-title > span {
  color: #c4b5fd;
}

body[data-theme="dark"] .detail-subsection-title small {
  color: #94a3b8;
}

/* Ulepszone karty pól */
.detail-item {
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #bfdbfe 20%);
  background: color-mix(in srgb, var(--input-bg) 82%, #ffffff 18%);
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 1px 1px rgba(15,23,42,0.02);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.detail-item:hover {
  box-shadow: 0 3px 10px rgba(37,99,235,0.09), 0 1px 3px rgba(15,23,42,0.05);
  border-color: rgba(37,99,235,0.28);
  transform: translateY(-1px);
}

/* Etykiety pól */
.detail-item-head > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #6b7280;
}

/* Wartości pól */
.detail-item-value-row strong {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

/* Wartości puste "-" */
.detail-item-value-row strong:is(:only-child, :first-child) {
  /* handled via JS class */
}

/* Pusta wartość - wizualnie wyciszona */
#slot-detail-list .detail-item .detail-item-value-row strong {
  /* keep same */
}

/* Dark theme */
body[data-theme="dark"] .detail-section-title {
  background: linear-gradient(90deg, rgba(59,130,246,0.14) 0%, rgba(59,130,246,0.04) 100%);
  border-left-color: #3b82f6;
}

body[data-theme="dark"] .detail-section-title > span {
  color: #93c5fd;
}

body[data-theme="dark"] .detail-section-icon {
  color: #60a5fa;
}

body[data-theme="dark"] .detail-section-title small {
  color: #94a3b8;
}

body[data-theme="dark"] .detail-item {
  border-color: color-mix(in srgb, var(--line) 80%, rgba(59,130,246,0.2) 20%);
  box-shadow: 0 1px 3px rgba(2,6,23,0.18);
}

body[data-theme="dark"] .detail-item:hover {
  border-color: rgba(96,165,250,0.35);
  box-shadow: 0 4px 14px rgba(37,99,235,0.14);
}

body[data-theme="dark"] .detail-item-head > span {
  color: #94a3b8;
}

body[data-theme="dark"] .detail-item-value-row strong {
  color: #f1f5f9;
}

/* Prawy panel aside - subtelna poprawa */
.slot-aside-hero {
  background: linear-gradient(145deg, #eff6ff 0%, #e0ecff 60%, #f0f7ff 100%);
  border: 1px solid rgba(37,99,235,0.18);
}

body[data-theme="dark"] .slot-aside-hero {
  background: linear-gradient(145deg, #0c1829 0%, #0f1e35 60%, #0d1a2e 100%);
  border-color: rgba(59,130,246,0.22);
}

.slot-aside-hero__code {
  background: rgba(255,255,255,0.7);
  border-radius: 8px;
  padding: 4px 10px;
  display: inline-block;
  font-weight: 800;
  letter-spacing: .02em;
  border: 1px solid rgba(37,99,235,0.15);
}

body[data-theme="dark"] .slot-aside-hero__code {
  background: rgba(15,23,42,0.5);
  border-color: rgba(96,165,250,0.2);
  color: #e2e8f0;
}

.slot-aside-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.slot-aside-kpi {
  background: color-mix(in srgb, var(--panel-soft) 90%, #fff 10%);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s;
}

.slot-aside-list__row {
  background: color-mix(in srgb, var(--panel-soft) 90%, #fff 10%);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s;
}

.slot-aside-chip--primary {
  background: rgba(37,99,235,0.12);
  border-color: rgba(37,99,235,0.28);
  color: #1d4ed8;
  font-weight: 700;
}

body[data-theme="dark"] .slot-aside-chip--primary {
  background: rgba(59,130,246,0.18);
  border-color: rgba(96,165,250,0.32);
  color: #93c5fd;
}

/* Chipy z ikonami */
.slot-aside-chip--line,
.slot-aside-chip--time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.slot-aside-chip--line {
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.28);
  color: #047857;
  font-weight: 600;
}

.slot-aside-chip--time {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.28);
  color: #92400e;
  font-weight: 600;
}

.slot-aside-chip--no-incident {
  background: rgba(16,185,129,0.08);
  border-color: rgba(16,185,129,0.22);
  color: #065f46;
  font-weight: 600;
}

body[data-theme="dark"] .slot-aside-chip--line {
  background: rgba(16,185,129,0.14);
  border-color: rgba(52,211,153,0.28);
  color: #6ee7b7;
}

body[data-theme="dark"] .slot-aside-chip--time {
  background: rgba(245,158,11,0.14);
  border-color: rgba(251,191,36,0.28);
  color: #fcd34d;
}

body[data-theme="dark"] .slot-aside-chip--no-incident {
  background: rgba(16,185,129,0.12);
  border-color: rgba(52,211,153,0.24);
  color: #6ee7b7;
}

/* Siatka godzin awizacji */
.slot-aside-kpi--wide.sa-times-wrap {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.sa-times-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.sa-time-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-soft) 88%, #fff 12%);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sa-time-card:hover {
  border-color: rgba(37,99,235,0.25);
  box-shadow: 0 2px 8px rgba(37,99,235,0.07);
}

.sa-time-card__icon {
  display: flex;
  align-items: center;
  color: #6b7280;
  margin-bottom: 1px;
}

.sa-time-card__label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #6b7280;
  line-height: 1;
}

.sa-time-card__value {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-all;
}

.sa-time-card__dash {
  font-size: 14px;
  color: #cbd5e1;
  font-weight: 400;
}

/* Kolory ikon per typ czasu */
.sa-time-card--in .sa-time-card__icon { color: #2563eb; }
.sa-time-card--start .sa-time-card__icon { color: #f59e0b; }
.sa-time-card--done .sa-time-card__icon { color: #10b981; }
.sa-time-card--out .sa-time-card__icon { color: #6b7280; }

.sa-time-card--in:not(.sa-time-card--empty) { border-color: rgba(37,99,235,0.2); }
.sa-time-card--start:not(.sa-time-card--empty) { border-color: rgba(245,158,11,0.2); }
.sa-time-card--done:not(.sa-time-card--empty) { border-color: rgba(16,185,129,0.2); }

/* Oś statusu w popupie awizacji (brama → rampa → koniec → wyjazd) */
.sa-status-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.sa-status-timeline__nodes {
  display: flex;
  align-items: center;
  width: 100%;
  padding-top: 14px;
}

.sa-status-timeline__node-wrap {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  width: 34px;
}

.sa-status-timeline__connector {
  flex: 1 1 auto;
  height: 3px;
  min-width: 10px;
  margin-top: 0;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.45);
  position: relative;
}

.sa-status-timeline__connector.is-filled {
  background: #34d399;
}

.sa-status-timeline__connector.is-warn.is-filled {
  background: #fbbf24;
}

.sa-status-timeline__connector.is-breach.is-filled {
  background: #f87171;
}

.sa-status-timeline__seg-label {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  color: #64748b;
  white-space: nowrap;
  pointer-events: none;
}

.sa-status-timeline__connector.is-warn .sa-status-timeline__seg-label {
  color: #b45309;
}

.sa-status-timeline__connector.is-breach .sa-status-timeline__seg-label {
  color: #b91c1c;
}

.sa-status-timeline__node {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.65);
  background: color-mix(in srgb, var(--panel-soft) 88%, #fff 12%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.sa-status-timeline__node.is-done {
  border-color: rgba(52, 211, 153, 0.85);
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.sa-status-timeline__node.is-current {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  outline: 2px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.sa-status-timeline__node.is-rejected {
  border-color: rgba(248, 113, 113, 0.9);
  background: rgba(248, 113, 113, 0.14);
  color: #dc2626;
}

.sa-status-timeline__node--in.is-done { color: #2563eb; border-color: rgba(37, 99, 235, 0.55); background: rgba(37, 99, 235, 0.08); }
.sa-status-timeline__node--start.is-done { color: #d97706; border-color: rgba(245, 158, 11, 0.55); background: rgba(245, 158, 11, 0.1); }
.sa-status-timeline__node--done.is-done { color: #059669; }
.sa-status-timeline__node--out.is-done { color: #475569; border-color: rgba(100, 116, 139, 0.55); background: rgba(100, 116, 139, 0.08); }

.sa-status-timeline__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.sa-status-timeline__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  padding: 0 2px;
}

.sa-status-timeline__short {
  font-size: 10px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.sa-status-timeline__full {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-top: 1px;
  line-height: 1.1;
}

.sa-status-timeline__time {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.sa-status-timeline__sub {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  margin-top: 1px;
}

.sa-status-timeline__dash {
  margin-top: 4px;
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 400;
  line-height: 1;
}

.sa-status-timeline__sla {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.sa-status-timeline__sla .status-pill {
  font-size: 10px;
  padding: 2px 8px;
}

body[data-theme="dark"] .sa-status-timeline__node {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.35);
  color: #94a3b8;
}

body[data-theme="dark"] .sa-status-timeline__short,
body[data-theme="dark"] .sa-status-timeline__time {
  color: #e2e8f0;
}

body[data-theme="dark"] .sa-status-timeline__connector {
  background: rgba(71, 85, 105, 0.65);
}

body[data-theme="dark"] .sa-status-timeline__seg-label {
  color: #94a3b8;
}

/* Eyebrow z ikoną */
.slot-aside-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #1d4ed8;
}

/* Wiersz obsługi */
.sa-list-row--user {
  background: linear-gradient(90deg, rgba(37,99,235,0.04), transparent);
}

.sa-restype {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #475569;
}

/* Dark theme dla nowych elementów */
body[data-theme="dark"] .sa-time-card {
  background: color-mix(in srgb, var(--panel-soft) 88%, #0f172a 12%);
}

body[data-theme="dark"] .sa-time-card:hover {
  border-color: rgba(96,165,250,0.3);
}

body[data-theme="dark"] .sa-time-card__value {
  color: #e2e8f0;
}

body[data-theme="dark"] .sa-time-card__label {
  color: #94a3b8;
}

body[data-theme="dark"] .sa-time-card__dash {
  color: #334155;
}

body[data-theme="dark"] .sa-restype {
  color: #94a3b8;
}

body[data-theme="dark"] .sa-list-row--user {
  background: linear-gradient(90deg, rgba(59,130,246,0.08), transparent);
}

#slot-modal .actions .btn-secondary,
#slot-modal .actions .btn-primary {
  min-width: 150px;
}

body[data-theme="dark"] .modal-card {
  border-color: color-mix(in srgb, var(--line) 70%, #ff6b7e 30%);
  background: linear-gradient(180deg, #0f131d, #0c1018);
}

body[data-theme="dark"] .slot-detail-summary {
  background: #111827;
}

.slot-document-panel {
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-soft) 84%, #ffffff 16%);
  display: grid;
  gap: 10px;
}

.slot-document-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.slot-operation-card-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.slot-operation-card-manual-btn {
  font-size: 12px;
  padding: 6px 10px;
  white-space: nowrap;
}

.slot-document-panel-head strong {
  font-size: 14px;
}

.slot-document-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, .12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, .30);
  font-size: 12px;
  font-weight: 700;
}

.slot-document-list {
  display: grid;
  gap: 8px;
}

.slot-document-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 88%, #ffffff 12%);
  padding: 10px 11px;
  display: grid;
  gap: 6px;
}

.slot-document-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.slot-document-item-title {
  font-weight: 700;
  color: var(--ink);
}

.slot-document-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.slot-document-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .30);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.slot-document-badge.type-file {
  color: #1e3a8a;
  background: rgba(219, 234, 254, .78);
  border-color: rgba(59, 130, 246, .34);
}

.slot-document-badge.type-link {
  color: #92400e;
  background: rgba(254, 243, 199, .78);
  border-color: rgba(245, 158, 11, .34);
}

.slot-document-item-foot {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.slot-document-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.slot-document-item-actions .btn-secondary,
.slot-document-item-actions .btn-danger {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.slot-document-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.slot-document-form .span-3 {
  grid-column: 1 / -1;
}

.slot-document-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.slot-document-form input {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
}

body[data-theme="dark"] .slot-incident-panel {
  border-color: rgba(100, 116, 139, .36);
  background: rgba(15, 23, 42, .54);
}

body[data-theme="dark"] .slot-document-panel {
  border-color: rgba(100, 116, 139, .36);
  background: rgba(15, 23, 42, .54);
}

body[data-theme="dark"] .slot-document-count {
  background: rgba(16, 185, 129, .22);
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, .35);
}

body[data-theme="dark"] .slot-document-item {
  border-color: rgba(100, 116, 139, .34);
  background: rgba(15, 23, 42, .58);
}

.slot-operation-card-panel {
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-soft) 84%, #ffffff 16%);
  display: grid;
  gap: 10px;
}

.slot-operation-card-hint {
  margin: 0;
  font-size: 12px;
}

.slot-operation-card-list {
  display: grid;
  gap: 8px;
}

.slot-operation-card-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  gap: 6px;
}

.slot-operation-card-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.slot-operation-card-item-title {
  font-size: 14px;
}

.slot-operation-card-item-meta {
  font-size: 12px;
  color: var(--muted);
}

.slot-operation-card-details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--accent);
}

.slot-operation-card-form-json {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-soft) 90%, #ffffff 10%);
  border: 1px solid var(--line);
  font-size: 11px;
  white-space: pre-wrap;
  overflow-x: auto;
}

.slot-operation-card-summary {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.slot-operation-card-summary .oc-preview-summary-sep {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.slot-operation-card-preview {
  margin-top: 8px;
}

.oc-preview {
  display: grid;
  gap: 10px;
}

.oc-preview-section {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-soft) 92%, #ffffff 8%);
}

.oc-preview-section-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.oc-preview-grid {
  display: grid;
  gap: 6px;
}

.oc-preview-row {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.oc-preview-label {
  color: var(--muted);
}

.oc-preview-value {
  color: var(--text);
  font-weight: 500;
}

.oc-preview-question {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 6px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  font-size: 12px;
}

.oc-preview-question:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.oc-preview-question-text {
  color: var(--text);
}

.oc-preview-answer {
  font-weight: 700;
  white-space: nowrap;
}

.oc-preview-answer--yes {
  color: #166534;
}

.oc-preview-answer--no {
  color: #b45309;
}

.oc-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.oc-preview-tag {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, #ffffff 88%);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.oc-preview-subcard {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed color-mix(in srgb, var(--line) 85%, transparent);
  background: color-mix(in srgb, var(--panel-soft) 80%, #ffffff 20%);
}

.oc-preview-subcard-title {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--muted);
}

.oc-preview-notes {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
}

.oc-preview-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.oc-preview-section--pallets {
  border-width: 2px;
  border-color: color-mix(in srgb, #166534 35%, var(--line));
  background: color-mix(in srgb, #166534 6%, var(--panel-soft) 94%);
}

.oc-preview-section--pallets .oc-preview-section-title {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.oc-preview-collapsible {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--panel-soft) 94%, #ffffff 6%);
}

.oc-preview-collapsible summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.oc-preview-collapsible .oc-preview-section {
  margin-top: 8px;
  border: 0;
  background: transparent;
  padding: 0;
}

.wh-operation-card-details summary,
.slot-operation-card-details summary {
  cursor: pointer;
  font-weight: 600;
}

.wh-form-preview-full .oc-preview {
  margin-top: 8px;
}

.page-operation-cards .oc-page-hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.oc-manual-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(15, 23, 42, 0.52);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 28px 12px 48px;
}
.oc-manual-modal {
  width: min(880px, 100%);
  background: #fff;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.oc-manual-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #e8eef6;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.oc-manual-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #2563eb;
}
.oc-manual-head h3 { margin: 0 0 6px; font-family: "Sora", sans-serif; }
.oc-manual-head p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.45; }
.oc-manual-body { padding: 16px 22px 8px; display: flex; flex-direction: column; gap: 14px; }
.oc-manual-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.oc-manual-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.oc-manual-field span { font-weight: 650; color: #334155; }
.oc-manual-field input, .oc-manual-field select, .oc-manual-field textarea {
  min-height: 40px; border: 1px solid #d5dee9; border-radius: 12px; padding: 7px 11px; background: #fff;
}
.oc-manual-results { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow: auto; }
.oc-manual-res {
  text-align: left; border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 12px; padding: 9px 11px; cursor: pointer;
}
.oc-manual-res strong { display: block; }
.oc-manual-res span { font-size: 12px; color: #64748b; }
.oc-manual-res-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.oc-manual-res-chip span { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.oc-manual-res-chip strong { font-size: 14px; color: #0f172a; }
.oc-manual-meta { display: grid; gap: 14px; }
.oc-manual-meta-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.oc-manual-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.oc-manual-pill {
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.oc-manual-pill.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.oc-manual-signer-detail { margin-top: 10px; }
.oc-manual-sign-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 70%);
  border: 1px solid #d1fae5;
}
.oc-manual-sign-card span { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #047857; }
.oc-manual-sign-card strong { font-size: 15px; color: #064e3b; font-family: "Sora", sans-serif; }
.oc-manual-selected, .oc-manual-sign, .oc-manual-empty { margin: 0; font-size: 13px; color: #475569; }
.oc-manual-form-block {
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  background: #fbfdff;
}
.oc-manual-section { margin: 0 0 10px; font-size: 14px; font-family: "Sora", sans-serif; }
.oc-manual-yn {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
}
.oc-manual-yn:last-of-type { border-bottom: 0; }
.oc-manual-yn-label { color: #334155; line-height: 1.4; }
.oc-manual-yn-opts { display: flex; gap: 6px; }
.oc-manual-yn-opt {
  cursor: pointer;
}
.oc-manual-yn-opt input { position: absolute; opacity: 0; pointer-events: none; }
.oc-manual-yn-opt span {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #fff;
  font-weight: 700;
  font-size: 12px;
  color: #64748b;
}
.oc-manual-yn-opt--yes input:checked + span { border-color: #059669; background: #ecfdf5; color: #047857; }
.oc-manual-yn-opt--no input:checked + span { border-color: #e11d48; background: #fff1f2; color: #be123c; }
.oc-manual-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.oc-manual-check, .oc-manual-confirm { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.oc-manual-confirm {
  margin: 4px 0 8px;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.oc-manual-pallet-head, .oc-manual-pallet-row, .oc-manual-sec-row {
  display: grid;
  grid-template-columns: 1fr 110px 130px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}
.oc-manual-pallet-head { color: #64748b; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.oc-manual-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; border-top: 1px solid #e8eef6; background: #f8fafc; }
body[data-theme="dark"] .oc-manual-modal { background: #141822; border-color: #262b36; }
body[data-theme="dark"] .oc-manual-head { background: #121722; border-color: #262b36; }
body[data-theme="dark"] .oc-manual-res,
body[data-theme="dark"] .oc-manual-res-chip,
body[data-theme="dark"] .oc-manual-form-block { background: #0e131b; border-color: #262b36; color: #e2e8f0; }
body[data-theme="dark"] .oc-manual-pill { background: #141822; border-color: #334155; color: #cbd5e1; }
body[data-theme="dark"] .oc-manual-pill.is-active { background: #1e3a5f; border-color: #60a5fa; color: #dbeafe; }
body[data-theme="dark"] .oc-manual-sign-card { background: #0f291e; border-color: #14532d; }
body[data-theme="dark"] .oc-manual-sign-card strong { color: #bbf7d0; }
body[data-theme="dark"] .oc-manual-actions { background: #121722; border-color: #262b36; }

/* ── Karty operacyjne (lista, awizacja, harmonogram) ─────────────────── */
.page-operation-cards .oc-page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 55%, #f0fdf4 100%);
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.06);
}

.page-operation-cards .oc-page-eyebrow {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
  font-weight: 700;
}

.page-operation-cards .oc-page-hero h1 {
  margin: 0 0 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
}

.page-operation-cards .oc-page-hero-copy p:last-child {
  margin: 0;
  max-width: 58ch;
  color: var(--muted, #57534e);
  line-height: 1.55;
  font-size: 0.92rem;
}

.page-operation-cards .oc-page-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
}

.page-operation-cards .oc-hero-stat {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
}

.page-operation-cards .oc-hero-stat strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.35rem;
  line-height: 1.1;
  color: #0f172a;
}

.page-operation-cards .oc-hero-stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 600;
}

.page-operation-cards .oc-hero-stat--receipt strong { color: #047857; }
.page-operation-cards .oc-hero-stat--issue strong { color: #1d4ed8; }
.page-operation-cards .oc-hero-stat--labeling strong { color: #b45309; }

.page-operation-cards .oc-page-toolbar {
  margin-bottom: 18px;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.page-operation-cards .oc-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  width: 100%;
}

.page-operation-cards .oc-filters-grid .field {
  margin: 0;
  min-width: 0;
}

.page-operation-cards .oc-filters-search {
  grid-column: span 2;
}

.page-operation-cards .oc-filters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-operation-cards .oc-filters-result-hint {
  margin: -6px 0 14px;
  font-size: 13px;
}

.page-operation-cards .oc-page-empty span {
  font-size: 13px;
}

.oc-card-list {
  display: grid;
  gap: 12px;
}

.oc-card-list--compact {
  gap: 10px;
}

.oc-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px 16px 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--border, #e7e0d5);
  background: var(--card, #fff);
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.04);
  overflow: hidden;
}

.oc-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #94a3b8;
}

.oc-card--receipt::before { background: linear-gradient(180deg, #34d399, #059669); }
.oc-card--issue::before { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.oc-card--labeling::before { background: linear-gradient(180deg, #fbbf24, #d97706); }
.oc-card--other::before { background: linear-gradient(180deg, #cbd5e1, #94a3b8); }

.oc-card-header {
  display: grid;
  gap: 6px;
}

.oc-card-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.oc-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.oc-type-pill--receipt { background: #d1fae5; color: #065f46; }
.oc-type-pill--issue { background: #dbeafe; color: #1e40af; }
.oc-type-pill--labeling { background: #fef3c7; color: #92400e; }
.oc-type-pill--other { background: #f5f5f4; color: #57534e; }

.oc-card-time {
  font-size: 12px;
  color: var(--muted, #78716c);
  font-variant-numeric: tabular-nums;
}

.oc-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #1c1917);
}

.oc-card-reservation-link {
  color: inherit;
  text-decoration: none;
}

.oc-card-reservation-link:hover {
  color: var(--accent, #2563eb);
  text-decoration: underline;
}

.oc-card-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #78716c);
}

.oc-card-meta-sep {
  margin: 0 6px;
  opacity: 0.55;
}

.oc-card-signature {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-soft, #fafaf9) 88%, #ffffff 12%);
  border: 1px solid color-mix(in srgb, var(--line, #e7e0d5) 90%, transparent);
}

.oc-card-signature-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1c1917);
}

.oc-card-signature-name::before {
  content: "✍";
  margin-right: 6px;
  opacity: 0.7;
}

.oc-card-signature-hint {
  font-size: 12px;
  color: var(--muted, #78716c);
}

.oc-card-correction {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--line, #e7e0d5));
  background: color-mix(in srgb, #fffbeb 88%, #ffffff 12%);
}

.oc-card-correction-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text, #1c1917);
  line-height: 1.4;
}

.oc-card-correction-actions {
  margin-top: 12px;
}

.oc-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.oc-card-download {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.oc-correction-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.oc-card-correction-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text, #1c1917);
}

.oc-correction-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.oc-correction-modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}

.oc-correction-modal-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.oc-correction-modal-sub {
  margin: 0 0 14px;
  color: var(--muted, #78716c);
  font-size: 13px;
}

.oc-correction-modal-checks {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.oc-correction-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.35;
}

.oc-correction-modal-note textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line, #e7e0d5);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
}

.oc-correction-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.oc-card-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.oc-card-chip {
  display: inline-grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line, #e7e0d5) 88%, transparent);
  background: color-mix(in srgb, var(--panel-soft, #fafaf9) 92%, #ffffff 8%);
}

.oc-card-chip-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #78716c);
  font-weight: 700;
}

.oc-card-chip-value {
  font-size: 12px;
  color: var(--text, #1c1917);
  font-weight: 600;
  line-height: 1.35;
}

.oc-card-details,
.wh-operation-card-details {
  border: 1px solid color-mix(in srgb, var(--line, #e7e0d5) 90%, transparent);
  border-radius: 12px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--panel-soft, #fafaf9) 94%, #ffffff 6%);
}

.oc-card-details summary,
.wh-operation-card-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #2563eb);
}

.oc-card-details summary::-webkit-details-marker,
.wh-operation-card-details summary::-webkit-details-marker {
  display: none;
}

.oc-card-details summary::before,
.wh-operation-card-details summary::before {
  content: "▸";
  font-size: 12px;
  transition: transform 0.15s ease;
}

.oc-card-details[open] summary::before,
.wh-operation-card-details[open] summary::before {
  transform: rotate(90deg);
}

.oc-card-preview {
  margin-top: 10px;
}

.oc-card-list--compact .oc-card {
  padding: 12px 14px 12px 16px;
}

.slot-operation-card-list .oc-card {
  padding: 12px 14px 12px 16px;
  box-shadow: none;
}

.slot-operation-card-item.oc-card::before {
  width: 3px;
}

.oc-preview-section {
  padding: 12px 14px;
  border-radius: 12px;
}

.oc-preview-section-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--muted) 85%, var(--text) 15%);
}

.oc-preview-row {
  grid-template-columns: minmax(130px, 42%) 1fr;
  gap: 10px;
  padding: 4px 0;
}

.oc-preview-answer {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.oc-preview-answer--yes {
  color: #166534;
  background: #dcfce7;
}

.oc-preview-answer--no {
  color: #9a3412;
  background: #ffedd5;
}

.oc-preview-answer--na,
.oc-preview-answer-- {
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-soft) 90%, #ffffff 10%);
}

body[data-theme="dark"] .page-operation-cards .oc-page-hero {
  border-color: rgba(96, 165, 250, 0.28);
  background:
    radial-gradient(900px 260px at 12% -18%, rgba(59, 130, 246, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(10, 18, 32, 0.9));
}

body[data-theme="dark"] .page-operation-cards .oc-page-hero h1,
body[data-theme="dark"] .page-operation-cards .oc-hero-stat strong {
  color: #e5ecff;
}

body[data-theme="dark"] .page-operation-cards .oc-page-hero-copy p:last-child,
body[data-theme="dark"] .page-operation-cards .oc-hero-stat span {
  color: #9cb0d3;
}

body[data-theme="dark"] .page-operation-cards .oc-hero-stat {
  border-color: rgba(100, 116, 139, 0.34);
  background: rgba(15, 23, 42, 0.62);
}

body[data-theme="dark"] .oc-card {
  border-color: rgba(100, 116, 139, 0.34);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
}

body[data-theme="dark"] .oc-card-title,
body[data-theme="dark"] .oc-card-signature-name,
body[data-theme="dark"] .oc-card-chip-value {
  color: #e5ecff;
}

body[data-theme="dark"] .oc-card-meta,
body[data-theme="dark"] .oc-card-time,
body[data-theme="dark"] .oc-card-signature-hint,
body[data-theme="dark"] .oc-card-chip-label {
  color: #9cb0d3;
}

body[data-theme="dark"] .oc-card-signature,
body[data-theme="dark"] .oc-card-chip,
body[data-theme="dark"] .oc-card-details,
body[data-theme="dark"] .wh-operation-card-details {
  border-color: rgba(100, 116, 139, 0.34);
  background: rgba(15, 23, 42, 0.58);
}

body[data-theme="dark"] .oc-type-pill--receipt { background: rgba(6, 78, 59, 0.45); color: #a7f3d0; }
body[data-theme="dark"] .oc-type-pill--issue { background: rgba(30, 64, 175, 0.4); color: #bfdbfe; }
body[data-theme="dark"] .oc-type-pill--labeling { background: rgba(146, 64, 14, 0.42); color: #fde68a; }
body[data-theme="dark"] .oc-type-pill--other { background: rgba(51, 65, 85, 0.55); color: #cbd5e1; }

body[data-theme="dark"] .oc-preview-section {
  border-color: rgba(100, 116, 139, 0.34);
  background: rgba(15, 23, 42, 0.55);
}

body[data-theme="dark"] .oc-preview-answer--yes {
  color: #bbf7d0;
  background: rgba(6, 78, 59, 0.45);
}

body[data-theme="dark"] .oc-preview-answer--no {
  color: #fed7aa;
  background: rgba(154, 52, 18, 0.38);
}

@media (max-width: 720px) {
  .page-operation-cards .oc-page-hero-stats {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }

  .oc-preview-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .oc-card-header-top {
    align-items: flex-start;
  }

  .page-operation-cards .oc-filters-search {
    grid-column: span 1;
  }
}

body[data-theme="dark"] .slot-operation-card-panel {
  border-color: rgba(100, 116, 139, .36);
  background: rgba(15, 23, 42, .54);
}

body[data-theme="dark"] .slot-operation-card-item {
  border-color: rgba(100, 116, 139, .34);
  background: rgba(15, 23, 42, .58);
}

body[data-theme="dark"] .slot-operation-card-form-json {
  background: rgba(15, 23, 42, .72);
  border-color: rgba(100, 116, 139, .34);
}

body[data-theme="dark"] .slot-incident-count {
  background: rgba(59, 130, 246, .22);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, .35);
}

body[data-theme="dark"] .slot-incident-item {
  border-color: rgba(100, 116, 139, .34);
  background: rgba(15, 23, 42, .58);
}

body[data-theme="dark"] .slot-incident-summary-pill {
  color: #cbd5e1;
  border-color: rgba(100, 116, 139, .36);
  background: rgba(30, 41, 59, .58);
}

body[data-theme="dark"] .slot-incident-summary-pill.is-open {
  color: #fecdd3;
  border-color: rgba(244, 63, 94, .35);
  background: rgba(127, 29, 29, .30);
}

body[data-theme="dark"] .slot-incident-summary-pill.is-closed {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, .34);
  background: rgba(20, 83, 45, .34);
}

body[data-theme="dark"] .slot-incident-summary-pill.is-critical {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .42);
  background: rgba(127, 29, 29, .40);
}

/* ===== Reservation Details Modal - Ultra Clean Transfer ===== */
body.page-schedule #slot-modal .modal-card.slot-modern {
  border-radius: 22px;
  border: 1px solid #cfdbf0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 251, 255, .96));
  box-shadow: 0 28px 72px rgba(20, 42, 84, .16);
  backdrop-filter: blur(8px);
}

body.page-schedule #slot-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 11;
  border-bottom: 1px solid #d9e3f1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .95));
  backdrop-filter: blur(10px);
}

body.page-schedule #slot-modal .modal-header h3 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .1px;
}

body.page-schedule #slot-modal .modal-subtitle {
  color: #5c7194;
  font-size: 12px;
}

body.page-schedule #slot-modal .slot-details-layout {
  gap: 12px;
}

body.page-schedule #slot-modal .slot-details-main,
body.page-schedule #slot-modal .slot-details-aside {
  border: 1px solid #d2dff0;
  border-radius: 16px;
  background: linear-gradient(180deg, #f9fbff, #f2f7ff);
  box-shadow: 0 14px 30px rgba(20, 42, 84, .08);
}

body.page-schedule #slot-modal .slot-detail-tabs {
  border-radius: 12px;
  border: 1px solid #d4e1f2;
  background: #f3f8ff;
  padding: 6px;
}

body.page-schedule #slot-modal .slot-detail-tab {
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  color: #385a8d;
}

body.page-schedule #slot-modal .slot-detail-tab.is-active {
  background: linear-gradient(180deg, #346fe4, #275fd7);
  border-color: #2f66dd;
  color: #fff;
  box-shadow: 0 10px 24px rgba(45, 97, 221, .24);
}

body.page-schedule #slot-modal .slot-detail-summary {
  border-radius: 14px;
  border: 1px solid #d2def0;
  background: linear-gradient(180deg, #f7fbff, #edf4ff);
  box-shadow: 0 10px 20px rgba(17, 38, 77, .07);
}

body.page-schedule #slot-modal .slot-detail-summary > div {
  border-radius: 10px;
  border: 1px solid #d2def0;
  background: #fff;
  box-shadow: 0 8px 16px rgba(17, 38, 77, .06);
}

body.page-schedule #slot-modal .slot-detail-summary strong {
  color: #48638f;
  font-size: 11px;
  letter-spacing: .2px;
  text-transform: uppercase;
  font-weight: 800;
}

body.page-schedule #slot-modal .detail-item {
  border: 1px solid #d2def0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(17, 38, 77, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}

body.page-schedule #slot-modal .detail-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(17, 38, 77, .10);
}

body.page-schedule #slot-modal .detail-item-head > span {
  color: #5c7194;
}

body.page-schedule #slot-modal .detail-item strong {
  color: #203761;
}

body.page-schedule #slot-modal .slot-detail-bottom-actions .btn-primary {
  border-color: #2f66dd;
  background: linear-gradient(180deg, #346fe4, #275fd7);
  color: #fff;
  box-shadow: 0 10px 24px rgba(45, 97, 221, .22);
}

body.page-schedule #slot-modal .slot-detail-bottom-actions .btn-secondary {
  border-color: #c8d9f3;
  background: #f3f8ff;
  color: #2a4a78;
}

body[data-theme="dark"].page-schedule #slot-modal .modal-card.slot-modern {
  border-color: rgba(100, 116, 139, .42);
  background: linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(12, 20, 35, .95));
  box-shadow: 0 28px 70px rgba(2, 6, 23, .45);
}

body[data-theme="dark"].page-schedule #slot-modal .modal-header {
  border-bottom-color: rgba(100, 116, 139, .30);
  background: linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(16, 24, 40, .95));
}

body[data-theme="dark"].page-schedule #slot-modal .slot-details-main,
body[data-theme="dark"].page-schedule #slot-modal .slot-details-aside {
  border-color: rgba(100, 116, 139, .36);
  background: linear-gradient(180deg, rgba(15, 23, 42, .86), rgba(15, 23, 42, .74));
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-tabs {
  border-color: rgba(100, 116, 139, .40);
  background: rgba(15, 23, 42, .62);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-tab {
  color: #c5d4ec;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-summary {
  border-color: rgba(100, 116, 139, .34);
  background: linear-gradient(180deg, rgba(15, 23, 42, .72), rgba(15, 23, 42, .54));
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-summary > div,
body[data-theme="dark"].page-schedule #slot-modal .detail-item {
  border-color: rgba(100, 116, 139, .34);
  background: rgba(15, 23, 42, .66);
}

body[data-theme="dark"].page-schedule #slot-modal .detail-item strong {
  color: #e8eefb;
}
body[data-theme="dark"] .detail-item.changed-by-client {
  border-color: rgba(248, 113, 113, 0.68);
  background:
    linear-gradient(180deg, rgba(127, 29, 29, 0.40), rgba(127, 29, 29, 0.20)),
    rgba(17, 24, 39, 0.8);
  box-shadow:
    inset 0 0 0 1px rgba(248, 113, 113, 0.28),
    0 12px 22px rgba(2, 6, 23, 0.26);
}
body[data-theme="dark"] .detail-item-change-badge {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.28);
  border-color: rgba(248, 113, 113, 0.24);
}

body[data-theme="dark"] .detail-section-title {
  border-bottom-color: rgba(96, 165, 250, 0.22);
}

body[data-theme="dark"] .detail-section-title span {
  color: #93c5fd;
}

body[data-theme="dark"] .detail-section-title small {
  color: #94a3b8;
}

/* Sidebar badge: Akceptacja zmian */
.nav-link-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: var(--muted);
}

.nav-link-badge.is-alert {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
  color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.06);
  animation: sidebarBadgePulse 1.1s ease-in-out 0s 3;
}

@keyframes sidebarBadgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.06); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.03); }
}

body[data-theme="dark"] .nav-link-badge {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.20);
  color: #cbd5e1;
}

body[data-theme="dark"] .nav-link-badge.is-alert {
  background: rgba(127, 29, 29, 0.28);
  border-color: rgba(248, 113, 113, 0.24);
  color: #fecaca;
  box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.14);
}

body[data-theme="dark"] .detail-item {
  background: #0c1320;
}

body[data-theme="dark"] .help-modal-card {
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 107, 126, 0.1), transparent 46%),
    radial-gradient(circle at 8% 12%, rgba(96, 165, 250, 0.08), transparent 38%),
    linear-gradient(180deg, #0f131d, #0c1018);
}

body[data-theme="dark"] .help-card {
  border-color: rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, #121826, #0f1522);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .help-card li {
  color: #aeb7c7;
}

@media (max-width: 1120px) {
  .slot-create-grid,
  .quick-add-grid,
  .detail-list,
  .slot-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .help-modal-grid {
    grid-template-columns: 1fr;
  }
  .slot-create-grid .span-2 {
    grid-column: 1 / -1;
  }
  .slot-presets-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 780px) {
  .modal {
    padding: 10px;
  }
  .modal-card {
    max-height: 93vh;
    padding: 14px;
  }
  .modal-header h3 {
    font-size: 22px;
  }
  .slot-create-grid,
  .quick-add-grid,
  .detail-list,
  .slot-detail-summary,
  .form-grid,
  .help-modal-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2,
  .form-grid .span-3 {
    grid-column: 1 / -1;
  }
}

/* Contrast tweak for reservation popup */
#slot-modal .modal-card {
  background: linear-gradient(180deg, #f6f8fc, #f2f5fa);
}

#slot-modal #slot-create-view,
#slot-modal #slot-details-view {
  background: rgba(225, 233, 245, 0.72);
  border: 1px solid #d7deea;
  border-radius: 14px;
  padding: 12px;
}

#slot-modal #slot-create-view .form-grid input:not([type="checkbox"]):not([type="radio"]),
#slot-modal #slot-create-view .form-grid select,
#slot-modal #slot-create-view .form-grid textarea {
  background: #e6edf6;
  border-color: #bcc8db;
}

#slot-modal #slot-create-view .form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
#slot-modal #slot-create-view .form-grid select:focus,
#slot-modal #slot-create-view .form-grid textarea:focus {
  border-color: #aebcd2;
  box-shadow: 0 0 0 3px rgba(174, 188, 210, 0.3);
}

#slot-modal .slot-detail-summary {
  background: #e9eef7;
  border-color: #d2dae7;
}

body[data-theme="dark"] #slot-modal .modal-card {
  background: linear-gradient(180deg, #101722, #0d141f);
}

body[data-theme="dark"] #slot-modal #slot-create-view,
body[data-theme="dark"] #slot-modal #slot-details-view {
  background: rgba(18, 27, 42, 0.7);
  border-color: #263347;
}

body[data-theme="dark"] #slot-modal #slot-create-view .form-grid input:not([type="checkbox"]):not([type="radio"]),
body[data-theme="dark"] #slot-modal #slot-create-view .form-grid select,
body[data-theme="dark"] #slot-modal #slot-create-view .form-grid textarea {
  background: #111a28;
  border-color: #2b3a52;
}

body[data-theme="dark"] #slot-modal .slot-detail-summary {
  background: #111d2f;
  border-color: #25364e;
}

/* Sidebar categories */
.nav-groups {
  gap: 12px;
}

.nav-category {
  display: grid;
  gap: 8px;
}

.nav-category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-category-title .menu-icon {
  width: 14px;
  height: 14px;
}

.nav-category .nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.nav-dropdown {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-right: 34px;
}

.nav-dropdown > summary::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  opacity: var(--main-overlay-opacity, 0.9);
  transition: transform 0.2s ease;
}

.nav-dropdown[open] > summary::after {
  transform: translateY(-35%) rotate(225deg);
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown[open] > summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
}

.nav-submenu {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.nav-submenu .nav-link {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.nav-category-bottom {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.26);
}

body[data-theme="dark"] .nav-category-title {
  color: rgba(226, 232, 240, 0.78);
  border-bottom-color: rgba(148, 163, 184, 0.24);
}

body[data-theme="dark"] .nav-dropdown {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.45);
}

body[data-theme="dark"] .nav-submenu .nav-link {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .nav-submenu .nav-link.active {
  background: rgba(255, 107, 126, 0.16);
  border-color: rgba(255, 107, 126, 0.30);
}


/* Integrations modal: white card + very light gray fields */
#integrations-modal .modal-card {
  background: #ffffff;
  border: 1px solid #e3e8f0;
}

#integrations-modal .form-grid input:not([type="checkbox"]):not([type="radio"]),
#integrations-modal .form-grid select,
#integrations-modal .form-grid textarea {
  background: #f7f8fa;
  border-color: #e2e7ef;
}

#integrations-modal .form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
#integrations-modal .form-grid select:focus,
#integrations-modal .form-grid textarea:focus {
  border-color: #cfd7e3;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}
/* Unified light theme forms/modals across whole project */
:root {
  --input-bg: #f6f7f9;
  --input-border: #dfe6ef;
}

body:not([data-theme="dark"]) .form-grid input:not([type="checkbox"]):not([type="radio"]),
body:not([data-theme="dark"]) .form-grid select,
body:not([data-theme="dark"]) .form-grid textarea,
body:not([data-theme="dark"]) .filters input,
body:not([data-theme="dark"]) .filters select,
body:not([data-theme="dark"]) .field input,
body:not([data-theme="dark"]) .field select {
  background: #f6f7f9 !important;
  border-color: #dfe6ef !important;
}

body:not([data-theme="dark"]) .form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
body:not([data-theme="dark"]) .form-grid select:focus,
body:not([data-theme="dark"]) .form-grid textarea:focus,
body:not([data-theme="dark"]) .filters input:focus,
body:not([data-theme="dark"]) .filters select:focus,
body:not([data-theme="dark"]) .field input:focus,
body:not([data-theme="dark"]) .field select:focus {
  border-color: #cfd8e5 !important;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08) !important;
}

body:not([data-theme="dark"]) .modal-card,
body:not([data-theme="dark"]) #slot-modal .modal-card,
body:not([data-theme="dark"]) #integrations-modal .modal-card {
  background: #ffffff !important;
  border: 1px solid #e3e8f0 !important;
  box-shadow: 0 26px 90px rgba(12, 20, 40, 0.20) !important;
}

body:not([data-theme="dark"]) .modal .detail-summary,
body:not([data-theme="dark"]) .slot-detail-summary,
body:not([data-theme="dark"]) #slot-modal .slot-detail-summary,
body:not([data-theme="dark"]) .detail-item,
body:not([data-theme="dark"]) #slot-modal #slot-create-view,
body:not([data-theme="dark"]) #slot-modal #slot-details-view {
  background: #ffffff !important;
  border-color: #e3e8f0 !important;
}

body:not([data-theme="dark"]) .modal .form-grid input:not([type="checkbox"]):not([type="radio"]),
body:not([data-theme="dark"]) .modal .form-grid select,
body:not([data-theme="dark"]) .modal .form-grid textarea,
body:not([data-theme="dark"]) #slot-modal #slot-create-view .form-grid input:not([type="checkbox"]):not([type="radio"]),
body:not([data-theme="dark"]) #slot-modal #slot-create-view .form-grid select,
body:not([data-theme="dark"]) #slot-modal #slot-create-view .form-grid textarea,
body:not([data-theme="dark"]) #integrations-modal .form-grid input:not([type="checkbox"]):not([type="radio"]),
body:not([data-theme="dark"]) #integrations-modal .form-grid select,
body:not([data-theme="dark"]) #integrations-modal .form-grid textarea {
  background: #f6f7f9 !important;
  border-color: #dfe6ef !important;
}

.sidebar.sidebar-modern.sidebar-v5 {
  --sb5-bg-1: #0a1020;
  --sb5-bg-2: #20142f;
  --sb5-bg-3: #3a132b;
  --sb5-card: rgba(255, 255, 255, 0.07);
  --sb5-card-border: rgba(96, 165, 250, 0.30);
  --sb5-text: #f0f8ff;
  --sb5-soft: #b8cae4;
  --sb5-accent: #3b82f6;
  --sb5-accent-2: #ef4444;
  --sb5-shadow: 18px 0 44px rgba(8, 8, 8, 0.44);
  width: 286px;
  min-width: 286px;
  padding: 14px 12px 14px;
  gap: 12px;
  color: var(--sb5-text);
  border-right: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 0 26px 26px 0;
  background:
    radial-gradient(520px 320px at -10% -8%, rgba(239, 68, 68, 0.21), transparent 62%),
    radial-gradient(360px 280px at 110% 10%, rgba(59, 130, 246, 0.16), transparent 68%),
    linear-gradient(180deg, var(--sb5-bg-1), var(--sb5-bg-2) 56%, var(--sb5-bg-3));
  box-shadow: var(--sb5-shadow);
}

.sidebar.sidebar-modern.sidebar-v5::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 16%, transparent 84%, rgba(255, 255, 255, 0.04)),
    radial-gradient(700px 200px at 50% -20%, rgba(125, 211, 252, 0.16), transparent 70%);
}

.sidebar.sidebar-modern.sidebar-v5 > * {
  position: relative;
  z-index: 1;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__top,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__footer {
  display: grid;
  gap: 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
.sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
.sidebar.sidebar-modern.sidebar-v5 .nav-category,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-footer {
  border-radius: 16px;
  border: 1px solid var(--sb5-card-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), var(--sb5-card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block {
  min-height: 66px;
  margin: 0;
  padding: 10px 12px;
  gap: 10px;
  overflow: hidden;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-logo {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  flex: 0 0 38px;
  object-fit: contain !important;
  display: block;
  border-radius: 10px;
  padding: 6px;
  background: #fff8eb;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block > img {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  object-fit: contain !important;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--sb5-text);
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block > div > span {
  margin-top: 2px;
  color: var(--sb5-soft);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card {
  margin-top: 0;
  padding: 12px 12px 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-avatar {
  width: 44px;
  height: 44px;
  margin: 0 0 8px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(140deg, #3b82f6, #0ea5e9 52%, #ef4444);
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.35);
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-avatar img,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-avatar > span {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-name {
  font-size: 14px;
  color: var(--sb5-text);
  text-align: left;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-role {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #bfdbfe;
  text-align: left;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-email {
  margin-top: 6px;
  text-align: left;
  color: #c7dcf7;
  font-size: 11px;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-block {
  padding: 11px 12px;
  margin-bottom: 0;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-label {
  color: #93c5fd;
  letter-spacing: 0.08em;
  font-size: 10px;
  text-transform: uppercase;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-name {
  margin-top: 4px;
  color: #f2f9ff;
  font-size: 15px;
  font-weight: 800;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-link {
  margin-top: 10px;
  width: 100%;
  min-height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.68);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.37), rgba(59, 130, 246, 0.20));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(127, 29, 29, 0.24);
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-link:hover {
  border-color: rgba(248, 113, 113, 0.8);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.51), rgba(59, 130, 246, 0.26));
}

.sidebar.sidebar-modern.sidebar-v5 .nav-groups {
  gap: 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category {
  padding: 8px;
  gap: 7px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  padding: 2px 4px 6px;
  border: 0;
  color: #c5d9f8;
  font-size: 10px;
  letter-spacing: 0.10em;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category-title .menu-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  background: rgba(59, 130, 246, 0.16);
  color: #eaf4ff;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  position: relative;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.14), rgba(14, 165, 233, 0.05));
  color: #eaf5ff;
  font-weight: 700;
  padding: 8px 11px;
  backdrop-filter: blur(3px);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link::before,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link:hover,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link:hover {
  transform: translateX(2px);
  border-color: rgba(248, 113, 113, 0.76);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.29), rgba(59, 130, 246, 0.16));
  box-shadow: 0 10px 18px rgba(3, 10, 20, 0.20);
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link.active,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown[open] > summary.nav-link {
  border-color: rgba(248, 113, 113, 0.86);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.49), rgba(59, 130, 246, 0.24));
  color: #f4fbff;
  box-shadow: 0 14px 22px rgba(127, 29, 29, 0.34);
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link.active::before,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown[open] > summary.nav-link::before {
  opacity: 1;
  background: linear-gradient(180deg, #93c5fd, #ef4444);
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link .menu-icon,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link .menu-icon {
  width: 18px;
  height: 18px;
  color: #dbeafe;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  color: #ebf6ff;
  font-size: 12px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary::after {
  right: 13px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-submenu {
  margin-top: 6px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  background: rgba(2, 6, 23, 0.14);
}

.sidebar.sidebar-modern.sidebar-v5 .nav-submenu .nav-link {
  min-height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.62);
  background: linear-gradient(180deg, #eff6ff, #bfdbfe);
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge.is-alert {
  background: linear-gradient(180deg, #fee2e2, #fecaca);
  border-color: rgba(239, 68, 68, 0.48);
  color: #b91c1c;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
  animation: sidebarLinkBadgeBlink 1s ease-in-out infinite;
}

@keyframes sidebarLinkBadgeBlink {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
  }
  50% {
    transform: scale(1.08);
    opacity: 0.7;
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.08);
  }
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge.is-alert {
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.65), rgba(153, 27, 27, 0.55));
  border-color: rgba(248, 113, 113, 0.42);
  color: #fecaca;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.16);
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-footer {
  margin-top: 0;
  padding: 8px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-logout-btn {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.68);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.29), rgba(59, 130, 246, 0.16));
  color: #eef7ff;
  font-weight: 700;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-logout-btn small {
  color: #bfdbfe;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-logout-btn:hover {
  border-color: rgba(248, 113, 113, 0.86);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.41), rgba(59, 130, 246, 0.22));
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 {
  width: 86px;
  min-width: 86px;
  padding-left: 9px;
  padding-right: 9px;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .brand-block > div,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-category-title span:not(.menu-icon),
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .sidebar-logout-btn > span:not(.menu-icon) {
  display: none !important;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .brand-block {
  justify-content: center;
  padding-left: 6px;
  padding-right: 6px;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-category {
  padding: 6px 4px;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .sidebar-logout-btn {
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-link::before,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link::before {
  left: 5px;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  font-size: 9px;
  padding: 0 4px;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown[open] .nav-submenu {
  display: none;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 {
  --sb5-bg-1: #060b16;
  --sb5-bg-2: #0c1226;
  --sb5-bg-3: #1f1025;
  --sb5-card: rgba(13, 26, 52, 0.72);
  --sb5-card-border: rgba(96, 165, 250, 0.42);
  --sb5-text: #eef6ff;
  --sb5-soft: #bdd4f6;
  --sb5-accent: #3b82f6;
  --sb5-accent-2: #ef4444;
  --sb5-shadow: 20px 0 46px rgba(0, 0, 0, 0.62);
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .brand-block,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-category,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-footer {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(239, 68, 68, 0.03)) !important;
  border-color: rgba(96, 165, 250, 0.42) !important;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.16), rgba(239, 68, 68, 0.03)) !important;
  border-color: rgba(96, 165, 250, 0.34) !important;
  color: #eef6ff !important;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-link:hover,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link:hover {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.32), rgba(239, 68, 68, 0.11)) !important;
  border-color: rgba(248, 113, 113, 0.72) !important;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-link.active,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown[open] > summary.nav-link {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.48), rgba(239, 68, 68, 0.21)) !important;
  border-color: rgba(248, 113, 113, 0.86) !important;
  color: #ffffff !important;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .warehouse-link,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-logout-btn {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.34), rgba(239, 68, 68, 0.15)) !important;
  border-color: rgba(248, 113, 113, 0.72) !important;
  color: #ffffff !important;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge {
  background: linear-gradient(180deg, #dbeafe, #93c5fd) !important;
  color: #1e3a8a !important;
  border-color: rgba(96, 165, 250, 0.72) !important;
}

@media (max-width: 900px) {
  .sidebar.sidebar-modern.sidebar-v5 {
    width: 100%;
    min-width: 0;
    border-radius: 0;
    border-right: 0;
    padding: 12px;
  }
}





/* Harmonogram: wieksze odstepy i pewniejsze wyrownanie linii */
.line-header {
  display: flex;
  align-items: center;
}

.line-title {
  line-height: 1;
}

.timeline-header,
.timeline-row,
.summary-row {
  column-gap: 12px;
}

/* Harmonogram: wyrownanie etykiet linii do rzedow kafelkow */
.timeline {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
}

.summary-row {
  margin-top: 0;
}

/* Top header: theme + profile */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.main-header-left {
  min-height: 1px;
}

.main-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-theme-toggle {
  min-width: 132px;
}

.header-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--input-bg);
}

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(215, 38, 56, 0.15);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-profile-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
}

.header-profile-text svg,
.header-logout svg {
  width: 14px;
  height: 14px;
}

.header-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body[data-theme="dark"] .main-header {
  background: #0f141c;
}

body[data-theme="dark"] .header-profile {
  background: #111827;
  border-color: #2a3140;
}

@media (max-width: 900px) {
  .main-header {
    padding: 10px;
  }

  .main-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .header-theme-toggle {
    min-width: auto;
  }

  .main {
    padding-top: 10px;
  }

  .sidebar {
    padding-top: 10px;
  }
}



body:not([data-theme="dark"]) .sidebar {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(165deg, #5f0916 0%, #7d0f21 48%, #9e1730 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05), 10px 0 22px rgba(45, 5, 12, 0.32);
}

body:not([data-theme="dark"]) .sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -24deg,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 8px,
    rgba(255, 255, 255, 0.01) 8px,
    rgba(255, 255, 255, 0.01) 24px
  );
  opacity: 0.14;
  pointer-events: none;
}

body:not([data-theme="dark"]) .sidebar > * {
  position: relative;
  z-index: 1;
}

body:not([data-theme="dark"]) .sidebar h2,
body:not([data-theme="dark"]) .sidebar .warehouse-name,
body:not([data-theme="dark"]) .sidebar .nav-link,
body:not([data-theme="dark"]) .sidebar .theme-toggle {
  color: #fff;
}

body:not([data-theme="dark"]) .sidebar span,
body:not([data-theme="dark"]) .sidebar-footer,
body:not([data-theme="dark"]) .warehouse-label,
body:not([data-theme="dark"]) .warehouse-link,
body:not([data-theme="dark"]) .nav-category-title {
  color: rgba(255, 255, 255, 0.78);
}

body:not([data-theme="dark"]) .brand-block {
  padding: 10px 10px 2px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body:not([data-theme="dark"]) .warehouse-block {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

body:not([data-theme="dark"]) .sidebar .nav-link {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 4px 10px rgba(40, 4, 11, 0.3);
}

body:not([data-theme="dark"]) .sidebar .nav-link:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.17);
}

body:not([data-theme="dark"]) .sidebar .nav-link.active {
  background: #ffffff;
  color: #8b1124;
  border-color: #ffffff;
  box-shadow: 0 8px 16px rgba(88, 8, 22, 0.24);
}

body:not([data-theme="dark"]) .sidebar .nav-link.active span,
body:not([data-theme="dark"]) .sidebar .nav-link.active .menu-icon,
body:not([data-theme="dark"]) .sidebar .nav-link.active .menu-icon svg,
body:not([data-theme="dark"]) .sidebar .nav-link.active .nav-caret {
  color: #111827 !important;
}

body:not([data-theme="dark"]) .sidebar .nav-link.active .menu-icon,
body:not([data-theme="dark"]) .sidebar .nav-link.active .nav-caret {
  color: #8b1124;
}

body:not([data-theme="dark"]) .nav-category-title {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.28);
  padding-bottom: 7px;
}

body:not([data-theme="dark"]) .nav-submenu .nav-link {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.12);
}

body:not([data-theme="dark"]) .sidebar .theme-toggle {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.14);
}

body:not([data-theme="dark"]) .sidebar-footer {
  border-top: 1px dashed rgba(255, 255, 255, 0.24);
  padding-top: 10px;
}

/* ===== Dark mode refresh v2 ===== */
body[data-theme="dark"] {
  background:
    radial-gradient(1200px 700px at 95% -10%, rgba(255, 75, 85, 0.08), transparent 60%),
    radial-gradient(1000px 600px at -10% 110%, rgba(96, 165, 250, 0.07), transparent 58%),
    var(--bg);
}

body[data-theme="dark"]::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 18px
    );
  opacity: 0.35;
}

body[data-theme="dark"] .main {
  background: transparent;
}

body[data-theme="dark"] .main-header {
  background:
    linear-gradient(180deg, rgba(20, 24, 34, 0.88), rgba(12, 15, 22, 0.88));
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

body[data-theme="dark"] .header-profile,
body[data-theme="dark"] .header-logout {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 163, 184, 0.18);
  color: #e5e7eb;
}

body[data-theme="dark"] .header-profile:hover,
body[data-theme="dark"] .header-logout:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.26);
}

body[data-theme="dark"] .page-header h1,
body[data-theme="dark"] .page-header h2,
body[data-theme="dark"] .page-header h3 {
  color: #f8fafc;
}

body[data-theme="dark"] .page-header p {
  color: #a7b0bf;
}

body[data-theme="dark"] .card,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .filters,
body[data-theme="dark"] .group-card,
body[data-theme="dark"] .modal-card,
body[data-theme="dark"] .detail-item,
body[data-theme="dark"] .slot-detail-summary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    var(--panel);
  border-color: rgba(148, 163, 184, 0.14) !important;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.30),
    0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

body[data-theme="dark"] .notice {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.18);
  color: #dbe2ee;
}

body[data-theme="dark"] .table th {
  background: rgba(15, 23, 42, 0.55);
  color: #b4bed0;
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .table td {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

body[data-theme="dark"] .table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    #0f141d;
  border-color: rgba(148, 163, 184, 0.18);
  color: #edf2f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #8691a5;
}

body[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] textarea:focus {
  border-color: rgba(255, 107, 126, 0.42);
  box-shadow:
    0 0 0 3px rgba(255, 75, 85, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .btn-secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border-color: rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
}

body[data-theme="dark"] .btn-secondary:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="dark"] .sidebar .brand-block,
body[data-theme="dark"] .sidebar .warehouse-block,
body[data-theme="dark"] .nav-dropdown {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] .sidebar h2,
body[data-theme="dark"] .sidebar .warehouse-name,
body[data-theme="dark"] .sidebar .nav-link,
body[data-theme="dark"] .sidebar .theme-toggle {
  color: #eef2f7;
}

body[data-theme="dark"] .sidebar span,
body[data-theme="dark"] .sidebar-footer,
body[data-theme="dark"] .warehouse-label,
body[data-theme="dark"] .warehouse-link,
body[data-theme="dark"] .nav-category-title {
  color: rgba(226, 232, 240, 0.78);
}

body[data-theme="dark"] .nav-category-title {
  border-bottom-color: rgba(148, 163, 184, 0.20);
}

body[data-theme="dark"] .sidebar .nav-link.active {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.04), transparent 45%),
    linear-gradient(180deg, rgba(255, 107, 126, 0.20), rgba(255, 75, 85, 0.12));
  border-color: rgba(255, 107, 126, 0.34);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 107, 126, 0.12) inset;
}

body[data-theme="dark"] .nav-submenu {
  background: rgba(8, 12, 18, 0.30);
  border-radius: 10px;
}

body[data-theme="dark"] .nav-submenu .nav-link {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(148, 163, 184, 0.14);
}

body[data-theme="dark"] .nav-submenu .nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .modal {
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(8px);
}

body[data-theme="dark"] .modal-card {
  border-color: rgba(148, 163, 184, 0.18) !important;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 107, 126, 0.08), transparent 40%),
    radial-gradient(circle at 0% 0%, rgba(96, 165, 250, 0.06), transparent 36%),
    linear-gradient(180deg, #121722, #0d121b) !important;
}

body[data-theme="dark"] .change-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0)), var(--panel);
  border-color: rgba(148, 163, 184, 0.14);
}

body[data-theme="dark"] .change-details,
body[data-theme="dark"] .change-footer,
body[data-theme="dark"] .change-date {
  color: #aab4c5;
}

body[data-theme="dark"] .change-line {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .change-line.added {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.32);
}

body[data-theme="dark"] .change-line.removed {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.32);
}

body[data-theme="dark"] .change-line.changed {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="dark"] .change-line strong {
  color: #e6edf7;
}

body[data-theme="dark"] .change-line-text {
  color: #cdd6e3;
}

body[data-theme="dark"] .page-ui-composer-preview {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] .page-ui-composer-preview-warning.is-warning {
  color: #fde68a;
  background: rgba(180, 83, 9, 0.16);
  border-color: rgba(245, 158, 11, 0.24);
}

body[data-theme="dark"] .page-ui-composer-preview-body {
  background: #0f141d;
  border-color: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
}

body[data-theme="dark"] .page-ui-composer-preview-body.is-error {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(127, 29, 29, 0.16);
}

/* Login page dark mode */
body[data-theme="dark"] .login-shell::before {
  opacity: 0.28;
  filter: saturate(0.95) contrast(1.08) brightness(0.72);
}

body[data-theme="dark"] .login-shell::after {
  background: linear-gradient(135deg, rgba(5, 10, 18, 0.88), rgba(17, 34, 66, 0.62));
}

body[data-theme="dark"] .login-backdrop {
  background: radial-gradient(circle, rgba(255, 75, 85, 0.22), rgba(255, 138, 138, 0));
  opacity: 0.9;
}

body[data-theme="dark"] .login-card {
  background: linear-gradient(180deg, rgba(17, 23, 34, 0.92), rgba(11, 16, 24, 0.94));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] .login-head h1 {
  color: #f8fafc;
}

body[data-theme="dark"] .login-head p,
body[data-theme="dark"] .login-fields label,
body[data-theme="dark"] .login-note {
  color: #aab4c5;
}

body[data-theme="dark"] .login-pill {
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

body[data-theme="dark"] .login-logo {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .login-fields input,
body[data-theme="dark"] .login-fields select {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), #0b1220;
  border-color: rgba(148, 163, 184, 0.18);
  color: #edf2f7;
}

body[data-theme="dark"] .login-fields input::placeholder,
body[data-theme="dark"] .login-fields select::placeholder {
  color: #8793a8;
}

body[data-theme="dark"] .login-fields input:focus,
body[data-theme="dark"] .login-fields select:focus {
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

body[data-theme="dark"] .login-actions .login-driver-link {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.18);
  color: #e5e7eb;
}

body[data-theme="dark"] .login-actions .login-driver-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(148, 163, 184, 0.26);
}

body[data-theme="dark"] .login-quick-menu > summary {
  background: rgba(17, 23, 34, 0.82);
  border-color: rgba(148, 163, 184, 0.20);
  color: #eef2f7;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

body[data-theme="dark"] .login-quick-menu-panel {
  border-color: rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(17, 23, 34, 0.94), rgba(11, 16, 24, 0.96));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
}

body[data-theme="dark"] .login-quick-menu-panel a {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.06);
}

body[data-theme="dark"] .login-quick-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 163, 184, 0.16);
}

body[data-theme="dark"] .login-card .notice {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.18);
  color: #e5e7eb;
}

/* Users page premium */
.page-users .page-header {
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 6px;
}

.page-users .page-header h1 {
  font-size: clamp(30px, 2.2vw, 38px);
  letter-spacing: -0.02em;
}

.page-users .page-header .actions .btn-primary {
  min-height: 42px;
  border-radius: 12px;
  padding-inline: 16px;
}

.page-users .card {
  border-radius: 18px;
  border-color: color-mix(in srgb, var(--line) 86%, #ffffff 14%);
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
  overflow: hidden;
}

.page-users .card > h3 {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.page-users .table {
  border-radius: 14px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--line) 90%, #ffffff 10%);
}

.page-users .table th {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.01)),
    color-mix(in srgb, var(--panel) 85%, #f8fafc 15%);
  font-size: 11px;
}

.page-users .table td {
  vertical-align: middle;
}

.page-users .table tbody tr {
  transition: background-color 0.16s ease;
}

.page-users .table tbody tr:hover td {
  background: rgba(15, 23, 42, 0.02);
}

.page-users .table td:last-child {
  white-space: nowrap;
}

/* ---- Tab bar ---- */
.users-tabs-card {
  padding: 0 !important;
  overflow: hidden;
}

.users-tab-bar {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1.5px solid var(--line);
  padding: 0 20px;
  background: color-mix(in srgb, var(--panel) 92%, #f0f4fa 8%);
}

.users-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.users-tab:hover {
  color: var(--text);
}
.users-tab.active {
  color: var(--accent, #2563eb);
  border-bottom-color: var(--accent, #2563eb);
}

.users-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  color: var(--muted);
  line-height: 1;
}
.users-tab.active .users-tab-badge {
  background: color-mix(in srgb, var(--accent, #2563eb) 15%, transparent);
  color: var(--accent, #2563eb);
}

.users-tab-spacer {
  flex: 1;
}

.users-tabs-card .users-tab-search,
.users-tabs-card > form,
.users-tabs-card > div:not(.users-tab-bar):not(.users-table-wrap),
.users-tabs-card > table {
  padding: 0 20px;
}

.users-tabs-card .notice {
  margin: 16px 20px 0;
}

.users-tabs-card .users-tab-search {
  padding: 16px 20px 0;
}

.users-tabs-card .users-table-wrap {
  padding: 0 20px;
}

.users-tabs-card > div:last-child {
  padding: 0 20px 16px;
}

/* badge variants for dispatcher mode */
.page-users .role-badge.badge-info { color: #1d4ed8; background: rgba(219,234,254,.9); border-color: rgba(59,130,246,.26); }
.page-users .role-badge.badge-warn { color: #92400e; background: rgba(254,243,199,.9); border-color: rgba(245,158,11,.26); }
.page-users .role-badge.badge-neu  { color: #475569; background: rgba(241,245,249,.9); border-color: rgba(148,163,184,.22); }

.page-users .table td .btn-secondary {
  min-height: 36px;
  border-radius: 10px;
  padding-inline: 12px;
}

.page-users .form-grid[method="get"],
.page-users form.form-grid[action=""] {
  align-items: end;
}

.page-users .card form.form-grid {
  gap: 12px 12px;
}

.page-users .card form.form-grid > label > input,
.page-users .card form.form-grid > label > select {
  min-height: 42px;
  border-radius: 12px;
}

.page-users .notice {
  border-radius: 12px;
}

.page-users .modal-card {
  border-radius: 22px;
}

.page-users .modal-header h3 {
  letter-spacing: -0.02em;
}

body[data-theme="dark"] .page-users .card {
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.30),
    0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

body[data-theme="dark"] .page-users .table th {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    rgba(15, 23, 42, 0.62);
}

body[data-theme="dark"] .page-users .table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .page-users .table td .btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.16);
}

body[data-theme="dark"] .page-users .table td .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.24);
}

@media (max-width: 1100px) {
  .page-users .page-header {
    align-items: flex-start;
  }
  .page-users .table {
    display: block;
    overflow-x: auto;
  }
}

/* Login premium refresh */
.login-shell {
  padding: clamp(32px, 6vh, 72px) 18px;
}

.login-shell::before {
  opacity: 0.42;
  filter: saturate(1.08) contrast(1.06) brightness(0.96);
  transform: scale(1.02);
}

.login-shell::after {
  background:
    radial-gradient(circle at 85% 12%, rgba(215, 38, 56, 0.20), transparent 42%),
    radial-gradient(circle at 15% 85%, rgba(96, 165, 250, 0.16), transparent 46%),
    linear-gradient(135deg, rgba(9, 20, 45, 0.82), rgba(20, 48, 110, 0.34));
}

.login-backdrop {
  width: 680px;
  height: 680px;
  top: -220px;
  right: -220px;
  background: radial-gradient(circle, rgba(215, 38, 56, 0.34), rgba(240, 138, 75, 0));
  filter: blur(6px);
}

.login-card {
  max-width: 560px;
  border-radius: 28px;
  padding: 34px 36px 30px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 26px 60px rgba(15, 23, 42, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 -1px 0 rgba(255, 255, 255, 0.15) inset;
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.login-head {
  display: grid;
  gap: 6px;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.login-pill {
  justify-self: start;
  margin-top: 2px;
  padding: 7px 13px;
  font-size: 11px;
  letter-spacing: 0.07em;
  border: 1px solid rgba(30, 78, 168, 0.14);
}

.login-head h1 {
  margin: 10px 0 2px;
  font-size: clamp(30px, 2.2vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.login-head p {
  font-size: 15px;
  line-height: 1.45;
}

.login-fields {
  margin-top: 20px;
  gap: 16px;
}

.login-fields label {
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}

.login-fields input,
.login-fields select {
  height: 48px;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
}

.login-actions {
  margin-top: 20px;
  gap: 12px;
}

.login-actions .btn-primary,
.login-actions .login-driver-link {
  min-height: 44px;
  border-radius: 12px;
  padding-left: 16px;
  padding-right: 16px;
  font-weight: 700;
}

.login-note {
  margin-top: 16px;
  line-height: 1.4;
}

.test-accounts {
  margin-top: 18px;
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
}

.test-account {
  border-radius: 12px;
}

.login-quick-menu {
  top: 18px;
  right: 18px;
}

.login-quick-menu > summary {
  min-width: 186px;
  border-radius: 14px;
  padding: 11px 13px;
}

.login-quick-menu-panel {
  border-radius: 16px;
  padding: 8px;
}

body[data-theme="dark"] .login-card {
  border-color: rgba(148, 163, 184, 0.20);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.46),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
}

body[data-theme="dark"] .login-head p {
  color: #b5bfd0;
}

body[data-theme="dark"] .login-pill {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(148, 163, 184, 0.12);
}

body[data-theme="dark"] .test-accounts {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(148, 163, 184, 0.16);
}

@media (max-width: 640px) {
  .login-card {
    max-width: 100%;
    border-radius: 22px;
    padding: 24px 22px 22px;
  }
  .login-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
  .login-head h1 {
    font-size: 28px;
  }
  .login-fields input,
  .login-fields select {
    height: 44px;
    font-size: 14px;
  }
}

.arrival-alert-bar {
  margin: 8px 0 14px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 245, 245, 0.95), rgba(255, 236, 236, 0.95));
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.08);
  padding: 12px;
}

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

.arrival-alert-head strong {
  font-size: 15px;
  color: #991b1b;
}

.arrival-alert-list {
  display: grid;
  gap: 8px;
}

.schedule-offline-banner {
  margin-bottom: 10px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(254, 243, 199, 0.88));
  color: #92400e;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  font-size: 12px;
}

.schedule-offline-banner strong {
  font-size: 13px;
}

.arrival-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
}

.arrival-alert-main {
  min-width: 0;
}

.arrival-alert-title {
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 3px;
}

.arrival-alert-msg {
  color: #1f2937;
  margin-bottom: 2px;
  word-break: break-word;
}

.arrival-alert-meta {
  font-size: 12px;
  color: #64748b;
  word-break: break-word;
}

.arrival-alert-ack {
  flex: 0 0 auto;
  padding: 7px 12px;
  min-height: 34px;
}

.arrival-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.arrival-alert-details,
.arrival-alert-ack {
  min-width: 88px;
}

@media (max-width: 900px) {
  .arrival-alert-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .arrival-alert-actions {
    width: 100%;
  }

  .arrival-alert-details,
  .arrival-alert-ack {
    width: 100%;
  }
}

.offline-queue-panel {
  margin: 10px 0 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(255, 247, 222, 0.92));
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.1);
  padding: 12px;
}

.offline-queue-panel.is-offline {
  border-color: rgba(220, 38, 38, 0.32);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(254, 226, 226, 0.92));
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.1);
}

.offline-queue-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.offline-queue-panel__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.offline-queue-panel__title-wrap strong {
  font-size: 15px;
  color: #7c2d12;
}

.offline-queue-count {
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  background: rgba(255, 255, 255, 0.78);
  color: #92400e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.offline-queue-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.offline-queue-panel__actions .btn-secondary,
.offline-queue-panel__actions .btn-primary {
  min-height: 34px;
  padding: 7px 12px;
}

.offline-queue-note {
  color: #92400e;
  font-size: 12px;
  margin-bottom: 10px;
}

.offline-queue-list {
  display: grid;
  gap: 8px;
}

.offline-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
}

.offline-queue-item__main {
  min-width: 0;
}

.offline-queue-item__title {
  font-weight: 700;
  color: #7c2d12;
  margin-bottom: 4px;
}

.offline-queue-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 12px;
}

.offline-queue-item__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(239, 246, 255, 0.96);
  color: #1d4ed8;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.offline-queue-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.offline-queue-item__actions .btn-secondary {
  min-height: 34px;
  padding: 7px 12px;
}

@media (max-width: 900px) {
  .offline-queue-panel__head,
  .offline-queue-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .offline-queue-panel__actions,
  .offline-queue-item__actions {
    width: 100%;
  }

  .offline-queue-panel__actions .btn-secondary,
  .offline-queue-panel__actions .btn-primary,
  .offline-queue-item__actions .btn-secondary {
    width: 100%;
  }
}

/* ===== Global panel premium refresh (safe overrides) ===== */
.main {
  position: relative;
}

.main::before {
  content: "";
  position: fixed;
  inset: 0 0 0 280px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 88% 8%, rgba(96,165,250,.10), transparent 42%),
    radial-gradient(circle at 10% 84%, rgba(239,68,68,.08), transparent 40%);
  opacity: .9;
}

.main > :not(.modal) {
  position: relative;
  z-index: 1;
}

.page-header {
  margin-bottom: 14px;
}

.page-header h1 {
  letter-spacing: -0.03em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  line-height: 1.08;
}

.page-header p {
  color: color-mix(in srgb, var(--muted) 82%, #cbd5e1 18%);
  margin: 8px 0 0;
  max-width: 76ch;
  line-height: 1.4;
}

.page-header h1 svg,
.page-header h1 .icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.page-header .actions,
.page-header .header-actions,
.page-header .client-header-actions {
  align-self: center;
}

/* Global page header: compact frosted card used across pages */
.main > .page-header {
  position: relative;
  overflow: visible;
  border-radius: 18px;
  padding: 16px 18px;
  margin: 0 0 14px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, #fff 22%);
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255,255,255,.55);
}

.main > .page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(239,68,68,.10), transparent 45%),
    radial-gradient(circle at 88% 16%, rgba(59,130,246,.10), transparent 48%),
    linear-gradient(
      180deg,
      rgba(255,255,255,.94) 0%,
      rgba(255,255,255,.88) 48%,
      rgba(255,255,255,.82) 100%
    );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.main > .page-header > * {
  position: relative;
  z-index: 1;
}

.main > .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.client-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.client-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
  background: rgba(255,255,255,.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(15,23,42,.07);
}

.client-lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}

.client-lang-chip:hover {
  color: var(--ink);
  background: rgba(255,255,255,.66);
  border-color: color-mix(in srgb, var(--line) 80%, #fff 20%);
  transform: translateY(-1px);
}

.client-lang-chip.active {
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 75%, #fff 25%);
  border-color: color-mix(in srgb, var(--line) 70%, #fff 30%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.client-lang-flag {
  width: 18px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  display: inline-block;
  flex: 0 0 auto;
}

.client-lang-flag.flag-pl {
  background:
    linear-gradient(180deg, #ffffff 0 50%, #dc2626 50% 100%);
}

.client-lang-flag.flag-en {
  background:
    linear-gradient(90deg, transparent 40%, #dc2626 40% 60%, transparent 60%),
    linear-gradient(180deg, transparent 38%, #dc2626 38% 62%, transparent 62%),
    #ffffff;
}

.client-lang-flag.flag-de {
  background:
    linear-gradient(180deg, #111827 0 33.33%, #dc2626 33.33% 66.66%, #f59e0b 66.66% 100%);
}

.client-lang-flag.flag-ua {
  background:
    linear-gradient(180deg, #2563eb 0 50%, #facc15 50% 100%);
}

.client-lang-flag.flag-tr {
  background: #dc2626;
  position: relative;
}

.client-lang-flag.flag-tr::before,
.client-lang-flag.flag-tr::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.client-lang-flag.flag-tr::before {
  width: 7px;
  height: 7px;
  left: 5px;
  top: 3px;
  border: 1px solid #fff;
  box-shadow: inset 2px 0 0 1px #dc2626;
  background: transparent;
}

.client-lang-flag.flag-tr::after {
  width: 2px;
  height: 2px;
  left: 12px;
  top: 5px;
  background: #fff;
}

.client-lang-code {
  letter-spacing: .04em;
}

.client-profile-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.client-profile-shortcut.active {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(239, 68, 68, .08);
  color: #b91c1c;
}

body[data-theme="dark"] .client-lang-switch {
  background: rgba(15,23,42,.44);
  border-color: rgba(148,163,184,.22);
  box-shadow: 0 10px 22px rgba(2,6,23,.3);
}

body[data-theme="dark"] .client-lang-chip:hover {
  background: rgba(30,41,59,.72);
  border-color: rgba(148,163,184,.2);
}

body[data-theme="dark"] .client-lang-chip.active {
  background: rgba(51,65,85,.86);
  border-color: rgba(148,163,184,.24);
  color: #f8fafc;
}

body[data-theme="dark"] .client-profile-shortcut.active {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.32);
  color: #fecaca;
}

body[data-theme="dark"] .main > .page-header::before {
  background:
    radial-gradient(circle at 10% 14%, rgba(239,68,68,.12), transparent 44%),
    radial-gradient(circle at 90% 18%, rgba(59,130,246,.10), transparent 46%),
    linear-gradient(
      180deg,
      rgba(30,41,59,.78) 0%,
      rgba(30,41,59,.66) 52%,
      rgba(30,41,59,.58) 100%
    );
}

body[data-theme="dark"] .main > .page-header {
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow:
    0 12px 30px rgba(2, 6, 23, 0.34),
    inset 0 1px 0 rgba(255,255,255,.04);
}

body[data-theme="dark"] .page-header p {
  color: color-mix(in srgb, var(--muted) 86%, #cbd5e1 14%);
}

@media (max-width: 900px) {
  .main > .page-header {
    padding: 14px 14px;
    border-radius: 16px;
  }

  .page-header h1 {
    gap: 10px;
  }

  .page-header h1 svg,
  .page-header h1 .icon {
    width: 20px;
    height: 20px;
  }
}

.card {
  border-radius: 18px;
  border-color: color-mix(in srgb, var(--line) 84%, #fff 16%);
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.04)),
    var(--panel);
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255,255,255,.65) inset;
}

.card h3 {
  letter-spacing: -0.02em;
}

.btn-primary,
.btn-secondary {
  border-radius: 12px;
  transition: transform .14s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  border-radius: 12px;
}

.table {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 90%, #fff 10%);
}

.table th {
  background:
    linear-gradient(180deg, rgba(15,23,42,.03), rgba(15,23,42,.01)),
    color-mix(in srgb, var(--panel) 88%, #f8fafc 12%);
}

.table tbody tr:hover td {
  background: rgba(15,23,42,.02);
}

body[data-theme="dark"] .main::before {
  inset: 0 0 0 280px;
  background:
    radial-gradient(circle at 88% 8%, rgba(96,165,250,.14), transparent 42%),
    radial-gradient(circle at 10% 84%, rgba(239,68,68,.08), transparent 40%);
  opacity: .85;
}

body[data-theme="dark"] .card {
  border-color: rgba(148,163,184,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)),
    rgba(12, 18, 32, 0.84);
  box-shadow:
    0 18px 44px rgba(0,0,0,.32),
    0 1px 0 rgba(255,255,255,.03) inset;
}

body[data-theme="dark"] .table th {
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    rgba(17, 24, 39, .86);
}

body[data-theme="dark"] .table tbody tr:hover td {
  background: rgba(255,255,255,.03);
}

@media (max-width: 1100px) {
  .main::before,
  body[data-theme="dark"] .main::before {
    inset: 0;
  }
}

/* ===== Users page v2 premium tools ===== */
.page-users .users-table-wrap {
  max-height: min(62vh, 720px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
  background: color-mix(in srgb, var(--panel) 92%, #fff 8%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

.page-users .users-table {
  margin: 0;
  border: 0;
  border-radius: 0;
  min-width: 1180px;
}

.page-users .users-table-wrap--compact {
  max-height: min(34vh, 420px);
}

.page-users .users-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(6px);
}

.page-users .users-table td {
  white-space: nowrap;
}

.page-users .users-table td:nth-child(2),
.page-users .users-table td:nth-child(3),
.page-users .users-table td:nth-child(4),
.page-users .users-table td:nth-child(8) {
  white-space: normal;
}

.page-users .role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .01em;
  white-space: nowrap;
}

.page-users .role-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
}

.page-users .role-badge.role-admin { color: #991b1b; background: rgba(254, 226, 226, .9); border-color: rgba(239, 68, 68, .28); }
.page-users .role-badge.role-manager { color: #92400e; background: rgba(254, 243, 199, .92); border-color: rgba(245, 158, 11, .28); }
.page-users .role-badge.role-warehouse-admin { color: #1d4ed8; background: rgba(219, 234, 254, .92); border-color: rgba(59, 130, 246, .26); }
.page-users .role-badge.role-dispatcher { color: #0f766e; background: rgba(204, 251, 241, .92); border-color: rgba(20, 184, 166, .26); }
.page-users .role-badge.role-tv-board { color: #5b21b6; background: rgba(237, 233, 254, .92); border-color: rgba(139, 92, 246, .26); }
.page-users .role-badge.role-viewer { color: #475569; background: rgba(241, 245, 249, .94); border-color: rgba(148, 163, 184, .24); }
.page-users .role-badge.role-client { color: #166534; background: rgba(220, 252, 231, .92); border-color: rgba(34, 197, 94, .22); }
.page-users .role-badge.role-default { color: #334155; background: rgba(241,245,249,.9); border-color: rgba(148,163,184,.22); }

.page-users .users-picker-label {
  display: grid;
  gap: 7px;
}

.page-users .users-multi-picker {
  position: relative;
  width: 100%;
}

.page-users .users-multi-picker summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #3b82f6 18%);
  border-radius: 14px;
  padding: 10px 13px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 92%, #fff 8%);
  cursor: pointer;
  list-style: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

.page-users .users-multi-picker summary::-webkit-details-marker {
  display: none;
}

.page-users .users-multi-picker summary::after {
  content: "v";
  color: var(--muted);
  font-weight: 900;
}

.page-users .users-multi-picker[open] summary::after {
  content: "^";
}

.page-users .users-multi-picker summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.page-users .users-multi-picker summary small {
  margin-left: auto;
  border-radius: 999px;
  padding: 3px 8px;
  color: #1d4ed8;
  background: rgba(219, 234, 254, .82);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.page-users .users-multi-picker__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  max-height: 280px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 16px;
  padding: 8px;
  background: color-mix(in srgb, var(--panel) 96%, #fff 4%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}

.page-users .users-multi-picker__option,
.page-users .users-multi-picker__empty {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  padding: 9px 10px;
  color: var(--ink);
  cursor: pointer;
}

.page-users .users-multi-picker__option:hover,
.page-users .users-multi-picker__empty:hover {
  background: rgba(59, 130, 246, .10);
}

.page-users .users-multi-picker__empty {
  margin-bottom: 5px;
  color: var(--muted);
  border-bottom: 1px dashed rgba(148, 163, 184, .28);
  border-radius: 12px 12px 8px 8px;
}

body.page-users.users-density-compact .page-users .users-table-wrap {
  max-height: min(68vh, 860px);
}

body.page-users.users-density-compact .page-users .users-table th,
body.page-users.users-density-compact .page-users .users-table td {
  padding: 8px 10px;
}

body.page-users.users-density-compact .page-users .users-table th { font-size: 10px; }
body.page-users.users-density-compact .page-users .users-table td { font-size: 12px; }
body.page-users.users-density-compact .page-users .role-badge { min-height: 24px; padding: 3px 8px; font-size: 11px; }
body.page-users.users-density-compact .page-users .table td .btn-secondary { min-height: 32px; padding-inline: 10px; }

body[data-theme="dark"] .page-users .users-table-wrap {
  border-color: rgba(148,163,184,.14);
  background: rgba(10, 16, 28, .62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.page-users .driver-app-accounts-intro {
  margin-bottom: 14px;
}

.page-users .driver-app-accounts-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.page-users .driver-app-accounts-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.page-users .driver-app-acc-code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--input-bg);
  border: 1px solid var(--line);
}

.page-users .driver-app-acc-status {
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
}

.page-users .driver-app-acc-status.on {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}

.page-users .driver-app-acc-status.off {
  color: var(--muted);
  border-color: var(--line);
  background: var(--input-bg);
}

.page-users .driver-app-acc-dt {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.page-users .driver-app-account-row {
  cursor: pointer;
}

body[data-theme="dark"] .page-users .users-multi-picker summary,
body[data-theme="dark"] .page-users .users-multi-picker__panel {
  border-color: rgba(96, 165, 250, .22);
  color: #f8fafc;
  background: rgba(15, 23, 42, .96);
}

body[data-theme="dark"] .page-users .users-multi-picker summary small {
  color: #bfdbfe;
  background: rgba(30, 58, 138, .46);
}

body[data-theme="dark"] .page-users .users-multi-picker__option,
body[data-theme="dark"] .page-users .users-multi-picker__empty {
  color: #e2e8f0;
}

body[data-theme="dark"] .page-users .users-multi-picker__option:hover,
body[data-theme="dark"] .page-users .users-multi-picker__empty:hover {
  background: rgba(96, 165, 250, .12);
}

body[data-theme="dark"] .page-users .role-badge.role-admin { color: #fecaca; background: rgba(127, 29, 29, .35); border-color: rgba(248, 113, 113, .25); }
body[data-theme="dark"] .page-users .role-badge.role-manager { color: #fde68a; background: rgba(120, 53, 15, .34); border-color: rgba(251, 191, 36, .20); }
body[data-theme="dark"] .page-users .role-badge.role-warehouse-admin { color: #bfdbfe; background: rgba(30, 58, 138, .34); border-color: rgba(96, 165, 250, .22); }
body[data-theme="dark"] .page-users .role-badge.role-dispatcher { color: #99f6e4; background: rgba(17, 94, 89, .34); border-color: rgba(45, 212, 191, .20); }
body[data-theme="dark"] .page-users .role-badge.role-tv-board { color: #ddd6fe; background: rgba(76, 29, 149, .36); border-color: rgba(167, 139, 250, .22); }
body[data-theme="dark"] .page-users .role-badge.role-viewer { color: #cbd5e1; background: rgba(51, 65, 85, .36); border-color: rgba(148, 163, 184, .18); }
body[data-theme="dark"] .page-users .role-badge.role-client { color: #bbf7d0; background: rgba(20, 83, 45, .34); border-color: rgba(74, 222, 128, .20); }

/* SLA / kontrola czasu report */
.sla-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sla-summary-card {
  position: relative;
  overflow: hidden;
}

.sla-summary-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  opacity: .9;
}

.sla-summary-card.sla-all::after { background: #94a3b8; }
.sla-summary-card.sla-ok::after { background: #10b981; }
.sla-summary-card.sla-warn::after { background: #f59e0b; }
.sla-summary-card.sla-breach::after { background: #ef4444; }

.sla-row-ok > td:first-child { box-shadow: inset 3px 0 0 rgba(16, 185, 129, 0.35); }
.sla-row-warn > td:first-child { box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.45); }
.sla-row-breach > td:first-child { box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.5); }

.sla-row-breach {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.03), transparent 22%);
}

.sla-row-warn {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.03), transparent 20%);
}

body[data-theme="dark"] .sla-summary-card.sla-all::after { background: #cbd5e1; opacity: .5; }
body[data-theme="dark"] .sla-summary-card.sla-ok::after { background: #34d399; }
body[data-theme="dark"] .sla-summary-card.sla-warn::after { background: #fbbf24; }
body[data-theme="dark"] .sla-summary-card.sla-breach::after { background: #f87171; }

body[data-theme="dark"] .sla-row-breach {
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.22), transparent 24%);
}

body[data-theme="dark"] .sla-row-warn {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.18), transparent 22%);
}

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

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

.sla-aggregate-head {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.sla-mini-table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.6);
}

.sla-mini-table {
  margin: 0;
}

.sla-mini-table th,
.sla-mini-table td {
  white-space: nowrap;
}

.sla-count-badge {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.summary-capacity-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.summary-capacity-actions .add-icon {
  cursor: pointer;
}

.summary-capacity-actions .minus-icon {
  background: rgba(148, 163, 184, 0.95);
}

.summary-capacity-actions .minus-icon:hover {
  background: rgba(100, 116, 139, 0.95);
}

.sla-count-breach {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.sla-count-warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.sla-count-ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

body[data-theme="dark"] .sla-mini-table-wrap {
  background: rgba(15, 23, 42, 0.42);
}

body[data-theme="dark"] .sla-count-breach {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

body[data-theme="dark"] .sla-count-warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.26);
  color: #fde68a;
}

body[data-theme="dark"] .sla-count-ok {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.25);
  color: #bbf7d0;
}

@media (max-width: 980px) {
  .sla-aggregate-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile page (premium refresh) */
.page-profile .page-header {
  align-items: center;
}

.page-profile .page-header h1 {
  letter-spacing: -0.02em;
}

.page-profile .profile-card-shell {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  border-radius: 22px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.74)),
    radial-gradient(1200px 280px at 12% -10%, rgba(215,38,56,0.10), transparent 55%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.7);
}

.page-profile .profile-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.82)),
    radial-gradient(420px 120px at 0% 0%, rgba(59,130,246,0.08), transparent 60%);
}

.page-profile .profile-avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 19px;
  box-shadow: 0 10px 24px rgba(15,23,42,.12);
}

.page-profile .profile-hero-text {
  display: grid;
  gap: 2px;
}

.page-profile .profile-hero-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.2;
}

.page-profile .profile-hero-role {
  color: var(--muted);
  font-weight: 600;
}

.page-profile .profile-hero-email {
  color: var(--muted);
  font-size: 13px;
}

.page-profile .profile-hero-note {
  color: var(--muted);
  font-size: 12px;
}

.page-profile .profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 14px;
}

@media (min-width: 1400px) {
  .page-profile .profile-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 16px;
  }
}

.page-profile .profile-side-stack {
  display: grid;
  gap: 14px;
}

.page-profile .profile-quick-actions {
  display: grid;
  gap: 10px;
}

.page-profile .profile-quick-action {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(248,250,252,.68));
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.page-profile .profile-quick-action:hover {
  transform: translateY(-1px);
  border-color: rgba(239,68,68,.22);
  box-shadow:
    0 8px 16px rgba(15,23,42,.06),
    inset 0 1px 0 rgba(255,255,255,.65);
}

.page-profile .profile-quick-action-title {
  font-weight: 700;
  color: var(--ink);
}

.page-profile .profile-quick-action-desc {
  color: var(--muted);
  font-size: 12px;
}

.page-profile .profile-activity-summary-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.page-profile .profile-mini-stat {
  display: grid;
  gap: 2px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.15);
  background: rgba(255,255,255,.55);
  padding: 10px;
}

.page-profile .profile-mini-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.page-profile .profile-mini-stat strong {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.1;
}

.page-profile .profile-mini-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.15);
  background: rgba(255,255,255,.48);
  padding: 10px 10px 8px;
}

.page-profile .profile-mini-bar-wrap {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.page-profile .profile-mini-bar-track {
  width: 100%;
  min-width: 26px;
  height: 88px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(148,163,184,.12), rgba(148,163,184,.06));
  border: 1px solid rgba(148,163,184,.12);
  display: flex;
  align-items: flex-end;
  padding: 4px;
}

.page-profile .profile-mini-bar {
  width: 100%;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(239,68,68,.95), rgba(59,130,246,.88));
  box-shadow: 0 4px 10px rgba(59,130,246,.14);
  min-height: 6px;
}

.page-profile .profile-mini-bar-count {
  font-weight: 700;
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
}

.page-profile .profile-mini-bar-label {
  font-size: 11px;
  color: var(--muted);
  line-height: 1;
}

.page-profile .profile-section-card {
  box-shadow: none;
  margin: 0;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,250,252,.84));
}

.page-profile .profile-section-title {
  margin: 0 0 12px;
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.page-profile .profile-form-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.page-profile .profile-form-actions-start {
  justify-content: flex-start;
}

.page-profile .profile-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
}

.page-profile .profile-form-actions .btn-primary,
.page-profile .profile-form-actions .btn-secondary {
  min-height: 42px;
  border-radius: 14px;
  padding-inline: 15px;
}

.page-profile .profile-preferences-note {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.16);
  color: #1e3a8a;
}

.page-profile .profile-pref-feedback {
  align-self: center;
  min-height: 1.2em;
  color: #0f766e;
  font-weight: 600;
  font-size: 12px;
}

/* Carriers page modals */
.page-carriers .carrier-modal-card {
  width: min(780px, 96vw);
  max-width: 780px;
  padding: 18px;
  border-radius: 20px;
}

.page-carriers .carrier-modal-body {
  padding-top: 6px;
}

.page-carriers .carrier-modal-form {
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px 14px;
}

.page-carriers .carrier-modal-form > label {
  display: grid;
  gap: 6px;
}

.page-carriers .carrier-modal-status {
  align-content: start;
}

.page-carriers .carrier-modal-check {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  background: color-mix(in srgb, var(--input-bg) 88%, #fff 12%);
}

.page-carriers .carrier-modal-check input[type="checkbox"] {
  margin: 0;
}

.page-carriers .carrier-modal-check span {
  color: var(--ink);
  font-weight: 600;
}

.page-carriers .carrier-modal-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 2px;
}

.page-carriers .carrier-modal-actions .btn-primary,
.page-carriers .carrier-modal-actions .btn-secondary {
  min-height: 42px;
  border-radius: 14px;
  padding-inline: 16px;
}

body[data-theme="dark"] .page-carriers .carrier-modal-check {
  background: rgba(15, 23, 42, .72);
  border-color: rgba(148, 163, 184, .14);
}

@media (max-width: 720px) {
  .page-carriers .carrier-modal-form {
    grid-template-columns: 1fr;
  }
}

.page-profile .profile-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-profile .profile-activity-card {
  margin-top: 14px;
}

.page-profile .profile-activity-list {
  display: grid;
  gap: 8px;
}

.page-profile .profile-activity-item {
  padding: 10px 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(248,250,252,.70));
  border-color: rgba(148,163,184,.18);
}

.page-profile .profile-activity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.page-profile .profile-activity-time {
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.page-profile .detail-item {
  border-radius: 14px;
}

body[data-theme="dark"] .page-profile .profile-card-shell {
  background:
    linear-gradient(180deg, rgba(15,23,42,.88), rgba(15,23,42,.76)),
    radial-gradient(1000px 260px at 8% -8%, rgba(239,68,68,0.10), transparent 55%);
  border-color: rgba(148,163,184,.14);
  box-shadow: 0 18px 38px rgba(2,6,23,.30);
}

body[data-theme="dark"] .page-profile .profile-hero {
  background:
    linear-gradient(180deg, rgba(30,41,59,.82), rgba(15,23,42,.84)),
    radial-gradient(420px 120px at 0% 0%, rgba(59,130,246,.10), transparent 60%);
  border-color: rgba(148,163,184,.14);
}

body[data-theme="dark"] .page-profile .profile-section-card {
  background: linear-gradient(180deg, rgba(30,41,59,.72), rgba(15,23,42,.82));
  border-color: rgba(148,163,184,.12);
}

body[data-theme="dark"] .page-profile .profile-activity-item {
  background: linear-gradient(180deg, rgba(30,41,59,.60), rgba(15,23,42,.72));
  border-color: rgba(148,163,184,.10);
}

body[data-theme="dark"] .page-profile .profile-preferences-note {
  background: rgba(59, 130, 246, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: #bfdbfe;
}

/* Profile tabs / security layout (moved from profile.php + polish) */
.page-profile .profile-tabs-card {
  margin-bottom: 14px;
}

.page-profile .profile-totp-required-banner {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
  margin-bottom: 12px;
}

.page-profile .profile-totp-required-link {
  font-weight: 700;
  color: #9a3412;
  text-decoration: underline;
}

.page-profile .profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.page-profile .profile-tab-btn {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
  min-height: 42px;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
}

.page-profile .profile-tab-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15,23,42,.06);
}

.page-profile .profile-tab-btn.active {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  border-color: #0f172a;
  box-shadow: 0 8px 20px rgba(15,23,42,.18);
}

.page-profile .profile-tab-btn.attention:not(.active) {
  border-color: #fb923c;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
}

.page-profile .profile-tab-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  line-height: 1;
  opacity: .95;
}

.page-profile .profile-tab-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-profile .profile-tab-label {
  line-height: 1;
  white-space: nowrap;
}

.page-profile .profile-tab-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(15,23,42,.08);
  color: #0f172a;
}

.page-profile .profile-tab-btn.active .profile-tab-badge {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.page-profile .profile-tab-badge.warn {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.page-profile .profile-tab-badge.ok {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.page-profile .profile-tabs-help {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-profile .profile-tab-inline-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 600;
}

.page-profile .profile-tab-inline-status.warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.page-profile .profile-tab-inline-status.ok {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

.page-profile [data-profile-panel][hidden] { display: none !important; }

.page-profile .profile-panel-highlight {
  outline: 2px solid rgba(249,115,22,.35);
  box-shadow: 0 0 0 4px rgba(251,146,60,.12);
}

.page-profile .profile-security-grid {
  display: grid;
  gap: 12px;
}

.page-profile .profile-security-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 12px;
}

.page-profile .profile-security-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.page-profile .profile-security-head h4 {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

.page-profile .profile-security-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.page-profile .profile-security-chip.ok {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

.page-profile .profile-security-chip.warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.page-profile .profile-security-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.page-profile .profile-inline-btn {
  display: inline-flex;
  align-items: center;
}

.page-profile .profile-notice-compact {
  margin-bottom: 10px;
}

.page-profile .profile-notice-success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

.page-profile .profile-security-status-row {
  margin-bottom: 10px;
}

.page-profile .profile-totp-setup-box {
  background: #f8fafc;
  border-color: #dbeafe;
  color: #1e293b;
  margin-bottom: 10px;
}

.page-profile .profile-totp-qr-box {
  margin-top: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  width: max-content;
  min-width: 220px;
}

.page-profile .profile-totp-secret-row {
  margin-top: 8px;
}

.page-profile .profile-totp-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.page-profile .profile-security-form-stack {
  margin-top: 10px;
}

.page-profile .profile-totp-recovery-box {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
  margin-top: 10px;
}

.page-profile .profile-totp-recovery-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body[data-theme="dark"] .page-profile .profile-tab-btn {
  background: linear-gradient(180deg, rgba(30,41,59,.9) 0%, rgba(15,23,42,.95) 100%);
  border-color: rgba(148,163,184,.22);
}

body[data-theme="dark"] .page-profile .profile-tab-btn.active {
  background: linear-gradient(180deg, #334155 0%, #0f172a 100%);
  border-color: rgba(148,163,184,.35);
}

body[data-theme="dark"] .page-profile .profile-tab-inline-status,
body[data-theme="dark"] .page-profile .profile-security-chip {
  background: rgba(255,255,255,.04);
}

body[data-theme="dark"] .page-profile .profile-security-card {
  background: rgba(255,255,255,.02);
  border-color: rgba(148,163,184,.14);
}

@media (max-width: 700px) {
  .page-profile .profile-tab-btn {
    border-radius: 12px;
    padding: 10px;
  }
  .page-profile .profile-tab-label {
    font-size: 13px;
  }
  .page-profile .profile-tab-icon {
    font-size: 13px;
  }
  .page-profile .profile-tab-badge {
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    padding: 0 6px;
  }
  .page-profile .profile-security-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-profile .profile-totp-recovery-grid {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"] .page-profile .profile-pref-feedback {
  color: #5eead4;
}

@media (max-width: 980px) {
  .page-profile .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-profile .profile-card-shell {
    padding: 14px;
    border-radius: 18px;
  }
  .page-profile .profile-hero {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 12px;
  }
  .page-profile .profile-avatar-lg {
    width: 56px;
    height: 56px;
  }
  .page-profile .profile-activity-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Profile v2 polish */
.page-profile .profile-card-shell {
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.74)),
    radial-gradient(1100px 280px at 2% -8%, rgba(239,68,68,.09), transparent 56%),
    radial-gradient(900px 260px at 98% -6%, rgba(59,130,246,.08), transparent 58%);
  border: 1px solid rgba(255,255,255,.45);
  box-shadow:
    0 28px 60px rgba(15,23,42,.14),
    inset 0 1px 0 rgba(255,255,255,.45);
}

.page-profile .profile-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(148,163,184,.20);
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(241,245,249,.76)),
    radial-gradient(500px 140px at 0% 0%, rgba(239,68,68,.09), transparent 65%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

.page-profile .profile-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(59,130,246,.11) 0%, rgba(59,130,246,0) 68%);
  pointer-events: none;
}

.page-profile .profile-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(239,68,68,.92), rgba(190,24,93,.92));
  box-shadow:
    0 14px 28px rgba(239,68,68,.18),
    inset 0 1px 0 rgba(255,255,255,.35);
}

.page-profile .profile-avatar-lg img {
  border-radius: 14px;
}

.page-profile .profile-hero-name {
  font-size: 24px;
  line-height: 1.15;
}

.page-profile .profile-hero-role {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.page-profile .profile-hero-email {
  font-size: 13px;
}

.page-profile .profile-hero-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-profile .profile-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(255,255,255,.62);
  color: var(--ink-soft);
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.page-profile .profile-hero-chip strong {
  color: var(--ink);
  font-weight: 700;
}

.page-profile .profile-hero-chip.success {
  border-color: rgba(34,197,94,.28);
  background: rgba(34,197,94,.10);
  color: #166534;
}

.page-profile .profile-hero-chip.danger {
  border-color: rgba(239,68,68,.28);
  background: rgba(239,68,68,.10);
  color: #991b1b;
}

.page-profile .profile-section-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.80));
  border-color: rgba(148,163,184,.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 8px 24px rgba(15,23,42,.04);
}

.page-profile .profile-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148,163,184,.12);
}

.page-profile .profile-section-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef4444, #f97316);
  box-shadow: 0 0 0 4px rgba(239,68,68,.12);
}

.page-profile .profile-section-card .form-grid label {
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 14px;
  padding: 10px;
}

.page-profile .profile-section-card .form-grid label > input,
.page-profile .profile-section-card .form-grid label > select,
.page-profile .profile-section-card .form-grid label > textarea {
  margin-top: 6px;
}

.page-profile .profile-section-card .form-grid label[style*="display:flex"] {
  background: transparent;
  border: 0;
  padding: 2px 0 0;
}

.page-profile .detail-item {
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(148,163,184,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.page-profile .detail-item .detail-label {
  font-weight: 700;
  letter-spacing: .02em;
}

.page-profile .profile-pill-list .status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}

.page-profile .profile-activity-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.82));
}

.page-profile .profile-activity-item {
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.page-profile .profile-activity-item .detail-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-profile .profile-activity-item .detail-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(239,68,68,.75);
  box-shadow: 0 0 0 4px rgba(239,68,68,.10);
}

.page-profile .profile-activity-row span:first-child {
  font-weight: 600;
  color: var(--ink);
}

body[data-theme="dark"] .page-profile .profile-card-shell {
  background:
    linear-gradient(180deg, rgba(15,23,42,.86), rgba(15,23,42,.80)),
    radial-gradient(1100px 280px at 2% -8%, rgba(239,68,68,.12), transparent 56%),
    radial-gradient(900px 260px at 98% -6%, rgba(59,130,246,.10), transparent 58%);
  border-color: rgba(148,163,184,.14);
  box-shadow:
    0 26px 60px rgba(2,6,23,.34),
    inset 0 1px 0 rgba(255,255,255,.04);
}

body[data-theme="dark"] .page-profile .profile-hero {
  background:
    linear-gradient(180deg, rgba(30,41,59,.86), rgba(15,23,42,.86)),
    radial-gradient(500px 140px at 0% 0%, rgba(239,68,68,.12), transparent 65%);
  border-color: rgba(148,163,184,.14);
}

body[data-theme="dark"] .page-profile .profile-hero-chip {
  background: rgba(15,23,42,.45);
  border-color: rgba(148,163,184,.18);
  color: #cbd5e1;
}

body[data-theme="dark"] .page-profile .profile-hero-chip strong {
  color: #f1f5f9;
}

body[data-theme="dark"] .page-profile .profile-hero-chip.success {
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.28);
  color: #bbf7d0;
}

body[data-theme="dark"] .page-profile .profile-hero-chip.danger {
  background: rgba(239,68,68,.14);
  border-color: rgba(239,68,68,.28);
  color: #fecaca;
}

body[data-theme="dark"] .page-profile .profile-section-card,
body[data-theme="dark"] .page-profile .profile-activity-card {
  background: linear-gradient(180deg, rgba(30,41,59,.74), rgba(15,23,42,.84));
}

body[data-theme="dark"] .page-profile .profile-section-card .form-grid label,
body[data-theme="dark"] .page-profile .detail-item {
  background: rgba(15,23,42,.34);
  border-color: rgba(148,163,184,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

body[data-theme="dark"] .page-profile .profile-quick-action {
  background: linear-gradient(180deg, rgba(30,41,59,.62), rgba(15,23,42,.70));
  border-color: rgba(148,163,184,.14);
}

body[data-theme="dark"] .page-profile .profile-quick-action-title {
  color: #f1f5f9;
}

body[data-theme="dark"] .page-profile .profile-quick-action-desc {
  color: #aab4c5;
}

body[data-theme="dark"] .page-profile .profile-mini-stat,
body[data-theme="dark"] .page-profile .profile-mini-chart {
  background: rgba(15,23,42,.34);
  border-color: rgba(148,163,184,.12);
}

body[data-theme="dark"] .page-profile .profile-mini-stat strong,
body[data-theme="dark"] .page-profile .profile-mini-bar-count {
  color: #f1f5f9;
}

body[data-theme="dark"] .page-profile .profile-mini-bar-track {
  background: linear-gradient(180deg, rgba(148,163,184,.10), rgba(148,163,184,.04));
  border-color: rgba(148,163,184,.10);
}

@media (max-width: 680px) {
  .page-profile .profile-hero-name {
    font-size: 21px;
  }
  .page-profile .profile-hero-chips {
    gap: 6px;
  }
  .page-profile .profile-hero-chip {
    font-size: 11px;
    min-height: 28px;
  }
  .page-profile .profile-activity-summary-top {
    grid-template-columns: 1fr;
  }
  .page-profile .profile-mini-chart {
    gap: 6px;
    padding-inline: 8px;
  }
  .page-profile .profile-mini-bar-track {
    height: 72px;
    min-width: 20px;
  }
}

/* Safety fix: keep main content visible above background layers on all pages */
.main-header,
.main > .page-header,
.main > .layout,
.main > .card,
.main > section,
.main > .panel,
.main > .notice {
  position: relative;
  z-index: 3;
}

/* Final stacking safety override (fix hidden/un-clickable content) */
.main {
  isolation: isolate;
}

.main::before,
.main::after {
  z-index: 0 !important;
  pointer-events: none !important;
}

.main > :not(.modal) {
  position: relative;
  z-index: 4 !important;
}

.main > .modal {
  z-index: 2600 !important;
}

@media (max-width: 1100px) {
  .page-users .users-table-wrap {
    max-height: none;
  }
}

/* ===== Global UI refresh v3: sidebar + topbar + statuses + density ===== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 3200;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, #fff 14%);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.main-header + * {
  margin-top: 14px;
}

.main-header-actions {
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 3210;
}

.header-notifications {
  position: relative;
  z-index: 3220;
}

.header-notifications-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  background: rgba(255,255,255,.78);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.header-notifications-btn .menu-icon svg {
  width: 16px;
  height: 16px;
}

.header-notifications-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.header-notifications-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: min(420px, calc(100vw - 28px));
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, #fff 14%);
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .18);
  z-index: 3250;
  padding: 10px;
}

.header-notifications-panel.is-portaled {
  position: fixed !important;
  right: auto !important;
  z-index: 9999 !important;
}

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

.header-notifications-panel__head strong {
  font-size: 14px;
}

.header-notifications-mark-all {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.header-notifications-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.header-notification-item {
  display: block;
  text-align: left;
  width: 100%;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
  background: #fff;
  color: inherit;
  text-decoration: none;
  padding: 9px 10px;
  cursor: pointer;
}

.header-notification-item.is-unread {
  border-color: color-mix(in srgb, #2563eb 38%, var(--line) 62%);
  background: #eff6ff;
}

.header-notification-item__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.header-notification-item__message {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.header-notification-item__meta {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

.header-notifications-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 4px 2px;
}

.header-notifications-toast {
  position: fixed;
  right: 18px;
  top: 84px;
  z-index: 2900;
  max-width: min(420px, calc(100vw - 24px));
  white-space: pre-line;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #2563eb 34%, var(--line) 66%);
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .2);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.header-notifications-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.network-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #22c55e 28%, var(--line) 72%);
  background: linear-gradient(180deg, rgba(240,253,244,.92), rgba(220,252,231,.82));
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}

.network-status-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.network-status-chip.is-offline {
  border-color: color-mix(in srgb, #ef4444 34%, var(--line) 66%);
  background: linear-gradient(180deg, rgba(254,242,242,.95), rgba(254,226,226,.86));
  color: #b91c1c;
}

.network-status-chip.has-pending {
  border-color: color-mix(in srgb, #f59e0b 34%, var(--line) 66%);
  background: linear-gradient(180deg, rgba(255,251,235,.95), rgba(254,243,199,.86));
  color: #92400e;
}

.main-header .theme-toggle,
.main-header .header-logout,
.main-header .header-profile,
.main-header .header-sidebar-toggle {
  border-radius: 12px;
}

.main-header .theme-toggle {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  background: rgba(255,255,255,.78);
}

.main-header .theme-toggle svg {
  width: 16px;
  height: 16px;
}

.main-header .header-profile {
  background: rgba(255,255,255,.65);
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
}

.main-header .header-logout {
  min-height: 40px;
}

.main-header .header-sidebar-toggle {
  min-height: 40px;
  gap: 8px;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 86px minmax(0, 1fr) !important;
}

body.sidebar-collapsed .sidebar {
  padding-left: 10px;
  padding-right: 10px;
}

body.sidebar-collapsed .sidebar .brand-block {
  justify-content: center;
  gap: 0;
}

body.sidebar-collapsed .sidebar .brand-block > div,
body.sidebar-collapsed .sidebar .warehouse-block,
body.sidebar-collapsed .sidebar .nav-category-title span:not(.menu-icon),
body.sidebar-collapsed .sidebar .nav-link > span:not(.menu-icon),
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link > span:not(.menu-icon),
body.sidebar-collapsed .sidebar .sidebar-footer {
  display: none !important;
}

body.sidebar-collapsed .sidebar .nav-category {
  padding: 4px;
}

body.sidebar-collapsed .sidebar .nav-link,
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link {
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

body.sidebar-collapsed .sidebar .nav-link:hover,
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link:hover {
  transform: none;
}

body.sidebar-collapsed .sidebar .nav-dropdown[open] .nav-submenu {
  display: none;
}

body.sidebar-collapsed .sidebar .nav-link-proposals {
  min-height: 44px;
}

body.sidebar-collapsed .sidebar .menu-icon {
  margin-right: 0;
}

@media (max-width: 640px) {
  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr !important;
  }
  body.sidebar-collapsed .sidebar .brand-block > div,
  body.sidebar-collapsed .sidebar .warehouse-block,
  body.sidebar-collapsed .sidebar .nav-category-title span:not(.menu-icon),
  body.sidebar-collapsed .sidebar .nav-link > span:not(.menu-icon),
  body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link > span:not(.menu-icon),
  body.sidebar-collapsed .sidebar .sidebar-footer {
    display: revert !important;
  }
  body.sidebar-collapsed .sidebar .nav-dropdown[open] .nav-submenu {
    display: block;
  }
}

.sidebar {
  border-radius: 0 22px 22px 0;
  border-right: 1px solid color-mix(in srgb, var(--line) 80%, #fff 20%);
  box-shadow: 10px 0 36px rgba(15, 23, 42, .10);
}

.sidebar .brand-block,
.sidebar .warehouse-block {
  border-radius: 16px;
}

.sidebar .nav-category {
  border-radius: 14px;
  padding: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.04);
}

.sidebar .nav-category + .nav-category {
  margin-top: 8px;
}

.sidebar .nav-link,
.sidebar .nav-dropdown > summary.nav-link {
  border-radius: 12px;
  min-height: 40px;
  transition: transform .14s ease, background-color .16s ease, border-color .16s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-dropdown > summary.nav-link:hover {
  transform: translateX(2px);
}

.sidebar .nav-submenu {
  margin-top: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}

/* Spojne badge/statusy globalnie */
.status-pill {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .01em;
  border-width: 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.status-pill.free {
  color: #1d4ed8;
  background: rgba(219, 234, 254, .9);
  border-color: rgba(59, 130, 246, .28);
}

.status-pill.reserved {
  color: #9a3412;
  background: rgba(255, 237, 213, .9);
  border-color: rgba(251, 146, 60, .30);
}

.status-pill.in_progress {
  color: #92400e;
  background: rgba(254, 243, 199, .92);
  border-color: rgba(245, 158, 11, .30);
}

.status-pill.done {
  color: #166534;
  background: rgba(220, 252, 231, .92);
  border-color: rgba(34, 197, 94, .24);
}

.status-pill.departed {
  color: #1e40af;
  background: rgba(219, 234, 254, .94);
  border-color: rgba(59, 130, 246, .28);
}

.status-pill.blocked {
  color: #475569;
  background: rgba(241, 245, 249, .94);
  border-color: rgba(148, 163, 184, .24);
}

.status-pill.neutral {
  color: #334155;
  background: rgba(248, 250, 252, .95);
  border-color: rgba(203, 213, 225, .38);
}

body[data-theme="dark"] .main-header {
  border-color: rgba(148,163,184,.14);
  background: rgba(10, 16, 28, .72);
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
}

body[data-theme="dark"] .network-status-chip {
  border-color: rgba(74, 222, 128, .34);
  background: linear-gradient(180deg, rgba(20,83,45,.34), rgba(21,128,61,.22));
  color: #bbf7d0;
}

body[data-theme="dark"] .network-status-chip.is-offline {
  border-color: rgba(248,113,113,.36);
  background: linear-gradient(180deg, rgba(127,29,29,.36), rgba(69,10,10,.28));
  color: #fecaca;
}

body[data-theme="dark"] .network-status-chip.has-pending {
  border-color: rgba(251,191,36,.36);
  background: linear-gradient(180deg, rgba(113,63,18,.34), rgba(120,53,15,.22));
  color: #fde68a;
}

body[data-theme="dark"] .offline-queue-panel {
  border-color: rgba(251, 191, 36, 0.34);
  background: linear-gradient(180deg, rgba(113, 63, 18, 0.32), rgba(120, 53, 15, 0.2));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .offline-queue-panel.is-offline {
  border-color: rgba(248, 113, 113, 0.36);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.32), rgba(69, 10, 10, 0.22));
}

body[data-theme="dark"] .offline-queue-panel__title-wrap strong,
body[data-theme="dark"] .offline-queue-note,
body[data-theme="dark"] .offline-queue-item__title {
  color: #fed7aa;
}

body[data-theme="dark"] .offline-queue-count {
  border-color: rgba(251, 191, 36, 0.38);
  background: rgba(15, 23, 42, 0.46);
  color: #fde68a;
}

body[data-theme="dark"] .offline-queue-item {
  border-color: rgba(251, 191, 36, 0.2);
  background: rgba(15, 23, 42, 0.56);
}

body[data-theme="dark"] .offline-queue-item__meta {
  color: #cbd5e1;
}

body[data-theme="dark"] .offline-queue-item__badge {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(30, 58, 138, 0.32);
  color: #bfdbfe;
}

body[data-theme="dark"] .main-header .theme-toggle,
body[data-theme="dark"] .main-header .header-profile {
  background: rgba(255,255,255,.03);
  border-color: rgba(148,163,184,.14);
}

body[data-theme="dark"] .header-notifications-btn {
  background: rgba(255,255,255,.03);
  border-color: rgba(148,163,184,.14);
  color: #e2e8f0;
}

body[data-theme="dark"] .header-notifications-panel {
  background: #0f172a;
  border-color: rgba(148,163,184,.22);
  box-shadow: 0 18px 36px rgba(2, 6, 23, .5);
}

body[data-theme="dark"] .header-notification-item {
  background: rgba(15, 23, 42, .9);
  border-color: rgba(148,163,184,.2);
}

body[data-theme="dark"] .header-notification-item.is-unread {
  background: rgba(30, 58, 138, .26);
  border-color: rgba(96,165,250,.42);
}

body[data-theme="dark"] .header-notification-item__title {
  color: #e2e8f0;
}

body[data-theme="dark"] .header-notifications-toast {
  border-color: rgba(96, 165, 250, .4);
  background: rgba(30, 58, 138, .35);
  color: #dbeafe;
  box-shadow: 0 14px 30px rgba(2, 6, 23, .55);
}

body[data-theme="dark"] .sidebar {
  border-right-color: rgba(148,163,184,.10);
  box-shadow: 10px 0 40px rgba(0,0,0,.28);
}

body[data-theme="dark"] .sidebar .nav-category {
  background: rgba(255,255,255,.02);
  border-color: rgba(148,163,184,.08);
}

body[data-theme="dark"] .sidebar .nav-submenu {
  background: rgba(255,255,255,.02);
}

body[data-theme="dark"] .status-pill {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

body[data-theme="dark"] .status-pill.free {
  color: #bfdbfe;
  background: rgba(30, 58, 138, .34);
  border-color: rgba(96, 165, 250, .20);
}
body[data-theme="dark"] .status-pill.reserved {
  color: #fed7aa;
  background: rgba(124, 45, 18, .34);
  border-color: rgba(251, 146, 60, .20);
}
body[data-theme="dark"] .status-pill.in_progress {
  color: #fde68a;
  background: rgba(120, 53, 15, .34);
  border-color: rgba(245, 158, 11, .20);
}
body[data-theme="dark"] .status-pill.done {
  color: #bbf7d0;
  background: rgba(20, 83, 45, .34);
  border-color: rgba(74, 222, 128, .18);
}
body[data-theme="dark"] .status-pill.departed {
  color: #bfdbfe;
  background: rgba(30, 58, 138, .34);
  border-color: rgba(96, 165, 250, .20);
}
body[data-theme="dark"] .status-pill.blocked,
body[data-theme="dark"] .status-pill.neutral {
  color: #cbd5e1;
  background: rgba(51, 65, 85, .34);
  border-color: rgba(148, 163, 184, .16);
}

/* Global compact mode */
body.density-compact .main-header {
  top: 6px;
  border-radius: 14px;
}

body.density-compact .page-header {
  margin-bottom: 8px;
}

body.density-compact .page-header h1 {
  font-size: clamp(22px, 2vw, 30px);
}

body.density-compact .page-header p {
  font-size: 12px;
}

body.density-compact .card {
  border-radius: 14px;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.07),
    0 1px 0 rgba(255,255,255,.45) inset;
}

body.density-compact .card h3 {
  font-size: 16px;
}

body.density-compact .table th,
body.density-compact .table td {
  padding-top: 8px;
  padding-bottom: 8px;
}

body.density-compact .table th {
  font-size: 10px;
}

body.density-compact .table td {
  font-size: 12px;
}

body.density-compact .status-pill {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

body.density-compact .btn-primary,
body.density-compact .btn-secondary {
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
}

body.density-compact input[type="text"],
body.density-compact input[type="email"],
body.density-compact input[type="password"],
body.density-compact input[type="number"],
body.density-compact input[type="date"],
body.density-compact input[type="time"],
body.density-compact select,
body.density-compact textarea {
  min-height: 36px;
  font-size: 13px;
}

body.density-compact textarea {
  min-height: 70px;
}

body.density-compact .form-grid {
  gap: 8px 10px;
}

body.density-compact .sidebar .nav-link,
body.density-compact .sidebar .nav-dropdown > summary.nav-link {
  min-height: 36px;
}

body.density-compact .sidebar .nav-link span,
body.density-compact .sidebar .nav-category-title span {
  font-size: 12px;
}

body.density-compact .sidebar .brand-block,
body.density-compact .sidebar .warehouse-block {
  padding: 10px;
}

body.density-compact .main-header .theme-toggle,
body.density-compact .main-header .header-logout {
  min-height: 34px;
}

body.density-compact .main-header .header-profile {
  min-height: 34px;
}

@media (max-width: 1100px) {
  .main-header {
    position: static;
    top: auto;
  }
  .sidebar {
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
  }
}

/* Keep page modals above premium header/background layers */
.app-shell > .main > .modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000 !important;
  pointer-events: none;
}

.app-shell > .main > .modal.active {
  z-index: 2000 !important;
  pointer-events: auto;
}

.app-shell > .main > .modal .modal-card,
.app-shell > .main > .modal .modal-content,
.app-shell > .main > .modal .modal-frame {
  position: relative;
  z-index: 2001;
}

/* Harmonogram - premium filters */
.schedule-filters {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, #fff 6%), var(--panel));
  border: 1px solid color-mix(in srgb, var(--line) 86%, #fff 14%);
}

.schedule-filters .field {
  gap: 8px;
}

.schedule-filters .field span {
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: color-mix(in srgb, var(--muted) 88%, #94a3b8 12%);
}

.schedule-filters {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  border-radius: 18px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.72));
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.schedule-filters::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(380px 140px at 0% 0%, rgba(14,165,233,.06), transparent 65%),
    radial-gradient(300px 140px at 100% 0%, rgba(244,63,94,.05), transparent 62%);
}

.schedule-filters > * {
  position: relative;
  z-index: 1;
}

.schedule-filters .schedule-filters-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
  padding: 0 2px 4px;
}

.schedule-filters .schedule-filters-head h3 {
  margin: 0 0 2px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  line-height: 1.15;
  color: var(--ink);
}

.schedule-filters .schedule-filters-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.schedule-filters .field input,
.schedule-filters .field select {
  height: 36px;
  border-radius: 11px;
  padding: 0 12px;
  font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--input-border) 78%, #cbd5e1 22%);
  background: color-mix(in srgb, var(--input-bg) 94%, #ffffff 6%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.schedule-filters .field input:focus,
.schedule-filters .field select:focus {
  border-color: color-mix(in srgb, var(--brand) 65%, #60a5fa 35%);
  box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.10), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.schedule-filters .filter-warehouse,
.schedule-filters .filter-view,
.schedule-filters .filter-groups,
.schedule-filters .filter-client,
.schedule-filters .filter-carrier,
.schedule-filters .filter-reference,
.schedule-filters .filter-status,
.schedule-filters .filter-workflow,
.schedule-filters .filter-actions {
  grid-column: span 2;
}

.schedule-filters .filter-date {
  grid-column: span 4;
}

.schedule-filters .filter-actions button {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(215, 38, 56, 0.24);
}

.schedule-filters .field {
  border-radius: 14px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.schedule-filters .field span {
  display: block;
  margin: 0 0 4px 2px;
  font-size: 10px;
}

.schedule-filters .date-control {
  display: grid;
  grid-template-columns: 38px clamp(130px, 16vw, 168px) 38px auto;
  gap: 8px;
  align-items: center;
  justify-content: start;
}

.schedule-filters .date-control #schedule-date {
  min-width: 0;
  text-align: center;
  font-weight: 600;
  height: 38px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--input-border) 82%, #fff 18%);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink);
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.schedule-filters .date-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  line-height: 1;
  font-size: 22px;
  font-weight: 700;
  transform: none;
}

/* ===== Plan dnia magazynu (rebuild) ===== */
.warehouse-dayboard {
  margin: 0 0 20px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #fff 18%);
  background:
    radial-gradient(560px 240px at 0% 0%, rgba(14,165,233,.12), transparent 62%),
    radial-gradient(520px 220px at 100% 0%, rgba(244,63,94,.1), transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.88));
  box-shadow: 0 18px 44px rgba(15,23,42,.1);
}

.warehouse-dayboard__hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.warehouse-dayboard__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(14,165,233,.28);
  background: linear-gradient(180deg, rgba(240,249,255,.94), rgba(224,242,254,.9));
  color: #0c4a6e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.warehouse-dayboard__hero h2 {
  margin: 8px 0 6px;
  font-size: clamp(24px, 3vw, 33px);
  line-height: 1.04;
}

.warehouse-dayboard__hero p {
  margin: 0;
  color: var(--muted);
}

.warehouse-dayboard__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.warehouse-dayboard__toggle {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  font-weight: 700;
}

.warehouse-dayboard.is-collapsed .warehouse-dayboard__hero p,
.warehouse-dayboard.is-collapsed .warehouse-dayboard__grid,
.warehouse-dayboard.is-collapsed .warehouse-dayboard__strip {
  display: none;
}

.warehouse-dayboard__warehouse,
.warehouse-dayboard__date {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(255,255,255,.86);
}

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

.warehouse-kpi-card {
  position: relative;
  overflow: hidden;
  padding: 14px 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.24);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.warehouse-kpi-card > * {
  position: relative;
  z-index: 1;
}

.warehouse-kpi-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  opacity: .26;
  pointer-events: none;
  z-index: 0;
}

.warehouse-kpi-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  border-radius: 0 0 16px 16px;
}

.warehouse-kpi-card.is-primary::before { background: linear-gradient(180deg, rgba(239,68,68,0), rgba(239,68,68,.26)); }
.warehouse-kpi-card.is-info::before { background: linear-gradient(180deg, rgba(14,165,233,0), rgba(14,165,233,.28)); }
.warehouse-kpi-card.is-warning::before { background: linear-gradient(180deg, rgba(245,158,11,0), rgba(245,158,11,.28)); }
.warehouse-kpi-card.is-success::before { background: linear-gradient(180deg, rgba(34,197,94,0), rgba(34,197,94,.25)); }
.warehouse-kpi-card.is-primary::after { background: linear-gradient(90deg, #ef4444, #fb7185); }
.warehouse-kpi-card.is-info::after { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.warehouse-kpi-card.is-warning::after { background: linear-gradient(90deg, #d97706, #fbbf24); }
.warehouse-kpi-card.is-success::after { background: linear-gradient(90deg, #16a34a, #4ade80); }

.warehouse-kpi-card__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.warehouse-kpi-card__value {
  display: block;
  margin-top: 8px;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.02em;
  color: #0f172a;
}

.warehouse-kpi-card__hint {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.warehouse-dayboard__strip {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 12px;
}

.warehouse-load-card,
.warehouse-insights-card {
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.24);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.9));
  padding: 14px 16px;
}

.warehouse-load-card__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.warehouse-load-card__bar {
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.25);
  background: rgba(226,232,240,.6);
  overflow: hidden;
}

#warehouse-load-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e 0%, #f59e0b 55%, #ef4444 100%);
  transition: width .24s ease;
}

.warehouse-insights-card p {
  margin: 7px 0 0;
  color: #334155;
  line-height: 1.4;
}

body[data-theme="dark"] .warehouse-dayboard {
  border-color: rgba(71,85,105,.44);
  background:
    radial-gradient(560px 240px at 0% 0%, rgba(14,165,233,.16), transparent 62%),
    radial-gradient(520px 220px at 100% 0%, rgba(244,63,94,.14), transparent 64%),
    linear-gradient(180deg, rgba(15,23,42,.92), rgba(2,6,23,.9));
  box-shadow: 0 18px 44px rgba(2,6,23,.45);
}

body[data-theme="dark"] .warehouse-dayboard__eyebrow {
  color: #bae6fd;
  border-color: rgba(56,189,248,.34);
  background: linear-gradient(180deg, rgba(8,47,73,.82), rgba(12,74,110,.74));
}

body[data-theme="dark"] .warehouse-dayboard__warehouse,
body[data-theme="dark"] .warehouse-dayboard__date {
  color: #e2e8f0;
  border-color: rgba(71,85,105,.52);
  background: rgba(15,23,42,.84);
}

body[data-theme="dark"] .warehouse-kpi-card,
body[data-theme="dark"] .warehouse-load-card,
body[data-theme="dark"] .warehouse-insights-card {
  border-color: rgba(71,85,105,.44);
  background: linear-gradient(180deg, rgba(30,41,59,.84), rgba(15,23,42,.9));
}

body[data-theme="dark"] .warehouse-kpi-card::before {
  opacity: .2;
}

body[data-theme="dark"] .warehouse-kpi-card__value {
  color: #f8fafc;
}

body[data-theme="dark"] .warehouse-insights-card p {
  color: rgba(226,232,240,.88);
}

body[data-theme="dark"] .warehouse-load-card__bar {
  border-color: rgba(71,85,105,.46);
  background: rgba(15,23,42,.78);
}

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

  .warehouse-dayboard__strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .warehouse-dayboard {
    padding: 14px;
    border-radius: 18px;
  }

  .warehouse-dayboard__hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .warehouse-dayboard__meta {
    justify-content: flex-start;
  }

  .warehouse-dayboard__grid {
    grid-template-columns: 1fr;
  }
}

.schedule-filters .btn-icon-only {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.06);
}

.schedule-filters .btn-today {
  height: 38px;
  padding-inline: 14px;
}

body[data-theme="dark"] .schedule-filters {
  background:
    linear-gradient(180deg, rgba(10, 18, 34, 0.94), rgba(8, 14, 26, 0.92));
  border-color: color-mix(in srgb, var(--line) 76%, #93c5fd 24%);
  box-shadow: 0 18px 46px rgba(2, 6, 23, .34);
}

body[data-theme="dark"] .schedule-filters .field {
  background: rgba(255,255,255,.02);
  border-color: rgba(148,163,184,.10);
  box-shadow: none;
}

body[data-theme="dark"] .schedule-filters .schedule-filters-head h3 {
  color: #eef4ff;
}

body[data-theme="dark"] .schedule-filters .field span {
  color: color-mix(in srgb, var(--muted) 78%, #dbeafe 22%);
}

body[data-theme="dark"] .schedule-filters .field input,
body[data-theme="dark"] .schedule-filters .field select {
  background: linear-gradient(180deg, rgba(20, 31, 52, .95), rgba(12, 20, 36, .95));
  border-color: color-mix(in srgb, var(--line) 70%, #60a5fa 30%);
  color: #e5eefc;
}

body[data-theme="dark"] .schedule-filters .btn-icon-only {
  background: linear-gradient(180deg, rgba(18, 29, 48, .95), rgba(10, 16, 28, .95));
  border-color: color-mix(in srgb, var(--line) 65%, #93c5fd 35%);
  color: #f8fafc;
}

@media (max-width: 1400px) {
  .schedule-filters .filter-date {
    grid-column: span 6;
  }
  .schedule-filters .filter-client,
  .schedule-filters .filter-carrier {
    grid-column: span 3;
  }
}

@media (max-width: 1100px) {
  .schedule-filters {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .schedule-filters .filter-date {
    grid-column: span 6;
  }
  .schedule-filters .filter-warehouse,
  .schedule-filters .filter-view,
  .schedule-filters .filter-groups,
  .schedule-filters .filter-client,
  .schedule-filters .filter-carrier,
  .schedule-filters .filter-reference,
  .schedule-filters .filter-status,
  .schedule-filters .filter-workflow,
  .schedule-filters .filter-actions {
    grid-column: span 3;
  }

  .schedule-filters .filter-actions {
    grid-column: span 6;
  }
}

@media (max-width: 700px) {
  .schedule-filters {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .schedule-filters .field {
    grid-column: auto !important;
  }
  .schedule-filters .date-control {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }
  .schedule-filters .btn-today {
    grid-column: 1 / -1;
  }
}

/* Harmonogram filters v2 (2 rows + actions + chips) */
.schedule-filters {
  display: block;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #fff 18%);
  background:
    radial-gradient(440px 140px at 0% 0%, rgba(239, 68, 68, .06), transparent 68%),
    radial-gradient(420px 180px at 100% 0%, rgba(251, 113, 133, .05), transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.schedule-filters .schedule-filters-head {
  margin-bottom: 10px;
  padding: 2px 2px 6px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 86%, #fff 14%);
}

.schedule-filters-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.75));
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
  white-space: nowrap;
}

.schedule-filters-summary__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.schedule-filters-summary__value {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  line-height: 1;
  color: var(--ink);
}

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

.schedule-filters-row + .schedule-filters-row {
  margin-top: 12px;
  padding-top: 2px;
}

.schedule-filters-row-core .filter-date {
  grid-column: span 5;
}

.schedule-filters-row-core .filter-view {
  grid-column: span 2;
}

.schedule-filters-row-core .filter-warehouse {
  grid-column: span 3;
}

.schedule-filters-actions {
  grid-column: span 2;
  display: grid;
  gap: 8px;
  align-content: end;
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.50));
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
  border-radius: 14px;
  padding: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.schedule-filters-actions .btn-secondary,
.schedule-filters-actions .btn-primary {
  height: 40px;
  border-radius: 11px;
  font-weight: 700;
  white-space: nowrap;
  justify-content: center;
}

.schedule-filters-actions .btn-primary {
  box-shadow: 0 10px 18px rgba(215, 38, 56, 0.18);
  background: linear-gradient(180deg, #ef4444, #dc2626);
  border-color: rgba(220, 38, 38, .42);
}

.schedule-filters-actions .btn-secondary {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-color: color-mix(in srgb, var(--line) 80%, #cbd5e1 20%);
  color: #1f2937;
}

.schedule-filters-actions .btn-secondary:hover {
  background: linear-gradient(180deg, #fff, #f1f5f9);
  color: #111827;
}

.schedule-filters-row .field {
  border-radius: 14px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.58);
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.schedule-filters-row .field:hover {
  border-color: color-mix(in srgb, var(--brand) 18%, var(--line) 82%);
}

.schedule-filters-row .field:focus-within {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line) 62%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.66),
    0 0 0 3px rgba(239, 68, 68, 0.08);
  transform: translateY(-1px);
}

.schedule-filters-row-business .filter-groups,
.schedule-filters-row-business .filter-client,
.schedule-filters-row-business .filter-carrier,
.schedule-filters-row-business .filter-reference,
.schedule-filters-row-business .filter-status,
.schedule-filters-row-business .filter-workflow,
.schedule-filters-row-business .filter-time-control {
  grid-column: span 12;
}

@media (min-width: 900px) {
  .schedule-filters-row-business .filter-groups,
  .schedule-filters-row-business .filter-status,
  .schedule-filters-row-business .filter-time-control {
    grid-column: span 2;
  }

  .schedule-filters-row-business .filter-client,
  .schedule-filters-row-business .filter-carrier {
    grid-column: span 2;
  }

  .schedule-filters-row-business .filter-reference {
    grid-column: span 2;
  }

  .schedule-filters-row-business .filter-workflow {
    grid-column: span 4;
  }
}

@media (max-width: 1200px) {
  .schedule-filters-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .schedule-filters-row-core .filter-date {
    grid-column: span 6;
  }

  .schedule-filters-row-core .filter-view,
  .schedule-filters-row-core .filter-warehouse,
  .schedule-filters-actions {
    grid-column: span 2;
  }

  .schedule-filters-row-business .filter-groups,
  .schedule-filters-row-business .filter-status,
  .schedule-filters-row-business .filter-time-control,
  .schedule-filters-row-business .filter-client,
  .schedule-filters-row-business .filter-carrier,
  .schedule-filters-row-business .filter-reference {
    grid-column: span 3;
  }

  .schedule-filters-row-business .filter-workflow {
    grid-column: span 6;
  }
}

@media (max-width: 700px) {
  .schedule-filters-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-filters-row-core .filter-date,
  .schedule-filters-row-core .filter-view,
  .schedule-filters-row-core .filter-warehouse,
  .schedule-filters-actions,
  .schedule-filters-row-business .field {
    grid-column: auto !important;
  }

  .schedule-filters-actions {
    grid-template-columns: 1fr;
  }
}

.schedule-active-filters {
  margin: 12px 0 2px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
  background: color-mix(in srgb, var(--panel) 95%, #fff 5%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.schedule-active-filters__head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.schedule-active-filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #fff 18%);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.82));
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.schedule-filter-chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line) 58%);
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.08);
}

.schedule-filter-chip__x {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 12%, #fff 88%);
  color: color-mix(in srgb, var(--brand) 80%, #991b1b 20%);
  font-weight: 700;
  line-height: 1;
}

body[data-theme="dark"] .schedule-active-filters {
  background: linear-gradient(180deg, rgba(10, 18, 34, 0.92), rgba(8, 14, 26, 0.90));
  border-color: color-mix(in srgb, var(--line) 70%, #93c5fd 30%);
  box-shadow: 0 14px 30px rgba(2, 6, 23, .26);
}

body[data-theme="dark"] .schedule-filters {
  border-color: color-mix(in srgb, var(--line) 72%, #93c5fd 28%);
  background:
    radial-gradient(440px 140px at 0% 0%, rgba(239, 68, 68, .10), transparent 68%),
    radial-gradient(420px 180px at 100% 0%, rgba(251, 113, 133, .08), transparent 65%),
    linear-gradient(180deg, rgba(10, 18, 34, .94), rgba(8, 14, 26, .90));
  box-shadow: 0 18px 38px rgba(2, 6, 23, .28);
}

body[data-theme="dark"] .schedule-filters .schedule-filters-head {
  border-bottom-color: rgba(148,163,184,.14);
}

body[data-theme="dark"] .schedule-filters-row .field {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border-color: rgba(148,163,184,.12);
  box-shadow: none;
}

body[data-theme="dark"] .schedule-filters-row .field:hover {
  border-color: rgba(248, 113, 113, .20);
}

body[data-theme="dark"] .schedule-filters-row .field:focus-within {
  border-color: rgba(248, 113, 113, .28);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .08);
}

body[data-theme="dark"] .schedule-filters-actions {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border-color: rgba(148,163,184,.12);
  box-shadow: none;
}

body[data-theme="dark"] .schedule-filters-actions .btn-secondary {
  background: linear-gradient(180deg, rgba(20,31,52,.95), rgba(12,20,36,.95));
  border-color: color-mix(in srgb, var(--line) 68%, #93c5fd 32%);
  color: #eef4ff;
}

body[data-theme="dark"] .schedule-filters-actions .btn-primary {
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  border-color: rgba(239, 68, 68, .40);
}

body[data-theme="dark"] .schedule-filters-summary {
  background: linear-gradient(180deg, rgba(20,31,52,.9), rgba(12,20,36,.88));
  border-color: color-mix(in srgb, var(--line) 70%, #93c5fd 30%);
}

body[data-theme="dark"] .schedule-filters-summary__value {
  color: #eef4ff;
}

#schedule-filters-summary {
  display: none !important;
}

@media (min-width: 1201px) {
  .schedule-filters {
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 320px;
    gap: 8px;
    align-items: start;
  }

  .schedule-filters .schedule-filters-head p {
    display: none;
  }

  .schedule-filters .schedule-filters-head {
    grid-column: 1 / -1;
    margin-bottom: 0;
    padding-bottom: 2px;
  }

  .schedule-filters-row {
    gap: 8px;
  }

  .schedule-filters-row-core {
    display: contents;
  }

  .schedule-filters-row-core .filter-warehouse {
    grid-column: 1 !important;
    grid-row: 2;
  }

  .schedule-filters-row-core .schedule-filters-actions {
    grid-column: 3 !important;
    grid-row: 2;
    grid-template-columns: 1fr 1fr;
    padding: 6px;
    gap: 6px;
    justify-self: stretch;
    min-width: 0;
    width: 100%;
    align-self: center;
  }

  .schedule-filters-actions .btn-secondary,
  .schedule-filters-actions .btn-primary {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .schedule-filters-row-business {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin-top: 0;
    padding-bottom: 2px;
    min-height: 0;
    align-self: center;
  }

  .schedule-filters-row-business .field {
    flex: 0 0 auto;
    min-width: 170px;
  }

  .schedule-filters-row-business .filter-reference {
    min-width: 230px;
  }

  .schedule-filters-row-business .filter-workflow {
    min-width: 210px;
  }

  .schedule-filters-row-business .field input,
  .schedule-filters-row-business .field select,
  .schedule-filters-row-core .field input,
  .schedule-filters-row-core .field select {
    height: 34px;
    min-height: 34px;
    font-size: 12px;
  }
}

.group-header .group-header-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: color-mix(in srgb, var(--muted) 72%, #475569 28%);
  background: rgba(255,255,255,.58);
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
}

body[data-theme="dark"] .group-header .group-header-meta {
  color: rgba(226,232,240,.86);
  background: rgba(255,255,255,.05);
  border-color: rgba(148,163,184,.14);
}

body[data-theme="dark"] .schedule-filter-chip {
  background: linear-gradient(180deg, rgba(20, 31, 52, .95), rgba(12, 20, 36, .95));
  border-color: color-mix(in srgb, var(--line) 72%, #60a5fa 28%);
  color: #e5eefc;
}

@media (max-width: 1024px) {
  .sidebar.sidebar-modern.sidebar-v5 {
    width: 238px;
    min-width: 238px;
  }
}

/* Final footer pin (prevent overrides from later UI refresh blocks) */
.app-shell > .main > .page-footer.modern-footer {
  position: fixed !important;
  left: calc(260px + 32px) !important;
  right: 32px !important;
  bottom: 16px !important;
  z-index: 60 !important;
  margin-top: 0 !important;
}

/* Popup reservation history (slot modal) */
.slot-history-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, #ffffff 8%);
}

.slot-detail-top-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.slot-detail-top-actions .btn-secondary {
  min-height: 36px;
}

.slot-detail-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0 12px;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, #fff 14%);
  background: color-mix(in srgb, var(--panel) 92%, #fff 8%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
  position: relative;
}

.slot-detail-tab-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(255,255,255,.85) inset,
    0 8px 16px rgba(15, 23, 42, 0.08);
  transition: transform .22s ease, width .22s ease, background-color .16s ease, box-shadow .16s ease;
  z-index: 0;
}

.slot-detail-tab {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, box-shadow .18s ease, transform .14s ease;
  position: relative;
  z-index: 1;
}

.slot-detail-tab:hover {
  color: var(--ink);
  background: rgba(15, 23, 42, 0.04);
}

.slot-detail-tab.is-active {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

body[data-theme="dark"] .slot-detail-tabs {
  border-color: rgba(148,163,184,.16);
  background: rgba(11, 18, 31, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

body[data-theme="dark"] .slot-detail-tab-slider {
  background: rgba(28, 41, 66, 0.92);
  box-shadow:
    0 1px 0 rgba(255,255,255,.03) inset,
    0 10px 18px rgba(2, 6, 23, .28);
}

body[data-theme="dark"] .slot-detail-tab {
  color: #9fb0cc;
}

body[data-theme="dark"] .slot-detail-tab:hover {
  color: #e5eefc;
  background: rgba(255,255,255,.03);
}

body[data-theme="dark"] .slot-detail-tab.is-active {
  color: #f8fafc;
  background: transparent;
  box-shadow: none;
}

.slot-history-title {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

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

.slot-history-entry {
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel) 95%, #ffffff 5%);
}

.slot-history-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.slot-history-head strong {
  color: var(--ink);
}

.slot-history-lines {
  display: grid;
  gap: 4px;
}

.slot-history-line {
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
}

.slot-history-line-prefix {
  font-weight: 700;
  opacity: .9;
}

.slot-history-line.add { color: #166534; }
.slot-history-line.remove { color: #b91c1c; }
.slot-history-line.change { color: #1d4ed8; }
.status-pill.pending-approval {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body[data-theme="dark"] .slot-history-panel {
  background: rgba(10, 18, 34, 0.62);
  border-color: color-mix(in srgb, var(--line) 70%, #93c5fd 30%);
}

body[data-theme="dark"] .slot-history-entry {
  background: rgba(13, 22, 39, 0.82);
  border-color: color-mix(in srgb, var(--line) 72%, #60a5fa 28%);
}
body[data-theme="dark"] .status-pill.pending-approval {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

/* Ramp queue live */
.ramp-queue-live-card {
  display: grid;
  gap: 16px;
}

.ramp-queue-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ramp-queue-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rq-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .26);
  background: rgba(255,255,255,.75);
  font-size: 12px;
  color: var(--ink);
}

.rq-summary-pill strong {
  font-family: "Sora", sans-serif;
  font-size: 14px;
}

.rq-summary-waiting { border-color: rgba(249,115,22,.3); background: rgba(255,237,213,.75); color: #9a3412; }
.rq-summary-active { border-color: rgba(59,130,246,.28); background: rgba(219,234,254,.75); color: #1d4ed8; }
.rq-summary-finished { border-color: rgba(34,197,94,.25); background: rgba(220,252,231,.78); color: #166534; }

.ramp-queue-updated {
  font-size: 12px;
  color: var(--muted);
}

.ramp-visual-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.rq-warehouse-scene {
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,250,252,.9));
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.rq-warehouse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.rq-warehouse-title {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.rq-warehouse-legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rq-warehouse-side {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.rq-warehouse-yard {
  position: relative;
  height: 84px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.16);
  background:
    linear-gradient(180deg, rgba(15,23,42,.03), rgba(15,23,42,.01)),
    linear-gradient(90deg, rgba(226,232,240,.6), rgba(241,245,249,.9));
  overflow: hidden;
}

.rq-warehouse-lane {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 24px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(148,163,184,.0), rgba(148,163,184,.0) 10px, rgba(148,163,184,.55) 10px, rgba(148,163,184,.55) 20px);
}

.rq-warehouse-lane.lane-2 {
  top: 56px;
}

.rq-warehouse-label {
  position: absolute;
  left: 14px;
  bottom: 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.rq-wh-ramp {
  display: grid;
  gap: 6px;
}

.rq-wh-door {
  position: relative;
  height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.22);
  background: linear-gradient(180deg, rgba(241,245,249,.88), rgba(226,232,240,.85));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.rq-wh-door-panel {
  position: absolute;
  inset: 6px 8px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(180deg, rgba(148,163,184,.18), rgba(148,163,184,.18) 1px, rgba(255,255,255,.0) 1px, rgba(255,255,255,.0) 7px),
    linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.08));
  border: 1px solid rgba(148,163,184,.18);
}

.rq-wh-door-no {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(148,163,184,.26);
}

.rq-wh-door-queue {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(219,234,254,.95);
  border: 1px solid rgba(59,130,246,.22);
}

.rq-wh-ramp.is-occupied .rq-wh-door {
  border-color: rgba(59,130,246,.22);
  background: linear-gradient(180deg, rgba(239,246,255,.88), rgba(219,234,254,.7));
}

.rq-wh-ramp.rq-wh-at_ramp .rq-wh-door {
  border-color: rgba(59,130,246,.28);
}

.rq-wh-ramp.rq-wh-waiting_ramp .rq-wh-door {
  border-color: rgba(249,115,22,.26);
  background: linear-gradient(180deg, rgba(255,247,237,.9), rgba(255,237,213,.72));
}

.rq-wh-ramp.rq-wh-after_service .rq-wh-door {
  border-color: rgba(34,197,94,.24);
  background: linear-gradient(180deg, rgba(240,253,244,.9), rgba(220,252,231,.72));
}

.rq-wh-truck-wrap {
  position: relative;
  height: 42px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.82));
  border: 1px solid rgba(148,163,184,.18);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.rq-wh-truck-wrap::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(100,116,139,.12), rgba(100,116,139,.22));
}

.rq-wh-truck-wrap::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 7px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    rgba(148,163,184,.08),
    rgba(148,163,184,.08) 8px,
    rgba(148,163,184,.18) 8px,
    rgba(148,163,184,.18) 16px
  );
  opacity: .6;
}

.rq-wh-truck {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 0;
  height: 24px;
  transform: translateY(-50%);
  opacity: 0;
  transition: .2s ease;
  filter: drop-shadow(0 3px 4px rgba(15,23,42,.18));
}

.rq-wh-truck-wrap.is-present .rq-wh-truck {
  width: 112px;
  opacity: 1;
}

.rq-wh-truck-wrap.waiting_ramp .rq-wh-truck { left: 26px; }
.rq-wh-truck-wrap.ramp_assigned .rq-wh-truck { left: 38px; opacity: .9; }
.rq-wh-truck-wrap.at_ramp .rq-wh-truck,
.rq-wh-truck-wrap.after_service .rq-wh-truck { left: 8px; }

.rq-wh-cab,
.rq-wh-trailer {
  position: absolute;
  display: block;
  border-radius: 4px;
}

.rq-wh-cab {
  left: 0;
  top: 6px;
  width: 24px;
  height: 14px;
  border-radius: 5px 6px 4px 4px;
  background: linear-gradient(180deg, #ef4444, #dc2626 70%);
}

.rq-wh-cab::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 9px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(180deg, #bfdbfe, #93c5fd);
  opacity: .9;
}

.rq-wh-cab::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 4px;
  width: 4px;
  height: 8px;
  border-radius: 0 2px 2px 0;
  background: rgba(127,29,29,.32);
}

.rq-wh-trailer {
  left: 22px;
  top: 4px;
  width: 82px;
  height: 18px;
  border-radius: 4px 6px 5px 4px;
  background: linear-gradient(180deg, #f8fafc, #dbe5f0);
  border: 1px solid rgba(100,116,139,.22);
}

.rq-wh-trailer::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 8px;
  top: 3px;
  height: 2px;
  border-radius: 999px;
  background: rgba(59,130,246,.22);
}

.rq-wh-trailer::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 8px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: rgba(239,68,68,.16);
}

.rq-wh-wheel {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #64748b 0 22%, #0f172a 24% 72%, #94a3b8 74% 100%);
}
.rq-wh-wheel.a { left: 5px; }
.rq-wh-wheel.b { left: 56px; }
.rq-wh-wheel.c { left: 86px; }

.rq-wh-truck-wrap.after_service .rq-wh-truck {
  filter: grayscale(.1) saturate(.9) drop-shadow(0 3px 4px rgba(22,101,52,.15));
}

.rq-wh-truck-wrap.waiting_ramp .rq-wh-truck {
  filter: drop-shadow(0 3px 5px rgba(249,115,22,.18));
}

.rq-wh-truck-wrap.at_ramp .rq-wh-truck {
  filter: drop-shadow(0 3px 6px rgba(59,130,246,.2));
}

@keyframes rqTruckApproach {
  0% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(-8px);
  }
  100% {
    transform: translateY(-50%) translateX(0);
  }
}

@keyframes rqTruckApproachGlow {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
    border-color: rgba(148,163,184,.18);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 0 0 2px rgba(249,115,22,.08);
    border-color: rgba(249,115,22,.24);
  }
}

.rq-wh-truck-wrap.waiting_ramp.is-present {
  animation: rqTruckApproachGlow 1.9s ease-in-out 0s 3;
}

.rq-wh-truck-wrap.waiting_ramp.is-present .rq-wh-truck {
  animation: rqTruckApproach 1.9s ease-in-out 0s 3;
}

@media (prefers-reduced-motion: reduce) {
  .rq-wh-truck-wrap.waiting_ramp.is-present,
  .rq-wh-truck-wrap.waiting_ramp.is-present .rq-wh-truck {
    animation: none !important;
  }
}

.rq-wh-caption, .rq-wh-info {
  display: grid;
  gap: 3px;
}

.rq-wh-empty {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.rq-wh-empty-label,
.rq-wh-meta {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.2;
  word-break: break-word;
}

.rq-wh-code {
  font-size: 11px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.rq-parking-scene {
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(248,250,252,.88));
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.rq-parking-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title count"
    "sub count";
  align-items: center;
  gap: 2px 10px;
}

.rq-parking-title {
  grid-area: title;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
}

.rq-parking-subtitle {
  grid-area: sub;
  color: var(--muted);
  font-size: 12px;
}

.rq-parking-count {
  grid-area: count;
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: #991b1b;
  background: linear-gradient(180deg, #fee2e2, #fecaca);
  border: 1px solid rgba(239,68,68,.22);
}

.rq-parking-yard {
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 14px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(15,23,42,.02), rgba(15,23,42,.01)),
    repeating-linear-gradient(90deg, rgba(148,163,184,.04), rgba(148,163,184,.04) 20px, rgba(148,163,184,.08) 20px, rgba(148,163,184,.08) 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.rq-parking-empty {
  min-height: 70px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(148,163,184,.2);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.55);
  font-weight: 600;
  font-size: 13px;
}

.rq-park-spot {
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.84);
  padding: 8px;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas:
    "no stage"
    "info info";
  gap: 8px;
}

.rq-park-spot.is-clickable {
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.rq-park-spot.is-clickable:hover {
  transform: translateY(-1px);
  border-color: rgba(59,130,246,.26);
  box-shadow: 0 8px 18px rgba(59,130,246,.08);
}

.rq-park-spot.is-clickable:active {
  transform: translateY(0);
}

.rq-park-spot-no {
  grid-area: no;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(241,245,249,.95);
  border: 1px solid rgba(148,163,184,.22);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.rq-park-stage {
  grid-area: stage;
  min-height: 34px;
  border-radius: 10px;
  border: 1px dashed rgba(148,163,184,.2);
  background: linear-gradient(180deg, rgba(248,250,252,.9), rgba(241,245,249,.8));
  position: relative;
  overflow: hidden;
}

.rq-park-stage::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(148,163,184,.12), rgba(148,163,184,.12) 8px, rgba(148,163,184,.25) 8px, rgba(148,163,184,.25) 16px);
}

.rq-park-truck {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 112px;
  height: 22px;
  transform: translateY(-50%);
  filter: drop-shadow(0 3px 4px rgba(15,23,42,.16));
}

.rq-park-cab, .rq-park-trailer {
  position: absolute;
  display: block;
}

.rq-park-cab {
  left: 0;
  top: 6px;
  width: 23px;
  height: 13px;
  border-radius: 5px 6px 4px 4px;
  background: linear-gradient(180deg, #ef4444, #dc2626);
}

.rq-park-cab::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 9px;
  height: 5px;
  border-radius: 2px;
  background: linear-gradient(180deg, #bfdbfe, #93c5fd);
}

.rq-park-trailer {
  left: 22px;
  top: 4px;
  width: 82px;
  height: 16px;
  border-radius: 4px 6px 5px 4px;
  border: 1px solid rgba(100,116,139,.22);
  background: linear-gradient(180deg, #f8fafc, #dbe5f0);
}

.rq-park-wheel {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #64748b 0 22%, #0f172a 24% 72%, #94a3b8 74% 100%);
}
.rq-park-wheel.a { left: 5px; }
.rq-park-wheel.b { left: 56px; }
.rq-park-wheel.c { left: 86px; }

.rq-park-info {
  grid-area: info;
  display: grid;
  gap: 3px;
}

.rq-park-code {
  font-family: "Sora", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.rq-park-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.rq-park-spot .status-pill {
  justify-self: start;
}

body[data-theme="dark"] .rq-parking-scene {
  background: linear-gradient(180deg, rgba(15,23,42,.82), rgba(15,23,42,.74));
  border-color: rgba(148,163,184,.14);
}

body[data-theme="dark"] .rq-parking-yard {
  background:
    linear-gradient(180deg, rgba(2,6,23,.35), rgba(2,6,23,.22)),
    repeating-linear-gradient(90deg, rgba(148,163,184,.03), rgba(148,163,184,.03) 20px, rgba(148,163,184,.06) 20px, rgba(148,163,184,.06) 40px);
  border-color: rgba(148,163,184,.12);
}

body[data-theme="dark"] .rq-park-spot {
  background: rgba(15,23,42,.68);
  border-color: rgba(148,163,184,.12);
}

body[data-theme="dark"] .rq-park-spot-no,
body[data-theme="dark"] .rq-park-stage {
  background: rgba(30,41,59,.7);
  border-color: rgba(148,163,184,.14);
}

@media (max-width: 900px) {
  .rq-parking-head {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "sub"
      "count";
    gap: 6px;
  }

  .rq-parking-count {
    justify-self: start;
  }
}

/* Ramp queue truck visual v2 (more realistic TIR) */
.rq-wh-truck,
.rq-park-truck {
  height: 26px;
}

.rq-wh-truck::before,
.rq-park-truck::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 13px;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(71,85,105,.52), rgba(148,163,184,.36));
}

.rq-wh-truck::after,
.rq-park-truck::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 15px;
  width: 7px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(51,65,85,.8), rgba(15,23,42,.85));
  box-shadow: 0 -6px 0 rgba(148,163,184,.24);
}

.rq-wh-cab,
.rq-park-cab {
  top: 4px !important;
  width: 27px !important;
  height: 16px !important;
  border-radius: 6px 8px 4px 4px !important;
  border: 1px solid rgba(127,29,29,.30);
  background:
    linear-gradient(160deg, rgba(255,255,255,.28), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #f05252 0%, #d62828 62%, #b91c1c 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    inset 0 -2px 0 rgba(127,29,29,.26);
}

.rq-wh-cab::before,
.rq-park-cab::before {
  left: 1px !important;
  top: 8px !important;
  width: 3px !important;
  height: 3px !important;
  border-radius: 50% !important;
  background: #fef08a !important;
  box-shadow: 13px 4px 0 -2px #fde047;
}

.rq-wh-cab::after {
  right: 2px !important;
  top: 2px !important;
  width: 14px !important;
  height: 7px !important;
  border-radius: 2px 4px 2px 2px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0)),
    linear-gradient(180deg, #dbeafe, #93c5fd) !important;
  border: 1px solid rgba(30,58,138,.24) !important;
}

.rq-park-cab::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 2px;
  width: 14px;
  height: 7px;
  border-radius: 2px 4px 2px 2px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0)),
    linear-gradient(180deg, #dbeafe, #93c5fd);
  border: 1px solid rgba(30,58,138,.24);
}

.rq-wh-trailer,
.rq-park-trailer {
  left: 22px !important;
  top: 2px !important;
  width: 84px !important;
  height: 20px !important;
  border-radius: 4px 6px 6px 4px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(241,245,249,.92) 46%, rgba(219,234,254,.86) 100%) !important;
  border: 1px solid rgba(100,116,139,.32);
  box-shadow:
    inset -7px 0 0 rgba(148,163,184,.44),
    inset 0 1px 0 rgba(255,255,255,.75);
}

.rq-wh-trailer::before,
.rq-park-trailer::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 10px;
  top: 4px;
  height: 2px;
  border-radius: 999px;
  background: rgba(59,130,246,.24);
}

.rq-wh-trailer::after,
.rq-park-trailer::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 4px;
  height: 6px;
  border-radius: 3px;
  background:
    linear-gradient(90deg,
      rgba(148,163,184,.16) 0 12%,
      rgba(148,163,184,0) 12% 20%,
      rgba(148,163,184,.16) 20% 32%,
      rgba(148,163,184,0) 32% 40%,
      rgba(148,163,184,.16) 40% 52%,
      rgba(148,163,184,0) 52% 60%,
      rgba(148,163,184,.16) 60% 72%,
      rgba(148,163,184,0) 72% 80%,
      rgba(148,163,184,.16) 80% 92%,
      rgba(148,163,184,0) 92% 100%);
}

.rq-wh-wheel,
.rq-park-wheel {
  width: 9px !important;
  height: 9px !important;
  background:
    radial-gradient(circle at 40% 38%, #e2e8f0 0 14%, #64748b 16% 28%, #0f172a 30% 74%, #94a3b8 76% 100%) !important;
  border: 1px solid rgba(15,23,42,.35);
}

.rq-wh-wheel.b,
.rq-park-wheel.b { left: 64px !important; }

.rq-wh-wheel.c,
.rq-park-wheel.c { left: 92px !important; }

/* Ramp queue truck lights blink (waiting before ramp) */
@keyframes rqTruckBlinkLightsV2 {
  0%, 42%, 100% {
    box-shadow:
      0 0 0 rgba(250,204,21,0),
      13px 4px 0 -2px rgba(250,204,21,0);
  }
  48%, 58% {
    box-shadow:
      0 0 10px rgba(250,204,21,.75),
      13px 4px 0 -2px rgba(250,204,21,.95);
  }
}

.rq-wh-truck-wrap.waiting_ramp.is-present .rq-wh-cab::before,
.rq-park-spot.rq-park-waiting_ramp .rq-park-cab::before {
  animation: rqTruckBlinkLightsV2 1.4s ease-in-out 0s 4;
}

@media (prefers-reduced-motion: reduce) {
  .rq-wh-truck-wrap.waiting_ramp.is-present .rq-wh-cab::before,
  .rq-park-spot.rq-park-waiting_ramp .rq-park-cab::before {
    animation: none !important;
  }
}

.rq-ramp-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(248,250,252,.9));
  box-shadow: 0 8px 22px rgba(15,23,42,.06);
  overflow: hidden;
}

.rq-ramp-card.is-busy {
  border-color: rgba(59,130,246,.22);
}

.rq-ramp-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-weight: 700;
  font-family: "Sora", sans-serif;
  border-bottom: 1px solid rgba(148,163,184,.16);
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(248,250,252,.25));
}

.rq-ramp-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(255,255,255,.8);
  font-size: 12px;
  color: var(--muted);
}

.rq-ramp-body {
  padding: 10px;
  display: grid;
  gap: 10px;
}

.rq-ramp-empty, .rq-col-empty, .rq-ramp-more {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(148,163,184,.28);
  color: var(--muted);
  font-size: 12px;
  background: rgba(248,250,252,.65);
}

.rq-ramp-more {
  text-align: center;
  font-weight: 600;
}

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

.rq-col {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 22px rgba(15,23,42,.05);
  min-height: 260px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.rq-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-weight: 700;
  font-family: "Sora", sans-serif;
  border-bottom: 1px solid rgba(148,163,184,.14);
}

.rq-col-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(255,255,255,.85);
}

.rq-col-waiting .rq-col-head { background: rgba(255,237,213,.45); color: #9a3412; }
.rq-col-active .rq-col-head { background: rgba(219,234,254,.45); color: #1d4ed8; }
.rq-col-finished .rq-col-head { background: rgba(220,252,231,.45); color: #166534; }

.rq-col-body {
  padding: 10px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.rq-item {
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  padding: 10px;
  display: grid;
  gap: 6px;
  box-shadow: 0 6px 14px rgba(15,23,42,.04);
}

.rq-state-at_ramp { border-color: rgba(59,130,246,.26); box-shadow: 0 8px 18px rgba(59,130,246,.10); }
.rq-state-waiting_ramp { border-color: rgba(249,115,22,.24); box-shadow: 0 8px 18px rgba(249,115,22,.08); }
.rq-state-after_service { border-color: rgba(34,197,94,.24); box-shadow: 0 8px 18px rgba(34,197,94,.08); }

.rq-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rq-item-time {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.rq-item-code {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.rq-item-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
}

.rq-truck-line {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
}

.rq-truck-icon {
  position: relative;
  width: 24px;
  height: 18px;
  margin-top: 1px;
}

.rq-truck-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 14px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(239,68,68,.92), rgba(220,38,38,.92));
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.15);
}

.rq-truck-icon::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 1px;
  width: 11px;
  height: 11px;
  border-radius: 3px 4px 3px 3px;
  background: linear-gradient(180deg, rgba(148,163,184,.95), rgba(100,116,139,.95));
  box-shadow:
    -10px 14px 0 -8px #111827,
    3px 14px 0 -8px #111827;
}

.rq-truck-plates {
  display: grid;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.rq-truck-plates strong {
  color: var(--ink);
  font-weight: 700;
}

body[data-theme="dark"] .rq-summary-pill,
body[data-theme="dark"] .rq-col,
body[data-theme="dark"] .rq-ramp-card,
body[data-theme="dark"] .rq-item {
  background: rgba(15, 23, 42, .72);
  border-color: rgba(148, 163, 184, .16);
}

body[data-theme="dark"] .ramp-queue-live-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(239, 68, 68, 0.06), transparent 36%),
    radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.05), transparent 34%),
    linear-gradient(180deg, rgba(15,23,42,.78), rgba(15,23,42,.72));
  border-color: rgba(148, 163, 184, .14);
}

body[data-theme="dark"] .ramp-queue-topbar {
  border-bottom: 1px solid rgba(148, 163, 184, .10);
  padding-bottom: 10px;
}

body[data-theme="dark"] .ramp-queue-updated {
  color: rgba(226, 232, 240, .78);
}

body[data-theme="dark"] .ramp-queue-updated strong {
  color: #f8fafc;
}

body[data-theme="dark"] .rq-ramp-title,
body[data-theme="dark"] .rq-col-head {
  border-bottom-color: rgba(148,163,184,.12);
}

body[data-theme="dark"] .rq-summary-waiting { color: #fed7aa; background: rgba(124,45,18,.28); border-color: rgba(251,146,60,.22); }
body[data-theme="dark"] .rq-summary-active { color: #bfdbfe; background: rgba(30,58,138,.30); border-color: rgba(96,165,250,.20); }
body[data-theme="dark"] .rq-summary-finished { color: #bbf7d0; background: rgba(20,83,45,.30); border-color: rgba(74,222,128,.18); }

body[data-theme="dark"] .rq-ramp-empty,
body[data-theme="dark"] .rq-col-empty,
body[data-theme="dark"] .rq-ramp-more {
  background: rgba(30,41,59,.55);
  border-color: rgba(148,163,184,.16);
}

body[data-theme="dark"] .rq-warehouse-scene {
  background: linear-gradient(180deg, rgba(15,23,42,.84), rgba(15,23,42,.78));
  border-color: rgba(148,163,184,.16);
  box-shadow: 0 14px 28px rgba(2, 6, 23, .26);
}

body[data-theme="dark"] .rq-warehouse-title {
  color: #f8fafc;
}

body[data-theme="dark"] .rq-warehouse-yard {
  border-color: rgba(148,163,184,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)),
    linear-gradient(90deg, rgba(51,65,85,.52), rgba(30,41,59,.78));
}

body[data-theme="dark"] .rq-warehouse-lane {
  background: repeating-linear-gradient(90deg, rgba(148,163,184,.0), rgba(148,163,184,.0) 10px, rgba(148,163,184,.42) 10px, rgba(148,163,184,.42) 20px);
}

body[data-theme="dark"] .rq-warehouse-label,
body[data-theme="dark"] .rq-wh-empty-label,
body[data-theme="dark"] .rq-wh-meta,
body[data-theme="dark"] .rq-wh-caption,
body[data-theme="dark"] .rq-wh-info {
  color: rgba(226,232,240,.76);
}

body[data-theme="dark"] .rq-wh-door {
  border-color: rgba(148,163,184,.18);
  background: linear-gradient(180deg, rgba(30,41,59,.86), rgba(15,23,42,.78));
}

body[data-theme="dark"] .rq-wh-door-panel {
  border-color: rgba(148,163,184,.14);
  background:
    repeating-linear-gradient(180deg, rgba(148,163,184,.12), rgba(148,163,184,.12) 1px, rgba(255,255,255,.0) 1px, rgba(255,255,255,.0) 7px),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
}

body[data-theme="dark"] .rq-wh-door-no {
  background: rgba(15,23,42,.92);
  color: #f8fafc;
  border-color: rgba(148,163,184,.18);
}

@media (max-width: 1200px) {
  .ramp-queue-columns {
    grid-template-columns: 1fr;
  }
}

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

.rq-tech-section {
  margin-top: 8px;
  display: grid;
  gap: 10px;
}

.rq-tech-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .03em;
  text-transform: uppercase;
}

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

.rq-bay {
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(248,250,252,.88));
  padding: 10px;
  display: grid;
  gap: 8px;
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
}

.rq-bay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rq-bay-title {
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.rq-bay-queue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #1f2937;
  border: 1px solid rgba(59,130,246,.28);
  background: rgba(219,234,254,.85);
}

.rq-bay-stage {
  position: relative;
  border-radius: 12px;
  height: 68px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(15,23,42,.06), rgba(15,23,42,.02)),
    linear-gradient(90deg, rgba(203,213,225,.35) 0, rgba(203,213,225,.35) 58%, rgba(148,163,184,.18) 58%, rgba(148,163,184,.18) 100%);
  border: 1px solid rgba(148,163,184,.18);
}

.rq-bay-wall {
  position: absolute;
  inset: 0 auto 0 0;
  width: 18px;
  background: linear-gradient(180deg, rgba(100,116,139,.2), rgba(100,116,139,.08));
  border-right: 1px dashed rgba(100,116,139,.25);
}

.rq-bay-dock-mark {
  position: absolute;
  top: 50%;
  left: 24px;
  right: 10px;
  height: 2px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.0), rgba(255,255,255,.0) 8px, rgba(255,255,255,.38) 8px, rgba(255,255,255,.38) 16px);
  opacity: .55;
}

.rq-bay-truck {
  position: absolute;
  top: 50%;
  left: 34px;
  width: 0;
  height: 28px;
  transform: translateY(-50%);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.rq-bay-truck.is-present {
  width: 128px;
  opacity: 1;
}

.rq-bay-truck.at_ramp,
.rq-bay-truck.in_progress {
  left: 34px;
}

.rq-bay-truck.waiting_ramp {
  left: 58px;
}

.rq-bay-truck.ramp_assigned {
  left: 72px;
  opacity: .8;
}

.rq-bay-cab,
.rq-bay-trailer {
  position: absolute;
  display: block;
  border-radius: 5px;
}

.rq-bay-cab {
  left: 0;
  top: 6px;
  width: 24px;
  height: 16px;
  background: linear-gradient(180deg, #ef4444, #dc2626);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.18);
}

.rq-bay-trailer {
  left: 22px;
  top: 4px;
  width: 92px;
  height: 20px;
  background: linear-gradient(180deg, #e5e7eb, #cbd5e1);
  border: 1px solid rgba(100,116,139,.24);
}

.rq-bay-wheel {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.rq-bay-wheel.a { left: 5px; }
.rq-bay-wheel.b { left: 64px; }
.rq-bay-wheel.c { left: 98px; }

.rq-bay-info {
  display: grid;
  gap: 4px;
}

.rq-bay-code {
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.2;
  word-break: break-word;
}

.rq-bay-meta,
.rq-bay-empty-label {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.rq-bay-empty-label {
  font-style: italic;
}

.rq-bay.is-empty {
  opacity: .95;
}

.rq-bay.rq-bay-at_ramp {
  border-color: rgba(59,130,246,.28);
  box-shadow: 0 12px 24px rgba(59,130,246,.10);
}

.rq-bay.rq-bay-waiting_ramp {
  border-color: rgba(249,115,22,.26);
  box-shadow: 0 12px 24px rgba(249,115,22,.08);
}

.rq-bay.rq-bay-after_service {
  border-color: rgba(34,197,94,.24);
  box-shadow: 0 12px 24px rgba(34,197,94,.08);
}

.rq-bay.rq-bay-ramp_assigned {
  border-color: rgba(59,130,246,.18);
}

body[data-theme="dark"] .rq-bay {
  background: linear-gradient(180deg, rgba(15,23,42,.84), rgba(15,23,42,.76));
  border-color: rgba(148,163,184,.16);
}

body[data-theme="dark"] .rq-bay-stage {
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)),
    linear-gradient(90deg, rgba(51,65,85,.62) 0, rgba(51,65,85,.62) 58%, rgba(30,41,59,.7) 58%, rgba(30,41,59,.7) 100%);
  border-color: rgba(148,163,184,.12);
}

body[data-theme="dark"] .rq-bay-wall {
  background: linear-gradient(180deg, rgba(148,163,184,.12), rgba(148,163,184,.06));
  border-right-color: rgba(148,163,184,.16);
}

body[data-theme="dark"] .rq-bay-trailer {
  background: linear-gradient(180deg, #334155, #1e293b);
  border-color: rgba(148,163,184,.18);
}

body[data-theme="dark"] .rq-bay-cab {
  background: linear-gradient(180deg, #f87171, #dc2626);
}

/* ===== Reservation create redesign ===== */
body.page-schedule #slot-modal #slot-create-view {
  display: grid;
  gap: 16px;
  padding: 0 !important;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.08), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,248,253,.98)) !important;
  border: 1px solid rgba(191, 219, 254, 0.9) !important;
  border-radius: 24px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.88),
    0 22px 50px rgba(15,23,42,.08);
  overflow: hidden;
}

body.page-schedule #slot-modal #slot-create-view > #slot-create-summary {
  margin: 18px 18px 0;
  border-radius: 20px !important;
  border: 1px solid rgba(191, 219, 254, 0.95) !important;
  background:
    linear-gradient(135deg, rgba(239,246,255,.96), rgba(255,255,255,.98)) !important;
  box-shadow: 0 14px 32px rgba(59,130,246,.08);
}

body.page-schedule #slot-modal .slot-create-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.page-schedule #slot-modal .slot-create-progress__step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(203,213,225,.95);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  box-shadow: 0 10px 22px rgba(15,23,42,.04);
}

body.page-schedule #slot-modal .slot-create-progress__step.is-active {
  border-color: rgba(37,99,235,.32);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 34%),
    linear-gradient(180deg, rgba(239,246,255,.98), rgba(255,255,255,.98));
  box-shadow: 0 16px 30px rgba(37,99,235,.09);
}

body.page-schedule #slot-modal .slot-create-progress__step.is-complete .slot-create-progress__index {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 12px 24px rgba(16,185,129,.22);
}

body.page-schedule #slot-modal .slot-create-progress__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(37,99,235,.18);
}

body.page-schedule #slot-modal .slot-create-progress__content strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 15px;
}

body.page-schedule #slot-modal .slot-create-progress__content span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

body.page-schedule #slot-modal .slot-create-hero {
  margin: 0 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(191,219,254,.92);
  background:
    radial-gradient(circle at top right, rgba(14,165,233,.14), transparent 36%),
    linear-gradient(135deg, rgba(37,99,235,.08), rgba(255,255,255,.98) 56%);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .9fr);
  gap: 16px;
  align-items: center;
}

body.page-schedule #slot-modal .slot-create-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.14);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.page-schedule #slot-modal .slot-create-hero h4 {
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 1.08;
  color: #0f172a;
  letter-spacing: -.03em;
}

body.page-schedule #slot-modal .slot-create-hero p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  max-width: 720px;
}

body.page-schedule #slot-modal .slot-create-hero__tips {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

body.page-schedule #slot-modal .slot-create-hero__tip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(191,219,254,.95);
  color: #1e3a8a;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15,23,42,.04);
}

body.page-schedule #slot-modal .slot-create-hero__tip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 0 0 6px rgba(59,130,246,.12);
  flex: 0 0 auto;
}

body.page-schedule #slot-modal .slot-create-mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.page-schedule #slot-modal .slot-mode-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 148px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(191,219,254,.92);
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,250,255,.99));
  color: #334155;
  text-align: left;
  box-shadow: 0 16px 32px rgba(15,23,42,.05);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

body.page-schedule #slot-modal .slot-mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59,130,246,.42);
  box-shadow: 0 20px 38px rgba(37,99,235,.10);
}

body.page-schedule #slot-modal .slot-mode-card.is-active {
  border-color: rgba(37,99,235,.55);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.14), transparent 34%),
    linear-gradient(180deg, rgba(239,246,255,.99), rgba(255,255,255,.99));
  box-shadow: 0 22px 40px rgba(37,99,235,.12);
}

body.page-schedule #slot-modal .slot-mode-card__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.14);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.page-schedule #slot-modal .slot-mode-card strong {
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -.02em;
}

body.page-schedule #slot-modal .slot-mode-card span:not(.slot-mode-card__badge) {
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
}

body.page-schedule #slot-modal #slot-create-form {
  gap: 14px 14px;
  padding: 0 18px 18px;
}

body.page-schedule #slot-modal .slot-create-selection-guard {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(248,113,113,.28);
  background:
    linear-gradient(180deg, rgba(254,242,242,.98), rgba(255,255,255,.98));
  box-shadow: 0 16px 34px rgba(248,113,113,.08);
}

body.page-schedule #slot-modal .slot-create-selection-guard__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(239,68,68,.08);
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

body.page-schedule #slot-modal .slot-presets-box {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(191,219,254,.94);
  background:
    linear-gradient(180deg, rgba(248,250,252,.98), rgba(255,255,255,.98));
  box-shadow: 0 14px 28px rgba(15,23,42,.05);
}

body.page-schedule #slot-modal .slot-presets-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, auto);
  gap: 10px;
  align-items: end;
}

body.page-schedule #slot-modal .slot-presets-field {
  display: grid;
  gap: 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

body.page-schedule #slot-modal .slot-presets-msg {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(239,246,255,.84);
  border: 1px solid rgba(147,197,253,.45);
  color: #1d4ed8;
  font-weight: 600;
}

body.page-schedule #slot-modal .slot-form-shell {
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(191,219,254,.92);
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.06), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,250,255,.99));
  box-shadow: 0 16px 32px rgba(15,23,42,.05);
}

body.page-schedule #slot-modal .slot-form-shell__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

body.page-schedule #slot-modal .slot-form-shell__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.page-schedule #slot-modal .slot-form-shell__header h4 {
  margin: 10px 0 0;
  font-size: 22px;
  line-height: 1.15;
  color: #0f172a;
  letter-spacing: -.02em;
}

body.page-schedule #slot-modal .slot-create-section-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(191,219,254,.95);
  background: linear-gradient(180deg, rgba(239,246,255,.96), rgba(255,255,255,.96));
}

body.page-schedule #slot-modal .slot-create-section-title__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  box-shadow: 0 10px 24px rgba(37,99,235,.22);
}

body.page-schedule #slot-modal .slot-create-section-title strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
  color: #0f172a;
}

body.page-schedule #slot-modal .slot-create-section-title p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

body.page-schedule #slot-modal .form-card-field {
  display: grid;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(203,213,225,.9);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  box-shadow: 0 12px 24px rgba(15,23,42,.04);
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

body.page-schedule #slot-modal .form-card-field:hover {
  border-color: rgba(147,197,253,.9);
  box-shadow: 0 16px 30px rgba(59,130,246,.08);
}

body.page-schedule #slot-modal .form-card-field--mode {
  padding: 16px 16px 14px;
  border-radius: 20px;
  border-color: rgba(37,99,235,.18);
  background:
    radial-gradient(circle at right top, rgba(37,99,235,.10), transparent 30%),
    linear-gradient(180deg, rgba(239,246,255,.96), rgba(255,255,255,.98));
}

body.page-schedule #slot-modal .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body.page-schedule #slot-modal .form-card-field select,
body.page-schedule #slot-modal .form-card-field textarea {
  min-height: 44px;
  border-radius: 14px !important;
  border: 1px solid rgba(203,213,225,.95) !important;
  background: #ffffff !important;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

body.page-schedule #slot-modal .form-card-field textarea {
  min-height: 116px;
}

body.page-schedule #slot-modal .form-card-field input::placeholder,
body.page-schedule #slot-modal .form-card-field textarea::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

body.page-schedule #slot-modal .form-card-field input[type="checkbox"] {
  accent-color: #2563eb;
}

body.page-schedule #slot-modal .form-card-field--toggle {
  align-content: start;
}

body.page-schedule #slot-modal .slot-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 2px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

body.page-schedule #slot-modal .slot-smart-hint {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(191,219,254,.95);
  background: linear-gradient(180deg, rgba(239,246,255,.92), rgba(255,255,255,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

body.page-schedule #slot-modal .slot-smart-hint__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 14px 28px rgba(37,99,235,.18);
}

body.page-schedule #slot-modal .slot-smart-hint__content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  color: #0f172a;
}

body.page-schedule #slot-modal .slot-smart-hint__content span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

body.page-schedule #slot-modal .slot-form-shell__badge-row,
body.page-schedule #slot-modal .slot-operation-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-schedule #slot-modal .slot-inline-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(255,255,255,.82);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

body.page-schedule #slot-modal .slot-create-shuttle {
  display: grid;
  gap: 14px;
  padding: 4px 0 0;
}

body.page-schedule #slot-modal .slot-create-grid--paired {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(191,219,254,.95);
  background:
    radial-gradient(circle at top right, rgba(14,165,233,.06), transparent 30%),
    linear-gradient(180deg, rgba(245,250,255,.98), rgba(255,255,255,.98));
  box-shadow: 0 16px 32px rgba(14,165,233,.05);
}

body.page-schedule #slot-modal #slot-shuttle-target-shell {
  background:
    linear-gradient(135deg, rgba(239,246,255,.98), rgba(255,255,255,.98));
}

body.page-schedule #slot-modal .shuttle-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

body.page-schedule #slot-modal .shuttle-target-board {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(37,99,235,.38);
  background: rgba(239,246,255,.78);
  color: #1e3a8a;
}

body.page-schedule #slot-modal .shuttle-target-board__headline {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}

body.page-schedule #slot-modal .handling-people-manual,
body.page-schedule #slot-modal [data-carrier-other],
body.page-schedule #slot-modal [data-driver-other] {
  margin-top: 0 !important;
}

body.page-schedule #slot-modal [data-unloader-add],
body.page-schedule #slot-modal [data-loader-add],
body.page-schedule #slot-modal [data-paired-unloader-add],
body.page-schedule #slot-modal [data-paired-loader-add] {
  margin-top: 2px !important;
  justify-self: start;
}

body.page-schedule #slot-modal .slot-create-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 4px -18px -18px;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.96) 24%);
  border-top: 1px solid rgba(226,232,240,.9);
  backdrop-filter: blur(14px);
}

body.page-schedule #slot-modal .slot-create-actions .btn-primary,
body.page-schedule #slot-modal .slot-create-actions .btn-secondary,
body.page-schedule #slot-modal .slot-create-actions .btn-danger {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 700;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view {
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.14), transparent 30%),
    linear-gradient(180deg, rgba(8,15,29,.98), rgba(11,18,32,.98)) !important;
  border-color: rgba(51,65,85,.9) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 24px 60px rgba(2,6,23,.42);
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view > #slot-create-summary,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-hero,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-progress__step,
body[data-theme="dark"].page-schedule #slot-modal .slot-mode-card,
body[data-theme="dark"].page-schedule #slot-modal .slot-presets-box,
body[data-theme="dark"].page-schedule #slot-modal .slot-form-shell,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-section-title,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-grid--paired,
body[data-theme="dark"].page-schedule #slot-modal .form-card-field,
body[data-theme="dark"].page-schedule #slot-modal .slot-smart-hint,
body[data-theme="dark"].page-schedule #slot-modal .shuttle-target-board {
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(12,18,30,.94)) !important;
  border-color: rgba(51,65,85,.92) !important;
  box-shadow: 0 16px 32px rgba(2,6,23,.22);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-create-hero h4,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-progress__content strong,
body[data-theme="dark"].page-schedule #slot-modal .slot-mode-card strong,
body[data-theme="dark"].page-schedule #slot-modal .slot-form-shell__header h4,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-section-title strong,
body[data-theme="dark"].page-schedule #slot-modal .slot-smart-hint__content strong {
  color: #f8fafc;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-create-hero p,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-progress__content span,
body[data-theme="dark"].page-schedule #slot-modal .slot-mode-card span:not(.slot-mode-card__badge),
body[data-theme="dark"].page-schedule #slot-modal .slot-create-section-title p,
body[data-theme="dark"].page-schedule #slot-modal .slot-smart-hint__content span {
  color: #94a3b8;
}

body[data-theme="dark"].page-schedule #slot-modal .form-card-field {
  color: #93c5fd;
}

body[data-theme="dark"].page-schedule #slot-modal .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body[data-theme="dark"].page-schedule #slot-modal .form-card-field select,
body[data-theme="dark"].page-schedule #slot-modal .form-card-field textarea {
  background: #0f172a !important;
  border-color: rgba(71,85,105,.94) !important;
  color: #f8fafc;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-create-actions {
  background: linear-gradient(180deg, rgba(8,15,29,.52), rgba(8,15,29,.92) 24%);
  border-top-color: rgba(51,65,85,.9);
}

@media (max-width: 1100px) {
  body.page-schedule #slot-modal .slot-create-progress,
  body.page-schedule #slot-modal .slot-create-mode-picker {
    grid-template-columns: 1fr;
  }
  body.page-schedule #slot-modal .slot-create-hero {
    grid-template-columns: 1fr;
  }
  body.page-schedule #slot-modal .slot-presets-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  body.page-schedule #slot-modal .slot-create-hero {
    margin: 0 12px;
    padding: 16px;
  }
  body.page-schedule #slot-modal #slot-create-summary {
    margin: 12px 12px 0;
  }
  body.page-schedule #slot-modal #slot-create-form {
    padding: 0 12px 12px;
  }
  body.page-schedule #slot-modal .slot-presets-row {
    grid-template-columns: 1fr;
  }
  body.page-schedule #slot-modal .slot-create-actions {
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ===== Reservation create redesign v3 ===== */
body.page-schedule #slot-modal #slot-create-view {
  gap: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(14,165,233,.10), transparent 28%),
    radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 30%),
    linear-gradient(180deg, rgba(250,252,255,.98), rgba(242,247,255,.98)) !important;
}

body.page-schedule #slot-modal #slot-create-view > #slot-create-summary,
body.page-schedule #slot-modal .slot-create-hero,
body.page-schedule #slot-modal .slot-presets-box,
body.page-schedule #slot-modal .slot-form-shell,
body.page-schedule #slot-modal .slot-create-section-title,
body.page-schedule #slot-modal .slot-create-grid--paired,
body.page-schedule #slot-modal .slot-create-selection-guard {
  margin: 0;
  border-radius: 26px !important;
  border-color: rgba(203, 216, 236, .92) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 18px 36px rgba(15,23,42,.05) !important;
}

body.page-schedule #slot-modal #slot-create-summary {
  border-radius: 24px !important;
}

body.page-schedule #slot-modal .slot-create-progress {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.page-schedule #slot-modal .slot-create-progress__step {
  min-height: 74px;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: none;
}

body.page-schedule #slot-modal .slot-create-hero {
  padding: 22px 24px;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr);
}

body.page-schedule #slot-modal .slot-create-hero h4 {
  font-size: 32px;
}

body.page-schedule #slot-modal .slot-create-hero__tips {
  gap: 12px;
}

body.page-schedule #slot-modal .slot-create-hero__tip {
  min-height: 56px;
  border-radius: 18px;
}

body.page-schedule #slot-modal #slot-create-form {
  gap: 16px;
  padding: 0;
}

body.page-schedule #slot-modal .slot-presets-box {
  padding: 18px 20px;
}

body.page-schedule #slot-modal .slot-form-shell {
  padding: 20px 22px;
}

body.page-schedule #slot-modal .slot-form-shell--mode {
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 34%),
    linear-gradient(180deg, rgba(248,251,255,.99), rgba(255,255,255,.99)) !important;
}

body.page-schedule #slot-modal .slot-form-shell__header {
  margin-bottom: 14px;
}

body.page-schedule #slot-modal .slot-form-shell__header h4 {
  font-size: 24px;
}

body.page-schedule #slot-modal .slot-create-mode-picker {
  gap: 16px;
}

body.page-schedule #slot-modal .slot-mode-card {
  min-height: 170px;
  padding: 20px;
  border-radius: 24px;
}

body.page-schedule #slot-modal .slot-mode-card strong {
  font-size: 24px;
}

body.page-schedule #slot-modal .slot-create-section-title {
  padding: 18px 20px;
  border-style: solid;
}

body.page-schedule #slot-modal .slot-create-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body.page-schedule #slot-modal .slot-create-fields-grid .span-2 {
  grid-column: span 2;
}

body.page-schedule #slot-modal .slot-create-fields-grid .span-3 {
  grid-column: 1 / -1;
}

body.page-schedule #slot-modal .slot-create-fields-grid--transport {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.page-schedule #slot-modal .slot-create-fields-grid--transport .span-2 {
  grid-column: span 2;
}

body.page-schedule #slot-modal .form-card-field {
  padding: 15px 15px 13px;
  border-radius: 20px;
  border-color: rgba(207, 218, 234, .95);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(15,23,42,.03);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

body.page-schedule #slot-modal .form-card-field:hover {
  transform: translateY(-1px);
}

body.page-schedule #slot-modal .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body.page-schedule #slot-modal .form-card-field select,
body.page-schedule #slot-modal .form-card-field textarea {
  min-height: 46px;
  border-radius: 15px !important;
}

body.page-schedule #slot-modal .slot-create-grid--paired {
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.page-schedule #slot-modal .slot-create-actions {
  margin: 4px 0 0;
  padding: 16px 0 0;
  background: transparent;
  border-top: 1px solid rgba(214, 224, 239, .9);
  backdrop-filter: none;
}

body.page-schedule #slot-modal .slot-create-actions .btn-primary,
body.page-schedule #slot-modal .slot-create-actions .btn-secondary,
body.page-schedule #slot-modal .slot-create-actions .btn-danger {
  min-height: 48px;
  border-radius: 16px;
  padding: 0 18px;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view {
  background:
    radial-gradient(circle at top left, rgba(14,165,233,.10), transparent 28%),
    radial-gradient(circle at top right, rgba(37,99,235,.14), transparent 30%),
    linear-gradient(180deg, rgba(8,15,29,.98), rgba(11,18,32,.98)) !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view > #slot-create-summary,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-hero,
body[data-theme="dark"].page-schedule #slot-modal .slot-presets-box,
body[data-theme="dark"].page-schedule #slot-modal .slot-form-shell,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-section-title,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-grid--paired,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-selection-guard {
  background: linear-gradient(180deg, rgba(15,23,42,.94), rgba(12,18,30,.96)) !important;
  border-color: rgba(51,65,85,.9) !important;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-create-actions {
  border-top-color: rgba(51,65,85,.9);
}

@media (max-width: 1180px) {
  body.page-schedule #slot-modal .slot-create-fields-grid,
  body.page-schedule #slot-modal .slot-create-fields-grid--transport {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.page-schedule #slot-modal #slot-create-view {
    padding: 12px;
  }

  body.page-schedule #slot-modal .slot-create-progress,
  body.page-schedule #slot-modal .slot-create-mode-picker,
  body.page-schedule #slot-modal .slot-create-fields-grid,
  body.page-schedule #slot-modal .slot-create-fields-grid--transport {
    grid-template-columns: 1fr;
  }

  body.page-schedule #slot-modal .slot-create-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  body.page-schedule #slot-modal .slot-create-progress__step {
    grid-template-columns: 38px minmax(0, 1fr);
  }
}

@media (max-width: 1350px) {
  .rq-bay-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 640px) {
  .rq-bay-grid {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"] .pending-approvals-widget {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.7));
  border-color: rgba(248, 113, 113, 0.22);
  box-shadow:
    0 14px 26px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

body[data-theme="dark"] .pending-approvals-widget__label {
  color: #cbd5e1;
}

body[data-theme="dark"] .pending-approvals-widget__count {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.28);
}

@media (max-width: 900px) {
  .app-shell > .main > .page-footer.modern-footer {
    left: 24px !important;
    right: 24px !important;
    bottom: 12px !important;
  }
}

@media (max-width: 640px) {
  .app-shell > .main > .page-footer.modern-footer {
    left: 12px !important;
    right: 12px !important;
    bottom: 10px !important;
  }
}

/* Emergency layout recovery: ensure main content stays visible/clickable */
.app-shell > .main {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  overflow: visible !important;
  z-index: 1 !important;
}

.app-shell > .main::before,
.app-shell > .main::after {
  display: none !important;
  content: none !important;
}

.app-shell > .main > *:not(.modal) {
  position: relative !important;
  z-index: 10 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.app-shell > .main > .modal {
  z-index: 2600 !important;
}

/* Strong content recovery for all pages (reset accidental hidden/offset states) */
.app-shell > .main > .page-header,
.app-shell > .main > .layout,
.app-shell > .main > section,
.app-shell > .main > .card,
.app-shell > .main > .panel,
.app-shell > .main > .notice,
.app-shell > .main > .page-footer {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  filter: none !important;
  clip-path: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.app-shell > .main > .page-header {
  display: flex !important;
}

.app-shell > .main > .layout,
.app-shell > .main > section.layout {
  display: block !important;
}

.app-shell > .main .panel,
.app-shell > .main .card {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
}



.reservation-approvals-empty-cell { text-align:center; padding:20px; }

.page-todo .todo-shell {
  display: grid;
  gap: 16px;
}

.page-todo .todo-stats-grid {
  margin-bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.page-todo .todo-flash-success {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.page-todo .todo-flash-error {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.page-todo .todo-create-form {
  margin-bottom: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 80%, #ffffff 20%);
  box-shadow: var(--shadow-soft);
}

.page-todo .todo-create-header {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.page-todo .todo-create-header h3 {
  margin: 0 0 4px;
}

.page-todo .todo-create-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-todo .todo-create-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.page-todo .todo-filters-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 86%, #f8fafc 14%);
}

.page-todo .todo-filter-field {
  display: grid;
  gap: 6px;
  min-height: 38px;
}

.page-todo .todo-filter-field > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.page-todo .todo-filters-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.page-todo .todo-filters-head h3 {
  margin: 0;
}

.page-todo .todo-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--card);
}

.page-todo .todo-filter-check input {
  margin: 0;
}

.page-todo .todo-filter-check span {
  font-size: 13px;
}

.page-todo .todo-filter-actions {
  display: flex;
  justify-content: flex-end;
}

.page-todo .todo-columns {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: start;
}

.page-todo .todo-column {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

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

.page-todo .todo-column-head h3 {
  margin: 0;
}

.page-todo .todo-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  color: var(--status-reserved-text);
  border: 1px solid color-mix(in srgb, var(--slot-reserved-light) 62%, var(--status-reserved-border) 38%);
  background: color-mix(in srgb, var(--slot-reserved-light) 78%, #ffffff 22%);
}

.page-todo .todo-counter.done {
  color: #15803d;
  border-color: color-mix(in srgb, #22c55e 58%, #15803d 42%);
  background: linear-gradient(180deg, rgba(220, 252, 231, .95), rgba(187, 247, 208, .88));
  box-shadow: 0 6px 14px rgba(34, 197, 94, .14);
}

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

.page-todo .todo-list--scroll {
  max-height: min(68vh, 760px);
  overflow: auto;
  padding-right: 4px;
}

.page-todo .todo-item-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 87%, #ffffff 13%);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.page-todo .todo-item-card.is-overdue {
  border-color: color-mix(in srgb, #ef4444 42%, var(--line) 58%);
  box-shadow: 0 0 0 1px color-mix(in srgb, #ef4444 15%, transparent);
}

.page-todo .todo-item-card.is-done {
  opacity: 1;
  border-color: color-mix(in srgb, #22c55e 24%, var(--line) 76%);
  background: linear-gradient(180deg, rgba(240, 253, 244, .92), rgba(236, 253, 245, .86));
}

.page-todo .todo-item-main h4 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.35;
}

.page-todo .todo-columns.is-compact .todo-item-card {
  padding: 8px 9px;
  gap: 8px;
}

.page-todo .todo-columns.is-compact .todo-item-main h4 {
  margin: 0 0 4px;
  font-size: 13px;
}

.page-todo .todo-columns.is-compact .todo-item-meta {
  gap: 4px;
}

.page-todo .todo-columns.is-compact .todo-meta-chip {
  padding: 2px 8px;
  font-size: 10px;
}

.page-todo .todo-columns.is-compact .todo-item-actions .btn-primary,
.page-todo .todo-columns.is-compact .todo-item-actions .btn-secondary,
.page-todo .todo-columns.is-compact .todo-item-actions .btn-danger {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 12px;
}

.page-todo .todo-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-todo .todo-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 4px 10px;
  font-size: 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 84%, #f8fafc 16%);
}

.page-todo .todo-meta-chip.is-overdue {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

.page-todo .todo-meta-chip.is-open {
  color: #1d4ed8;
  border-color: rgba(59,130,246,.30);
  background: rgba(219,234,254,.72);
}

.page-todo .todo-meta-chip.is-in-progress {
  color: #b45309;
  border-color: rgba(245,158,11,.34);
  background: rgba(254,243,199,.78);
}

.page-todo .todo-meta-chip.is-done {
  color: #166534;
  border-color: rgba(34,197,94,.34);
  background: rgba(220,252,231,.78);
}

.page-todo .todo-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-todo .todo-item-actions form {
  margin: 0;
}

.page-todo .todo-details-box {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.page-todo .todo-details-box > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-todo .todo-details-box > summary::-webkit-details-marker {
  display: none;
}

.page-todo .todo-details-box > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform .18s ease;
  opacity: .8;
}

.page-todo .todo-details-box[open] > summary {
  margin-bottom: 8px;
}

.page-todo .todo-details-box[open] > summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.page-todo .todo-details-content {
  animation: todoDetailsReveal .18s ease;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.page-todo .todo-inline-edit-form textarea {
  min-height: 74px;
  resize: vertical;
}

@keyframes todoDetailsReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-todo .todo-edit-box {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.page-todo .todo-edit-box > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}

.page-todo .todo-edit-box[open] > summary {
  margin-bottom: 8px;
}

.page-todo .todo-inline-edit-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.page-todo .todo-inline-edit-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.page-todo .todo-inline-edit-actions {
  display: flex;
  align-items: end;
  justify-content: flex-start;
}

/* page polish */
.page-todo .todo-shell--polished {
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #fff 18%);
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 38, 56, 0.07), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.05), transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, #fff 8%), var(--card));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  padding: 16px;
  gap: 18px;
}

.page-todo .todo-stats-grid .stat-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 88px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, #fff 15%);
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.page-todo .todo-stats-grid .stat-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  background: rgba(148, 163, 184, 0.45);
}

.page-todo .todo-stats-grid .stat-card .label {
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 11px;
  color: color-mix(in srgb, var(--muted) 80%, #64748b 20%);
}

.page-todo .todo-stats-grid .stat-card .value {
  font-family: 'Sora', sans-serif;
  letter-spacing: -.02em;
  font-size: 28px;
  line-height: 1;
  color: #0f172a;
}

.page-todo .todo-stats-grid .stat-card:nth-child(1) {
  background:
    radial-gradient(circle at 85% 18%, rgba(59,130,246,.14), transparent 40%),
    linear-gradient(180deg, rgba(239,246,255,.95), rgba(219,234,254,.72));
  border-color: rgba(59,130,246,.20);
}
.page-todo .todo-stats-grid .stat-card:nth-child(1)::after { background: rgba(59,130,246,.72); }
.page-todo .todo-stats-grid .stat-card:nth-child(1) .value { color: #1d4ed8; }

.page-todo .todo-stats-grid .stat-card:nth-child(2) {
  background:
    radial-gradient(circle at 85% 18%, rgba(239,68,68,.14), transparent 40%),
    linear-gradient(180deg, rgba(254,242,242,.95), rgba(254,226,226,.72));
  border-color: rgba(239,68,68,.20);
}
.page-todo .todo-stats-grid .stat-card:nth-child(2)::after { background: rgba(239,68,68,.72); }
.page-todo .todo-stats-grid .stat-card:nth-child(2) .value { color: #dc2626; }

.page-todo .todo-stats-grid .stat-card:nth-child(3) {
  background:
    radial-gradient(circle at 85% 18%, rgba(251,191,36,.14), transparent 40%),
    linear-gradient(180deg, rgba(255,251,235,.95), rgba(254,243,199,.72));
  border-color: rgba(245,158,11,.20);
}
.page-todo .todo-stats-grid .stat-card:nth-child(3)::after { background: rgba(245,158,11,.72); }
.page-todo .todo-stats-grid .stat-card:nth-child(3) .value { color: #b45309; }

.page-todo .todo-stats-grid .stat-card:nth-child(4) {
  background:
    radial-gradient(circle at 85% 18%, rgba(34,197,94,.14), transparent 40%),
    linear-gradient(180deg, rgba(240,253,244,.95), rgba(220,252,231,.72));
  border-color: rgba(34,197,94,.20);
}
.page-todo .todo-stats-grid .stat-card:nth-child(4)::after { background: rgba(34,197,94,.72); }
.page-todo .todo-stats-grid .stat-card:nth-child(4) .value { color: #15803d; }

.page-todo .todo-stats-grid .stat-card:nth-child(5) {
  background:
    radial-gradient(circle at 85% 18%, rgba(168,85,247,.14), transparent 40%),
    linear-gradient(180deg, rgba(250,245,255,.95), rgba(243,232,255,.72));
  border-color: rgba(168,85,247,.20);
}
.page-todo .todo-stats-grid .stat-card:nth-child(5)::after { background: rgba(168,85,247,.72); }
.page-todo .todo-stats-grid .stat-card:nth-child(5) .value { color: #7c3aed; }

.page-todo .todo-filters-panel {
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, #fff 15%);
  background: linear-gradient(180deg, #fbfcff, #f8fafd);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 12px;
}

.page-todo .todo-filters-head {
  margin-bottom: 2px;
}

.page-todo .todo-filters-head h3 {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.page-todo .todo-filter-check {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #fff 18%);
  background: rgba(255, 255, 255, 0.74);
  padding: 0 10px;
}

.page-todo .todo-filter-check:hover {
  border-color: color-mix(in srgb, var(--line) 55%, var(--brand) 45%);
}

.page-todo .todo-filter-actions .btn-primary,
.page-todo .todo-filters-head .btn-secondary {
  min-height: 40px;
  border-radius: 12px;
}

.page-todo .todo-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}

.page-todo .todo-active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(215, 38, 56, 0.18);
  background: rgba(215, 38, 56, 0.08);
  color: #9f1239;
  font-size: 12px;
  font-weight: 700;
}

.page-todo .todo-active-filter-chip.is-overdue {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.09);
  color: #991b1b;
}

.page-todo .todo-create-form {
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #fff 20%);
  background:
    radial-gradient(circle at 92% 12%, rgba(215, 38, 56, 0.08), transparent 38%),
    linear-gradient(180deg, #ffffff, #f9fbfe);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  padding: 16px;
  gap: 12px 14px;
}

.page-todo .todo-create-header h3 {
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.02em;
}

.page-todo .todo-columns {
  gap: 18px;
}

.page-todo .todo-column {
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #fff 18%);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card) 95%, #fff 5%), var(--card));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  padding: 14px;
}

.page-todo .todo-column-head {
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 88%, #fff 12%);
}

.page-todo .todo-column-head h3 {
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.02em;
  font-size: 16px;
}

.page-todo .todo-counter {
  min-width: 34px;
  min-height: 28px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.page-todo .todo-item-card {
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.04);
  padding: 12px 12px 10px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.page-todo .todo-item-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.07);
  border-color: color-mix(in srgb, var(--line) 56%, var(--brand) 44%);
}

.page-todo .todo-item-card.is-done {
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.92), rgba(233, 250, 239, 0.88));
  border-color: rgba(34, 197, 94, .24);
}

.page-todo .todo-column:has(.todo-counter.done) {
  border-color: rgba(34, 197, 94, .20);
}

.page-todo .todo-item-main h4 {
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.page-todo .todo-meta-chip {
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

.page-todo .todo-item-actions .btn-primary,
.page-todo .todo-item-actions .btn-secondary,
.page-todo .todo-item-actions .btn-danger {
  min-height: 36px;
  border-radius: 11px;
  padding-inline: 12px;
}

.page-todo .todo-edit-box {
  margin-top: 8px;
  border-top-color: color-mix(in srgb, var(--line) 72%, #fff 28%);
}

.page-todo .todo-edit-box > summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 8px;
}

.page-todo .todo-edit-box > summary:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--ink);
}

.page-todo .todo-inline-edit-form {
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid color-mix(in srgb, var(--line) 88%, #fff 12%);
  padding: 10px;
}

body[data-theme="dark"] .page-todo .todo-shell--polished {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 126, 0.07), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(96, 165, 250, 0.05), transparent 38%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.9));
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card,
body[data-theme="dark"] .page-todo .todo-filters-panel,
body[data-theme="dark"] .page-todo .todo-create-form,
body[data-theme="dark"] .page-todo .todo-column,
body[data-theme="dark"] .page-todo .todo-item-card,
body[data-theme="dark"] .page-todo .todo-inline-edit-form {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.15);
  box-shadow: none;
}

body[data-theme="dark"] .page-todo .todo-filter-check {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.15);
}

body[data-theme="dark"] .page-todo .todo-meta-chip {
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(148, 163, 184, 0.14);
}

body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(1),
body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(2),
body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(3),
body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(4),
body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(5) {
  background:
    radial-gradient(circle at 85% 14%, rgba(255,255,255,.05), transparent 44%),
    rgba(15, 23, 42, 0.78);
}

body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card .label {
  color: rgba(226, 232, 240, 0.8);
}

body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card .value {
  color: #f8fafc;
}

body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(1) { border-color: rgba(59,130,246,.24); }
body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(2) { border-color: rgba(239,68,68,.24); }
body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(3) { border-color: rgba(245,158,11,.24); }
body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(4) { border-color: rgba(34,197,94,.24); }
body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card:nth-child(5) { border-color: rgba(168,85,247,.24); }

.page-todo .todo-columns {
  grid-template-columns: 1fr 1fr 1fr;
}

.page-todo .todo-counter.progress {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.page-todo .todo-column-progress {
  border-color: color-mix(in srgb, var(--line) 78%, #f59e0b 22%);
}

.page-todo .todo-column-progress .todo-column-head h3 {
  color: #92400e;
}

.page-todo .todo-item-card.is-in-progress {
  border-color: rgba(245, 158, 11, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 251, 235, 0.8), rgba(255, 255, 255, 0.92));
}

body[data-theme="dark"] .page-todo .todo-counter.progress {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.22);
}

body[data-theme="dark"] .page-todo .todo-column-progress {
  border-color: rgba(245, 158, 11, 0.2);
}

body[data-theme="dark"] .page-todo .todo-column-progress .todo-column-head h3 {
  color: #fcd34d;
}

body[data-theme="dark"] .page-todo .todo-item-card.is-in-progress {
  border-color: rgba(245, 158, 11, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.08), transparent 40%),
    rgba(15, 23, 42, 0.76);
}

@media (max-width: 980px) {
  .page-todo .todo-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-todo .todo-filters-panel {
    grid-template-columns: 1fr;
  }

  .page-todo .todo-filter-actions {
    justify-content: flex-start;
  }

  .page-todo .todo-columns {
    grid-template-columns: 1fr;
  }

  .page-todo .todo-list--scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .page-todo .todo-inline-edit-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-todo .todo-stats-grid {
    grid-template-columns: 1fr;
  }

  .page-todo .todo-stats-grid .stat-card {
    min-height: 74px;
    padding: 10px 12px;
  }

  .page-todo .todo-stats-grid .stat-card .value {
    font-size: 24px;
  }
}

/* GPS pre-alert page */
.page-gps-prealerts .status-list {
  display: grid;
  gap: 6px;
}

.page-gps-prealerts .status-list > div {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  background: color-mix(in srgb, var(--card) 90%, #fff 10%);
}

.page-gps-prealerts .table-wrap {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, #fff 14%);
  overflow: hidden;
}

body[data-theme="dark"] .page-gps-prealerts .status-list > div {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

body[data-theme="dark"] .page-gps-prealerts .table-wrap {
  border-color: rgba(148, 163, 184, 0.16);
}

/* Punctuality report */
.page-punctuality-report .detail-grid {
  margin-bottom: 0;
}

.page-punctuality-report .detail-item {
  border-radius: 14px;
}

body[data-theme="dark"] .page-punctuality-report .detail-item {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.16);
}

body[data-theme="dark"] .page-punctuality-report .detail-label {
  color: rgba(226, 232, 240, 0.72);
}

body[data-theme="dark"] .page-punctuality-report .detail-value {
  color: #f8fafc;
}

/* Change proposals page */
body[data-theme="dark"] .page-change-proposals .change-card {
  background: rgba(15, 23, 42, 0.74) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .page-change-proposals .change-card h4 {
  color: #f8fafc !important;
}

body[data-theme="dark"] .page-change-proposals .change-card-date,
body[data-theme="dark"] .page-change-proposals .change-card-meta {
  color: rgba(226, 232, 240, 0.72) !important;
}

body[data-theme="dark"] .page-change-proposals .change-card-details {
  color: rgba(226, 232, 240, 0.9) !important;
}

body[data-theme="dark"] .page-change-proposals .change-card-admin-note {
  background: rgba(30, 41, 59, 0.72) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}

body[data-theme="dark"] .page-change-proposals .proposal-group {
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .page-change-proposals .proposal-group__head h4 {
  color: #f8fafc;
}

body[data-theme="dark"] .page-change-proposals .proposal-list-toolbar {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .page-change-proposals .proposal-admin-note {
  background: rgba(30, 41, 59, 0.72);
}

body[data-theme="dark"] .page-change-proposals .proposal-attachment-thumb {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .page-change-proposals .proposal-attachment-thumb:hover {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.38);
}

/* Profile dark mode hardening */
body[data-theme="dark"] .page-profile .profile-card-shell,
body[data-theme="dark"] .page-profile .profile-hero,
body[data-theme="dark"] .page-profile .profile-section-card,
body[data-theme="dark"] .page-profile .profile-activity-card,
body[data-theme="dark"] .page-profile .profile-tabs-card,
body[data-theme="dark"] .page-profile .profile-security-card,
body[data-theme="dark"] .page-profile .profile-totp-setup-box,
body[data-theme="dark"] .page-profile .profile-totp-recovery-box,
body[data-theme="dark"] .page-profile .detail-item {
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}

body[data-theme="dark"] .page-profile .profile-hero-name,
body[data-theme="dark"] .page-profile .profile-section-title,
body[data-theme="dark"] .page-profile .profile-security-head h4,
body[data-theme="dark"] .page-profile h3,
body[data-theme="dark"] .page-profile h4 {
  color: #f8fafc !important;
}

body[data-theme="dark"] .page-profile .profile-hero-role,
body[data-theme="dark"] .page-profile .profile-hero-email,
body[data-theme="dark"] .page-profile .profile-hero-note,
body[data-theme="dark"] .page-profile .detail-label,
body[data-theme="dark"] .page-profile .profile-security-subtitle,
body[data-theme="dark"] .page-profile .profile-totp-hint,
body[data-theme="dark"] .page-profile .muted {
  color: rgba(226, 232, 240, 0.72) !important;
}

body[data-theme="dark"] .page-profile .notice {
  background: rgba(30, 41, 59, 0.72) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .page-profile .profile-notice-success {
  background: rgba(20, 83, 45, 0.28) !important;
  border-color: rgba(34, 197, 94, 0.24) !important;
  color: #bbf7d0 !important;
}

body[data-theme="dark"] .page-profile label,
body[data-theme="dark"] .page-profile .profile-checkbox-row span {
  color: rgba(226, 232, 240, 0.82) !important;
}

body[data-theme="dark"] .page-profile input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
body[data-theme="dark"] .page-profile select,
body[data-theme="dark"] .page-profile textarea {
  background: rgba(15, 23, 42, 0.86) !important;
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

body[data-theme="dark"] .page-profile input:disabled,
body[data-theme="dark"] .page-profile select:disabled,
body[data-theme="dark"] .page-profile textarea:disabled {
  background: rgba(30, 41, 59, 0.7) !important;
  color: rgba(226, 232, 240, 0.72) !important;
}

body[data-theme="dark"] .page-profile input::placeholder,
body[data-theme="dark"] .page-profile textarea::placeholder {
  color: rgba(148, 163, 184, 0.82) !important;
}

body[data-theme="dark"] .page-profile .profile-tab-btn {
  background: linear-gradient(180deg, rgba(30,41,59,.72), rgba(15,23,42,.84)) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}

body[data-theme="dark"] .page-profile .profile-tab-btn:not(.active):hover {
  border-color: rgba(96,165,250,.22) !important;
  color: #f8fafc !important;
}

body[data-theme="dark"] .page-profile .profile-tab-btn.active {
  background: linear-gradient(180deg, rgba(30,58,138,.40), rgba(15,23,42,.90)) !important;
  color: #f8fafc !important;
  border-color: rgba(96,165,250,.28) !important;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.26) !important;
}

/* Floating bug report widget */
.bug-report-fab {
  position: fixed !important;
  right: 22px !important;
  left: auto !important;
  top: auto !important;
  bottom: 110px !important; /* higher above footer area / version chip */
  z-index: 9999 !important;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.34);
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,.25), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--brand, #ef4444) 92%, #ff6b6b 8%), color-mix(in srgb, var(--brand-2, #dc2626) 88%, #b91c1c 12%));
  color: #fff;
  box-shadow: 0 16px 26px rgba(239, 68, 68, 0.22);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.bug-report-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(239, 68, 68, 0.28);
  filter: saturate(1.05);
}

.bug-report-fab:active { transform: translateY(0); }

.bug-report-fab-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  line-height: 1;
}

.bug-report-fab-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.bug-report-card {
  max-width: 760px;
}

.bug-report-form {
  gap: 10px 12px;
}

.bug-report-form textarea {
  resize: vertical;
}

.bug-report-notice {
  grid-column: 1 / -1;
  margin: 0;
}

body[data-theme="dark"] .bug-report-fab {
  border-color: rgba(248, 113, 113, 0.32);
  box-shadow: 0 16px 28px rgba(0,0,0,.34), 0 0 0 1px rgba(239,68,68,.08) inset;
}

.approvals-fab-dock {
  position: fixed !important;
  right: 96px !important;
  bottom: 118px !important;
  z-index: 9998 !important;
  min-height: 56px;
  max-width: min(360px, calc(100vw - 140px));
  padding: 10px 14px 10px 12px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #4c1d95;
  border: 1px solid rgba(124, 58, 237, 0.45);
  background:
    linear-gradient(135deg, #f5d0fe 0%, #ede9fe 48%, #fef3c7 100%);
  box-shadow: 0 16px 30px rgba(124, 58, 237, 0.28);
  overflow: hidden;
}
.approvals-fab-dock[hidden] {
  display: none !important;
}
.approvals-fab-dock.is-alert {
  animation: pendingPulseWidget 1.1s ease-in-out infinite;
}
.approvals-fab-dock__glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.35), transparent 62%);
  pointer-events: none;
  animation: pendingPulseDot 1.4s ease-in-out infinite;
}
.approvals-fab-dock__count {
  position: relative;
  z-index: 1;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #7c3aed;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.18);
}
.approvals-fab-dock__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.approvals-fab-dock__title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-family: "Sora", sans-serif;
}
.approvals-fab-dock__label {
  font-size: 12px;
  color: #6d28d9;
  white-space: nowrap;
}
body[data-theme="dark"] .approvals-fab-dock {
  color: #f5d0fe;
  border-color: rgba(196, 181, 253, 0.4);
  background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 55%, #854d0e 100%);
}
body[data-theme="dark"] .approvals-fab-dock__label { color: #fde68a; }

@media (max-width: 640px) {
  .approvals-fab-dock {
    right: 16px !important;
    left: 16px !important;
    bottom: 184px !important;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slot.slot-provisional,
  .slot.slot-pending-change,
  .slot.slot-delete-request,
  .pending-approvals-widget.is-alert,
  .pending-approvals-banner,
  .approvals-fab-dock.is-alert,
  .mini-slot-dot.is-provisional,
  .mini-slot-dot.is-pending-change,
  .mini-slot-dot.is-delete-request {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .bug-report-fab {
    right: 12px !important;
    bottom: 96px !important;
    width: 52px;
    height: 52px;
  }

  .bug-report-fab-icon,
  .bug-report-fab-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* dark mode hardening */
body[data-theme="dark"] .page-todo .todo-shell--polished,
body[data-theme="dark"] .page-todo .todo-stats-grid .stat-card,
body[data-theme="dark"] .page-todo .todo-filters-panel,
body[data-theme="dark"] .page-todo .todo-create-form,
body[data-theme="dark"] .page-todo .todo-column,
body[data-theme="dark"] .page-todo .todo-item-card,
body[data-theme="dark"] .page-todo .todo-inline-edit-form {
  background: rgba(15, 23, 42, 0.78) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .page-todo .todo-create-header h3,
body[data-theme="dark"] .page-todo .todo-column-head h3,
body[data-theme="dark"] .page-todo .todo-item-main h4,
body[data-theme="dark"] .page-todo .todo-filters-head h3 {
  color: #f8fafc !important;
}

body[data-theme="dark"] .page-todo .todo-create-header p,
body[data-theme="dark"] .page-todo .todo-filter-check span,
body[data-theme="dark"] .page-todo .todo-item-meta,
body[data-theme="dark"] .page-todo .todo-edit-box summary,
body[data-theme="dark"] .page-todo label {
  color: rgba(226, 232, 240, 0.78) !important;
}

body[data-theme="dark"] .page-todo .todo-filter-check {
  background: rgba(30, 41, 59, 0.64) !important;
}

body[data-theme="dark"] .page-todo input:not([type="checkbox"]):not([type="color"]),
body[data-theme="dark"] .page-todo select,
body[data-theme="dark"] .page-todo textarea {
  background: rgba(15, 23, 42, 0.86) !important;
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

body[data-theme="dark"] .page-todo input::placeholder,
body[data-theme="dark"] .page-todo textarea::placeholder {
  color: rgba(148, 163, 184, 0.8) !important;
}

body[data-theme="dark"] .page-todo .notice {
  border-color: rgba(148,163,184,.16);
}

.sidebar {
  position: relative;
  overflow: hidden;
  border-radius: 0 24px 24px 0;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(460px 250px at -10% -6%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(320px 220px at 108% 10%, rgba(239,68,68,.06), transparent 58%);
  opacity: .95;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar .brand-block,
.sidebar .warehouse-block {
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  background: color-mix(in srgb, var(--card) 86%, #fff 14%);
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
}

.sidebar .brand-block {
  padding: 14px 12px;
}

.sidebar .brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 6px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(148,163,184,.22);
}

.sidebar .brand-block h2 {
  font-weight: 700;
  letter-spacing: .01em;
}

.sidebar .brand-block > div > span {
  color: var(--muted);
  font-size: 12px;
}

.sidebar .sidebar-toolbar {
  margin: 10px 0 8px;
}

.sidebar .sidebar-collapse-btn {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-start;
  border-radius: 14px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, #1d4ed8 24%);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,245,255,.88));
  color: #000000 !important;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,.09), inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease;
}

.sidebar .sidebar-collapse-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, #2563eb 42%, var(--line) 58%);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(231,238,255,.94));
  box-shadow: 0 12px 24px rgba(37,99,235,.16), inset 0 1px 0 rgba(255,255,255,.95);
  color: #000000 !important;
}

.sidebar .sidebar-collapse-btn:focus-visible {
  outline: none;
  border-color: rgba(37,99,235,.65);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18), 0 12px 24px rgba(37,99,235,.14);
}

.sidebar .sidebar-collapse-btn .menu-icon,
.sidebar .sidebar-collapse-btn .sidebar-toggle-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  margin-right: 0;
  border-radius: 9px;
  border: 1px solid rgba(59,130,246,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(239,246,255,.88));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
}

.sidebar .sidebar-collapse-btn .menu-icon svg,
.sidebar .sidebar-collapse-btn .sidebar-toggle-icon svg {
  width: 14px;
  height: 14px;
}

.sidebar .sidebar-collapse-label {
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  color: #000000 !important;
}

.sidebar .warehouse-block {
  padding: 12px;
}

.sidebar .warehouse-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar .warehouse-name {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
}

.sidebar .warehouse-link {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff 16%);
  background: rgba(255,255,255,.7);
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.sidebar .warehouse-link:hover {
  background: color-mix(in srgb, var(--accent) 8%, #fff 92%);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line) 72%);
}

.sidebar .nav-category {
  padding: 7px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--card) 90%, #fff 10%);
  border: 1px solid color-mix(in srgb, var(--line) 86%, #fff 14%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.sidebar .nav-category + .nav-category {
  margin-top: 10px;
}

.sidebar .nav-category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}

.sidebar .nav-category-title .menu-icon {
  width: 20px;
  height: 20px;
  margin-right: 0;
  border-radius: 7px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(255,255,255,.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar .nav-link,
.sidebar .nav-dropdown > summary.nav-link {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.sidebar .nav-link:hover,
.sidebar .nav-dropdown > summary.nav-link:hover {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-color: color-mix(in srgb, var(--accent) 16%, var(--line) 84%);
}

.sidebar .nav-submenu {
  margin-top: 6px;
  padding: 5px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--line) 74%, #fff 26%);
  background: color-mix(in srgb, var(--card) 84%, #fff 16%);
}

.sidebar .nav-link-proposals {
  border-radius: 14px !important;
}

.sidebar .nav-link {
  position: relative;
}

body.sidebar-collapsed .sidebar .sidebar-collapse-label {
  display: none !important;
}

body.sidebar-collapsed .sidebar .sidebar-toolbar {
  margin: 8px 0 6px;
}

body.sidebar-collapsed .sidebar .sidebar-collapse-btn {
  justify-content: center;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  margin-inline: auto;
}

body.sidebar-collapsed .sidebar .sidebar-collapse-btn .menu-icon,
body.sidebar-collapsed .sidebar .sidebar-collapse-btn .sidebar-toggle-icon {
  margin-right: 0;
}

body.sidebar-collapsed .sidebar .nav-link[data-tooltip]::after,
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 20;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 23, 42, .92);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .2);
  transition: opacity .12s ease, transform .12s ease;
}

body.sidebar-collapsed .sidebar .nav-link[data-tooltip]::before,
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link[data-tooltip]::before {
  content: "";
  position: absolute;
  left: calc(100% + 5px);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  width: 8px;
  height: 8px;
  background: rgba(15, 23, 42, .92);
  rotate: 45deg;
  transition: opacity .12s ease;
  z-index: 19;
}

body.sidebar-collapsed .sidebar .nav-link[data-tooltip]:hover::after,
body.sidebar-collapsed .sidebar .nav-link[data-tooltip]:hover::before,
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link[data-tooltip]:hover::after,
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link[data-tooltip]:hover::before {
  opacity: 1;
}

body.sidebar-collapsed .sidebar .nav-link[data-tooltip]:hover::after,
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link[data-tooltip]:hover::after {
  transform: translateY(-50%) translateX(2px);
}

body[data-theme="dark"] .sidebar .brand-block,
body[data-theme="dark"] .sidebar .warehouse-block,
body[data-theme="dark"] .sidebar .nav-category,
body[data-theme="dark"] .sidebar .nav-submenu {
  background: rgba(255,255,255,.025);
  border-color: rgba(148,163,184,.12);
  box-shadow: none;
}

body[data-theme="dark"] .sidebar .sidebar-collapse-btn {
  background: linear-gradient(180deg, rgba(37,99,235,.24), rgba(30,41,59,.48));
  border-color: rgba(96,165,250,.36);
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(2,6,23,.34), inset 0 1px 0 rgba(255,255,255,.08);
}

body[data-theme="dark"] .sidebar .sidebar-collapse-btn .menu-icon,
body[data-theme="dark"] .sidebar .sidebar-collapse-btn .sidebar-toggle-icon,
body[data-theme="dark"] .sidebar .nav-category-title .menu-icon {
  background: linear-gradient(180deg, rgba(30,58,138,.42), rgba(30,41,59,.62));
  border-color: rgba(96,165,250,.34);
  color: #bfdbfe;
}

body[data-theme="dark"] .sidebar .sidebar-collapse-btn:hover {
  border-color: rgba(147,197,253,.48);
  background: linear-gradient(180deg, rgba(59,130,246,.30), rgba(30,41,59,.58));
  box-shadow: 0 14px 28px rgba(2,6,23,.44), inset 0 1px 0 rgba(255,255,255,.1);
}

body[data-theme="dark"] .sidebar .warehouse-link {
  background: rgba(255,255,255,.03);
  border-color: rgba(148,163,184,.14);
}

/* Dark mode hardening (final overrides) for pages with custom cards/forms */
body[data-theme="dark"].page-todo .todo-shell,
body[data-theme="dark"].page-todo .todo-filters-panel,
body[data-theme="dark"].page-todo .todo-create-form,
body[data-theme="dark"].page-todo .todo-column,
body[data-theme="dark"].page-todo .todo-item-card,
body[data-theme="dark"].page-todo .todo-edit-box,
body[data-theme="dark"].page-todo .stats-grid > .detail-item {
  background: linear-gradient(180deg, rgba(14, 21, 40, .96), rgba(10, 17, 34, .94)) !important;
  color: #e7edf8 !important;
  border-color: rgba(148,163,184,.16) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 12px 28px rgba(2, 6, 23, .26) !important;
}

body[data-theme="dark"].page-todo .todo-item-card.is-done {
  background: linear-gradient(180deg, rgba(14, 22, 34, .90), rgba(10, 17, 28, .88)) !important;
}

body[data-theme="dark"].page-todo .todo-item-card.is-in-progress {
  background: linear-gradient(180deg, rgba(26, 22, 14, .90), rgba(20, 17, 10, .88)) !important;
  border-color: rgba(245, 158, 11, .28) !important;
}

body[data-theme="dark"].page-todo .todo-filters-panel label,
body[data-theme="dark"].page-todo .todo-create-form label,
body[data-theme="dark"].page-todo .todo-column-head h3,
body[data-theme="dark"].page-todo .todo-item-main h4,
body[data-theme="dark"].page-todo .todo-item-main p,
body[data-theme="dark"].page-todo .todo-inline-edit-form label,
body[data-theme="dark"].page-todo .todo-flash-success,
body[data-theme="dark"].page-todo .todo-flash-error {
  color: #dbe6f7 !important;
}

body[data-theme="dark"].page-todo input,
body[data-theme="dark"].page-todo select,
body[data-theme="dark"].page-todo textarea,
body[data-theme="dark"].page-profile input,
body[data-theme="dark"].page-profile select,
body[data-theme="dark"].page-profile textarea,
body[data-theme="dark"].page-change-proposals input,
body[data-theme="dark"].page-change-proposals select,
body[data-theme="dark"].page-change-proposals textarea {
  background: linear-gradient(180deg, rgba(10, 16, 30, .96), rgba(7, 12, 24, .94)) !important;
  color: #eef3fb !important;
  border-color: rgba(148,163,184,.20) !important;
}

body[data-theme="dark"].page-todo input::placeholder,
body[data-theme="dark"].page-todo textarea::placeholder,
body[data-theme="dark"].page-profile input::placeholder,
body[data-theme="dark"].page-profile textarea::placeholder,
body[data-theme="dark"].page-change-proposals input::placeholder,
body[data-theme="dark"].page-change-proposals textarea::placeholder {
  color: rgba(226, 232, 240, .55) !important;
}

body[data-theme="dark"].page-profile .profile-card-shell,
body[data-theme="dark"].page-profile .profile-hero,
body[data-theme="dark"].page-profile .profile-section-card,
body[data-theme="dark"].page-profile .profile-tabs-card,
body[data-theme="dark"].page-profile .profile-quick-action,
body[data-theme="dark"].page-profile .profile-mini-stat,
body[data-theme="dark"].page-profile .profile-security-row,
body[data-theme="dark"].page-profile .profile-security-box {
  background: linear-gradient(180deg, rgba(14, 21, 40, .96), rgba(9, 15, 30, .94)) !important;
  color: #e7edf8 !important;
  border-color: rgba(148,163,184,.16) !important;
}

body[data-theme="dark"].page-profile .profile-hero-name,
body[data-theme="dark"].page-profile .profile-section-title,
body[data-theme="dark"].page-profile .profile-tab-btn,
body[data-theme="dark"].page-profile .profile-quick-action-title,
body[data-theme="dark"].page-profile .profile-mini-stat-value {
  color: #eef3fb !important;
}

body[data-theme="dark"].page-profile .profile-hero-role,
body[data-theme="dark"].page-profile .profile-hero-email,
body[data-theme="dark"].page-profile .profile-hero-note,
body[data-theme="dark"].page-profile .profile-quick-action-desc,
body[data-theme="dark"].page-profile .profile-mini-stat-label,
body[data-theme="dark"].page-profile .muted,
body[data-theme="dark"].page-profile small {
  color: rgba(226,232,240,.72) !important;
}

body[data-theme="dark"].page-profile .profile-tab-btn:not(.active) {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(148,163,184,.14) !important;
}

body[data-theme="dark"].page-profile .profile-tab-btn.active {
  background: rgba(239, 68, 68, .16) !important;
  border-color: rgba(239, 68, 68, .28) !important;
  color: #fff !important;
}

body[data-theme="dark"].page-change-proposals .card,
body[data-theme="dark"].page-change-proposals .proposal-item,
body[data-theme="dark"].page-change-proposals .proposal-card,
body[data-theme="dark"].page-change-proposals .modal-card {
  background: linear-gradient(180deg, rgba(14, 21, 40, .96), rgba(9, 15, 30, .94)) !important;
  color: #e7edf8 !important;
  border-color: rgba(148,163,184,.16) !important;
}

body[data-theme="dark"].page-change-proposals .table-wrap,
body[data-theme="dark"].page-change-proposals table,
body[data-theme="dark"].page-change-proposals .proposal-list,
body[data-theme="dark"].page-change-proposals .proposal-admin-note {
  background: rgba(11, 17, 31, .92) !important;
  color: #e7edf8 !important;
  border-color: rgba(148,163,184,.14) !important;
}

body[data-theme="dark"].page-change-proposals th,
body[data-theme="dark"].page-change-proposals td,
body[data-theme="dark"].page-change-proposals .proposal-date,
body[data-theme="dark"].page-change-proposals .proposal-meta,
body[data-theme="dark"].page-change-proposals .proposal-details {
  color: #dbe6f7 !important;
}

/* column counters */
body[data-theme="dark"].page-todo .todo-counter {
  min-width: 28px !important;
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  color: #93c5fd !important;
  background: rgba(37, 99, 235, .10) !important;
  border: 1px solid rgba(59, 130, 246, .22) !important;
  box-shadow: none !important;
}

body[data-theme="dark"].page-todo .todo-counter.progress {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, .10) !important;
  border-color: rgba(245, 158, 11, .24) !important;
}

body[data-theme="dark"].page-todo .todo-counter.done {
  color: #86efac !important;
  background: linear-gradient(180deg, rgba(22, 101, 52, .32), rgba(20, 83, 45, .22)) !important;
  border-color: rgba(34, 197, 94, .34) !important;
  box-shadow: 0 8px 18px rgba(34, 197, 94, .10) !important;
}

/* Profile dark mode final hardening (late override) */
body[data-theme="dark"].page-profile .card,
body[data-theme="dark"].page-profile .profile-card-shell,
body[data-theme="dark"].page-profile .profile-hero,
body[data-theme="dark"].page-profile .profile-section-card,
body[data-theme="dark"].page-profile .profile-tabs-card,
body[data-theme="dark"].page-profile .profile-activity-card,
body[data-theme="dark"].page-profile .profile-security-box,
body[data-theme="dark"].page-profile .profile-security-row,
body[data-theme="dark"].page-profile .profile-mini-stat,
body[data-theme="dark"].page-profile .profile-quick-action {
  background: linear-gradient(180deg, rgba(12, 19, 35, .96), rgba(9, 15, 28, .94)) !important;
  border-color: rgba(148,163,184,.16) !important;
  color: #e6eefb !important;
}

body[data-theme="dark"].page-profile .notice,
body[data-theme="dark"].page-profile .profile-totp-required-banner {
  background: rgba(30, 41, 59, .42) !important;
  color: #eaf2ff !important;
  border-color: rgba(148,163,184,.18) !important;
}

body[data-theme="dark"].page-profile .profile-hero-name,
body[data-theme="dark"].page-profile h3,
body[data-theme="dark"].page-profile h4,
body[data-theme="dark"].page-profile .profile-section-title {
  color: #f8fbff !important;
}

body[data-theme="dark"].page-profile .profile-hero-role,
body[data-theme="dark"].page-profile .profile-hero-email,
body[data-theme="dark"].page-profile .profile-hero-note,
body[data-theme="dark"].page-profile .profile-quick-action-desc,
body[data-theme="dark"].page-profile .profile-mini-stat-label,
body[data-theme="dark"].page-profile label,
body[data-theme="dark"].page-profile small {
  color: rgba(226,232,240,.80) !important;
}

body[data-theme="dark"].page-profile .profile-hero-chip {
  background: rgba(255,255,255,.05) !important;
  border-color: rgba(148,163,184,.18) !important;
  color: #e6eefb !important;
}

body[data-theme="dark"].page-profile .profile-hero-chip.success {
  background: rgba(34, 197, 94, .12) !important;
  border-color: rgba(34, 197, 94, .22) !important;
  color: #86efac !important;
}

body[data-theme="dark"].page-profile .profile-hero-chip.danger {
  background: rgba(239, 68, 68, .12) !important;
  border-color: rgba(239, 68, 68, .22) !important;
  color: #fca5a5 !important;
}

/* meta chips override */
body[data-theme="dark"].page-todo .todo-item-meta,
body[data-theme="dark"].page-todo .todo-item-meta * {
  color: rgba(226,232,240,.88) !important;
}

body[data-theme="dark"].page-todo .todo-meta-chip {
  background: rgba(30, 41, 59, .92) !important;
  border: 1px solid rgba(148,163,184,.16) !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"].page-todo .todo-meta-chip.is-overdue {
  background: rgba(127, 29, 29, .28) !important;
  border-color: rgba(248,113,113,.28) !important;
  color: #fecaca !important;
}

body[data-theme="dark"].page-todo .todo-meta-chip.is-open {
  background: rgba(30, 58, 138, .42) !important;
  border-color: rgba(96,165,250,.34) !important;
  color: #bfdbfe !important;
}

body[data-theme="dark"].page-todo .todo-meta-chip.is-in-progress {
  background: rgba(120, 53, 15, .40) !important;
  border-color: rgba(245,158,11,.34) !important;
  color: #fde68a !important;
}

body[data-theme="dark"].page-todo .todo-meta-chip.is-done {
  background: rgba(20, 83, 45, .38) !important;
  border-color: rgba(74,222,128,.34) !important;
  color: #bbf7d0 !important;
}

/* Profile specific gray blocks -> dark */
body[data-theme="dark"].page-profile .profile-section-card .form-grid label,
body[data-theme="dark"].page-profile .profile-security-card .form-grid label,
body[data-theme="dark"].page-profile .profile-security-form-stack label {
  background: linear-gradient(180deg, rgba(15, 23, 42, .82), rgba(10, 17, 32, .90)) !important;
  border: 1px solid rgba(148,163,184,.16) !important;
  color: #dbe6f7 !important;
  border-radius: 14px !important;
}

body[data-theme="dark"].page-profile .profile-mini-chart {
  background: linear-gradient(180deg, rgba(15, 23, 42, .88), rgba(10, 17, 32, .92)) !important;
  border: 1px solid rgba(148,163,184,.14) !important;
}

body[data-theme="dark"].page-profile .profile-mini-bar-track {
  background: rgba(30, 41, 59, .55) !important;
  border: 1px solid rgba(148,163,184,.12) !important;
}

body[data-theme="dark"].page-profile .profile-mini-bar-label,
body[data-theme="dark"].page-profile .profile-mini-bar-count {
  color: #dbe6f7 !important;
}

body[data-theme="dark"].page-profile .profile-preferences-note {
  background: rgba(15, 23, 42, .72) !important;
  border-color: rgba(148,163,184,.16) !important;
  color: #dbe6f7 !important;
}

/* Profile dark mode: final override for all gray form wrappers and activity chart cards */
body[data-theme="dark"].page-profile .form-grid label {
  background: linear-gradient(180deg, rgba(15, 23, 42, .90), rgba(10, 16, 30, .94)) !important;
  border: 1px solid rgba(148, 163, 184, .16) !important;
  color: #dbe6f7 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02) !important;
}

body[data-theme="dark"].page-profile .form-grid label.profile-checkbox-row,
body[data-theme="dark"].page-profile .form-grid .actions {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body[data-theme="dark"].page-profile .form-grid label > small,
body[data-theme="dark"].page-profile .form-grid label > span {
  color: rgba(226,232,240,.78) !important;
}

/* ===== Audit Diff 2.0 ===== */
.page-audit-diff .audit-diff-layout {
  display: grid;
  gap: 16px;
}

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

.page-audit-diff .audit-diff-stat {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, #fff 8%), var(--card));
}

.page-audit-diff .audit-diff-stat::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  opacity: .85;
}

.page-audit-diff .audit-diff-stat-total::before { background: #3b82f6; }
.page-audit-diff .audit-diff-stat-added::before { background: #16a34a; }
.page-audit-diff .audit-diff-stat-updated::before { background: #f59e0b; }
.page-audit-diff .audit-diff-stat-deleted::before { background: #ef4444; }

.page-audit-diff .audit-diff-stat-label {
  margin-left: 14px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.page-audit-diff .audit-diff-stat-value {
  margin-top: 8px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
}

.page-audit-diff .audit-diff-filters-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-audit-diff .audit-diff-filter-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.page-audit-diff .audit-diff-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.page-audit-diff .audit-diff-table {
  margin: 0;
  min-width: 980px;
}

.page-audit-diff .audit-diff-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.page-audit-diff .audit-diff-empty {
  color: var(--muted);
}

.page-audit-diff .audit-diff-diff-cell {
  min-width: 420px;
}

.page-audit-diff .audit-diff-lines {
  display: grid;
  gap: 6px;
}

.page-audit-diff .audit-diff-line {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--card) 92%, #ffffff 8%);
}

.page-audit-diff .audit-diff-line.is-added {
  color: #166534;
  border-color: rgba(22, 163, 74, .28);
  background: rgba(22, 163, 74, .12);
}

.page-audit-diff .audit-diff-line.is-updated {
  color: #92400e;
  border-color: rgba(245, 158, 11, .28);
  background: rgba(245, 158, 11, .14);
}

.page-audit-diff .audit-diff-line.is-removed {
  color: #991b1b;
  border-color: rgba(239, 68, 68, .28);
  background: rgba(239, 68, 68, .12);
}

.page-audit-diff .audit-diff-line.is-muted {
  color: color-mix(in srgb, var(--ink) 62%, #64748b 38%);
  border-color: color-mix(in srgb, var(--line) 78%, #94a3b8 22%);
}

body[data-theme="dark"] .page-audit-diff .audit-diff-stat {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 88%, #0f172a 12%), var(--card));
}

body[data-theme="dark"] .page-audit-diff .audit-diff-line.is-added {
  color: #86efac;
  border-color: rgba(34, 197, 94, .34);
  background: rgba(34, 197, 94, .14);
}

body[data-theme="dark"] .page-audit-diff .audit-diff-line.is-updated {
  color: #fde68a;
  border-color: rgba(245, 158, 11, .34);
  background: rgba(245, 158, 11, .12);
}

body[data-theme="dark"] .page-audit-diff .audit-diff-line.is-removed {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, .36);
  background: rgba(239, 68, 68, .14);
}

body[data-theme="dark"] .page-audit-diff .audit-diff-line.is-muted {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, .28);
  background: rgba(148, 163, 184, .12);
}

@media (max-width: 1200px) {
  .page-audit-diff .audit-diff-stats-grid,
  .page-audit-diff .audit-diff-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-audit-diff .audit-diff-stats-grid,
  .page-audit-diff .audit-diff-filters-grid {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"].page-profile .detail-item {
  background: linear-gradient(180deg, rgba(15, 23, 42, .88), rgba(10, 16, 30, .92)) !important;
  border-color: rgba(148,163,184,.16) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02) !important;
}

body[data-theme="dark"].page-profile .detail-item .detail-label,
body[data-theme="dark"].page-profile .detail-item .detail-value {
  color: #e5edf9 !important;
}

body[data-theme="dark"].page-profile .detail-item .detail-label {
  color: rgba(226,232,240,.78) !important;
}

body[data-theme="dark"].page-profile .profile-activity-summary-top {
  background: transparent !important;
}

body[data-theme="dark"].page-profile .profile-mini-chart,
body[data-theme="dark"].page-profile .profile-mini-bar-wrap {
  background: linear-gradient(180deg, rgba(15, 23, 42, .90), rgba(10, 16, 30, .94)) !important;
  border: 1px solid rgba(148,163,184,.14) !important;
  border-radius: 14px !important;
}

body[data-theme="dark"].page-profile .profile-mini-bar-wrap {
  padding: 8px 6px !important;
}

body[data-theme="dark"].page-profile .profile-mini-bar {
  background: linear-gradient(180deg, rgba(248,113,113,.95), rgba(59,130,246,.92)) !important;
  box-shadow: 0 8px 16px rgba(59,130,246,.16) !important;
}

/* Styled file input button ("Wybierz plik") */
input[type="file"] {
  color: var(--ink);
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(241,245,249,.86));
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

input[type="file"]::file-selector-button:hover {
  border-color: rgba(239,68,68,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(254,242,242,.92));
}

input[type="file"]::file-selector-button:active {
  transform: translateY(1px);
}

body[data-theme="dark"] input[type="file"] {
  color: #e6eefb;
}

body[data-theme="dark"] input[type="file"]::file-selector-button {
  border-color: rgba(148,163,184,.18);
  background: linear-gradient(180deg, rgba(30,41,59,.88), rgba(15,23,42,.94));
  color: #eaf2ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

body[data-theme="dark"] input[type="file"]::file-selector-button:hover {
  border-color: rgba(239,68,68,.30);
  background: linear-gradient(180deg, rgba(45,55,72,.92), rgba(18,26,43,.96));
}

/* Profile hero carriers (compact chips row) */
.page-profile .profile-hero-carriers {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-profile .profile-hero-carriers-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(15,23,42,.72);
}

.page-profile .profile-hero-carriers-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-profile .profile-hero-carrier-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(148,163,184,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.page-profile .profile-hero-carriers-empty {
  font-size: 12px;
  color: var(--muted);
}

body[data-theme="dark"].page-profile .profile-hero-carriers-label {
  color: rgba(226,232,240,.76);
}

body[data-theme="dark"].page-profile .profile-hero-carrier-chip {
  color: #e8eef8;
  background: linear-gradient(180deg, rgba(30,41,59,.72), rgba(15,23,42,.78));
  border-color: rgba(148,163,184,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

body[data-theme="dark"].page-profile .profile-hero-carriers-empty {
  color: rgba(226,232,240,.68);
}

/* Bug reports admin page layout */
.page-bug-reports .bug-reports-filter-form {
  margin-bottom: 14px;
}

.page-bug-reports .bug-reports-filter-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.page-bug-reports .bug-reports-table {
  table-layout: fixed;
  width: 100%;
}

.page-bug-reports .bug-reports-table th,
.page-bug-reports .bug-reports-table td {
  vertical-align: top;
}

.page-bug-reports .bug-reports-table th:nth-child(1),
.page-bug-reports .bug-reports-table td:nth-child(1) { width: 52px; }
.page-bug-reports .bug-reports-table th:nth-child(2),
.page-bug-reports .bug-reports-table td:nth-child(2) { width: 130px; }
.page-bug-reports .bug-reports-table th:nth-child(3),
.page-bug-reports .bug-reports-table td:nth-child(3) { width: 92px; }
.page-bug-reports .bug-reports-table th:nth-child(5),
.page-bug-reports .bug-reports-table td:nth-child(5) { width: 180px; }
.page-bug-reports .bug-reports-table th:nth-child(6),
.page-bug-reports .bug-reports-table td:nth-child(6) { width: 130px; }
.page-bug-reports .bug-reports-table th:nth-child(8),
.page-bug-reports .bug-reports-table td:nth-child(8) { width: 110px; }
.page-bug-reports .bug-reports-table th:nth-child(9),
.page-bug-reports .bug-reports-table td:nth-child(9) { width: 260px; }

.page-bug-reports .bug-reports-cell-text {
  margin-top: 4px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

.page-bug-reports .bug-reports-col-url {
  max-width: 280px;
}

.page-bug-reports .bug-reports-url {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  word-break: break-all;
}

.page-bug-reports .bug-reports-col-actions {
  min-width: 260px;
}

.page-bug-reports .bug-reports-action-form {
  gap: 8px !important;
  grid-template-columns: 1fr !important;
}

.page-bug-reports .bug-reports-action-form .btn-primary {
  width: 100%;
}

.page-bug-reports .card {
  border: 1px solid rgba(14, 116, 144, 0.16);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.page-bug-reports .bug-reports-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.page-bug-reports .bug-reports-summary-item {
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.92));
  display: grid;
  gap: 4px;
}

.page-bug-reports .bug-reports-summary-item span {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.page-bug-reports .bug-reports-summary-item strong {
  font-size: 20px;
  line-height: 1;
  color: #0f172a;
  font-family: "Sora", "Manrope", sans-serif;
}

.page-bug-reports .bug-reports-summary-item.is-new {
  border-color: rgba(239, 68, 68, 0.24);
  background: linear-gradient(180deg, #fff1f2, #ffe4e6);
}

.page-bug-reports .bug-reports-summary-item.is-progress {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, #fff7ed, #ffedd5);
}

.page-bug-reports .bug-reports-summary-item.is-resolved {
  border-color: rgba(16, 185, 129, 0.24);
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
}

.page-bug-reports .bug-reports-summary-item.is-rejected {
  border-color: rgba(100, 116, 139, 0.24);
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
}

.page-bug-reports .bug-reports-filter-form {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.88), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 12px;
}

.page-bug-reports .bug-reports-filter-actions {
  margin-top: 4px;
}

.page-bug-reports .bug-reports-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.page-bug-reports .bug-reports-tab {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 8px 10px;
  text-decoration: none;
  color: #0f172a;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.page-bug-reports .bug-reports-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  border-color: rgba(56, 189, 248, 0.45);
}

.page-bug-reports .bug-reports-tab strong {
  min-width: 24px;
  text-align: center;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(148, 163, 184, 0.2);
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 12px;
}

.page-bug-reports .bug-reports-tab.is-active {
  border-color: rgba(14, 116, 144, 0.6);
  background: linear-gradient(180deg, #e0f2fe, #bae6fd);
  box-shadow: 0 10px 20px rgba(14, 116, 144, 0.16);
}

.page-bug-reports .bug-reports-table {
  border-collapse: separate;
  border-spacing: 0;
}

.page-bug-reports .bug-reports-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  border-bottom: 1px solid rgba(148, 163, 184, 0.32);
}

.page-bug-reports .bug-reports-table tbody tr:nth-child(odd) {
  background: rgba(248, 250, 252, 0.65);
}

.page-bug-reports .bug-reports-table tbody tr:hover {
  background: rgba(224, 242, 254, 0.48);
}

.page-bug-reports .bug-reports-title {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.28;
}

.page-bug-reports .bug-reports-action-form {
  background: rgba(255, 255, 255, 0.92);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 8px;
}

body[data-theme="dark"] .page-bug-reports .card {
  border-color: rgba(125, 211, 252, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.92));
}

body[data-theme="dark"] .page-bug-reports .bug-reports-filter-form,
body[data-theme="dark"] .page-bug-reports .bug-reports-action-form {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .page-bug-reports .bug-reports-tab {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.9));
}

body[data-theme="dark"] .page-bug-reports .bug-reports-tab strong {
  background: rgba(148, 163, 184, 0.28);
  color: #f8fafc;
}

body[data-theme="dark"] .page-bug-reports .bug-reports-tab.is-active {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.92), rgba(12, 74, 110, 0.86));
}

body[data-theme="dark"] .page-bug-reports .bug-reports-table thead th {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: rgba(148, 163, 184, 0.26);
}

body[data-theme="dark"] .page-bug-reports .bug-reports-table tbody tr:nth-child(odd) {
  background: rgba(30, 41, 59, 0.45);
}

body[data-theme="dark"] .page-bug-reports .bug-reports-table tbody tr:hover {
  background: rgba(30, 58, 138, 0.35);
}

body[data-theme="dark"] .page-bug-reports .bug-reports-summary-item span {
  color: #cbd5e1;
}

body[data-theme="dark"] .page-bug-reports .bug-reports-summary-item strong,
body[data-theme="dark"] .page-bug-reports .bug-reports-title {
  color: #f8fafc;
}

@media (max-width: 1200px) {
  .page-bug-reports .bug-reports-table-wrap {
    overflow-x: auto;
  }
  .page-bug-reports .bug-reports-table {
    min-width: 1180px;
  }
}

@media (max-width: 860px) {
  .page-bug-reports .bug-reports-summary {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
  .page-bug-reports .bug-reports-tabs {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge.is-bug-alert {
  background: linear-gradient(180deg, #ef4444, #dc2626);
  border-color: rgba(185, 28, 28, 0.85);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.28);
  animation: sidebarBugBadgePulse 1.05s ease-in-out infinite;
}

@keyframes sidebarBugBadgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.24);
  }
  50% {
    transform: scale(1.11);
    box-shadow: 0 0 0 8px rgba(248, 113, 113, 0.16);
  }
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge.is-bug-alert {
  background: linear-gradient(180deg, #b91c1c, #991b1b);
  border-color: rgba(252, 165, 165, 0.46);
  color: #fff1f2;
}

.login-capslock-warning {
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
}

body[data-theme="dark"] .login-capslock-warning {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

.login-maintenance-notice {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
}


.login-maintenance-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(980px, calc(100vw - 24px));
  border: 1px solid rgba(244, 63, 94, .42);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 55%, #fecdd3 100%);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .26);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  justify-items: center;
}


.login-maintenance-banner.is-active {
  border-color: rgba(220, 38, 38, .5);
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 55%, #fca5a5 100%);
  box-shadow: 0 16px 36px rgba(127, 29, 29, .26);
}

.login-maintenance-banner__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #be123c;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(244, 63, 94, .35);
}

.login-maintenance-banner.is-active .login-maintenance-banner__icon {
  color: #991b1b;
  border-color: rgba(220, 38, 38, .4);
}

.login-maintenance-banner__icon svg {
  width: 20px;
  height: 20px;
}

.login-maintenance-banner__title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  color: #9f1239;
  margin-bottom: 4px;
}

.login-maintenance-banner.is-active .login-maintenance-banner__title {
  color: #7f1d1d;
}

.login-maintenance-banner__meta {
  font-size: 13px;
  font-weight: 700;
  color: rgba(136, 19, 55, .96);
  margin-bottom: 5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}


.login-maintenance-banner.is-active .login-maintenance-banner__meta {
  font-size: 13px;
  font-weight: 700;
  color: rgba(136, 19, 55, .96);
  margin-bottom: 5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}


.login-maintenance-banner__message {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(136, 19, 55, .9);
}

.login-maintenance-banner.is-active .login-maintenance-banner__message {
  color: rgba(127, 29, 29, .9);
}

body[data-theme="dark"] .login-maintenance-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(980px, calc(100vw - 24px));
  border: 1px solid rgba(244, 63, 94, .42);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 55%, #fecdd3 100%);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .26);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  justify-items: center;
}


body[data-theme="dark"] .login-maintenance-banner.is-active {
  border-color: rgba(248, 113, 113, .48);
  background: linear-gradient(135deg, rgba(69, 10, 10, .98), rgba(127, 29, 29, .95));
}

body[data-theme="dark"] .login-maintenance-banner__icon {
  background: rgba(15, 23, 42, .72);
}

body[data-theme="dark"] .login-maintenance-banner__title {
  color: #fecdd3;
}

body[data-theme="dark"] .login-maintenance-banner.is-active .login-maintenance-banner__title {
  color: #fecaca;
}

body[data-theme="dark"] .login-maintenance-banner__meta,
body[data-theme="dark"] .login-maintenance-banner__message {
  color: rgba(255, 228, 230, .9);
}

body[data-theme="dark"] .login-maintenance-banner.is-active .login-maintenance-banner__meta,
body[data-theme="dark"] .login-maintenance-banner.is-active .login-maintenance-banner__message {
  color: rgba(254, 226, 226, .9);
}

.app-maintenance-banner {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(244, 63, 94, .36);
  border-radius: 15px;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 55%, #fecdd3 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  justify-items: center;
}


.app-maintenance-banner.is-active {
  border-color: rgba(220, 38, 38, .45);
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 55%, #fca5a5 100%);
}

.app-maintenance-banner__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(244, 63, 94, .34);
  color: #be123c;
  background: rgba(255, 255, 255, .84);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-maintenance-banner__icon svg {
  width: 19px;
  height: 19px;
}

.app-maintenance-banner__title {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #9f1239;
  margin-bottom: 4px;
}

.app-maintenance-banner__meta {
  font-size: 13px;
  font-weight: 700;
  color: rgba(136, 19, 55, .95);
  margin-bottom: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}


.app-maintenance-banner__message {
  font-size: 13px;
  line-height: 1.48;
  color: rgba(136, 19, 55, .9);
}

body[data-theme="dark"] .app-maintenance-banner {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(244, 63, 94, .36);
  border-radius: 15px;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 55%, #fecdd3 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  justify-items: center;
}


body[data-theme="dark"] .app-maintenance-banner.is-active {
  border-color: rgba(248, 113, 113, .45);
  background: linear-gradient(135deg, rgba(69, 10, 10, .95), rgba(127, 29, 29, .93));
}

body[data-theme="dark"] .app-maintenance-banner__icon {
  border-color: rgba(251, 113, 133, .35);
  color: #fda4af;
  background: rgba(15, 23, 42, .72);
}

body[data-theme="dark"] .app-maintenance-banner__title {
  color: #fecdd3;
}

body[data-theme="dark"] .app-maintenance-banner__meta,
body[data-theme="dark"] .app-maintenance-banner__message {
  color: rgba(255, 228, 230, .9);
}

.login-maintenance-banner__content {
  text-align: center;
}

.app-maintenance-banner__content {
  text-align: center;
}


/* Maintenance banner alignment + emphasized time line */
.login-maintenance-banner__content,
.app-maintenance-banner__content {
  text-align: center;
}

.login-maintenance-banner__meta,
.app-maintenance-banner__meta {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.login-maintenance-banner.is-active .login-maintenance-banner__meta {
  color: rgba(127, 29, 29, .96);
}

.app-maintenance-banner.is-active .app-maintenance-banner__meta {
  color: rgba(127, 29, 29, .95);
}

body[data-theme="dark"] .app-maintenance-banner {
  border-color: rgba(251, 113, 133, .4);
  background: linear-gradient(135deg, rgba(76, 5, 25, .95), rgba(136, 19, 55, .92));
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
}

body[data-theme="dark"] .app-maintenance-banner.is-active {
  border-color: rgba(248, 113, 113, .45);
  background: linear-gradient(135deg, rgba(69, 10, 10, .95), rgba(127, 29, 29, .93));
}

body[data-theme="dark"] .app-maintenance-banner__meta,
body[data-theme="dark"] .app-maintenance-banner__message {
  color: rgba(255, 228, 230, .9);
}

/* Maintenance meta layout */
.login-maintenance-banner__meta,
.app-maintenance-banner__meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  text-decoration: none !important;
}

.login-maintenance-banner__meta strong,
.app-maintenance-banner__meta strong {
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
}

.maintenance-meta-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .82;
}

.maintenance-meta-sep {
  opacity: .5;
  font-weight: 700;
}

body[data-theme="dark"] .login-maintenance-banner__meta strong,
body[data-theme="dark"] .app-maintenance-banner__meta strong {
  background: rgba(15,23,42,.55);
}

/* Maintenance banner compact layout: icon left */
.login-maintenance-banner,
.app-maintenance-banner {
  grid-template-columns: auto 1fr !important;
  justify-items: stretch !important;
  align-items: center !important;
}

.login-maintenance-banner {
  width: min(760px, calc(100vw - 24px)) !important;
}

.login-maintenance-banner__icon,
.app-maintenance-banner__icon {
  justify-self: start;
}

.login-maintenance-banner__content,
.app-maintenance-banner__content {
  text-align: left !important;
}

@media (max-width: 680px) {
  .login-maintenance-banner,
  .app-maintenance-banner {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    text-align: center !important;
  }
  .login-maintenance-banner__content,
  .app-maintenance-banner__content {
    text-align: center !important;
  }
}

/* Maintenance: center only text block */
.login-maintenance-banner__content,
.app-maintenance-banner__content {
  text-align: center !important;
}

.bot-trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.bot-trap input {
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
}

.reservation-code-strong {
  font-weight: 800;
  letter-spacing: .03em;
  color: var(--ink);
}

.slot-reservation-code {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  color: var(--ink);
}

.slot-reservation-code--secondary {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--muted);
}

body[data-theme="dark"] .reservation-code-strong,
body[data-theme="dark"] .slot-reservation-code {
  color: #f8fbff;
}

body[data-theme="dark"] .slot-reservation-code--secondary {
  color: #a9b8cd;
}

.session-timeout-banner {
  position: fixed;
  right: 24px;
  bottom: 182px;
  z-index: 9998;
  width: min(420px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: linear-gradient(180deg, rgba(255, 246, 246, 0.98), rgba(255, 236, 236, 0.96));
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}
.session-timeout-banner__title {
  font-weight: 800;
  font-size: 16px;
  color: #b91c1c;
  margin-bottom: 6px;
}
.session-timeout-banner__text {
  color: #7f1d1d;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 12px;
}
.session-timeout-banner__btn {
  min-width: 140px;
}
body[data-theme="dark"] .session-timeout-banner {
  background: linear-gradient(180deg, rgba(60, 11, 18, 0.96), rgba(37, 10, 15, 0.94));
  border-color: rgba(248, 113, 113, 0.28);
}
body[data-theme="dark"] .session-timeout-banner__title {
  color: #fecaca;
}
body[data-theme="dark"] .session-timeout-banner__text {
  color: #fee2e2;
}

.session-timeout-chip {
  position: fixed;
  bottom: 116px;
  right: 92px;
  z-index: 9997;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: rgba(239, 246, 255, 0.96);
  color: #1e3a8a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
  pointer-events: none;
}

@media (max-width: 980px) {
  .session-timeout-chip {
    bottom: 104px;
    right: 74px;
  }

  .session-timeout-banner {
    right: 12px;
    bottom: 166px;
    width: min(400px, calc(100vw - 24px));
  }
}

.session-timeout-chip__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.session-timeout-chip__value {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.session-timeout-chip.is-warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(255, 251, 235, 0.96);
  color: #92400e;
}

.session-timeout-chip.is-danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(254, 242, 242, 0.96);
  color: #991b1b;
}

body[data-theme="dark"] .session-timeout-chip {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(15, 23, 42, 0.95);
  color: #bfdbfe;
}

body[data-theme="dark"] .session-timeout-chip.is-warning {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(69, 39, 13, 0.92);
  color: #fcd34d;
}

body[data-theme="dark"] .session-timeout-chip.is-danger {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(69, 17, 17, 0.92);
  color: #fecaca;
}
.time-grid--shared {
  margin-bottom: 14px;
}

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

.time-stage-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.72));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.time-stage-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.time-stage-card__eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.time-stage-card__title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.time-stage-card .time-grid {
  grid-template-columns: 1fr;
}

body[data-theme="dark"] .time-stage-card {
  background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(2,6,23,0.88));
  border-color: rgba(148,163,184,0.14);
}

body[data-theme="dark"] .time-stage-card__eyebrow {
  color: rgba(226,232,240,0.64);
}

body[data-theme="dark"] .time-stage-card__title {
  color: #f8fafc;
}

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

.app-shell {
  grid-template-columns: 260px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  grid-template-areas: "sidebar main" !important;
}

.app-shell > .staff-topbar {
  display: none !important;
}

/* Global red pill style */
.status-pill,
.status-pill.free,
.status-pill.reserved,
.status-pill.in_progress,
.status-pill.done,
.status-pill.blocked,
.status-pill.neutral,
.status-pill.pending-approval,
.slot-sla-pill,
.slot-sla-pill.sla-ok,
.slot-sla-pill.sla-warn,
.slot-sla-pill.sla-breach {
  min-height: 34px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid #f3dede;
  background: #fdf5f5;
  color: #c92a2a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.network-status-chip.is-offline {
  border-color: #f0d1d1;
  background: #fdf5f5;
  color: #c92a2a;
}

.network-status-chip.is-offline::before {
  background: #c92a2a;
  box-shadow: 0 0 0 4px rgba(201, 42, 42, 0.14);
}

body[data-theme="dark"] .status-pill,
body[data-theme="dark"] .status-pill.free,
body[data-theme="dark"] .status-pill.reserved,
body[data-theme="dark"] .status-pill.in_progress,
body[data-theme="dark"] .status-pill.done,
body[data-theme="dark"] .status-pill.blocked,
body[data-theme="dark"] .status-pill.neutral,
body[data-theme="dark"] .status-pill.pending-approval,
body[data-theme="dark"] .slot-sla-pill,
body[data-theme="dark"] .slot-sla-pill.sla-ok,
body[data-theme="dark"] .slot-sla-pill.sla-warn,
body[data-theme="dark"] .slot-sla-pill.sla-breach {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

body[data-theme="dark"] .network-status-chip.is-offline {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

/* =========================================================
   UI refresh 2026-03: global scale + login + sidebar rebuild
   ========================================================= */

@media (min-width: 900px) {
  body {
    zoom: 0.93;
  }
}

.app-shell {
  grid-template-columns: 228px minmax(0, 1fr) !important;
}

/* Login: full visual rebuild */
body:has(.login-shell) {
  background:
    radial-gradient(1200px 560px at 8% -10%, rgba(14, 165, 233, 0.26), transparent 58%),
    radial-gradient(900px 460px at 100% 100%, rgba(220, 38, 38, 0.22), transparent 60%),
    linear-gradient(155deg, #071127 0%, #0a1632 48%, #121b3f 100%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px 56px;
  isolation: isolate;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 22%, rgba(56, 189, 248, 0.12), transparent 35%),
    radial-gradient(circle at 78% 72%, rgba(239, 68, 68, 0.14), transparent 42%),
    repeating-linear-gradient(
      160deg,
      rgba(255, 255, 255, 0.025) 0 12px,
      transparent 12px 24px
    );
  pointer-events: none;
  z-index: -2;
}

.login-card {
  width: min(500px, 100%);
  border-radius: 22px;
  padding: 28px 26px 22px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.94));
  box-shadow:
    0 24px 56px rgba(2, 6, 23, 0.20),
    0 6px 18px rgba(15, 23, 42, 0.12);
}

.login-head {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.login-logo {
  width: clamp(108px, 12vw, 132px);
  max-height: 78px;
  object-fit: contain;
}

.login-pill {
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.09);
  color: #1d4ed8;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-head h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.08;
}

.login-head p {
  margin: 0;
  color: #475569;
  font-size: 14px;
}

.login-fields {
  display: grid;
  gap: 12px;
}

.login-fields label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 600;
}

.login-fields input,
.login-fields select {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0 12px;
}

.login-fields input:focus,
.login-fields select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.login-actions {
  margin-top: 14px;
}

.login-actions .btn-primary {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #0f3ea7;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 700;
}

.login-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.26);
}

body[data-theme="dark"]:has(.login-shell) {
  background:
    radial-gradient(1000px 500px at 16% 0%, rgba(14, 165, 233, 0.18), transparent 58%),
    radial-gradient(900px 520px at 95% 98%, rgba(220, 38, 38, 0.24), transparent 62%),
    linear-gradient(165deg, #040814 0%, #0a1226 50%, #11182e 100%);
}

body[data-theme="dark"] .login-card {
  border-color: rgba(100, 116, 139, 0.36);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 30, 0.90));
  box-shadow:
    0 26px 54px rgba(2, 6, 23, 0.56),
    0 8px 20px rgba(2, 6, 23, 0.44);
}

body[data-theme="dark"] .login-head h1 {
  color: #e2e8f0;
}

body[data-theme="dark"] .login-head p,
body[data-theme="dark"] .login-fields label {
  color: #94a3b8;
}

body[data-theme="dark"] .login-fields input,
body[data-theme="dark"] .login-fields select {
  border-color: rgba(71, 85, 105, 0.72);
  background: #0f172a;
  color: #e2e8f0;
}

/* Sidebar: complete rebuild */
.sidebar.sidebar-modern.sidebar-v5 {
  width: 228px;
  min-width: 228px;
  max-width: 228px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  padding: 14px 10px 12px;
  border-right: 1px solid rgba(15, 23, 42, 0.10);
  background:
    radial-gradient(150% 80% at -20% -20%, rgba(59, 130, 246, 0.22), transparent 50%),
    radial-gradient(120% 80% at 120% 120%, rgba(239, 68, 68, 0.24), transparent 52%),
    linear-gradient(180deg, #eef5ff 0%, #eaf2ff 55%, #ecf3ff 100%);
}

.sidebar.sidebar-modern.sidebar-v5::after {
  display: none;
}

.sidebar.sidebar-modern.sidebar-v5 * {
  animation: none !important;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__top,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  display: grid;
  gap: 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  max-height: calc(100vh - 250px);
  overflow: auto;
  padding-right: 3px;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
.sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
.sidebar.sidebar-modern.sidebar-v5 .nav-category {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.08);
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  padding: 3px;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  color: #0f172a;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block > div > span {
  font-size: 10px;
  color: #64748b;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card {
  padding: 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-role {
  font-size: 10px;
  color: #1d4ed8;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-email {
  font-size: 10px;
  color: #64748b;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-block {
  padding: 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #dc2626;
  font-weight: 700;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-name {
  margin-top: 2px;
  font-size: 14px;
  color: #0f172a;
  font-weight: 700;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-link {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category {
  padding: 8px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  padding: 4px 6px 8px;
  font-size: 10px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 33px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0 9px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  text-decoration: none;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  font-size: 12px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link .menu-icon {
  width: 16px;
  height: 16px;
  color: #2563eb;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link:hover,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link:hover {
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.08);
  color: #0f172a;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link.active,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown[open] > summary.nav-link {
  border-color: rgba(220, 38, 38, 0.26);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(37, 99, 235, 0.12));
  color: #0f172a;
  font-weight: 700;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-submenu {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(100, 116, 139, 0.35);
}

.sidebar.sidebar-modern.sidebar-v5 .nav-submenu .nav-link {
  min-height: 30px;
  padding-left: 12px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge {
  margin-left: auto;
  min-width: 22px;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.32);
  background: rgba(59, 130, 246, 0.10);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 82px minmax(0, 1fr) !important;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  padding-left: 7px;
  padding-right: 7px;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .brand-block {
  grid-template-columns: 1fr;
  justify-items: center;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .brand-block > div,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-category-title span:not(.menu-icon),
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge {
  display: none !important;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  justify-content: center;
  padding: 0;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 {
  border-right-color: rgba(51, 65, 85, 0.62);
  background:
    radial-gradient(140% 80% at -20% -20%, rgba(59, 130, 246, 0.24), transparent 55%),
    radial-gradient(120% 80% at 120% 120%, rgba(220, 38, 38, 0.22), transparent 52%),
    linear-gradient(180deg, #0b1222 0%, #0e172c 50%, #121f39 100%);
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .brand-block,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-category {
  border-color: rgba(51, 65, 85, 0.78);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.38);
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .brand-block h2,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .warehouse-name,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-name,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-link {
  color: #e2e8f0;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .brand-block > div > span,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-email,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  color: #94a3b8;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-link:hover,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link:hover {
  border-color: rgba(59, 130, 246, 0.34);
  background: rgba(59, 130, 246, 0.16);
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-link.active,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown[open] > summary.nav-link {
  border-color: rgba(248, 113, 113, 0.36);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.22), rgba(37, 99, 235, 0.22));
}

/* Sidebar hotfix: stabilize layout after refresh */
@media (min-width: 900px) {
  body {
    zoom: 1;
    font-size: 15px;
  }
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr) !important;
  align-items: start;
}

.app-shell > .main {
  min-width: 0;
}

.sidebar.sidebar-modern.sidebar-v5 {
  width: 248px;
  min-width: 248px;
  max-width: 248px;
  padding: 12px 10px 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  max-height: calc(100vh - 300px);
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 35px;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 84px minmax(0, 1fr) !important;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 {
  width: 84px;
  min-width: 84px;
  max-width: 84px;
}

/* Schedule compact density (main content) */
body.page-schedule .main {
  padding: 12px 14px 14px;
}

body.page-schedule .page-header {
  padding: 14px 16px;
  border-radius: 16px;
}

body.page-schedule .page-header h1 {
  font-size: clamp(34px, 2.3vw, 44px);
}

body.page-schedule .page-header p {
  font-size: 14px;
}

body.page-schedule .warehouse-dayboard {
  padding: 14px 16px;
  border-radius: 16px;
}

body.page-schedule .warehouse-dayboard__hero {
  margin-bottom: 10px;
}

body.page-schedule .warehouse-dayboard__eyebrow {
  font-size: 11px;
  padding: 4px 10px;
}

body.page-schedule .warehouse-dayboard h2 {
  font-size: clamp(32px, 2.2vw, 42px);
}

body.page-schedule .warehouse-dayboard p {
  font-size: 14px;
}

body.page-schedule .warehouse-kpi-card {
  min-height: 106px;
  padding: 12px 14px;
  border-radius: 14px;
}

body.page-schedule .warehouse-kpi-card__label {
  font-size: 11px;
}

body.page-schedule .warehouse-kpi-card__value {
  font-size: 46px;
  line-height: 1.02;
}

body.page-schedule .warehouse-kpi-card__hint {
  font-size: 12px;
}

body.page-schedule .warehouse-dayboard__strip {
  gap: 10px;
}

body.page-schedule .warehouse-load-card,
body.page-schedule .warehouse-insights-card {
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 14px;
}

body.page-schedule .filters.schedule-filters {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
}

body.page-schedule .schedule-filters-head h3 {
  font-size: 28px;
}

body.page-schedule .schedule-filters-head p {
  font-size: 13px;
}

body.page-schedule .field {
  gap: 6px;
}

body.page-schedule .field span {
  font-size: 11px;
}

body.page-schedule .field input,
body.page-schedule .field select {
  min-height: 38px;
  border-radius: 10px;
  font-size: 13px;
}

body.page-schedule .schedule-filters-actions .btn-secondary,
body.page-schedule .schedule-filters-actions .btn-primary,
body.page-schedule .header-actions .btn-secondary {
  min-height: 38px;
  border-radius: 10px;
  font-size: 13px;
}

body.page-schedule .day-title {
  border-radius: 14px;
  padding: 10px 12px;
}

/* Login rebuild v2 (hard override) */
body.page-login {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 15% 8%, rgba(59, 130, 246, 0.26), transparent 62%),
    radial-gradient(860px 420px at 92% 90%, rgba(220, 38, 38, 0.22), transparent 62%),
    linear-gradient(160deg, #081225 0%, #0e1c3a 48%, #16284a 100%) !important;
}

body.page-login .login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

body.page-login .login-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(7, 13, 29, 0.74), rgba(16, 25, 50, 0.42)),
    repeating-linear-gradient(145deg, rgba(255, 255, 255, 0.016) 0 14px, transparent 14px 28px);
}

body.page-login .login-layout {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 440px);
  gap: 22px;
  align-items: stretch;
}

body.page-login .login-visual,
body.page-login .login-card {
  border-radius: 22px !important;
  border: 1px solid rgba(148, 163, 184, 0.30) !important;
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.34) !important;
}

body.page-login .login-visual {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(37, 99, 235, 0.32), transparent 58%),
    radial-gradient(120% 90% at 100% 100%, rgba(239, 68, 68, 0.22), transparent 60%),
    linear-gradient(160deg, rgba(9, 15, 33, 0.93), rgba(16, 27, 52, 0.88));
  color: #e2e8f0;
}

body.page-login .login-visual::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.30), rgba(220, 38, 38, 0.15) 65%, transparent 72%);
}

body.page-login .login-visual__badge {
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.32);
  background: rgba(30, 64, 175, 0.22);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.page-login .login-visual h2 {
  margin: 0;
  font-size: clamp(34px, 2.9vw, 48px);
  line-height: 1.04;
  color: #f8fafc;
}

body.page-login .login-visual p {
  margin: 14px 0 0;
  max-width: 48ch;
  font-size: 16px;
  line-height: 1.55;
  color: #cbd5e1;
}

body.page-login .login-card {
  margin: 0 !important;
  width: 100% !important;
  padding: 26px 24px 20px !important;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.94)) !important;
}

body.page-login .login-head {
  margin-bottom: 14px;
}

body.page-login .login-logo {
  width: 116px;
  height: 52px;
  object-fit: contain;
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid #dbe4f1;
  background: #fff;
}

body.page-login .login-pill {
  margin-top: 8px;
  font-size: 11px;
  border-color: rgba(59, 130, 246, 0.26);
  background: rgba(59, 130, 246, 0.10);
}

body.page-login .login-head h1 {
  margin: 4px 0 0;
  font-size: clamp(36px, 2.8vw, 46px);
  color: #0f172a;
}

body.page-login .login-head p {
  margin-top: 4px;
  font-size: 14px;
}

body.page-login .login-fields {
  gap: 11px;
}

body.page-login .login-fields label {
  font-size: 12px;
  color: #334155;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.page-login .login-fields input,
body.page-login .login-fields select {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 15px;
}

body.page-login .login-fields input:focus,
body.page-login .login-fields select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

body.page-login .login-actions {
  margin-top: 14px;
}

body.page-login .login-actions .btn-primary {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid #1d4ed8;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

body.page-login .login-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.28);
}

@media (max-width: 980px) {
  body.page-login .login-layout {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  body.page-login .login-visual {
    min-height: 170px;
  }
}

/* Login rebuild v3 (from scratch) */
body.page-login {
  background:
    radial-gradient(820px 360px at 8% 10%, rgba(37, 99, 235, 0.20), transparent 64%),
    radial-gradient(760px 340px at 90% 86%, rgba(220, 38, 38, 0.18), transparent 62%),
    linear-gradient(148deg, #060e1d 0%, #0a1732 50%, #132545 100%) !important;
}

body.page-login .login-backdrop {
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.58)),
    repeating-linear-gradient(
      128deg,
      rgba(255, 255, 255, 0.022) 0 13px,
      transparent 13px 26px
    );
}

body.page-login .login-layout {
  width: min(1040px, 100%);
  grid-template-columns: minmax(360px, 1fr) minmax(300px, 420px);
  gap: 24px;
}

body.page-login .login-visual {
  padding: 30px 30px 26px;
  border-radius: 24px !important;
  border: 1px solid rgba(59, 130, 246, 0.22) !important;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(59, 130, 246, 0.30), transparent 56%),
    linear-gradient(170deg, rgba(8, 16, 34, 0.94), rgba(12, 21, 44, 0.92));
}

body.page-login .login-visual__badge {
  font-size: 11px;
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(125, 211, 252, 0.30);
}

body.page-login .login-visual h2 {
  font-size: clamp(38px, 3.4vw, 56px);
  letter-spacing: -0.02em;
}

body.page-login .login-visual p {
  margin-top: 12px;
  font-size: 17px;
  max-width: 44ch;
}

body.page-login .login-card {
  border-radius: 24px !important;
  border: 1px solid rgba(191, 219, 254, 0.30) !important;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(241, 245, 255, 0.95)) !important;
  padding: 24px 22px 18px !important;
}

body.page-login .login-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "logo pill"
    "title title"
    "desc desc";
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
}

body.page-login .login-logo {
  grid-area: logo;
  width: 104px;
  height: 46px;
  margin: 0;
}

body.page-login .login-pill {
  grid-area: pill;
  margin: 0;
  justify-self: start;
}

body.page-login .login-head h1 {
  grid-area: title;
  margin: 2px 0 0;
  font-size: clamp(34px, 2.8vw, 48px);
  line-height: 1.02;
}

body.page-login .login-head p {
  grid-area: desc;
  margin: 0;
}

body.page-login .login-fields {
  margin-top: 6px;
}

body.page-login .login-fields label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

body.page-login .login-fields input,
body.page-login .login-fields select {
  min-height: 44px;
  border-radius: 11px;
  font-size: 14px;
}

body.page-login .login-actions .btn-primary {
  min-height: 44px;
  border-radius: 11px;
  font-size: 15px;
}

/* Login single-card mode (without left visual panel) */
body.page-login .login-visual {
  display: none !important;
}

body.page-login .login-layout {
  width: min(440px, 100%) !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

/* Smaller modals globally */
.modal-card {
  width: min(860px, calc(100vw - 46px));
  max-width: 860px;
  padding: 14px;
  border-radius: 14px;
}

.modal-card.wide {
  width: min(980px, calc(100vw - 40px));
  max-width: 980px;
}

.modal-header h3 {
  font-size: clamp(26px, 2vw, 34px);
}

.modal-subtitle {
  font-size: 13px;
}

.modal .form-grid input:not([type="checkbox"]):not([type="radio"]),
.modal .form-grid select,
.modal .form-grid textarea {
  min-height: 36px;
  font-size: 13px;
}

.slot-detail-summary,
.detail-summary {
  padding: 12px;
  border-radius: 12px;
}

.modal .btn-primary,
.modal .btn-secondary,
.modal .btn-danger {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

/* Login proportional fix v4 (final single-card baseline) */
body.page-login .login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

body.page-login .login-layout {
  width: min(460px, calc(100vw - 28px)) !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

body.page-login .login-card {
  width: 100% !important;
  margin: 0 !important;
  padding: 22px 22px 18px !important;
  border-radius: 22px !important;
}

body.page-login .login-head {
  display: grid !important;
  grid-template-columns: auto auto;
  grid-template-areas:
    "logo pill"
    "title title"
    "desc desc";
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  text-align: center;
}

body.page-login .login-logo {
  grid-area: logo;
  width: 86px;
  height: 38px;
  padding: 3px 6px;
  border-radius: 10px;
}

body.page-login .login-pill {
  grid-area: pill;
  margin: 0;
  justify-self: center;
  font-size: 10px;
  padding: 5px 10px;
}

body.page-login .login-head h1 {
  grid-area: title;
  margin: 0;
  font-size: clamp(42px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

body.page-login .login-head p {
  grid-area: desc;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  max-width: 34ch;
  justify-self: center;
}

body.page-login .login-fields {
  display: grid;
  gap: 10px;
}

body.page-login .login-fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

body.page-login .login-fields input,
body.page-login .login-fields select {
  min-height: 46px;
  border-radius: 11px;
  font-size: 14px;
  padding: 0 13px;
}

body.page-login .login-actions {
  margin-top: 12px;
}

body.page-login .login-actions .btn-primary {
  width: 100%;
  min-height: 46px;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 520px) {
  body.page-login .login-card {
    padding: 18px 16px 14px !important;
  }
  body.page-login .login-head h1 {
    font-size: clamp(34px, 10vw, 44px);
  }
}

/* Schedule + sidebar compact tuning */
body.page-schedule {
  font-size: 14px;
}

body.page-schedule .main {
  padding: 6px 8px 8px;
}

body.page-schedule .page-header {
  padding: 8px 10px;
}

body.page-schedule .page-header h1 {
  font-size: clamp(24px, 1.8vw, 30px);
}

body.page-schedule .warehouse-dayboard {
  padding: 8px 10px;
}

body.page-schedule .warehouse-dayboard h2 {
  font-size: clamp(26px, 1.9vw, 32px);
}

body.page-schedule .warehouse-dayboard__eyebrow {
  font-size: 9px;
  padding: 3px 8px;
}

body.page-schedule .warehouse-dayboard p {
  font-size: 12px;
  line-height: 1.35;
}

body.page-schedule .warehouse-dayboard__meta .warehouse-dayboard__warehouse,
body.page-schedule .warehouse-dayboard__meta .warehouse-dayboard__date {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
}

body.page-schedule .warehouse-kpi-card {
  min-height: 76px;
  padding: 7px 9px;
}

body.page-schedule .warehouse-kpi-card__value {
  font-size: 26px;
  line-height: 1;
}

body.page-schedule .warehouse-kpi-card__label {
  font-size: 10px;
}

body.page-schedule .warehouse-kpi-card__hint {
  font-size: 10px;
}

body.page-schedule .warehouse-load-card strong,
body.page-schedule .warehouse-insights-card strong {
  font-size: 12px;
}

body.page-schedule .warehouse-load-card span,
body.page-schedule .warehouse-insights-card p {
  font-size: 11px;
  line-height: 1.35;
}

body.page-schedule .filters.schedule-filters {
  padding: 7px 9px;
}

body.page-schedule .schedule-filters-head h3 {
  font-size: clamp(22px, 1.6vw, 26px);
}

body.page-schedule .field span {
  font-size: 10px;
}

body.page-schedule .field input,
body.page-schedule .field select {
  min-height: 30px;
  font-size: 10px;
}

body.page-schedule .schedule-filters-actions .btn-secondary,
body.page-schedule .schedule-filters-actions .btn-primary,
body.page-schedule .header-actions .btn-secondary {
  min-height: 30px;
  font-size: 10px;
}

body.page-schedule .filters.schedule-filters .schedule-filters-head {
  margin-bottom: 6px;
}

body.page-schedule .filters.schedule-filters .schedule-filters-head h3 {
  margin-bottom: 2px;
}

body.page-schedule .filters.schedule-filters .schedule-filters-head p {
  font-size: 11px;
  line-height: 1.35;
}

body.page-schedule .filters.schedule-filters .schedule-filters-row {
  gap: 8px;
}

body.page-schedule .filters.schedule-filters .field {
  gap: 4px;
}

body.page-schedule .filters.schedule-filters .field span {
  font-size: 9px;
  line-height: 1.1;
}

body.page-schedule .filters.schedule-filters .field input,
body.page-schedule .filters.schedule-filters .field select {
  min-height: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 10px;
}

body.page-schedule .filters.schedule-filters .date-control .btn-icon-only,
body.page-schedule .filters.schedule-filters .date-control .btn-secondary,
body.page-schedule .filters.schedule-filters .schedule-filters-actions .btn-secondary,
body.page-schedule .filters.schedule-filters .schedule-filters-actions .btn-primary {
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
}

body.page-schedule .filters.schedule-filters .schedule-filters-row-core {
  margin-bottom: 6px;
}

body.page-schedule .day-title {
  padding: 6px 8px;
}

.app-shell {
  grid-template-columns: 232px minmax(0, 1fr) !important;
}

.sidebar.sidebar-modern.sidebar-v5 {
  width: 232px;
  min-width: 232px;
  max-width: 232px;
  padding: 10px 8px 8px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 31px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  font-size: 11px;
}

/* Sidebar compact v3 */
.app-shell {
  grid-template-columns: 214px minmax(0, 1fr) !important;
}

.sidebar.sidebar-modern.sidebar-v5 {
  width: 214px;
  min-width: 214px;
  max-width: 214px;
  padding: 8px 7px 7px;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
.sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
.sidebar.sidebar-modern.sidebar-v5 .nav-category {
  border-radius: 12px;
  padding: 7px;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-logo {
  width: 34px;
  height: 34px;
}

.sidebar.sidebar-modern.sidebar-v5 .brand-block h2,
.sidebar.sidebar-modern.sidebar-v5 .warehouse-name,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-name {
  font-size: 12px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  padding: 3px 5px 6px;
  font-size: 7px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 28px;
  border-radius: 9px;
  padding: 0 7px;
  gap: 6px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link .menu-icon {
  width: 14px;
  height: 14px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  font-size: 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-link-badge {
  min-width: 18px;
  min-height: 16px;
  padding: 0 5px;
  font-size: 10px;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 72px minmax(0, 1fr) !important;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}

/* Sidebar text contrast */
.sidebar.sidebar-modern.sidebar-v5 .brand-block h2,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-name,
.sidebar.sidebar-modern.sidebar-v5 .warehouse-name,
.sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  color: #0f172a !important;
  opacity: 1 !important;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category-title,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-role,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-email,
.sidebar.sidebar-modern.sidebar-v5 .brand-block > div > span,
.sidebar.sidebar-modern.sidebar-v5 .warehouse-label {
  color: #334155 !important;
  opacity: 1 !important;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .brand-block h2,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .warehouse-name,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-name {
  color: #f1f5f9 !important;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-category-title,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-role,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-email,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .brand-block > div > span,
body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .warehouse-label {
  color: #cbd5e1 !important;
}

/* Ultra compact schedule + sidebar (requested) */
body.page-schedule {
  font-size: 12px;
}

body.page-schedule .app-shell {
  grid-template-columns: 205px minmax(0, 1fr) !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 {
  width: 205px !important;
  min-width: 205px !important;
  max-width: 205px !important;
  padding: 6px !important;
  position: relative !important;
  top: auto !important;
  height: auto !important;
  overflow: visible !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category {
  padding: 6px !important;
  border-radius: 10px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block {
  grid-template-columns: 30px minmax(0, 1fr) !important;
  gap: 6px !important;
  align-items: center !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-logo {
  width: 30px !important;
  height: 30px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block > div {
  display: grid !important;
  gap: 2px !important;
  align-content: center !important;
  min-width: 0 !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block h2,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .warehouse-name,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-name {
  font-size: 11px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block h2 {
  line-height: 1.1 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block > div > span {
  font-size: 9px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  padding: 2px 4px 5px !important;
  font-size: 8px !important;
  letter-spacing: 0.06em !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 24px !important;
  border-radius: 8px !important;
  padding: 0 6px !important;
  gap: 5px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link .menu-icon {
  width: 12px !important;
  height: 12px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  font-size: 9px !important;
}

body.page-schedule .main {
  padding: 6px !important;
}

body.page-schedule .main-header,
body.page-schedule .page-header,
body.page-schedule .warehouse-dayboard,
body.page-schedule .filters.schedule-filters {
  padding: 8px 9px !important;
  border-radius: 12px !important;
}

body.page-schedule .main-header .btn-secondary,
body.page-schedule .header-actions .btn-secondary,
body.page-schedule .header-actions .btn-primary {
  min-height: 28px !important;
  padding: 0 9px !important;
  font-size: 10px !important;
  border-radius: 8px !important;
}

body.page-schedule .page-header h1 {
  font-size: clamp(20px, 1.5vw, 24px) !important;
}

body.page-schedule .page-header p,
body.page-schedule .warehouse-dayboard p {
  font-size: 11px !important;
}

body.page-schedule .warehouse-dayboard__eyebrow {
  font-size: 8px !important;
  padding: 2px 7px !important;
}

body.page-schedule .warehouse-dayboard h2 {
  font-size: clamp(22px, 1.6vw, 26px) !important;
}

body.page-schedule .warehouse-dayboard__meta .warehouse-dayboard__warehouse,
body.page-schedule .warehouse-dayboard__meta .warehouse-dayboard__date {
  min-height: 22px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
}

body.page-schedule .warehouse-dayboard__grid {
  gap: 8px !important;
}

body.page-schedule .warehouse-kpi-card {
  min-height: 68px !important;
  padding: 7px 8px !important;
  border-radius: 10px !important;
}

body.page-schedule .warehouse-kpi-card__label {
  font-size: 9px !important;
}

body.page-schedule .warehouse-kpi-card__value {
  font-size: 22px !important;
  line-height: 1 !important;
}

body.page-schedule .warehouse-kpi-card__hint {
  font-size: 9px !important;
}

body.page-schedule .warehouse-dayboard__strip {
  gap: 8px !important;
}

body.page-schedule .warehouse-load-card,
body.page-schedule .warehouse-insights-card {
  padding: 8px !important;
  min-height: 58px !important;
  border-radius: 10px !important;
}

body.page-schedule .warehouse-load-card strong,
body.page-schedule .warehouse-insights-card strong {
  font-size: 11px !important;
}

body.page-schedule .warehouse-load-card span,
body.page-schedule .warehouse-insights-card p {
  font-size: 10px !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-head h3 {
  font-size: clamp(20px, 1.5vw, 24px) !important;
  margin-bottom: 1px !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-head p {
  font-size: 10px !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-row {
  gap: 6px !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-row-core {
  align-items: end !important;
}

body.page-schedule .filters.schedule-filters .field span {
  font-size: 8px !important;
}

body.page-schedule .filters.schedule-filters .field input,
body.page-schedule .filters.schedule-filters .field select {
  min-height: 26px !important;
  height: 26px !important;
  font-size: 9px !important;
  padding: 0 8px !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 26px !important;
}

body.page-schedule .filters.schedule-filters .date-control .btn-icon-only,
body.page-schedule .filters.schedule-filters .date-control .btn-secondary,
body.page-schedule .filters.schedule-filters .schedule-filters-actions .btn-secondary,
body.page-schedule .filters.schedule-filters .schedule-filters-actions .btn-primary {
  min-height: 26px !important;
  height: 26px !important;
  font-size: 9px !important;
  line-height: 1 !important;
  min-width: 108px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
}

body.page-schedule .day-title {
  padding: 5px 7px !important;
  border-radius: 10px !important;
}

/* Workflow filter color states */
body.page-schedule #workflow-filter[data-workflow-tone="none"] {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
}

body.page-schedule #workflow-filter[data-workflow-tone="warn"] {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
  color: #92400e !important;
}

body.page-schedule #workflow-filter[data-workflow-tone="info"] {
  border-color: #60a5fa !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

body.page-schedule #workflow-filter[data-workflow-tone="notice"] {
  border-color: #22c55e !important;
  background: #f0fdf4 !important;
  color: #166534 !important;
}

body.page-schedule #workflow-filter[data-workflow-tone="ok"] {
  border-color: #14b8a6 !important;
  background: #f0fdfa !important;
  color: #0f766e !important;
}

body.page-schedule #workflow-filter[data-workflow-tone="progress"] {
  border-color: #7c3aed !important;
  background: #f5f3ff !important;
  color: #5b21b6 !important;
}

body.page-schedule #workflow-filter[data-workflow-tone="done"] {
  border-color: #16a34a !important;
  background: #dcfce7 !important;
  color: #14532d !important;
}

body[data-theme="dark"].page-schedule #workflow-filter[data-workflow-tone="none"] {
  border-color: #334155 !important;
  background: #0f172a !important;
  color: #cbd5e1 !important;
}

body[data-theme="dark"].page-schedule #workflow-filter[data-workflow-tone="warn"] {
  border-color: #f59e0b !important;
  background: rgba(146, 64, 14, 0.28) !important;
  color: #fde68a !important;
}

body[data-theme="dark"].page-schedule #workflow-filter[data-workflow-tone="info"] {
  border-color: #60a5fa !important;
  background: rgba(30, 64, 175, 0.28) !important;
  color: #bfdbfe !important;
}

body[data-theme="dark"].page-schedule #workflow-filter[data-workflow-tone="notice"] {
  border-color: #22c55e !important;
  background: rgba(21, 128, 61, 0.28) !important;
  color: #bbf7d0 !important;
}

body[data-theme="dark"].page-schedule #workflow-filter[data-workflow-tone="ok"] {
  border-color: #14b8a6 !important;
  background: rgba(15, 118, 110, 0.28) !important;
  color: #99f6e4 !important;
}

body[data-theme="dark"].page-schedule #workflow-filter[data-workflow-tone="progress"] {
  border-color: #7c3aed !important;
  background: rgba(91, 33, 182, 0.30) !important;
  color: #ddd6fe !important;
}

body[data-theme="dark"].page-schedule #workflow-filter[data-workflow-tone="done"] {
  border-color: #16a34a !important;
  background: rgba(21, 128, 61, 0.30) !important;
  color: #bbf7d0 !important;
}

/* Schedule board compact: grid + slots */
body.page-schedule .group-card {
  border-radius: 12px !important;
  margin-bottom: 10px !important;
}

body.page-schedule .group-header {
  padding: 7px 10px !important;
  gap: 8px !important;
}

body.page-schedule .group-header__eyebrow {
  font-size: 8px !important;
  padding: 2px 7px !important;
}

body.page-schedule .group-header__title {
  font-size: 12px !important;
}

body.page-schedule .group-header__meta .slot-mini-badge {
  min-height: 22px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
}

body.page-schedule .group-body {
  grid-template-columns: 175px 1fr !important;
  gap: 8px !important;
  padding: 9px !important;
}

body.page-schedule .line-header,
body.page-schedule .line-summary {
  height: 24px !important;
}

body.page-schedule .line-title {
  font-size: 9px !important;
}

body.page-schedule .line-item {
  min-height: 26px !important;
  padding: 3px 6px !important;
  font-size: 9.5px !important;
  border-radius: 7px !important;
  line-height: 1.1 !important;
}

body.page-schedule .timeline {
  padding-bottom: 4px !important;
}

body.page-schedule .timeline-header,
body.page-schedule .timeline-row,
body.page-schedule .summary-row {
  gap: 6px !important;
}

body.page-schedule .hour-cell {
  padding: 8px 0 !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  color: #111111 !important;
  line-height: 1.2 !important;
  min-height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.page-schedule .line-header,
body.page-schedule .line-summary {
  height: 42px !important;
  overflow: visible !important;
}

body.page-schedule .timeline-header {
  overflow: visible !important;
}

/* Current hour highlight on schedule */
body.page-schedule .hour-cell.is-current-hour {
  position: relative;
  overflow: visible;
  z-index: 3;
  border: 2px solid #16a34a !important;
  background: inherit !important;
  color: inherit !important;
  font-weight: 700 !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, #22c55e 24%, transparent),
    0 0 22px color-mix(in srgb, #22c55e 30%, transparent) !important;
  animation: scheduleCurrentHourGlow 2.6s ease-in-out infinite;
}

body.page-schedule .hour-cell.is-current-hour::after {
  content: none;
}

body.page-schedule .slot-wrapper.is-current-hour .slot.slot-current-hour {
  position: relative;
  overflow: visible;
  border: 2px solid #16a34a !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    0 0 0 2px color-mix(in srgb, #22c55e 24%, transparent),
    0 0 26px color-mix(in srgb, #22c55e 26%, transparent),
    0 10px 22px rgba(22, 163, 74, 0.20) !important;
  animation: scheduleCurrentHourGlow 2.6s ease-in-out infinite;
}

body.page-schedule .slot-wrapper.is-current-hour .slot.slot-current-hour::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, #22c55e 44%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, #22c55e 24%, transparent);
  animation: scheduleCurrentHourRing 2.6s ease-in-out infinite;
}

body[data-theme="dark"].page-schedule .hour-cell.is-current-hour {
  background: inherit !important;
  color: inherit !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, #22c55e 30%, transparent),
    0 0 26px color-mix(in srgb, #22c55e 34%, transparent) !important;
}

body[data-theme="dark"].page-schedule .hour-cell.is-current-hour::after {
  color: #dcfce7;
  background: linear-gradient(180deg, #16a34a, #166534);
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.45);
}

body[data-theme="dark"].page-schedule .slot-wrapper.is-current-hour .slot.slot-current-hour {
  box-shadow:
    inset 0 1px 0 rgba(220,252,231,.14),
    0 0 0 2px color-mix(in srgb, #22c55e 30%, transparent),
    0 0 28px color-mix(in srgb, #22c55e 36%, transparent),
    0 12px 24px rgba(22, 163, 74, 0.24) !important;
}

@keyframes scheduleCurrentHourGlow {
  0%, 100% {
    filter: saturate(100%);
  }
  50% {
    filter: saturate(112%);
  }
}

@keyframes scheduleCurrentHourRing {
  0%, 100% {
    opacity: .72;
    transform: scale(1);
  }
  50% {
    opacity: .96;
    transform: scale(1.01);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-schedule .hour-cell.is-current-hour,
  body.page-schedule .slot-wrapper.is-current-hour .slot.slot-current-hour,
  body.page-schedule .slot-wrapper.is-current-hour .slot.slot-current-hour::before {
    animation: none !important;
  }
}

body.page-schedule .slot {
  min-height: 52px !important;
  border-radius: 9px !important;
  padding: 6px !important;
  gap: 4px !important;
  font-size: 9px !important;
}

body.page-schedule .slot:hover {
  transform: none !important;
  box-shadow: none !important;
}

body.page-schedule .summary-cell {
  min-height: 26px !important;
  padding: 0 7px !important;
  border-radius: 8px !important;
  font-size: 9px !important;
}

/* Filters: no horizontal scrolling, always wrapped */
body.page-schedule .schedule-filters-row-business {
  overflow-x: visible !important;
}

@media (min-width: 1201px) {
  body.page-schedule .schedule-filters-row-business {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    padding-bottom: 0 !important;
    align-self: start !important;
  }

  body.page-schedule .schedule-filters-row-business .field,
  body.page-schedule .schedule-filters-row-business .filter-groups,
  body.page-schedule .schedule-filters-row-business .filter-client,
  body.page-schedule .schedule-filters-row-business .filter-carrier,
  body.page-schedule .schedule-filters-row-business .filter-reference,
  body.page-schedule .schedule-filters-row-business .filter-status,
  body.page-schedule .schedule-filters-row-business .filter-workflow,
  body.page-schedule .schedule-filters-row-business .filter-time-control {
    min-width: 0 !important;
    width: 100% !important;
    flex: initial !important;
  }
}

/* One-line filters layout (desktop) */
@media (min-width: 1201px) {
  body.page-schedule .filters.schedule-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 6px 8px !important;
  }

  body.page-schedule .filters.schedule-filters .schedule-filters-head {
    flex: 0 0 100% !important;
    margin-bottom: 4px !important;
  }

  body.page-schedule .filters.schedule-filters .schedule-filters-row-core,
  body.page-schedule .filters.schedule-filters .schedule-filters-row-business {
    display: contents !important;
  }

  body.page-schedule .filters.schedule-filters .filter-warehouse,
  body.page-schedule .filters.schedule-filters .filter-groups,
  body.page-schedule .filters.schedule-filters .filter-client,
  body.page-schedule .filters.schedule-filters .filter-carrier,
  body.page-schedule .filters.schedule-filters .filter-reference,
  body.page-schedule .filters.schedule-filters .filter-status,
  body.page-schedule .filters.schedule-filters .filter-workflow,
  body.page-schedule .filters.schedule-filters .filter-time-control {
    flex: 0 0 148px !important;
    width: 148px !important;
    min-width: 148px !important;
    max-width: 148px !important;
  }

  body.page-schedule .filters.schedule-filters .filter-reference,
  body.page-schedule .filters.schedule-filters .filter-workflow {
    flex-basis: 182px !important;
    width: 182px !important;
    min-width: 182px !important;
    max-width: 182px !important;
  }

  body.page-schedule .filters.schedule-filters .schedule-filters-actions {
    order: 30 !important;
    margin-left: auto !important;
    display: inline-flex !important;
    align-self: flex-end !important;
    gap: 6px !important;
  }
}

/* Filters compact boxes (no stretched full-width controls) */
body.page-schedule .filters.schedule-filters .schedule-filters-row-core,
body.page-schedule .filters.schedule-filters .schedule-filters-row-business {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: flex-end !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-row-core .field,
body.page-schedule .filters.schedule-filters .schedule-filters-row-business .field {
  flex: 0 0 210px !important;
  width: 210px !important;
  min-width: 210px !important;
  max-width: 210px !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-row-core .filter-reference,
body.page-schedule .filters.schedule-filters .schedule-filters-row-business .filter-reference,
body.page-schedule .filters.schedule-filters .schedule-filters-row-core .filter-workflow,
body.page-schedule .filters.schedule-filters .schedule-filters-row-business .filter-workflow {
  flex-basis: 250px !important;
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-actions {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin-left: auto !important;
  order: 999 !important;
  align-self: flex-end !important;
  display: inline-flex !important;
  gap: 8px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-row-core {
  margin-bottom: 8px !important;
}

body.page-schedule .filters.schedule-filters .schedule-filters-actions .btn-secondary,
body.page-schedule .filters.schedule-filters .schedule-filters-actions .btn-primary {
  min-width: 104px !important;
  padding: 0 10px !important;
}

/* Sidebar section headings: force black in light theme */
body:not([data-theme="dark"]) .sidebar.sidebar-modern.sidebar-v5 .nav-category-title,
body:not([data-theme="dark"]) .sidebar.sidebar-modern.sidebar-v5 .nav-category-title span {
  color: #000000 !important;
}
body.page-schedule .schedule-tools-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 10px;
}

/* ── Pasek statystyk dnia (dispatcher) ── */
.dispatcher-stats-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 255, 0.88) 48%, rgba(248, 250, 252, 0.9) 100%);
  border: 1px solid color-mix(in srgb, #bfdbfe 42%, var(--line) 58%);
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}
.dispatcher-stats-bar[hidden] { display: none !important; }
.disp-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 9px 4px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid color-mix(in srgb, currentColor 14%, var(--line) 86%);
  color: var(--ink);
  cursor: default;
  white-space: nowrap;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.disp-stat:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: color-mix(in srgb, currentColor 28%, #93c5fd 72%);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.disp-stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: color-mix(in srgb, currentColor 8%, #fff 92%);
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}
.disp-stat__icon svg {
  width: 12px;
  height: 12px;
  opacity: 0.88;
}
.disp-stat__body {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}
.disp-stat__val {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.disp-stat__lbl {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: color-mix(in srgb, currentColor 65%, var(--muted) 35%);
}
.disp-stat--neutral { color: #334155; }
.disp-stat--green  { color: #15803d; }
.disp-stat--blue   { color: #1d4ed8; }
.disp-stat--orange { color: #c2410c; }
.disp-stat--red    { color: #be123c; }
.disp-stat--purple { color: #7e22ce; }
.disp-stat--neutral .disp-stat__icon { background: #f8fafc; border-color: #e2e8f0; }
.disp-stat--green  .disp-stat__icon { background: #f0fdf4; border-color: #bbf7d0; }
.disp-stat--blue   .disp-stat__icon { background: #eff6ff; border-color: #bfdbfe; }
.disp-stat--orange .disp-stat__icon { background: #fff7ed; border-color: #fed7aa; }
.disp-stat--red    .disp-stat__icon { background: #fff1f2; border-color: #fecdd3; }
.disp-stat--purple .disp-stat__icon { background: #faf5ff; border-color: #e9d5ff; }
body[data-theme="dark"] .dispatcher-stats-bar {
  background:
    linear-gradient(135deg, rgba(20, 31, 52, 0.94) 0%, rgba(15, 23, 42, 0.9) 50%, rgba(12, 20, 36, 0.92) 100%);
  border-color: color-mix(in srgb, var(--line) 70%, #3b82f6 30%);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
body[data-theme="dark"] .disp-stat {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.16);
}
body[data-theme="dark"] .disp-stat:hover {
  background: rgba(20, 31, 52, 0.78);
}
body[data-theme="dark"] .disp-stat--neutral { color: #e2e8f0; }
body[data-theme="dark"] .disp-stat--green  { color: #86efac; }
body[data-theme="dark"] .disp-stat--blue   { color: #93c5fd; }
body[data-theme="dark"] .disp-stat--orange { color: #fdba74; }
body[data-theme="dark"] .disp-stat--red    { color: #fda4af; }
body[data-theme="dark"] .disp-stat--purple { color: #d8b4fe; }
body[data-theme="dark"] .disp-stat--neutral .disp-stat__icon { background: rgba(51, 65, 85, 0.5); border-color: rgba(148, 163, 184, 0.2); }
body[data-theme="dark"] .disp-stat--green  .disp-stat__icon { background: rgba(20, 83, 45, 0.45); border-color: rgba(34, 197, 94, 0.28); }
body[data-theme="dark"] .disp-stat--blue   .disp-stat__icon { background: rgba(30, 58, 95, 0.5); border-color: rgba(59, 130, 246, 0.28); }
body[data-theme="dark"] .disp-stat--orange .disp-stat__icon { background: rgba(67, 20, 7, 0.45); border-color: rgba(234, 88, 12, 0.28); }
body[data-theme="dark"] .disp-stat--red    .disp-stat__icon { background: rgba(76, 5, 25, 0.45); border-color: rgba(225, 29, 72, 0.28); }
body[data-theme="dark"] .disp-stat--purple .disp-stat__icon { background: rgba(59, 7, 100, 0.45); border-color: rgba(147, 51, 234, 0.28); }
@media (max-width: 640px) {
  .dispatcher-stats-bar {
    gap: 5px;
    padding: 6px 8px;
  }
  .disp-stat {
    padding: 3px 7px 3px 4px;
    gap: 5px;
  }
  .disp-stat__val { font-size: 12px; }
  .disp-stat__lbl { font-size: 10px; }
}

body.page-schedule .schedule-tools-bar__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.page-schedule .schedule-tools-search {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  gap: 4px;
}

body.page-schedule .schedule-tools-search label {
  font-size: 11px;
  font-weight: 700;
  color: color-mix(in srgb, var(--ink) 68%, var(--muted));
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.page-schedule .schedule-tools-search input {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, #9ca3af 28%);
  background: color-mix(in srgb, var(--panel) 90%, #f8fafc 10%);
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
}

body.page-schedule .reservation-global-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #94a3b8 30%);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 16px 28px rgba(15, 23, 42, .14);
  overflow: hidden;
  max-height: min(58vh, 420px);
  overflow-y: auto;
}

body.page-schedule .reservation-search-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent 22%);
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
  color: var(--ink);
  display: grid;
  gap: 3px;
}

body.page-schedule .reservation-search-item:last-child {
  border-bottom: 0;
}

body.page-schedule .reservation-search-item:hover {
  background: color-mix(in srgb, var(--brand) 7%, var(--panel) 93%);
}

body.page-schedule .reservation-search-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

body.page-schedule .reservation-search-item__top strong {
  font-size: 13px;
}

body.page-schedule .reservation-search-item__meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.page-schedule .reservation-search-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}

body.page-schedule .schedule-filters-modal-card {
  width: min(1260px, calc(100vw - 40px));
  max-height: min(86vh, 920px);
  overflow: auto;
}

body.page-schedule .schedule-filters-in-modal {
  margin-top: 4px;
}

body[data-theme="dark"] .schedule-tools-search input {
  background: color-mix(in srgb, var(--panel) 88%, #0b1220 12%);
}

body[data-theme="dark"] .reservation-global-search-results {
  box-shadow: 0 16px 28px rgba(0, 0, 0, .42);
}

body[data-theme="dark"] .reservation-search-item:hover {
  background: color-mix(in srgb, var(--brand) 16%, var(--panel) 84%);
}

/* Global compact modals (all pages) */
body .modal .modal-card,
body .modal .modal-frame {
  width: min(760px, calc(100vw - 56px)) !important;
  max-width: 760px !important;
  padding: 12px !important;
  border-radius: 12px !important;
}

body .modal .modal-card.wide {
  width: min(920px, calc(100vw - 52px)) !important;
  max-width: 920px !important;
}

body .modal .modal-header h3 {
  font-size: clamp(20px, 1.5vw, 24px) !important;
  line-height: 1.15;
}

body .modal .modal-subtitle {
  font-size: 12px !important;
}

body .modal .modal-close {
  width: 32px !important;
  height: 32px !important;
  font-size: 20px !important;
}

body .modal .form-grid input:not([type="checkbox"]):not([type="radio"]),
body .modal .form-grid select,
body .modal .form-grid textarea {
  min-height: 34px !important;
  font-size: 12px !important;
  border-radius: 9px !important;
}

body .modal .btn-primary,
body .modal .btn-secondary,
body .modal .btn-danger {
  min-height: 34px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
}

body.page-schedule .schedule-filters-modal-card {
  width: min(1040px, calc(100vw - 42px)) !important;
  max-width: 1040px !important;
  max-height: min(82vh, 820px) !important;
}

@media (max-width: 900px) {
  body .modal .modal-card,
  body .modal .modal-frame,
  body .modal .modal-card.wide,
  body.page-schedule .schedule-filters-modal-card {
    width: min(100vw - 24px, 680px) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 10px !important;
  }
}

/* Schedule tools placement fix: keep search + filters as one anchored block */
body.page-schedule .schedule-tools-bar {
  justify-content: flex-end !important;
  align-items: flex-end !important;
  gap: 10px !important;
  margin: 2px 0 8px !important;
}

body.page-schedule .schedule-tools-bar__left {
  order: 2;
  flex: 0 0 auto;
}

body.page-schedule .schedule-tools-search {
  order: 1;
  width: min(560px, 100%) !important;
}

@media (max-width: 1024px) {
  body.page-schedule .schedule-tools-bar {
    justify-content: stretch !important;
    align-items: stretch !important;
    flex-wrap: wrap;
  }

  body.page-schedule .schedule-tools-search {
    width: 100% !important;
  }
}

body.page-schedule .schedule-tools-search-in-modal {
  width: 100% !important;
  margin: 0 0 10px;
}

body.page-schedule .schedule-tools-search-in-modal .reservation-global-search-results {
  position: static;
  margin-top: 6px;
  max-height: min(34vh, 300px);
  z-index: 12;
}

/* Filters modal: compact, structured layout + actions bottom-right */
body.page-schedule .schedule-filters-in-modal {
  max-width: 980px;
  margin: 0 auto;
}

body.page-schedule .schedule-filters-in-modal .schedule-filters-row {
  display: grid;
  gap: 10px;
}

body.page-schedule .schedule-filters-in-modal .schedule-filters-row-core {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

body.page-schedule .schedule-filters-in-modal .schedule-filters-row-business {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

body.page-schedule .schedule-filters-in-modal .field {
  min-width: 0;
}

body.page-schedule .schedule-filters-in-modal .schedule-filters-actions-bottom {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

body.page-schedule .schedule-filters-in-modal .schedule-filters-actions-bottom .btn-secondary,
body.page-schedule .schedule-filters-in-modal .schedule-filters-actions-bottom .btn-primary {
  min-width: 132px;
}

@media (max-width: 1100px) {
  body.page-schedule .schedule-filters-in-modal .schedule-filters-row-core,
  body.page-schedule .schedule-filters-in-modal .schedule-filters-row-business {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  body.page-schedule .schedule-filters-in-modal .schedule-filters-row-core,
  body.page-schedule .schedule-filters-in-modal .schedule-filters-row-business {
    grid-template-columns: 1fr;
  }

  body.page-schedule .schedule-filters-in-modal .schedule-filters-actions-bottom {
    justify-content: stretch;
  }

  body.page-schedule .schedule-filters-in-modal .schedule-filters-actions-bottom .btn-secondary,
  body.page-schedule .schedule-filters-in-modal .schedule-filters-actions-bottom .btn-primary {
    flex: 1 1 auto;
  }
}

/* Schedule visibility at bottom: more scroll space + smaller footer panel */
body.page-schedule .main {
  padding-bottom: 230px !important;
}

body.page-schedule .app-shell > .main > .page-footer.modern-footer {
  padding: 10px 14px !important;
  border-radius: 12px !important;
  gap: 10px !important;
  bottom: 10px !important;
}

body.page-schedule .app-shell > .main > .page-footer.modern-footer .footer-brand {
  font-size: 12px !important;
}

body.page-schedule .app-shell > .main > .page-footer.modern-footer .footer-note,
body.page-schedule .app-shell > .main > .page-footer.modern-footer .footer-meta {
  font-size: 11px !important;
  margin-top: 4px !important;
}

body.page-schedule .app-shell > .main > .page-footer.modern-footer .footer-chip {
  font-size: 10px !important;
  padding: 4px 9px !important;
}

@media (max-width: 900px) {
  body.page-schedule .main {
    padding-bottom: 16px !important;
    zoom: 1 !important;
    min-width: 0;
    overflow-x: clip;
  }

  body.page-schedule.has-mobile-shell .app-shell > .main {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0)) !important;
  }
}

/* Sidebar should always reach screen bottom on schedule page */
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 {
  position: sticky !important;
  top: 0 !important;
  min-height: 100vh !important;
  height: 100vh !important;
  border-radius: 0 22px 0 0 !important;
}

/* Schedule tools: 2-line layout (search on top, filters button below) */
body.page-schedule .schedule-tools-bar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  margin: 2px 0 10px !important;
  align-items: stretch !important;
}

body.page-schedule .schedule-tools-search {
  width: min(720px, 100%) !important;
  justify-self: end !important;
}

body.page-schedule .schedule-tools-bar__left {
  justify-self: end !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.page-schedule .schedule-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,.9);
}

body.page-schedule .schedule-online-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
  color: #166534;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,.9);
  cursor: pointer;
}

body.page-schedule .schedule-online-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.16), 0 0 18px rgba(34, 197, 94, 0.32);
}

body.page-schedule .schedule-tools-bar__left {
  position: relative;
  z-index: 3900;
}

body.page-schedule .schedule-tools-bar {
  position: relative;
  z-index: 3890;
  overflow: visible !important;
}

body.page-schedule .schedule-online-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 360px;
  max-width: 460px;
  max-height: 420px;
  overflow: auto;
  z-index: 3800;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.2);
  padding: 10px;
}

body.page-schedule .schedule-online-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #0f172a;
}

body.page-schedule .schedule-online-panel__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.page-schedule .schedule-online-panel__item {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px 10px;
}

body.page-schedule .schedule-online-panel__user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

body.page-schedule .schedule-online-panel__avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #e2e8f0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

body.page-schedule .schedule-online-panel__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.page-schedule .schedule-online-panel__avatar--fallback {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  color: #1e3a8a;
}

body.page-schedule .schedule-online-panel__name {
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0;
}

body.page-schedule .schedule-online-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

body.page-schedule .schedule-online-panel__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
}

body.page-schedule .schedule-online-panel__chip.is-editing {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

body.page-schedule .schedule-online-panel__seen,
body.page-schedule .schedule-online-panel__empty {
  font-size: 12px;
  color: #64748b;
}

body.page-schedule #slot-modal .slot-last-edit {
  margin: 6px 0 0;
  font-size: 12px;
  color: #334155;
  font-weight: 700;
}

body.page-schedule #slot-modal .slot-modal-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.page-schedule #slot-modal .slot-edit-presence-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
  cursor: help;
}

body.page-schedule #slot-modal .slot-edit-presence .slot-edit-presence__takeover {
  border: 1px solid #fca5a5;
  background: #fff1f2;
  color: #b91c1c;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  cursor: pointer;
}

body.page-schedule #slot-modal .slot-edit-presence .slot-edit-presence__takeover:hover {
  background: #ffe4e6;
}

body[data-theme="dark"].page-schedule .schedule-online-status {
  background: linear-gradient(180deg, #0f1f17, #0f172a);
  border-color: #1f5135;
  color: #bbf7d0;
}

body[data-theme="dark"].page-schedule .schedule-online-panel {
  background: #0f172a;
  border-color: #334155;
}

body[data-theme="dark"].page-schedule .schedule-online-panel__head,
body[data-theme="dark"].page-schedule .schedule-online-panel__name {
  color: #e2e8f0;
}

body[data-theme="dark"].page-schedule .schedule-online-panel__item {
  background: #111827;
  border-color: #334155;
}

body[data-theme="dark"].page-schedule .schedule-online-panel__avatar {
  border-color: rgba(148, 163, 184, 0.45);
  background: #334155;
}

body[data-theme="dark"].page-schedule .schedule-online-panel__avatar--fallback {
  color: #dbeafe;
}

body[data-theme="dark"].page-schedule .schedule-online-panel__seen,
body[data-theme="dark"].page-schedule .schedule-online-panel__empty,
body[data-theme="dark"].page-schedule #slot-modal .slot-last-edit {
  color: #94a3b8;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-edit-presence-dot {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.22);
}

body.page-schedule #slot-modal .slot-edit-presence {
  margin: 6px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #7f1d1d;
  background: linear-gradient(180deg, #fff1f2, #ffffff);
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 5px 10px;
}

body.page-schedule #slot-modal .slot-edit-presence .slot-edit-presence__text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.page-schedule #slot-modal .slot-edit-presence .slot-edit-presence__text strong {
  font-weight: 800;
}

body.page-schedule #slot-modal .slot-edit-presence .slot-edit-presence__names {
  font-weight: 700;
}

body.page-schedule #slot-modal .slot-edit-presence::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-edit-presence {
  background: linear-gradient(180deg, #2b1116, #111827);
  border-color: #7f1d1d;
  color: #fecaca;
}

body.page-schedule .schedule-live-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.16);
}

body.page-schedule .schedule-live-status.is-connected,
body.page-schedule .schedule-live-status.is-update {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
  color: #166534;
}

body.page-schedule .schedule-live-status.is-connected .schedule-live-status__dot,
body.page-schedule .schedule-live-status.is-update .schedule-live-status__dot {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.16), 0 0 18px rgba(34, 197, 94, 0.35);
}

body.page-schedule .schedule-live-status.is-connecting,
body.page-schedule .schedule-live-status.is-reconnecting,
body.page-schedule .schedule-live-status.is-unknown {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb, #ffffff);
  color: #92400e;
}

body.page-schedule .schedule-live-status.is-connecting .schedule-live-status__dot,
body.page-schedule .schedule-live-status.is-reconnecting .schedule-live-status__dot,
body.page-schedule .schedule-live-status.is-unknown .schedule-live-status__dot {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.18);
  animation: pendingPulseDot 1.4s ease-in-out infinite;
}

body.page-schedule .schedule-live-status.is-error,
body.page-schedule .schedule-live-status.is-offline,
body.page-schedule .schedule-live-status.is-disabled,
body.page-schedule .schedule-live-status.is-unsupported {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff1f2, #ffffff);
  color: #991b1b;
}

body.page-schedule .schedule-live-status.is-error .schedule-live-status__dot,
body.page-schedule .schedule-live-status.is-offline .schedule-live-status__dot,
body.page-schedule .schedule-live-status.is-disabled .schedule-live-status__dot,
body.page-schedule .schedule-live-status.is-unsupported .schedule-live-status__dot {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.16);
}

body[data-theme="dark"].page-schedule .schedule-live-status {
  background: linear-gradient(180deg, #111827, #0f172a);
  border-color: #334155;
  color: #e5e7eb;
}

@media (max-width: 1024px) {
  body.page-schedule .schedule-tools-search {
    width: 100% !important;
    justify-self: stretch !important;
  }

  body.page-schedule .schedule-tools-bar__left {
    justify-self: stretch !important;
  }
}

/* Sidebar fix: full-height + accessible bottom options (internal scroll) */
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 {
  display: flex !important;
  flex-direction: column !important;
  position: sticky !important;
  top: 0 !important;
  min-height: 100vh !important;
  height: 100vh !important;
  overflow: hidden !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__top {
  flex: 0 0 auto !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
}

/* Filters modal: force 2-line layout on desktop */
body.page-schedule .schedule-filters-in-modal .schedule-filters-row-business {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(170px, 1fr)) !important;
  gap: 10px !important;
  overflow: visible !important;
}

body.page-schedule .schedule-filters-in-modal .schedule-filters-row-business .field {
  min-width: 0 !important;
}

@media (max-width: 1200px) {
  body.page-schedule .schedule-filters-in-modal .schedule-filters-row-business {
    grid-template-columns: repeat(3, minmax(170px, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.page-schedule .schedule-filters-in-modal .schedule-filters-row-business {
    grid-template-columns: repeat(2, minmax(170px, 1fr)) !important;
  }
}

/* Slot reservation popup: compact inner layout */
#slot-modal .modal-card {
  padding: 10px !important;
}

#slot-modal .modal-header h3 {
  font-size: clamp(20px, 1.8vw, 24px) !important;
}

#slot-modal .modal-subtitle {
  font-size: 12px !important;
}

#slot-modal .slot-detail-tabs {
  min-height: 40px !important;
  padding: 3px !important;
}

#slot-modal .slot-detail-tab {
  min-height: 34px !important;
  font-size: 12px !important;
  padding: 0 10px !important;
}

#slot-modal .slot-detail-summary {
  gap: 6px 10px !important;
  padding: 10px !important;
  margin-bottom: 10px !important;
}

#slot-modal .slot-detail-summary > div {
  font-size: 12px !important;
}

#slot-modal .slot-detail-summary strong {
  font-size: 10px !important;
}

#slot-modal .detail-list {
  gap: 8px !important;
  margin-bottom: 10px !important;
}

#slot-modal .detail-item {
  padding: 8px 10px !important;
  border-radius: 10px !important;
}

#slot-modal .detail-item span {
  font-size: 10px !important;
}

#slot-modal .detail-item strong {
  font-size: 12px !important;
}

#slot-modal .slot-detail-top-actions,
#slot-modal .slot-detail-bottom-actions {
  gap: 6px !important;
  margin-bottom: 8px !important;
}

#slot-modal .slot-detail-bottom-actions .btn-secondary,
#slot-modal .slot-detail-bottom-actions .btn-primary,
#slot-modal .actions .btn-secondary,
#slot-modal .actions .btn-primary {
  min-height: 32px !important;
  font-size: 12px !important;
  padding: 0 10px !important;
}

/* Sidebar should scroll with page (no independent sidebar scroll) */
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 {
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

/* Legend status colors (do not force global red style here) */
body.page-schedule .legend .status-pill.free {
  color: #1d4ed8;
  background: rgba(219, 234, 254, .94);
  border-color: rgba(59, 130, 246, .34);
}

body.page-schedule .legend .status-pill.reserved {
  color: #9a3412;
  background: rgba(255, 237, 213, .94);
  border-color: rgba(251, 146, 60, .34);
}

body.page-schedule .legend .status-pill.in_progress {
  color: #92400e;
  background: rgba(254, 243, 199, .94);
  border-color: rgba(245, 158, 11, .34);
}

body.page-schedule .legend .status-pill.done {
  color: #166534;
  background: rgba(220, 252, 231, .94);
  border-color: rgba(34, 197, 94, .32);
}

body.page-schedule .legend .status-pill.departed {
  color: #1e40af;
  background: rgba(219, 234, 254, .95);
  border-color: rgba(59, 130, 246, .34);
}

body.page-schedule .legend .status-pill.blocked {
  color: #475569;
  background: rgba(241, 245, 249, .95);
  border-color: rgba(148, 163, 184, .34);
}

body[data-theme="dark"].page-schedule .legend .status-pill.free {
  color: #bfdbfe;
  background: rgba(30, 58, 138, .34);
  border-color: rgba(96, 165, 250, .28);
}

body[data-theme="dark"].page-schedule .legend .status-pill.reserved {
  color: #fed7aa;
  background: rgba(124, 45, 18, .34);
  border-color: rgba(251, 146, 60, .28);
}

body[data-theme="dark"].page-schedule .legend .status-pill.in_progress {
  color: #fde68a;
  background: rgba(120, 53, 15, .34);
  border-color: rgba(245, 158, 11, .28);
}

body[data-theme="dark"].page-schedule .legend .status-pill.done {
  color: #bbf7d0;
  background: rgba(20, 83, 45, .34);
  border-color: rgba(74, 222, 128, .26);
}

body[data-theme="dark"].page-schedule .legend .status-pill.departed {
  color: #bfdbfe;
  background: rgba(30, 58, 138, .34);
  border-color: rgba(96, 165, 250, .28);
}

body[data-theme="dark"].page-schedule .legend .status-pill.blocked {
  color: #cbd5e1;
  background: rgba(51, 65, 85, .34);
  border-color: rgba(148, 163, 184, .24);
}

/* Schedule global scale (slightly larger for readability) — desktop only */
@media (min-width: 901px) {
  body.page-schedule .main {
    zoom: 0.94;
  }
}

/* Schedule footer visibility fix: prevent clipping on the right edge */
body.page-schedule .app-shell > .main > .page-footer.modern-footer {
  left: calc(205px + 14px) !important;
  right: 14px !important;
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

body.page-schedule.sidebar-collapsed .app-shell > .main > .page-footer.modern-footer {
  left: calc(72px + 14px) !important;
}

@media (max-width: 900px) {
  body.page-schedule .app-shell > .main > .page-footer.modern-footer {
    left: 12px !important;
    right: 12px !important;
  }
}

/* Final stability fixes: global wallpaper + full-height sidebar */
body {
  background-image: var(--page-bg-image, none);
  background-size: var(--page-bg-size, cover);
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: var(--page-bg-attachment, fixed);
}

body::before {
  z-index: 0;
}

body > .app-shell {
  position: relative;
  z-index: 1;
}

.mobile-task-done-overlay {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 25%, rgba(34,197,94,.24), transparent 34%),
    rgba(15,23,42,.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  backdrop-filter: blur(10px);
}

.mobile-task-done-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-task-done-card {
  width: min(720px, calc(100vw - 34px));
  border-radius: 28px;
  padding: 34px;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(236,253,245,.96));
  border: 1px solid rgba(134,239,172,.72);
  box-shadow: 0 36px 90px rgba(2,6,23,.38);
  text-align: center;
  transform: translateY(12px) scale(.98);
  transition: transform .18s ease;
}

.mobile-task-done-overlay.is-visible .mobile-task-done-card {
  transform: translateY(0) scale(1);
}

.mobile-task-done-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mobile-task-done-card h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
}

.mobile-task-done-card p {
  margin: 14px auto 22px;
  max-width: 560px;
  color: #475569;
  font-size: 17px;
  line-height: 1.45;
}

body[data-theme="dark"] .mobile-task-done-card {
  color: #e5e7eb;
  background: linear-gradient(135deg, rgba(15,23,42,.98), rgba(6,78,59,.96));
  border-color: rgba(52,211,153,.64);
}

body[data-theme="dark"] .mobile-task-done-card p {
  color: #cbd5e1;
}

body.page-schedule .app-shell {
  min-height: 100vh !important;
  align-items: stretch !important;
  overflow: visible !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  min-height: 100vh !important;
  height: 100% !important;
}

/* Sidebar visual fix (schedule): keep full white column to the very bottom */
body.page-schedule .app-shell {
  align-items: stretch !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 {
  background: #ffffff !important;
  border-right: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.18) !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__top,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  background: transparent !important;
}

/* Sidebar readability hard-fix (final override) */
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category {
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block h2,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .warehouse-name,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-name,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  color: #111827 !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category-title,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-role,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-email,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block > div > span,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .warehouse-label {
  color: #334155 !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  background: #eaf2ff !important;
  border: 1px solid rgba(59, 130, 246, 0.22) !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link:hover,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link:hover {
  background: #dbeafe !important;
  border-color: rgba(37, 99, 235, 0.30) !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link.active,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown[open] > summary.nav-link {
  background: #ffffff !important;
  border-color: rgba(239, 68, 68, 0.40) !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.14) inset !important;
}

body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 {
  background: #0b1220 !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category {
  background: #111a2e !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
}

body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block h2,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .warehouse-name,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-name,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  color: #f8fafc !important;
}

body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category-title,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-role,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-email,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block > div > span,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .warehouse-label {
  color: #cbd5e1 !important;
}

body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  background: #1a2742 !important;
  border: 1px solid rgba(96, 165, 250, 0.26) !important;
}

body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link:hover,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link:hover {
  background: #1f3157 !important;
}

body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link.active,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown[open] > summary.nav-link {
  background: #172036 !important;
  border-color: rgba(248, 113, 113, 0.44) !important;
}

/* Extra hard fix: keep schedule slots clickable above any decorative layers */
body.page-schedule .day-block,
body.page-schedule .group-card,
body.page-schedule .group-body,
body.page-schedule .timeline,
body.page-schedule .timeline-row,
body.page-schedule .slot-wrapper,
body.page-schedule .slot-wrapper .slot {
  position: relative !important;
  z-index: 8 !important;
  pointer-events: auto !important;
}

body.page-schedule .slot-wrapper {
  cursor: pointer !important;
}

/* Final UX fix: wider sidebar + no internal sidebar scrollbar */
body.page-schedule .app-shell {
  grid-template-columns: 246px minmax(0, 1fr) !important;
}

body.page-schedule.sidebar-collapsed .app-shell {
  grid-template-columns: 82px minmax(0, 1fr) !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  overflow: visible !important;
  max-height: none !important;
  min-height: 0 !important;
  padding-right: 0 !important;
}

/* Schedule hard layout fix: keep sidebar and main in separate columns */
body.page-schedule .app-shell {
  display: grid !important;
  grid-template-columns: 205px minmax(0, 1fr) !important;
  column-gap: 12px !important;
  align-items: start !important;
}

body.page-schedule.sidebar-collapsed .app-shell {
  grid-template-columns: 72px minmax(0, 1fr) !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  grid-column: 1 !important;
  position: relative !important;
  top: auto !important;
  z-index: 120 !important;
}

body.page-schedule .app-shell > .main {
  grid-column: 2 !important;
  min-width: 0 !important;
  position: relative !important;
  z-index: 6 !important;
}

/* Ensure slot grid remains clickable even after heavy style overrides */
body.page-schedule #schedule-root,
body.page-schedule .day-block,
body.page-schedule .group-card,
body.page-schedule .timeline,
body.page-schedule .timeline-row,
body.page-schedule .slot,
body.page-schedule .slot-action {
  position: relative !important;
  pointer-events: auto !important;
}

/* ===== FINAL HOTFIX 2026-03-19 v2: sidebar like ramp queue (no inner scroll) ===== */
body.page-schedule .app-shell {
  display: grid !important;
  grid-template-columns: 228px minmax(0, 1fr) !important;
  column-gap: 12px !important;
  min-height: 100vh !important;
  align-items: start !important;
}

body.page-schedule.sidebar-collapsed .app-shell {
  grid-template-columns: 76px minmax(0, 1fr) !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  grid-column: 1 !important;
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
  background: #ffffff !important;
  border-right: 1px solid rgba(15, 23, 42, 0.12) !important;
  z-index: 5 !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__top {
  display: block !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  padding-right: 0 !important;
}

body.page-schedule .app-shell > .main {
  grid-column: 2 !important;
  min-width: 0 !important;
  z-index: 6 !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  font-size: 14px !important;
  line-height: 1.2 !important;
  color: #111827 !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  font-size: 12px !important;
  line-height: 1.25 !important;
  color: #111827 !important;
}

body[data-theme="dark"].page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  background: #0b1220 !important;
  border-right-color: rgba(148, 163, 184, 0.24) !important;
}

/* ===== AUTHORITATIVE LAYOUT LOCK (2026-03-19) =====
   One final source of truth for page-schedule shell spacing + sidebar behavior.
   Keeps page scroll on document (no nested sidebar scrollbar) and removes gap drift. */
body.page-schedule .app-shell {
  display: grid !important;
  grid-template-columns: 262px minmax(0, 1fr) !important;
  column-gap: 4px !important;
  align-items: stretch !important;
  min-height: 100vh !important;
}

body.page-schedule.sidebar-collapsed .app-shell {
  grid-template-columns: 82px minmax(0, 1fr) !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  width: 262px !important;
  min-width: 262px !important;
  max-width: 262px !important;
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 100% !important;
  align-self: stretch !important;
  overflow: visible !important;
  background: #ffffff !important;
}

body.page-schedule.sidebar-collapsed .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  padding-right: 0 !important;
}

body.page-schedule .app-shell > .main {
  min-width: 0 !important;
  margin-left: 0 !important;
}

body.page-schedule .main {
  zoom: 1 !important;
}

.handling-people-select {
  min-height: 44px;
}

.handling-people-select option[disabled] {
  color: var(--muted-strong, #64748b);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.handling-people-select option[value="__driver__"] {
  font-weight: 600;
}

.handling-people-manual {
  margin-top: 8px;
}

.handling-people-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted-strong, #475569);
}

.handling-people-preview__label {
  font-weight: 700;
}

.handling-people-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.handling-people-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(219, 234, 254, 0.78);
  color: #1e3a8a;
  max-width: 100%;
}

.handling-people-pill__text {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.handling-people-pill__remove {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(239, 68, 68, 0.36);
  border-radius: 999px;
  background: rgba(254, 226, 226, 0.9);
  color: #b91c1c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.handling-people-pill__remove:hover {
  background: rgba(254, 202, 202, 0.96);
  border-color: rgba(220, 38, 38, 0.46);
}

body[data-theme="dark"] .handling-people-pill {
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(30, 58, 138, 0.34);
  color: #bfdbfe;
}

body[data-theme="dark"] .handling-people-pill__remove {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.42);
  color: #fecaca;
}

.shuttle-people-sync-bar {
  display: block;
  margin: 2px 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.shuttle-people-sync-bar.slot-detail-inline-field--full {
  padding: 0;
  border: 0;
  background: transparent;
}

.shuttle-people-sync-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
}

.shuttle-people-sync-bar.is-sync-active .shuttle-people-sync-card {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  box-shadow: inset 3px 0 0 #3b82f6;
}

.shuttle-people-sync-bar .shuttle-same-people-toggle {
  grid-column: 1;
  min-width: 0;
}

.shuttle-people-sync-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  grid-column: 2;
  grid-row: 1;
}

.shuttle-people-sync-bar.is-sync-active .shuttle-copy-people-btn {
  display: none;
}

.shuttle-copy-people-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 9px;
  flex-shrink: 0;
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.shuttle-copy-people-btn:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #1e293b;
}

.shuttle-copy-people-btn.is-copied {
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(220, 252, 231, 0.9);
  color: #166534;
}

.shuttle-copy-people-btn__ok {
  font-weight: 700;
}

.shuttle-copy-people-btn svg {
  flex-shrink: 0;
}

body[data-theme="dark"] .shuttle-copy-people-btn {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(96, 165, 250, 0.3);
  color: #bfdbfe;
}

body[data-theme="dark"] .shuttle-copy-people-btn:hover {
  background: rgba(30, 58, 138, 0.5);
  border-color: rgba(96, 165, 250, 0.6);
  color: #dbeafe;
}

body[data-theme="dark"] .shuttle-copy-people-btn.is-copied {
  background: rgba(20, 83, 45, 0.45);
  border-color: rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
}

.shuttle-same-people-toggle {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.shuttle-toggle-switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 26px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.shuttle-toggle-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.shuttle-toggle-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.shuttle-toggle-switch__slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  transition: transform 0.2s ease;
}

.shuttle-toggle-switch input:checked + .shuttle-toggle-switch__slider {
  background: #2563eb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.shuttle-toggle-switch input:checked + .shuttle-toggle-switch__slider::after {
  transform: translateX(18px);
}

.shuttle-toggle-switch input:focus-visible + .shuttle-toggle-switch__slider {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.shuttle-same-people-toggle__copy strong,
.shuttle-same-people-toggle strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.shuttle-same-people-toggle__copy small,
.shuttle-same-people-toggle small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

.form-card-field.is-shuttle-people-synced,
.slot-detail-inline-field.is-shuttle-people-synced {
  border-color: #93c5fd;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.72) 0%, rgba(248, 250, 252, 0.95) 100%);
  box-shadow: inset 3px 0 0 #3b82f6;
}

.slot-detail-inline-field.is-shuttle-people-synced > span:first-child::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  vertical-align: 1px;
}

.form-card-field.is-shuttle-people-synced .handling-people-select,
.slot-detail-inline-field.is-shuttle-people-synced select {
  border-color: #93c5fd;
}

body.page-schedule #slot-modal .slot-detail-inline-grid > .slot-detail-inline-field {
  align-self: start;
}

@media (max-width: 720px) {
  .shuttle-people-sync-card {
    grid-template-columns: 1fr;
  }

  .shuttle-people-sync-actions {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }
}

body[data-theme="dark"] .shuttle-people-sync-card {
  border-color: rgba(71, 85, 105, 0.65);
  background: rgba(15, 23, 42, 0.72);
}

body[data-theme="dark"] .shuttle-people-sync-bar.is-sync-active .shuttle-people-sync-card {
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.28) 0%, rgba(15, 23, 42, 0.82) 100%);
  box-shadow: inset 3px 0 0 #60a5fa;
}

body[data-theme="dark"] .shuttle-same-people-toggle__copy strong,
body[data-theme="dark"] .shuttle-same-people-toggle strong {
  color: #e2e8f0;
}

body[data-theme="dark"] .shuttle-same-people-toggle__copy small,
body[data-theme="dark"] .shuttle-same-people-toggle small {
  color: #94a3b8;
}

body[data-theme="dark"] .shuttle-toggle-switch__slider {
  background: #475569;
}

body[data-theme="dark"] .shuttle-toggle-switch input:checked + .shuttle-toggle-switch__slider {
  background: #3b82f6;
}

body[data-theme="dark"] .form-card-field.is-shuttle-people-synced,
body[data-theme="dark"] .slot-detail-inline-field.is-shuttle-people-synced {
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.22) 0%, rgba(15, 23, 42, 0.78) 100%);
  box-shadow: inset 3px 0 0 #60a5fa;
}

body[data-theme="dark"].page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  background: #0b1220 !important;
}

/* ===== GLOBAL FINAL: sidebar from index on all pages + tighter index gap ===== */
body:not(.popup) .app-shell {
  grid-template-columns: 262px minmax(0, 1fr) !important;
  column-gap: 6px !important;
  align-items: stretch !important;
  min-height: 100vh !important;
}

body:not(.popup).sidebar-collapsed .app-shell {
  grid-template-columns: 82px minmax(0, 1fr) !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 {
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 100% !important;
  overflow: visible !important;
  z-index: 5 !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  padding-right: 0 !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 30px !important;
  padding: 5px 8px !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

/* index/schedule: bring main content visually closer to sidebar */
body.page-schedule .app-shell {
  column-gap: 2px !important;
}

/* ===== SUPER FINAL v2: no zoom scaling + no stretched sidebar buttons ===== */
body.page-schedule .main {
  zoom: 1 !important;
}

body.page-schedule .app-shell {
  column-gap: 4px !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  display: block !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category {
  margin-bottom: 10px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category:last-child {
  margin-bottom: 0 !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  flex: 0 0 auto !important;
  line-height: 1.15 !important;
}

body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category-title,
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  color: #f1f5f9 !important;
}

/* ===== SUPER FINAL: schedule sidebar proportions + full-height column ===== */
body.page-schedule .app-shell {
  display: grid !important;
  grid-template-columns: 262px minmax(0, 1fr) !important;
  column-gap: 12px !important;
  align-items: stretch !important;
  min-height: 100vh !important;
}

body.page-schedule.sidebar-collapsed .app-shell {
  grid-template-columns: 82px minmax(0, 1fr) !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  grid-column: 1 !important;
  position: relative !important;
  top: auto !important;
  align-self: stretch !important;
  height: auto !important;
  min-height: 100% !important;
  overflow: visible !important;
  background: #ffffff !important;
  border-right: 1px solid rgba(15, 23, 42, 0.12) !important;
  z-index: 5 !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  padding-right: 0 !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .brand-block,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category {
  border-radius: 12px !important;
  padding: 8px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  font-size: 12px !important;
  line-height: 1.2 !important;
  padding: 4px 6px 7px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 9px !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .menu-icon {
  width: 14px !important;
  height: 14px !important;
}

body[data-theme="dark"].page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  background: #0b1220 !important;
  border-right-color: rgba(148, 163, 184, 0.24) !important;
}

/* ===== AUTHORITATIVE LAYOUT LOCK (2026-03-19) =====
   One final source of truth for page-schedule shell spacing + sidebar behavior.
   Keeps page scroll on document (no nested sidebar scrollbar) and removes gap drift. */
body.page-schedule .app-shell {
  display: grid !important;
  grid-template-columns: 262px minmax(0, 1fr) !important;
  column-gap: 4px !important;
  align-items: stretch !important;
  min-height: 100vh !important;
}

body.page-schedule.sidebar-collapsed .app-shell {
  grid-template-columns: 82px minmax(0, 1fr) !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  width: 262px !important;
  min-width: 262px !important;
  max-width: 262px !important;
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 100% !important;
  align-self: stretch !important;
  overflow: visible !important;
  background: #ffffff !important;
}

body.page-schedule.sidebar-collapsed .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  padding-right: 0 !important;
}

body.page-schedule .app-shell > .main {
  min-width: 0 !important;
  margin-left: 0 !important;
}

body.page-schedule .main {
  zoom: 1 !important;
}

body[data-theme="dark"].page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  background: #0b1220 !important;
}

/* ===== GLOBAL SHELL LOCK (2026-03-19b) =====
   Fix: widen MAIN content globally (not sidebar-only), consistent on all pages. */
body:not(.popup) .app-shell {
  display: grid !important;
  grid-template-columns: 262px minmax(0, 1fr) !important;
  column-gap: 4px !important;
  align-items: stretch !important;
  min-height: 100vh !important;
}

body:not(.popup).sidebar-collapsed .app-shell {
  grid-template-columns: 82px minmax(0, 1fr) !important;
}

body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  width: 262px !important;
  min-width: 262px !important;
  max-width: 262px !important;
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 100% !important;
  align-self: stretch !important;
  overflow: visible !important;
  background: #ffffff !important;
  border-right: 1px solid rgba(15, 23, 42, 0.12) !important;
  z-index: 120 !important;
}

/* Collapsed sidebar tooltips must render above schedule/main content layers. */
body.sidebar-collapsed .sidebar .nav-link[data-tooltip]::after,
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link[data-tooltip]::after {
  z-index: 1300 !important;
}

body.sidebar-collapsed .sidebar .nav-link[data-tooltip]::before,
body.sidebar-collapsed .sidebar .nav-dropdown > summary.nav-link[data-tooltip]::before {
  z-index: 1299 !important;
}

body:not(.popup).sidebar-collapsed .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
}

body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  padding-right: 0 !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .brand-block,
body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card,
body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .warehouse-block,
body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-category {
  border-radius: 12px !important;
  padding: 8px !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-category {
  margin-bottom: 10px !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-category:last-child {
  margin-bottom: 0 !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  font-size: 12px !important;
  line-height: 1.2 !important;
  padding: 4px 6px 7px !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 9px !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .menu-icon {
  width: 14px !important;
  height: 14px !important;
}

body:not(.popup) .app-shell > .main {
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
}

body[data-theme="dark"]:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  background: #0b1220 !important;
  border-right-color: rgba(148, 163, 184, 0.24) !important;
}

body.page-schedule .main {
  zoom: 1 !important;
}

/* ===== Schedule slot layout hard-fix (no overlap) ===== */
body.page-schedule .slot-wrapper {
  overflow: hidden !important;
}

body.page-schedule .slot {
  box-sizing: border-box !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  min-height: 88px !important;
  height: auto !important;
  overflow: hidden !important;
}

body.page-schedule .slot.free {
  min-height: 54px !important;
}

body.page-schedule .slot.reserved,
body.page-schedule .slot.in_progress,
body.page-schedule .slot.done,
body.page-schedule .slot.departed,
body.page-schedule .slot-wrapper.slot-span .slot.reserved,
body.page-schedule .slot-wrapper.slot-span .slot.in_progress,
body.page-schedule .slot-wrapper.slot-span .slot.done,
body.page-schedule .slot-wrapper.slot-span .slot.departed {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

body.page-schedule .slot-card-content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body.page-schedule .slot-card-bottom-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

body.page-schedule .slot-card-bottom-row .slot-meta--ramp {
  margin: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  flex: 1 1 220px;
  min-width: 0;
}

body.page-schedule .slot-card-bottom-row .steps {
  margin-left: auto;
  flex-shrink: 0;
}

body.page-schedule .slot-reservation-code--inline {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
}

body.page-schedule .slot-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}

body.page-schedule .slot-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  max-width: 100%;
}

@media (max-width: 860px) {
  body.page-schedule .slot-card-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  body.page-schedule .slot-card-bottom-row .steps {
    margin-left: 0;
  }
}

body.page-schedule .slot-incident-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #334155;
  background: rgba(226, 232, 240, 0.72);
}

body.page-schedule .slot-incident-chip.is-open {
  color: #9f1239;
  border-color: rgba(244, 63, 94, 0.36);
  background: rgba(255, 228, 230, 0.9);
}

body.page-schedule .slot-incident-chip.is-closed {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.36);
  background: rgba(220, 252, 231, 0.86);
}

body[data-theme="dark"].page-schedule .slot-incident-chip {
  color: #cbd5e1;
  border-color: rgba(100, 116, 139, 0.45);
  background: rgba(30, 41, 59, 0.78);
}

body[data-theme="dark"].page-schedule .slot-incident-chip.is-open {
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.38);
  background: rgba(127, 29, 29, 0.35);
}

body[data-theme="dark"].page-schedule .slot-incident-chip.is-closed {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(20, 83, 45, 0.36);
}

body.page-schedule .slot-label,
body.page-schedule .slot-reservation-code,
body.page-schedule .slot-reservation-code--secondary,
body.page-schedule .slot-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 900px) {
  body.page-schedule .slot {
    min-height: 62px !important;
  }
}

/* ===== Schedule mini-slot mode ===== */
body.page-schedule .schedule-mode-minislots .slot {
  min-height: 48px !important;
  padding: 5px 7px !important;
  border-radius: 12px !important;
  overflow: visible !important;
}

body.page-schedule .schedule-mode-minislots .slot-wrapper {
  overflow: visible !important;
}

body.page-schedule .schedule-mode-minislots .timeline-row {
  min-height: 52px;
}

body.page-schedule .schedule-mode-minislots .timeline {
  overflow-x: auto !important;
}

body.page-schedule .schedule-mode-minislots .timeline-header,
body.page-schedule .schedule-mode-minislots .timeline-row,
body.page-schedule .schedule-mode-minislots .summary-row {
  grid-template-columns: repeat(24, minmax(76px, 1fr)) !important;
}

body.page-schedule .schedule-mode-minislots .group-body {
  grid-template-columns: 140px minmax(0, 1fr) !important;
}

body.page-schedule .schedule-mode-minislots .timeline-header,
body.page-schedule .schedule-mode-minislots .timeline-row,
body.page-schedule .schedule-mode-minislots .summary-row {
  gap: 2px !important;
}

body.page-schedule .schedule-mode-minislots .hour-cell {
  font-size: 12px !important;
  padding: 6px 0 !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  color: #111111 !important;
}

body.page-schedule .schedule-mode-minislots .line-item {
  min-height: 24px !important;
  padding: 3px 6px !important;
  font-size: 10px !important;
  line-height: 1.08 !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot.has-incidents {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45), 0 0 0 4px rgba(244, 63, 94, 0.22);
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-time {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  opacity: 0.86;
  line-height: 1.35;
  display: inline-block;
  padding-top: 1px;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-code {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1.12;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info strong,
body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info strong {
  color: #0f172a;
  font-size: 10.5px;
  font-weight: 850;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info small {
  color: #475569;
  font-size: 9px;
  font-weight: 700;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-incident-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: #9f1239;
  border: 1px solid rgba(244, 63, 94, 0.38);
  background: rgba(255, 228, 230, 0.94);
}

body[data-theme="dark"].page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-incident-badge {
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.42);
  background: rgba(127, 29, 29, 0.48);
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--free {
  background: #0ea5e9;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--reserved {
  background: #ef4444;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--in_progress {
  background: #f59e0b;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--done {
  background: #22c55e;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--blocked {
  background: #64748b;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--occupied {
  background: #4f46e5;
}

/* ===== Modern date picker (schedule filters) ===== */
body.page-schedule .schedule-filters .date-control {
  align-items: center;
  gap: 8px;
}

body.page-schedule .schedule-filters .date-modern-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-soft) 80%, #ffffff 20%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 6px 16px rgba(15, 23, 42, 0.06);
}

body.page-schedule .schedule-filters .date-modern-field__icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  color: var(--muted);
  opacity: 0.9;
}

body.page-schedule .schedule-filters .date-modern-field__icon svg,
body.page-schedule .schedule-filters .date-picker-btn svg {
  width: 16px;
  height: 16px;
}

body.page-schedule .schedule-filters .date-modern-field #schedule-date {
  border: 0 !important;
  background: transparent !important;
  min-height: 38px;
  padding: 0 4px !important;
  box-shadow: none !important;
}

body.page-schedule .schedule-filters .date-picker-btn {
  min-width: 30px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, #1d4ed8 24%);
  background: color-mix(in srgb, var(--panel-soft) 90%, #ffffff 10%);
  color: #1d4ed8;
  padding: 0;
}

body.page-schedule .schedule-filters .date-picker-btn:hover {
  border-color: rgba(59, 130, 246, 0.46);
  background: rgba(59, 130, 246, 0.1);
}

body[data-theme="dark"].page-schedule .schedule-filters .date-modern-field {
  border-color: rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(17, 24, 39, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 20px rgba(2, 6, 23, 0.24);
}

body[data-theme="dark"].page-schedule .schedule-filters .date-picker-btn {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(30, 58, 138, 0.28);
  color: #bfdbfe;
}

/* ===== SLOT MODAL V2 (clean rebuild) ===== */
body.page-schedule #slot-modal .modal-card.wide.slot-modern {
  width: min(1520px, calc(100vw - 24px)) !important;
  max-width: 1520px !important;
  padding: 0 !important;
  border-radius: 20px !important;
  border: 1px solid #c9d7ea !important;
  background:
    radial-gradient(900px 260px at 12% -18%, rgba(37, 99, 235, .12), transparent 60%),
    radial-gradient(760px 220px at 96% 6%, rgba(16, 185, 129, .10), transparent 54%),
    linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%) !important;
  box-shadow: 0 28px 72px rgba(15, 23, 42, .22) !important;
  overflow: hidden;
  font-family: "Manrope", "Nunito Sans", "Segoe UI", sans-serif;
}

body.page-schedule #slot-modal .modal-header {
  margin: 0 !important;
  padding: 16px 18px 14px !important;
  border-bottom: 1px solid #d9e5f6 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(247, 251, 255, .78)) !important;
}

body.page-schedule #slot-modal .modal-header h3 {
  font-size: 36px !important;
  line-height: 1.1 !important;
  letter-spacing: -.03em;
  color: #111827;
  margin: 0;
}

body.page-schedule #slot-modal .modal-subtitle {
  margin-top: 6px;
  font-size: 14px !important;
  color: #64748b;
}

body.page-schedule #slot-modal .modal-header-actions {
  gap: 10px;
}

body.page-schedule #slot-modal .modal-header-action-btn {
  min-height: 38px !important;
  border-radius: 12px !important;
  border: 1px solid #f0b4ba !important;
  background: #fff7f8 !important;
  color: #be123c !important;
  font-weight: 700;
}

body.page-schedule #slot-modal .modal-copy-link,
body.page-schedule #slot-modal .modal-close {
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  border: 1px solid #d5deec;
  background: #f8fbff;
  color: #334155;
}

body.page-schedule #slot-modal .slot-details-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(380px, .9fr);
  gap: 14px !important;
  padding: 14px !important;
}

body.page-schedule #slot-modal .slot-details-main,
body.page-schedule #slot-modal .slot-details-aside {
  border: 1px solid #cfdbec;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7faff, #eef4ff);
  box-shadow: 0 12px 22px rgba(30, 58, 138, .08);
  padding: 12px;
}

body.page-schedule #slot-modal .slot-details-aside {
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 34%),
    radial-gradient(circle at 15% 85%, rgba(16,185,129,.08), transparent 28%),
    linear-gradient(180deg, rgba(249,252,255,.98), rgba(238,245,255,.98));
  border-color: #d6e3f5;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 18px 30px rgba(37, 99, 235, .08);
}

/* Extra-compact vertical layout for right details panel */
body.page-schedule #slot-modal .slot-details-aside .slot-aside-shell {
  gap: 10px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero,
body.page-schedule #slot-modal .slot-details-aside .slot-aside-section {
  border-radius: 16px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero {
  padding: 12px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero__top {
  gap: 7px;
  margin-bottom: 10px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero__badge {
  gap: 5px;
  padding: 9px 10px;
  border-radius: 12px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero__badge--stage {
  background: rgba(255,255,255,.84) !important;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero__code-label {
  margin-bottom: 3px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero__code {
  font-size: 20px;
  line-height: 1.05;
  margin-bottom: 10px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero__chips {
  gap: 6px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-chip {
  min-height: 26px;
  padding: 0 9px;
  font-size: 12px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-section {
  padding: 10px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-section__head {
  margin-bottom: 7px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-kpis {
  gap: 7px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-kpi,
body.page-schedule #slot-modal .slot-details-aside .slot-aside-list__row {
  gap: 5px;
  padding: 9px 10px;
  border-radius: 12px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-kpi__label,
body.page-schedule #slot-modal .slot-details-aside .slot-aside-list__label,
body.page-schedule #slot-modal .slot-details-aside .slot-aside-section__eyebrow,
body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero__label,
body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero__code-label {
  font-size: 10px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-kpi__value {
  font-size: 15px;
  line-height: 1.15;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-list {
  gap: 7px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-list__value {
  font-size: 13px;
  line-height: 1.25;
}

body.page-schedule #slot-modal .slot-details-aside .slot-aside-hero__value .status-pill,
body.page-schedule #slot-modal .slot-details-aside .slot-aside-kpi .status-pill,
body.page-schedule #slot-modal .slot-details-aside .slot-aside-list__row .status-pill {
  min-height: 26px;
  padding: 0 11px;
  font-size: 12px;
}

body.page-schedule #slot-modal .slot-detail-tabs {
  display: inline-flex;
  gap: 7px;
  padding: 6px;
  border: 1px solid #cedced;
  border-radius: 14px;
  background: linear-gradient(180deg, #f5f9ff, #edf4ff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

body.page-schedule #slot-modal .slot-detail-tab {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  color: #325887;
  background: transparent;
}

body.page-schedule #slot-modal .slot-detail-tab:hover {
  background: rgba(37, 99, 235, .08);
  border-color: rgba(37, 99, 235, .12);
}

body.page-schedule #slot-modal .slot-detail-tab.is-active {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  color: #fff !important;
  border-color: #2563eb !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}

body.page-schedule #slot-modal .detail-list {
  margin-top: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.page-schedule #slot-modal .detail-item {
  border: 1px solid #d4dfef;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 11px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, .05);
}

body.page-schedule #slot-modal .detail-item-head > span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #64748b;
}

body.page-schedule #slot-modal .detail-item strong {
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.28;
}

body.page-schedule #slot-modal .slot-detail-summary {
  display: block;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.page-schedule #slot-modal .slot-aside-shell {
  display: grid;
  gap: 12px;
}

body.page-schedule #slot-modal .slot-aside-shell--incident-open .slot-aside-hero,
body.page-schedule #slot-modal .slot-aside-shell--incident-open .slot-aside-section {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 0 0 2px rgba(244, 63, 94, .22),
    0 0 32px rgba(244, 63, 94, .18);
}

body.page-schedule #slot-modal .slot-aside-hero,
body.page-schedule #slot-modal .slot-aside-section {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(204, 219, 239, .95);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,255,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 14px 26px rgba(37,99,235,.06);
}

body.page-schedule #slot-modal .slot-aside-hero::after,
body.page-schedule #slot-modal .slot-aside-section::after {
  content: "";
  position: absolute;
  inset: auto -28px -34px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37,99,235,.08), rgba(37,99,235,0) 70%);
  pointer-events: none;
}

body.page-schedule #slot-modal .slot-aside-hero {
  padding: 14px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(244,248,255,.99));
}

body.page-schedule #slot-modal .slot-aside-hero__top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

body.page-schedule #slot-modal .slot-aside-hero__badge {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border-radius: 18px;
  border: 1px solid rgba(216, 229, 245, .95);
  background: rgba(255,255,255,.82);
}

body.page-schedule #slot-modal .slot-aside-hero__badge--stage {
  background:
    radial-gradient(circle at top right, rgba(248,113,113,.10), transparent 40%),
    rgba(255,255,255,.84);
}

body.page-schedule #slot-modal .slot-aside-hero__label,
body.page-schedule #slot-modal .slot-aside-section__eyebrow,
body.page-schedule #slot-modal .slot-aside-kpi__label,
body.page-schedule #slot-modal .slot-aside-list__label,
body.page-schedule #slot-modal .slot-aside-hero__code-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #6480a8;
  font-weight: 800;
}

body.page-schedule #slot-modal .slot-aside-hero__value .status-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
}

body.page-schedule #slot-modal .slot-aside-hero__code-label {
  margin-bottom: 6px;
}

body.page-schedule #slot-modal .slot-aside-hero__code {
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -.025em;
  font-weight: 650;
  color: #172033;
  margin-bottom: 12px;
}

body.page-schedule #slot-modal .slot-aside-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.page-schedule #slot-modal .slot-aside-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(193, 210, 233, .95);
  background: rgba(255,255,255,.82);
  color: #36537d;
  font-size: 12px;
  font-weight: 700;
}

body.page-schedule #slot-modal .slot-aside-chip--primary {
  border-color: rgba(96,165,250,.34);
  background: rgba(239,246,255,.92);
  color: #1d4ed8;
}

body.page-schedule #slot-modal .slot-aside-chip--incident-open {
  border-color: rgba(244, 63, 94, .34);
  background: rgba(255, 241, 242, .94);
  color: #be123c;
}

body.page-schedule #slot-modal .slot-aside-chip--incident-closed {
  border-color: rgba(16, 185, 129, .32);
  background: rgba(236, 253, 245, .92);
  color: #047857;
}

body.page-schedule #slot-modal .slot-aside-section {
  padding: 12px;
}

body.page-schedule #slot-modal .slot-aside-section__head {
  margin-bottom: 8px;
}

body.page-schedule #slot-modal .slot-aside-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.page-schedule #slot-modal .slot-aside-kpi,
body.page-schedule #slot-modal .slot-aside-list__row {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border-radius: 18px;
  border: 1px solid rgba(214, 227, 245, .98);
  background: rgba(255,255,255,.84);
}

body.page-schedule #slot-modal .slot-aside-kpi__value {
  color: #182235;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
}

body.page-schedule #slot-modal .slot-aside-kpi--wide {
  grid-column: 1 / -1;
}

body.page-schedule #slot-modal .slot-aside-kpi__value--times {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

body.page-schedule #slot-modal .slot-aside-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

body.page-schedule #slot-modal .slot-aside-times strong {
  font-weight: 800;
}

body.page-schedule #slot-modal .slot-aside-times span {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(192, 210, 236, 0.8);
}

body.page-schedule #slot-modal .slot-aside-list {
  display: grid;
  gap: 8px;
}

body.page-schedule #slot-modal .slot-aside-list__value {
  color: #1b2638;
  font-size: 13px;
  line-height: 1.34;
  font-weight: 700;
}

body.page-schedule #slot-modal .slot-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.page-schedule #slot-modal .slot-summary-grid.is-compact {
  grid-template-columns: 1fr;
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-grid.is-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.page-schedule #slot-modal .slot-summary-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 86px;
  padding: 14px 14px 13px;
  border-radius: 16px;
  border: 1px solid #d8e3f2;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  box-shadow: 0 10px 20px rgba(15, 23, 42, .05);
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  padding: 13px 14px;
  gap: 9px;
  border-radius: 20px;
  border: 1px solid rgba(201, 216, 238, .95);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.88),
    0 10px 18px rgba(30, 64, 175, .05);
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -34px auto;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37,99,235,.08), rgba(37,99,235,0) 70%);
  pointer-events: none;
}

body.page-schedule #slot-modal .slot-summary-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.page-schedule #slot-modal .slot-summary-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.16);
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.page-schedule #slot-modal .slot-summary-card__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #5f7799;
  font-weight: 800;
}

body.page-schedule #slot-modal .slot-summary-card__value {
  color: #0f172a;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -.02em;
  word-break: break-word;
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card__head {
  gap: 8px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card__icon {
  width: 24px;
  height: 24px;
  font-size: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card__label {
  font-size: 10px;
  letter-spacing: .11em;
  color: #6480a8;
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card__value {
  font-size: 17px;
  line-height: 1.24;
  color: #182235;
}

body.page-schedule #slot-modal .slot-summary-card__value .status-pill {
  transform: translateY(-1px);
}

body.page-schedule #slot-modal .slot-summary-card--status,
body.page-schedule #slot-modal .slot-summary-card--stage {
  background:
    radial-gradient(circle at top right, rgba(248,113,113,.08), transparent 34%),
    linear-gradient(180deg, rgba(255,250,250,.98), rgba(255,255,255,.98));
}

body.page-schedule #slot-modal .slot-summary-card--code .slot-summary-card__value {
  font-size: 22px;
  font-weight: 650;
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--status,
body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--stage,
body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--code,
body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--user,
body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--type,
body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--location {
  grid-column: 1 / -1;
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--status,
body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--stage {
  background:
    radial-gradient(circle at top right, rgba(248,113,113,.12), transparent 32%),
    linear-gradient(180deg, rgba(255,251,251,.98), rgba(255,247,247,.98));
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--code {
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 32%),
    linear-gradient(180deg, rgba(248,251,255,.99), rgba(242,247,255,.99));
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--code .slot-summary-card__value {
  font-size: 22px;
  letter-spacing: -.015em;
  font-weight: 650;
}

body.page-schedule #slot-modal .slot-summary-card--user .slot-summary-card__value,
body.page-schedule #slot-modal .slot-summary-card--location .slot-summary-card__value,
body.page-schedule #slot-modal .slot-summary-card--type .slot-summary-card__value {
  font-size: 18px;
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card__value .status-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--user .slot-summary-card__value {
  font-size: 15px;
  line-height: 1.32;
}

body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--type .slot-summary-card__value,
body.page-schedule #slot-modal .slot-details-aside .slot-summary-card--location .slot-summary-card__value {
  font-size: 16px;
}

body.page-schedule #slot-modal .slot-details-aside > .status-pill,
body.page-schedule #slot-modal #slot-detail-history-toggle {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(190, 24, 93, .08);
}

body.page-schedule #slot-modal .slot-summary-grid--empty .slot-summary-card {
  min-height: 76px;
}

body.page-schedule #slot-modal .status-pill {
  border-radius: 999px;
  font-weight: 800;
}

body.page-schedule #slot-modal .slot-detail-bottom-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-schedule #slot-modal .slot-detail-bottom-actions .btn-secondary,
body.page-schedule #slot-modal .slot-detail-bottom-actions .btn-primary,
body.page-schedule #slot-modal .slot-detail-bottom-actions .btn-danger {
  min-height: 34px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 800;
  padding: 0 12px !important;
}

body.page-schedule #slot-modal .slot-detail-bottom-actions .btn-primary {
  border-color: #2563eb !important;
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .24);
}

body.page-schedule #slot-modal .slot-detail-bottom-actions .btn-danger {
  border-color: #f1b8c2 !important;
  background: #fff6f7 !important;
  color: #be123c !important;
}

body.page-schedule #slot-modal .slot-incident-panel,
body.page-schedule #slot-modal .slot-document-panel,
body.page-schedule #slot-modal .slot-operation-card-panel {
  margin-top: 10px;
  border: 1px solid #d3deef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(15, 23, 42, .05);
}

@media (max-width: 1180px) {
  body.page-schedule #slot-modal .slot-details-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body.page-schedule #slot-modal .modal-card.wide.slot-modern {
    width: calc(100vw - 18px) !important;
  }
  body.page-schedule #slot-modal .slot-aside-hero__top,
  body.page-schedule #slot-modal .slot-aside-kpis {
    grid-template-columns: 1fr;
  }
  body.page-schedule #slot-modal .detail-list {
    grid-template-columns: 1fr;
  }
  body.page-schedule #slot-modal .modal-header h3 {
    font-size: 28px !important;
  }
}

body[data-theme="dark"].page-schedule #slot-modal .modal-card.wide.slot-modern {
  border-color: rgba(100, 116, 139, .5) !important;
  background:
    radial-gradient(900px 260px at 12% -18%, rgba(59, 130, 246, .16), transparent 60%),
    radial-gradient(760px 220px at 96% 6%, rgba(16, 185, 129, .11), transparent 54%),
    linear-gradient(180deg, #0b1324 0%, #0a1220 100%) !important;
}

body[data-theme="dark"].page-schedule #slot-modal .modal-header {
  border-bottom-color: rgba(100, 116, 139, .34) !important;
  background: linear-gradient(180deg, rgba(11, 19, 36, .95), rgba(10, 18, 32, .9)) !important;
}

body[data-theme="dark"].page-schedule #slot-modal .modal-header h3 {
  color: #e5ecff;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-aside-hero,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-section {
  border-color: rgba(100, 116, 139, .38);
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.14), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, .82), rgba(15, 23, 42, .72));
}

body[data-theme="dark"].page-schedule #slot-modal .slot-aside-hero__badge,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-kpi,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-list__row,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-chip {
  border-color: rgba(100, 116, 139, .34);
  background: rgba(15, 23, 42, .62);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-aside-hero__label,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-section__eyebrow,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-kpi__label,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-list__label,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-hero__code-label {
  color: #9cb0d3;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-aside-hero__code,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-kpi__value,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-list__value {
  color: #e5ecff;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-aside-chip {
  color: #cfe0ff;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-aside-chip--primary {
  border-color: rgba(96,165,250,.3);
  background: rgba(30, 64, 175, .24);
  color: #bfdbfe;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-aside-chip--incident-open {
  border-color: rgba(244, 63, 94, .38);
  background: rgba(127, 29, 29, .34);
  color: #fecdd3;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-aside-shell--incident-open .slot-aside-hero,
body[data-theme="dark"].page-schedule #slot-modal .slot-aside-shell--incident-open .slot-aside-section {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 2px rgba(244, 63, 94, .24),
    0 0 34px rgba(190, 24, 93, .26);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-aside-chip--incident-closed {
  border-color: rgba(16, 185, 129, .38);
  background: rgba(6, 78, 59, .34);
  color: #a7f3d0;
}

body[data-theme="dark"].page-schedule #slot-modal .modal-subtitle {
  color: #9cb0d3;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-details-main,
body[data-theme="dark"].page-schedule #slot-modal .slot-details-aside {
  border-color: rgba(100, 116, 139, .38);
  background: linear-gradient(180deg, rgba(15, 23, 42, .84), rgba(15, 23, 42, .7));
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-tabs {
  border-color: rgba(100, 116, 139, .4);
  background: rgba(15, 23, 42, .62);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-tab {
  color: #c6d5ef;
}

body[data-theme="dark"].page-schedule #slot-modal .detail-item,
body[data-theme="dark"].page-schedule #slot-modal .slot-summary-card,
body[data-theme="dark"].page-schedule #slot-modal .slot-incident-panel,
body[data-theme="dark"].page-schedule #slot-modal .slot-document-panel,
body[data-theme="dark"].page-schedule #slot-modal .slot-operation-card-panel {
  border-color: rgba(100, 116, 139, .36);
  background: rgba(15, 23, 42, .7);
}

body[data-theme="dark"].page-schedule #slot-modal .detail-item-head > span,
body[data-theme="dark"].page-schedule #slot-modal .slot-summary-card__label {
  color: #9cb0d3;
}

body[data-theme="dark"].page-schedule #slot-modal .detail-item strong,
body[data-theme="dark"].page-schedule #slot-modal .slot-summary-card__value {
  color: #e5ecff;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-summary-card__icon {
  background: rgba(59,130,246,.14);
  border-color: rgba(96,165,250,.24);
  color: #bfdbfe;
}

/* ===== Reservation create V3 full rewrite ===== */
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
  display: grid !important;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  gap: 22px;
  padding: 22px !important;
  background:
    radial-gradient(circle at top left, rgba(14,165,233,.10), transparent 24%),
    radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%) !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-summary {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: sticky;
  top: 8px;
  align-self: start;
  margin: 0 !important;
  border-radius: 28px !important;
  border: 1px solid rgba(201, 214, 233, .92) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,255,.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 22px 42px rgba(15,23,42,.08) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero {
  grid-column: 2;
  margin: 0 !important;
  padding: 24px 26px !important;
  border-radius: 30px !important;
  border: 1px solid rgba(200, 216, 238, .94) !important;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.12), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(244,248,255,.98)) !important;
  box-shadow: 0 20px 40px rgba(15,23,42,.07) !important;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .9fr);
  gap: 18px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero h4 {
  font-size: 34px;
  line-height: 1.04;
  margin-bottom: 10px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero p {
  font-size: 15px;
  max-width: 760px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero .slot-create-hero__tip {
  min-height: 54px;
  border-radius: 18px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-form {
  grid-column: 2;
  display: grid;
  gap: 18px;
  padding: 0 !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  background: transparent;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress__step {
  min-height: 82px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(205, 219, 238, .95);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,255,.98));
  box-shadow: 0 14px 28px rgba(15,23,42,.04);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress__step.is-active {
  border-color: rgba(37,99,235,.40);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.12), transparent 34%),
    linear-gradient(180deg, rgba(239,246,255,.98), rgba(255,255,255,.98));
  box-shadow: 0 18px 34px rgba(37,99,235,.10);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-selection-guard,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-grid--paired {
  margin: 0 !important;
  padding: 20px 22px !important;
  border-radius: 28px !important;
  border: 1px solid rgba(204, 219, 238, .94) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,250,255,.99)) !important;
  box-shadow: 0 18px 36px rgba(15,23,42,.05) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box {
  display: grid;
  gap: 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell__header {
  margin-bottom: 14px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell__eyebrow {
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.12);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell__header h4 {
  margin-top: 10px;
  font-size: 25px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell--mode {
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 34%),
    linear-gradient(180deg, rgba(248,251,255,.99), rgba(255,255,255,.99)) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card {
  min-height: 178px;
  padding: 22px;
  border-radius: 24px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card strong {
  font-size: 25px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-smart-hint {
  border-radius: 20px;
  min-height: 84px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-section-title {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  gap: 14px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-section-title__badge {
  min-width: 92px;
  height: 36px;
  border-radius: 999px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid--transport {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid .span-2 {
  grid-column: span 2;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid .span-3 {
  grid-column: 1 / -1;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field {
  padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(205, 219, 237, .95);
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(249,251,255,.99));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(15,23,42,.03);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field select,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field textarea {
  min-height: 48px;
  border-radius: 16px !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field textarea {
  min-height: 124px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-grid--paired {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions {
  position: static;
  margin: 2px 0 0;
  padding: 16px 0 0;
  background: transparent;
  border-top: 1px solid rgba(214,226,241,.9);
  backdrop-filter: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions .btn-primary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions .btn-secondary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions .btn-danger {
  min-height: 50px;
  border-radius: 16px;
  padding: 0 18px;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
  background:
    radial-gradient(circle at top left, rgba(14,165,233,.10), transparent 24%),
    radial-gradient(circle at top right, rgba(37,99,235,.12), transparent 28%),
    linear-gradient(180deg, rgba(8,15,29,.98), rgba(10,18,32,.98)) !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-summary,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-selection-guard,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-grid--paired,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field {
  background: linear-gradient(180deg, rgba(15,23,42,.94), rgba(12,18,30,.96)) !important;
  border-color: rgba(51,65,85,.92) !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions {
  border-top-color: rgba(51,65,85,.9);
}

/* Dark mode: reservation form fields must stay readable while typing. */
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field select,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field textarea,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-detail-inline-field input:not([type="checkbox"]):not([type="radio"]),
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-detail-inline-field select,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-detail-inline-field textarea {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 18, 32, 0.96)) !important;
  border-color: rgba(96, 165, 250, 0.34) !important;
  color: #f8fafc !important;
  caret-color: #f8fafc !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field input::placeholder,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field textarea::placeholder,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-detail-inline-field input::placeholder,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-detail-inline-field textarea::placeholder {
  color: #9fb0cc !important;
  opacity: 1 !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field select,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-detail-inline-field select {
  color: #f8fafc !important;
}

@media (max-width: 1180px) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
    grid-template-columns: 1fr;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-summary {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-form {
    grid-column: 1;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid--transport {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
    padding: 12px !important;
    gap: 14px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero {
    grid-template-columns: 1fr;
    padding: 18px 18px !important;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-mode-picker,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid--transport {
    grid-template-columns: 1fr;
  }
}
/* ===== Reservation create V3 refreshed layout ===== */
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
  display: grid !important;
  gap: 22px;
  padding: 24px !important;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, .10), transparent 20%),
    radial-gradient(circle at top right, rgba(59, 130, 246, .08), transparent 24%),
    linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%) !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-summary {
  margin: 0 !important;
  border-radius: 28px !important;
  border: 1px solid rgba(204, 218, 238, .9) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.98)) !important;
  box-shadow: 0 20px 36px rgba(15, 23, 42, .05) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-v3-top {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero {
  margin: 0 !important;
  padding: 26px 28px !important;
  border-radius: 30px !important;
  border: 1px solid rgba(204, 218, 238, .94) !important;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.99), rgba(245,249,255,.99)) !important;
  box-shadow: 0 22px 40px rgba(15, 23, 42, .06) !important;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, .95fr);
  gap: 20px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero h4 {
  font-size: 36px;
  line-height: 1.04;
  margin: 0 0 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero p {
  font-size: 15px;
  line-height: 1.65;
  max-width: 780px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero .slot-create-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(59,130,246,.16);
  background: rgba(37,99,235,.08);
  color: #1d4ed8;
  font-weight: 700;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero .slot-create-hero__tips {
  display: grid;
  gap: 12px;
  align-content: center;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero .slot-create-hero__tip {
  min-height: 62px;
  padding: 14px 16px 14px 46px;
  border-radius: 20px;
  border: 1px solid rgba(204, 218, 238, .94);
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-form {
  display: grid;
  gap: 18px;
  padding: 0 !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  background: transparent;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress__step {
  min-height: 88px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(207, 220, 239, .95);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98));
  box-shadow: 0 14px 28px rgba(15, 23, 42, .04);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress__step.is-active {
  border-color: rgba(37,99,235,.38);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.11), transparent 34%),
    linear-gradient(180deg, rgba(239,246,255,.98), rgba(255,255,255,.98));
  box-shadow: 0 18px 36px rgba(37,99,235,.10);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-v3-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .95fr);
  gap: 18px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-selection-guard,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-grid--paired {
  margin: 0 !important;
  padding: 22px 24px !important;
  border-radius: 30px !important;
  border: 1px solid rgba(205, 219, 238, .95) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,250,255,.99)) !important;
  box-shadow: 0 18px 36px rgba(15,23,42,.05) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell__header {
  margin-bottom: 16px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell__header h4 {
  margin-top: 10px;
  font-size: 26px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell__eyebrow {
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.14);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell--scenario,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell--templates {
  min-height: 100%;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card {
  min-height: 186px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(199, 216, 238, .96);
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(245,249,255,.99));
  box-shadow: 0 14px 24px rgba(15,23,42,.04);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card.is-active {
  border-color: rgba(37,99,235,.42);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.12), transparent 34%),
    linear-gradient(180deg, rgba(239,246,255,.98), rgba(255,255,255,.98));
  box-shadow: 0 20px 36px rgba(37,99,235,.12);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card strong {
  font-size: 26px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box {
  display: grid;
  gap: 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: end;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-smart-hint {
  margin: 0 0 16px;
  border-radius: 20px;
  min-height: 88px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-section-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 16px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-section-title__badge {
  min-width: 94px;
  height: 38px;
  border-radius: 999px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid--transport {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid .span-2 {
  grid-column: span 2;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid .span-3 {
  grid-column: 1 / -1;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field {
  padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(205, 219, 237, .95);
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(249,251,255,.99));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 10px 20px rgba(15,23,42,.03);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field select,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field textarea {
  min-height: 48px;
  border-radius: 16px !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field textarea {
  min-height: 124px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-shuttle {
  display: grid;
  gap: 18px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-grid--paired {
  display: grid;
  gap: 14px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell--actions {
  padding-top: 18px !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions {
  position: static;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions .btn-primary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions .btn-secondary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions .btn-danger {
  min-height: 52px;
  border-radius: 16px;
  padding: 0 18px;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, .12), transparent 20%),
    radial-gradient(circle at top right, rgba(59, 130, 246, .14), transparent 24%),
    linear-gradient(180deg, rgba(8,15,29,.98), rgba(10,18,32,.98)) !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-summary,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-selection-guard,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field {
  background: linear-gradient(180deg, rgba(15,23,42,.94), rgba(12,18,30,.96)) !important;
  border-color: rgba(51,65,85,.92) !important;
}

@media (max-width: 1280px) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-v3-top,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-v3-grid {
    grid-template-columns: 1fr;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid--transport {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
    padding: 12px !important;
    gap: 14px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-mode-picker,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid--transport,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-row {
    grid-template-columns: 1fr;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero {
    padding: 18px !important;
  }
}
/* ===== Reservation create V3 cleanup ===== */
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
  gap: 18px;
  padding: 18px !important;
  background: #f5f8fd !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-summary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-selection-guard {
  border-radius: 20px !important;
  border: 1px solid #d8e2f0 !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-v3-top {
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 16px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero {
  padding: 22px 24px !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero h4 {
  font-size: 28px;
  line-height: 1.1;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero p {
  font-size: 14px;
  color: #60708f;
  max-width: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero .slot-create-hero__eyebrow {
  background: #eef4ff;
  border-color: #d9e6ff;
  color: #2454c5;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero .slot-create-hero__tips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero .slot-create-hero__tip {
  min-height: 0;
  padding: 12px 14px 12px 38px;
  border-radius: 14px;
  border: 1px solid #e0e8f4;
  background: #f9fbff;
  font-size: 13px;
  color: #42526e;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress {
  gap: 10px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress__step {
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #dbe4f1;
  background: #fff;
  box-shadow: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress__step.is-active {
  border-color: #9ec0ff;
  background: #f2f7ff;
  box-shadow: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-v3-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box {
  padding: 18px 20px !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell__header {
  margin-bottom: 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell__header h4 {
  margin-top: 8px;
  font-size: 21px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell__eyebrow {
  background: #f5f8ff;
  border: 1px solid #e0e8f6;
  color: #5671a3;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-mode-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card {
  min-height: 150px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #dbe4f1;
  background: #fbfdff;
  box-shadow: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card.is-active {
  border-color: #8eb6ff;
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.05);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card strong {
  font-size: 21px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-row {
  grid-template-columns: minmax(0, 1fr);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-smart-hint {
  margin: 0 0 14px;
  min-height: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7faff;
  border: 1px solid #dce8fb;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-section-title {
  margin: 0 0 12px;
  gap: 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-section-title__badge {
  min-width: 82px;
  height: 32px;
  font-size: 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid {
  gap: 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field {
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid #dde6f2;
  background: #fbfdff;
  box-shadow: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field select,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field textarea {
  min-height: 44px;
  border-radius: 12px !important;
  background: #fff;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field textarea {
  min-height: 104px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions .btn-primary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions .btn-secondary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-actions .btn-danger {
  min-height: 48px;
  border-radius: 14px;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
  background: #0e1727 !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-summary,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-selection-guard,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .form-card-field,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress__step {
  background: #111c30 !important;
  border-color: #334155 !important;
  box-shadow: none !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-mode-card.is-active,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress__step.is-active,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-smart-hint {
  background: #13233f !important;
  border-color: #456ba8 !important;
}

@media (max-width: 1280px) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-v3-top,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-v3-grid,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero .slot-create-hero__tips {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 {
    padding: 12px !important;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-progress,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-mode-picker,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-fields-grid--transport,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-row {
    grid-template-columns: 1fr;
  }
}
/* ===== Reservation create - selected Variant B (two cards + type choice) ===== */
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px;
  padding: 24px !important;
  background: #f6f9fe !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b:not([style*="display:none"]):not([style*="display: none"]) {
  display: grid !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b[style*="display:none"],
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b[style*="display: none"] {
  display: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-v3-top,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b #slot-create-summary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-hero,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-progress,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-smart-hint,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell__badge-row {
  display: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b:not(.is-shuttle-mode) .slot-create-leg-primary-title,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b:not(.is-shuttle-mode) .slot-create-section-title--shuttle,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b:not(.is-shuttle-mode) #slot-shuttle-section {
  display: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-mode .slot-create-leg-primary-title {
  display: grid !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-mode #slot-shuttle-section {
  display: block !important;
}

body.page-schedule #slot-modal .slot-detail-inline-form.is-shuttle-mode #slot-inline-leg-tabs:not([hidden]) {
  display: flex !important;
}

body.page-schedule #slot-modal .slot-detail-inline-form.is-shuttle-mode [data-inline-leg-panel="shuttle"]:not([hidden]) {
  display: block !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b > #slot-create-form {
  grid-column: 1 / -1 !important;
  display: grid;
  gap: 22px;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-v3-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-selection-guard,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-shuttle > .slot-form-shell {
  margin: 0 !important;
  padding: 22px !important;
  border: 1px solid #dde7f3 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(17, 38, 77, .06) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #dbe5f6;
  background: #f4f8ff;
  color: #3660b5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell__header h4 {
  margin: 8px 0 0;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 800;
  color: #15253f;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--scenario .slot-form-shell__eyebrow::before {
  content: "Rodzaj awizacji";
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--scenario .slot-form-shell__eyebrow {
  font-size: 0;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--scenario .slot-form-shell__eyebrow::before {
  font-size: 11px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--scenario .slot-form-shell__header h4 {
  font-size: 23px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--templates {
  border-color: #d9e8ff !important;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(255, 255, 255, .98)) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--templates .slot-form-shell__eyebrow {
  background: #eff6ff;
  color: #1d4ed8;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--templates .slot-form-shell__header h4 {
  font-size: 19px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-presets-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, max-content);
  gap: 12px;
  align-items: end;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-presets-field {
  min-width: 0;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-presets-field select {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-presets-row .btn-secondary {
  min-height: 42px;
  white-space: nowrap;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card {
  min-height: 132px;
  padding: 20px;
  border: 1px solid #dce6f4;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: none;
  display: grid;
  align-content: start;
  gap: 12px;
  text-align: left;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card.is-active {
  border-color: #9cbcff;
  background: #eef5ff;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #dbe5f6;
  background: #f4f8ff;
  color: #3660b5;
  font-size: 11px;
  font-weight: 800;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card strong {
  font-size: 20px;
  color: #15253f;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card span:not(.slot-mode-card__badge) {
  color: #667a99;
  font-size: 13px;
  line-height: 1.55;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--operations,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--transport-main,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-shuttle .slot-form-shell,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired {
  display: grid;
  gap: 18px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--operations::before {
  content: "Wybrane okno: Grupa / linia / data / godzina sa pobierane z harmonogramu. Jesli chcesz zmienic slot, wroc do harmonogramu i wybierz inne okno.";
  display: block;
  padding: 14px 16px;
  border: 1px solid #d8e5fb;
  border-radius: 16px;
  background: #f4f8ff;
  color: #4d6690;
  font-size: 13px;
  line-height: 1.6;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid--transport,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--transport-main .slot-create-fields-grid--transport {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field {
  min-height: 80px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #e0e8f4 !important;
  border-radius: 15px !important;
  background: #fbfdff !important;
  color: #6b81a4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field select,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field textarea {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d9e4f2 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #1a3154;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field textarea {
  min-height: 82px;
  line-height: 1.55;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid .span-2,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid--transport .span-2 {
  grid-column: span 2;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid .span-3,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired .span-3 {
  grid-column: 1 / -1;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-shuttle {
  display: grid;
  gap: 22px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--shuttle-head {
  border-color: #f0d6a6 !important;
  background: linear-gradient(180deg, #fffdf8, #fff6e6) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b #slot-shuttle-target-shell {
  border-color: #f0d6a6 !important;
  background: linear-gradient(180deg, #fffdf8, #fff6e6) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .shuttle-info-copy {
  display: grid;
  gap: 14px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .shuttle-info-copy p,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .shuttle-target-board p {
  margin: 0;
  color: #667a99;
  font-size: 13px;
  line-height: 1.6;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .shuttle-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--actions {
  padding: 18px !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-actions {
  position: static;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-actions .btn-primary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-actions .btn-secondary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-actions .btn-danger,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .shuttle-target-actions .btn-secondary,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b #slot-create-selection-guard-action {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b {
  background: #0f172a !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-selection-guard,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card {
  background: #111c30 !important;
  border-color: #334155 !important;
  color: #9fb2d2;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field select,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field textarea {
  background: #0f172a !important;
  border-color: #3b4f70 !important;
  color: #f8fafc !important;
  caret-color: #f8fafc !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field input::placeholder,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field textarea::placeholder {
  color: #9fb0cc !important;
  opacity: 1 !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field select option {
  background: #0f172a;
  color: #f8fafc;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card.is-active,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--shuttle-head,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b #slot-shuttle-target-shell {
  background: #13233f !important;
  border-color: #456ba8 !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell__header h4,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card strong {
  color: #e6eefc;
}

@media (max-width: 1100px) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-mode-picker,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid--transport,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired {
    grid-template-columns: 1fr;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid .span-2,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid--transport .span-2,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid .span-3,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired .span-3 {
    grid-column: auto;
  }
}
/* ===== Reservation create Variant B scale/scroll fix ===== */
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-create-view.slot-create-view-b:not([style*="display:none"])) {
  width: min(1500px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  max-height: calc(100vh - 24px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-create-view.slot-create-view-b:not([style*="display:none"])) .modal-header {
  flex: 0 0 auto;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-create-view.slot-create-view-b:not([style*="display:none"])) .modal-body {
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b {
  max-height: none;
  overflow: visible;
}

@media (max-height: 850px), (max-width: 1360px) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b {
    gap: 14px;
    padding: 16px !important;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b > #slot-create-form {
    gap: 16px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-selection-guard,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-shuttle > .slot-form-shell {
    padding: 16px !important;
    border-radius: 16px !important;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell__header {
    margin-bottom: 12px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell__header h4 {
    font-size: 19px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-mode-picker,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid--transport,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired {
    gap: 12px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card {
    min-height: 112px;
    padding: 14px;
    gap: 8px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-mode-card strong {
    font-size: 18px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field {
    min-height: 68px;
    padding: 12px;
    border-radius: 13px !important;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field input:not([type="checkbox"]):not([type="radio"]),
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field select,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field textarea {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px !important;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field textarea {
    min-height: 68px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell--operations::before {
    padding: 10px 12px;
    font-size: 12px;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-actions .btn-primary,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-actions .btn-secondary,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-actions .btn-danger,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .shuttle-target-actions .btn-secondary,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b #slot-create-selection-guard-action {
    min-height: 40px;
  }
}

@media (max-width: 980px) {
  body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-create-view.slot-create-view-b:not([style*="display:none"])) {
    width: calc(100vw - 14px) !important;
    max-width: calc(100vw - 14px) !important;
    max-height: calc(100vh - 14px) !important;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-mode-picker,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid--transport,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired {
    grid-template-columns: 1fr !important;
  }
}

/* ===== Slot modal scroll hardening (details/create/edit) ===== */
body.page-schedule #slot-modal.active {
  align-items: flex-start !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 12px !important;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern,
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-create-view.slot-create-view-b),
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-details-view),
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-move-view) {
  max-height: calc(100dvh - 24px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-create-view.slot-create-view-b:not([style*="display:none"])) {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.page-schedule #slot-modal .modal-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
}

body.page-schedule #slot-modal #slot-create-view,
body.page-schedule #slot-modal #slot-details-view,
body.page-schedule #slot-modal #slot-move-view {
  min-height: 0;
}

/* Prevent create/edit form grids from overflowing horizontally at high zoom. */
body.page-schedule #slot-modal *,
body.page-schedule #slot-modal *::before,
body.page-schedule #slot-modal *::after {
  box-sizing: border-box;
}

body.page-schedule #slot-modal #slot-create-form,
body.page-schedule #slot-modal #slot-create-view,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b > #slot-create-form,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-v3-grid,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-form-shell,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid--transport,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field {
  min-width: 0 !important;
  max-width: 100% !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field select,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .form-card-field textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (max-width: 1200px), (min-resolution: 1.25dppx) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-presets-row {
    grid-template-columns: 1fr !important;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-presets-row .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid--transport,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired {
    grid-template-columns: 1fr !important;
  }

  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid .span-2,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid--transport .span-2,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-fields-grid .span-3,
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b .slot-create-grid--paired .span-3 {
    grid-column: 1 / -1 !important;
  }
}

/* Keep dropdowns and expanded controls visible: the overlay scrolls, not the card. */
body.page-schedule #slot-modal.active {
  display: block !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern {
  margin: 0 auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-create-view.slot-create-view-b),
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-details-view),
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-move-view),
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-create-view.slot-create-view-b:not([style*="display:none"])) {
  max-height: none !important;
  overflow: visible !important;
}

/* Final hardening: details/move must keep internal scroll at higher browser scaling. */
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-details-view:not([style*="display:none"])),
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-move-view:not([style*="display:none"])) {
  max-height: calc(100dvh - 20px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-details-view:not([style*="display:none"])) .modal-body,
body.page-schedule #slot-modal .modal-card.wide.slot-modern:has(#slot-move-view:not([style*="display:none"])) .modal-body {
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
}

/* At higher scaling keep details readable instead of squeezing cards into narrow columns. */
@media (max-width: 1500px), (min-resolution: 1.2dppx) {
  body.page-schedule #slot-modal .slot-details-layout {
    grid-template-columns: 1fr !important;
  }

  body.page-schedule #slot-modal .slot-details-aside .slot-summary-grid.is-compact {
    grid-template-columns: 1fr !important;
  }

  body.page-schedule #slot-modal .slot-detail-summary {
    grid-template-columns: 1fr !important;
  }
}

/* Dark mode readability hardening: override old fixed light cards/text. */
body[data-theme="dark"] input[type="checkbox"] {
  background: var(--input-bg);
  border-color: var(--input-border);
}

body[data-theme="dark"] .settings-embed-frame,
body[data-theme="dark"] #integrations-modal .modal-card,
body[data-theme="dark"] .arrival-alert-item,
body[data-theme="dark"] .header-notifications-panel {
  background: color-mix(in srgb, var(--panel) 92%, #000 8%) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .44);
}

/* Notifications must float above schedule borders, day bars and sticky layers. */
body .main-header {
  z-index: 3200 !important;
}

body .main-header-actions {
  z-index: 3210 !important;
}

body .header-notifications {
  z-index: 3220 !important;
}

body .header-notifications-panel {
  z-index: 3250 !important;
  transform: translateZ(0);
}

body .header-notifications-panel.is-portaled {
  position: fixed !important;
  z-index: 9999 !important;
  transform: translateZ(0);
}

body[data-theme="dark"] #integrations-modal .form-grid input:not([type="checkbox"]):not([type="radio"]),
body[data-theme="dark"] #integrations-modal .form-grid select,
body[data-theme="dark"] #integrations-modal .form-grid textarea {
  background: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--ink) !important;
}

body[data-theme="dark"] .arrival-alert-msg,
body[data-theme="dark"] .warehouse-kpi-card__value,
body[data-theme="dark"] .rq-bay-queue,
body[data-theme="dark"] .login-head h1,
body[data-theme="dark"] body.page-login .login-head h1 {
  color: var(--ink) !important;
}

body[data-theme="dark"] .page-profile .profile-totp-required-banner {
  background: rgba(251, 146, 60, .13) !important;
  border-color: rgba(251, 146, 60, .28) !important;
  color: #fed7aa !important;
}

body[data-theme="dark"] .page-profile .profile-totp-required-link {
  color: #fdba74 !important;
}

body[data-theme="dark"].page-schedule #slot-modal .modal-card,
body[data-theme="dark"].page-schedule #slot-modal .modal-header,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-summary,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-summary > div,
body[data-theme="dark"].page-schedule #slot-modal .detail-item,
body[data-theme="dark"].page-schedule #slot-modal .slot-form-shell,
body[data-theme="dark"].page-schedule #slot-modal .slot-presets-box,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-selection-guard,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > #slot-create-summary,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 > .slot-create-hero,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-form-shell,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-presets-box,
body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-v3 .slot-create-selection-guard {
  background: color-mix(in srgb, var(--panel) 92%, #000 8%) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

body[data-theme="dark"].page-schedule #slot-modal .modal-header h3,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-summary strong,
body[data-theme="dark"].page-schedule #slot-modal .detail-item,
body[data-theme="dark"].page-schedule #slot-modal .detail-item *,
body[data-theme="dark"].page-schedule #slot-modal .form-card-field,
body[data-theme="dark"].page-schedule #slot-modal .form-card-field *,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-section-title,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-section-title *,
body[data-theme="dark"].page-schedule #slot-modal .slot-form-shell__header,
body[data-theme="dark"].page-schedule #slot-modal .slot-form-shell__header * {
  color: var(--ink) !important;
}

body[data-theme="dark"].page-schedule #slot-modal .modal-subtitle,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-summary small,
body[data-theme="dark"].page-schedule #slot-modal .form-card-field span,
body[data-theme="dark"].page-schedule #slot-modal .slot-form-shell__eyebrow,
body[data-theme="dark"].page-schedule #slot-modal .slot-create-section-title p {
  color: var(--muted) !important;
}

body[data-theme="dark"].page-schedule #slot-modal .form-card-field input:not([type="checkbox"]):not([type="radio"]),
body[data-theme="dark"].page-schedule #slot-modal .form-card-field select,
body[data-theme="dark"].page-schedule #slot-modal .form-card-field textarea {
  background: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04) !important;
}

body[data-theme="dark"].page-schedule #slot-modal .form-card-field input::placeholder,
body[data-theme="dark"].page-schedule #slot-modal .form-card-field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent) !important;
}

body[data-theme="dark"].page-schedule .sidebar.sidebar-modern.sidebar-v5 {
  background: var(--panel) !important;
  border-right-color: var(--line) !important;
  color: var(--ink) !important;
}

/* Native select dropdowns need explicit option colors in dark mode. */
body[data-theme="dark"] select,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] select:active {
  color-scheme: dark;
  background-color: var(--input-bg) !important;
  color: var(--ink) !important;
  border-color: var(--input-border) !important;
}

body[data-theme="dark"] select option,
body[data-theme="dark"] select optgroup {
  background-color: #0f141d !important;
  color: #edf2f7 !important;
}

body[data-theme="dark"] select option:checked {
  background-color: #1f2937 !important;
  color: #ffffff !important;
}

body:not([data-theme="dark"]) select {
  color-scheme: light;
}

/* Native dropdown clipping fix: select popups must not be cut by modal/body wrappers. */
body .modal:has(select:focus) .modal-card,
body .modal:has(select:focus) .modal-body,
body .modal:has(select:focus) form,
body .modal:has(select:focus) .form-grid,
body .modal:has(select:focus) .form-card-field,
body .modal:has(select:focus) .slot-form-shell,
body .modal:has(select:focus) .slot-create-fields-grid,
body .modal:has(select:focus) .slot-create-fields-grid--transport,
body .modal:has(select:focus) .slot-create-grid--paired {
  overflow: visible !important;
}

body.page-schedule #slot-modal select,
body .modal select {
  line-height: 1.35 !important;
}

body.page-schedule #slot-modal select option,
body .modal select option {
  min-height: 30px;
  line-height: 1.35;
  padding: 8px 10px;
}

/* Final select hardening: avoid bottom clipping caused by compact fixed heights. */
select:not([multiple]) {
  height: auto !important;
  min-height: 38px;
  line-height: 1.35 !important;
  padding-top: 7px;
  padding-bottom: 7px;
}

.field select:not([multiple]),
.schedule-filters .field select:not([multiple]),
body.page-schedule .filters.schedule-filters .field select:not([multiple]) {
  height: auto !important;
  min-height: 36px !important;
  line-height: 1.35 !important;
}

body.native-select-open .modal,
body.native-select-open .modal-card,
body.native-select-open .modal-body,
body.native-select-open .form-grid,
body.native-select-open .field,
body.native-select-open .form-card-field,
body.native-select-open .slot-form-shell,
body.native-select-open .slot-create-fields-grid,
body.native-select-open .slot-create-fields-grid--transport,
body.native-select-open .slot-create-grid--paired {
  overflow: visible !important;
}

/* Final schedule status glow: late override because compact schedule rules use !important. */
body.page-schedule .slot-wrapper:has(.slot.reserved),
body.page-schedule .slot-wrapper:has(.slot.in_progress),
body.page-schedule .slot-wrapper:has(.slot.done),
body.page-schedule .slot-wrapper:has(.slot.departed),
body.page-schedule .slot-wrapper:has(.slot.blocked) {
  overflow: visible !important;
}

body.page-schedule .slot.reserved,
body.page-schedule .slot.in_progress,
body.page-schedule .slot.done,
body.page-schedule .slot.departed,
body.page-schedule .slot.blocked {
  --slot-glow-color: rgba(148, 163, 184, 0.24);
  position: relative;
  z-index: 2;
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset,
    0 0 0 3px color-mix(in srgb, var(--slot-glow-color) 72%, transparent),
    0 0 30px var(--slot-glow-color) !important;
}

body.page-schedule .slot.reserved { --slot-glow-color: rgba(239, 68, 68, 0.30); }
body.page-schedule .slot.in_progress { --slot-glow-color: rgba(245, 158, 11, 0.34); }
body.page-schedule .slot.done { --slot-glow-color: rgba(34, 197, 94, 0.34); }
body.page-schedule .slot.departed { --slot-glow-color: rgba(59, 130, 246, 0.34); }
body.page-schedule .slot.blocked { --slot-glow-color: rgba(148, 163, 184, 0.24); }

body.page-schedule .slot-wrapper:has(.slot.slot-provisional),
body.page-schedule .slot-wrapper:has(.slot.slot-pending-change) {
  overflow: visible !important;
}

body.page-schedule .slot.slot-provisional,
body.page-schedule .slot.reserved.slot-provisional,
body.page-schedule .slot.in_progress.slot-provisional,
body.page-schedule .slot.waiting.slot-provisional {
  --slot-glow-color: rgba(168, 85, 247, 0.55);
  z-index: 4;
  background:
    linear-gradient(135deg, #f5d0fe 0%, #ddd6fe 42%, #fde68a 100%) !important;
  color: #5b21b6 !important;
  border: 2px solid #7c3aed !important;
  animation: slotProvisionalPulse 1.15s ease-in-out infinite;
  box-shadow:
    0 16px 34px rgba(124, 58, 237, 0.28),
    0 0 0 3px rgba(250, 204, 21, 0.35),
    0 0 26px rgba(168, 85, 247, 0.45) !important;
}

body[data-theme="dark"].page-schedule .slot.slot-provisional,
body[data-theme="dark"].page-schedule .slot.reserved.slot-provisional {
  background:
    linear-gradient(135deg, #4c1d95 0%, #6d28d9 48%, #a16207 100%) !important;
  color: #f5d0fe !important;
  border-color: #c084fc !important;
}

body.page-schedule .slot.slot-delete-request,
body.page-schedule .slot.reserved.slot-delete-request,
body.page-schedule .slot.in_progress.slot-delete-request,
body.page-schedule .slot.waiting.slot-delete-request {
  --slot-glow-color: rgba(0, 0, 0, 0.72);
  z-index: 5;
  background: #111111 !important;
  color: #f8fafc !important;
  border: 2px solid #000000 !important;
  animation: slotDeleteRequestBlink 0.9s steps(2, end) infinite;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.45), 0 0 22px rgba(0, 0, 0, 0.55) !important;
}

body.page-schedule .slot.slot-delete-request .slot-label,
body.page-schedule .slot.slot-delete-request .slot-card-content,
body.page-schedule .slot.slot-delete-request strong,
body.page-schedule .slot.slot-delete-request small {
  color: #f8fafc !important;
}

body[data-theme="dark"].page-schedule .slot.slot-delete-request,
body[data-theme="dark"].page-schedule .slot.reserved.slot-delete-request {
  background: #050505 !important;
  color: #f8fafc !important;
  border-color: #e5e7eb !important;
}

@keyframes slotDeleteRequestBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.38; }
}

body.page-schedule .slot.slot-pending-change,
body.page-schedule .slot.reserved.slot-pending-change,
body.page-schedule .slot.in_progress.slot-pending-change,
body.page-schedule .slot.waiting.slot-pending-change,
body.page-schedule .slot.done.slot-pending-change,
body.page-schedule .slot.departed.slot-pending-change {
  --slot-glow-color: rgba(6, 182, 212, 0.55);
  z-index: 4;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0 8px, rgba(255, 255, 255, 0) 8px 16px),
    linear-gradient(135deg, #cffafe 0%, #a5f3fc 55%, #67e8f9 100%) !important;
  color: #155e75 !important;
  border: 2px solid #0891b2 !important;
  animation: slotPendingChangeCyanPulse 1.15s ease-in-out infinite;
  box-shadow:
    0 16px 34px rgba(8, 145, 178, 0.30),
    0 0 0 3px rgba(103, 232, 249, 0.40),
    0 0 26px rgba(6, 182, 212, 0.45) !important;
}

body[data-theme="dark"].page-schedule .slot.slot-pending-change,
body[data-theme="dark"].page-schedule .slot.reserved.slot-pending-change {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 8px, rgba(255, 255, 255, 0) 8px 16px),
    linear-gradient(135deg, #164e63 0%, #0e7490 55%, #0891b2 100%) !important;
  color: #cffafe !important;
  border-color: #22d3ee !important;
}

@keyframes slotPendingChangeCyanPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 16px 34px rgba(8, 145, 178, 0.30),
      0 0 0 3px rgba(103, 232, 249, 0.40),
      0 0 22px rgba(6, 182, 212, 0.38);
  }
  50% {
    transform: translateY(-1px) scale(1.01);
    box-shadow:
      0 18px 38px rgba(8, 145, 178, 0.36),
      0 0 0 5px rgba(103, 232, 249, 0.50),
      0 0 34px rgba(6, 182, 212, 0.58);
  }
}

body.page-schedule .slot.reserved:hover,
body.page-schedule .slot.in_progress:hover,
body.page-schedule .slot.done:hover,
body.page-schedule .slot.departed:hover,
body.page-schedule .slot.blocked:hover {
  transform: translateY(-1px) !important;
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.20),
    0 0 0 1px rgba(255, 255, 255, 0.82) inset,
    0 0 0 4px color-mix(in srgb, var(--slot-glow-color) 78%, transparent),
    0 0 42px var(--slot-glow-color) !important;
}

body[data-theme="dark"].page-schedule .slot.reserved,
body[data-theme="dark"].page-schedule .slot.in_progress,
body[data-theme="dark"].page-schedule .slot.done,
body[data-theme="dark"].page-schedule .slot.departed,
body[data-theme="dark"].page-schedule .slot.blocked {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 0 3px color-mix(in srgb, var(--slot-glow-color) 64%, transparent),
    0 0 34px var(--slot-glow-color) !important;
}

body[data-theme="dark"].page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info strong {
  color: #0f172a;
}

body[data-theme="dark"].page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info small {
  color: #334155;
}

/* Reservation details status glow. */
body.page-schedule #slot-modal #slot-details-view.detail-status-reserved,
body.page-schedule #slot-modal #slot-details-view.detail-status-in_progress,
body.page-schedule #slot-modal #slot-details-view.detail-status-done,
body.page-schedule #slot-modal #slot-details-view.detail-status-departed,
body.page-schedule #slot-modal #slot-details-view.detail-status-blocked {
  --detail-glow-color: rgba(148, 163, 184, 0.24);
  --detail-glow-rgb: 148, 163, 184;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--detail-glow-rgb), 0.24), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(var(--detail-glow-rgb), 0.18), transparent 30%),
    linear-gradient(135deg, rgba(var(--detail-glow-rgb), 0.12), rgba(248, 251, 255, 0.94) 42%, rgba(255, 255, 255, 0.88)) !important;
  border-color: color-mix(in srgb, var(--detail-glow-color) 62%, #d7deea 38%) !important;
  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset,
    0 0 0 4px color-mix(in srgb, var(--detail-glow-color) 58%, transparent),
    0 0 54px var(--detail-glow-color) !important;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-reserved { --detail-glow-color: rgba(239, 68, 68, 0.34); --detail-glow-rgb: 239, 68, 68; }
body.page-schedule #slot-modal #slot-details-view.detail-status-in_progress { --detail-glow-color: rgba(245, 158, 11, 0.38); --detail-glow-rgb: 245, 158, 11; }
body.page-schedule #slot-modal #slot-details-view.detail-status-done { --detail-glow-color: rgba(34, 197, 94, 0.38); --detail-glow-rgb: 34, 197, 94; }
body.page-schedule #slot-modal #slot-details-view.detail-status-departed { --detail-glow-color: rgba(59, 130, 246, 0.38); --detail-glow-rgb: 59, 130, 246; }
body.page-schedule #slot-modal #slot-details-view.detail-status-blocked { --detail-glow-color: rgba(148, 163, 184, 0.28); --detail-glow-rgb: 148, 163, 184; }

body.page-schedule #slot-modal #slot-details-view.detail-status-reserved::before,
body.page-schedule #slot-modal #slot-details-view.detail-status-in_progress::before,
body.page-schedule #slot-modal #slot-details-view.detail-status-done::before,
body.page-schedule #slot-modal #slot-details-view.detail-status-departed::before,
body.page-schedule #slot-modal #slot-details-view.detail-status-blocked::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--detail-glow-rgb), 0.34), transparent 24%),
    radial-gradient(circle at 50% 108%, rgba(var(--detail-glow-rgb), 0.20), transparent 46%);
  opacity: 0.95;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-reserved .slot-details-main,
body.page-schedule #slot-modal #slot-details-view.detail-status-reserved .slot-details-aside,
body.page-schedule #slot-modal #slot-details-view.detail-status-in_progress .slot-details-main,
body.page-schedule #slot-modal #slot-details-view.detail-status-in_progress .slot-details-aside,
body.page-schedule #slot-modal #slot-details-view.detail-status-done .slot-details-main,
body.page-schedule #slot-modal #slot-details-view.detail-status-done .slot-details-aside,
body.page-schedule #slot-modal #slot-details-view.detail-status-departed .slot-details-main,
body.page-schedule #slot-modal #slot-details-view.detail-status-departed .slot-details-aside,
body.page-schedule #slot-modal #slot-details-view.detail-status-blocked .slot-details-main,
body.page-schedule #slot-modal #slot-details-view.detail-status-blocked .slot-details-aside {
  border-color: color-mix(in srgb, var(--detail-glow-color) 58%, #d6e3f5 42%) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.90)),
    radial-gradient(circle at 0% 0%, rgba(var(--detail-glow-rgb), 0.16), transparent 34%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 16px 34px color-mix(in srgb, var(--detail-glow-color) 38%, transparent) !important;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-reserved .slot-detail-summary,
body.page-schedule #slot-modal #slot-details-view.detail-status-in_progress .slot-detail-summary,
body.page-schedule #slot-modal #slot-details-view.detail-status-done .slot-detail-summary,
body.page-schedule #slot-modal #slot-details-view.detail-status-departed .slot-detail-summary,
body.page-schedule #slot-modal #slot-details-view.detail-status-blocked .slot-detail-summary {
  background:
    linear-gradient(135deg, rgba(var(--detail-glow-rgb), 0.14), rgba(255, 255, 255, 0.92) 48%),
    #f7fbff !important;
  border-color: rgba(var(--detail-glow-rgb), 0.28) !important;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-reserved .detail-item,
body.page-schedule #slot-modal #slot-details-view.detail-status-in_progress .detail-item,
body.page-schedule #slot-modal #slot-details-view.detail-status-done .detail-item,
body.page-schedule #slot-modal #slot-details-view.detail-status-departed .detail-item,
body.page-schedule #slot-modal #slot-details-view.detail-status-blocked .detail-item {
  border-color: rgba(var(--detail-glow-rgb), 0.22) !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-reserved,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-in_progress,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-done,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-departed,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-blocked {
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--detail-glow-rgb), 0.20), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(var(--detail-glow-rgb), 0.16), transparent 30%),
    linear-gradient(135deg, rgba(var(--detail-glow-rgb), 0.10), rgba(15, 23, 42, 0.94) 46%, rgba(9, 14, 24, 0.94)) !important;
  box-shadow:
    0 26px 78px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.075) inset,
    0 0 0 4px color-mix(in srgb, var(--detail-glow-color) 48%, transparent),
    0 0 58px var(--detail-glow-color) !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-reserved .slot-details-main,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-reserved .slot-details-aside,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-in_progress .slot-details-main,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-in_progress .slot-details-aside,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-done .slot-details-main,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-done .slot-details-aside,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-departed .slot-details-main,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-departed .slot-details-aside,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-blocked .slot-details-main,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-blocked .slot-details-aside {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(12, 18, 30, 0.94)),
    radial-gradient(circle at 0% 0%, rgba(var(--detail-glow-rgb), 0.14), transparent 34%) !important;
}

/* Keep right details panel neutral (no red/pink tint from status glow). [refresh-bust-2026-04-16] */
body.page-schedule #slot-modal #slot-details-view .slot-details-aside,
body.page-schedule #slot-modal #slot-details-view.detail-status-reserved .slot-details-aside,
body.page-schedule #slot-modal #slot-details-view.detail-status-in_progress .slot-details-aside,
body.page-schedule #slot-modal #slot-details-view.detail-status-done .slot-details-aside,
body.page-schedule #slot-modal #slot-details-view.detail-status-departed .slot-details-aside,
body.page-schedule #slot-modal #slot-details-view.detail-status-blocked .slot-details-aside {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.94)) !important;
}

body.page-schedule #slot-modal #slot-details-view .slot-details-aside .slot-aside-hero__badge--stage,
body.page-schedule #slot-modal #slot-details-view.detail-status-reserved .slot-details-aside .slot-aside-hero__badge--stage {
  background: rgba(255, 255, 255, 0.88) !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-details-view .slot-details-aside,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-reserved .slot-details-aside,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-in_progress .slot-details-aside,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-done .slot-details-aside,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-departed .slot-details-aside,
body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.detail-status-blocked .slot-details-aside {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(12, 18, 30, 0.94)) !important;
}

/* Schedule status palette override:
   reserved/waiting=red, in progress=orange, done/departed=green, blocked=gray. */
body.page-schedule .slot.reserved {
  --slot-glow-color: rgba(239, 68, 68, 0.36) !important;
  background: linear-gradient(180deg, #fecaca, #fee2e2) !important;
  border-color: rgba(239, 68, 68, 0.34) !important;
  color: #7f1d1d !important;
}

body.page-schedule .slot.waiting {
  --slot-glow-color: rgba(182, 162, 222, 0.46) !important;
  background: linear-gradient(180deg, #ddd6fe, #ede9fe) !important;
  border-color: rgba(182, 162, 222, 0.50) !important;
  color: #5b21b6 !important;
}

body.page-schedule .slot.in_progress {
  --slot-glow-color: rgba(234, 179, 8, 0.40) !important;
  background: linear-gradient(180deg, #fef08a, #fef9c3) !important;
  border-color: rgba(234, 179, 8, 0.42) !important;
  color: #713f12 !important;
}

body.page-schedule .slot.done {
  --slot-glow-color: rgba(180, 83, 9, 0.42) !important;
  background: linear-gradient(180deg, #fdba74, #fed7aa) !important;
  border-color: rgba(180, 83, 9, 0.44) !important;
  color: #7c2d12 !important;
}

body.page-schedule .slot.departed {
  --slot-glow-color: rgba(34, 197, 94, 0.34) !important;
  background: linear-gradient(180deg, #bbf7d0, #dcfce7) !important;
  border-color: rgba(34, 197, 94, 0.34) !important;
  color: #14532d !important;
}

body.page-schedule .slot.blocked {
  --slot-glow-color: rgba(148, 163, 184, 0.24) !important;
  background:
    repeating-linear-gradient(
      -45deg,
      #e5e7eb 0 8px,
      #f1f5f9 8px 16px
    ) !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
  color: #475569 !important;
}

body.page-schedule .slot.occupied {
  background: #dbe4ff !important;
  color: #1e3a8a !important;
  border-color: #93a4e0 !important;
  cursor: default;
  box-shadow: none !important;
}
body.page-schedule .slot.occupied:hover {
  transform: none;
  box-shadow: none !important;
}
body.page-schedule .slot.occupied .slot-label {
  color: #1e3a8a !important;
}

body.page-schedule .slot.blocked::after {
  content: "\1F512" !important;
  position: absolute;
  top: 6px;
  right: 7px;
  font-size: 12px;
  line-height: 1;
  opacity: .86;
  pointer-events: none;
}

body[data-theme="dark"].page-schedule .slot .slot-label,
body[data-theme="dark"].page-schedule .slot .slot-label--primary,
body[data-theme="dark"].page-schedule .slot .slot-reservation-code,
body[data-theme="dark"].page-schedule .slot .slot-reservation-code--secondary,
body[data-theme="dark"].page-schedule .slot .slot-meta {
  color: #0f172a !important;
}

body[data-theme="dark"].page-schedule .slot.blocked {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(51, 65, 85, .95) 0 8px,
      rgba(71, 85, 105, .9) 8px 16px
    ) !important;
  border-color: rgba(148, 163, 184, .45) !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"].page-schedule .slot.blocked .slot-label,
body[data-theme="dark"].page-schedule .slot.blocked .slot-label--primary,
body[data-theme="dark"].page-schedule .slot.blocked .slot-meta,
body[data-theme="dark"].page-schedule .slot.blocked .slot-reservation-code {
  color: #e2e8f0 !important;
}

body[data-theme="dark"].page-schedule .slot.blocked::after {
  color: #e2e8f0;
}

body[data-theme="dark"].page-schedule .slot.occupied {
  background: #243056 !important;
  color: #e0e7ff !important;
  border-color: #6474b3 !important;
}
body[data-theme="dark"].page-schedule .slot.occupied .slot-label,
body[data-theme="dark"].page-schedule .slot.occupied .slot-label--primary {
  color: #e0e7ff !important;
}

/* Dark mode: make schedule hours clearly visible (normal + mini slots). */
body[data-theme="dark"].page-schedule .hour-cell,
body[data-theme="dark"].page-schedule .schedule-mode-minislots .hour-cell {
  color: #f8fafc !important;
  text-shadow: 0 1px 2px rgba(2, 6, 23, 0.45);
}

/* Dark mode: better contrast in reservation details right panel. */
body[data-theme="dark"].page-schedule #slot-modal .slot-details-aside .slot-aside-hero__badge,
body[data-theme="dark"].page-schedule #slot-modal .slot-details-aside .slot-aside-kpi,
body[data-theme="dark"].page-schedule #slot-modal .slot-details-aside .slot-aside-list__row,
body[data-theme="dark"].page-schedule #slot-modal .slot-details-aside .slot-aside-chip {
  background: rgba(15, 23, 42, 0.78) !important;
  border-color: rgba(125, 146, 180, 0.42) !important;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-details-aside .slot-aside-hero__value .status-pill,
body[data-theme="dark"].page-schedule #slot-modal .slot-details-aside .slot-aside-kpi .status-pill,
body[data-theme="dark"].page-schedule #slot-modal .slot-details-aside .slot-aside-list__row .status-pill {
  background: rgba(127, 29, 29, 0.34) !important;
  border-color: rgba(248, 113, 113, 0.42) !important;
  color: #fecaca !important;
}

body.page-schedule .slot.waiting,
body.page-schedule .slot-wrapper.slot-span .slot.waiting {
  width: calc(100% + 10px);
  margin-left: -5px;
  margin-right: -5px;
  padding-left: 12px;
  padding-right: 12px;
  position: relative;
  z-index: 1;
}

body.page-schedule .slot-wrapper:has(.slot.waiting) {
  overflow: visible !important;
}

body.page-schedule .slot.waiting {
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset,
    0 0 0 3px color-mix(in srgb, var(--slot-glow-color) 72%, transparent),
    0 0 30px var(--slot-glow-color) !important;
}

body.page-schedule .slot.waiting:hover {
  transform: translateY(-1px) !important;
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.20),
    0 0 0 1px rgba(255, 255, 255, 0.82) inset,
    0 0 0 4px color-mix(in srgb, var(--slot-glow-color) 78%, transparent),
    0 0 42px var(--slot-glow-color) !important;
}

body.page-schedule .status-pill.reserved,
body.page-schedule .legend .status-pill.reserved {
  color: #7f1d1d !important;
  background: rgba(254, 202, 202, 0.96) !important;
  border-color: rgba(239, 68, 68, 0.38) !important;
}

body.page-schedule .status-pill.waiting,
body.page-schedule .legend .status-pill.waiting {
  color: #5b21b6 !important;
  background: rgba(237, 233, 254, 0.98) !important;
  border-color: rgba(182, 162, 222, 0.48) !important;
}

body.page-schedule .status-pill.in_progress,
body.page-schedule .legend .status-pill.in_progress {
  color: #713f12 !important;
  background: rgba(254, 249, 195, 0.98) !important;
  border-color: rgba(234, 179, 8, 0.44) !important;
}

body.page-schedule .status-pill.done,
body.page-schedule .legend .status-pill.done {
  color: #7c2d12 !important;
  background: rgba(254, 215, 170, 0.98) !important;
  border-color: rgba(180, 83, 9, 0.44) !important;
}

body.page-schedule .status-pill.departed,
body.page-schedule .legend .status-pill.departed {
  color: #14532d !important;
  background: rgba(220, 252, 231, 0.96) !important;
  border-color: rgba(34, 197, 94, 0.36) !important;
}

body.page-schedule .status-pill.blocked,
body.page-schedule .legend .status-pill.blocked {
  color: #475569 !important;
  background: rgba(241, 245, 249, 0.96) !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--reserved { background: #ef4444 !important; }
body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--waiting { background: #b6a2de !important; }
body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--in_progress { background: #eab308 !important; }
body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--done { background: #b45309 !important; }
body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--departed { background: #22c55e !important; }
body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--blocked { background: #64748b !important; }
body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--occupied { background: #4f46e5 !important; }

body.page-schedule .schedule-mode-minislots .slot-mini-mode.blocked .mini-slot {
  position: relative;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(226, 232, 240, .9) 0 7px,
      rgba(203, 213, 225, .9) 7px 14px
    ) !important;
  border-color: rgba(148, 163, 184, .55) !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode.blocked .mini-slot::after {
  content: "\1F512";
  position: absolute;
  right: 5px;
  top: 4px;
  font-size: 10px;
  line-height: 1;
  opacity: .85;
}

body[data-theme="dark"].page-schedule .schedule-mode-minislots .slot-mini-mode.blocked .mini-slot {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(51, 65, 85, .95) 0 7px,
      rgba(71, 85, 105, .92) 7px 14px
    ) !important;
  border-color: rgba(148, 163, 184, .45) !important;
}

body[data-theme="dark"].page-schedule .schedule-mode-minislots .slot-mini-mode.blocked .mini-slot::after {
  color: #e2e8f0;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-waiting {
  --detail-glow-color: rgba(182, 162, 222, 0.46);
  --detail-glow-rgb: 182, 162, 222;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--detail-glow-rgb), 0.24), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(var(--detail-glow-rgb), 0.18), transparent 30%),
    linear-gradient(135deg, rgba(var(--detail-glow-rgb), 0.12), rgba(248, 251, 255, 0.94) 42%, rgba(255, 255, 255, 0.88)) !important;
  border-color: rgba(var(--detail-glow-rgb), 0.30) !important;
  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset,
    0 0 0 4px rgba(var(--detail-glow-rgb), 0.16),
    0 0 54px var(--detail-glow-color) !important;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-departed {
  --detail-glow-color: rgba(34, 197, 94, 0.38);
  --detail-glow-rgb: 34, 197, 94;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-done {
  --detail-glow-color: rgba(180, 83, 9, 0.42);
  --detail-glow-rgb: 180, 83, 9;
}

/* Compact schedule density: keep more lines visible on one screen (desktop only). */
@media (min-width: 901px) {
body.page-schedule .group-body {
  grid-template-columns: 128px minmax(0, 1fr) !important;
  gap: 6px !important;
  padding: 7px !important;
}

body.page-schedule .line-item {
  min-height: 34px !important;
  padding: 5px 7px !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  border-radius: 8px !important;
}

body.page-schedule .line-title,
body.page-schedule .line-subtitle {
  line-height: 1.1 !important;
}

body.page-schedule .timeline-header,
body.page-schedule .timeline-row,
body.page-schedule .summary-row {
  gap: 4px !important;
}

body.page-schedule .hour-cell {
  min-height: 30px !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

body.page-schedule .slot {
  min-height: 42px !important;
  padding: 6px 7px !important;
}

body.page-schedule .schedule-mode-minislots .group-body {
  grid-template-columns: 106px minmax(0, 1fr) !important;
  gap: 5px !important;
  padding: 6px !important;
}

body.page-schedule .schedule-mode-minislots .line-item {
  min-height: 18px !important;
  padding: 2px 5px !important;
  font-size: 8.5px !important;
  line-height: 1 !important;
  border-radius: 6px !important;
}

body.page-schedule .schedule-mode-minislots .slot {
  min-height: 36px !important;
  padding: 4px 5px !important;
  border-radius: 9px !important;
}

body.page-schedule .schedule-mode-minislots .timeline-row {
  min-height: 40px !important;
}

body.page-schedule .schedule-mode-minislots .timeline-header,
body.page-schedule .schedule-mode-minislots .timeline-row,
body.page-schedule .schedule-mode-minislots .summary-row {
  grid-template-columns: repeat(24, minmax(66px, 1fr)) !important;
  gap: 2px !important;
}

body.page-schedule .schedule-mode-minislots .hour-cell {
  min-height: 25px !important;
  padding: 4px 0 !important;
  font-size: 10px !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot {
  gap: 5px !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot {
  width: 7px !important;
  height: 7px !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info strong {
  font-size: 9.5px !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info small {
  font-size: 8px !important;
}

/* Schedule wide-canvas mode: smaller sidebar + more room for 24 mini-slot hours. */
body.page-schedule .app-shell {
  grid-template-columns: 220px minmax(0, 1fr) !important;
}

body.page-schedule.sidebar-collapsed .app-shell {
  grid-template-columns: 70px minmax(0, 1fr) !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  width: 220px !important;
  min-width: 220px !important;
}

body.page-schedule.sidebar-collapsed .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  width: 70px !important;
  min-width: 70px !important;
}

body.page-schedule .app-shell > .main {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

body.page-schedule .topbar {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

body.page-schedule .schedule-toolbar,
body.page-schedule .day-title-row {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

body.page-schedule .schedule-mode-minislots .group-body {
  grid-template-columns: 90px minmax(0, 1fr) !important;
}

@media (min-width: 901px) {
  body.page-schedule .schedule-mode-minislots .timeline {
    overflow-x: hidden !important;
  }
}

body.page-schedule .schedule-mode-minislots .timeline-header,
body.page-schedule .schedule-mode-minislots .timeline-row,
body.page-schedule .schedule-mode-minislots .summary-row {
  grid-template-columns: repeat(24, minmax(42px, 1fr)) !important;
}

body.page-schedule .schedule-mode-minislots .slot {
  min-height: 32px !important;
  padding: 3px 4px !important;
}

body.page-schedule .schedule-mode-minislots .timeline-row {
  min-height: 36px !important;
}

body.page-schedule .schedule-mode-minislots .line-item {
  min-height: 16px !important;
  padding: 2px 4px !important;
  font-size: 8px !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot {
  gap: 3px !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot {
  width: 6px !important;
  height: 6px !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info strong {
  font-size: 8.5px !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-info small {
  font-size: 7.5px !important;
}

@media (max-width: 1380px) {
  body.page-schedule .app-shell {
    grid-template-columns: 196px minmax(0, 1fr) !important;
  }

  body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
    width: 196px !important;
    min-width: 196px !important;
  }

  body.page-schedule .schedule-mode-minislots .group-body {
    grid-template-columns: 78px minmax(0, 1fr) !important;
  }

  body.page-schedule .schedule-mode-minislots .timeline-header,
  body.page-schedule .schedule-mode-minislots .timeline-row,
  body.page-schedule .schedule-mode-minislots .summary-row {
    grid-template-columns: repeat(24, minmax(36px, 1fr)) !important;
  }
}
}

body.page-schedule #slot-modal #slot-details-view.detail-status-waiting::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--detail-glow-rgb), 0.34), transparent 24%),
    radial-gradient(circle at 50% 108%, rgba(var(--detail-glow-rgb), 0.20), transparent 46%);
  opacity: 0.95;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-waiting .slot-details-main,
body.page-schedule #slot-modal #slot-details-view.detail-status-waiting .slot-details-aside {
  border-color: rgba(var(--detail-glow-rgb), 0.28) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.90)),
    radial-gradient(circle at 0% 0%, rgba(var(--detail-glow-rgb), 0.16), transparent 34%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 16px 34px rgba(var(--detail-glow-rgb), 0.14) !important;
}

body.page-schedule #slot-modal .detail-list.is-times .detail-time-value {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

body.page-schedule #slot-modal .detail-list.is-times .detail-time-date {
  color: #1e293b;
}

body.page-schedule #slot-modal .detail-list.is-times .detail-time-hour {
  color: #0f4c81;
  font-weight: 800;
}

body[data-theme="dark"].page-schedule #slot-modal .detail-list.is-times .detail-time-date {
  color: #f8fafc;
}

body[data-theme="dark"].page-schedule #slot-modal .detail-list.is-times .detail-time-hour {
  color: #93c5fd;
}

/* ===== Sidebar overlap hotfix (zoom/scaling) =====
   Keep sidebar content inside its grid column so it never covers schedule/main. */
body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  overflow-x: hidden !important;
  overflow-y: visible !important;
  z-index: 4 !important;
}

body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  max-height: calc(100vh - 220px) !important;
  padding-right: 2px !important;
}

body.page-schedule .app-shell > .main {
  position: relative !important;
  z-index: 6 !important;
}

@media (max-height: 900px) {
  body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
    max-height: calc(100vh - 180px) !important;
  }
}

/* Sidebar: bez wewnetrznego scrolla (pelna lista menu). */
body .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  overflow-y: visible !important;
  max-height: none !important;
  padding-right: 0 !important;
}

/* ===== Slot modal anti-clipping (high browser zoom) =====
   Final override: keep popup inside viewport and always scrollable. */
body.page-schedule #slot-modal.active {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 10px !important;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern {
  width: min(1520px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100dvh - 20px) !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern .modal-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  flex: 0 0 auto !important;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern .modal-body {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

@media (max-width: 1280px), (min-resolution: 1.15dppx) {
  body.page-schedule #slot-modal .slot-details-layout {
    grid-template-columns: 1fr !important;
  }
  body.page-schedule #slot-modal .slot-detail-summary {
    grid-template-columns: 1fr !important;
  }
}

/* ===== Slot modal absolute final scroll fix (no .modal-body in markup) ===== */
body.page-schedule #slot-modal.active {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 10px !important;
}

body.page-schedule #slot-modal .modal-card.wide.slot-modern {
  width: min(1520px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100dvh - 20px) !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.page-schedule #slot-modal .modal-header,
body.page-schedule #slot-modal #slot-modal-error {
  flex: 0 0 auto !important;
}

body.page-schedule #slot-modal #slot-details-view,
body.page-schedule #slot-modal #slot-create-view,
body.page-schedule #slot-modal #slot-move-view {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

@media (max-width: 1280px), (min-resolution: 1.15dppx) {
  body.page-schedule #slot-modal .slot-details-layout {
    grid-template-columns: 1fr !important;
  }

  body.page-schedule #slot-modal .slot-detail-summary,
  body.page-schedule #slot-modal .slot-details-aside .slot-summary-grid.is-compact {
    grid-template-columns: 1fr !important;
  }
}

/* ===== Sidebar absolute final lock (no inner scroll, no clipped buttons) ===== */
body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  overflow-y: visible !important;
  height: auto !important;
  min-height: 100vh !important;
}

body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  max-height: none !important;
  min-height: auto !important;
  padding-right: 0 !important;
}

body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 .nav-link,
body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 40px !important;
  padding: 9px 12px !important;
  align-items: center !important;
}

body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 .nav-link > span:not(.menu-icon):not(.sidebar-link-badge),
body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link > span:not(.menu-icon):not(.sidebar-link-badge) {
  line-height: 1.25 !important;
  white-space: normal !important;
}

/* ===== Move reservation popup (Zmien godzine awizacji) ===== */
body.page-schedule #slot-modal #slot-move-view {
  display: grid;
  gap: 14px;
  padding: 8px 2px 2px;
}

body.page-schedule #slot-modal #slot-move-summary {
  border: 1px solid #d3e0f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
  box-shadow: 0 10px 24px rgba(20, 42, 84, 0.08);
}

body.page-schedule #slot-modal #slot-move-summary:empty {
  display: none;
}

body.page-schedule #slot-modal #slot-move-form {
  margin-top: 0 !important;
  border: 1px solid #d3e0f2;
  border-radius: 16px;
  padding: 14px;
  background: #f9fbff;
  box-shadow: 0 12px 26px rgba(20, 42, 84, 0.08);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.page-schedule #slot-modal #slot-move-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a7096;
}

body.page-schedule #slot-modal #slot-move-form input:not([type="checkbox"]),
body.page-schedule #slot-modal #slot-move-form select {
  min-height: 40px;
  border: 1px solid #cddcf0;
  border-radius: 10px;
  background: #ffffff;
  color: #1f3558;
  font-weight: 600;
  padding: 9px 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.page-schedule #slot-modal #slot-move-form input:not([type="checkbox"]):focus,
body.page-schedule #slot-modal #slot-move-form select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

body.page-schedule #slot-modal #slot-move-form .check-chip {
  align-self: end !important;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid #d4deec;
  background: #ffffff;
  color: #3d5277;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

body.page-schedule #slot-modal #slot-move-form .actions {
  grid-column: 1 / -1 !important;
  margin-top: 4px;
  gap: 10px;
}

body.page-schedule #slot-modal #slot-move-form .actions .btn-primary,
body.page-schedule #slot-modal #slot-move-form .actions .btn-secondary {
  min-height: 40px;
  border-radius: 11px;
}

@media (max-width: 960px), (min-resolution: 1.2dppx) {
  body.page-schedule #slot-modal #slot-move-form {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"].page-schedule #slot-modal #slot-move-summary {
  border-color: rgba(100, 116, 139, 0.38);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.64));
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.38);
}

body[data-theme="dark"].page-schedule #slot-modal #slot-move-form {
  border-color: rgba(100, 116, 139, 0.40);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.40);
}

body[data-theme="dark"].page-schedule #slot-modal #slot-move-form label {
  color: #9fb6dc;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-move-form input:not([type="checkbox"]),
body[data-theme="dark"].page-schedule #slot-modal #slot-move-form select {
  border-color: rgba(100, 116, 139, 0.44);
  background: rgba(15, 23, 42, 0.82);
  color: #e6edf8;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-move-form .check-chip {
  border-color: rgba(100, 116, 139, 0.44);
  background: rgba(15, 23, 42, 0.78);
  color: #c8d6ee;
}


/* Slot details/history: inline user avatar + name */
body.page-schedule #slot-modal .slot-user-inline,
body.page-schedule #slot-history-modal .slot-user-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.page-schedule #slot-modal .slot-user-inline__meta,
body.page-schedule #slot-history-modal .slot-user-inline__meta {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}

body.page-schedule #slot-modal .slot-user-inline__meta strong,
body.page-schedule #slot-history-modal .slot-user-inline__meta strong {
  font-size: 0.92rem;
  font-weight: 700;
}

body.page-schedule #slot-modal .slot-user-inline__meta small,
body.page-schedule #slot-history-modal .slot-user-inline__meta small {
  font-size: 0.72rem;
  color: #64748b;
}

body.page-schedule #slot-modal .slot-user-avatar,
body.page-schedule #slot-history-modal .slot-user-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

body.page-schedule #slot-modal .slot-user-avatar img,
body.page-schedule #slot-history-modal .slot-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.page-schedule #slot-modal .slot-user-avatar--fallback,
body.page-schedule #slot-history-modal .slot-user-avatar--fallback {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1e3a8a;
}

body.page-schedule #slot-modal .slot-user-avatar--system,
body.page-schedule #slot-history-modal .slot-user-avatar--system {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

body.page-schedule #slot-modal .slot-user-inline--system .slot-user-inline__meta strong,
body.page-schedule #slot-history-modal .slot-user-inline--system .slot-user-inline__meta strong {
  color: #1e3a8a;
}

body.page-schedule #slot-modal .sa-list-row--system .slot-aside-list__label,
body.page-schedule #slot-history-modal .sa-list-row--system .slot-aside-list__label {
  color: #1d4ed8;
  font-weight: 700;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-user-avatar--system,
body[data-theme="dark"].page-schedule #slot-history-modal .slot-user-avatar--system {
  color: #93c5fd;
  background: rgba(30, 58, 138, 0.35);
  border-color: rgba(96, 165, 250, 0.35);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-user-inline--system .slot-user-inline__meta strong,
body[data-theme="dark"].page-schedule #slot-history-modal .slot-user-inline--system .slot-user-inline__meta strong {
  color: #dbeafe;
}

body[data-theme="dark"].page-schedule #slot-modal .sa-list-row--system .slot-aside-list__label,
body[data-theme="dark"].page-schedule #slot-history-modal .sa-list-row--system .slot-aside-list__label {
  color: #93c5fd;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-user-inline__meta small,
body[data-theme="dark"].page-schedule #slot-history-modal .slot-user-inline__meta small {
  color: #94a3b8;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-user-avatar,
body[data-theme="dark"].page-schedule #slot-history-modal .slot-user-avatar {
  border-color: rgba(148, 163, 184, 0.45);
  background: #334155;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-user-avatar--fallback,
body[data-theme="dark"].page-schedule #slot-history-modal .slot-user-avatar--fallback {
  color: #dbeafe;
}

/* Reservation create/edit (Variant B): keep full horizontal width */
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b {
  zoom: 1;
}

@supports not (zoom: 1) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b {
    transform: none;
    width: 100%;
  }
}

body.page-schedule #slot-modal .slot-detail-tab.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}

body.page-schedule #slot-modal .slot-detail-inline-form {
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

body.page-schedule #slot-modal .slot-detail-inline-head {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #bfd2f5;
  border-radius: 14px;
  background: #f6faff;
}

body.page-schedule #slot-modal .slot-detail-inline-head strong {
  font-size: 14px;
  color: #1f2a44;
}

body.page-schedule #slot-modal .slot-detail-inline-head span {
  font-size: 12px;
  color: #56719e;
}

body.page-schedule #slot-modal .slot-detail-inline-upgrade {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body.page-schedule #slot-modal .slot-detail-inline-upgrade small {
  font-size: 11px;
  color: #5f79a7;
}

body.page-schedule #slot-modal .slot-detail-inline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.page-schedule #slot-modal .slot-detail-inline-section {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px 0;
  border-bottom: 1px dashed #ccdaef;
}

body.page-schedule #slot-modal .slot-detail-inline-section strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #355584;
}

body.page-schedule #slot-modal .slot-detail-inline-section span {
  font-size: 12px;
  color: #6f88b0;
}

body.page-schedule #slot-modal .slot-detail-inline-field {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #bfd2f5;
  border-radius: 12px;
  background: #f9fcff;
}

body.page-schedule #slot-modal .slot-detail-inline-field--full {
  grid-column: 1 / -1;
}

body.page-schedule #slot-modal .slot-detail-inline-field > span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  color: #5c7bae;
}

body.page-schedule #slot-modal .slot-detail-inline-field input,
body.page-schedule #slot-modal .slot-detail-inline-field select,
body.page-schedule #slot-modal .slot-detail-inline-field textarea {
  border: 1px solid #b6cdf2;
  border-radius: 10px;
  background: #fff;
  color: #18263f;
  padding: 9px 10px;
  font-size: 14px;
  min-height: 38px;
}

body.page-schedule #slot-modal .slot-detail-inline-field textarea {
  min-height: 82px;
  resize: vertical;
}

body.page-schedule #slot-modal .slot-detail-inline-field input[readonly] {
  background: #eef4ff;
  color: #3b4f70;
}

body.page-schedule #slot-modal .slot-detail-inline-sync {
  padding: 10px 12px;
  border: 1px dashed #b8caec;
  border-radius: 12px;
  background: #f8fbff;
}

body.page-schedule #slot-modal .slot-detail-inline-sync label {
  display: grid;
  gap: 6px;
}

body.page-schedule #slot-modal .slot-detail-inline-sync span {
  font-size: 12px;
  font-weight: 700;
  color: #43608f;
}

body.page-schedule #slot-modal .slot-detail-inline-sync select {
  max-width: 320px;
  border: 1px solid #b6cdf2;
  border-radius: 10px;
  min-height: 38px;
  padding: 8px 10px;
}

body.page-schedule #slot-modal .slot-detail-inline-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 1200px) {
  body.page-schedule #slot-modal .slot-detail-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.page-schedule #slot-modal .slot-detail-inline-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.page-schedule #slot-modal .slot-detail-inline-actions {
    justify-content: stretch;
  }
  body.page-schedule #slot-modal .slot-detail-inline-actions .btn-primary,
  body.page-schedule #slot-modal .slot-detail-inline-actions .btn-secondary {
    flex: 1;
  }
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-head,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-field,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-sync {
  background: #1b2436;
  border-color: #334665;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-head strong,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-field > span,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-sync span {
  color: #a9c3ef;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-section {
  border-bottom-color: #314468;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-section strong {
  color: #b4cdf3;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-section span {
  color: #8faad4;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-head span {
  color: #89a7da;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-upgrade small {
  color: #89a7da;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-field input,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-field select,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-field textarea,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-sync select {
  background: #0f1727;
  border-color: #314468;
  color: #e2ebff;
}

/* Skrocony tryb konwersji single -> shuttle: tylko wybor 2. okna + zapis */
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-create-v3-top,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-create-progress,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-create-v3-grid {
  display: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick > #slot-create-form {
  grid-column: 1 / -1 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-create-shuttle {
  order: 1;
  gap: 12px;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--operations {
  order: 2;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--actions {
  order: 4;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-create-shuttle {
  margin-top: 0;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick #slot-shuttle-target-shell {
  border-color: #c7daf9 !important;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%) !important;
  box-shadow: 0 8px 22px rgba(44, 93, 175, 0.09);
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick #slot-shuttle-target-shell .slot-form-shell__header h4 {
  font-size: 31px;
  letter-spacing: -0.01em;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick #slot-shuttle-target-shell .slot-form-shell__eyebrow {
  background: #e8f1ff;
  border-color: #c8dcff;
  color: #2b63c9;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--operations {
  border-color: #d2e0f8 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--operations::before {
  content: "Krok 2: uzupelnij dane glownej operacji dla aktualnej nogi wahadla.";
  background: #eef5ff;
  border-color: #d4e3fb;
  color: #49638d;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--actions {
  border-color: #d8e4f7 !important;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f8ff 100%) !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-create-actions {
  justify-content: flex-end;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick.is-shuttle-quick-awaiting-target .slot-create-grid--paired > :not(#slot-shuttle-target-shell):not(#shuttle-target-board) {
  display: none !important;
}

/* Existing reservation -> shuttle quick mode: force full width (no empty right side). */
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-create-grid--paired {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick #slot-shuttle-target-shell,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick #shuttle-target-board {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-create-v3-grid,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-create-shuttle,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--operations,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--actions {
  width: 100% !important;
  max-width: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--transport-main {
  display: none !important;
}

body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick.is-shuttle-quick-awaiting-target .slot-form-shell--operations,
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick.is-shuttle-quick-awaiting-target .slot-form-shell--transport-main {
  display: none !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick #slot-shuttle-target-shell {
  background: linear-gradient(180deg, #14233f 0%, #101d33 100%) !important;
  border-color: #3c5b96 !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--operations {
  background: linear-gradient(180deg, #101b2f 0%, #0f192a 100%) !important;
  border-color: #334a72 !important;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--operations::before {
  background: #14233c;
  border-color: #2f4b78;
  color: #9db6dd;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick .slot-form-shell--actions {
  background: linear-gradient(180deg, #0f1828 0%, #0d1624 100%) !important;
  border-color: #2f456b !important;
}

/* PP2 loading/unloading planning board */
.loading-plan-page {
  display: grid;
  gap: 18px;
}

.loading-plan-add-btn {
  margin-top: 14px;
  min-width: 190px;
}

.loading-plan-hero {
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, .42);
  background:
    radial-gradient(circle at 8% 10%, rgba(59, 130, 246, .16), transparent 30%),
    radial-gradient(circle at 96% 0%, rgba(225, 29, 72, .12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(241, 247, 255, .9));
}

.loading-plan-eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef5ff;
  color: #2455c8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.loading-plan-hero h1 {
  margin: 0;
  color: #0f172a;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -.04em;
}

.loading-plan-hero p {
  max-width: 780px;
  margin: 8px 0 0;
  color: #52647f;
  font-size: 14px;
  line-height: 1.55;
}

.loading-plan-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 10px;
  min-width: min(520px, 100%);
}

.loading-plan-stats > div {
  border: 1px solid rgba(191, 219, 254, .78);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 14px 32px rgba(37, 99, 235, .08);
}

.loading-plan-stats strong,
.loading-plan-stats span {
  display: block;
}

.loading-plan-stats strong {
  color: #13213a;
  font-size: 25px;
  line-height: 1;
}

.loading-plan-stats span {
  margin-top: 6px;
  color: #63728c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.loading-plan-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  width: 100%;
  min-height: 320px;
}

.loading-plan-modal {
  position: fixed;
  inset: 0;
  z-index: 4600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px;
}

.loading-plan-modal.is-active {
  display: flex;
}

.loading-plan-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(10px);
}

.loading-plan-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100vw - 36px));
  max-height: min(88vh, 920px);
  overflow: auto;
}

.loading-plan-modal__close {
  flex: 0 0 auto;
}

.loading-plan-form,
.loading-plan-list {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border: 1px solid rgba(188, 212, 248, .8);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 20px 55px rgba(15, 23, 42, .08);
}

.loading-plan-form {
  padding: 18px;
}

.loading-plan-form__head,
.loading-plan-list__head,
.loading-plan-actions,
.loading-plan-item__top,
.loading-plan-item__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading-plan-form__head,
.loading-plan-list__head {
  justify-content: space-between;
  margin-bottom: 16px;
}

.loading-plan-form__head span {
  color: #dc2626;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.loading-plan-form__head h2,
.loading-plan-list__head h2 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 21px;
  letter-spacing: -.02em;
}

.loading-plan-list__head p {
  max-width: 640px;
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
}

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

.loading-plan-grid label,
.loading-plan-filter input,
.loading-plan-filter select {
  min-width: 0;
}

.loading-plan-grid label {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(191, 219, 254, .85);
  border-radius: 16px;
  padding: 11px;
  background: linear-gradient(180deg, #fbfdff, #f6f9ff);
  color: #58709a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.loading-plan-grid .span-2 {
  grid-column: 1 / -1;
}

.loading-plan-grid input,
.loading-plan-grid select,
.loading-plan-grid textarea,
.loading-plan-filter input,
.loading-plan-filter select {
  width: 100%;
  border: 1px solid #c8d8ef;
  border-radius: 12px;
  padding: 10px 11px;
  background: #fff;
  color: #0f172a;
  font: 700 13px/1.35 "Manrope", sans-serif;
  text-transform: none;
}

.loading-plan-grid textarea {
  resize: vertical;
}

.loading-plan-actions {
  justify-content: flex-end;
  margin-top: 14px;
  flex-wrap: wrap;
}

.loading-plan-list {
  padding: 12px;
}

.loading-plan-filter {
  display: grid;
  grid-template-columns: 150px 190px minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: min(760px, 100%);
}

.loading-plan-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: -5px 0 10px;
  padding: 7px 8px;
  border: 1px solid #dbe8f8;
  border-radius: 12px;
  background: rgba(248, 251, 255, .9);
  color: #526783;
  font-size: 10.5px;
  font-weight: 800;
}

.loading-plan-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid #e2ebf7;
  border-radius: 999px;
  background: #fff;
}

.loading-plan-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.loading-plan-legend i.loading-plan-status--loaded,
.loading-plan-legend i.loading-plan-status--unloaded {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .14);
}

.loading-plan-legend i.loading-plan-status--cancelled {
  background: #64748b;
  box-shadow: 0 0 0 2px rgba(100, 116, 139, .14);
}

.loading-plan-legend i.loading-plan-status--no_order,
.loading-plan-legend i.loading-plan-status--no_goods {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .14);
}

.loading-plan-legend i.loading-plan-status--info {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .16);
}

.loading-plan-legend b {
  color: #1d4ed8;
  font-weight: 950;
}

.loading-plan-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 160px;
  border: 1px dashed #bfd4f5;
  border-radius: 18px;
  background: #f8fbff;
  color: #64748b;
  text-align: center;
}

.loading-plan-empty strong {
  color: #1f3d72;
}

.loading-plan-items {
  display: grid;
  gap: 7px;
}

.loading-plan-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 76px minmax(0, 1fr) 108px;
  gap: 8px;
  border: 1px solid rgba(191, 219, 254, .9);
  border-left: 4px solid #2563eb;
  border-radius: 13px;
  padding: 7px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

.loading-plan-item.is-dragging {
  opacity: .62;
  transform: scale(.992);
}

.loading-plan-drag-handle {
  align-self: stretch;
  width: 28px;
  border: 1px dashed #b8cdf0;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff, #edf4ff);
  color: #315b9f;
  cursor: grab;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -2px;
}

.loading-plan-drag-handle:active {
  cursor: grabbing;
}

.loading-plan-item__time {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 68px;
  border-radius: 11px;
  background: linear-gradient(180deg, #eef5ff, #dfeeff);
  color: #2854b8;
}

.loading-plan-item__time strong {
  font-size: 17px;
  letter-spacing: -.03em;
}

.loading-plan-item__time span {
  color: #5d6f91;
  font-size: 10px;
  font-weight: 900;
}

.loading-plan-item__body h3 {
  margin: 4px 0 1px;
  color: #111827;
  font-size: 15px;
}

.loading-plan-item__body p {
  margin: 0 0 6px;
  color: #4b5d7a;
  font-size: 11px;
  white-space: pre-wrap;
}

.loading-plan-badge,
.loading-plan-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 900;
}

.loading-plan-chip {
  border: 1px solid #cbdaf0;
  background: #f7fbff;
  color: #355279;
}

.loading-plan-chip.is-linked {
  border-color: #9ed3ff;
  background: #e8f7ff;
  color: #075985;
}

.loading-plan-status--planned {
  border-left-color: #2563eb;
}

.loading-plan-badge.loading-plan-status--planned {
  background: #2563eb;
  color: #fff;
}

.loading-plan-status--loaded,
.loading-plan-status--unloaded {
  border-left-color: #16a34a;
}

.loading-plan-badge.loading-plan-status--loaded,
.loading-plan-badge.loading-plan-status--unloaded {
  background: #16a34a;
  color: #fff;
}

.loading-plan-status--cancelled {
  border-left-color: #64748b;
  opacity: .76;
}

.loading-plan-badge.loading-plan-status--cancelled {
  background: #64748b;
  color: #fff;
}

.loading-plan-status--no_order,
.loading-plan-status--no_goods {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, #fff 0%, #fff1f2 100%);
}

.loading-plan-badge.loading-plan-status--no_order,
.loading-plan-badge.loading-plan-status--no_goods {
  background: #dc2626;
  color: #fff;
}

.loading-plan-status--info {
  border-left-color: #f59e0b;
}

.loading-plan-badge.loading-plan-status--info {
  background: #f59e0b;
  color: #fff;
}

.loading-plan-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 5px;
}

.loading-plan-meta span {
  border: 1px solid #e2ebf7;
  border-radius: 9px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, .72);
  color: #64748b;
  font-size: 10.5px;
  line-height: 1.25;
}

.loading-plan-meta strong {
  color: #16243b;
}

.loading-plan-notes {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.loading-plan-notes span {
  border-radius: 8px;
  padding: 5px 8px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 10.5px;
  line-height: 1.32;
}

.loading-plan-item__body small {
  display: block;
  margin-top: 5px;
  color: #7d8ca6;
  font-size: 9.5px;
}

.loading-plan-item__actions {
  align-self: center;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
}

.loading-plan-item__actions form,
.loading-plan-item__actions a,
.loading-plan-item__actions button {
  width: 100%;
}

.loading-plan-item__actions .btn-secondary,
.loading-plan-item__actions .btn-danger {
  min-height: 30px;
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 11px;
  line-height: 1.1;
}

.loading-plan-quick-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  width: 100%;
}

.loading-plan-quick-select {
  width: 100%;
  min-height: 30px;
  border: 1px solid #c8d8ef;
  border-radius: 10px;
  padding: 5px 8px;
  background: #fff;
  color: #0f172a;
  font: 700 11px/1.2 "Manrope", sans-serif;
}

.loading-plan-quick-select--planned {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.loading-plan-quick-select--loaded,
.loading-plan-quick-select--unloaded {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.loading-plan-quick-select--cancelled {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.loading-plan-quick-select--no_order,
.loading-plan-quick-select--no_goods {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.loading-plan-quick-select--info {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.loading-plan-quick-btn {
  min-height: 30px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  padding: 4px 6px !important;
}

.loading-plan-item.loading-plan-status--planned {
  border-left-color: #2563eb;
}

.loading-plan-item.loading-plan-status--loaded,
.loading-plan-item.loading-plan-status--unloaded {
  border-left-color: #16a34a;
}

.loading-plan-item.loading-plan-status--no_order,
.loading-plan-item.loading-plan-status--no_goods {
  border-left-color: #dc2626;
  background:
    linear-gradient(90deg, rgba(220, 38, 38, .08), transparent 24%),
    rgba(255, 255, 255, .92);
}

.loading-plan-item.loading-plan-status--info {
  border-left-color: #f59e0b;
  background:
    linear-gradient(90deg, rgba(245, 158, 11, .1), transparent 24%),
    rgba(255, 255, 255, .92);
}

body[data-theme="dark"] .loading-plan-hero,
body[data-theme="dark"] .loading-plan-form,
body[data-theme="dark"] .loading-plan-list {
  border-color: #263a5d;
  background:
    radial-gradient(circle at 8% 10%, rgba(59, 130, 246, .18), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(12, 20, 35, .94));
}

body[data-theme="dark"] .loading-plan-hero h1,
body[data-theme="dark"] .loading-plan-form__head h2,
body[data-theme="dark"] .loading-plan-list__head h2,
body[data-theme="dark"] .loading-plan-item__body h3,
body[data-theme="dark"] .loading-plan-meta strong {
  color: #eef5ff;
}

body[data-theme="dark"] .loading-plan-hero p,
body[data-theme="dark"] .loading-plan-list__head p,
body[data-theme="dark"] .loading-plan-item__body p,
body[data-theme="dark"] .loading-plan-meta span,
body[data-theme="dark"] .loading-plan-item__body small {
  color: #9fb2d2;
}

body[data-theme="dark"] .loading-plan-stats > div,
body[data-theme="dark"] .loading-plan-grid label,
body[data-theme="dark"] .loading-plan-item,
body[data-theme="dark"] .loading-plan-meta span {
  border-color: #2a4167;
  background: #111c30;
}

body[data-theme="dark"] .loading-plan-stats strong {
  color: #eef5ff;
}

body[data-theme="dark"] .loading-plan-grid input,
body[data-theme="dark"] .loading-plan-grid select,
body[data-theme="dark"] .loading-plan-grid textarea,
body[data-theme="dark"] .loading-plan-filter input,
body[data-theme="dark"] .loading-plan-filter select {
  border-color: #38527c;
  background: #0d1728;
  color: #f3f7ff;
}

body[data-theme="dark"] .loading-plan-empty,
body[data-theme="dark"] .loading-plan-item__time,
body[data-theme="dark"] .loading-plan-chip,
body[data-theme="dark"] .loading-plan-drag-handle,
body[data-theme="dark"] .loading-plan-legend,
body[data-theme="dark"] .loading-plan-legend span,
body[data-theme="dark"] .loading-plan-quick-select {
  border-color: #30486f;
  background: #0d1728;
  color: #cfe0ff;
}

body[data-theme="dark"] .loading-plan-quick-select--planned {
  background: rgba(37, 99, 235, .22);
  border-color: rgba(59, 130, 246, .55);
  color: #bfdbfe;
}

body[data-theme="dark"] .loading-plan-quick-select--loaded,
body[data-theme="dark"] .loading-plan-quick-select--unloaded {
  background: rgba(22, 163, 74, .2);
  border-color: rgba(34, 197, 94, .5);
  color: #bbf7d0;
}

body[data-theme="dark"] .loading-plan-quick-select--cancelled {
  background: rgba(100, 116, 139, .22);
  border-color: rgba(148, 163, 184, .5);
  color: #cbd5e1;
}

body[data-theme="dark"] .loading-plan-quick-select--no_order,
body[data-theme="dark"] .loading-plan-quick-select--no_goods {
  background: rgba(220, 38, 38, .22);
  border-color: rgba(248, 113, 113, .55);
  color: #fecaca;
}

body[data-theme="dark"] .loading-plan-quick-select--info {
  background: rgba(245, 158, 11, .24);
  border-color: rgba(251, 191, 36, .55);
  color: #fde68a;
}

/* Plan Wahadel - modern UI polish */
body.page-pp2-plan .loading-plan-page {
  padding: 14px 16px 22px;
}

body.page-pp2-plan .loading-plan-hero {
  border-radius: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(178, 203, 238, .95);
  background:
    radial-gradient(circle at 88% 12%, rgba(37, 99, 235, .08), transparent 28%),
    radial-gradient(circle at 12% 88%, rgba(16, 185, 129, .07), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(248, 252, 255, .9));
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

body.page-pp2-plan .loading-plan-hero h1 {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(30px, 2.15vw, 40px);
  letter-spacing: -.025em;
}

body.page-pp2-plan .loading-plan-hero p {
  max-width: 920px;
  font-size: 13px;
}

body.page-pp2-plan .loading-plan-eyebrow {
  border-radius: 999px;
  padding: 5px 11px;
  border: 1px solid #b8cdf3;
  background: #edf4ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

body.page-pp2-plan .loading-plan-add-btn {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 14px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .2);
}

body.page-pp2-plan .loading-plan-stats {
  gap: 8px;
}

body.page-pp2-plan .loading-plan-stats > div {
  min-width: 110px;
  border-radius: 14px;
  border-color: #c6daf6;
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
}

body.page-pp2-plan .loading-plan-stats strong {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 33px;
}

body.page-pp2-plan .loading-plan-list {
  border-radius: 18px;
  padding: 11px;
}

body.page-pp2-plan .loading-plan-list__head {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: -2px -2px 8px;
  padding: 8px 8px 9px;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  background: rgba(250, 253, 255, .86);
}

body.page-pp2-plan .loading-plan-list__head h2 {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 31px;
  letter-spacing: -.03em;
}

body.page-pp2-plan .loading-plan-list__head p {
  margin-top: 3px;
  font-size: 12px;
}

body.page-pp2-plan .loading-plan-filter {
  grid-template-columns: 132px 170px minmax(170px, 1fr) auto;
  gap: 7px;
  min-width: min(690px, 100%);
}

body.page-pp2-plan .loading-plan-filter input,
body.page-pp2-plan .loading-plan-filter select {
  min-height: 34px;
  border-radius: 11px;
  font-size: 12px;
}

body.page-pp2-plan .loading-plan-legend {
  margin: 0 0 8px;
  padding: 7px;
  border-radius: 11px;
}

body.page-pp2-plan .loading-plan-item {
  border-radius: 12px;
  padding: 6px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body.page-pp2-plan .loading-plan-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
  border-color: #93c5fd;
}

body.page-pp2-plan .loading-plan-item__time {
  border-radius: 10px;
  min-height: 64px;
}

body.page-pp2-plan .loading-plan-item__time strong {
  font-family: "Sora", "Manrope", sans-serif;
}

body.page-pp2-plan .loading-plan-item__body h3 {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 16px;
}

body.page-pp2-plan .loading-plan-item__actions .btn-secondary,
body.page-pp2-plan .loading-plan-item__actions .btn-danger,
body.page-pp2-plan .loading-plan-quick-btn {
  min-height: 30px;
  border-radius: 9px;
  font-size: 10.5px;
}

body.page-pp2-plan .loading-plan-quick-select {
  min-height: 31px;
  border-radius: 9px;
}

body.page-pp2-plan .loading-plan-empty {
  min-height: 110px;
  border-radius: 12px;
}

body[data-theme="dark"].page-pp2-plan .loading-plan-hero {
  border-color: #2d4368;
  background:
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, .19), transparent 30%),
    radial-gradient(circle at 12% 88%, rgba(16, 185, 129, .16), transparent 34%),
    linear-gradient(145deg, rgba(12, 20, 36, .95), rgba(9, 16, 30, .94));
}

body[data-theme="dark"].page-pp2-plan .loading-plan-list__head {
  background: rgba(13, 23, 40, .9);
}

@media (max-width: 1100px) {
  body.page-pp2-plan .loading-plan-list__head {
    position: static;
  }
}

/* PP2 Plan V2 - compact sheet-like layout */
body.page-pp2-plan .loading-plan-hero {
  border-radius: 14px;
  padding: 12px 14px;
}

body.page-pp2-plan .loading-plan-hero h1 {
  font-size: clamp(25px, 1.7vw, 31px);
}

body.page-pp2-plan .loading-plan-list {
  padding: 8px;
  border-radius: 12px;
}

body.page-pp2-plan .loading-plan-list__head {
  margin: 0 0 6px;
  padding: 6px;
  border: 1px solid #d8e7fb;
  border-radius: 10px;
  background: #f8fbff;
}

body.page-pp2-plan .loading-plan-list__head h2 {
  font-size: 22px;
}

body.page-pp2-plan .loading-plan-filter {
  grid-template-columns: 126px 150px minmax(160px, 1fr) auto;
  gap: 6px;
}

body.page-pp2-plan .loading-plan-legend {
  gap: 5px;
  padding: 6px;
  margin: 0 0 6px;
}

body.page-pp2-plan .loading-plan-items {
  gap: 5px;
}

body.page-pp2-plan .loading-plan-item {
  grid-template-columns: 24px 66px minmax(0, 1fr) 102px;
  border-radius: 10px;
  padding: 5px;
  border-left-width: 3px;
  box-shadow: none;
  background: #fff;
}

body.page-pp2-plan .loading-plan-drag-handle {
  width: 24px;
  border-radius: 8px;
  font-size: 12px;
}

body.page-pp2-plan .loading-plan-item__time {
  min-height: 60px;
  border-radius: 9px;
}

body.page-pp2-plan .loading-plan-item__time strong {
  font-size: 15px;
}

body.page-pp2-plan .loading-plan-item__time span {
  font-size: 9px;
}

body.page-pp2-plan .loading-plan-item__top {
  gap: 6px;
}

body.page-pp2-plan .loading-plan-badge,
body.page-pp2-plan .loading-plan-chip {
  min-height: 18px;
  padding: 2px 7px;
  font-size: 9.5px;
}

body.page-pp2-plan .loading-plan-item__body h3 {
  font-size: 14px;
  margin: 2px 0 1px;
}

body.page-pp2-plan .loading-plan-item__body p {
  font-size: 10px;
  margin: 0 0 5px;
}

body.page-pp2-plan .loading-plan-meta {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 4px;
}

body.page-pp2-plan .loading-plan-meta span {
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 10px;
}

body.page-pp2-plan .loading-plan-notes {
  margin-top: 5px;
  gap: 4px;
}

body.page-pp2-plan .loading-plan-notes span {
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 9.5px;
}

body.page-pp2-plan .loading-plan-item__body small {
  margin-top: 4px;
  font-size: 9px;
}

body.page-pp2-plan .loading-plan-item__actions {
  gap: 4px;
}

body.page-pp2-plan .loading-plan-item__actions .btn-secondary,
body.page-pp2-plan .loading-plan-item__actions .btn-danger,
body.page-pp2-plan .loading-plan-quick-btn,
body.page-pp2-plan .loading-plan-quick-select {
  min-height: 27px;
  border-radius: 8px;
  font-size: 9.5px;
}

body[data-theme="dark"].page-pp2-plan .loading-plan-list__head {
  background: #0f1c31;
  border-color: #253c60;
}

body[data-theme="dark"].page-pp2-plan .loading-plan-item {
  background: #101d32;
  border-color: #253c60;
}

body[data-theme="dark"] .loading-plan-legend b {
  color: #8db7ff;
}

@media (max-width: 1180px) {
  .loading-plan-layout {
    grid-template-columns: 1fr;
  }

  .loading-plan-form {
    position: static;
  }

  .loading-plan-filter {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .loading-plan-stats,
  .loading-plan-grid,
  .loading-plan-filter,
  .loading-plan-meta,
  .loading-plan-item {
    grid-template-columns: 1fr;
  }

  .loading-plan-item__actions {
    align-items: stretch;
    min-width: 0;
  }
}

/* Full-size popup for create/edit shuttle flow */
/* In quick shuttle mode let the form fill popup width */
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick > #slot-create-form {
  width: 100% !important;
  max-width: none !important;
}

/* Only quick shuttle edit should be unscaled (rest of popup keeps previous sizing) */
body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick {
  zoom: 1 !important;
}

@supports not (zoom: 1) {
  body.page-schedule #slot-modal #slot-create-view.slot-create-view-b.is-shuttle-quick-pick {
    transform: none !important;
    width: 100% !important;
  }
}

.mobile-task-toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50002;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.mobile-task-toast {
  transform: translateY(-10px);
  opacity: 0;
  border: 1px solid rgba(34, 197, 94, .35);
  border-left: 5px solid #22c55e;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, .96);
  color: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .25);
  transition: opacity .2s ease, transform .2s ease;
}

.mobile-task-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.mobile-task-toast strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mobile-task-toast span {
  display: block;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.35;
}

/* 2026-08-31: odrzucona operacja — teal, zeby nie mylic z zarezerwowanym (rozowy) */
body.page-schedule .slot.rejected_operation,
body.page-schedule .slot-wrapper.slot-span .slot.rejected_operation {
  --slot-glow-color: rgba(13, 148, 136, 0.38);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(13, 148, 136, .10),
      rgba(13, 148, 136, .10) 8px,
      rgba(204, 251, 241, .22) 8px,
      rgba(204, 251, 241, .22) 16px
    ),
    linear-gradient(135deg, rgba(204, 251, 241, .98), rgba(153, 246, 228, .94)) !important;
  color: #115e59 !important;
  border-color: rgba(13, 148, 136, .55) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.72),
    0 0 0 1px rgba(13, 148, 136, .18),
    0 10px 24px rgba(13, 148, 136, .16) !important;
}

body.page-schedule .status-pill.provisional,
body.page-schedule .legend .status-pill.provisional {
  color: #5b21b6 !important;
  border-color: rgba(124, 58, 237, .55) !important;
  background: linear-gradient(135deg, #f5d0fe, #fde68a) !important;
}

body.page-schedule .status-pill.pending-change,
body.page-schedule .legend .status-pill.pending-change {
  color: #155e75 !important;
  border-color: rgba(8, 145, 178, .55) !important;
  background: linear-gradient(135deg, #cffafe, #67e8f9) !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot.is-provisional {
  background: #7c3aed !important;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.35);
  animation: pendingPulseDot 1.15s ease-in-out infinite;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot.is-pending-change {
  background: #0891b2 !important;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.35);
  animation: pendingPulseDot 1.15s ease-in-out infinite;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot.is-delete-request {
  background: #111111 !important;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.45);
  animation: slotDeleteRequestBlink 0.9s steps(2, end) infinite;
}

body.page-schedule .schedule-mode-minislots .slot.slot-delete-request {
  background: #111111 !important;
  color: #f8fafc !important;
  border-color: #000000 !important;
  animation: slotDeleteRequestBlink 0.9s steps(2, end) infinite;
}

body.page-schedule .status-pill.rejected_operation,
body.page-schedule .legend .status-pill.rejected_operation {
  color: #115e59 !important;
  border-color: rgba(13, 148, 136, .55) !important;
  background: linear-gradient(135deg, #ccfbf1, #99f6e4) !important;
}

body.page-schedule .schedule-mode-minislots .slot-mini-mode .mini-slot-dot--rejected_operation {
  background: #0d9488 !important;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-rejected_operation {
  --detail-glow-color: rgba(13, 148, 136, 0.34);
  --detail-glow-rgb: 13, 148, 136;
}

body.page-schedule #slot-modal #slot-details-view.detail-status-rejected_operation::before {
  background:
    radial-gradient(circle at 15% 15%, rgba(var(--detail-glow-rgb), .32), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.68));
}

body.page-schedule .time-reject-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(244, 63, 94, .28);
  border-radius: 13px;
  color: #9f1239;
  background: rgba(255, 241, 242, .78);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

body.page-schedule .time-reject-toggle input {
  width: 17px;
  height: 17px;
  accent-color: #e11d48;
}

body.page-schedule .time-row.is-disabled-by-rejection {
  opacity: .52;
  filter: grayscale(.22);
}

body.page-schedule .time-row.is-disabled-by-rejection::after {
  content: 'Pominiete przy odrzuconej operacji';
  display: block;
  margin-top: 6px;
  color: #9f1239;
  font-size: 11px;
  font-weight: 800;
}

body[data-theme="dark"].page-schedule .slot.rejected_operation,
body[data-theme="dark"].page-schedule .slot-wrapper.slot-span .slot.rejected_operation {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(45, 212, 191, .12),
      rgba(45, 212, 191, .12) 8px,
      rgba(17, 94, 89, .18) 8px,
      rgba(17, 94, 89, .18) 16px
    ),
    linear-gradient(135deg, rgba(19, 78, 74, .96), rgba(17, 94, 89, .90)) !important;
  color: #ccfbf1 !important;
  border-color: rgba(45, 212, 191, .56) !important;
}

body[data-theme="dark"].page-schedule .status-pill.rejected_operation,
body[data-theme="dark"].page-schedule .legend .status-pill.rejected_operation {
  color: #ccfbf1 !important;
  border-color: rgba(45, 212, 191, .62) !important;
  background: rgba(17, 94, 89, .82) !important;
}

body[data-theme="dark"].page-schedule .time-reject-toggle {
  color: #ffe4e6;
  border-color: rgba(251, 113, 133, .34);
  background: rgba(136, 19, 55, .34);
}

/* Move reservation - visual day picker */
.move-slot-picker {
  border: 1px solid rgba(147, 197, 253, .65);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, .96), rgba(255, 255, 255, .88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 16px 40px rgba(15, 23, 42, .08);
  padding: 14px;
}
.move-slot-picker__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.move-slot-picker__head span { display: block; color: #2563eb; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.move-slot-picker__head strong { display: block; color: #0f172a; font-size: 15px; }
.move-slot-picker__hint { color: #64748b; font-size: 12px; margin-bottom: 10px; }
.move-slot-picker__board { min-height: 88px; max-height: min(52vh, 520px); overflow: auto; }
#slot-move-refresh-preview.is-loading { opacity: .72; pointer-events: none; }

#slot-repick-refresh-preview.is-loading { opacity: .72; pointer-events: none; }

body.page-schedule #slot-repick-modal {
  z-index: 95;
}

body.page-schedule #slot-repick-modal .modal-card.wide {
  max-width: min(1180px, calc(100vw - 28px));
}

body.page-schedule #slot-repick-modal .slot-repick-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 0 0 12px;
}

body.page-schedule #slot-repick-modal .slot-repick-date-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

body.page-schedule #slot-repick-modal .slot-repick-date-field input {
  min-height: 40px;
}

body.page-schedule #slot-repick-modal .slot-repick-actions {
  justify-content: flex-start;
  margin-top: 14px;
}

body.page-schedule #slot-repick-modal #slot-repick-picker .move-slot-picker__board {
  max-height: min(56vh, 560px);
}

body[data-theme="dark"].page-schedule #slot-repick-modal .slot-repick-date-field {
  color: #cbd5e1;
}

body.page-schedule #schedule-root.is-slot-repick-active .slot.status-free,
body.page-schedule #schedule-root.is-slot-repick-active .slot-action .slot.status-free,
body.page-schedule #schedule-root.is-shuttle-picker-active .slot.status-free,
body.page-schedule #schedule-root.is-shuttle-picker-active .slot-action .slot.status-free,
body.page-schedule #schedule-root.is-shuttle-picker-active .slot.status-reserved,
body.page-schedule #schedule-root.is-shuttle-picker-active .slot-action .slot.status-reserved {
  outline: 2px solid rgba(34, 197, 94, .75);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
  cursor: pointer;
}

body.page-schedule #schedule-root.is-slot-repick-active .slot.status-free:hover,
body.page-schedule #schedule-root.is-shuttle-picker-active .slot.status-free:hover,
body.page-schedule #schedule-root.is-shuttle-picker-active .slot.status-reserved:hover {
  transform: translateY(-1px);
}
.move-slot-picker__empty { border: 1px dashed rgba(148, 163, 184, .65); border-radius: 14px; color: #64748b; padding: 18px; text-align: center; }
.move-slot-picker__empty.is-warning { color: #92400e; background: #fffbeb; border-color: #fbbf24; }
.move-slot-picker__empty.is-error { color: #991b1b; background: #fef2f2; border-color: #fca5a5; }
.move-slot-picker__group-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #1e293b; margin-bottom: 10px; }
.move-slot-picker__group-title span { color: #64748b; font-size: 12px; }
.move-slot-picker__scroll { overflow-x: auto; padding-bottom: 4px; }
.move-slot-picker__hours,
.move-slot-picker__line { display: grid; grid-template-columns: 74px repeat(24, minmax(54px, 1fr)); gap: 4px; min-width: 1440px; }
.move-slot-picker__hours { color: #64748b; font-size: 11px; font-weight: 800; margin-bottom: 4px; text-align: center; }
.move-slot-picker__line { align-items: stretch; margin-bottom: 4px; }
.move-slot-picker__line > strong { align-items: center; background: #e0ecff; border: 1px solid #bfdbfe; border-radius: 10px; color: #1d4ed8; display: flex; font-size: 11px; justify-content: center; min-height: 38px; }
.move-slot-picker__slot { border: 1px solid rgba(148, 163, 184, .45); border-radius: 10px; cursor: pointer; font-size: 10px; font-weight: 800; min-height: 38px; overflow: hidden; padding: 4px; text-overflow: ellipsis; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease; white-space: nowrap; }
.move-slot-picker__slot.is-free { background: linear-gradient(180deg, #ecfdf5, #dcfce7); color: #166534; }
.move-slot-picker__slot.is-free:hover,
.move-slot-picker__slot.is-selected { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18), 0 10px 22px rgba(22, 101, 52, .16); transform: translateY(-1px); }
.move-slot-picker__slot.is-busy { background: repeating-linear-gradient(135deg, #fee2e2, #fee2e2 8px, #fecaca 8px, #fecaca 16px); color: #991b1b; cursor: not-allowed; opacity: .76; }
body[data-theme="dark"] .move-slot-picker { background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .9)); border-color: rgba(96, 165, 250, .35); }
body[data-theme="dark"] .move-slot-picker__head strong,
body[data-theme="dark"] .move-slot-picker__group-title { color: #e5edff; }
body[data-theme="dark"] .move-slot-picker__hint,
body[data-theme="dark"] .move-slot-picker__group-title span { color: #a8b8d8; }
body[data-theme="dark"] .move-slot-picker__line > strong { background: #172554; color: #bfdbfe; border-color: #1d4ed8; }
body[data-theme="dark"] .move-slot-picker__slot.is-free { background: linear-gradient(180deg, #064e3b, #052e2b); color: #bbf7d0; }
body[data-theme="dark"] .move-slot-picker__slot.is-busy { background: repeating-linear-gradient(135deg, #451a1a, #451a1a 8px, #5f1f1f 8px, #5f1f1f 16px); color: #fecaca; }

/* Plan Wahadel - operational day and night shift polish */
body.page-pp2-plan .loading-plan-hero__small { margin-top: 5px; font-size: 12px; }
body.page-pp2-plan .loading-plan-grid small { color: #64748b; display: block; font-size: 11px; font-weight: 700; line-height: 1.35; margin-top: 6px; text-transform: none; }
body.page-pp2-plan .loading-plan-item.is-night-shift {
  background: linear-gradient(90deg, rgba(100, 116, 139, .16), rgba(255, 255, 255, .92)), repeating-linear-gradient(135deg, rgba(148, 163, 184, .12), rgba(148, 163, 184, .12) 10px, transparent 10px, transparent 20px);
  border-color: rgba(100, 116, 139, .45);
}
body.page-pp2-plan .loading-plan-chip.is-night { background: #e2e8f0; border-color: #cbd5e1; color: #334155; }
body[data-theme="dark"].page-pp2-plan .loading-plan-item.is-night-shift { background: linear-gradient(90deg, rgba(100, 116, 139, .24), rgba(15, 23, 42, .88)), repeating-linear-gradient(135deg, rgba(148, 163, 184, .08), rgba(148, 163, 184, .08) 10px, transparent 10px, transparent 20px); }
body[data-theme="dark"].page-pp2-plan .loading-plan-chip.is-night { background: #1e293b; border-color: #475569; color: #e2e8f0; }
body.page-pp2-plan .loading-plan-shift-divider {
  align-items: center;
  color: #1e3a8a;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  gap: 10px;
  letter-spacing: .08em;
  margin: 8px 2px 2px;
  text-transform: uppercase;
}
body.page-pp2-plan .loading-plan-shift-divider::after { background: linear-gradient(90deg, rgba(59, 130, 246, .38), transparent); content: ''; flex: 1; height: 1px; }
body.page-pp2-plan .loading-plan-shift-divider strong { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; color: #2563eb; font-size: 10px; padding: 4px 8px; }
body.page-pp2-plan .loading-plan-shift-divider--night { color: #475569; }
body.page-pp2-plan .loading-plan-shift-divider--night::after { background: linear-gradient(90deg, rgba(100, 116, 139, .45), transparent); }
body.page-pp2-plan .loading-plan-shift-divider--night strong { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
body[data-theme="dark"].page-pp2-plan .loading-plan-shift-divider { color: #bfdbfe; }
body[data-theme="dark"].page-pp2-plan .loading-plan-shift-divider strong { background: #172554; border-color: #1d4ed8; color: #dbeafe; }
body[data-theme="dark"].page-pp2-plan .loading-plan-shift-divider--night { color: #cbd5e1; }
body[data-theme="dark"].page-pp2-plan .loading-plan-shift-divider--night strong { background: #1e293b; border-color: #475569; color: #e2e8f0; }
body.page-pp2-plan .loading-plan-night-toggle {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, .42);
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 12px 14px;
}
body.page-pp2-plan .loading-plan-night-toggle input {
  accent-color: #475569;
  height: 18px;
  width: 18px;
}
body.page-pp2-plan .loading-plan-night-toggle span { display: block; }
body.page-pp2-plan .loading-plan-night-toggle strong {
  color: #334155;
  display: block;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body.page-pp2-plan .loading-plan-night-toggle small {
  margin-top: 2px;
}
body[data-theme="dark"].page-pp2-plan .loading-plan-night-toggle {
  background: linear-gradient(135deg, #111827, #1f2937);
  border-color: #475569;
}
body[data-theme="dark"].page-pp2-plan .loading-plan-night-toggle strong { color: #e2e8f0; }
.move-slot-picker__notice {
  border: 1px solid #fbbf24;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
  padding: 10px 12px;
}
body[data-theme="dark"] .move-slot-picker__notice {
  background: rgba(120, 53, 15, .35);
  border-color: rgba(251, 191, 36, .55);
  color: #fde68a;
}

/* Add-reservation: compact layout aligned with edit experience */
body.page-schedule #slot-modal #slot-create-view .slot-create-hero,
body.page-schedule #slot-modal #slot-create-view .slot-create-progress {
  display: none !important;
}

body.page-schedule #slot-modal #slot-create-view .slot-create-v3-top {
  margin-bottom: 10px;
}

body.page-schedule #slot-modal #slot-create-view .slot-form-shell__header h4 {
  font-size: 26px;
  line-height: 1.12;
}

body.page-schedule #slot-modal #slot-create-view .slot-form-shell__eyebrow {
  letter-spacing: .08em;
}

/* Create view should mirror current edit layout (compact) */
body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-create-v3-top,
body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-form-shell--templates,
body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-smart-hint,
body.page-schedule #slot-modal #slot-create-view.is-mode-create #slot-operation-badges,
body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-create-section-title {
  display: none !important;
}

body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-form-shell--scenario {
  display: block !important;
}

body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-create-mode-picker {
  display: grid !important;
}

body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-mode-native {
  display: block !important;
  grid-column: 1 / -1;
}

body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-mode-native > select {
  min-height: 44px;
  font-weight: 700;
}

body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-form-shell--operations .slot-form-shell__header h4 {
  font-size: 32px;
  line-height: 1.05;
}

body.page-schedule #slot-modal #slot-create-view.is-mode-create .slot-form-shell--operations .slot-form-shell__eyebrow {
  font-size: 11px;
  letter-spacing: .1em;
}

/* Shuttle add mode: subtle background glow in inline create/edit shell */
body.page-schedule #slot-modal #slot-details-view.is-inline-shuttle-create {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

body.page-schedule #slot-modal #slot-details-view.is-inline-shuttle-create::before {
  content: '';
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background:
    radial-gradient(900px 360px at 8% 6%, rgba(37,99,235,.14), transparent 68%),
    radial-gradient(760px 300px at 95% 15%, rgba(236,72,153,.12), transparent 72%),
    radial-gradient(680px 260px at 50% 100%, rgba(14,165,233,.10), transparent 74%);
  z-index: 0;
}

body.page-schedule #slot-modal #slot-details-view.is-inline-shuttle-create::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(59,130,246,.26);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.35),
    0 24px 48px -32px rgba(37,99,235,.35);
  border-radius: 18px;
  z-index: 0;
}

body.page-schedule #slot-modal #slot-details-view.is-inline-shuttle-create > * {
  position: relative;
  z-index: 1;
}

body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.is-inline-shuttle-create::before {
  background:
    radial-gradient(900px 360px at 8% 6%, rgba(59,130,246,.22), transparent 68%),
    radial-gradient(760px 300px at 95% 15%, rgba(244,63,94,.18), transparent 72%),
    radial-gradient(680px 260px at 50% 100%, rgba(34,211,238,.14), transparent 74%);
}

body[data-theme="dark"].page-schedule #slot-modal #slot-details-view.is-inline-shuttle-create::after {
  border-color: rgba(96,165,250,.30);
  box-shadow:
    inset 0 0 0 1px rgba(148,163,184,.24),
    0 24px 48px -30px rgba(2,132,199,.45);
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: end;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid rgba(59, 130, 246, .26);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(239,246,255,.94), rgba(255,255,255,.78)),
    radial-gradient(520px 160px at 8% 0%, rgba(37,99,235,.12), transparent 70%);
  box-shadow: 0 16px 36px -30px rgba(37,99,235,.50);
}

body.page-schedule #slot-modal .slot-detail-inline-template-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 420px) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(248,250,252,.96), rgba(255,255,255,.82));
}

body.page-schedule #slot-modal .slot-detail-inline-template-panel strong,
body.page-schedule #slot-modal .slot-detail-inline-template-panel label > span {
  display: block;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.page-schedule #slot-modal .slot-detail-inline-template-panel div > span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

body.page-schedule #slot-modal .slot-detail-inline-template-panel select {
  width: 100%;
  margin-top: 6px;
}

body.page-schedule #slot-modal .slot-detail-inline-template-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-panel strong,
body.page-schedule #slot-modal .slot-detail-inline-shuttle-panel label > span {
  display: block;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-panel div > span {
  display: block;
  margin-top: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-panel select {
  width: 100%;
  margin-top: 6px;
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-panel [data-inline-mode-hint] {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-panel [data-inline-mode-hint][hidden] {
  display: none !important;
}

body.page-schedule #slot-modal .slot-detail-inline-form:not(.is-shuttle-mode) [data-inline-leg-panel="shuttle"] {
  display: none !important;
}

body.page-schedule #slot-modal .slot-detail-inline-form:not(.is-shuttle-mode) #slot-inline-leg-tabs {
  display: none !important;
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

body.page-schedule #slot-modal .slot-inline-leg-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(248,250,252,.92);
}

body.page-schedule #slot-modal .slot-inline-leg-tab {
  flex: 1 1 0;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

body.page-schedule #slot-modal .slot-inline-leg-tab.is-active {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #1d4ed8;
  box-shadow: 0 8px 20px rgba(37,99,235,.12);
}

body.page-schedule #slot-modal .slot-inline-leg-panel[hidden] {
  display: none !important;
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-target-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px dashed rgba(37,99,235,.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(239,246,255,.92), rgba(255,255,255,.88));
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-target-panel strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

body.page-schedule #slot-modal .slot-detail-inline-shuttle-target-panel [data-inline-shuttle-target] {
  display: block;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-inline-leg-tabs {
  border-color: rgba(51,65,85,.9);
  background: rgba(15,23,42,.82);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-inline-leg-tab {
  color: #94a3b8;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-inline-leg-tab.is-active {
  background: linear-gradient(180deg, rgba(30,41,59,.96), rgba(15,23,42,.96));
  color: #93c5fd;
  box-shadow: 0 8px 20px rgba(2,6,23,.35);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-shuttle-target-panel {
  border-color: rgba(96,165,250,.28);
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(30,41,59,.82));
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-shuttle-target-panel [data-inline-shuttle-target] {
  color: #cbd5e1;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-shuttle-panel {
  border-color: rgba(96,165,250,.30);
  background:
    linear-gradient(135deg, rgba(15,23,42,.94), rgba(30,41,59,.82)),
    radial-gradient(520px 160px at 8% 0%, rgba(37,99,235,.18), transparent 70%);
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-shuttle-panel strong,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-shuttle-panel label > span {
  color: #bfdbfe;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-shuttle-panel div > span {
  color: #cbd5e1;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-template-panel {
  border-color: rgba(148,163,184,.28);
  background: linear-gradient(135deg, rgba(15,23,42,.92), rgba(30,41,59,.78));
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-template-panel strong,
body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-template-panel label > span {
  color: #e2e8f0;
}

body[data-theme="dark"].page-schedule #slot-modal .slot-detail-inline-template-panel div > span {
  color: #cbd5e1;
}

@media (max-width: 900px) {
  body.page-schedule #slot-modal .slot-detail-inline-shuttle-panel,
  body.page-schedule #slot-modal .slot-detail-inline-template-panel {
    grid-template-columns: 1fr;
  }

  body.page-schedule #slot-modal .slot-detail-inline-shuttle-actions,
  body.page-schedule #slot-modal .slot-detail-inline-template-actions {
    justify-content: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════
   Plan Wahadeł – nowoczesny formularz (lpf)
   ═══════════════════════════════════════════════════════════ */

/* Dialog wrapper – nadpisuje stare loading-plan-modal__dialog */
.lpf.loading-plan-modal__dialog {
  padding: 0;
  overflow: auto;
  border-radius: 20px;
}

/* Nagłówek */
.lpf__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px 18px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff;
  border-radius: 20px 20px 0 0;
  position: relative;
}

.lpf__head-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.lpf__head-text {
  flex: 1 1 auto;
  min-width: 0;
}
.lpf__head-text span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 2px;
}
.lpf__head-text h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.lpf__head-actions { flex: 0 0 auto; }

.lpf__btn-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s;
  text-decoration: none;
}
.lpf__btn-close:hover { background: rgba(255,255,255,.28); }

/* Body */
.lpf__body {
  padding: 0 24px 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Sekcje */
.lpf__section {
  padding: 18px 0 14px;
  border-bottom: 1px solid #f1f5f9;
}
.lpf__section--last { border-bottom: none; }

.lpf__section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 12px;
}
.lpf__section-label svg { opacity: .75; }

/* Grid pól */
.lpf__grid {
  display: grid;
  gap: 12px;
}
.lpf__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lpf__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.lpf__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.lpf__field--span2 { grid-column: span 2; }

.lpf__field > label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
}

.lpf__field input,
.lpf__field select,
.lpf__field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font: 600 13px/1.4 "Manrope", sans-serif;
  color: #0f172a;
  transition: border-color .14s, background .14s, box-shadow .14s;
  outline: none;
  box-sizing: border-box;
}
.lpf__field input:focus,
.lpf__field select:focus,
.lpf__field textarea:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.lpf__field input::placeholder,
.lpf__field textarea::placeholder { color: #94a3b8; font-weight: 500; }

.lpf__field textarea { resize: vertical; min-height: 72px; }
.lpf__field small {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 600;
  line-height: 1.35;
}

/* Toggle nocna zmiana */
.lpf__night-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: background .14s, border-color .14s;
  user-select: none;
}
.lpf__night-toggle:hover { background: #e9f0fb; border-color: #93c5fd; }

.lpf__night-toggle input[type="checkbox"] { display: none; }

.lpf__night-toggle-track {
  flex: 0 0 36px;
  height: 20px;
  border-radius: 10px;
  background: #cbd5e1;
  position: relative;
  transition: background .18s;
}
.lpf__night-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s, background .18s;
}
.lpf__night-toggle input:checked ~ .lpf__night-toggle-track {
  background: #4f46e5;
}
.lpf__night-toggle input:checked ~ .lpf__night-toggle-track .lpf__night-toggle-thumb {
  transform: translateX(16px);
}

.lpf__night-toggle-text {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lpf__night-toggle-text strong {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
}
.lpf__night-toggle-text small {
  width: 100%;
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.3;
  flex-basis: 100%;
}
.lpf__night-toggle-text svg { color: #6366f1; }

/* Stopka */
.lpf__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 18px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
  border-radius: 0 0 20px 20px;
}

.lpf__submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font: 700 13.5px/1 "Manrope", sans-serif;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37,99,235,.28);
  transition: transform .13s, box-shadow .13s;
}
.lpf__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37,99,235,.38);
}
.lpf__submit:active { transform: translateY(0); }

.lpf__btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  font: 600 12.5px/1 "Manrope", sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background .13s, border-color .13s, color .13s;
}
.lpf__btn-secondary:hover { background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; }

/* Dark mode */
body[data-theme="dark"] .lpf__head {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
}
body[data-theme="dark"] .lpf.loading-plan-modal__dialog {
  background: #0d1728;
  border-color: #2a4167;
}
body[data-theme="dark"] .lpf__body,
body[data-theme="dark"] .lpf__footer { background: #0d1728; }
body[data-theme="dark"] .lpf__section { border-color: #1a2b45; }
body[data-theme="dark"] .lpf__footer { border-color: #1a2b45; background: #0a1420; }
body[data-theme="dark"] .lpf__field > label { color: #94a3b8; }
body[data-theme="dark"] .lpf__field input,
body[data-theme="dark"] .lpf__field select,
body[data-theme="dark"] .lpf__field textarea {
  background: #0f1f38;
  border-color: #2a4167;
  color: #e2e8f0;
}
body[data-theme="dark"] .lpf__field input:focus,
body[data-theme="dark"] .lpf__field select:focus,
body[data-theme="dark"] .lpf__field textarea:focus {
  border-color: #3b82f6;
  background: #111c30;
}
body[data-theme="dark"] .lpf__night-toggle { background: #111c30; border-color: #2a4167; }
body[data-theme="dark"] .lpf__night-toggle-text strong { color: #e2e8f0; }
body[data-theme="dark"] .lpf__btn-secondary { background: #111c30; border-color: #2a4167; color: #94a3b8; }
body[data-theme="dark"] .lpf__btn-secondary:hover { background: #1a2b45; border-color: #3b82f6; color: #dbeafe; }

/* Responsive */
@media (max-width: 760px) {
  .lpf__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lpf__grid--2 { grid-template-columns: 1fr; }
  .lpf__field--span2 { grid-column: span 1; }
  .lpf__head { padding: 16px 18px; }
  .lpf__body { padding: 0 16px 4px; }
  .lpf__footer { padding: 12px 16px 14px; }
}
@media (max-width: 480px) {
  .lpf__grid--4 { grid-template-columns: 1fr; }
  .lpf__head-text h2 { font-size: 17px; }
}

/* ═══════════════════════════════════════════════════════════
   Plan Wahadeł – tabela (lp-table)
   ═══════════════════════════════════════════════════════════ */
.lp-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15,23,42,.06);
}

.lp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-family: inherit;
}

/* Nagłówek */
.lp-table thead tr {
  background: #f1f5f9;
  border-bottom: 2px solid #cbd5e1;
}
.lp-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #475569;
  white-space: nowrap;
  border-right: 1px solid #e2e8f0;
}
.lp-table th:last-child { border-right: none; }
.lp-th-drag  { width: 24px; padding: 0; }
.lp-th-lp    { width: 32px; }
.lp-th-who   { width: 96px; }
.lp-th-time  { width: 90px; }
.lp-th-client{ min-width: 110px; }
.lp-th-goods { min-width: 90px; }
.lp-th-order { min-width: 130px; }
.lp-th-dir   { min-width: 90px; }
.lp-th-pal   { width: 58px; text-align: center; }
.lp-th-status{ min-width: 170px; }
.lp-th-approx{ width: 78px; text-align: center; }
.lp-th-truck { min-width: 96px; }
.lp-th-ramp  { width: 60px; text-align: center; }
.lp-th-driver{ min-width: 110px; }
.lp-th-notes { min-width: 140px; }
.lp-th-actions { width: 70px; }

/* Wiersze danych */
.lp-table tbody tr.lp-row td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
  line-height: 1.35;
}
.lp-table tbody tr.lp-row td:last-child { border-right: none; }
.lp-table tbody tr.lp-row:last-child td { border-bottom: none; }
.lp-table tbody tr.lp-row:hover td { background: rgba(241,245,249,.7) !important; }
.lp-td-center { text-align: center; }

/* Godzina/data */
.lp-td-time strong { display: block; font-size: 14px; font-weight: 700; color: #0f172a; }
.lp-td-time span   { display: block; font-size: 10.5px; color: #64748b; }

/* Numer zamówienia */
.lp-order-text { display: block; max-width: 180px; word-break: break-word; font-size: 11.5px; }

/* Uwagi */
.lp-notes-text { display: block; font-size: 11.5px; max-width: 200px; word-break: break-word; }
.lp-notes-text em { display: block; color: #64748b; font-style: normal; border-top: 1px dashed #e2e8f0; margin-top: 3px; padding-top: 3px; }

/* Klient z linkiem awizacji */
.lp-linked-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  font-style: normal;
  padding: 1px 5px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  margin-left: 4px;
  white-space: nowrap;
}

/* Nocna zmiana chip */
.lp-night-chip {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  font-style: normal;
  padding: 1px 5px;
  border-radius: 3px;
  background: #e2e8f0;
  color: #475569;
  margin-top: 2px;
}

/* Separatory zmian */
.lp-shift-row td {
  padding: 5px 10px;
  border-bottom: 1px solid #e2e8f0;
}
.lp-shift-row--day td  { background: #eff6ff; }
.lp-shift-row--night td{ background: #f1f5f9; }
.lp-shift-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.lp-shift-row--day .lp-shift-label   { color: #1d4ed8; }
.lp-shift-row--night .lp-shift-label { color: #475569; }
.lp-shift-label small { font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .75; }

/* Przycisk drag */
.lp-drag-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 28px;
  cursor: grab;
  background: none;
  border: none;
  padding: 0 4px;
  color: #cbd5e1;
  transition: color .12s;
}
.lp-drag-icon:hover { color: #94a3b8; }
.lp-td-drag { padding: 0 !important; }

/* Akcje w wierszu */
.lp-td-actions { white-space: nowrap; }
.lp-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  text-decoration: none;
  padding: 0;
  margin: 0 1px;
  vertical-align: middle;
}
.lp-action-btn:hover { background: #eff6ff; border-color: #93c5fd; color: #2563eb; }
.lp-action-btn--del:hover { background: #fff1f2; border-color: #fecaca; color: #e11d48; }

/* Status select – inline, kolorowany */
.lp-status-form { margin: 0; }
.lp-status-select {
  appearance: auto;
  width: 100%;
  padding: 4px 6px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 5px;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
  outline: none;
}
.lp-status-select:focus { border-color: #93c5fd; }

/* Kolory statusów – tło wiersza */
.lp-row--planned           td { background: #fff; }
.lp-row--in_preparation    td { background: #fff7ed; }
.lp-row--ready_for_pickup  td { background: #fefce8; }
.lp-row--loaded            td { background: #f0fdf4; }
.lp-row--unloaded          td { background: #f0fdf4; }
.lp-row--cancelled         td { background: #f8fafc; opacity: .7; text-decoration: line-through; }
.lp-row--no_order          td { background: #fff1f2; }
.lp-row--no_goods          td { background: #fff1f2; }
.lp-row--info              td { background: #fffbeb; }

/* Nocna zmiana – szare tło */
.lp-row--night td {
  background: #f5f6f8 !important;
  color: #475569 !important;
}
.lp-row--night:hover td { background: #eff1f5 !important; }
.lp-row--night .lp-td-time strong { color: #334155; }

/* Kolory select statusu */
.lp-status-select--planned          { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.lp-status-select--in_preparation   { background: #fff7ed; border-color: #fdba74; color: #c2410c; }
.lp-status-select--ready_for_pickup { background: #fefce8; border-color: #fde047; color: #854d0e; }
.lp-status-select--loaded           { background: #f0fdf4; border-color: #86efac; color: #15803d; }
.lp-status-select--unloaded         { background: #f0fdf4; border-color: #86efac; color: #166534; }
.lp-status-select--cancelled        { background: #f8fafc; border-color: #cbd5e1; color: #64748b; }
.lp-status-select--no_order         { background: #fff1f2; border-color: #fca5a5; color: #be123c; }
.lp-status-select--no_goods         { background: #fff1f2; border-color: #fca5a5; color: #be123c; }
.lp-status-select--info             { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* Rampa – pogrubiona, widoczna */
.lp-td-ramp strong { font-size: 13px; }

/* Legenda – dodaj nowe statusy */
.loading-plan-legend i.loading-plan-status--in_preparation {
  background: #f97316;
  box-shadow: 0 0 0 2px rgba(249,115,22,.18);
}
.loading-plan-legend i.loading-plan-status--ready_for_pickup {
  background: #eab308;
  box-shadow: 0 0 0 2px rgba(234,179,8,.18);
}

/* Dark mode */
body[data-theme="dark"] .lp-table-wrap {
  background: #111c30;
  border-color: #2a4167;
}
body[data-theme="dark"] .lp-table thead tr { background: #0d1a2f; border-bottom-color: #2a4167; }
body[data-theme="dark"] .lp-table th { color: #94a3b8; border-right-color: #1e3358; }
body[data-theme="dark"] .lp-table tbody tr.lp-row td {
  color: #cbd5e1;
  border-bottom-color: #1a2b45;
  border-right-color: #1a2b45;
}
body[data-theme="dark"] .lp-row--planned td    { background: #111c30; }
body[data-theme="dark"] .lp-row--in_preparation td { background: rgba(194,65,12,.12); }
body[data-theme="dark"] .lp-row--ready_for_pickup td { background: rgba(133,77,14,.14); }
body[data-theme="dark"] .lp-row--loaded td    { background: rgba(21,128,61,.12); }
body[data-theme="dark"] .lp-row--unloaded td  { background: rgba(21,128,61,.10); }
body[data-theme="dark"] .lp-row--no_order td,
body[data-theme="dark"] .lp-row--no_goods td  { background: rgba(190,18,60,.12); }
body[data-theme="dark"] .lp-row--night td { background: #0d1520 !important; color: #94a3b8 !important; }
body[data-theme="dark"] .lp-shift-row--day td  { background: #0f1f38; }
body[data-theme="dark"] .lp-shift-row--night td{ background: #0a1424; }
body[data-theme="dark"] .lp-action-btn { background: #1a2b45; border-color: #2a4167; color: #94a3b8; }
body[data-theme="dark"] .lp-action-btn:hover { background: rgba(37,99,235,.2); border-color: #3b82f6; color: #93c5fd; }

/* Drag wiersza tabeli */
.lp-table tbody tr.is-dragging td { opacity: .45; background: #dbeafe !important; outline: 2px dashed #93c5fd; }

/* Responsive: na małych ekranach ukrywamy mniej ważne kolumny */
@media (max-width: 1100px) {
  .lp-th-approx, .lp-td-approx,
  .lp-th-truck, .lp-td-truck { display: none; }
}
@media (max-width: 860px) {
  .lp-th-dir, .lp-td-dir,
  .lp-th-goods, .lp-td-goods { display: none; }
}

/* ===== PIOMAR mobile shell (<=900px) ===== */
@media (max-width: 900px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body.has-mobile-shell {
    overflow-x: hidden;
  }

  body.has-mobile-shell .app-shell {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    min-height: 100vh;
  }

  body.has-mobile-shell .app-shell > .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1200;
    width: min(88vw, 320px) !important;
    max-width: 320px;
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-105%);
    transition: transform .24s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 16px 48px rgba(15, 23, 42, .32);
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  body.has-mobile-shell.sidebar-mobile-open .app-shell > .sidebar {
    transform: translateX(0);
  }

  body.has-mobile-shell .sidebar-mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: rgba(15, 23, 42, .48);
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease;
  }

  body.has-mobile-shell.sidebar-mobile-open .sidebar-mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.has-mobile-shell .app-shell > .main {
    width: 100%;
    min-width: 0;
    padding: 12px 12px calc(72px + env(safe-area-inset-bottom, 0));
  }

  body.has-mobile-shell .main-header {
    position: sticky;
    top: 0;
    z-index: 110;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  body.has-mobile-shell .main-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
  }

  body.has-mobile-shell .main-header-actions {
    gap: 6px;
    margin-left: 0;
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  body.has-mobile-shell .header-profile-text,
  body.has-mobile-shell .header-notifications-label,
  body.has-mobile-shell .header-theme-toggle span:not(.menu-icon),
  body.has-mobile-shell .header-logout span:not(.menu-icon) {
    display: none;
  }

  body.has-mobile-shell .header-theme-toggle,
  body.has-mobile-shell .header-logout,
  body.has-mobile-shell .header-sidebar-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    justify-content: center;
  }

  body.has-mobile-shell .header-profile {
    padding: 4px;
    min-height: 44px;
  }

  body.has-mobile-shell .main > .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
  }

  body.has-mobile-shell .main > .page-header .actions,
  body.has-mobile-shell .main > .page-header .header-actions {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
    gap: 8px;
  }

  body.has-mobile-shell .main > .page-header .actions > *,
  body.has-mobile-shell .main > .page-header .header-actions > *,
  body.has-mobile-shell .main > .page-header .actions .btn-primary,
  body.has-mobile-shell .main > .page-header .actions .btn-secondary {
    flex: 1 1 calc(50% - 8px);
    min-height: 44px;
  }

  body.has-mobile-shell .table-wrap,
  body.has-mobile-shell .table-wrap--auto,
  body.has-mobile-shell .users-table-wrap,
  body.has-mobile-shell .bug-reports-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
    padding: 0 2px 4px;
  }

  body.has-mobile-shell .main .table {
    min-width: 560px;
  }

  body.has-mobile-shell .card {
    padding: 14px;
    border-radius: 14px;
  }

  body.has-mobile-shell .form-grid,
  body.has-mobile-shell .settings-grid {
    grid-template-columns: 1fr !important;
  }

  body.has-mobile-shell .modal-card,
  body.has-mobile-shell .modal-card.wide {
    width: min(calc(100vw - 16px), 100%) !important;
    max-height: 92dvh;
    margin: 8px auto;
  }

  body.has-mobile-shell .btn-primary,
  body.has-mobile-shell .btn-secondary,
  body.has-mobile-shell .btn-danger {
    min-height: 44px;
  }

  body.has-mobile-shell .sidebar [data-sidebar-toggle],
  body.has-mobile-shell .sidebar-collapse-btn {
    display: none !important;
  }

  body.has-mobile-shell.sidebar-collapsed .app-shell {
    grid-template-columns: none !important;
  }

  body.has-mobile-shell .layout {
    gap: 12px;
  }

  body.page-schedule.has-mobile-shell .schedule-toolbar,
  body.page-schedule.has-mobile-shell .schedule-filters,
  body.page-schedule.has-mobile-shell .schedule-controls {
    flex-wrap: wrap;
    gap: 8px;
  }

  body.page-schedule.has-mobile-shell .dayboard-wrap,
  body.page-schedule.has-mobile-shell .schedule-dayboard,
  body.page-schedule.has-mobile-shell .layout,
  body.page-schedule.has-mobile-shell .panel,
  body.page-schedule.has-mobile-shell #schedule-root {
    min-width: 0;
    max-width: 100%;
  }

  body.page-schedule.has-mobile-shell .layout {
    padding-bottom: 12px;
  }

  body.page-schedule.has-mobile-shell .panel {
    padding: 10px;
    border-radius: 14px;
  }

  body.page-schedule.has-mobile-shell .page-header h1 {
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1.15;
  }

  body.page-schedule.has-mobile-shell .page-header > div > p {
    font-size: 13px;
    line-height: 1.35;
  }

  body.page-schedule.has-mobile-shell .pending-approvals-widget {
    flex: 1 1 100%;
    min-width: 0;
  }

  body.page-schedule.has-mobile-shell .pending-approvals-widget__label {
    font-size: 11px;
    line-height: 1.25;
    white-space: normal;
  }

  body.page-schedule.has-mobile-shell .schedule-tools-bar__left {
    width: 100%;
    justify-self: stretch !important;
    flex-wrap: wrap;
  }

  body.page-schedule.has-mobile-shell .schedule-tools-bar__left > .btn-secondary,
  body.page-schedule.has-mobile-shell .schedule-live-status,
  body.page-schedule.has-mobile-shell .schedule-online-status {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    justify-content: center;
    font-size: 12px;
    padding: 8px 10px;
  }

  body.page-schedule.has-mobile-shell #dispatcher-stats-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  body.page-schedule.has-mobile-shell .group-card {
    min-width: 0;
    margin-bottom: 12px;
    border-radius: 14px;
  }

  body.page-schedule.has-mobile-shell .group-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }

  body.page-schedule.has-mobile-shell .group-header__meta {
    width: 100%;
    justify-content: flex-start;
  }

  body.page-schedule.has-mobile-shell .group-body {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    padding: 8px;
    gap: 6px;
    min-width: 0;
  }

  body.page-schedule.has-mobile-shell .group-side {
    min-width: 0;
  }

  body.page-schedule.has-mobile-shell .line-item {
    font-size: 9px;
    line-height: 1.1;
    padding: 4px 3px;
    text-align: center;
    word-break: break-word;
    min-height: 40px;
    align-items: center;
    justify-content: center;
  }

  body.page-schedule.has-mobile-shell .line-header,
  body.page-schedule.has-mobile-shell .line-summary {
    height: 28px;
  }

  body.page-schedule.has-mobile-shell .timeline {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    min-width: 0;
    padding-bottom: 4px;
    overscroll-behavior-x: contain;
  }

  body.page-schedule.has-mobile-shell .timeline-header,
  body.page-schedule.has-mobile-shell .timeline-row,
  body.page-schedule.has-mobile-shell .summary-row,
  body.page-schedule.has-mobile-shell .schedule-mode-minislots .timeline-header,
  body.page-schedule.has-mobile-shell .schedule-mode-minislots .timeline-row,
  body.page-schedule.has-mobile-shell .schedule-mode-minislots .summary-row {
    grid-template-columns: repeat(24, 64px) !important;
    width: max-content;
    min-width: unset;
    gap: 4px !important;
  }

  body.page-schedule.has-mobile-shell .hour-cell {
    font-size: 10px;
    padding: 5px 0;
    border-radius: 8px;
  }

  body.page-schedule.has-mobile-shell .slot {
    min-height: 44px !important;
    padding: 6px 5px !important;
    touch-action: manipulation;
  }

  body.page-schedule.has-mobile-shell .slot.reserved,
  body.page-schedule.has-mobile-shell .slot.in_progress,
  body.page-schedule.has-mobile-shell .slot.done,
  body.page-schedule.has-mobile-shell .slot.departed,
  body.page-schedule.has-mobile-shell .slot-wrapper.slot-span .slot.reserved,
  body.page-schedule.has-mobile-shell .slot-wrapper.slot-span .slot.in_progress,
  body.page-schedule.has-mobile-shell .slot-wrapper.slot-span .slot.done,
  body.page-schedule.has-mobile-shell .slot-wrapper.slot-span .slot.departed {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 5px;
    padding-right: 5px;
  }

  body.page-schedule.has-mobile-shell .schedule-mode-minislots .slot {
    min-height: 44px !important;
    padding: 5px 4px !important;
  }

  body.page-schedule.has-mobile-shell .schedule-mode-minislots .timeline-row {
    min-height: 44px !important;
  }

  body.page-schedule.has-mobile-shell .schedule-mode-minislots .slot-mini-mode .mini-slot-info strong {
    font-size: 9px !important;
  }

  body.page-schedule.has-mobile-shell .schedule-mode-minislots .slot-mini-mode .mini-slot-code,
  body.page-schedule.has-mobile-shell .schedule-mode-minislots .slot-mini-mode .mini-slot-time {
    font-size: 9px !important;
  }

  body.page-schedule.has-mobile-shell .day-title.day-title-with-controls {
    gap: 8px;
    padding: 0 2px;
  }

  body.page-schedule.has-mobile-shell .day-title-toolbar {
    width: 100%;
  }

  body.page-schedule.has-mobile-shell .schedule-hourly-summary__list {
    grid-template-columns: repeat(24, minmax(44px, 44px)) !important;
    width: max-content;
    min-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.page-schedule.has-mobile-shell .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 2px 0;
  }

  body.page-schedule.has-mobile-shell .legend .status-pill {
    font-size: 10px;
    padding: 4px 8px;
  }

  body.page-schedule.has-mobile-shell .sidebar.sidebar-modern.sidebar-v5 {
    position: fixed !important;
    top: 0 !important;
    min-height: 0 !important;
    height: 100dvh !important;
    border-radius: 0 !important;
  }

  body.page-schedule.has-mobile-shell #slot-modal .modal-card.slot-modern {
    width: min(calc(100vw - 12px), 100%) !important;
    max-height: 94dvh;
    margin: 6px auto;
  }

  body.page-schedule.has-mobile-shell #slot-modal .modal-body {
    max-height: calc(94dvh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.page-schedule.has-mobile-shell .schedule-view-presets {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  body.page-schedule.has-mobile-shell .schedule-view-presets .btn-secondary,
  body.page-schedule.has-mobile-shell .schedule-view-presets select {
    width: 100%;
    min-height: 44px;
  }

  body.page-login .login-shell,
  body.page-login .auth-shell {
    padding: 16px;
    min-height: 100dvh;
    align-items: flex-start;
  }

  body.page-login .login-card,
  body.page-login .auth-card {
    width: min(100%, 480px);
    margin: 0 auto;
  }

  body.permissions-admin-page.has-mobile-shell .permission-users-toolbar,
  body.permissions-admin-page.has-mobile-shell .permission-users-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-users.has-mobile-shell .users-tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
}

@media (min-width: 901px) {
  body .header-sidebar-toggle[data-mobile-sidebar-toggle] {
    display: none !important;
  }

  body .sidebar-mobile-backdrop {
    display: none !important;
  }
}

/* Co nowego — popup po logowaniu */
.whats-new-overlay {
  position: fixed;
  inset: 0;
  z-index: 19990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.whats-new-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.whats-new-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

body[data-theme="dark"] .whats-new-overlay__backdrop {
  background: rgba(2, 6, 14, 0.72);
}

.whats-new-card {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #ffffff 30%);
  background:
    radial-gradient(circle at 92% 0%, rgba(215, 38, 56, 0.14), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.1), transparent 38%),
    linear-gradient(165deg, color-mix(in srgb, var(--panel) 92%, #ffffff 8%), var(--panel));
  color: var(--ink);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateY(10px) scale(0.97);
  transition: transform 200ms ease, opacity 200ms ease;
}

.whats-new-overlay.is-visible .whats-new-card {
  transform: translateY(0) scale(1);
}

.whats-new-card__topbar {
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent), #3b82f6);
}

.whats-new-card__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 28px 0;
}

.whats-new-card__icon {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 22px rgba(215, 38, 56, 0.32);
}

.whats-new-card__icon svg {
  width: 30px;
  height: 30px;
}

.whats-new-card__heading {
  min-width: 0;
  padding-top: 2px;
}

.whats-new-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
}

.whats-new-card__title {
  margin: 0;
  font-family: 'Sora', 'Manrope', sans-serif;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.whats-new-card__body {
  margin: 18px 28px 0;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #ffffff 18%);
  background: color-mix(in srgb, var(--input-bg) 78%, var(--panel) 22%);
  line-height: 1.6;
  font-size: 16px;
  white-space: pre-wrap;
  overflow: auto;
  max-height: min(50vh, 440px);
  color: color-mix(in srgb, var(--ink) 92%, var(--muted) 8%);
}

.whats-new-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 28px 26px;
  margin-top: auto;
}

.whats-new-card__actions .btn-primary {
  min-width: 160px;
  box-shadow: 0 8px 18px rgba(215, 38, 56, 0.22);
}

body[data-theme="dark"] .whats-new-card {
  border-color: color-mix(in srgb, var(--line) 88%, #ffffff 12%);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

body[data-theme="dark"] .whats-new-card__body {
  background: color-mix(in srgb, var(--input-bg) 88%, #000000 12%);
  border-color: color-mix(in srgb, var(--line) 90%, #ffffff 10%);
}

.whats-new-settings-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.whats-new-settings-head__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 16px rgba(215, 38, 56, 0.24);
}

.whats-new-settings-head__icon svg {
  width: 22px;
  height: 22px;
}

.whats-new-settings-card .modal-header {
  align-items: flex-start;
}

@media (max-width: 520px) {
  .whats-new-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .whats-new-card {
    width: 100%;
    max-height: 88vh;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
  }

  .whats-new-card__header {
    padding: 18px 16px 0;
  }

  .whats-new-card__body {
    margin: 14px 16px 0;
    max-height: 54vh;
  }

  .whats-new-card__actions {
    padding: 16px;
  }

  .whats-new-card__actions .btn-primary {
    width: 100%;
  }
}

/* Co poprawiono — popup po logowaniu */
.whats-fixed-overlay {
  position: fixed;
  inset: 0;
  z-index: 19990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.whats-fixed-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.whats-fixed-overlay--queued:not(.is-visible) {
  opacity: 0;
  pointer-events: none;
}

.whats-fixed-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

body[data-theme="dark"] .whats-fixed-overlay__backdrop {
  background: rgba(2, 6, 14, 0.72);
}

.whats-fixed-card {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #ffffff 30%);
  background:
    radial-gradient(circle at 92% 0%, rgba(5, 150, 105, 0.14), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(16, 185, 129, 0.1), transparent 38%),
    linear-gradient(165deg, color-mix(in srgb, var(--panel) 92%, #ffffff 8%), var(--panel));
  color: var(--ink);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateY(10px) scale(0.97);
  transition: transform 200ms ease, opacity 200ms ease;
}

.whats-fixed-overlay.is-visible .whats-fixed-card {
  transform: translateY(0) scale(1);
}

.whats-fixed-card__topbar {
  height: 4px;
  background: linear-gradient(90deg, #059669, #10b981, #34d399);
}

.whats-fixed-card__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 28px 0;
}

.whats-fixed-card__icon {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #059669, #10b981);
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.32);
}

.whats-fixed-card__icon svg {
  width: 30px;
  height: 30px;
}

.whats-fixed-card__heading {
  min-width: 0;
  padding-top: 2px;
}

.whats-fixed-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #047857;
  background: color-mix(in srgb, #10b981 12%, transparent);
  border: 1px solid color-mix(in srgb, #10b981 24%, transparent);
}

.whats-fixed-card__title {
  margin: 0;
  font-family: 'Sora', 'Manrope', sans-serif;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.whats-fixed-card__body {
  margin: 18px 28px 0;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #ffffff 18%);
  background: color-mix(in srgb, var(--input-bg) 78%, var(--panel) 22%);
  line-height: 1.6;
  font-size: 16px;
  white-space: pre-wrap;
  overflow: auto;
  max-height: min(50vh, 440px);
  color: color-mix(in srgb, var(--ink) 92%, var(--muted) 8%);
}

.whats-fixed-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 28px 26px;
  margin-top: auto;
}

.whats-fixed-card__actions .btn-primary {
  min-width: 160px;
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.22);
}

body[data-theme="dark"] .whats-fixed-card {
  border-color: color-mix(in srgb, var(--line) 88%, #ffffff 12%);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

body[data-theme="dark"] .whats-fixed-card__body {
  background: color-mix(in srgb, var(--input-bg) 88%, #000000 12%);
  border-color: color-mix(in srgb, var(--line) 90%, #ffffff 10%);
}

.whats-fixed-settings-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.whats-fixed-settings-head__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #059669, #10b981);
  box-shadow: 0 8px 16px rgba(5, 150, 105, 0.24);
}

.whats-fixed-settings-head__icon svg {
  width: 22px;
  height: 22px;
}

.whats-fixed-settings-card .modal-header {
  align-items: flex-start;
}

@media (max-width: 520px) {
  .whats-fixed-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .whats-fixed-card {
    width: 100%;
    max-height: 88vh;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
  }

  .whats-fixed-card__header {
    padding: 18px 16px 0;
  }

  .whats-fixed-card__body {
    margin: 14px 16px 0;
    max-height: 54vh;
  }

  .whats-fixed-card__actions {
    padding: 16px;
  }

  .whats-fixed-card__actions .btn-primary {
    width: 100%;
  }
}

/* SMS do kierowcy — przycisk i podglad ostatniej wiadomosci */
.btn-driver-sms {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid #059669;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-driver-sms:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.34);
  transform: translateY(-1px);
}

.btn-driver-sms:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-driver-sms.is-already-sent {
  border-color: #047857;
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
}

.btn-driver-sms.is-sent-flash {
  animation: driverSmsBtnFlash 0.85s ease 2;
}

@keyframes driverSmsBtnFlash {
  0%, 100% { box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.35), 0 12px 28px rgba(5, 150, 105, 0.42); }
}

.driver-sms-modal-banner {
  margin: 0 0 12px;
}

.driver-sms-modal-banner .driver-sms-sent-panel {
  margin-bottom: 0;
}

.driver-sms-aside-panel {
  margin: 0 0 12px;
}

.driver-sms-sent-panel {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #86efac;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.driver-sms-sent-panel--inline {
  margin: 0;
}

.driver-sms-sent-panel__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #10b981;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.driver-sms-sent-panel__badge::before {
  content: '✓';
  font-size: 12px;
  line-height: 1;
}

.driver-sms-sent-panel__meta {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #047857;
}

.driver-sms-sent-panel__text {
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

body[data-theme="dark"] .driver-sms-sent-panel {
  border-color: rgba(52, 211, 153, 0.35);
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.55) 0%, rgba(4, 47, 46, 0.72) 100%);
  color: #d1fae5;
}

body[data-theme="dark"] .driver-sms-sent-panel__meta {
  color: #6ee7b7;
}

body[data-theme="dark"] .btn-driver-sms {
  border-color: #059669;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.btn-transwide-push {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #7c3aed;
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.btn-transwide-push:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-transwide-push:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-transwide-push.is-already-sent {
  border-color: #6d28d9;
  background: linear-gradient(180deg, #a78bfa 0%, #8b5cf6 100%);
}

.transwide-push-aside-panel {
  margin: 0 0 12px;
}

.transwide-push-panel {
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  color: #4c1d95;
}

.transwide-push-panel--inline {
  margin: 0 0 12px;
}

.transwide-push-panel--failed {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #9f1239;
}

.transwide-push-panel--pending {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
}

.transwide-push-panel--pending .transwide-push-panel__meta {
  color: #a16207;
}

.transwide-push-panel--ok {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  color: #166534;
}

.transwide-push-panel--ok .transwide-push-panel__meta {
  color: #15803d;
}

.transwide-push-panel__badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.transwide-push-panel__ok-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #16a34a;
  color: #fff;
}

.transwide-push-panel__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.transwide-push-panel__meta {
  margin-top: 6px;
  font-size: 13px;
  color: #6d28d9;
}

.transwide-push-panel__list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #5b21b6;
  word-break: break-word;
}

body[data-theme="dark"] .transwide-push-panel__list {
  color: #ddd6fe;
}

.transwide-push-panel--failed .transwide-push-panel__meta {
  color: #be123c;
}

body[data-theme="dark"] .transwide-push-panel {
  border-color: rgba(167, 139, 250, 0.35);
  background: linear-gradient(180deg, rgba(76, 29, 149, 0.45) 0%, rgba(49, 46, 129, 0.65) 100%);
  color: #ede9fe;
}

body[data-theme="dark"] .transwide-push-panel__meta {
  color: #c4b5fd;
}

body[data-theme="dark"] .btn-transwide-push {
  border-color: #6d28d9;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.client-broadcast-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.client-broadcast-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.client-broadcast-overlay__card {
  width: min(460px, 100%);
  background: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.client-broadcast-overlay__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.client-broadcast-overlay__title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.client-broadcast-overlay__message {
  margin: 0 0 16px;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

.client-broadcast-overlay__actions {
  display: flex;
  justify-content: flex-start;
}

body[data-theme="dark"] .client-broadcast-overlay__card {
  background: #0f172a;
  border-color: #334155;
}

body[data-theme="dark"] .client-broadcast-overlay__badge {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

.schedule-view-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.schedule-view-presets__label {
  font-size: 12px;
  color: var(--muted, #64748b);
  margin-right: 2px;
}

.schedule-view-preset-select {
  min-width: 170px;
  max-width: 220px;
  font-size: 13px;
}

.schedule-filters-actions-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.slot-mini-badge.is-shuttle-ok,
.slot-mini-badge.is-shuttle-pending {
  font-weight: 700;
}

.slot-mini-badge.is-shuttle-ok {
  background: #dcfce7;
  color: #166534;
}

.slot-mini-badge.is-shuttle-pending {
  background: #fef3c7;
  color: #92400e;
}

.slot-mini-badge.is-export-handler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 36px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  border: 1px solid rgba(37, 99, 235, 0.35);
}

.slot-export-ramp-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  vertical-align: top;
}

.slot-export-ramp-stack .slot-mini-badge {
  width: 100%;
  box-sizing: border-box;
}

.slot-mini-badge.is-ramp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 36px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid rgba(234, 88, 12, 0.4);
}

body.page-schedule .slot-badge-row .slot-mini-badge.is-export-handler,
body.page-schedule .slot-badge-row .slot-mini-badge.is-ramp {
  font-size: 14px !important;
  min-height: 26px !important;
  padding: 3px 9px !important;
}

body[data-theme="dark"] .slot-mini-badge.is-export-handler {
  background: rgba(37, 99, 235, 0.36);
  color: #dbeafe;
  border-color: rgba(147, 197, 253, 0.45);
}

body[data-theme="dark"] .slot-mini-badge.is-ramp {
  background: rgba(194, 65, 12, 0.38);
  color: #fed7aa;
  border-color: rgba(253, 186, 116, 0.45);
}

body[data-theme="dark"] .slot-mini-badge.is-shuttle-ok {
  background: rgba(22, 101, 52, 0.35);
  color: #86efac;
}

body[data-theme="dark"] .slot-mini-badge.is-shuttle-pending {
  background: rgba(146, 64, 14, 0.35);
  color: #fcd34d;
}

/* Czarna lista kierowcow */
.driver-blacklist-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-driver-blacklist .form-hint {
  margin-top: 12px;
}

body[data-theme="dark"] .driver-blacklist-form-card .notice[style] {
  background: rgba(14, 116, 144, 0.2) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #bae6fd !important;
}

.driver-blacklist-list-card {
  overflow: hidden;
}

.driver-blacklist-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.driver-blacklist-list-head h3 {
  margin: 0 0 4px;
}

.driver-blacklist-list-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  max-width: 52ch;
}

.driver-blacklist-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.driver-blacklist-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, #ffffff 12%);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.driver-blacklist-stat strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.driver-blacklist-stat.is-live {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.9);
  color: #991b1b;
}

.driver-blacklist-stat.is-live strong {
  color: #b91c1c;
}

.driver-blacklist-stat.is-archived {
  border-color: rgba(100, 116, 139, 0.24);
  background: rgba(248, 250, 252, 0.95);
}

.driver-blacklist-empty {
  text-align: center;
  padding: 28px 18px 34px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, #ffffff 8%);
}

.driver-blacklist-empty__icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 10px;
  opacity: 0.75;
}

.driver-blacklist-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.driver-blacklist-empty p strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.driver-blacklist-section + .driver-blacklist-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.driver-blacklist-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.driver-blacklist-section__head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.driver-blacklist-section__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel-soft, #f1f5f9);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.driver-blacklist-entries {
  display: grid;
  gap: 12px;
}

.driver-blacklist-entry {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: color-mix(in srgb, #ffffff 90%, var(--panel) 10%);
  display: grid;
  gap: 10px;
}

.driver-blacklist-entry.is-live {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.55), rgba(255, 255, 255, 0.98));
  box-shadow: 0 1px 0 rgba(239, 68, 68, 0.06);
}

.driver-blacklist-entry.is-archived {
  opacity: 0.92;
  background: color-mix(in srgb, var(--panel) 94%, #ffffff 6%);
}

.driver-blacklist-entry__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.driver-blacklist-entry__title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.driver-blacklist-entry__id {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.driver-blacklist-entry__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  word-break: break-word;
}

.driver-blacklist-entry__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dbl-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.dbl-tag__lbl {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.driver-blacklist-entry__reason {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid rgba(239, 68, 68, 0.45);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

.driver-blacklist-entry.is-archived .driver-blacklist-entry__reason {
  border-left-color: rgba(100, 116, 139, 0.35);
}

.driver-blacklist-entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--muted);
}

.driver-blacklist-entry__meta strong {
  color: var(--ink);
  font-weight: 700;
}

.driver-blacklist-entry__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}

.driver-blacklist-entry__actions .inline-form {
  display: inline;
  margin: 0;
}

.driver-blacklist-entry__delete:hover {
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

body[data-theme="dark"] .driver-blacklist-stat.is-live {
  background: rgba(127, 29, 29, 0.28);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

body[data-theme="dark"] .driver-blacklist-stat.is-live strong {
  color: #fca5a5;
}

body[data-theme="dark"] .driver-blacklist-stat.is-archived {
  background: rgba(30, 41, 59, 0.55);
}

body[data-theme="dark"] .driver-blacklist-empty {
  background: rgba(15, 23, 42, 0.35);
}

body[data-theme="dark"] .driver-blacklist-entry {
  background: rgba(15, 23, 42, 0.42);
}

body[data-theme="dark"] .driver-blacklist-entry.is-live {
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.28), rgba(15, 23, 42, 0.5));
  border-color: rgba(248, 113, 113, 0.28);
}

body[data-theme="dark"] .dbl-tag {
  background: rgba(15, 23, 42, 0.55);
}

body[data-theme="dark"] .driver-blacklist-entry__reason {
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
}

#slot-driver-blacklist-alert {
  margin: 0 16px 12px;
}

.slot-driver-blacklist-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.92rem;
  line-height: 1.4;
}

.slot-driver-blacklist-banner.is-confirmable {
  border-color: #f87171;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.slot-driver-blacklist-banner.is-warning {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

body[data-theme="dark"] .slot-driver-blacklist-banner {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}

body[data-theme="dark"] .slot-driver-blacklist-banner.is-confirmable {
  border-color: rgba(248, 113, 113, 0.65);
}

body[data-theme="dark"] .slot-driver-blacklist-banner.is-warning {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(120, 53, 15, 0.35);
  color: #fde68a;
}

.driver-blacklist-entry.is-warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(255, 255, 255, 0.98));
}

body[data-theme="dark"] .driver-blacklist-entry.is-warn {
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.28), rgba(15, 23, 42, 0.5));
  border-color: rgba(251, 191, 36, 0.28);
}

.status-pill.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

body[data-theme="dark"] .status-pill.warning {
  background: rgba(120, 53, 15, 0.45);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.35);
}

/* Awizacje cykliczne — kreator */
.page-recurring-reservations .recurring-wizard-card {
  margin-bottom: 20px;
  overflow: hidden;
}

.recurring-wizard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.recurring-wizard-head h3 {
  margin: 0 0 4px;
}

.recurring-wizard-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.recurring-wizard-preview {
  min-width: min(360px, 100%);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.96));
  display: grid;
  gap: 4px;
}

.recurring-wizard-preview__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.recurring-wizard-preview strong {
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
}

.recurring-wizard-preview__meta {
  font-size: 12px;
  color: var(--muted);
}

.recurring-wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.recurring-wizard-step {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.recurring-wizard-step.is-active {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(219, 234, 254, 0.75);
  color: #1d4ed8;
}

.recurring-wizard-panel h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

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

.recurring-weekday-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.recurring-weekday-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 90%, #fff 10%);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.recurring-weekday-chip:has(input:checked) {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(219, 234, 254, 0.7);
}

.recurring-wizard-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.recurring-summary-box {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, #fff 8%);
  margin-bottom: 12px;
}

.recurring-summary-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.recurring-summary-dates {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
}

.recurring-summary-dates .is-more {
  color: var(--muted);
  list-style: none;
  margin-left: -18px;
}

.recurring-wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.recurring-rules-list {
  display: grid;
  gap: 12px;
}

.recurring-rule-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, #fff 90%, var(--panel) 10%);
}

.recurring-rule-item.is-active {
  border-color: rgba(59, 130, 246, 0.28);
}

.recurring-rule-item.is-muted {
  opacity: 0.88;
}

.recurring-rule-item__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.recurring-rule-item__title-row h4 {
  margin: 0;
  font-size: 16px;
}

.recurring-rule-item__summary {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--ink);
}

.recurring-rule-item__meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.recurring-rule-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.recurring-rule-item__actions .inline-form {
  display: inline;
  margin: 0;
}

.recurring-rules-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

body[data-theme="dark"] .recurring-wizard-preview {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.28), rgba(15, 23, 42, 0.55));
  border-color: rgba(96, 165, 250, 0.28);
}

body[data-theme="dark"] .recurring-weekday-chip:has(input:checked),
body[data-theme="dark"] .recurring-wizard-step.is-active {
  background: rgba(30, 58, 138, 0.35);
  color: #bfdbfe;
}

@media (max-width: 900px) {
  .recurring-wizard-grid,
  .recurring-weekday-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Raporty magazyn mobilny (kontrole, karty) ───────────────────────────── */
.page-wh-mobile-reports .wh-report-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-wh-mobile-reports .wh-report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.page-wh-mobile-reports .wh-stat-card {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e7e0d5);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.page-wh-mobile-reports .wh-stat-card strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--text, #1c1917);
}

.page-wh-mobile-reports .wh-stat-card span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted, #78716c);
}

.page-wh-mobile-reports .wh-stat-card.is-warn strong { color: #c2410c; }
.page-wh-mobile-reports .wh-stat-card.is-ok strong { color: #047857; }

.page-wh-mobile-reports .wh-report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e7e0d5);
  border-radius: 14px;
}

.page-wh-mobile-reports .wh-report-toolbar .field {
  margin: 0;
  min-width: 140px;
}

.page-wh-mobile-reports .wh-report-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-wh-mobile-reports .wh-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  align-items: center;
  padding: 14px 16px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e7e0d5);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-wh-mobile-reports .wh-report-row:hover {
  border-color: #d6d3d1;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.06);
}

.page-wh-mobile-reports .wh-report-row-main {
  min-width: 0;
}

.page-wh-mobile-reports .wh-report-row-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text, #1c1917);
  margin: 0 0 4px;
}

.page-wh-mobile-reports .wh-report-row-meta {
  font-size: 13px;
  color: var(--muted, #78716c);
  line-height: 1.45;
}

.page-wh-mobile-reports .wh-report-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.page-wh-mobile-reports .wh-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.page-wh-mobile-reports .wh-pill-ok { background: #d1fae5; color: #065f46; }
.page-wh-mobile-reports .wh-pill-warn { background: #ffedd5; color: #9a3412; }
.page-wh-mobile-reports .wh-pill-neu { background: #f5f5f4; color: #57534e; }
.page-wh-mobile-reports .wh-pill-prog { background: #dbeafe; color: #1e40af; }
.page-wh-mobile-reports .wh-pill-receipt { background: #d1fae5; color: #065f46; }
.page-wh-mobile-reports .wh-pill-issue { background: #dbeafe; color: #1e40af; }
.page-wh-mobile-reports .wh-pill-label { background: #fef3c7; color: #92400e; }

.page-wh-mobile-reports .wh-signature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text, #1c1917);
  font-weight: 500;
}

.page-wh-mobile-reports .wh-signature::before {
  content: "✍";
  opacity: 0.7;
}

.page-wh-mobile-reports .wh-detail-panel {
  margin-bottom: 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 55%);
  border: 1px solid #fed7aa;
  border-radius: 16px;
}

.page-wh-mobile-reports .wh-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 20px;
  margin: 14px 0 18px;
}

.page-wh-mobile-reports .wh-detail-item label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #78716c);
  margin-bottom: 2px;
}

.page-wh-mobile-reports .wh-detail-item strong {
  font-size: 14px;
  color: var(--text, #1c1917);
}

.page-wh-mobile-reports .wh-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted, #78716c);
  background: var(--card, #fff);
  border: 1px dashed var(--border, #e7e0d5);
  border-radius: 14px;
}

.page-wh-mobile-reports .wh-scan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.page-wh-mobile-reports .wh-scan-table th,
.page-wh-mobile-reports .wh-scan-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border, #e7e0d5);
}

.page-wh-mobile-reports .wh-scan-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #78716c);
  background: #fafaf9;
}

.page-wh-mobile-reports .wh-form-preview {
  margin-top: 8px;
  padding: 10px 12px;
  background: #fafaf9;
  border-radius: 8px;
  font-size: 12px;
  color: #57534e;
}

body[data-theme="dark"] .page-wh-mobile-reports .wh-stat-card,
body[data-theme="dark"] .page-wh-mobile-reports .wh-report-toolbar,
body[data-theme="dark"] .page-wh-mobile-reports .wh-report-row {
  background: var(--card);
  border-color: var(--border);
}

body[data-theme="dark"] .page-wh-mobile-reports .wh-detail-panel {
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.12) 0%, var(--card) 60%);
  border-color: rgba(251, 146, 60, 0.35);
}

@media (max-width: 720px) {
  .page-wh-mobile-reports .wh-report-row {
    grid-template-columns: 1fr;
  }
  .page-wh-mobile-reports .wh-report-row-side {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ── Kontrole pułapek (trap_check_reports.php) ─────────────────────────── */
.page-trap-check-reports .trap-patrol-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 58%, #f0fdf4 100%);
  border: 1px solid #fed7aa;
  box-shadow: 0 10px 30px rgba(194, 65, 12, 0.06);
}

.page-trap-check-reports .trap-patrol-eyebrow {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c2410c;
  font-weight: 700;
}

.page-trap-check-reports .trap-patrol-hero h1 {
  margin: 0 0 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
}

.page-trap-check-reports .trap-patrol-hero-copy p:last-child {
  margin: 0;
  max-width: 58ch;
  color: var(--muted, #57534e);
  line-height: 1.55;
  font-size: 0.92rem;
}

.page-trap-check-reports .trap-patrol-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.page-trap-check-reports .trap-patrol-hero-chip {
  min-width: 150px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(251, 146, 60, 0.35);
}

.page-trap-check-reports .trap-patrol-hero-chip span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #78716c);
  margin-bottom: 4px;
}

.page-trap-check-reports .trap-patrol-hero-chip strong {
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  color: var(--text, #1c1917);
}

.page-trap-check-reports .trap-patrol-toolbar .trap-patrol-back {
  text-decoration: none;
}

.page-trap-check-reports .trap-patrol-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-trap-check-reports .trap-patrol-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 20px;
  align-items: center;
  padding: 16px 18px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e7e0d5);
  border-radius: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.page-trap-check-reports .trap-patrol-card:hover {
  border-color: #d6d3d1;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.07);
}

.page-trap-check-reports .trap-patrol-card.has-problems {
  border-left: 4px solid #fb923c;
}

.page-trap-check-reports .trap-patrol-card.is-complete {
  border-left: 4px solid #10b981;
}

.page-trap-check-reports .trap-patrol-card.is-progress {
  border-left: 4px solid #3b82f6;
}

.page-trap-check-reports .trap-patrol-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px 16px;
  align-items: start;
  min-width: 0;
}

.page-trap-check-reports .trap-patrol-card-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 10px 8px;
  border-radius: 12px;
  background: #fafaf9;
  border: 1px solid #e7e5e4;
  text-align: center;
}

.page-trap-check-reports .trap-patrol-day {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text, #1c1917);
  line-height: 1.2;
}

.page-trap-check-reports .trap-patrol-time {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
  font-family: "Sora", sans-serif;
  color: #c2410c;
}

.page-trap-check-reports .trap-patrol-card-title {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text, #1c1917);
}

.page-trap-check-reports .trap-patrol-card-worker {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted, #78716c);
}

.page-trap-check-reports .trap-patrol-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-trap-check-reports .trap-patrol-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef233c, #d90429);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}

.page-trap-check-reports .trap-patrol-card-signature {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px dashed #fdba74;
}

.page-trap-check-reports .trap-patrol-signature-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9a3412;
  font-weight: 700;
}

.page-trap-check-reports .trap-patrol-card-progress-wrap {
  margin-top: 12px;
}

.page-trap-check-reports .trap-patrol-progress {
  height: 8px;
  border-radius: 999px;
  background: #f5f5f4;
  overflow: hidden;
}

.page-trap-check-reports .trap-patrol-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #34d399);
}

.page-trap-check-reports .trap-patrol-card.is-progress .trap-patrol-progress > span {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.page-trap-check-reports .trap-patrol-card.has-problems .trap-patrol-progress > span {
  background: linear-gradient(90deg, #f97316, #fb923c);
}

.page-trap-check-reports .trap-patrol-progress-caption {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted, #78716c);
}

.page-trap-check-reports .trap-patrol-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.page-trap-check-reports .trap-patrol-detail-btn {
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.page-trap-check-reports .trap-patrol-cancel-form {
  margin: 0;
  width: 100%;
}

.page-trap-check-reports .trap-patrol-cancel-btn {
  width: 100%;
  margin-top: 6px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 7px;
  cursor: pointer;
}

.page-trap-check-reports .trap-patrol-detail {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e7e0d5);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.05);
}

.page-trap-check-reports .trap-patrol-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, #e7e0d5);
}

.page-trap-check-reports .trap-patrol-detail-kicker {
  margin: 0 0 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c2410c;
  font-weight: 700;
}

.page-trap-check-reports .trap-patrol-detail-head h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.page-trap-check-reports .trap-patrol-detail-sub {
  margin: 0;
  color: var(--muted, #78716c);
  font-size: 0.88rem;
}

.page-trap-check-reports .trap-patrol-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-trap-check-reports .trap-patrol-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.page-trap-check-reports .trap-patrol-info-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fafaf9;
  border: 1px solid #e7e5e4;
}

.page-trap-check-reports .trap-patrol-info-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #78716c);
  font-weight: 700;
}

.page-trap-check-reports .trap-patrol-info-card strong {
  font-size: 0.95rem;
}

.page-trap-check-reports .trap-patrol-info-card .trap-patrol-person span {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--muted, #78716c);
}

.page-trap-check-reports .trap-patrol-signature-card {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border-color: #fdba74;
}

.page-trap-check-reports .trap-patrol-signature-text {
  margin: 0;
  font-family: "Segoe Script", "Bradley Hand", cursive;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #1c1917;
}

.page-trap-check-reports .trap-patrol-signature-meta {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted, #78716c);
}

.page-trap-check-reports .trap-patrol-signature-missing {
  margin: 0;
  font-size: 0.88rem;
  color: #9a3412;
}

.page-trap-check-reports .trap-patrol-progress-value {
  display: block;
  margin-bottom: 8px;
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
}

.page-trap-check-reports .trap-patrol-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-trap-check-reports .trap-patrol-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.page-trap-check-reports .trap-patrol-mini-pill.is-ok {
  background: #d1fae5;
  color: #065f46;
}

.page-trap-check-reports .trap-patrol-mini-pill.is-warn {
  background: #ffedd5;
  color: #9a3412;
}

.page-trap-check-reports .trap-patrol-scans-section {
  margin-top: 4px;
}

.page-trap-check-reports .trap-patrol-scans-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.page-trap-check-reports .trap-patrol-scans-head h3 {
  margin: 0;
  font-size: 1rem;
}

.page-trap-check-reports .trap-patrol-scans-head span {
  font-size: 0.82rem;
  color: var(--muted, #78716c);
}

.page-trap-check-reports .trap-patrol-scan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.page-trap-check-reports .trap-patrol-scan-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e7e5e4;
  background: #fff;
}

.page-trap-check-reports .trap-patrol-scan-card.is-problem {
  border-color: #fdba74;
  background: #fff7ed;
}

.page-trap-check-reports .trap-patrol-scan-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.page-trap-check-reports .trap-patrol-scan-card-top strong {
  font-size: 0.95rem;
}

.page-trap-check-reports .trap-patrol-scan-loc {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted, #78716c);
}

.page-trap-check-reports .trap-patrol-scan-qr {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  word-break: break-all;
  color: #57534e;
}

.page-trap-check-reports .trap-patrol-scan-note {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  color: #9a3412;
}

.page-trap-check-reports .trap-patrol-scan-card time {
  display: block;
  font-size: 0.75rem;
  color: var(--muted, #78716c);
}

.page-trap-check-reports .trap-patrol-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-trap-check-reports .trap-patrol-empty strong {
  font-size: 1rem;
  color: var(--text, #1c1917);
}

.page-trap-check-reports .trap-patrol-empty p {
  margin: 0;
}

body[data-theme="dark"] .page-trap-check-reports .trap-patrol-hero {
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.18) 0%, var(--card) 70%);
  border-color: rgba(251, 146, 60, 0.35);
}

body[data-theme="dark"] .page-trap-check-reports .trap-patrol-card-date,
body[data-theme="dark"] .page-trap-check-reports .trap-patrol-info-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}

body[data-theme="dark"] .page-trap-check-reports .trap-patrol-signature-card {
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.15), var(--card));
}

@media (max-width: 860px) {
  .page-trap-check-reports .trap-patrol-card,
  .page-trap-check-reports .trap-patrol-card-main {
    grid-template-columns: 1fr;
  }

  .page-trap-check-reports .trap-patrol-card-date {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    width: fit-content;
  }

  .page-trap-check-reports .trap-patrol-card-side {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ── Pulapki QR (trap_locations.php) ───────────────────────────────────── */
.page-trap-locations .trap-loc-generator-box {
  background: var(--card, #fff);
  border: 2px solid #ef233c;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(239, 35, 60, 0.08);
}

.page-trap-locations .trap-loc-generator-box h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.page-trap-locations .trap-loc-generator-box p {
  margin: 0 0 14px;
  color: var(--muted, #57534e);
  font-size: 0.9rem;
}

.page-trap-locations .trap-loc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.page-trap-locations .trap-loc-presets button {
  border: 1px solid var(--border, #d6d3d1);
  background: #fafaf9;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
}

.page-trap-locations .trap-loc-presets button:hover {
  border-color: #ef233c;
  color: #b91c1c;
}

.page-trap-locations .trap-loc-qr-host canvas,
.page-trap-locations .trap-loc-qr-host img {
  display: block;
  margin: 0 auto;
}

.page-trap-locations .trap-loc-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-trap-locations .trap-loc-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-trap-locations .trap-loc-zebra-panel {
  margin-bottom: 20px;
  border-color: #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

.page-trap-locations .trap-loc-zebra-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.page-trap-locations .trap-loc-zebra-head h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--text, #0f172a);
}

.page-trap-locations .trap-loc-zebra-lead {
  margin: 0;
  max-width: 72ch;
  color: var(--text, #334155);
  font-size: 0.9rem;
  line-height: 1.5;
}

.page-trap-locations .trap-loc-zebra-lead code {
  font-size: 0.82em;
  word-break: break-all;
}

.page-trap-locations .trap-loc-zebra-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.page-trap-locations .trap-zebra-label-size {
  min-width: 190px;
  margin: 0;
}

.page-trap-locations .trap-zebra-label-size select {
  width: 100%;
  background: #fff;
  color: var(--text, #0f172a);
}

/* legacy alias (stare wdrozenia) */
.page-trap-locations .trap-loc-zebra-bar {
  display: none;
}

.page-trap-locations .trap-loc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.page-trap-locations .trap-loc-stat-card {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e7e0d5);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.page-trap-locations .trap-loc-stat-card strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.1;
  font-family: 'Sora', sans-serif;
}

.page-trap-locations .trap-loc-stat-card span {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted, #78716c);
}

.page-trap-locations .trap-loc-stat-card.is-ok strong { color: #047857; }
.page-trap-locations .trap-loc-stat-card.is-warn strong { color: #c2410c; }

.page-trap-locations .trap-loc-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.page-trap-locations .trap-loc-panel {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e7e0d5);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.page-trap-locations .trap-loc-panel-head h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.page-trap-locations .trap-loc-panel-head p {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--muted, #78716c);
}

.page-trap-locations .trap-loc-generator-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.page-trap-locations .trap-loc-generator-form .field {
  min-width: 180px;
  flex: 1;
}

.page-trap-locations .trap-loc-hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  padding: 10px 12px;
  border-radius: 10px;
}

.page-trap-locations .trap-loc-hint.warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.page-trap-locations .trap-loc-hint.ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.page-trap-locations .trap-loc-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-trap-locations .trap-loc-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 28px;
}

.page-trap-locations .trap-loc-list-section {
  margin-top: 8px;
}

.page-trap-locations .trap-loc-list-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.page-trap-locations .trap-loc-list-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.page-trap-locations .trap-loc-count-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f5f5f4;
  color: #57534e;
}

.page-trap-locations .trap-loc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.page-trap-locations .trap-loc-card {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e7e0d5);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.page-trap-locations .trap-loc-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.page-trap-locations .trap-loc-card.is-inactive {
  opacity: 0.72;
  background: #fafaf9;
}

.page-trap-locations .trap-loc-card.is-editing {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.page-trap-locations .trap-loc-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.page-trap-locations .trap-loc-card-title-wrap h3 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.25;
}

.page-trap-locations .trap-loc-card-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #78716c);
}

.page-trap-locations .trap-loc-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.page-trap-locations .trap-loc-pill.is-on {
  background: #d1fae5;
  color: #065f46;
}

.page-trap-locations .trap-loc-pill.is-off {
  background: #f5f5f4;
  color: #57534e;
}

.page-trap-locations .trap-loc-card-note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted, #78716c);
}

.page-trap-locations .trap-loc-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
}

.page-trap-locations .trap-loc-qr {
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-trap-locations .trap-loc-qr-img {
  display: block;
  width: 108px;
  height: 108px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.page-trap-locations .trap-loc-qr-missing {
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted, #78716c);
  text-align: center;
  padding: 8px;
}

.page-trap-locations .trap-loc-qr-code {
  font-size: 0.72rem;
  word-break: break-all;
  text-align: center;
  color: #334155;
}

.page-trap-locations .trap-loc-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.page-trap-locations .trap-loc-delete-form {
  margin: 0;
}

.page-trap-locations .btn-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.page-trap-locations .trap-loc-empty {
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed var(--border, #e7e0d5);
  border-radius: 14px;
  background: #fafaf9;
}

.page-trap-locations .trap-loc-print-sheet {
  display: none;
}

@media print {
  body.page-trap-locations .app-shell > .sidebar,
  body.page-trap-locations .trap-loc-hero-actions,
  body.page-trap-locations .trap-loc-panels,
  body.page-trap-locations .trap-loc-list-section,
  body.page-trap-locations .alert {
    display: none !important;
  }

  body.page-trap-locations .trap-loc-print-sheet {
    display: block !important;
  }

  body.page-trap-locations .trap-loc-print-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  body.page-trap-locations .trap-loc-print-item {
    text-align: center;
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
  }

  body.page-trap-locations .trap-loc-print-item strong {
    display: block;
    margin-top: 6px;
    font-size: 14px;
  }

  body.page-trap-locations .trap-loc-print-item span {
    display: block;
    font-size: 10px;
    word-break: break-all;
  }

  body.page-trap-locations .trap-loc-print-item em {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    color: #555;
  }
}

body[data-theme="dark"] .page-trap-locations .trap-loc-panel,
body[data-theme="dark"] .page-trap-locations .trap-loc-stat-card,
body[data-theme="dark"] .page-trap-locations .trap-loc-card {
  background: var(--card);
  border-color: var(--border);
}

body[data-theme="dark"] .page-trap-locations .trap-loc-zebra-panel {
  border-color: #3b82f6;
}

body[data-theme="dark"] .page-trap-locations .trap-loc-zebra-lead,
body[data-theme="dark"] .page-trap-locations .trap-loc-zebra-head h2 {
  color: #e2e8f0;
}

body[data-theme="dark"] .page-trap-locations .trap-zebra-label-size select {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #475569;
}

body[data-theme="dark"] .page-trap-locations .trap-loc-qr-wrap {
  background: rgba(15, 23, 42, 0.35);
  border-color: var(--border);
}

@media (max-width: 720px) {
  .page-trap-locations .trap-loc-form-grid {
    grid-template-columns: 1fr;
  }
  .page-trap-locations .trap-loc-checkbox {
    padding-top: 0;
  }
}

/* ===== Sidebar v5 — uporządkowany układ ===== */
.sidebar.sidebar-modern.sidebar-v5 {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: auto;
  max-height: none;
  overflow: visible;
  position: relative;
  top: auto;
  align-self: start;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__top {
  flex: 0 0 auto;
  gap: 8px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-header-row .brand-block {
  margin: 0;
  min-height: 0;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-collapse-btn--icon {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  justify-content: center;
  border-radius: 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-collapse-btn--icon .sidebar-collapse-label {
  display: none;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card--compact {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card--compact .sidebar-profile-avatar {
  width: 40px;
  height: 40px;
  margin: 0;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-meta {
  min-width: 0;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-meta .sidebar-profile-name,
.sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-meta .sidebar-profile-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-block--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-block__main {
  min-width: 0;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-block--compact .warehouse-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar.sidebar-modern.sidebar-v5 .warehouse-block--compact .warehouse-link {
  margin-top: 0;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  white-space: nowrap;
}

.sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  max-height: none !important;
  padding-right: 0;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-groups {
  gap: 8px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category {
  padding: 7px;
  gap: 5px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  margin-bottom: 2px;
  padding: 2px 6px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.sidebar.sidebar-modern.sidebar-v5 .nav-link,
.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown > summary.nav-link {
  min-height: 34px;
  padding: 6px 9px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown--nested {
  margin-top: 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown--nested > summary.nav-link {
  font-size: 12px;
  opacity: 0.96;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown--nested .nav-submenu {
  margin-top: 4px;
  padding: 4px 0 2px 8px;
  border-top: 0;
  border-left: 2px solid rgba(59, 130, 246, 0.22);
  background: transparent;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-dropdown--nested .nav-submenu .nav-link {
  min-height: 32px;
  padding-left: 10px;
  font-size: 11.5px;
}

.sidebar.sidebar-modern.sidebar-v5 .nav-category-bottom {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .sidebar-header-row {
  grid-template-columns: 1fr;
  justify-items: center;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .sidebar-collapse-btn--icon {
  width: 100%;
}

body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .sidebar-profile-card--compact,
body.sidebar-collapsed .sidebar.sidebar-modern.sidebar-v5 .warehouse-block--compact {
  display: none !important;
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-category-title {
  border-bottom-color: rgba(71, 85, 105, 0.55);
}

body[data-theme="dark"] .sidebar.sidebar-modern.sidebar-v5 .nav-dropdown--nested .nav-submenu {
  border-left-color: rgba(96, 165, 250, 0.28);
}

/* Sidebar: bez wewnetrznego scrolla — pelna lista menu, przewija sie strona */
body .sidebar.sidebar-modern.sidebar-v5,
body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 {
  overflow: visible !important;
  overflow-y: visible !important;
  height: auto !important;
  max-height: none !important;
  position: relative !important;
  top: auto !important;
}

body .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll,
body:not(.popup) .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll,
body:not(.popup) .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll,
body.page-schedule .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll,
body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  max-height: none !important;
  min-height: auto !important;
  padding-right: 0 !important;
}

@media (max-height: 900px) {
  body.page-schedule .app-shell > .sidebar.sidebar-modern.sidebar-v5 .sidebar-v3__scroll {
    max-height: none !important;
    overflow-y: visible !important;
  }
}

/* ===== Schedule mobile layout (phone-first, not shrunk desktop) ===== */
@media (max-width: 900px) {
  body.page-schedule.schedule-mobile-layout,
  body.page-schedule.schedule-mobile-layout .main,
  body.page-schedule.schedule-mobile-layout .app-shell > .main {
    zoom: 1 !important;
    transform: none !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  body.page-schedule.schedule-mobile-layout .app-shell {
    display: block !important;
    grid-template-columns: none !important;
    max-width: 100vw;
  }

  body.page-schedule.schedule-mobile-layout .page-header {
    margin-bottom: 6px;
    padding: 0;
    gap: 8px;
  }

  body.page-schedule.schedule-mobile-layout .page-header > div > p {
    display: none;
  }

  body.page-schedule.schedule-mobile-layout .page-header h1 {
    font-size: 1.35rem;
    line-height: 1.2;
  }

  body.page-schedule.schedule-mobile-layout #warehouse-dayboard.is-collapsed {
    display: none;
  }

  body.page-schedule.schedule-mobile-layout #dispatcher-stats-bar {
    display: none;
  }

  body.page-schedule.schedule-mobile-layout .schedule-tools-bar {
    margin-bottom: 6px !important;
  }

  body.page-schedule.schedule-mobile-layout .layout .panel {
    padding: 4px;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .day-title-label {
    font-size: 14px;
    font-weight: 800;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .group-card {
    margin-bottom: 10px;
    border-radius: 12px;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .group-header {
    padding: 8px 10px;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .group-header__title {
    font-size: 15px !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .group-body {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    padding: 4px !important;
    gap: 4px !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .line-item {
    font-size: 10px !important;
    line-height: 1.15 !important;
    padding: 4px 2px !important;
    min-height: 56px !important;
    border-radius: 8px !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .timeline {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.72);
    padding: 4px;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .timeline-header,
  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .timeline-row,
  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .summary-row {
    grid-template-columns: repeat(24, 64px) !important;
    width: max-content;
    min-width: unset;
    gap: 3px !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .hour-cell {
    font-size: 12px !important;
    font-weight: 800 !important;
    min-height: 30px !important;
    padding: 6px 0 !important;
    scroll-snap-align: start;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .slot {
    min-height: 56px !important;
    padding: 6px 5px !important;
    border-radius: 10px !important;
    touch-action: manipulation;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .timeline-row {
    min-height: 56px !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .slot-mini-mode .mini-slot {
    gap: 6px !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .slot-mini-mode .mini-slot-dot {
    width: 10px !important;
    height: 10px !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .slot-mini-mode .mini-slot-info strong {
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .slot-mini-mode .mini-slot-info small {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .slot-mini-mode .mini-slot-code,
  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .slot-mini-mode .mini-slot-time {
    font-size: 11px !important;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .schedule-hourly-summary {
    display: none;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 2px 0;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .legend .status-pill {
    font-size: 11px;
    padding: 5px 9px;
  }

  body.page-schedule.schedule-mobile-layout .timeline-scroll-hint {
    display: block;
    margin: 0 0 6px;
    padding: 6px 10px;
    border-radius: 999px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    background: rgba(219, 234, 254, 0.9);
    border: 1px solid rgba(147, 197, 253, 0.8);
  }

  /* Stopka: nie zasłania harmonogramu — wypływowa, kompaktowa */
  body.page-schedule.schedule-mobile-layout .app-shell > .main > .page-footer.modern-footer,
  body.page-schedule.has-mobile-shell .app-shell > .main > .page-footer.modern-footer {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 10px 0 0 !important;
    padding: 8px 10px !important;
    gap: 6px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 1 !important;
  }

  body.page-schedule.schedule-mobile-layout .page-footer.modern-footer .footer-note,
  body.page-schedule.schedule-mobile-layout .page-footer.modern-footer .footer-meta,
  body.page-schedule.has-mobile-shell .page-footer.modern-footer .footer-note,
  body.page-schedule.has-mobile-shell .page-footer.modern-footer .footer-meta {
    display: none !important;
  }

  body.page-schedule.schedule-mobile-layout .page-footer.modern-footer .footer-brand,
  body.page-schedule.has-mobile-shell .page-footer.modern-footer .footer-brand {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  body.page-schedule.schedule-mobile-layout .page-footer.modern-footer .footer-right,
  body.page-schedule.has-mobile-shell .page-footer.modern-footer .footer-right {
    min-width: 0 !important;
    text-align: right !important;
  }

  body.page-schedule.schedule-mobile-layout .page-footer.modern-footer .footer-chip,
  body.page-schedule.has-mobile-shell .page-footer.modern-footer .footer-chip {
    font-size: 9px !important;
    padding: 3px 7px !important;
  }

  /* Harmonogram nie rozpycha strony w poziomie */
  body.page-schedule.schedule-mobile-layout .layout,
  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout,
  body.page-schedule.has-mobile-shell .layout,
  body.page-schedule.has-mobile-shell #schedule-root {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .group-card,
  body.page-schedule.has-mobile-shell .group-card {
    max-width: 100%;
    overflow: hidden;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .group-body,
  body.page-schedule.has-mobile-shell .group-body {
    max-width: 100%;
    overflow: hidden;
  }

  body.page-schedule.schedule-mobile-layout #schedule-root.schedule-mobile-layout .timeline,
  body.page-schedule.has-mobile-shell .timeline {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (min-width: 901px) {
  body.page-schedule .timeline-scroll-hint {
    display: none !important;
  }
}

.page-trap-check-reports .trap-patrol-presets,
.page-trap-check-reports .trap-patrol-export {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.page-trap-check-reports .trap-month-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.page-trap-check-reports .trap-month-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 10px 4px 2px;
  border-bottom: 2px solid #0f766e;
}
.page-trap-check-reports .trap-month-head h2 {
  margin: 0;
  font-size: 18px;
}
.page-trap-check-reports .trap-month-head span {
  color: var(--muted, #78716c);
  font-size: 13px;
}

