:root {
  --ink: #0b1220;
  --ink-2: #172033;
  --muted: #667085;
  --muted-2: #8a97aa;
  --line: #d8e2ee;
  --line-2: #ebf0f6;
  --soft: #eef3f9;
  --soft-2: #f7f9fc;
  --surface: #ffffff;
  --navy: #0b1b32;
  --navy-2: #122845;
  --blue: #1768c2;
  --blue-2: #0f5cae;
  --red: #bf1e3a;
  --green: #087f5b;
  --gold: #c9922f;
  --radius: 8px;
  --topbar: 64px;
  --bottom-nav: 78px;
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, .07);
  --shadow-md: 0 18px 44px rgba(15, 23, 42, .13);
  --shadow-lg: 0 26px 70px rgba(15, 23, 42, .22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 0, rgba(23, 104, 194, .12), transparent 32rem),
    linear-gradient(180deg, #eaf1f8 0, #f6f8fb 42%, #edf3f9 100%);
  color: var(--ink);
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

body.drawer-open,
body.sheet-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.admin-app[hidden],
.admin-login[hidden],
.overview-view[hidden],
.orders-view[hidden],
.schedule-view[hidden],
.create-view[hidden],
.notifications-view[hidden],
.report-panel[hidden],
.fleet-view[hidden],
.users-panel[hidden],
.native-screen[hidden] {
  display: none !important;
}

.detail-panel[hidden],
.bulk-actions[hidden],
#unread-pill[hidden],
.drawer-backdrop[hidden],
.drawer-nav button[hidden],
.empty-state[hidden],
.load-more[hidden] {
  display: none !important;
}

[data-tab-panel][hidden] {
  display: none !important;
}

.btn,
.icon-btn {
  -webkit-tap-highlight-color: transparent;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #2473cb, var(--blue));
  color: #fff;
  box-shadow: 0 12px 26px rgba(23, 104, 194, .22);
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.btn--red {
  background: linear-gradient(180deg, #d52a49, var(--red));
  box-shadow: 0 12px 26px rgba(191, 30, 58, .22);
}

.btn--light {
  background: #fff;
  color: var(--blue);
  border-color: #cbd8e7;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.btn--ghost {
  background: #f7f9fc;
  color: var(--ink);
  border-color: #d7e1ee;
  box-shadow: none;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d6e0ec;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .95);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.icon-btn--menu {
  gap: 4px;
}

.icon-btn--menu span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.status-line {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.brand-mark img {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.brand-mark span,
.admin-title span,
.native-panel header span,
.booking-command__hero span,
.booking-form__section header span,
.schedule-head span,
.fleet-head span,
.fleet-panel header span,
.push-panel header span,
.notification-panel header span,
.report-head span,
.users-panel header span,
.user-card span,
.info-cell span,
.booking-edit summary span,
.booking-ops header span,
.finance-summary span,
.stat-tile span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .01em;
}

.brand-mark strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.12;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.field label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #263348;
  font-size: 13px;
  font-weight: 850;
}

.field input,
.field select,
.field textarea,
.password-input input,
.filter-row input,
#route-filter,
.schedule-date-control input,
.fleet-form input,
.fleet-form select,
.fleet-card__edit input,
.fleet-card__edit select,
.ops-row__fields input,
.ops-row__fields select,
.user-form input,
.user-form select,
.user-card__edit input,
.user-card__edit select,
.user-card__routes select {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #cbd8e7;
  border-radius: var(--radius);
  background: #f9fbfe;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
  font-size: 16px;
  outline: 0;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.password-input input:focus,
.filter-row input:focus,
#route-filter:focus,
.schedule-date-control input:focus,
.fleet-form input:focus,
.fleet-form select:focus,
.fleet-card__edit input:focus,
.fleet-card__edit select:focus,
.ops-row__fields input:focus,
.ops-row__fields select:focus,
.user-form input:focus,
.user-form select:focus,
.user-card__edit input:focus,
.user-card__edit select:focus,
.user-card__routes select:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(23, 104, 194, .14);
}

.password-input {
  position: relative;
  display: grid;
}

.password-input input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  transform: translateY(-50%);
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle[aria-pressed="true"] {
  background: #edf5ff;
  color: var(--blue);
  outline: 0;
}

.admin-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, calc(env(safe-area-inset-top) + 24px)) 20px max(24px, calc(env(safe-area-inset-bottom) + 24px));
  background:
    linear-gradient(180deg, rgba(11, 27, 50, .86), rgba(11, 27, 50, .78)),
    url("/assets/images/premium-ops-desk.webp") center / cover;
}

.login-card {
  width: min(100%, 390px);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow-lg);
}

.login-card .brand-mark {
  margin-bottom: 18px;
}

.login-card .btn[type="submit"] {
  width: 100%;
  margin-top: 18px;
}

.admin-toast {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 140;
  width: min(calc(100vw - 28px), 430px);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid rgba(203, 216, 231, .9);
  border-radius: var(--radius);
  background: rgba(11, 27, 50, .96);
  color: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .25);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity .18s ease, transform .18s ease;
}

.admin-toast[data-show="true"] {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-toast[data-type="success"] {
  background: rgba(8, 127, 91, .97);
}

.admin-toast[data-type="error"] {
  background: rgba(191, 30, 58, .97);
}

.admin-shell {
  min-height: 100dvh;
}

.admin-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  min-height: calc(var(--topbar) + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid rgba(203, 216, 231, .82);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
  backdrop-filter: blur(18px);
}

.admin-title {
  min-width: 0;
}

.admin-title strong {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.topbar-actions .btn {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 20px;
}

body.admin-refreshing #refresh-button {
  opacity: .72;
}

body.admin-refreshing #refresh-button {
  animation: refresh-spin .78s linear infinite;
}

.admin-main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: calc(var(--topbar) + env(safe-area-inset-top) + 12px) 14px calc(24px + env(safe-area-inset-bottom));
}

.pull-refresh-indicator {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 72px);
  z-index: 29;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid rgba(203, 216, 231, .9);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-70px + var(--pull-distance, 0px)));
  transition: opacity .16s ease, transform .16s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.pull-refresh-indicator span {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(23, 104, 194, .18);
  border-top-color: var(--blue);
  border-radius: 999px;
}

.pull-refresh-indicator strong {
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.pull-refresh-indicator[data-ready="true"] span,
body.pull-refresh-loading .pull-refresh-indicator span {
  animation: refresh-spin .78s linear infinite;
}

body.pull-refresh-active .pull-refresh-indicator,
body.pull-refresh-loading .pull-refresh-indicator {
  opacity: 1;
}

@keyframes refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(11, 18, 32, .48);
  backdrop-filter: blur(5px);
}

.admin-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  width: min(90vw, 390px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: calc(16px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
  border-right: 1px solid rgba(203, 216, 231, .82);
  background:
    linear-gradient(180deg, #fff 0, #f8fbff 62%, #edf3f9 100%);
  box-shadow: 28px 0 74px rgba(11, 18, 32, .28);
  transform: translateX(-104%);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.admin-drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-head .brand-mark img {
  width: 46px;
  height: 46px;
}

.drawer-head .brand-mark span {
  font-size: 11px;
}

.drawer-head .brand-mark strong {
  font-size: 16px;
}

.drawer-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 4px 0;
  overflow-y: auto;
}

.drawer-nav button {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 38px 13px 14px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  text-align: left;
}

.drawer-nav button::after {
  content: "";
  position: absolute;
  right: 16px;
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: .45;
  transform: rotate(45deg);
}

.drawer-nav button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 14px 30px rgba(11, 27, 50, .18);
}

.drawer-actions {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.drawer-actions .btn {
  width: 100%;
}

#unread-pill {
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.admin-bottom-nav {
  display: none;
}

.today-hero,
.view-hero,
.booking-command__hero,
.schedule-head,
.report-head,
.fleet-head,
.push-panel,
.notification-panel,
.native-panel,
.users-panel,
.fleet-panel,
.report-grid section,
.report-alerts article,
.report-kpis article,
.booking-form__section {
  border: 1px solid rgba(203, 216, 231, .86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-sm);
}

.overview-view,
.orders-view,
.schedule-view,
.create-view,
.notifications-view,
.report-panel,
.fleet-view,
.users-panel,
.native-screen {
  display: grid;
  gap: 12px;
}

.admin-segment {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid #d8e2ee;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
  scrollbar-width: none;
}

.admin-segment::-webkit-scrollbar {
  display: none;
}

.admin-segment button {
  flex: 1 0 auto;
  min-height: 42px;
  min-width: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #667085;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.admin-segment button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 10px 22px rgba(11, 27, 50, .16);
}

.admin-segment--detail {
  position: relative;
  z-index: 3;
  border-radius: 0;
  border-width: 0 0 1px;
  box-shadow: none;
  background: #fff;
  padding: 8px 14px;
}

.admin-segment--form {
  position: sticky;
  top: calc(var(--topbar) + env(safe-area-inset-top) + 10px);
  z-index: 11;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}

.today-hero,
.view-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  padding: 16px;
}

.today-hero {
  background:
    linear-gradient(135deg, rgba(11, 27, 50, .98), rgba(18, 40, 69, .96)),
    radial-gradient(circle at 100% 0, rgba(201, 146, 47, .24), transparent 18rem);
  color: #fff;
}

.today-hero span,
.today-hero p {
  color: rgba(255, 255, 255, .72);
}

.today-hero strong,
.view-hero strong,
.booking-command__hero strong,
.schedule-head strong {
  display: block;
  margin-top: 3px;
  font-size: clamp(21px, 4.8vw, 28px);
  line-height: 1.08;
}

.today-hero p,
.view-hero p,
.booking-command__hero p,
.schedule-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.today-hero p {
  color: rgba(255, 255, 255, .72);
}

.today-hero .btn {
  min-width: 112px;
  background: #fff;
  color: var(--navy);
  box-shadow: none;
}

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

.stat-tile {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #fff, #f8fbff);
  color: var(--ink);
  font: inherit;
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.stat-tile:hover,
.stat-tile:focus-visible {
  border-color: rgba(23, 104, 194, .42);
  box-shadow: 0 12px 26px rgba(23, 104, 194, .13);
  transform: translateY(-1px);
}

.stat-tile:focus-visible {
  outline: 0;
}

.stat-tile strong {
  display: block;
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
}

.native-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.native-panel header strong,
.push-panel header strong,
.notification-panel header strong,
.fleet-head strong,
.fleet-panel header strong,
.users-panel header strong,
.report-head strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.quick-menu {
  display: grid;
  gap: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.quick-menu button {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 14px 42px 14px 14px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  text-align: left;
}

.quick-menu button:last-child {
  border-bottom: 0;
}

.quick-menu button::after {
  content: "";
  position: absolute;
  right: 16px;
  width: 9px;
  height: 9px;
  border-top: 2px solid #98a2b3;
  border-right: 2px solid #98a2b3;
  transform: rotate(45deg);
}

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

.native-collapse {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.native-collapse summary {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 42px 13px 14px;
  cursor: pointer;
  list-style: none;
}

.native-collapse summary::-webkit-details-marker {
  display: none;
}

.native-collapse summary::after {
  content: "";
  position: absolute;
  right: 18px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #98a2b3;
  border-bottom: 2px solid #98a2b3;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.native-collapse[open] summary::after {
  transform: rotate(-135deg);
}

.native-collapse summary span,
.account-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.native-collapse summary strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
}

.native-collapse > :not(summary) {
  margin: 0 14px 14px;
}

.collapse-actions {
  display: grid;
  gap: 8px;
}

.account-card {
  display: grid;
  gap: 8px;
}

.account-card article {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.account-card strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.report-stack,
.detail-tab-panel {
  display: grid;
  gap: 10px;
}

.filters {
  position: sticky;
  top: calc(var(--topbar) + env(safe-area-inset-top));
  z-index: 12;
  display: grid;
  gap: 10px;
  margin: 0 -14px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(203, 216, 231, .72);
  background: rgba(238, 243, 249, .92);
  backdrop-filter: blur(14px);
}

.status-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.status-tabs::-webkit-scrollbar {
  display: none;
}

.status-tabs button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #d5dfeb;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  box-shadow: 0 6px 14px rgba(15, 23, 42, .04);
  font-size: 14px;
  font-weight: 850;
}

.status-tabs button[aria-pressed="true"] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 8px;
}

#route-filter {
  color: var(--ink);
  font-weight: 800;
}

.workspace {
  display: grid;
  gap: 12px;
}

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

.booking-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 12px 12px 10px;
  border: 1px solid rgba(203, 216, 231, .9);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .055);
  cursor: pointer;
}

.booking-card::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--blue);
  opacity: .45;
}

.booking-card[aria-current="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 104, 194, .13), var(--shadow-sm);
}

.booking-card__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.booking-card__head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.booking-card__select {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e2ee;
  border-radius: var(--radius);
  background: #f8fbff;
}

.booking-card__select input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.booking-card p,
.schedule-card p,
.fleet-card p,
.notification-card p,
.timeline p,
.users-panel p,
.user-card p {
  margin: 0;
  color: #3b4a60;
  font-size: 14px;
  line-height: 1.45;
}

.booking-card__open {
  min-height: 38px;
  width: 100%;
  border: 1px solid #d7e2ef;
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf4fb;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.badge--call {
  background: var(--red);
  color: #fff;
}

.badge--new {
  background: #fff5e6;
  color: #a15c00;
}

.badge--called,
.badge--picking {
  background: #edf5ff;
  color: var(--blue);
}

.badge--confirmed,
.badge--done {
  background: #e7f7ef;
  color: var(--green);
}

.badge--cancelled,
.badge--spam {
  background: #fff0f3;
  color: var(--red);
}

.bulk-actions {
  position: sticky;
  top: calc(var(--topbar) + env(safe-area-inset-top) + 104px);
  z-index: 11;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px) auto auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #cbd8e7;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.bulk-actions__text {
  display: grid;
  gap: 2px;
}

.bulk-actions__text span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bulk-actions__text strong {
  color: var(--ink);
  font-size: 15px;
}

.bulk-actions select {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.bulk-actions .status-line {
  grid-column: 1 / -1;
  margin: 0;
}

.empty-state {
  padding: 26px 14px;
  border: 1px dashed #cbd8e7;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  color: var(--muted);
  text-align: center;
}

.load-more {
  width: 100%;
  margin-top: 10px;
}

.booking-command {
  display: grid;
  gap: 12px;
}

.booking-command__hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(11, 27, 50, .98), rgba(23, 104, 194, .92)),
    radial-gradient(circle at 100% 0, rgba(201, 146, 47, .22), transparent 18rem);
  color: #fff;
}

.booking-command__hero span,
.booking-command__hero p {
  color: rgba(255, 255, 255, .72);
}

.booking-command__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.booking-command__actions .btn {
  min-height: 42px;
  box-shadow: none;
}

.booking-command__hero a {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .13);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.create-form-collapse > .booking-form {
  margin: 0;
  padding: 0 14px 14px;
}

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

.booking-form__section {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.booking-form__section header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.booking-form__section header span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-size: 12px;
}

.booking-form__section header strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
}

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

.booking-form .field {
  margin-top: 0;
}

.booking-form .field--wide {
  grid-column: 1 / -1;
}

.booking-form__actions {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(203, 216, 231, .9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

#booking-create-form .booking-form__actions {
  position: static;
  z-index: auto;
  margin-top: 2px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  backdrop-filter: none;
}

.booking-form .btn,
.booking-form__actions .btn {
  width: 100%;
}

.booking-form--compact {
  gap: 10px;
}

.booking-form--compact .booking-form__grid {
  gap: 8px;
}

.schedule-view {
  gap: 12px;
}

.schedule-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: end;
  gap: 14px;
  padding: 16px;
}

.schedule-date-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.schedule-kpis,
.report-kpis,
.report-alerts,
.finance-summary {
  display: grid;
  gap: 8px;
}

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

.schedule-kpis article,
.finance-summary article {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.schedule-kpis span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.schedule-kpis strong,
.finance-summary strong,
.report-kpis strong,
.report-alerts strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.schedule-list,
.schedule-group,
.schedule-group__items {
  display: grid;
  gap: 10px;
}

.schedule-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.schedule-group > header strong {
  color: var(--navy);
  font-size: 18px;
}

.schedule-group > header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.schedule-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
  cursor: pointer;
}

.schedule-card:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 104, 194, .13);
}

.schedule-card > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.schedule-card strong {
  font-size: 16px;
}

.push-panel,
.notification-panel,
.fleet-head,
.fleet-panel,
.users-panel {
  padding: 14px;
}

.push-panel,
.notification-panel,
.fleet-view,
.fleet-grid,
.fleet-panel,
.fleet-list,
.notification-list,
.report-list,
.users-grid {
  display: grid;
  gap: 12px;
}

.push-panel header,
.notification-panel header,
.fleet-head,
.fleet-panel header,
.users-panel header,
.report-head,
.booking-ops header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.push-panel header p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.push-actions,
.notification-actions,
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.push-actions .btn,
.notification-actions .btn {
  min-height: 42px;
}

.notification-card {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
  text-align: left;
}

.notification-card[data-read="false"] {
  border-color: rgba(191, 30, 58, .28);
  background: #fff7f8;
}

.notification-card strong {
  color: var(--ink);
  font-size: 15px;
}

.notification-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fleet-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.fleet-form,
.fleet-card__edit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fleet-form .btn {
  grid-column: 1 / -1;
}

.fleet-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.fleet-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.fleet-card__head strong,
.user-card strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.fleet-card__head span,
.fleet-card p {
  color: var(--muted);
  font-size: 13px;
}

.fleet-card__actions,
.user-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.fleet-card__actions .btn,
.user-card__actions .btn {
  min-height: 40px;
  padding-inline: 10px;
  box-shadow: none;
}

.crud-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 0;
  background: rgba(7, 19, 36, .46);
  backdrop-filter: blur(8px);
}

.crud-sheet {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 75;
  width: min(520px, calc(100vw - 32px));
  height: min(720px, calc(100dvh - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(203, 216, 231, .92);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  isolation: isolate;
}

.crud-sheet[hidden],
.crud-backdrop[hidden] {
  display: none;
}

.crud-sheet__head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.crud-sheet__head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.crud-sheet__head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.crud-form {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

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

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

.crud-field--wide {
  grid-column: 1 / -1;
}

.crud-field span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.crud-field input,
.crud-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #b8cce3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .03);
}

.crud-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.crud-field input:focus,
.crud-field select:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 104, 194, .13);
  background: #fff;
}

.crud-form.was-validated .crud-field input:invalid,
.crud-form.was-validated .crud-field select:invalid {
  border-color: #bf1e3a;
  background: #fff7f8;
  box-shadow: 0 0 0 4px rgba(191, 30, 58, .12);
}

.crud-check-list {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  max-height: 190px;
  overflow: auto;
}

.crud-collapse {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.crud-collapse summary {
  position: relative;
  min-height: 44px;
  display: grid;
  gap: 4px;
  cursor: pointer;
  list-style: none;
}

.crud-collapse summary::-webkit-details-marker {
  display: none;
}

.crud-collapse summary span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.crud-collapse summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.crud-collapse summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  color: var(--blue);
  font-weight: 950;
}

.crud-collapse[open] summary::after {
  content: "-";
}

.crud-check-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.crud-check-toolbar button {
  min-height: 38px;
  border: 1px solid #cbd8e7;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.crud-check {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.crud-check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
}

.crud-check span {
  font-size: 13px;
  font-weight: 850;
}

.crud-form__actions {
  position: sticky;
  bottom: -14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 4px -14px -14px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.settings-form {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.settings-form label {
  display: grid;
  gap: 6px;
}

.settings-form label span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.settings-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #b8cce3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 0 12px;
}

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

.report-panel {
  display: grid;
  gap: 12px;
}

.report-head {
  align-items: flex-end;
  padding: 14px;
}

.report-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

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

.report-kpis article,
.report-alerts article,
.report-grid section {
  padding: 12px;
}

.report-kpis small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

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

.report-grid h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}

.report-row {
  display: grid;
  gap: 7px;
}

.report-row strong,
.report-row span {
  display: block;
}

.report-row strong {
  color: var(--ink);
  font-size: 14px;
}

.report-row span,
.report-empty {
  color: var(--muted);
  font-size: 12px;
}

.report-row i {
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) var(--value), #e7eef7 var(--value));
}

.detail-panel {
  position: fixed;
  inset: auto 0 0;
  z-index: 55;
  height: min(94dvh, 760px);
  max-height: 94dvh;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 -28px 70px rgba(11, 18, 32, .26);
  overflow: hidden;
  isolation: isolate;
}

.sheet-handle {
  position: relative;
  z-index: 3;
  width: 42px;
  height: 5px;
  justify-self: center;
  margin: 8px 0 2px;
  border-radius: 999px;
  background: #cbd5e1;
}

.detail-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.detail-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.14;
}

.detail-body {
  min-height: 0;
  overflow-y: auto;
  background: #fff;
  padding: 12px 14px calc(18px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}

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

.info-cell {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.info-cell strong,
.info-cell a {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.status-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.status-actions::-webkit-scrollbar {
  display: none;
}

.status-actions button {
  flex: 0 0 auto;
  min-height: 40px;
  min-width: 112px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.status-actions button[aria-pressed="true"] {
  border-color: var(--blue);
  background: #edf5ff;
  color: var(--blue);
}

.booking-ops {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.booking-edit summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
}

.booking-edit summary::-webkit-details-marker {
  display: none;
}

.booking-edit summary b {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #cbd8e7;
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.booking-edit[open] summary {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.booking-edit summary strong,
.booking-ops header strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.booking-ops header .btn {
  min-height: 38px;
  padding-inline: 10px;
  box-shadow: none;
}

.ops-list,
.timeline {
  display: grid;
  gap: 8px;
}

.ops-row {
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.ops-row__collapse {
  min-width: 0;
}

.ops-row__summary {
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
}

.ops-row__summary::-webkit-details-marker {
  display: none;
}

.ops-row__summary div {
  min-width: 0;
}

.ops-row__summary strong,
.ops-row__summary span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-row__summary strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.ops-row__summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ops-row__summary b {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid #cbd8e7;
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.ops-row__collapse[open] .ops-row__summary {
  border-bottom: 1px solid var(--line);
}

.ops-row__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.ops-row__actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 10px 10px;
}

.ops-row__actions button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--red);
  font-weight: 900;
}

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

.timeline {
  margin-top: 12px;
}

.timeline article {
  padding: 10px;
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: #f8fbff;
}

.timeline span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.user-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.user-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-card__edit {
  display: grid;
  gap: 8px;
}

.user-card__routes {
  display: grid;
  gap: 6px;
}

.user-card__routes select {
  min-height: 92px;
}

.user-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.user-form select[multiple] {
  min-height: 92px;
  padding-block: 8px;
}

@media (min-width: 960px) {
  .admin-topbar {
    padding-inline: max(18px, calc((100vw - 1180px) / 2));
  }

  .admin-main {
    padding-top: calc(var(--topbar) + env(safe-area-inset-top) + 18px);
    padding-inline: 18px;
  }

  .workspace {
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    align-items: start;
  }

  .detail-panel {
    position: sticky;
    top: calc(var(--topbar) + env(safe-area-inset-top) + 18px);
    max-height: calc(100dvh - var(--topbar) - env(safe-area-inset-top) - 36px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  .detail-panel[hidden] {
    display: grid !important;
  }

  .detail-panel.is-empty {
    grid-template-rows: 1fr;
    min-height: 360px;
  }

  .detail-panel.is-empty .sheet-handle,
  .detail-panel.is-empty .detail-head,
  .detail-panel.is-empty .detail-body {
    display: none;
  }

  .detail-panel.is-empty::before {
    content: "Chọn một đơn để xem chi tiết, phân công tài xế và chia hoa hồng";
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 28px;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
  }
}

@media (max-width: 959px) {
  :root {
    --topbar: 62px;
  }

  .admin-main {
    padding: calc(var(--topbar) + env(safe-area-inset-top) + 10px) 10px calc(var(--bottom-nav) + env(safe-area-inset-bottom) + 16px);
  }

  .admin-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 35;
    min-height: 68px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(203, 216, 231, .92);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 46px rgba(15, 23, 42, .18);
    backdrop-filter: blur(18px);
  }

  .admin-bottom-nav button {
    min-width: 0;
    min-height: 54px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: #667085;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
  }

  .admin-bottom-nav svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }

  .admin-bottom-nav button[aria-pressed="true"] {
    background: #edf5ff;
    color: var(--blue);
    box-shadow: inset 0 0 0 1px rgba(23, 104, 194, .16);
  }

  .filters {
    top: calc(var(--topbar) + env(safe-area-inset-top));
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .view-hero--orders {
    display: none;
  }

  .booking-form__actions {
    bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom) + 14px);
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .btn {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 18px;
  }

  .fleet-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .crud-sheet {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 88dvh;
    max-height: 88dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
    animation: sheet-in 180ms cubic-bezier(.2, .8, .2, 1);
  }

  .crud-form__grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    animation: sheet-in 180ms cubic-bezier(.2, .8, .2, 1);
  }
}

@media (max-width: 560px) {
  .admin-topbar {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    padding-inline: 10px;
  }

  .admin-title strong {
    font-size: 19px;
  }

  .today-hero,
  .view-hero,
  .booking-command__hero,
  .schedule-head,
  .push-panel header,
  .notification-panel header,
  .report-head,
  .fleet-head,
  .fleet-panel header,
  .users-panel header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .header-actions,
  .header-actions .btn,
  [data-crud-open] {
    width: 100%;
  }

  .crud-form__actions {
    grid-template-columns: 1fr;
  }

  .today-hero .btn,
  .booking-command__hero a,
  .schedule-date-control .btn,
  .push-actions .btn,
  .notification-actions .btn,
  .bulk-actions .btn {
    width: 100%;
  }

  .booking-command__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .booking-command__actions .btn,
  .booking-command__actions a {
    width: 100%;
  }

  .filter-row,
  .schedule-date-control,
  .bulk-actions,
  .detail-grid,
  .detail-actions,
  .booking-form__grid,
  .ops-row__fields,
  .fleet-form,
  .fleet-card__edit,
  .fleet-card__actions,
  .user-card__actions,
  .user-form {
    grid-template-columns: 1fr;
  }

  .booking-form .field--wide {
    grid-column: auto;
  }

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

  .report-kpis article,
  .report-alerts article {
    min-width: 0;
  }

  .booking-card__head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .booking-card__head .badge {
    grid-column: 2;
    justify-self: start;
  }

  .push-actions,
  .notification-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .view-hero--orders {
    display: none;
  }
}

@media (max-width: 380px) {
  .admin-title span {
    display: none;
  }

  .topbar-actions .btn {
    width: 38px;
    min-width: 38px;
  }

  .admin-bottom-nav {
    left: 6px;
    right: 6px;
    padding: 6px;
  }

  .admin-bottom-nav button {
    font-size: 10px;
  }
}

.fleet-list,
.users-grid {
  gap: 6px;
}

.fleet-card,
.user-card {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(203, 216, 231, .96);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .045);
}

.fleet-card__head,
.user-card > div:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.fleet-card__head > div,
.user-card > div:first-child {
  min-width: 0;
}

.fleet-card__head strong,
.user-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-card__head span:not(.badge),
.user-card > div:first-child span {
  flex: 0 0 auto;
  max-width: 106px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-card__head .badge {
  flex: 0 0 auto;
  padding: 5px 7px;
  font-size: 11px;
}

.fleet-card > p,
.fleet-card > .booking-meta,
.user-card > p,
.user-card__meta {
  display: none;
}

.fleet-card__actions,
.user-card__actions {
  grid-column: 2;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.fleet-card__actions .btn,
.user-card__actions .btn {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 12px;
}

@media (max-width: 560px) {
  .fleet-card,
  .user-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .fleet-card__actions,
  .user-card__actions {
    display: flex;
    grid-template-columns: none;
  }

  .user-card__actions .btn.btn--ghost {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(24px);
    opacity: .86;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}
