:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #0ea5e9;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0284c7;
  --background: #f8fafc;
  --card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --radius-card: 20px;
  --radius-btn: 12px;
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.07);
  --shadow-soft-hover: 0 16px 34px rgba(15, 23, 42, 0.11);
  --shadow-press: 0 5px 12px rgba(15, 23, 42, 0.16);
  --header-height: 72px;
  --header-h: var(--header-height);
  --topbar-height: var(--header-height);
  --page-top-gap: 10px;
  --content-top-offset: 0px;
  --scroll-offset: calc(var(--header-height) + 10px);
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Cairo", sans-serif;
  background: radial-gradient(circle at 15% 0%, #eef4ff 0%, #f8fafc 42%, #f2f6fb 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.45;
  overflow-x: hidden;
}

html {
  scroll-padding-top: var(--scroll-offset);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.topbar {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height);
  min-height: var(--header-height);
  padding: 10px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e8eef7;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-brand {
  justify-self: start;
  min-width: 0;
}

.topbar-center {
  justify-self: center;
  min-width: 0;
}

.topbar-current {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.logo-pill {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--primary), var(--secondary));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex: 0 0 auto;
}

.topbar-title,
.topbar-subtitle {
  margin: 0;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.topbar-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  position: relative;
}

.topbar-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 180px;
  padding: 4px 10px 4px 6px;
  border: 1px solid #d5e3f6;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.topbar-user-chip:hover {
  border-color: #bfd8fb;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.12);
}

.topbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.topbar-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-toggle-btn {
  display: inline-flex;
}

.btn-logout {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-logout i {
  font-size: 16px;
}

.btn-logout:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #dbe6f3;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: #475569;
  cursor: pointer;
  position: relative;
  transition: transform 0.16s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  background: #f8fbff;
  border-color: #bfdbfe;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.16);
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn.danger {
  color: var(--danger);
}

.icon-btn.has-indicator .icon-badge-count {
  position: absolute;
  top: 3px;
  inset-inline-end: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background: var(--danger);
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: min(92vw, 380px);
  background: #ffffff;
  border: 1px solid #dbe7f7;
  border-radius: 16px;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.18);
  padding: 10px;
  display: grid;
  gap: 8px;
  z-index: 1300;
  animation: notifications-in 0.22s ease;
}

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

.notifications-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.notifications-mark-read {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.notifications-mark-read:hover {
  color: #1e40af;
}

.notifications-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.notifications-list {
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding-inline-end: 2px;
}

.notifications-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px;
  display: grid;
  gap: 4px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.14s ease;
}

.notifications-item:hover {
  background: #eef5ff;
  border-color: #bfd4f8;
  transform: translateY(-1px);
}

.notifications-item-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.notifications-item-text {
  margin: 0;
  font-size: 12px;
  color: #475569;
}

.notifications-item-time {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
}

.notifications-empty {
  margin: 2px 0;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  padding: 16px 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.notifications-foot {
  border-top: 1px solid #edf2f8;
  padding-top: 8px;
  display: flex;
  justify-content: center;
}

.notifications-view-all {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.notifications-view-all:hover {
  color: #1e40af;
}

@keyframes notifications-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-shell {
  padding: 0 14px 14px;
}

.pjax-loader {
  position: sticky;
  top: 0;
  z-index: 1200;
  height: 3px;
  width: 100%;
  background: rgba(37, 99, 235, 0.08);
  overflow: hidden;
}

.pjax-loader-bar {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  transform: translateX(-120%);
}

.pjax-loader.is-active .pjax-loader-bar {
  animation: pjax-loader-slide 1s ease-in-out infinite;
}

@keyframes pjax-loader-slide {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

main {
  padding-top: calc(var(--header-height) + 10px);
}

body.no-nav main {
  padding-top: 10px;
}

.page-wrapper {
  padding-top: calc(var(--header-height) + 10px);
}

.page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 90px;
}

.page-content {
  padding: 0;
}

.page-title {
  margin: 0 0 8px;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 700;
}

.page-subtitle {
  display: block;
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: var(--space-4);
  margin-bottom: 12px;
  animation: rise-in 0.3s ease both;
  scroll-margin-top: var(--scroll-offset);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: #d6e3f5;
  box-shadow: var(--shadow-soft-hover);
  transform: translateY(-1px);
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 10px);
}

.page-back-wrap {
  position: fixed;
  top: var(--back-top-offset, 10px);
  left: 14px;
  z-index: 35;
  margin-bottom: 0;
  text-align: left;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.btn-back i {
  font-size: 16px;
}

.btn-back:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

body.has-nav {
  --back-top-offset: calc(var(--topbar-height) + 8px);
  --content-top-offset: 0px;
}

body.no-nav {
  --back-top-offset: 10px;
}

.card-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
}

.login-hero {
  background: linear-gradient(140deg, #eff6ff, #f8fafc);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.login-points {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
}

.login-points i {
  color: var(--secondary);
}

.login-card {
  animation-delay: 0.05s;
}

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

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

.stat-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px;
}

.stat-label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 19px;
  font-weight: 700;
}

.dashboard-shell {
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard-hero {
  margin-bottom: 14px;
}

.dashboard-hero .page-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.dashboard-hero .page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.dashboard-section {
  margin-bottom: 16px;
}

.dashboard-section-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.dashboard-stat-card {
  min-height: 132px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-stat-label {
  color: #64748b;
  font-size: 14px;
}

.dashboard-stat-number {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-actions-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  padding: 16px;
}

.dashboard-actions-head {
  margin-bottom: 12px;
}

.dashboard-actions-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.dashboard-actions-head p {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.dashboard-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.smart-dashboard {
  display: grid;
  gap: 16px;
}

.smart-dashboard.is-ready .dashboard-kpi-card {
  animation: fade-up 0.3s ease both;
}

.dashboard-filter-card {
  border-radius: 18px;
}

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

.dashboard-filter-head .card-title {
  margin: 0;
}

.dashboard-filter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.dashboard-filter-actions {
  display: flex;
  align-items: end;
}

.dashboard-filter-actions .btn {
  width: 100%;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.dashboard-kpi-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #dce6f5;
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 8px;
  min-height: 142px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  border-color: #c8daf5;
}

.dashboard-kpi-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  inline-size: 4px;
  block-size: 100%;
  background: #cbd5e1;
}

.dashboard-kpi-card.good::before { background: #16a34a; }
.dashboard-kpi-card.warning::before { background: #f59e0b; }
.dashboard-kpi-card.danger::before { background: #dc2626; }

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

.dashboard-kpi-title {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #1e3a8a;
  background: linear-gradient(180deg, #eaf2ff, #dde9ff);
}

.dashboard-kpi-value {
  font-size: clamp(28px, 4.3vw, 34px);
  font-weight: 800;
  line-height: 1;
}

.dashboard-kpi-change {
  font-size: 12px;
  font-weight: 700;
}

.dashboard-kpi-change.up { color: #15803d; }
.dashboard-kpi-change.down { color: #b91c1c; }
.dashboard-kpi-change.neutral { color: #64748b; }

.dashboard-kpi-grid.is-loading .dashboard-kpi-card {
  color: transparent !important;
}

.dashboard-kpi-grid.is-loading .dashboard-kpi-card * {
  color: transparent !important;
}

.dashboard-kpi-grid.is-loading .dashboard-kpi-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef2f7 20%, #f8fafc 45%, #eef2f7 70%);
  background-size: 280% 100%;
  animation: pulse 1.1s infinite;
}

.smart-alerts-card {
  border-radius: 18px;
}

.priority-alerts-list {
  display: grid;
  gap: 8px;
}

.priority-alert-item {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
}

.priority-alert-item.good {
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
}

.priority-alert-item.warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.priority-alert-item.danger {
  border-color: rgba(220, 38, 38, 0.32);
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 14px;
  padding: 11px 13px;
  min-height: 44px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.helptext {
  font-size: 12px;
  color: var(--text-secondary);
}

.u-mt-8 {
  margin-top: 8px;
}

.u-mt-10 {
  margin-top: 10px;
}

.errorlist {
  margin: 6px 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 13px;
}

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.09);
  transition: background-color 0.2s ease, transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-press);
}

.btn:hover {
  filter: saturate(1.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.14);
}

.btn-primary {
  background: linear-gradient(180deg, #2f6ff2 0%, #2563eb 100%);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #fff;
  border-color: #bfd4f8;
  color: #1d4ed8;
}

.btn-outline {
  background: #fff;
  border-color: #d1dbe8;
  color: #334155;
}

.btn-outline:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.btn-success {
  background: linear-gradient(180deg, #2ec766 0%, #22c55e 100%);
  color: #fff;
}

.btn-warning {
  background: linear-gradient(180deg, #f8b02d 0%, #f59e0b 100%);
  color: #fff;
}

.btn-dashboard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: 0.2s ease;
  white-space: nowrap;
}

.btn-dashboard.primary {
  background: #2563eb;
  color: #fff;
}

.btn-dashboard.secondary {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #2563eb;
}

.btn-dashboard:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.btn-table {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 10px;
  line-height: 1.2;
}

.btn-danger {
  background: linear-gradient(180deg, #f35a5a 0%, #ef4444 100%);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[disabled] {
  background: #cbd5e1;
  color: #475569;
  border-color: #cbd5e1;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.badge-booked { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.badge-rescheduled { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.badge-cancelled { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.badge-no-show { background: rgba(100, 116, 139, 0.2); color: #334155; }
.badge-boarded { background: rgba(14, 165, 233, 0.16); color: #0369a1; }
.badge-warning-live { background: rgba(245, 158, 11, 0.2); color: #b45309; }

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

.booking-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.booking-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.booking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.booking-title {
  font-size: 15px;
  margin: 0;
  font-weight: 700;
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 10px;
}

.bookings-tab-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bookings-tab-btn {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s ease;
}

.bookings-tab-btn i {
  font-size: 16px;
}

.bookings-tab-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.bookings-tab-btn:not(.is-active):hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-row .btn {
  flex: 1 1 46%;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  height: 66px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-link {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #334155;
  transition: color 0.2s ease, transform 0.12s ease;
}

.bottom-link:hover {
  color: var(--primary);
}

.bottom-link:active {
  transform: scale(0.92);
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(80vw, 260px);
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.22);
  padding: calc(var(--header-height) + 10px) 14px 18px;
  z-index: 1200;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  transform: translateX(108%);
  transition: transform 0.3s ease;
}

body.sidebar-open .sidebar {
  transform: translateX(0);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 1150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-section {
  padding-top: 4px;
  border-top: 1px solid #edf2f8;
}

.sidebar-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.sidebar-section-title {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0.4px;
  font-weight: 800;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 14px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}

.sidebar-link i {
  font-size: 17px;
  color: #64748b;
}

.sidebar-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
  transform: translateX(-2px);
}

.sidebar-link.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.24);
}

.sidebar-link.active i {
  color: #ffffff;
}

.toast-stack {
  position: fixed;
  bottom: calc(78px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
}

.toast-msg {
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  padding: 11px 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
  animation: toast-in 0.22s ease;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.toast-msg.success { background: var(--success); }
.toast-msg.error,
.toast-msg.danger { background: var(--danger); }
.toast-msg.warning { background: var(--warning); }
.toast-msg.info { background: var(--primary); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.aisle {
  min-height: 50px;
}

.seat-btn {
  min-height: 50px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.seat-available { background: #e2e8f0; color: #0f172a; }
.seat-selected { background: var(--primary); color: #fff; transform: scale(1.05); box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28); }
.seat-booked { background: #1e3a8a; color: #fff; }
.seat-full { background: var(--danger); color: #fff; }
.seat-male { background: #bfdbfe; color: #1e3a8a; }
.seat-female { background: #fbcfe8; color: #9d174d; }
.seat-boarded { background: #16a34a; color: #ffffff; }
.seat-girls-reserved { background: #f59e0b; color: #ffffff; }
.seat-no-show { background: #64748b; color: #ffffff; }

.hr-seat-map {
  display: grid;
  gap: 12px;
}

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

.hr-seat-grid-body {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.seat-driver-placeholder {
  background: #f1f5f9;
  color: #334155;
  border-style: dashed;
}

.seat-meta-code {
  display: block;
  font-size: 10px;
  margin-top: 3px;
  line-height: 1.1;
  opacity: 0.92;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.skeleton {
  border-radius: 12px;
  min-height: 72px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
  background-size: 400% 100%;
  animation: pulse 1.3s infinite;
}

@keyframes pulse {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 100%;
  table-layout: auto;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  font-size: 14px;
  text-align: right;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.pagination-wrap {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.pagination-summary {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mobile-pagination {
  display: none;
  justify-content: space-between;
}

.page-mobile-indicator {
  min-width: 90px;
  text-align: center;
  font-weight: 700;
  color: var(--text-secondary);
}

.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.toggle-summary {
  width: 100%;
  min-height: 44px;
  margin-bottom: 10px;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  width: fit-content;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: #fff;
  color: #2563eb;
  transition: background-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.btn-action:hover {
  background: rgba(37, 99, 235, 0.06);
}

.btn-action:active {
  transform: scale(0.98);
}

.btn-action.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.btn-action.toggle-summary {
  width: fit-content;
  min-width: 0;
  justify-content: center;
}

.employees-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.employees-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 540px;
}

.employees-search-input {
  flex: 1 1 280px;
  min-width: 220px;
}

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

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

.employees-table {
  min-width: 1180px;
}

.employees-table th,
.employees-table td {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.employees-table td:first-child {
  min-width: 270px;
}

.employees-table td:nth-child(2),
.employees-table td:nth-child(3) {
  direction: ltr;
  text-align: left;
  font-variant-numeric: tabular-nums;
  min-width: 130px;
}

.employees-table td:nth-child(9) {
  min-width: 240px;
}

.employee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.employee-actions .btn {
  flex: 0 0 auto;
}

.employee-action-form {
  margin: 0;
  display: inline-flex;
}

.employee-action-form .btn {
  width: auto;
}

.collapse-section {
  overflow: visible;
  max-height: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.collapse-section.hidden {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
}

.bulk-action-bar {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  background: #f8fbff;
}

.bulk-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.bulk-check {
  width: 18px;
  height: 18px;
}

.trip-header-sticky {
  position: static;
}

.trip-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.trip-header .page-title {
  margin-bottom: 4px;
  line-height: 1.25;
}

.trip-header .page-subtitle {
  display: block;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.trip-header .booking-meta {
  margin-bottom: 0;
  justify-content: flex-start;
}

.trip-actions-bar {
  position: sticky;
  top: calc(var(--header-h) + 6px);
  z-index: 22;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  overflow: visible;
}

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

.trip-summary-grid .stat-item {
  min-height: 92px;
}

.trip-tabs-card {
  padding: 12px;
  --trip-header-stack-offset: 0px;
}

.trip-tabs-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  position: static;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.trip-tab-btn {
  min-height: 44px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.trip-tab-btn.is-active {
  background: var(--primary);
  color: #fff;
}

.trip-tab-panel {
  display: none;
  animation: rise-in 0.2s ease;
  padding-top: 2px;
}

.trip-tab-panel.is-active {
  display: block;
}

.trip-tools-row {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.trip-header .action-row {
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  overflow: visible;
  padding-bottom: 2px;
}

.trip-header .action-row form {
  margin: 0;
}

.trip-header .action-row form,
.trip-header .action-row > button {
  flex: 0 1 auto;
}

.trip-report-menu {
  position: relative;
  display: inline-flex;
}

.trip-report-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  min-width: 170px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  z-index: 80;
}

.trip-report-download-btn,
.trip-report-download-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.trip-header .action-row .btn {
  min-width: 140px;
  min-height: 44px;
}

.trip-tools-row input,
.trip-tools-row select {
  min-height: 44px;
}

.trip-tab-panel .table th {
  white-space: nowrap;
}

.muted-text {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.audit-action-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.audit-details {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: #334155;
}

.audit-details-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trip-tools-row-waiting {
  grid-template-columns: 1fr 1fr 1fr;
}

.inline-form {
  margin: 0;
}

.inline-form .btn {
  width: 100%;
}

.seat-mode-wrap {
  margin-top: 8px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.wizard-step.is-active {
  background: var(--primary);
  color: #fff;
}

.wizard-modal {
  width: min(100%, 680px);
  padding: 16px;
}

.wizard-subtitle {
  margin: -4px 0 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.wizard-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #f8fbff;
}

.wizard-choice-group {
  display: grid;
  gap: 8px;
}

.wizard-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
}

.wizard-choice input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.wizard-choice-text {
  display: grid;
  gap: 2px;
}

.wizard-choice-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.wizard-choice-help {
  font-size: 12px;
  color: var(--text-secondary);
}

.wizard-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.rtl {
  direction: rtl;
  text-align: right;
}

.ltr {
  direction: ltr;
  text-align: left;
}

.progress-wrap {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  transition: width 0.25s ease;
}

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

.timeline-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.live-map {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.live-map-view {
  display: grid;
  gap: 16px;
}

.live-map-shell {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-inline: clamp(8px, 2vw, 20px);
  animation: fade-up 0.3s ease both;
}

.live-map-view .live-map {
  height: 70vh;
  min-height: 420px;
  border-radius: 20px;
  border: 1px solid #dbe6f3;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.trip-picker-card {
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.trip-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.trip-picker-head .card-title {
  margin-bottom: 0;
}

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

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

.trip-picker-actions .btn {
  flex: 1 1 220px;
}

.trip-picker-actions .btn-primary {
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.trip-picker-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
}

.filter-spinner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.spinner-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hr-filter {
  display: grid;
  gap: 10px;
}

.hr-filter-field {
  display: grid;
  gap: 6px;
}

.hr-filter-actions {
  display: flex;
  gap: 8px;
}

.hr-filter-actions .btn {
  flex: 1;
}

.dashboard-date-note {
  color: var(--text-secondary);
  font-size: 12px;
}

.route-occupancy-grid {
  display: grid;
  gap: 10px;
}

.route-occupancy-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.route-occupancy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.route-occupancy-head h3 {
  margin: 0;
  font-size: 15px;
}

.route-occupancy-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 30px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.occupancy-low {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.occupancy-medium {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.occupancy-high {
  background: rgba(239, 68, 68, 0.14);
  color: #991b1b;
}

.smart-alerts-grid {
  display: grid;
  gap: 10px;
}

.smart-alert-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.smart-alert-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.smart-alert-card p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #334155;
}

.desktop-only {
  display: none;
}

.mobile-only {
  display: block;
}

.trip-summary-table th,
.trip-summary-table td {
  text-align: right;
  vertical-align: middle;
}

.trip-summary-actions {
  justify-content: flex-start;
}

.empty-cell {
  text-align: center !important;
  color: var(--text-secondary);
  padding: 16px 10px !important;
}

.trip-summary-mobile {
  display: grid;
  gap: 10px;
}

.formulas-note {
  margin-bottom: 4px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.modal-card {
  width: min(100%, 620px);
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.modal-card .booking-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.form-grid {
  display: grid;
  gap: 9px;
}

.form-icon {
  position: relative;
}

.form-icon i {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.form-icon input,
.form-icon select {
  padding-right: 34px;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 44px;
  right: 50%;
  transform: translateX(50%);
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  border-radius: 8px;
  padding: 4px 8px;
  white-space: nowrap;
  pointer-events: none;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 380px) {
  .main-shell {
    padding: 0 12px 12px;
  }

  .page-wrapper {
    padding-top: 6px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    font-size: 20px;
  }

  .seat-map {
    gap: 8px;
  }

  .seat-btn {
    min-height: 46px;
    font-size: 13px;
  }

  .table th,
  .table td {
    padding: 8px 6px;
    font-size: 13px;
  }

  .page-back-wrap {
    left: 10px;
  }

  .btn-back {
    min-height: 36px;
    padding: 6px 12px;
  }
}

@media (min-width: 1024px) {
  .topbar {
    inset-inline-end: 244px;
    inset-inline-start: 0;
  }

  .sidebar {
    width: 244px;
    transform: translateX(0);
    box-shadow: none;
    z-index: 50;
  }

  .with-nav {
    margin-right: 244px;
    margin-top: 0;
  }

  .sidebar-backdrop {
    display: none;
  }

  .sidebar-toggle-btn {
    display: none;
  }

  .page-container {
    max-width: 1200px;
    margin: 0 auto 16px;
  }

  .bottom-nav {
    display: none;
  }

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

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

  .action-row .btn {
    flex: 0 1 auto;
  }

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

  .dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-filter-grid {
    grid-template-columns: minmax(220px, 320px) auto;
  }

  .hr-filter {
    grid-template-columns: minmax(240px, 320px) auto;
    align-items: end;
  }

  .hr-filter-actions {
    justify-content: flex-start;
  }

  .hr-filter-actions .btn {
    flex: 0 1 auto;
    min-width: 120px;
  }

  .trip-summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .trip-tools-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

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

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

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

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

  .desktop-only {
    display: block;
  }

  .mobile-only {
    display: none;
  }
}

@media (max-width: 1023px) {
  .trip-tabs-card {
    --trip-header-stack-offset: 0px;
  }
}

@media (max-width: 768px) {
  .card {
    border-radius: 16px;
    padding: 14px;
  }

  .btn,
  .btn-dashboard {
    width: 100%;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
  }

  .topbar-center {
    display: none;
  }

  .topbar-left {
    min-width: 0;
    gap: 8px;
  }

  .topbar-title,
  .topbar-subtitle {
    max-width: 130px;
  }

  .topbar-subtitle {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
    flex-shrink: 0;
  }

  .topbar-user-name {
    display: none;
  }

  .topbar-user-chip {
    padding: 4px;
    max-width: none;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .topbar-current {
    font-size: 13px;
    text-align: center;
  }

  .btn-logout {
    height: 36px;
    font-size: 13px;
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .btn-logout span {
    display: none;
  }

  .sidebar {
    width: min(84vw, 290px);
  }

  .sidebar-section-title {
    display: none;
  }

  .bookings-tab-btn {
    min-height: 48px;
    justify-content: center;
    padding: 10px 8px;
    font-size: 12px;
  }

  .dashboard-actions-row .btn-dashboard {
    width: 100%;
  }

  .dashboard-stat-number {
    font-size: 28px;
  }

  .trip-actions-bar {
    top: calc(var(--header-h) + 4px);
    padding: 6px;
  }

  .trip-header .action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .trip-header .action-row form,
  .trip-header .action-row > button {
    width: 100%;
  }

  .trip-header .action-row .btn {
    min-width: 100%;
    width: 100%;
  }

  .trip-header .page-subtitle {
    font-size: 13px;
  }

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

  .trip-tools-row-waiting {
    grid-template-columns: 1fr;
  }

  .trip-tabs-card {
    padding: 10px;
  }

  .btn-action.responsive-full {
    width: 100%;
  }

  .employees-toolbar,
  .employees-search-form,
  .employees-actions {
    width: 100%;
  }

  .employees-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .employees-table {
    min-width: 920px;
  }

  .employees-table td:first-child {
    min-width: 220px;
  }

  .employees-table td:nth-child(9) {
    min-width: 210px;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    border-radius: 16px;
    padding: 12px;
  }

  .live-map-shell {
    padding-inline: 0;
  }

  .live-map-view .live-map {
    height: 50vh;
    min-height: 300px;
    border-radius: 20px;
  }

  .trip-picker-card {
    padding: 16px;
  }

  .trip-picker-actions .btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-wrapper {
    padding-top: calc(var(--header-height) + 8px);
  }

  .desktop-pagination {
    display: none;
  }

  .mobile-pagination {
    display: flex;
  }

  .bulk-action-bar {
    position: sticky;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 30;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (min-width: 1024px) {
  body.has-nav {
    --content-top-offset: 0px;
  }

  .topbar {
    height: var(--header-height);
    min-height: var(--header-height);
  }
}


