@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/*
 * Car Rental Admin UI — Roadbook Control
 * Unified presentation layer for Bootstrap 3 and Bootstrap 5 admin pages.
 * Load this file last and scope every admin page with body.cr-admin.
 */

/* --------------------------------------------------------------------------
   Design tokens and safe base styles
   -------------------------------------------------------------------------- */

body.cr-admin {
  /* Legacy page aliases. They keep older inline admin styles on the same palette. */
  --primary: #073b57;
  --secondary: #022a3e;
  --success: #198754;
  --info: #0c607d;
  --warning: #f5c400;
  --danger: #c94a55;
  --light: #f3f6f7;
  --dark: #111111;

  --cr-canvas: #eef1f3;
  --cr-surface: #ffffff;
  --cr-surface-muted: #f3f6f7;
  --cr-surface-hover: #eef4f6;
  --cr-surface-raised: #ffffff;
  --cr-ink: #111111;
  --cr-muted: #64747c;
  --cr-line: #d9e2e6;
  --cr-line-strong: #c7d4da;

  --cr-sidebar: #022a3e;
  --cr-sidebar-hover: #073b57;
  --cr-sidebar-active: #0b4967;
  --cr-sidebar-text: #f5f8fa;
  --cr-sidebar-muted: #a9bfca;

  --cr-primary: #073b57;
  --cr-primary-hover: #022a3e;
  --cr-primary-soft: #e5eff3;
  --cr-on-primary: #ffffff;
  --cr-secondary: #f5c400;
  --cr-secondary-soft: #fff7ce;

  --cr-success: #287a4b;
  --cr-warning: #9a640b;
  --cr-danger: #b83b42;
  --cr-info: #2e6f89;

  --cr-pending-bg: #fff3d6;
  --cr-pending-text: #8a5a00;
  --cr-pending-line: #e8c46e;
  --cr-confirmed-bg: #e5f1f3;
  --cr-confirmed-text: #24606a;
  --cr-confirmed-line: #b7d3d7;
  --cr-success-bg: #e4f3e9;
  --cr-success-text: #24663e;
  --cr-success-line: #b8d9c3;
  --cr-active-bg: #dff2ee;
  --cr-active-text: #17675f;
  --cr-active-line: #aed8d0;
  --cr-neutral-bg: #ecefec;
  --cr-neutral-text: #56615e;
  --cr-neutral-line: #d4dad6;
  --cr-danger-bg: #fbe5e5;
  --cr-danger-text: #a6323a;
  --cr-danger-line: #ebc0c3;
  --cr-maintenance-bg: #f1eaf7;
  --cr-maintenance-text: #6b477a;
  --cr-maintenance-line: #d8c7e2;

  --cr-radius-xs: 6px;
  --cr-radius-sm: 9px;
  --cr-radius-md: 14px;
  --cr-radius-lg: 18px;
  --cr-shadow-sm: 0 1px 2px rgba(20, 40, 45, 0.06);
  --cr-shadow-md: 0 14px 34px -24px rgba(20, 40, 45, 0.45);
  --cr-focus: 0 0 0 3px rgba(7, 59, 87, 0.18);

  --cr-sidebar-width: 264px;
  --cr-header-height: 64px;
  --cr-content-max: 1600px;

  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--cr-canvas);
  color: var(--cr-ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.cr-admin *,
body.cr-admin *::before,
body.cr-admin *::after {
  box-sizing: border-box;
}

body.cr-admin ::selection {
  background: var(--cr-primary);
  color: var(--cr-on-primary);
}

body.cr-admin :where(button, input, select, textarea) {
  font: inherit;
}

body.cr-admin :where(h1, h2, h3, h4, h5, h6, .page-title, .section-heading, .calendar-title) {
  color: var(--cr-ink);
  font-family: "Manrope", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

body.cr-admin :where(p, li, td, th, input, select, textarea) {
  overflow-wrap: anywhere;
}

body.cr-admin a {
  color: #000000;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body.cr-admin a:hover,
body.cr-admin a:focus {
  color: var(--cr-primary-hover);
}

body.cr-admin :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--cr-primary);
  outline-offset: 2px;
}

body.cr-admin :where(.text-muted, .help-block, .form-text) {
  color: var(--cr-muted) !important;
}

body.cr-admin :where(.border, .border-top, .border-end, .border-bottom, .border-start) {
  border-color: var(--cr-line) !important;
}

/* --------------------------------------------------------------------------
   Shared shell: header, navigation and content offsets
   -------------------------------------------------------------------------- */

body.cr-admin .admin-header {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--cr-sidebar-width);
  z-index: 1025;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--cr-header-height);
  padding: 0 24px;
  border-bottom: 1px solid var(--cr-line);
  background: var(--cr-surface);
  box-shadow: var(--cr-shadow-sm);
  color: var(--cr-ink);
  transition: left 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

body.cr-admin .admin-header .header-left {
  min-width: 0;
}

body.cr-admin .admin-header :where(h1, h2) {
  max-width: 42vw;
  margin: 0;
  overflow: hidden;
  color: var(--cr-ink);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cr-admin .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

body.cr-admin .header-link,
body.cr-admin .admin-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-sm);
  background: var(--cr-surface-raised);
  color: var(--cr-muted);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

body.cr-admin :where(.header-link, .admin-chip):hover {
  border-color: var(--cr-line-strong);
  background: var(--cr-surface-hover);
  color: var(--cr-ink);
  transform: translateY(-1px);
}

body.cr-admin :where(.header-link.active, .header-link.is-active, .admin-chip.is-active) {
  border-color: var(--cr-primary);
  background: var(--cr-primary-soft);
  color: var(--cr-primary-hover);
}

body.cr-admin :where(.header-link-danger, .admin-chip.is-danger) {
  border-color: var(--cr-danger-line);
  background: var(--cr-danger-bg);
  color: var(--cr-danger-text);
}

body.cr-admin .menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-sm);
  background: var(--cr-surface-raised);
  color: var(--cr-ink);
  box-shadow: none;
  cursor: pointer;
}

body.cr-admin .menu-toggle :where(i, svg) {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

body.cr-admin :where(.sidebar, .ts-sidebar) {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  scrollbar-width: thin;
}

body.cr-admin :where(.sidebar, .ts-sidebar)::-webkit-scrollbar {
  width: 6px;
}

body.cr-admin :where(.sidebar, .ts-sidebar)::-webkit-scrollbar-track {
  background: transparent;
}

body.cr-admin :where(.sidebar, .ts-sidebar)::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

/* Modern sidebar */
body.cr-admin .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1035;
  width: var(--cr-sidebar-width);
  height: 100vh;
  padding: 18px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--cr-sidebar);
  color: var(--cr-sidebar-text);
  box-shadow: 12px 0 32px -28px rgba(0, 0, 0, 0.7);
  transition: transform 200ms ease;
}

body.cr-admin .sidebar::before {
  display: none;
}

body.cr-admin .sidebar-menu {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: calc(100vh - 102px);
  margin: 64px 0 0;
  padding: 0;
}

body.cr-admin .sidebar-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 8px 12px 8px 11px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: var(--cr-radius-sm);
  background: transparent;
  color: var(--cr-sidebar-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

body.cr-admin .sidebar-item :where(i, svg) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: currentColor;
  font-size: 16px;
}

body.cr-admin .sidebar-item:hover,
body.cr-admin .sidebar-item.active,
body.cr-admin .sidebar-item.is-active {
  border-left-color: var(--cr-primary);
  background: var(--cr-sidebar-active);
  color: #ffffff;
  transform: translateX(1px);
}

body.cr-admin .sidebar-item:last-child {
  margin-top: auto;
  color: #f2b3a5;
}

/* Bootstrap 3 / legacy sidebar */
body.cr-admin .ts-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1035;
  width: var(--cr-sidebar-width);
  max-height: none;
  padding: calc(var(--cr-header-height) + 14px) 14px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--cr-sidebar);
  color: var(--cr-sidebar-text);
  box-shadow: 12px 0 32px -28px rgba(0, 0, 0, 0.7);
  transition: transform 200ms ease;
}

body.cr-admin .ts-sidebar-menu,
body.cr-admin .ts-sidebar-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.cr-admin .ts-sidebar-menu .ts-label {
  margin: 18px 10px 7px;
  padding: 0;
  color: #829895;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

body.cr-admin .ts-sidebar-menu > li > a,
body.cr-admin .ts-sidebar-menu li ul a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 12px;
  border-left: 3px solid transparent;
  border-radius: var(--cr-radius-sm);
  background: transparent;
  color: var(--cr-sidebar-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

body.cr-admin .ts-sidebar-menu li i {
  flex: 0 0 28px;
  width: 28px;
  margin: 0 8px 0 0;
  color: currentColor;
  text-align: center;
}

body.cr-admin .ts-sidebar-menu > li > a:hover,
body.cr-admin .ts-sidebar-menu > li.open > a,
body.cr-admin .ts-sidebar-menu > li.active > a {
  border-left-color: var(--cr-primary);
  background: var(--cr-sidebar-active);
  color: #ffffff;
}

body.cr-admin .ts-sidebar-menu li ul {
  max-height: 0;
  margin: 3px 0;
  overflow: hidden;
  background: transparent;
  transition: max-height 180ms ease;
}

body.cr-admin .ts-sidebar-menu li.open > ul,
body.cr-admin .ts-sidebar-menu .menu-open {
  max-height: 1200px;
}

body.cr-admin .ts-sidebar-menu li ul a {
  min-height: 38px;
  margin-left: 36px;
  padding: 7px 10px;
  border-left-width: 2px;
  color: #9fb1ad;
  font-size: 13px;
  font-weight: 500;
}

body.cr-admin .ts-sidebar-menu li ul a:hover,
body.cr-admin .ts-sidebar-menu li ul a.active {
  border-left-color: var(--cr-primary);
  background: var(--cr-sidebar-hover);
  color: #ffffff;
}

body.cr-admin .ts-sidebar-menu .more {
  position: absolute;
  top: 2px;
  right: 3px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--cr-sidebar-muted);
  cursor: pointer;
}

body.cr-admin .ts-sidebar-menu .more i {
  width: auto;
  margin: 0;
  padding: 0;
  transition: transform 160ms ease;
}

body.cr-admin .ts-sidebar-menu li.open > .more i {
  transform: rotate(180deg);
}

/* Modern and legacy content offsets */
body.cr-admin .main-content,
body.cr-admin .ts-main-content > .content-wrapper {
  position: relative;
  min-height: 100vh;
  margin-top: 0;
  margin-left: var(--cr-sidebar-width);
  padding: calc(var(--cr-header-height) + 28px) 28px 36px;
  background: transparent;
  transition: margin-left 180ms ease, padding 180ms ease;
}

body.cr-admin :where(.main-content, .ts-main-content > .content-wrapper) > .container-fluid {
  width: 100%;
  max-width: var(--cr-content-max);
  margin-right: auto;
  margin-left: auto;
  padding-right: 0;
  padding-left: 0;
}

/* --------------------------------------------------------------------------
   Page headings, layout helpers and cards
   -------------------------------------------------------------------------- */

body.cr-admin :where(.page-title, .section-heading, .main-content h2.mb-4) {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  color: var(--cr-ink);
  font-size: clamp(24px, 2.1vw, 30px);
  font-weight: 650;
  line-height: 1.15;
}

body.cr-admin :where(.page-subtitle, .section-copy, .section-head p, .hero p) {
  color: var(--cr-muted);
}

body.cr-admin :where(.dashboard-shell, .ops-shell, .section-stack, .admin-main__content) {
  display: grid;
  gap: 20px;
  min-width: 0;
}

body.cr-admin :where(.hero-grid, .split-grid, .risk-grid, .fleet-grid, .kpi-grid, .admin-grid) {
  display: grid;
  gap: 16px;
  min-width: 0;
}

body.cr-admin .hero-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
}

body.cr-admin .split-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

body.cr-admin :where(.risk-grid, .fleet-grid) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.cr-admin :where(
  .cr-card,
  .panel,
  .card,
  .surface-card,
  .dashboard-card,
  .calendar-container,
  .accordion-container,
  .filters-container,
  .data-table-container,
  .vehicles-table-container,
  .user-table-container,
  .stats-simple,
  .user-card,
  .empty-state,
  .admin-card,
  .admin-form-card,
  .admin-table-wrap
) {
  min-width: 0;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-md);
  background: var(--cr-surface);
  box-shadow: var(--cr-shadow-sm);
  color: var(--cr-ink);
}

body.cr-admin :where(.panel, .card, .calendar-container, .accordion-container, .data-table-container, .vehicles-table-container, .user-table-container, .admin-table-wrap) {
  overflow: hidden;
}

body.cr-admin :where(.panel-default, .panel-primary, .panel-success, .panel-warning, .panel-danger) {
  border-color: var(--cr-line);
}

body.cr-admin :where(
  .panel-heading,
  .card-header,
  .data-table-header,
  .vehicles-table-header,
  .user-table-header,
  .calendar-header,
  .accordion-container > .accordion-header,
  .section-head,
  .admin-section-head
) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  margin: 0;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--cr-line);
  border-radius: 0;
  background: var(--cr-surface);
  color: var(--cr-ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
}

body.cr-admin :where(.section-head, .admin-section-head, .calendar-header) {
  flex-wrap: wrap;
}

body.cr-admin :where(.section-head h2, .admin-section-head h2, .calendar-header h2, .calendar-header h3, .accordion-header h4) {
  margin: 0;
  color: var(--cr-ink);
  font-size: 17px;
  font-weight: 650;
}

body.cr-admin :where(.section-head p, .admin-section-head p) {
  margin: 3px 0 0;
  color: var(--cr-muted);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
}

body.cr-admin :where(.panel-body, .card-body, .cr-card__body, .admin-card, .admin-form-card) {
  padding: 20px;
}

body.cr-admin :where(.panel-footer, .card-footer, .cr-card__footer) {
  padding: 14px 20px;
  border: 0;
  border-top: 1px solid var(--cr-line);
  background: var(--cr-surface-muted);
}

body.cr-admin .hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--cr-line);
  border-left: 4px solid var(--cr-primary);
  border-radius: var(--cr-radius-lg);
  background: var(--cr-surface);
  box-shadow: var(--cr-shadow-sm);
  color: var(--cr-ink);
}

body.cr-admin .hero::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 22%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cr-primary-soft));
  opacity: 0.6;
}

body.cr-admin .hero > * {
  position: relative;
  z-index: 1;
}

body.cr-admin .hero h1 {
  margin: 0 0 9px;
  color: var(--cr-ink);
  font-size: clamp(25px, 2.4vw, 32px);
  font-weight: 650;
  line-height: 1.15;
}

body.cr-admin :where(.mini-card, .task-card, .alert-card, .metric-card, .hero-stat, .admin-list__item, .admin-note) {
  padding: 16px;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-md);
  background: var(--cr-surface-raised);
  color: var(--cr-ink);
  box-shadow: none;
}

body.cr-admin .task-card {
  border-left: 3px solid var(--cr-secondary);
}

body.cr-admin .alert-card {
  border-left: 3px solid var(--cr-danger);
  background: var(--cr-danger-bg);
}

body.cr-admin :where(.metric-card__label, .hero-stat__label, .admin-metric span) {
  margin-bottom: 7px;
  color: var(--cr-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.075em;
  line-height: 1.3;
  text-transform: uppercase;
}

body.cr-admin :where(.metric-card__value, .hero-stat__value, .admin-metric strong) {
  margin: 0;
  color: var(--cr-ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

body.cr-admin :where(.metric-card__meta, .hero-stat__meta, .item-copy, .item-meta, .admin-metric small) {
  margin: 7px 0 0;
  color: var(--cr-muted);
  font-size: 13px;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Dashboard metrics and operational grids
   -------------------------------------------------------------------------- */

body.cr-admin :where(.stats-grid, .stats-grid-dashboard, .kpi-grid, .admin-metrics, .admin-dashboard-stats, .admin-dashboard-kpis) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
  margin: 0;
}

body.cr-admin :where(.stat-card, .kpi, .admin-metric) {
  position: relative;
  min-width: 0;
  min-height: 126px;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--cr-line);
  border-top: 3px solid var(--cr-secondary);
  border-radius: var(--cr-radius-md);
  background: var(--cr-surface);
  box-shadow: var(--cr-shadow-sm);
  color: var(--cr-ink);
}

body.cr-admin .stat-card::after,
body.cr-admin .kpi::after {
  display: none;
}

body.cr-admin :where(.stat-card--success, .kpi.green) {
  border-top-color: var(--cr-success);
}

body.cr-admin :where(.stat-card--warning, .kpi.orange) {
  border-top-color: var(--cr-warning);
}

body.cr-admin :where(.stat-card--danger, .kpi.red) {
  border-top-color: var(--cr-danger);
}

body.cr-admin :where(.stat-card--info, .kpi.blue) {
  border-top-color: var(--cr-info);
}

body.cr-admin :where(.kpi.violet, .admin-metric--accent) {
  border-top-color: var(--cr-maintenance-text);
}

body.cr-admin :where(.stat-card__icon, .kpi > i) {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--cr-secondary-soft);
  color: var(--cr-secondary);
  font-size: 16px;
}

body.cr-admin .stat-card--success .stat-card__icon {
  background: var(--cr-success-bg);
  color: var(--cr-success-text);
}

body.cr-admin .stat-card--warning .stat-card__icon {
  background: var(--cr-pending-bg);
  color: var(--cr-pending-text);
}

body.cr-admin .stat-card--danger .stat-card__icon {
  background: var(--cr-danger-bg);
  color: var(--cr-danger-text);
}

body.cr-admin :where(.stat-card__label, .kpi__label) {
  max-width: calc(100% - 46px);
  margin: 0 0 11px;
  color: var(--cr-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.075em;
  line-height: 1.35;
  text-transform: uppercase;
}

body.cr-admin :where(.stat-card__value, .kpi__value) {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--cr-ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(28px, 2.4vw, 34px);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

body.cr-admin :where(.stat-card__meta, .kpi__meta) {
  margin: 8px 0 0;
  color: var(--cr-muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.4;
}

body.cr-admin :where(.cards, .admin-list, .admin-activity, .admin-order-cards) {
  display: grid;
  gap: 10px;
}

body.cr-admin .list-row,
body.cr-admin .admin-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.cr-admin :where(.item-title, .admin-list__item strong) {
  margin: 0;
  color: var(--cr-ink);
  font-size: 14px;
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   Buttons, filters, actions and compact controls
   -------------------------------------------------------------------------- */

body.cr-admin :where(.btn, .add-btn, .cr-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--cr-radius-sm);
  background-image: none;
  box-shadow: none;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  white-space: normal;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

body.cr-admin :where(.btn, .add-btn, .cr-button):hover {
  transform: translateY(-1px);
}

body.cr-admin :where(.btn, .add-btn, .cr-button):active {
  transform: translateY(0);
}

body.cr-admin :where(.btn-primary, .add-btn, .cr-button--primary) {
  border-color: var(--cr-primary);
  background: var(--cr-primary);
  color: var(--cr-on-primary);
}

body.cr-admin :where(.btn-primary, .add-btn, .cr-button--primary):hover,
body.cr-admin :where(.btn-primary, .add-btn, .cr-button--primary):focus {
  border-color: var(--cr-primary-hover);
  background: var(--cr-primary-hover);
  color: var(--cr-on-primary);
}

body.cr-admin :where(.btn-secondary, .btn-default, .cr-button--secondary) {
  border-color: var(--cr-line-strong);
  background: var(--cr-surface-raised);
  color: var(--cr-ink);
}

body.cr-admin :where(.btn-secondary, .btn-default, .cr-button--secondary):hover,
body.cr-admin :where(.btn-secondary, .btn-default, .cr-button--secondary):focus {
  border-color: var(--cr-secondary);
  background: var(--cr-secondary-soft);
  color: var(--cr-secondary);
}

body.cr-admin .btn-success {
  border-color: var(--cr-success);
  background: var(--cr-success);
  color: #ffffff;
}

body.cr-admin .btn-warning {
  border-color: var(--cr-warning);
  background: var(--cr-warning);
  color: #ffffff;
}

body.cr-admin :where(.btn-danger, .cr-button--danger) {
  border-color: var(--cr-danger);
  background: var(--cr-danger);
  color: #ffffff;
}

body.cr-admin :where(.btn-info, .btn-outline-primary) {
  border-color: var(--cr-secondary);
  background: var(--cr-secondary-soft);
  color: var(--cr-secondary);
}

body.cr-admin :where(.btn-outline-secondary, .btn-outline-danger) {
  border-color: var(--cr-line-strong);
  background: transparent;
  color: var(--cr-muted);
}

body.cr-admin .btn-outline-danger {
  border-color: var(--cr-danger-line);
  color: var(--cr-danger-text);
}

body.cr-admin :where(.btn-link, .inline-link) {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cr-primary);
  box-shadow: none;
}

body.cr-admin :where(.btn-sm, .btn-group-sm > .btn) {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
}

body.cr-admin :where(.btn-xs) {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11.5px;
}

body.cr-admin :where(.btn-lg, .btn-group-lg > .btn) {
  min-height: 46px;
  padding: 10px 18px;
  font-size: 14px;
}

body.cr-admin .btn-block {
  width: 100%;
}

body.cr-admin :where(.btn:disabled, .btn.disabled, .cr-button:disabled) {
  pointer-events: none;
  opacity: 0.55;
  transform: none;
}

body.cr-admin :where(.btn i, .btn svg, .add-btn i, .add-btn svg) {
  position: static;
  flex: 0 0 auto;
  margin: 0;
}

body.cr-admin :where(.action-buttons, .user-card-actions, .filter-buttons, .calendar-filters, .toolbar-row, .chip-row, .admin-actions) {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.cr-admin :where(.filter-btn, .toolbar-chip, .chip) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--cr-line);
  border-radius: 8px;
  background: var(--cr-surface-raised);
  color: var(--cr-muted);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}

body.cr-admin :where(.filter-btn, .toolbar-chip, .chip):hover,
body.cr-admin :where(.filter-btn.active, .toolbar-chip.active, .chip.active) {
  border-color: var(--cr-primary);
  background: var(--cr-primary-soft);
  color: var(--cr-primary-hover);
}

body.cr-admin :where(.btn-icon, .admin-icon-btn) {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--cr-line);
  border-radius: 9px;
  background: var(--cr-surface-raised);
  color: var(--cr-muted);
  box-shadow: none;
  cursor: pointer;
}

/* Consistent labels for icon-only actions across the admin interface. */
body.cr-admin :where(.btn-icon, .admin-icon-btn)[title]::after {
  position: absolute;
  z-index: 100000;
  right: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 240px;
  padding: 7px 9px;
  border-radius: 7px;
  background: #102a3a;
  color: #fff;
  box-shadow: 0 8px 22px rgba(5, 31, 45, .22);
  content: attr(title);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 4px);
  transition: opacity .14s ease, transform .14s ease;
}

body.cr-admin :where(.btn-icon, .admin-icon-btn)[title]:is(:hover, :focus-visible)::after {
  opacity: 1;
  transform: translate(50%, 0);
}

body.cr-admin .action-buttons {
  gap: 10px;
  row-gap: 12px;
  overflow: visible;
}

body.cr-admin .btn-view {
  border-color: var(--cr-confirmed-line);
  background: var(--cr-confirmed-bg);
  color: var(--cr-confirmed-text);
}

body.cr-admin .btn-edit {
  border-color: var(--cr-pending-line);
  background: var(--cr-pending-bg);
  color: var(--cr-pending-text);
}

body.cr-admin .btn-delete {
  border-color: var(--cr-danger-line);
  background: var(--cr-danger-bg);
  color: var(--cr-danger-text);
}

body.cr-admin .btn-confirm {
  border-color: var(--cr-success-line);
  background: var(--cr-success-bg);
  color: var(--cr-success-text);
}

/* --------------------------------------------------------------------------
   Semantic statuses and Bootstrap badge adapters
   -------------------------------------------------------------------------- */

body.cr-admin :where(.cr-status, .status-badge, .booking-status, .soft-badge, .badge, .label) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--cr-neutral-line);
  border-radius: var(--cr-radius-xs);
  background: var(--cr-neutral-bg);
  color: var(--cr-neutral-text);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
}

body.cr-admin .cr-status::before,
body.cr-admin .status-badge::before,
body.cr-admin .booking-status::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

body.cr-admin :where(.status-pending, .is-warn, .is-warning, .badge.bg-warning, .label-warning) {
  border-color: var(--cr-pending-line) !important;
  background: var(--cr-pending-bg) !important;
  color: var(--cr-pending-text) !important;
}

body.cr-admin :where(.status-confirmed, .is-info, .badge.bg-primary, .badge.bg-info, .label-primary, .label-info) {
  border-color: var(--cr-confirmed-line) !important;
  background: var(--cr-confirmed-bg) !important;
  color: var(--cr-confirmed-text) !important;
}

body.cr-admin :where(.status-paid, .status-rented, .status-available, .is-success, .badge.bg-success, .label-success) {
  border-color: var(--cr-success-line) !important;
  background: var(--cr-success-bg) !important;
  color: var(--cr-success-text) !important;
}

body.cr-admin :where(.status-active, .is-active-status) {
  border-color: var(--cr-active-line) !important;
  background: var(--cr-active-bg) !important;
  color: var(--cr-active-text) !important;
}

body.cr-admin :where(.status-completed, .status-unavailable, .is-muted, .badge.bg-secondary, .label-default) {
  border-color: var(--cr-neutral-line) !important;
  background: var(--cr-neutral-bg) !important;
  color: var(--cr-neutral-text) !important;
}

body.cr-admin :where(.status-cancelled, .status-canceled, .status-overdue, .is-danger, .badge.bg-danger, .label-danger) {
  border-color: var(--cr-danger-line) !important;
  background: var(--cr-danger-bg) !important;
  color: var(--cr-danger-text) !important;
}

body.cr-admin :where(.status-maintenance, .status-service) {
  border-color: var(--cr-maintenance-line) !important;
  background: var(--cr-maintenance-bg) !important;
  color: var(--cr-maintenance-text) !important;
}

/* --------------------------------------------------------------------------
   Tables and DataTables
   -------------------------------------------------------------------------- */

body.cr-admin :where(.table-responsive) {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-radius: 0 0 var(--cr-radius-md) var(--cr-radius-md);
  -webkit-overflow-scrolling: touch;
}

body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  color: var(--cr-ink);
  font-size: 13.5px;
  line-height: 1.45;
}

body.cr-admin :where(.table, .data-table, .vehicles-table, .user-table, .ops-table) > :not(caption) > * > * {
  border-color: var(--cr-line);
  background: transparent;
  color: inherit;
  box-shadow: none;
}

body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) th {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--cr-line);
  background: var(--cr-surface-muted);
  color: var(--cr-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.35;
  text-align: left;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) td {
  min-height: 52px;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid var(--cr-line);
  background: transparent;
  color: var(--cr-ink);
  vertical-align: middle;
}

body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) tbody tr {
  transition: background-color 140ms ease;
}

body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) tbody tr:hover > * {
  background: var(--cr-surface-hover);
}

body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) tbody tr:last-child td {
  border-bottom: 0;
}

body.cr-admin .table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: transparent;
  background: transparent;
  box-shadow: none;
}

body.cr-admin .table-bordered,
body.cr-admin .table-bordered > :not(caption) > * {
  border-color: var(--cr-line);
}

body.cr-admin .table-bordered > :not(caption) > * > * {
  border-right: 0;
  border-left: 0;
}

body.cr-admin .table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: var(--cr-surface-hover);
  background: var(--cr-surface-hover);
  color: var(--cr-ink);
}

body.cr-admin table.dataTable {
  width: 100% !important;
  border-bottom: 0 !important;
}

body.cr-admin table.dataTable.no-footer {
  border-bottom-color: var(--cr-line);
}

body.cr-admin .dataTables_wrapper {
  width: 100%;
  color: var(--cr-ink);
}

body.cr-admin .dataTables_wrapper > .row,
body.cr-admin .dataTables_wrapper .dataTables_controls {
  margin: 0;
  padding: 14px 16px;
}

body.cr-admin .dataTables_wrapper > .row:first-child {
  border-bottom: 1px solid var(--cr-line);
  background: var(--cr-surface);
}

body.cr-admin .dataTables_wrapper > .row:last-child {
  border-top: 1px solid var(--cr-line);
  background: var(--cr-surface);
}

body.cr-admin :where(.dataTables_length, .dataTables_filter, .dataTables_info, .dataTables_paginate) {
  color: var(--cr-muted) !important;
  font-size: 12.5px;
}

body.cr-admin .dataTables_filter {
  text-align: right;
}

body.cr-admin :where(.dataTables_filter input, .dataTables_length select) {
  min-height: 36px;
  margin-left: 7px;
  padding: 6px 10px;
  border: 1px solid var(--cr-line-strong);
  border-radius: 8px;
  background: var(--cr-surface-raised);
  color: var(--cr-ink);
  outline: none;
}

body.cr-admin .dataTables_filter input:focus,
body.cr-admin .dataTables_length select:focus {
  border-color: var(--cr-primary);
  box-shadow: var(--cr-focus);
}

body.cr-admin :where(.pagination, .dataTables_paginate .pagination) {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}

body.cr-admin :where(.pagination > li > a, .pagination > li > span, .page-link, .paginate_button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid var(--cr-line) !important;
  border-radius: 7px !important;
  background: var(--cr-surface-raised) !important;
  color: var(--cr-muted) !important;
  box-shadow: none !important;
}

body.cr-admin :where(.pagination > .active > a, .pagination > .active > span, .page-item.active .page-link, .paginate_button.current) {
  border-color: var(--cr-primary) !important;
  background: var(--cr-primary) !important;
  color: var(--cr-on-primary) !important;
}

body.cr-admin :where(.pagination > .disabled > a, .pagination > .disabled > span, .page-item.disabled .page-link, .paginate_button.disabled) {
  opacity: 0.5;
}

body.cr-admin :where(.dataTables_empty, .empty-state) {
  padding: 36px 20px !important;
  color: var(--cr-muted) !important;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Forms, inputs and Bootstrap adapters
   -------------------------------------------------------------------------- */

body.cr-admin :where(.form-group, .mb-3, .cr-field) {
  min-width: 0;
}

body.cr-admin :where(.control-label, .form-label, .admin-label, .cr-label, .admin-form label > span) {
  display: block;
  margin: 0 0 7px;
  color: var(--cr-muted);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

body.cr-admin :where(
  .form-control,
  .form-select,
  .cr-control,
  .admin-form input,
  .admin-form select,
  .admin-form textarea,
  .admin-inline-form input,
  .admin-inline-form select,
  .admin-inline-form textarea,
  .bootstrap-select > .dropdown-toggle
) {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--cr-line-strong);
  border-radius: var(--cr-radius-sm);
  background: var(--cr-surface-raised);
  background-image: none;
  color: var(--cr-ink);
  box-shadow: none;
  font-size: 14px;
  line-height: 1.35;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

body.cr-admin :where(textarea.form-control, .admin-form textarea, .admin-inline-form textarea) {
  min-height: 112px;
  resize: vertical;
}

body.cr-admin :where(
  .form-control,
  .form-select,
  .cr-control,
  .admin-form input,
  .admin-form select,
  .admin-form textarea,
  .admin-inline-form input,
  .admin-inline-form select,
  .admin-inline-form textarea
):focus {
  border-color: var(--cr-primary);
  background: var(--cr-surface-raised);
  color: var(--cr-ink);
  box-shadow: var(--cr-focus);
}

body.cr-admin :where(.form-control, .form-select, .cr-control)::placeholder {
  color: var(--cr-muted);
  opacity: 0.72;
}

body.cr-admin :where(.form-control, .form-select, .cr-control):disabled,
body.cr-admin :where(.form-control[readonly], .cr-control[readonly]) {
  border-color: var(--cr-line);
  background: var(--cr-surface-muted);
  color: var(--cr-muted);
  opacity: 1;
}

body.cr-admin :where(.form-control.is-invalid, .has-error .form-control) {
  border-color: var(--cr-danger);
}

body.cr-admin :where(.form-control.is-valid, .has-success .form-control) {
  border-color: var(--cr-success);
}

body.cr-admin :where(.input-group-addon, .input-group-text) {
  border-color: var(--cr-line-strong);
  background: var(--cr-surface-muted);
  color: var(--cr-muted);
}

body.cr-admin .input-group > :first-child {
  border-top-left-radius: var(--cr-radius-sm);
  border-bottom-left-radius: var(--cr-radius-sm);
}

body.cr-admin .input-group > :last-child {
  border-top-right-radius: var(--cr-radius-sm);
  border-bottom-right-radius: var(--cr-radius-sm);
}

body.cr-admin :where(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--cr-primary);
}

body.cr-admin :where(.checkbox label, .radio label, .form-check-label) {
  color: var(--cr-ink);
}

body.cr-admin :where(.admin-form, .admin-inline-form) {
  display: grid;
  gap: 16px;
}

body.cr-admin :where(.admin-row.two, .admin-inline-form.two) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.cr-admin .admin-row.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

body.cr-admin .dropdown-menu {
  z-index: 1080;
  padding: 7px;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-sm);
  background-color: var(--cr-surface-raised);
  background-image: none;
  opacity: 1;
  box-shadow: var(--cr-shadow-md);
  color: var(--cr-ink);
}

body.cr-admin :where(.dropdown-menu > li > a, .dropdown-item) {
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--cr-ink);
}

body.cr-admin :where(.dropdown-menu > li > a, .dropdown-item):hover {
  background: var(--cr-surface-hover);
  color: var(--cr-primary-hover);
}

/* --------------------------------------------------------------------------
   Alerts, notifications and empty states
   -------------------------------------------------------------------------- */

body.cr-admin :where(.alert, .notification, .errorWrap, .succWrap, .admin-note) {
  margin: 0 0 16px;
  padding: 13px 15px;
  border: 1px solid var(--cr-line);
  border-left-width: 3px;
  border-radius: var(--cr-radius-sm);
  background: var(--cr-surface);
  box-shadow: none;
  color: var(--cr-ink);
  font-size: 13.5px;
  line-height: 1.5;
}

body.cr-admin :where(.alert-success, .notification-success, .succWrap) {
  border-color: var(--cr-success-line);
  border-left-color: var(--cr-success);
  background: var(--cr-success-bg);
  color: var(--cr-success-text);
}

body.cr-admin :where(.alert-warning, .notification-warning) {
  border-color: var(--cr-pending-line);
  border-left-color: var(--cr-warning);
  background: var(--cr-pending-bg);
  color: var(--cr-pending-text);
}

body.cr-admin :where(.alert-danger, .notification-error, .errorWrap) {
  border-color: var(--cr-danger-line);
  border-left-color: var(--cr-danger);
  background: var(--cr-danger-bg);
  color: var(--cr-danger-text);
}

body.cr-admin :where(.alert-info, .notification-info) {
  border-color: var(--cr-confirmed-line);
  border-left-color: var(--cr-info);
  background: var(--cr-confirmed-bg);
  color: var(--cr-confirmed-text);
}

body.cr-admin .empty-state {
  padding: 38px 22px;
  text-align: center;
}

body.cr-admin .empty-state :where(h3, h4, p) {
  margin-right: auto;
  margin-left: auto;
  max-width: 560px;
}

body.cr-admin .empty-state p {
  margin-top: 8px;
  color: var(--cr-muted);
}

/* --------------------------------------------------------------------------
   Accordions and detail blocks
   -------------------------------------------------------------------------- */

body.cr-admin .accordion {
  --bs-accordion-bg: var(--cr-surface);
  --bs-accordion-color: var(--cr-ink);
  --bs-accordion-border-color: var(--cr-line);
  --bs-accordion-btn-color: var(--cr-ink);
  --bs-accordion-btn-bg: var(--cr-surface);
  --bs-accordion-active-color: var(--cr-primary-hover);
  --bs-accordion-active-bg: var(--cr-primary-soft);
}

body.cr-admin .accordion-item {
  border: 0;
  border-bottom: 1px solid var(--cr-line);
  border-radius: 0;
  background: var(--cr-surface);
  color: var(--cr-ink);
}

body.cr-admin .accordion-item:last-child {
  border-bottom: 0;
}

body.cr-admin .accordion-button {
  min-height: 54px;
  padding: 14px 20px;
  border: 0;
  border-radius: 0;
  background: var(--cr-surface);
  color: var(--cr-ink);
  box-shadow: none;
  font-size: 14px;
  font-weight: 650;
}

body.cr-admin .accordion-button:not(.collapsed) {
  background: var(--cr-primary-soft);
  color: var(--cr-primary-hover);
  box-shadow: inset 3px 0 0 var(--cr-primary);
}

body.cr-admin .accordion-button::after {
  opacity: 0.68;
}

body.cr-admin .accordion-body {
  padding: 18px 20px 20px;
  background: var(--cr-surface);
  color: var(--cr-ink);
}

body.cr-admin :where(.detail-box, .detail-box-full, .detail-item, .detail-value-block) {
  margin-bottom: 10px;
  padding: 13px 14px;
  border: 1px solid var(--cr-line);
  border-left: 3px solid var(--cr-secondary);
  border-radius: var(--cr-radius-sm);
  background: var(--cr-surface-muted);
  color: var(--cr-ink);
}

body.cr-admin :where(.detail-label, .info-label) {
  display: block;
  margin: 0 0 4px;
  color: var(--cr-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.065em;
  line-height: 1.35;
  text-transform: uppercase;
}

body.cr-admin :where(.detail-value, .info-value) {
  color: var(--cr-ink);
  font-size: 14px;
  font-weight: 650;
}

body.cr-admin .booking-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

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

body.cr-admin .modal-content {
  overflow: hidden;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-md);
  background: var(--cr-surface);
  box-shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.55);
  color: var(--cr-ink);
}

body.cr-admin .modal-header,
body.cr-admin #viewModal .modal-header {
  min-height: 58px;
  padding: 15px 20px;
  border: 0;
  border-top: 3px solid var(--cr-primary);
  border-bottom: 1px solid var(--cr-line);
  background: var(--cr-surface);
  color: var(--cr-ink);
}

body.cr-admin .modal-title {
  margin: 0;
  color: var(--cr-ink);
  font-size: 18px;
  font-weight: 650;
}

body.cr-admin .modal-body {
  padding: 20px;
  background: var(--cr-surface);
  color: var(--cr-ink);
}

body.cr-admin .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--cr-line);
  background: var(--cr-surface);
}

body.cr-admin .modal-header .close {
  color: var(--cr-ink);
  text-shadow: none;
  opacity: 0.7;
}

body.cr-admin .modal-header .btn-close {
  filter: none;
  opacity: 0.65;
}

body.cr-admin .modal-backdrop.show,
body.cr-admin .modal-backdrop.in {
  opacity: 0.48;
}

/* --------------------------------------------------------------------------
   FullCalendar
   -------------------------------------------------------------------------- */

body.cr-admin .calendar-section {
  margin: 0;
}

body.cr-admin .calendar-container {
  padding: 18px;
}

body.cr-admin .dashboard-calendar {
  width: min(100%, 1120px);
}

body.cr-admin .dashboard-calendar .calendar-header {
  min-height: 0;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--cr-line);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: var(--cr-surface);
}

body.cr-admin .dashboard-calendar__heading {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

body.cr-admin .dashboard-calendar__icon {
  display: inline-grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--cr-secondary);
  color: #111111;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(245, 196, 0, 0.2);
}

body.cr-admin .dashboard-calendar__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--cr-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.cr-admin .dashboard-calendar .calendar-title {
  font-size: 16px;
  line-height: 1.25;
}

body.cr-admin .dashboard-calendar .calendar-container {
  padding: 13px 15px 15px;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 12px 32px rgba(2, 42, 62, 0.07);
}

body.cr-admin .dashboard-calendar .fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 10px;
}

body.cr-admin .dashboard-calendar .fc .fc-col-header-cell-cushion {
  padding: 6px 4px;
}

body.cr-admin .dashboard-calendar .fc .fc-daygrid-day-number {
  padding: 5px 7px;
}

body.cr-admin .fc {
  color: var(--cr-ink);
}

body.cr-admin .fc .fc-toolbar.fc-header-toolbar {
  gap: 10px;
  margin-bottom: 16px;
}

body.cr-admin .fc .fc-toolbar-title {
  color: var(--cr-ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px !important;
  font-weight: 650;
  letter-spacing: -0.02em;
}

body.cr-admin .fc .fc-button {
  min-height: 34px;
  padding: 6px 10px !important;
  border: 1px solid var(--cr-line-strong) !important;
  border-radius: 8px !important;
  background: var(--cr-surface-raised) !important;
  color: var(--cr-muted) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-transform: none !important;
}

body.cr-admin .fc .fc-button:hover,
body.cr-admin .fc .fc-button.fc-button-active,
body.cr-admin .fc .fc-button:active {
  border-color: var(--cr-primary) !important;
  background: var(--cr-primary) !important;
  color: var(--cr-on-primary) !important;
}

body.cr-admin :where(.fc-theme-standard td, .fc-theme-standard th, .fc-theme-standard .fc-scrollgrid) {
  border-color: var(--cr-line) !important;
}

body.cr-admin .fc .fc-col-header-cell {
  background: var(--cr-surface-muted);
}

body.cr-admin .fc .fc-col-header-cell-cushion {
  padding: 8px 4px;
  color: var(--cr-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.cr-admin .fc .fc-daygrid-day-number {
  padding: 7px;
  color: var(--cr-muted);
  font-size: 12px;
  text-decoration: none;
}

body.cr-admin .fc .fc-day-today {
  background: var(--cr-primary-soft) !important;
}

body.cr-admin .fc .fc-daygrid-event {
  margin: 2px 4px;
  padding: 4px 7px !important;
  overflow: hidden;
  border: 0 !important;
  border-left: 3px solid currentColor !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 650;
}

body.cr-admin :where(.fc-event.booking-pending, .booking-pending) {
  background: var(--cr-pending-bg) !important;
  color: var(--cr-pending-text) !important;
}

body.cr-admin :where(.fc-event.booking-confirmed, .booking-confirmed) {
  background: var(--cr-confirmed-bg) !important;
  color: var(--cr-confirmed-text) !important;
}

body.cr-admin :where(.fc-event.booking-paid, .booking-paid) {
  background: var(--cr-success-bg) !important;
  color: var(--cr-success-text) !important;
}

/* --------------------------------------------------------------------------
   Roadbook application chrome (new cr-* markup)
   -------------------------------------------------------------------------- */

body.cr-admin .cr-topbar__left,
body.cr-admin .cr-topbar__actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

body.cr-admin .cr-topbar__left {
  gap: 12px;
}

body.cr-admin .cr-topbar__actions {
  justify-content: flex-end;
  gap: 8px;
}

body.cr-admin .cr-topbar__title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.cr-admin .cr-topbar__title h1 {
  max-width: min(44vw, 620px);
  margin: 0;
  overflow: hidden;
  color: var(--cr-ink);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cr-admin .cr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--cr-muted);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.09em;
  line-height: 1.25;
  text-transform: uppercase;
}

body.cr-admin .cr-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-sm);
  background: var(--cr-surface-raised);
  color: var(--cr-muted);
  box-shadow: none;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

body.cr-admin .cr-icon-button:hover,
body.cr-admin .cr-icon-button:focus {
  border-color: var(--cr-secondary);
  background: var(--cr-secondary-soft);
  color: var(--cr-secondary);
  transform: translateY(-1px);
}

body.cr-admin .cr-icon-button--danger {
  border-color: var(--cr-danger-line);
  background: var(--cr-danger-bg);
  color: var(--cr-danger-text);
}

body.cr-admin .cr-icon-button--danger:hover,
body.cr-admin .cr-icon-button--danger:focus {
  border-color: var(--cr-danger);
  background: var(--cr-danger);
  color: #ffffff;
}

body.cr-admin .cr-topbar .menu-toggle {
  display: none;
}

body.cr-admin .cr-topbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--cr-line-strong);
  border-radius: var(--cr-radius-sm);
  background: var(--cr-surface-raised);
  color: var(--cr-ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

body.cr-admin .cr-topbar-button:hover {
  border-color: var(--cr-secondary);
  background: var(--cr-secondary-soft);
  color: var(--cr-secondary);
  transform: translateY(-1px);
}

body.cr-admin .cr-topbar-button--primary {
  border-color: var(--cr-primary);
  background: var(--cr-primary);
  color: var(--cr-on-primary);
}

body.cr-admin .cr-topbar-button--primary:hover,
body.cr-admin .cr-topbar-button--primary:focus {
  border-color: var(--cr-primary-hover);
  background: var(--cr-primary-hover);
  color: var(--cr-on-primary);
}

body.cr-admin .cr-admin-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 40px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-sm);
  background: var(--cr-surface-raised);
  color: var(--cr-ink);
}

body.cr-admin .cr-admin-user__avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--cr-secondary-soft);
  color: var(--cr-secondary);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

body.cr-admin .cr-admin-user__meta {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1.1;
}

body.cr-admin .cr-admin-user__meta strong,
body.cr-admin .cr-admin-user__meta small {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cr-admin .cr-admin-user__meta strong {
  color: var(--cr-ink);
  font-size: 11.5px;
  font-weight: 700;
}

body.cr-admin .cr-admin-user__meta small {
  color: var(--cr-muted);
  font-size: 9.5px;
}

/* New grouped sidebar */
body.cr-admin .cr-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 13px 14px;
}

body.cr-admin .cr-sidebar__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 3px;
}

body.cr-admin .cr-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--cr-sidebar-text);
  text-decoration: none;
}

body.cr-admin .cr-brand:hover,
body.cr-admin .cr-brand:focus {
  color: #ffffff;
}

body.cr-admin .cr-brand__mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 64px;
  width: 64px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: var(--cr-primary);
  color: var(--cr-on-primary);
  box-shadow: 0 10px 24px -15px rgba(201, 79, 50, 0.8);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.025em;
}

body.cr-admin .cr-brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}


body.cr-admin .cr-brand__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.15;
}

body.cr-admin .cr-brand__copy strong,
body.cr-admin .cr-brand__copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cr-admin .cr-brand__copy strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

body.cr-admin .cr-brand__copy small {
  color: var(--cr-sidebar-muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

body.cr-admin .cr-sidebar__close {
  display: none;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cr-sidebar-muted);
}

body.cr-admin .cr-nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--cr-radius-sm);
  background: rgba(255, 255, 255, 0.045);
  color: var(--cr-sidebar-muted);
  cursor: text;
}

body.cr-admin .cr-nav-search > i {
  flex: 0 0 auto;
  font-size: 13px;
}

body.cr-admin .cr-nav-search input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  font-size: 12.5px;
  outline: none;
}

body.cr-admin .cr-nav-search input::placeholder {
  color: #809591;
  opacity: 1;
}

body.cr-admin .cr-nav-search:focus-within {
  border-color: rgba(241, 132, 100, 0.62);
  box-shadow: 0 0 0 3px rgba(201, 79, 50, 0.14);
}

body.cr-admin .cr-nav {
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
  align-content: start;
  min-height: 0;
  padding-right: 3px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
}

body.cr-admin .cr-nav-group {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: var(--cr-radius-sm);
}

body.cr-admin .cr-nav-group[hidden],
body.cr-admin .cr-nav-link[hidden] {
  display: none !important;
}

body.cr-admin .cr-nav-group.is-active,
body.cr-admin .cr-nav-group.is-open {
  border-color: rgba(255, 255, 255, 0.1);
  background: #073b57;
}

body.cr-admin .cr-nav-group__toggle {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cr-sidebar-muted);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}

body.cr-admin .cr-nav-group__toggle:hover,
body.cr-admin .cr-nav-group.is-active > .cr-nav-group__toggle {
  background: var(--cr-sidebar-hover);
  color: #ffffff;
}

body.cr-admin .cr-nav-group__icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: currentColor;
  font-size: 13px;
}

body.cr-admin .cr-nav-group__chevron {
  color: currentColor;
  font-size: 12px;
  opacity: 0.7;
  transition: transform 160ms ease;
}

body.cr-admin .cr-nav-group.is-open .cr-nav-group__chevron {
  transform: rotate(180deg);
}

body.cr-admin .cr-nav-group__items {
  display: grid;
  gap: 2px;
  max-height: 0;
  padding: 0 7px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 180ms ease, padding 180ms ease, opacity 140ms ease;
}

body.cr-admin .cr-nav-group.is-open .cr-nav-group__items {
  max-height: 520px;
  margin: 3px 6px 7px;
  padding: 5px 1px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: #022a3e;
  opacity: 1;
  visibility: visible;
}

body.cr-admin .cr-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-left: 32px;
  padding: 6px 9px 6px 13px;
  border-radius: 7px;
  color: #9eb0ac;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.25;
  text-decoration: none;
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

body.cr-admin .cr-nav-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #607671;
  transform: translateY(-50%);
}

body.cr-admin .cr-nav-link:hover {
  background: var(--cr-sidebar-hover);
  color: #ffffff;
  transform: translateX(1px);
}

body.cr-admin .cr-nav-link.is-active,
body.cr-admin .cr-nav-link[aria-current="page"] {
  background: var(--cr-sidebar-active);
  color: #ffffff;
  font-weight: 650;
}

body.cr-admin .cr-nav-link.is-active::before,
body.cr-admin .cr-nav-link[aria-current="page"]::before {
  width: 6px;
  height: 6px;
  background: var(--cr-primary);
  box-shadow: 0 0 0 3px rgba(201, 79, 50, 0.14);
}

body.cr-admin .cr-shift-card {
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--cr-radius-md);
  background: rgba(255, 255, 255, 0.045);
  color: var(--cr-sidebar-text);
}

body.cr-admin .cr-shift-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.cr-admin .cr-shift-card .cr-eyebrow {
  color: #95a9a5;
}

body.cr-admin .cr-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #83ce9d;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.cr-admin .cr-live-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #65b982;
  box-shadow: 0 0 0 3px rgba(101, 185, 130, 0.13);
}

body.cr-admin .cr-shift-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

body.cr-admin .cr-shift-card__stats > div {
  min-width: 0;
  padding: 8px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

body.cr-admin .cr-shift-card__stats strong,
body.cr-admin .cr-shift-card__stats span {
  display: block;
}

body.cr-admin .cr-shift-card__stats strong {
  color: #ffffff;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1;
}

body.cr-admin .cr-shift-card__stats span {
  margin-top: 4px;
  overflow: hidden;
  color: #8fa39f;
  font-size: 8.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

body.cr-admin .cr-shift-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #f0b19f;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
}

body.cr-admin .cr-shift-card__action:hover {
  color: #ffffff;
}

body.cr-admin .cr-sidebar__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  flex: 0 0 auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.cr-admin .cr-sidebar__footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--cr-sidebar-muted);
  font-size: 10.5px;
  font-weight: 650;
  text-decoration: none;
}

body.cr-admin .cr-sidebar__footer a:hover {
  background: var(--cr-sidebar-hover);
  color: #ffffff;
}

body.cr-admin .cr-sidebar__footer a.is-danger {
  color: #efa19d;
}

body.cr-admin .cr-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1030;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(5, 13, 15, 0.58);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

/* Dashboard command hero */
body.cr-admin .cr-command-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 22px;
  align-items: stretch;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--cr-primary);
  border-radius: var(--cr-radius-lg);
  background: var(--cr-sidebar);
  box-shadow: var(--cr-shadow-md);
  color: #ffffff;
}

body.cr-admin .cr-command-hero::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -75px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  background: rgba(201, 79, 50, 0.07);
  pointer-events: none;
}

body.cr-admin .cr-command-hero__copy,
body.cr-admin .cr-command-hero__status {
  position: relative;
  z-index: 1;
  min-width: 0;
}

body.cr-admin .cr-command-hero__copy {
  display: grid;
  gap: 10px;
  align-content: center;
}

body.cr-admin .cr-command-hero .cr-eyebrow {
  color: #f0a08a;
}

body.cr-admin .cr-command-hero__copy h2 {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 650;
  line-height: 1.08;
}

body.cr-admin .cr-command-hero__copy p {
  max-width: 720px;
  margin: 0;
  color: #b9c9c5;
  font-size: 13.5px;
  line-height: 1.55;
}

body.cr-admin .cr-command-hero__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
}

body.cr-admin .cr-command-hero .cr-button--secondary {
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

body.cr-admin .cr-command-hero .cr-button--secondary:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

body.cr-admin .cr-command-hero__status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.cr-admin .cr-command-status {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 82px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.055);
}

body.cr-admin .cr-command-status span,
body.cr-admin .cr-command-status strong {
  display: block;
}

body.cr-admin .cr-command-status span {
  color: #9fb2ae;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.3;
  text-transform: uppercase;
}

body.cr-admin .cr-command-status strong {
  margin-top: 6px;
  color: #ffffff;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1;
}

body.cr-admin .cr-command-status--live {
  grid-column: 1 / -1;
  min-height: 58px;
  border-color: rgba(101, 185, 130, 0.24);
  background: rgba(101, 185, 130, 0.09);
}

body.cr-admin .cr-command-status--live strong {
  color: #83ce9d;
  font-size: 18px;
}

body.cr-admin .cr-command-status--live strong::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #65b982;
  box-shadow: 0 0 0 4px rgba(101, 185, 130, 0.12);
  vertical-align: 2px;
}

/* Compact dashboard layout */
body.cr-admin .dashboard-shell {
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.72fr);
  gap: 14px;
  align-items: start;
}

body.cr-admin .dashboard-shell > .cr-command-hero,
body.cr-admin .dashboard-shell > .stats-grid-dashboard {
  grid-column: 1 / -1;
}

body.cr-admin .dashboard-shell > .cr-command-hero {
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.8fr);
  gap: 16px;
  padding: 16px 18px;
  border-left-color: var(--cr-secondary);
  border-radius: 15px;
}

body.cr-admin .dashboard-shell .cr-command-hero__copy {
  gap: 6px;
}

body.cr-admin .dashboard-shell .cr-command-hero__copy h2 {
  font-size: clamp(20px, 1.8vw, 26px);
}

body.cr-admin .dashboard-shell .cr-command-hero__copy p {
  display: none;
}

body.cr-admin .dashboard-shell .cr-command-hero__actions {
  margin-top: 2px;
}

body.cr-admin .dashboard-shell .cr-command-hero__actions .cr-button {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 11px;
}

body.cr-admin .dashboard-shell .cr-command-hero__status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

body.cr-admin .dashboard-shell .cr-command-status,
body.cr-admin .dashboard-shell .cr-command-status--live {
  grid-column: auto;
  min-height: 68px;
  padding: 10px 11px;
}

body.cr-admin .dashboard-shell .cr-command-status strong,
body.cr-admin .dashboard-shell .cr-command-status--live strong {
  margin-top: 4px;
  font-size: 18px;
}

body.cr-admin .stats-grid-dashboard {
  gap: 10px;
  margin-bottom: 0;
}

body.cr-admin .stats-grid-dashboard .stat-card {
  min-height: 82px;
  padding: 11px 13px;
  border-top-width: 2px;
  border-radius: 13px;
}

body.cr-admin .stats-grid-dashboard .stat-card__icon {
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 13px;
}

body.cr-admin .stats-grid-dashboard .stat-card__label {
  margin-bottom: 5px;
  font-size: 9px;
}

body.cr-admin .stats-grid-dashboard .stat-card__value {
  font-size: 23px;
}

body.cr-admin .stats-grid-dashboard .stat-card__meta {
  margin-top: 2px;
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cr-admin .dashboard-shell > .dashboard-calendar {
  grid-column: 1;
  width: 100%;
}

body.cr-admin .dashboard-shell > .accordion-container {
  grid-column: 2;
  align-self: start;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(2, 42, 62, 0.07);
}

body.cr-admin .dashboard-shell > .accordion-container > .accordion-header {
  min-height: 0;
  padding: 15px 16px;
  background: var(--cr-primary);
}

body.cr-admin .dashboard-shell > .accordion-container > .accordion-header h4 {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.35;
}

body.cr-admin .dashboard-shell > .accordion-container .accordion-button {
  min-height: 44px;
  padding: 10px 13px;
  font-size: 12px;
}

body.cr-admin .dashboard-shell > .accordion-container .accordion-body {
  padding: 10px 13px 13px;
  font-size: 11px;
}

body.cr-admin .dashboard-shell > .accordion-container .col-md-6 {
  width: 100%;
}

body.cr-admin .dashboard-shell > .accordion-container .py-2 {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

body.cr-admin .dashboard-shell > .accordion-container .mt-3 {
  margin-top: 10px !important;
}

body.cr-admin .dashboard-calendar .calendar-header {
  gap: 10px;
  padding: 11px 13px;
}

body.cr-admin .dashboard-calendar .calendar-filters {
  gap: 5px;
}

body.cr-admin .dashboard-calendar .filter-btn {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 10px;
}

body.cr-admin .dashboard-calendar .calendar-container {
  padding: 10px 12px 12px;
  border: 1px solid var(--cr-line);
  border-top: 0;
  background: #f8fafb;
}

body.cr-admin .dashboard-calendar .filter-btn:hover,
body.cr-admin .dashboard-calendar .filter-btn.active {
  border-color: var(--cr-primary) !important;
  background: var(--cr-primary) !important;
  color: #ffffff !important;
}

body.cr-admin .dashboard-calendar .fc {
  --fc-border-color: #d5e0e5;
  --fc-neutral-bg-color: #eef3f5;
  --fc-page-bg-color: #ffffff;
  --fc-today-bg-color: #fff8d8;
  font-size: 11px;
}

body.cr-admin .dashboard-calendar .fc .fc-scrollgrid {
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
}

body.cr-admin .dashboard-calendar .fc .fc-daygrid-day-frame {
  min-height: 48px;
}

body.cr-admin .dashboard-calendar .fc .fc-daygrid-day:hover {
  background: #f5f8f9;
}

body.cr-admin .dashboard-calendar .fc .fc-daygrid-event {
  min-height: 22px;
  margin: 2px 3px;
  padding: 3px 6px !important;
  border-left-width: 3px !important;
  line-height: 1.35;
}

body.cr-admin .dashboard-calendar .fc .fc-event-main,
body.cr-admin .dashboard-calendar .fc .fc-event-title,
body.cr-admin .dashboard-calendar .fc .fc-event-time {
  overflow: hidden;
  color: inherit !important;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cr-admin .dashboard-calendar .fc .booking-pending {
  border-left-color: #b47b00 !important;
  background: #fff0b8 !important;
  color: #684800 !important;
}

body.cr-admin .dashboard-calendar .fc .booking-confirmed {
  border-left-color: #0c607d !important;
  background: #dcecf3 !important;
  color: #073b57 !important;
}

body.cr-admin .dashboard-calendar .fc .booking-paid {
  border-left-color: #23804d !important;
  background: #dff2e5 !important;
  color: #17653a !important;
}

body.cr-admin .dashboard-shell > .accordion-container {
  border: 1px solid var(--cr-line);
  background: #ffffff;
}

body.cr-admin .dashboard-shell > .accordion-container .accordion-item > .accordion-header {
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent !important;
}

body.cr-admin .dashboard-shell > .accordion-container .accordion-item {
  border-bottom: 1px solid var(--cr-line);
  background: #ffffff;
}

body.cr-admin .dashboard-shell > .accordion-container .accordion-button {
  background: #ffffff !important;
  color: var(--cr-ink) !important;
  box-shadow: none !important;
}

body.cr-admin .dashboard-shell > .accordion-container .accordion-button:not(.collapsed) {
  border-left: 3px solid var(--cr-secondary);
  background: #eef4f6 !important;
  color: var(--cr-primary) !important;
}

body.cr-admin .dashboard-shell > .accordion-container .badge {
  border: 1px solid #bdd3dc !important;
  background: #e5eff3 !important;
  color: var(--cr-primary) !important;
}

@media (max-width: 1199.98px) {
  body.cr-admin .dashboard-shell {
    grid-template-columns: 1fr;
  }

  body.cr-admin .dashboard-shell > .cr-command-hero,
  body.cr-admin .dashboard-shell > .stats-grid-dashboard,
  body.cr-admin .dashboard-shell > .dashboard-calendar,
  body.cr-admin .dashboard-shell > .accordion-container {
    grid-column: 1;
  }
}

/* Compact operations center */
body.cr-admin .ops-shell {
  gap: 14px;
}

body.cr-admin .ops-shell > .hero,
body.cr-admin .ops-shell > .panel,
body.cr-admin .ops-shell :where(.split-grid, .risk-grid, .fleet-grid) > .panel {
  border: 1px solid var(--cr-line);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(2, 42, 62, 0.06);
}

body.cr-admin .ops-shell > .hero {
  padding: 17px 18px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.09);
  border-left: 4px solid var(--cr-secondary);
  background: var(--cr-sidebar);
  color: #ffffff;
}

body.cr-admin .ops-shell .hero-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(390px, 0.7fr);
  gap: 14px;
  align-items: center;
}

body.cr-admin .ops-shell .hero h1 {
  margin: 8px 0 7px;
  color: #ffffff;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.1;
}

body.cr-admin .ops-shell .hero > .hero-grid > div:first-child > p {
  display: none;
}

body.cr-admin .ops-shell .chip-row {
  gap: 6px;
}

body.cr-admin .ops-shell .chip {
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #d8e5ea;
  font-size: 9.5px;
}

body.cr-admin .ops-shell .chip i {
  color: var(--cr-secondary);
}

body.cr-admin .ops-shell .hero .cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

body.cr-admin .ops-shell .hero-stat {
  min-width: 0;
  min-height: 78px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
}

body.cr-admin .ops-shell .hero-stat__label {
  margin-bottom: 5px;
  color: #a9bfca;
  font-size: 8.5px;
}

body.cr-admin .ops-shell .hero-stat__value {
  margin-bottom: 4px;
  overflow: hidden;
  color: #ffffff;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cr-admin .ops-shell .hero-stat__meta {
  overflow: hidden;
  color: #a9bfca;
  font-size: 9.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cr-admin .ops-shell .kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.cr-admin .ops-shell .kpi {
  position: relative;
  min-height: 86px;
  padding: 11px 12px 10px 46px;
  overflow: hidden;
  border: 1px solid var(--cr-line);
  border-top: 2px solid var(--cr-primary);
  border-radius: 13px;
  background: #ffffff;
  box-shadow: var(--cr-shadow-sm);
  color: var(--cr-ink);
}

body.cr-admin .ops-shell .kpi i {
  position: absolute;
  top: 11px;
  left: 11px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--cr-primary-soft);
  color: var(--cr-primary);
  font-size: 13px;
}

body.cr-admin .ops-shell .kpi__label {
  max-width: none;
  margin: 0 0 3px;
  color: var(--cr-muted);
  font-size: 8.5px;
  opacity: 1;
}

body.cr-admin .ops-shell .kpi__value {
  margin: 0;
  color: var(--cr-ink);
  font-size: 22px;
}

body.cr-admin .ops-shell .kpi__meta {
  margin-top: 2px;
  overflow: hidden;
  color: var(--cr-muted);
  font-size: 9.5px;
  line-height: 1.3;
  opacity: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cr-admin .ops-shell .kpi.green {
  border-top-color: var(--cr-success);
}

body.cr-admin .ops-shell .kpi.green i {
  background: var(--cr-success-bg);
  color: var(--cr-success-text);
}

body.cr-admin .ops-shell .kpi.orange {
  border-top-color: #d59600;
}

body.cr-admin .ops-shell .kpi.orange i {
  background: #fff3cf;
  color: #8a5a00;
}

body.cr-admin .ops-shell .kpi.violet {
  border-top-color: #397c8d;
}

body.cr-admin .ops-shell .kpi.violet i {
  background: #e5f1f3;
  color: #24606a;
}

body.cr-admin .ops-shell :where(.hero-grid, .split-grid, .risk-grid, .fleet-grid, .kpi-grid) {
  gap: 12px;
}

body.cr-admin .ops-shell .split-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
}

body.cr-admin .ops-shell :where(.risk-grid, .fleet-grid) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.cr-admin .ops-shell .panel {
  padding: 14px;
}

body.cr-admin .ops-shell .section-head {
  min-height: 0;
  margin-bottom: 10px;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--cr-line);
}

body.cr-admin .ops-shell .section-head h2 {
  color: var(--cr-primary);
  font-size: 14px;
}

body.cr-admin .ops-shell .section-head p {
  margin-top: 2px;
  color: var(--cr-muted);
  font-size: 10px;
  line-height: 1.35;
}

body.cr-admin .ops-shell .cards {
  gap: 8px;
}

body.cr-admin .ops-shell :where(.mini-card, .task-card, .alert-card, .metric-card) {
  padding: 10px 11px;
  border: 1px solid var(--cr-line);
  border-radius: 10px;
  background: #ffffff;
}

body.cr-admin .ops-shell .alert-card {
  border-left: 3px solid var(--cr-danger);
  background: #fffafa;
}

body.cr-admin .ops-shell .task-card {
  border-left: 3px solid var(--cr-primary);
}

body.cr-admin .ops-shell :where(.metric-card__label, .item-copy, .item-meta, .metric-card__meta) {
  color: var(--cr-muted);
  font-size: 10px;
  line-height: 1.35;
}

body.cr-admin .ops-shell .metric-card__label {
  margin-bottom: 2px;
}

body.cr-admin .ops-shell .metric-card__value {
  margin-bottom: 2px;
  color: var(--cr-primary);
  font-size: 21px;
}

body.cr-admin .ops-shell .item-title {
  margin-bottom: 2px;
  color: var(--cr-ink);
  font-size: 11px;
}

body.cr-admin .ops-shell .inline-link {
  color: var(--cr-primary);
  font-size: 10.5px;
}

body.cr-admin .ops-shell .inline-link:hover {
  color: var(--cr-primary-hover);
}

body.cr-admin .ops-shell .soft-badge {
  min-height: 23px;
  padding: 3px 7px;
  font-size: 9px;
}

body.cr-admin .ops-shell .ops-table th {
  padding: 7px 8px;
  background: #eef3f5;
  color: #526a74;
  font-size: 8.5px;
}

body.cr-admin .ops-shell .ops-table td {
  padding: 8px;
  border-bottom-color: var(--cr-line);
  color: var(--cr-ink);
  font-size: 10px;
}

body.cr-admin .ops-shell .empty-note {
  padding: 13px;
  border: 1px dashed var(--cr-line-strong);
  border-radius: 10px;
  background: #f7f9fa;
  color: var(--cr-muted);
  font-size: 10.5px;
}

body.cr-admin .ops-shell .fleet-grid > .panel:first-child .cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1199.98px) {
  body.cr-admin .ops-shell .hero-grid,
  body.cr-admin .ops-shell .split-grid,
  body.cr-admin .ops-shell .risk-grid,
  body.cr-admin .ops-shell .fleet-grid {
    grid-template-columns: 1fr;
  }

  body.cr-admin .ops-shell .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719.98px) {
  body.cr-admin .ops-shell .hero .cards,
  body.cr-admin .ops-shell .kpi-grid,
  body.cr-admin .ops-shell .fleet-grid > .panel:first-child .cards {
    grid-template-columns: 1fr;
  }

  body.cr-admin .ops-shell > .hero,
  body.cr-admin .ops-shell .panel {
    padding: 13px;
  }
}

/* --------------------------------------------------------------------------
   Admin-wide compact Ocean Drive layer
   -------------------------------------------------------------------------- */

body.cr-admin .main-content,
body.cr-admin .ts-main-content > .content-wrapper,
body.cr-admin .cr-standalone-content {
  padding: calc(var(--cr-header-height) + 18px) 18px 24px;
}

body.cr-admin :where(
  .dashboard-shell,
  .ops-shell,
  .crm-shell,
  .settings-main,
  .rp-shell,
  .shell,
  .section-stack,
  .admin-main__content
) {
  gap: 14px;
}

body.cr-admin :where(.page-title, .admin-page-title, .content-title) {
  margin: 0 0 14px;
  font-size: 21px;
  line-height: 1.2;
}

body.cr-admin :where(
  .panel,
  .card,
  .surface-card,
  .dashboard-card,
  .data-table-container,
  .vehicles-table-container,
  .user-table-container,
  .booking-table-container,
  .admin-table-wrap,
  .admin-form-card
) {
  border-color: var(--cr-line);
  border-radius: 13px;
  background: var(--cr-surface);
  box-shadow: 0 8px 24px rgba(2, 42, 62, 0.055);
}

body.cr-admin :where(
  .panel-heading,
  .card-header,
  .data-table-header,
  .vehicles-table-header,
  .user-table-header,
  .booking-table-header,
  .section-head,
  .admin-section-head
) {
  min-height: 42px;
  padding: 10px 13px;
  border-bottom-color: var(--cr-line);
  background: #f5f8f9;
}

body.cr-admin :where(.panel-body, .card-body, .cr-card__body, .admin-card, .admin-form-card) {
  padding: 14px;
}

body.cr-admin :where(.btn, .add-btn, .cr-button, button.btn) {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
}

body.cr-admin :where(
  input.form-control,
  select.form-control,
  select.form-select,
  .admin-form input,
  .admin-form select,
  .bootstrap-select > .dropdown-toggle
) {
  min-height: 36px;
  padding: 7px 10px;
  border-color: var(--cr-line-strong);
  border-radius: 8px;
  background-color: #ffffff;
  font-size: 11px;
}

body.cr-admin :where(textarea.form-control, .admin-form textarea) {
  min-height: 76px;
  padding: 8px 10px;
  border-color: var(--cr-line-strong);
  border-radius: 8px;
  font-size: 11px;
}

body.cr-admin :where(.form-label, label.control-label, .admin-label) {
  margin-bottom: 5px;
  color: #526a74;
  font-size: 10px;
  font-weight: 750;
}

body.cr-admin :where(.form-group, .admin-field) {
  margin-bottom: 12px;
}

body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .booking-table) th {
  padding: 8px 9px;
  background: #eef3f5;
  color: #526a74;
  font-size: 9px;
}

body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .booking-table) td {
  padding: 8px 9px;
  border-color: var(--cr-line);
  color: var(--cr-ink);
  font-size: 10.5px;
}

body.cr-admin :where(.table-striped > tbody > tr:nth-of-type(odd) > *, .table-hover > tbody > tr:hover > *) {
  --bs-table-accent-bg: #f7f9fa;
}

body.cr-admin :where(.alert, .errorWrap, .succWrap, .admin-note) {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 11px;
}

body.cr-admin :where(.pagination, .dataTables_paginate) {
  margin-top: 12px;
}

body.cr-admin .text-primary,
body.cr-admin a.text-primary {
  color: var(--cr-primary) !important;
}

body.cr-admin :where(.form-check-input:checked, .form-switch .form-check-input:checked) {
  border-color: var(--cr-primary) !important;
  background-color: var(--cr-primary) !important;
}

/* Modern page heroes */
body.cr-admin :where(
  .lang-hero,
  .theme-hero,
  .theme-settings-hero,
  .settings-hero,
  .tpl-hero,
  .billing-hero,
  .inspection-hero,
  .rp-hero,
  .editor-card:first-child
) {
  margin-bottom: 14px !important;
  padding: 15px 16px;
  border: 1px solid var(--cr-line);
  border-left: 4px solid var(--cr-secondary);
  border-radius: 14px;
  background: linear-gradient(135deg, #e9f2f5 0%, #ffffff 68%, #fff8d8 100%);
  box-shadow: 0 8px 24px rgba(2, 42, 62, 0.055);
}

body.cr-admin :where(
  .lang-hero,
  .theme-hero,
  .theme-settings-hero,
  .settings-hero,
  .tpl-hero,
  .billing-hero,
  .inspection-hero,
  .rp-hero,
  .editor-card:first-child
) h2 {
  margin-bottom: 3px !important;
  color: var(--cr-primary);
  font-size: 19px;
}

body.cr-admin :where(
  .lang-hero,
  .theme-hero,
  .theme-settings-hero,
  .settings-hero,
  .tpl-hero,
  .billing-hero,
  .inspection-hero,
  .rp-hero,
  .editor-card:first-child
) p {
  max-width: 880px;
  color: var(--cr-muted) !important;
  font-size: 10.5px;
  line-height: 1.4;
}

/* Modern page cards */
body.cr-admin :where(
  .lang-card,
  .theme-card,
  .install-card,
  .theme-meta-card,
  .settings-group,
  .settings-card,
  .settings-nav,
  .tpl-card,
  .tpl-new,
  .gateway-card,
  .inspection-panel,
  .rp-card,
  .editor-card,
  .edit-head,
  .edit-card,
  .placeholder-card
) {
  border: 1px solid var(--cr-line);
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(2, 42, 62, 0.05);
}

body.cr-admin :where(
  .lang-card,
  .install-card,
  .theme-meta-card,
  .settings-group,
  .settings-card,
  .tpl-new,
  .inspection-panel,
  .rp-card,
  .editor-card,
  .edit-head,
  .edit-card,
  .placeholder-card
) {
  padding: 14px;
}

body.cr-admin :where(
  .theme-grid,
  .tpl-grid,
  .language-grid,
  .editor-grid,
  .field-grid,
  .rp-stats,
  .rp-map-grid,
  .meta-grid,
  .content-grid,
  .controls-grid
) {
  gap: 12px;
}

body.cr-admin .theme-preview {
  height: 135px;
  background: linear-gradient(145deg, #edf2f4, #dce6ea);
}

body.cr-admin .theme-body,
body.cr-admin .tpl-card__head,
body.cr-admin .tpl-card__bottom,
body.cr-admin .gateway-card__head,
body.cr-admin .gateway-card__body {
  padding: 12px 14px;
}

body.cr-admin :where(.theme-body h3, .tpl-card h3, .settings-card__head h3) {
  color: var(--cr-primary);
  font-size: 14px;
}

body.cr-admin :where(.theme-meta span, .tpl-badge, .summary-pill, .summary-chip, .rp-badge, .type-pill, .status-pill) {
  padding: 4px 7px;
  border: 1px solid var(--cr-line);
  border-radius: 999px;
  background: #eef3f5;
  color: #526a74;
  font-size: 9px;
}

/* Settings and editors */
body.cr-admin .settings-shell {
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
}

body.cr-admin .settings-nav {
  top: 78px;
  padding: 8px;
}

body.cr-admin .settings-nav a {
  gap: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  color: var(--cr-muted);
  font-size: 10.5px;
}

body.cr-admin .settings-nav a:hover,
body.cr-admin .settings-nav a.active {
  background: var(--cr-primary-soft);
  color: var(--cr-primary);
}

body.cr-admin .settings-card__head {
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--cr-line);
}

body.cr-admin :where(.setting-note, .legal-check, .brand-preview, .asset-current, .language-item, .region, .placeholder) {
  padding: 9px 10px;
  border-color: var(--cr-line);
  border-radius: 9px;
  background: #f7f9fa;
  color: var(--cr-muted);
  font-size: 10.5px;
}

body.cr-admin :where(.sticky-save, .settings-savebar, .savebar) {
  bottom: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(2, 42, 62, 0.96);
  box-shadow: 0 12px 28px rgba(2, 42, 62, 0.2);
  color: #ffffff;
  font-size: 10.5px;
}

body.cr-admin :where(.locale-switch a, .translation-toolbar a) {
  padding: 5px 8px;
  border-color: var(--cr-line);
  border-radius: 7px;
  color: var(--cr-muted);
  font-size: 9.5px;
}

body.cr-admin :where(.locale-switch a.active, .translation-toolbar a.active) {
  border-color: var(--cr-primary);
  background: var(--cr-primary);
  color: #ffffff;
}

body.cr-admin .translation-table textarea {
  min-height: 58px;
  font-size: 10px;
}

body.cr-admin .translation-table th {
  background: #eaf0f2;
}

body.cr-admin .key-cell code,
body.cr-admin .placeholder code {
  color: var(--cr-primary);
}

/* Rental points and inspections */
body.cr-admin :where(.rp-stat, .meta-card, .inspector-card, .history-card) {
  padding: 11px 12px;
  border: 1px solid var(--cr-line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--cr-shadow-sm);
}

body.cr-admin :where(.rp-stat strong, .meta-card__value) {
  color: var(--cr-primary);
  font-size: 16px;
}

body.cr-admin :where(.rp-stat span, .meta-card__label) {
  color: var(--cr-muted);
  font-size: 9px;
}

body.cr-admin .rp-map-item {
  padding: 10px;
  border-color: var(--cr-line);
  border-radius: 9px;
  background: #f8fafb;
}

body.cr-admin :where(.vehicle-inspection-page, .vehicle-inspection-view-page) .hero,
body.cr-admin .shell > .hero {
  padding: 15px;
  border: 1px solid var(--cr-line);
  border-left: 4px solid var(--cr-secondary);
  border-radius: 14px;
  background: linear-gradient(135deg, #e9f2f5, #ffffff 68%, #fff8d8);
  box-shadow: 0 8px 24px rgba(2, 42, 62, 0.055);
}

body.cr-admin .shell > .hero h1 {
  color: var(--cr-primary);
  font-size: 21px;
}

body.cr-admin .shell > .panel {
  padding: 14px;
}

body.cr-admin .scene-wrap {
  min-height: 460px;
  padding: 14px;
  border: 1px solid var(--cr-line);
  border-radius: 13px;
  background: radial-gradient(circle at top, #f8fbfc, #e8eff2 64%, #dce6ea);
}

body.cr-admin .toolbar-chip {
  padding: 5px 8px;
  background: var(--cr-primary-soft);
  color: var(--cr-primary);
  font-size: 9.5px;
}

/* Billing and document tools */
body.cr-admin .gateway-card {
  margin-bottom: 12px;
}

body.cr-admin .gateway-card__head {
  background: #eef3f5;
}

body.cr-admin .document-toolbar {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--cr-line);
  border-radius: 11px;
  background: #ffffff;
}

body.cr-admin .document-paper {
  padding: 46px 54px;
  border: 1px solid var(--cr-line);
  box-shadow: 0 12px 34px rgba(2, 42, 62, 0.08);
}

@media (max-width: 980px) {
  body.cr-admin .settings-shell {
    grid-template-columns: 1fr;
  }

  body.cr-admin .settings-nav {
    position: static;
    display: flex;
    overflow-x: auto;
  }
}

@media (max-width: 767.98px) {
  body.cr-admin .main-content,
  body.cr-admin .ts-main-content > .content-wrapper,
  body.cr-admin .cr-standalone-content {
    padding: calc(var(--cr-header-height) + 12px) 10px 18px;
  }

  body.cr-admin :where(
    .lang-card,
    .install-card,
    .theme-meta-card,
    .settings-group,
    .settings-card,
    .tpl-new,
    .inspection-panel,
    .rp-card,
    .editor-card,
    .edit-head,
    .edit-card,
    .placeholder-card
  ) {
    padding: 11px;
  }

  body.cr-admin .document-paper {
    padding: 28px 18px;
  }
}

/* Content wrapper for pages that are neither .main-content nor .ts-main-content. */
body.cr-admin .cr-standalone-content {
  position: relative;
  min-height: 100vh;
  margin: 0 0 0 var(--cr-sidebar-width);
  padding: calc(var(--cr-header-height) + 28px) 28px 36px;
  background: transparent;
  transition: margin-left 180ms ease, padding 180ms ease;
}

body.cr-admin .cr-standalone-content > .container-fluid {
  width: 100%;
  max-width: var(--cr-content-max);
  margin-right: auto;
  margin-left: auto;
  padding-right: 0;
  padding-left: 0;
}

/* Login */
body.cr-admin.cr-login {
  overflow: auto;
  background: var(--cr-sidebar);
}

body.cr-admin.cr-login .login-page {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  height: auto;
  padding: 34px 18px;
  overflow: hidden;
  background-color: var(--cr-sidebar);
  background-position: center;
  background-size: cover;
}

body.cr-admin.cr-login .login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(112deg, rgba(8, 20, 23, 0.94), rgba(20, 40, 45, 0.78) 58%, rgba(8, 20, 23, 0.9));
}

body.cr-admin.cr-login .login-page::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -150px;
  z-index: -1;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  background: rgba(201, 79, 50, 0.1);
}

body.cr-admin.cr-login .form-content {
  display: grid;
  align-items: center;
  width: 100%;
  min-height: auto;
  padding: 0;
}

body.cr-admin .cr-login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 0 auto 18px;
  color: #ffffff;
  text-align: left;
}

body.cr-admin.cr-login .cr-login-brand .cr-brand__mark {
  width: 72px;
  height: 76px;
  flex-basis: 72px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.cr-admin.cr-login .cr-login-brand .cr-brand__mark img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
}

body.cr-admin .cr-login-brand > span:last-child {
  display: grid;
  gap: 2px;
}

body.cr-admin .cr-login-brand strong,
body.cr-admin .cr-login-brand small {
  display: block;
}

body.cr-admin .cr-login-brand strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

body.cr-admin .cr-login-brand small {
  color: #adbfbb;
  font-size: 10.5px;
}

body.cr-admin .cr-login-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
}

body.cr-admin .cr-login-subtitle {
  max-width: 520px;
  margin: 10px auto 22px;
  color: #b7c6c3;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
}

body.cr-admin.cr-login .admin-login-card,
body.cr-admin.cr-login .well {
  margin-top: 0;
  padding-top: 24px;
  padding-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--cr-radius-lg);
  background: var(--cr-surface);
  box-shadow: 0 28px 72px -32px rgba(0, 0, 0, 0.72);
  color: var(--cr-ink);
}

body.cr-admin.cr-login .admin-login-card label {
  margin-bottom: 7px;
  color: var(--cr-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.045em;
}

body.cr-admin.cr-login .admin-login-card .form-control {
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Dark theme
   -------------------------------------------------------------------------- */

html[data-cr-theme="dark"] body.cr-admin,
html[data-admin-theme="dark"] body.cr-admin,
body.cr-admin[data-admin-theme="dark"],
body.cr-admin.theme-dark {
  --cr-canvas: #0e1719;
  --cr-surface: #142124;
  --cr-surface-muted: #1b2b2e;
  --cr-surface-hover: #203337;
  --cr-surface-raised: #19282b;
  --cr-ink: #edf2f0;
  --cr-muted: #aab7b4;
  --cr-line: #2d3e41;
  --cr-line-strong: #405357;

  --cr-sidebar: #0b171a;
  --cr-sidebar-hover: #193035;
  --cr-sidebar-active: #213d42;
  --cr-sidebar-text: #f3f7f6;
  --cr-sidebar-muted: #a0b3af;

  --cr-primary: #f18464;
  --cr-primary-hover: #ffa084;
  --cr-primary-soft: rgba(241, 132, 100, 0.15);
  --cr-on-primary: #172326;
  --cr-secondary: #70b7bd;
  --cr-secondary-soft: rgba(112, 183, 189, 0.14);

  --cr-success: #65b982;
  --cr-warning: #d4a64d;
  --cr-danger: #e27b80;
  --cr-info: #72abc5;

  --cr-pending-bg: rgba(212, 166, 77, 0.15);
  --cr-pending-text: #e6bd68;
  --cr-pending-line: rgba(230, 189, 104, 0.32);
  --cr-confirmed-bg: rgba(112, 183, 189, 0.14);
  --cr-confirmed-text: #8ccbd0;
  --cr-confirmed-line: rgba(140, 203, 208, 0.3);
  --cr-success-bg: rgba(101, 185, 130, 0.14);
  --cr-success-text: #83ce9d;
  --cr-success-line: rgba(131, 206, 157, 0.3);
  --cr-active-bg: rgba(78, 173, 160, 0.15);
  --cr-active-text: #78c9be;
  --cr-active-line: rgba(120, 201, 190, 0.3);
  --cr-neutral-bg: rgba(170, 183, 180, 0.12);
  --cr-neutral-text: #c1cbc8;
  --cr-neutral-line: rgba(193, 203, 200, 0.23);
  --cr-danger-bg: rgba(226, 123, 128, 0.14);
  --cr-danger-text: #ed999d;
  --cr-danger-line: rgba(237, 153, 157, 0.3);
  --cr-maintenance-bg: rgba(183, 149, 205, 0.14);
  --cr-maintenance-text: #c8a9dc;
  --cr-maintenance-line: rgba(200, 169, 220, 0.28);

  --cr-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --cr-shadow-md: 0 18px 42px -22px rgba(0, 0, 0, 0.75);
  --cr-focus: 0 0 0 3px rgba(241, 132, 100, 0.22);

  color-scheme: dark;
}

html[data-cr-theme="dark"] body.cr-admin :where(img, video),
html[data-admin-theme="dark"] body.cr-admin :where(img, video),
body.cr-admin[data-admin-theme="dark"] :where(img, video),
body.cr-admin.theme-dark :where(img, video) {
  opacity: 0.94;
}

html[data-cr-theme="dark"] body.cr-admin .modal-header .btn-close,
html[data-admin-theme="dark"] body.cr-admin .modal-header .btn-close,
body.cr-admin[data-admin-theme="dark"] .modal-header .btn-close,
body.cr-admin.theme-dark .modal-header .btn-close {
  filter: invert(1) grayscale(1);
}

html[data-cr-theme="dark"] body.cr-admin .accordion-button::after,
html[data-admin-theme="dark"] body.cr-admin .accordion-button::after,
body.cr-admin[data-admin-theme="dark"] .accordion-button::after,
body.cr-admin.theme-dark .accordion-button::after {
  filter: invert(1) grayscale(1);
}

html[data-cr-theme="dark"] body.cr-admin :where(.fc .fc-day-other, .fc .fc-day-other .fc-daygrid-day-number),
html[data-admin-theme="dark"] body.cr-admin :where(.fc .fc-day-other, .fc .fc-day-other .fc-daygrid-day-number),
body.cr-admin[data-admin-theme="dark"] :where(.fc .fc-day-other, .fc .fc-day-other .fc-daygrid-day-number),
body.cr-admin.theme-dark :where(.fc .fc-day-other, .fc .fc-day-other .fc-daygrid-day-number) {
  color: #72817e;
}

/* Optional system mode: add cr-admin--system-theme to opt in. */
@media (prefers-color-scheme: dark) {
  body.cr-admin.cr-admin--system-theme:not([data-admin-theme="light"]) {
    --cr-canvas: #0e1719;
    --cr-surface: #142124;
    --cr-surface-muted: #1b2b2e;
    --cr-surface-hover: #203337;
    --cr-surface-raised: #19282b;
    --cr-ink: #edf2f0;
    --cr-muted: #aab7b4;
    --cr-line: #2d3e41;
    --cr-line-strong: #405357;
    --cr-primary: #f18464;
    --cr-primary-hover: #ffa084;
    --cr-primary-soft: rgba(241, 132, 100, 0.15);
    --cr-on-primary: #172326;
    --cr-secondary: #70b7bd;
    --cr-secondary-soft: rgba(112, 183, 189, 0.14);
    color-scheme: dark;
  }
}

/* --------------------------------------------------------------------------
   Responsive shell and component behaviour
   -------------------------------------------------------------------------- */

@media (max-width: 1279.98px) {
  body.cr-admin :where(.stats-grid, .stats-grid-dashboard, .kpi-grid, .admin-metrics, .admin-dashboard-stats, .admin-dashboard-kpis) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.cr-admin :where(.hero-grid, .split-grid) {
    grid-template-columns: 1fr;
  }

  body.cr-admin .header-link {
    padding-right: 9px;
    padding-left: 9px;
    font-size: 12px;
  }
}

@media (max-width: 991.98px) {
  body.cr-admin :where(.sidebar, .ts-sidebar) {
    width: min(86vw, 296px);
    transform: translateX(-104%);
    box-shadow: 18px 0 50px -20px rgba(0, 0, 0, 0.65);
  }

  body.cr-admin :where(.sidebar.active, .sidebar.expanded, .ts-sidebar.active, .ts-sidebar.expanded, .ts-sidebar.menu-open),
  body.cr-admin.is-sidebar-open :where(.sidebar, .ts-sidebar) {
    transform: translateX(0);
  }

  body.cr-admin .admin-header {
    left: 0;
    padding-right: 16px;
    padding-left: 16px;
  }

  body.cr-admin :where(.main-content, .ts-main-content > .content-wrapper) {
    margin-left: 0;
    padding: calc(var(--cr-header-height) + 22px) 20px 28px;
  }

  body.cr-admin .menu-toggle {
    display: inline-flex;
  }

  body.cr-admin .header-actions {
    display: none;
  }

  body.cr-admin .admin-header :where(h1, h2) {
    max-width: calc(100vw - 96px);
    font-size: 18px;
  }

  body.cr-admin :where(.risk-grid, .fleet-grid) {
    grid-template-columns: 1fr;
  }

  body.cr-admin .admin-row.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.cr-admin {
    --cr-header-height: 58px;
    font-size: 13.5px;
  }

  body.cr-admin .admin-header {
    gap: 10px;
    padding-right: 12px;
    padding-left: 12px;
  }

  body.cr-admin :where(.main-content, .ts-main-content > .content-wrapper) {
    padding: calc(var(--cr-header-height) + 16px) 14px 24px;
  }

  body.cr-admin :where(.stats-grid, .stats-grid-dashboard, .kpi-grid, .admin-metrics, .admin-dashboard-stats, .admin-dashboard-kpis) {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.cr-admin :where(.stat-card, .kpi, .admin-metric) {
    min-height: 116px;
    padding: 16px;
  }

  body.cr-admin :where(.panel-body, .card-body, .cr-card__body, .admin-card, .admin-form-card, .calendar-container) {
    padding: 16px;
  }

  body.cr-admin :where(.panel-heading, .card-header, .data-table-header, .vehicles-table-header, .user-table-header, .calendar-header, .section-head, .admin-section-head) {
    align-items: flex-start;
    min-height: 50px;
    padding: 14px 16px;
  }

  body.cr-admin :where(.page-title, .section-heading, .main-content h2.mb-4) {
    margin-bottom: 16px;
    font-size: 24px;
  }

  body.cr-admin .hero {
    padding: 18px;
  }

  body.cr-admin .hero::after {
    display: none;
  }

  body.cr-admin .hero h1 {
    font-size: 24px;
  }

  body.cr-admin :where(.admin-row.two, .admin-inline-form.two, .admin-row.three) {
    grid-template-columns: 1fr;
  }

  body.cr-admin :where(.form-control, .form-select, .cr-control, .admin-form input, .admin-form select, .admin-form textarea) {
    min-height: 46px;
    font-size: 16px;
  }

  body.cr-admin :where(.filter-buttons, .calendar-filters, .toolbar-row) {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  body.cr-admin :where(.filter-btn, .toolbar-chip) {
    flex: 0 0 auto;
    min-height: 40px;
  }

  body.cr-admin .dataTables_filter {
    margin-top: 10px;
    text-align: left;
  }

  body.cr-admin .dataTables_filter input {
    width: 100%;
    margin: 6px 0 0;
  }

  body.cr-admin .dataTables_paginate {
    margin-top: 10px;
  }

  body.cr-admin .fc .fc-toolbar.fc-header-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  body.cr-admin .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
  }

  body.cr-admin .modal-dialog {
    margin: 10px;
  }

  body.cr-admin .modal-header,
  body.cr-admin .modal-body,
  body.cr-admin .modal-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  body.cr-admin .modal-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  body.cr-admin .modal-footer .btn {
    width: 100%;
  }

  /* Opt-in card table. Other tables remain horizontally scrollable. */
  body.cr-admin .responsive-card-table thead,
  body.cr-admin .responsive-card-table tfoot {
    display: none;
  }

  body.cr-admin .responsive-card-table,
  body.cr-admin .responsive-card-table tbody,
  body.cr-admin .responsive-card-table tr,
  body.cr-admin .responsive-card-table td {
    display: block;
    width: 100%;
  }

  body.cr-admin .responsive-card-table tr {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--cr-line);
    border-radius: var(--cr-radius-md);
    background: var(--cr-surface);
    box-shadow: var(--cr-shadow-sm);
  }

  body.cr-admin .responsive-card-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 0;
    padding: 9px 0;
    border-bottom: 1px solid var(--cr-line);
    text-align: right;
    white-space: normal;
  }

  body.cr-admin .responsive-card-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: var(--cr-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-align: left;
    text-transform: uppercase;
  }

  body.cr-admin .responsive-card-table td:first-child:empty {
    display: none;
  }

  body.cr-admin .responsive-card-table td.card-title-cell {
    display: block;
    padding-bottom: 12px;
    color: var(--cr-ink);
    font-size: 16px;
    font-weight: 650;
    text-align: left;
  }

  body.cr-admin .responsive-card-table td.card-title-cell::before {
    display: none;
  }

  body.cr-admin .responsive-card-table td:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media (max-width: 479.98px) {
  body.cr-admin .admin-header :where(h1, h2) {
    font-size: 16px;
  }

  body.cr-admin :where(.action-buttons, .user-card-actions, .admin-actions) {
    align-items: stretch;
    flex-direction: column;
  }

  body.cr-admin :where(.action-buttons, .user-card-actions, .admin-actions) > :where(.btn, .add-btn, .cr-button) {
    width: 100%;
  }

  body.cr-admin .list-row,
  body.cr-admin .admin-list__item {
    align-items: flex-start;
    flex-direction: column;
  }

  body.cr-admin .booking-details-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Stable, high-contrast admin buttons
   Keep links styled as buttons in every interaction state.
   -------------------------------------------------------------------------- */
body.cr-admin a.btn,
body.cr-admin a.btn:hover,
body.cr-admin a.btn:focus,
body.cr-admin a.btn:active,
body.cr-admin a.cr-button,
body.cr-admin a.cr-button:hover,
body.cr-admin a.cr-button:focus {
  text-decoration: none;
}

body.cr-admin :is(a, button, input).btn-primary,
body.cr-admin :is(a, button, input).btn-primary:visited {
  border-color: var(--cr-primary);
  background-color: var(--cr-primary);
  color: #ffffff;
}

body.cr-admin :is(a, button, input).btn-primary:hover,
body.cr-admin :is(a, button, input).btn-primary:focus,
body.cr-admin :is(a, button, input).btn-primary:active {
  border-color: var(--cr-primary-hover);
  background-color: var(--cr-primary-hover);
  color: #ffffff;
}

body.cr-admin :is(a, button, input):where(.btn-secondary, .btn-default),
body.cr-admin :is(a, button, input):where(.btn-secondary, .btn-default):visited {
  border-color: var(--cr-line-strong);
  background-color: #ffffff;
  color: var(--cr-ink);
}

body.cr-admin :is(a, button, input):where(.btn-secondary, .btn-default):hover,
body.cr-admin :is(a, button, input):where(.btn-secondary, .btn-default):focus {
  border-color: var(--cr-secondary);
  background-color: var(--cr-secondary-soft);
  color: var(--cr-secondary);
}

body.cr-admin :is(a, button, input).btn-light,
body.cr-admin :is(a, button, input).btn-light:visited {
  border-color: #ffffff;
  background-color: #ffffff;
  color: #0b3047;
}

body.cr-admin :is(a, button, input).btn-light:hover,
body.cr-admin :is(a, button, input).btn-light:focus {
  border-color: #dbeaf1;
  background-color: #eaf4f8;
  color: #073b57;
}

body.cr-admin :is(a, button, input).btn-outline-light,
body.cr-admin :is(a, button, input).btn-outline-light:visited {
  border-color: rgba(255,255,255,.72);
  background-color: rgba(255,255,255,.08);
  color: #ffffff;
}

body.cr-admin :is(a, button, input).btn-outline-light:hover,
body.cr-admin :is(a, button, input).btn-outline-light:focus {
  border-color: #ffffff;
  background-color: #ffffff;
  color: #073b57;
}

body.cr-admin :is(a, button, input).btn-info,
body.cr-admin :is(a, button, input).btn-info:visited {
  border-color: var(--cr-secondary);
  background-color: var(--cr-secondary-soft);
  color: #1f2937 !important;
}

body.cr-admin :is(a, button, input).btn-info:hover,
body.cr-admin :is(a, button, input).btn-info:focus {
  border-color: var(--cr-secondary);
  background-color: var(--cr-secondary);
  color: #111827 !important;
}

body.cr-admin :is(a, button, input).btn-outline-primary,
body.cr-admin :is(a, button, input).btn-outline-primary:visited {
  border-color: #d5a900;
  background-color: #fff9dc;
  color: #1f2937 !important;
}

body.cr-admin :is(a, button, input).btn-outline-primary:hover,
body.cr-admin :is(a, button, input).btn-outline-primary:focus,
body.cr-admin :is(a, button, input).btn-outline-primary:active {
  border-color: #c99f00;
  background-color: #f5c400;
  color: #111827 !important;
}

body.cr-admin .btn-outline-primary :where(i, svg),
body.cr-admin .btn-outline-primary:hover :where(i, svg),
body.cr-admin .btn-outline-primary:focus :where(i, svg) {
  color: currentColor !important;
  fill: currentColor;
}

body.cr-admin :is(a, button, input).btn-warning,
body.cr-admin :is(a, button, input).btn-warning:visited {
  border-color: #d39e00;
  background-color: #ffc928;
  color: #1f2937 !important;
}

body.cr-admin :is(a, button, input).btn-warning:hover,
body.cr-admin :is(a, button, input).btn-warning:focus,
body.cr-admin :is(a, button, input).btn-warning:active {
  border-color: #bf9000;
  background-color: #e9b400;
  color: #111827 !important;
}

body.cr-admin .btn-warning :where(i, svg),
body.cr-admin .btn-warning:hover :where(i, svg),
body.cr-admin .btn-warning:focus :where(i, svg) {
  color: currentColor !important;
  fill: currentColor;
}

body.cr-admin :is(a, button, input).btn-success,
body.cr-admin :is(a, button, input).btn-success:visited {
  color: #ffffff;
}

body.cr-admin :is(a, button, input).btn-success:hover,
body.cr-admin :is(a, button, input).btn-success:focus {
  border-color: #126b42;
  background-color: #126b42;
  color: #ffffff;
}

body.cr-admin :is(a, button, input):where(.btn-danger, .btn-outline-danger):hover,
body.cr-admin :is(a, button, input):where(.btn-danger, .btn-outline-danger):focus {
  border-color: var(--cr-danger);
  background-color: var(--cr-danger);
  color: #ffffff;
}

body.cr-admin :is(a, button, input).btn:focus-visible,
body.cr-admin :is(a, button, input).cr-button:focus-visible {
  outline: 3px solid rgba(14, 116, 144, .28);
  outline-offset: 2px;
  box-shadow: none;
}

/* Buttons placed on the dark admin surfaces must never reuse the dark brand fill. */
body.cr-admin :where(
  .cr-command-hero,
  .module-hero,
  .module-editor-hero,
  .hero-panel,
  .docs-hero,
  .rates-hero,
  .vehicle-pricing-guide__intro
) :is(a, button):where(.btn-primary, .cr-button--primary, .add-btn) {
  border-color: #f5c400 !important;
  background-color: #f5c400 !important;
  color: #17202a !important;
}

body.cr-admin :where(
  .cr-command-hero,
  .module-hero,
  .module-editor-hero,
  .hero-panel,
  .docs-hero,
  .rates-hero,
  .vehicle-pricing-guide__intro
) :is(a, button):where(.btn-primary, .cr-button--primary, .add-btn):hover,
body.cr-admin :where(
  .cr-command-hero,
  .module-hero,
  .module-editor-hero,
  .hero-panel,
  .docs-hero,
  .rates-hero,
  .vehicle-pricing-guide__intro
) :is(a, button):where(.btn-primary, .cr-button--primary, .add-btn):focus {
  border-color: #ffda3d !important;
  background-color: #ffda3d !important;
  color: #111827 !important;
}

body.cr-admin :where(
  .cr-command-hero,
  .module-hero,
  .module-editor-hero,
  .hero-panel,
  .docs-hero,
  .rates-hero,
  .vehicle-pricing-guide__intro
) :is(a, button):where(.btn-secondary, .btn-default, .btn-outline-light, .cr-button--secondary) {
  border-color: rgba(255,255,255,.48) !important;
  background-color: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
}

body.cr-admin :where(
  .cr-command-hero,
  .module-hero,
  .module-editor-hero,
  .hero-panel,
  .docs-hero,
  .rates-hero,
  .vehicle-pricing-guide__intro
) :is(a, button):where(.btn-secondary, .btn-default, .btn-outline-light, .cr-button--secondary):hover,
body.cr-admin :where(
  .cr-command-hero,
  .module-hero,
  .module-editor-hero,
  .hero-panel,
  .docs-hero,
  .rates-hero,
  .vehicle-pricing-guide__intro
) :is(a, button):where(.btn-secondary, .btn-default, .btn-outline-light, .cr-button--secondary):focus {
  border-color: #ffffff !important;
  background-color: #ffffff !important;
  color: #073b57 !important;
}

body.cr-admin :where(
  .cr-command-hero,
  .module-hero,
  .module-editor-hero,
  .hero-panel,
  .docs-hero,
  .rates-hero,
  .vehicle-pricing-guide__intro
) :is(a, button) :where(i, svg) {
  color: currentColor !important;
  fill: currentColor;
}

/* The Roadbook controller switches to drawer mode below 1024px. */
@media (max-width: 1023.98px) {
  body.cr-admin .cr-sidebar {
    width: min(88vw, 304px);
    transform: translateX(-104%);
    box-shadow: 22px 0 58px -20px rgba(0, 0, 0, 0.72);
  }

  body.cr-admin.cr-sidebar-open {
    overflow: hidden;
  }

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

  body.cr-admin.cr-sidebar-open .cr-sidebar-overlay {
    display: block;
  }

  body.cr-admin .cr-sidebar__close {
    display: inline-flex;
  }

  body.cr-admin .cr-topbar {
    left: 0;
    padding-right: 16px;
    padding-left: 16px;
  }

  body.cr-admin .cr-topbar .menu-toggle {
    display: inline-flex;
  }

  body.cr-admin .cr-topbar__left {
    flex: 1 1 auto;
    overflow: hidden;
  }

  body.cr-admin .cr-topbar__actions {
    flex: 0 0 auto;
  }

  body.cr-admin .main-content,
  body.cr-admin .ts-main-content > .content-wrapper,
  body.cr-admin .cr-standalone-content {
    margin-left: 0;
    padding: calc(var(--cr-header-height) + 22px) 20px 28px;
  }

  body.cr-admin .cr-command-hero {
    grid-template-columns: 1fr;
  }

  body.cr-admin .cr-command-hero__status {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.cr-admin .cr-command-status--live {
    grid-column: auto;
    min-height: 82px;
  }
}

@media (max-width: 767.98px) {
  body.cr-admin .cr-topbar {
    gap: 8px;
    padding-right: 12px;
    padding-left: 12px;
  }

  body.cr-admin .cr-topbar__left,
  body.cr-admin .cr-topbar__actions {
    gap: 6px;
  }

  body.cr-admin .cr-topbar-button {
    display: none;
  }

  body.cr-admin .cr-icon-button {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    min-height: 36px;
  }

  body.cr-admin .cr-admin-user {
    min-height: 36px;
    padding: 2px;
    border: 0;
    background: transparent;
  }

  body.cr-admin .cr-admin-user__avatar {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  body.cr-admin .cr-admin-user__meta {
    display: none;
  }

  body.cr-admin .cr-topbar__title h1 {
    max-width: min(42vw, 360px);
    font-size: 16px;
  }

  body.cr-admin .cr-topbar__title .cr-eyebrow {
    display: none;
  }

  body.cr-admin .main-content,
  body.cr-admin .ts-main-content > .content-wrapper,
  body.cr-admin .cr-standalone-content {
    padding: calc(var(--cr-header-height) + 16px) 14px 24px;
  }

  body.cr-admin .cr-command-hero {
    gap: 17px;
    padding: 18px;
  }

  body.cr-admin .cr-command-hero__copy h2 {
    font-size: 24px;
  }

  body.cr-admin .cr-command-hero__status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.cr-admin .cr-command-status--live {
    grid-column: 1 / -1;
    min-height: 58px;
  }

  body.cr-admin.cr-login .login-page {
    padding: 24px 12px;
  }

  body.cr-admin .cr-login-brand {
    margin-bottom: 15px;
  }

  body.cr-admin .cr-login-title {
    font-size: 27px;
  }

  body.cr-admin .cr-login-subtitle {
    margin-bottom: 18px;
    font-size: 13px;
  }

  body.cr-admin.cr-login .admin-login-card,
  body.cr-admin.cr-login .well {
    padding-top: 20px;
    padding-bottom: 18px;
    border-radius: var(--cr-radius-md);
  }
}

@media (max-width: 479.98px) {
  body.cr-admin .cr-admin-user {
    display: none;
  }

  body.cr-admin .cr-topbar__title h1 {
    max-width: 40vw;
    font-size: 15px;
  }

  body.cr-admin .cr-command-hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.cr-admin .cr-command-hero__actions .cr-button {
    width: 100%;
  }

  body.cr-admin .cr-command-hero__status {
    grid-template-columns: 1fr;
  }

  body.cr-admin .cr-command-status--live {
    grid-column: auto;
  }

  body.cr-admin .cr-shift-card__stats {
    gap: 4px;
  }
}

/* --------------------------------------------------------------------------
   Motion, high contrast and printing
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Compact coverage for the remaining admin modules
   -------------------------------------------------------------------------- */

body.cr-admin :where(.module-hero, .module-editor-hero, .hero-panel, .docs-hero, .rates-hero) {
  padding: 15px 17px;
  border: 1px solid var(--cr-line);
  border-left: 4px solid var(--cr-secondary);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(7, 59, 87, 0.08), var(--cr-surface) 58%, rgba(245, 196, 0, 0.12));
  box-shadow: var(--cr-shadow-sm);
}

body.cr-admin :where(.module-hero, .module-editor-hero, .hero-panel, .docs-hero, .rates-hero) :where(h1, h2) {
  margin-bottom: 3px;
  color: var(--cr-ink);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 850;
  line-height: 1.16;
}

body.cr-admin :where(.module-hero, .module-editor-hero, .hero-panel, .docs-hero, .rates-hero) p {
  margin-bottom: 0;
  color: var(--cr-muted);
  font-size: 13px;
}

body.cr-admin :where(.module-grid, .grid, .template-grid, .channels-grid, .status-grid, .docs-catalog-grid, .docs-stats, .stats-grid) {
  gap: 12px;
}

body.cr-admin .module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.cr-admin :where(.module-card, .route-card, .settings-card, .settings-panel, .channel-card, .summary-card, .cardx, .template-card, .docs-card, .docs-stat, .docs-panel, .docs-template-card, .rates-panel, .crm-shell .panel, .deal-card, .form-panel) {
  border: 1px solid var(--cr-line);
  border-radius: 12px;
  background: var(--cr-surface);
  box-shadow: var(--cr-shadow-sm);
}

body.cr-admin :where(.module-card, .route-card, .settings-card, .settings-panel, .channel-card, .cardx, .template-card, .docs-card, .rates-panel, .crm-shell .panel, .deal-card, .form-panel) {
  padding: 14px;
}

body.cr-admin :where(.summary-card, .docs-stat, .docs-panel, .docs-template-card) {
  padding: 12px;
}

body.cr-admin .module-card {
  gap: 10px;
}

body.cr-admin .module-card__head,
body.cr-admin .channel-card__top {
  gap: 10px;
  margin-bottom: 8px;
}

body.cr-admin :where(.module-icon, .module-mark, .icon-preview) {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--cr-primary-soft);
  color: var(--cr-primary);
}

body.cr-admin .module-mark {
  width: 46px;
  height: 46px;
  font-size: 20px;
}

body.cr-admin :where(.module-card h3, .cardx h3, .channel-card__title, .docs-template-card h4, .deal-title) {
  color: var(--cr-ink);
  font-size: 15px;
  font-weight: 800;
}

body.cr-admin :where(.module-card p, .cardx p, .channel-card__copy, .docs-template-card p, .deal-copy, .meta) {
  color: var(--cr-muted);
  font-size: 12px;
  line-height: 1.45;
}

body.cr-admin :where(.module-meta, .meta-pills, .binding-list, .bindings, .docs-template-card__meta) {
  gap: 5px;
}

body.cr-admin :where(.module-meta span, .meta-pill, .binding-list code, .bindings code, .doc-badge, .rate-pill, .status, .status-pill) {
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid var(--cr-line);
  border-radius: 999px;
  background: var(--cr-surface-muted);
  color: var(--cr-muted);
  font-size: 11px;
  font-weight: 800;
}

body.cr-admin :where(.status-pill.ok, .meta-pill.ok, .status-ok, .ok, .doc-badge--signed) {
  border-color: rgba(25, 135, 84, 0.2);
  background: var(--cr-success-bg);
  color: var(--cr-success);
}

body.cr-admin :where(.status-pill.off, .meta-pill.off, .status-problem, .fail) {
  border-color: rgba(201, 74, 85, 0.2);
  background: var(--cr-danger-bg);
  color: var(--cr-danger);
}

body.cr-admin :where(.status-wait, .wait, .doc-badge--draft, .rate-pill.empty) {
  border-color: rgba(245, 196, 0, 0.35);
  background: var(--cr-pending-bg);
  color: #765d00;
}

body.cr-admin :where(.module-actions, .module-actions__links, .docs-actions, .docs-template-card__actions, .doc-actions, .deal-actions) {
  gap: 6px;
}

body.cr-admin .setting-row {
  padding: 10px 0;
  border-color: var(--cr-line);
}

body.cr-admin :where(.route-switch, .map-preview, .docs-template-card) {
  border-color: var(--cr-line);
  background: var(--cr-surface-muted);
}

body.cr-admin .route-switch {
  padding: 10px;
  border-radius: 10px;
}

body.cr-admin :where(.shell, .crm-shell, .docs-shell, .deal-list) {
  gap: 12px;
}

body.cr-admin .grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.cr-admin .cardx h3 {
  margin: 9px 0 6px;
}

body.cr-admin .template-grid,
body.cr-admin .channels-grid,
body.cr-admin .docs-catalog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.cr-admin :where(.field-grid, .toggle-grid, .docs-create-grid, .grid-2) {
  gap: 12px;
}

body.cr-admin .map-preview iframe {
  height: 210px;
}

body.cr-admin .docs-hero__row,
body.cr-admin .docs-catalog-head {
  gap: 12px;
}

body.cr-admin .docs-catalog-head {
  margin-bottom: 12px;
}

body.cr-admin .docs-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.cr-admin .docs-stat strong {
  margin-top: 2px;
  color: var(--cr-primary);
  font-size: 22px;
  line-height: 1.1;
}

body.cr-admin .docs-stat span,
body.cr-admin .summary-card__label,
body.cr-admin .stat-label {
  color: var(--cr-muted);
  font-size: 11px;
  font-weight: 750;
}

body.cr-admin .docs-filter {
  gap: 8px;
}

body.cr-admin .docs-table th {
  color: var(--cr-muted);
  font-size: 10px;
}

body.cr-admin .doc-title {
  color: var(--cr-ink);
  font-size: 12px;
}

body.cr-admin :where(.doc-meta, .doc-source) {
  color: var(--cr-muted);
  font-size: 10px;
}

body.cr-admin .legal-note {
  padding: 8px 10px;
  border: 1px solid rgba(245, 196, 0, 0.28);
  border-radius: 9px;
  background: var(--cr-pending-bg);
  color: #765d00;
  font-size: 11px;
}

body.cr-admin .vehicle-cell {
  gap: 9px;
  min-width: 220px;
}

body.cr-admin .vehicle-cell img {
  width: 54px;
  height: 38px;
  border-radius: 8px;
}

body.cr-admin .summary-chip {
  padding: 6px 9px;
  border-color: var(--cr-line);
  border-radius: 9px;
  background: var(--cr-surface);
  color: var(--cr-muted);
  font-size: 11px;
}

body.cr-admin .crm-shell .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.cr-admin .crm-shell .stat-card {
  padding: 12px 14px;
}

body.cr-admin .crm-shell .stat-value {
  color: var(--cr-primary);
  font-size: 24px;
  line-height: 1.1;
}

body.cr-admin .deal-list {
  gap: 9px;
}

body.cr-admin .deal-card {
  border-left: 3px solid var(--cr-primary);
}

body.cr-admin :where(.priority-high, .priority-medium, .priority-low, .stage) {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

body.cr-admin .sticky-actions,
body.cr-admin .save-bar {
  padding: 9px 11px;
  border: 1px solid var(--cr-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--cr-surface) 94%, transparent);
  box-shadow: var(--cr-shadow-md);
}

@media (max-width: 1199.98px) {
  body.cr-admin .module-grid,
  body.cr-admin .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.cr-admin .docs-stats,
  body.cr-admin .crm-shell .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.cr-admin :where(.module-grid, .grid, .template-grid, .channels-grid, .status-grid, .docs-catalog-grid, .docs-stats, .crm-shell .stats-grid, .docs-create-grid, .grid-2) {
    grid-template-columns: 1fr;
  }

  body.cr-admin :where(.module-hero, .module-editor-hero, .hero-panel, .docs-hero, .rates-hero) {
    padding: 13px;
  }

  body.cr-admin :where(.module-card, .route-card, .settings-card, .settings-panel, .channel-card, .cardx, .template-card, .docs-card, .rates-panel, .crm-shell .panel, .deal-card, .form-panel) {
    padding: 12px;
  }
}

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

@media (forced-colors: active) {
  body.cr-admin :where(.btn, .cr-button, .filter-btn, .toolbar-chip, .badge, .cr-status, .panel, .card) {
    border: 1px solid CanvasText;
  }

  body.cr-admin :where(.sidebar-item.active, .ts-sidebar-menu > li.open > a) {
    outline: 2px solid Highlight;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  body.cr-admin {
    min-height: auto;
    overflow: visible;
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.cr-admin :where(.sidebar, .ts-sidebar, .admin-header, .menu-toggle, .header-actions, .action-buttons, .user-card-actions, .filter-buttons, .calendar-filters, .toolbar-row, .dataTables_length, .dataTables_filter, .dataTables_paginate, .btn, .add-btn, .cr-button, .admin-overlay, .cr-sidebar-overlay) {
    display: none !important;
  }

  body.cr-admin .main-content,
  body.cr-admin .ts-main-content > .content-wrapper,
  body.cr-admin .cr-standalone-content {
    min-height: auto;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body.cr-admin :where(.main-content, .ts-main-content > .content-wrapper) > .container-fluid {
    max-width: none;
  }

  body.cr-admin :where(.panel, .card, .cr-card, .surface-card, .dashboard-card, .calendar-container, .accordion-container, .data-table-container, .vehicles-table-container, .user-table-container, .stat-card, .kpi, .admin-metric, .cr-command-hero, .cr-command-status) {
    break-inside: avoid;
    border-color: #9a9a9a !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #000000 !important;
  }

  body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) {
    color: #000000 !important;
    font-size: 8.5pt;
  }

  body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) thead {
    display: table-header-group;
  }

  body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) tr {
    break-inside: avoid;
  }

  body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) th,
  body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .ops-table) td {
    border-color: #b8b8b8 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  body.cr-admin .responsive-card-table {
    display: table;
    width: 100%;
  }

  body.cr-admin .responsive-card-table thead {
    display: table-header-group;
  }

  body.cr-admin .responsive-card-table tbody {
    display: table-row-group;
  }

  body.cr-admin .responsive-card-table tfoot {
    display: table-footer-group;
  }

  body.cr-admin .responsive-card-table tr {
    display: table-row;
    margin: 0;
    padding: 0;
    border: 0;
  }

  body.cr-admin .responsive-card-table td {
    display: table-cell;
    width: auto;
    padding: 6px 8px;
    text-align: left;
  }

  body.cr-admin .responsive-card-table td::before {
    display: none;
  }

  body.cr-admin a {
    color: #000000 !important;
    text-decoration: none;
  }

  body.cr-admin .cr-command-hero :where(h2, p, span, strong) {
    color: #000000 !important;
  }
}

/* Final mobile admin pass: one predictable shell for every admin module. */
@media (max-width: 1023.98px) {
  body.cr-admin .cr-sidebar {
    top: 0;
    bottom: 0;
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.cr-admin .cr-sidebar .cr-nav {
    flex: 0 0 auto;
    min-height: auto;
    padding-right: 0;
    overflow: visible;
  }

  body.cr-admin .cr-sidebar__brand-row,
  body.cr-admin .cr-nav-search {
    position: sticky;
    z-index: 3;
    background: var(--cr-sidebar);
  }

  body.cr-admin .cr-sidebar__brand-row {
    top: -16px;
    margin: -16px -13px 0;
    padding: 16px 16px 10px;
  }

  body.cr-admin .cr-nav-search {
    top: 50px;
  }

  body.cr-admin .cr-shift-card,
  body.cr-admin .cr-sidebar__footer {
    flex: 0 0 auto;
  }

  body.cr-admin :where(
    .table-responsive,
    .dataTables_wrapper,
    .data-table-container,
    .vehicles-table-container,
    .user-table-container,
    .booking-table-container,
    .admin-table-wrap,
    .table-wrap
  ) {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.cr-admin :where(table, .table, .data-table, .vehicles-table, .user-table, .booking-table, .ops-table) {
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  body.cr-admin {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body.cr-admin .cr-sidebar {
    width: min(88vw, 340px);
    gap: 10px;
  }

  body.cr-admin .cr-topbar {
    min-width: 0;
  }

  body.cr-admin .cr-topbar__title,
  body.cr-admin .cr-topbar__title h1 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.cr-admin .main-content,
  body.cr-admin .ts-main-content > .content-wrapper,
  body.cr-admin .cr-standalone-content {
    width: 100%;
    min-width: 0;
    padding: calc(var(--cr-header-height) + 12px) 10px max(20px, env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  body.cr-admin :where(.main-content, .ts-main-content > .content-wrapper, .cr-standalone-content) > :where(.container, .container-fluid) {
    width: 100%;
    max-width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  body.cr-admin :where(
    .dashboard-shell,
    .ops-shell,
    .crm-shell,
    .settings-shell,
    .settings-layout,
    .settings-main,
    .rp-shell,
    .shell,
    .section-stack,
    .admin-main__content,
    .module-grid,
    .template-grid,
    .channels-grid,
    .docs-catalog-grid,
    .docs-stats,
    .stats-grid,
    .grid
  ) {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  body.cr-admin :where(
    .panel,
    .card,
    .surface-card,
    .dashboard-card,
    .admin-form-card,
    .settings-card,
    .settings-panel,
    .channel-card,
    .docs-card,
    .docs-panel,
    .rates-panel,
    .form-panel
  ) {
    min-width: 0;
    border-radius: 12px;
  }

  body.cr-admin :where(.panel-body, .card-body, .cr-card__body, .admin-card, .admin-form-card, .calendar-container) {
    padding: 12px;
  }

  body.cr-admin :where(.panel-heading, .card-header, .section-head, .admin-section-head, .calendar-header) {
    gap: 8px;
    padding: 11px 12px;
  }

  body.cr-admin :where(.panel-heading, .card-header, .section-head, .admin-section-head) {
    flex-wrap: wrap;
  }

  body.cr-admin :where(.panel-heading, .card-header, .section-head, .admin-section-head) > :where(.btn, .cr-button, .add-btn, a.btn) {
    max-width: 100%;
  }

  body.cr-admin :where(.row, .form-row) {
    margin-right: -5px;
    margin-left: -5px;
  }

  body.cr-admin :where(.row, .form-row) > [class*="col-"] {
    width: 100%;
    padding-right: 5px;
    padding-left: 5px;
  }

  body.cr-admin :where(input, select, textarea, button, .btn, .cr-button, .form-control, .form-select) {
    max-width: 100%;
  }

  body.cr-admin :where(.btn-group, .button-row, .form-actions, .admin-actions, .action-buttons) {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 7px;
  }

  body.cr-admin :where(.form-actions, .admin-actions, .action-buttons) > :where(.btn, .cr-button, .add-btn) {
    flex: 1 1 150px;
  }

  body.cr-admin .modal-dialog {
    width: auto;
    max-width: calc(100vw - 16px);
    margin: 8px auto;
  }

  body.cr-admin .modal-content {
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    border-radius: 13px;
  }

  body.cr-admin .dataTables_wrapper .row {
    margin: 0;
  }

  body.cr-admin .dataTables_wrapper .row > [class*="col-"] {
    padding: 0;
  }

  body.cr-admin .pagination {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 479.98px) {
  body.cr-admin .cr-sidebar {
    width: min(92vw, 360px);
  }

  body.cr-admin .cr-brand__copy strong {
    font-size: 13px;
  }

  body.cr-admin .cr-shift-card {
    padding: 10px;
  }

  body.cr-admin .cr-sidebar__footer {
    grid-template-columns: 1fr 1fr;
  }

  body.cr-admin :where(.page-title, .admin-page-title, .content-title, .section-heading, .main-content h2.mb-4) {
    font-size: 20px;
    overflow-wrap: anywhere;
  }

  body.cr-admin :where(.cr-command-hero, .hero, .module-hero, .module-editor-hero, .hero-panel, .docs-hero, .rates-hero) {
    padding: 14px;
  }

  body.cr-admin :where(.cr-command-hero__copy h2, .hero h1, .module-hero h1, .module-hero h2) {
    font-size: 21px;
  }

  body.cr-admin :where(.stat-card, .kpi, .admin-metric) {
    min-height: 92px;
    padding: 13px;
  }
}

/* Dashboard hero must stack cleanly on phones. */
@media (max-width: 767.98px) {
  body.cr-admin .dashboard-shell > .cr-command-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    width: 100%;
    min-width: 0;
    padding: 15px;
    overflow: hidden;
  }

  body.cr-admin .dashboard-shell .cr-command-hero__copy,
  body.cr-admin .dashboard-shell .cr-command-hero__status {
    width: 100%;
    min-width: 0;
  }

  body.cr-admin .dashboard-shell .cr-command-hero__copy h2 {
    max-width: 100%;
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  body.cr-admin .dashboard-shell .cr-command-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  body.cr-admin .dashboard-shell .cr-command-hero__actions .cr-button {
    width: 100%;
  }

  body.cr-admin .dashboard-shell .cr-command-hero__status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  body.cr-admin .dashboard-shell .cr-command-status,
  body.cr-admin .dashboard-shell .cr-command-status--live {
    grid-column: auto;
    min-width: 0;
    min-height: 70px;
  }

  body.cr-admin .dashboard-shell .cr-command-status--live {
    grid-column: 1 / -1;
  }
}

@media (max-width: 479.98px) {
  body.cr-admin .dashboard-shell .cr-command-hero__status {
    grid-template-columns: 1fr !important;
  }

  body.cr-admin .dashboard-shell .cr-command-status--live {
    grid-column: auto;
  }
}
/* Standalone module pages must clear the fixed sidebar. */
.content-wrapper.content { margin-left: 264px; width: calc(100% - 264px); }
@media (max-width: 900px) { .content-wrapper.content { margin-left: 0; width: 100%; } }

/* News editor: override legacy admin rules that collapse generic forms. */
body.cr-admin .news-admin .form {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}
body.cr-admin .news-admin .form > * {
  display: grid !important;
}

body.cr-admin .news-admin {
  max-width: 1320px;
}
body.cr-admin .news-admin .grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr);
  align-items: start;
}
body.cr-admin .news-admin .card {
  min-width: 0;
}
body.cr-admin .news-admin .preview {
  position: sticky;
  top: 88px;
}
body.cr-admin .news-admin .preview small,
body.cr-admin .news-admin .preview strong {
  display: block;
}
body.cr-admin .news-admin .preview small {
  margin-bottom: 8px;
}
body.cr-admin .news-admin .preview strong {
  font-size: 18px;
  line-height: 1.35;
}
@media (max-width: 850px) {
  body.cr-admin .news-admin .grid {
    grid-template-columns: 1fr;
  }
  body.cr-admin .news-admin .preview {
    position: static;
  }
}

/* Keep the sidebar brand consistent across every admin page. */
body.cr-admin .cr-sidebar .cr-brand {
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}
body.cr-admin .cr-sidebar .cr-brand__mark {
  flex: 0 0 46px !important;
  width: 46px !important;
  height: 46px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}
body.cr-admin .cr-sidebar .cr-brand__mark img {
  width: 100%;
  height: 100%;
  padding: 0 !important;
  object-fit: contain !important;
  border-radius: 9px;
}
body.cr-admin .cr-sidebar .cr-brand__copy {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
body.cr-admin .cr-sidebar .cr-brand__copy strong,
body.cr-admin .cr-sidebar .cr-brand__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cr-file-picker {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  overflow: hidden;
  border: 1px solid #cbd9e3;
  border-radius: 8px;
  background: #fff;
  color: #12394e;
  font-size: 12px;
}
.cr-file-picker > input[type="file"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  cursor: pointer;
  z-index: 1;
}
.cr-file-picker__button {
  align-self: stretch;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  max-width: 58%;
  padding: 8px 10px;
  border-right: 1px solid #cbd9e3;
  background: #edf3f6;
  font-weight: 600;
}
.cr-file-picker__status {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-file-picker:focus-within {
  outline: 2px solid #1386a0;
  outline-offset: 2px;
}
.cr-file-picker.is-disabled { opacity: .55; }
[data-cr-theme="dark"] .cr-file-picker { background: #12394e; color: #edf3f6; }
[data-cr-theme="dark"] .cr-file-picker__button { background: #1b5068; }
