:root {
  color-scheme: dark;
  --bg: #0b1216;
  --bg-soft: #121c22;
  --panel: #111820;
  --panel-border: rgba(255, 255, 255, 0.08);
  --accent: #39d98a;
  --accent-2: #ff9a3c;
  --text: #e6f1f6;
  --muted: #8aa0ae;
  --danger: #ff6b6b;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --body-bg: radial-gradient(circle at top, rgba(57, 217, 138, 0.15), transparent 45%),
    radial-gradient(circle at 20% 40%, rgba(255, 154, 60, 0.18), transparent 40%),
    var(--bg);
  --grid-line: rgba(255, 255, 255, 0.04);
  --nav-bg: rgba(12, 20, 26, 0.76);
  --control-bg: rgba(255, 255, 255, 0.06);
  --control-border: rgba(255, 255, 255, 0.15);
  --input-bg: #0c141a;
  --inventory-pinned-header-bg: var(--panel);
  --inventory-pinned-row-bg: #0c141a;
  --input-border: rgba(255, 255, 255, 0.1);
  --dropdown-bg: #070b0e;
  --dropdown-panel-bg: rgba(12, 20, 26, 0.9);
  --item-bg: #121a20;
  --item-border: rgba(255, 255, 255, 0.08);
  --subtle-border: rgba(255, 255, 255, 0.12);
  --divider: rgba(255, 255, 255, 0.06);
  --badge-ring: rgba(11, 18, 22, 0.95);
  --button-text-on-accent: #05110a;
  --action-map-bg: rgba(66, 184, 238, 0.18);
  --action-map-border: rgba(66, 184, 238, 0.42);
  --action-map-text: #8fd8ff;
  --action-score-bg: rgba(57, 217, 138, 0.18);
  --action-score-border: rgba(57, 217, 138, 0.42);
  --action-score-text: #75ebb0;
  --action-stats-bg: rgba(167, 139, 250, 0.18);
  --action-stats-border: rgba(167, 139, 250, 0.46);
  --action-stats-text: #c4b5fd;
  --action-report-bg: rgba(255, 154, 60, 0.17);
  --action-report-border: rgba(255, 154, 60, 0.42);
  --action-report-text: #ffbd80;
  --alert-summary: rgba(235, 243, 247, 0.92);
  --detect-bg: linear-gradient(180deg, #2a2114, #151c21);
  --confirm-bg: linear-gradient(180deg, #301819, #151c21);
  --crash-bg: linear-gradient(180deg, #2a1718, #151c21);
  --vehicle-fall-bg: linear-gradient(180deg, rgba(255, 154, 60, 0.22), #151c21);
  --dismiss-bg: linear-gradient(180deg, rgba(46, 204, 113, 0.22), #151c21);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7f5;
  --bg-soft: #e9f1ed;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-border: rgba(20, 48, 42, 0.14);
  --accent: #087f5b;
  --accent-2: #c05a12;
  --text: #14201f;
  --muted: #607271;
  --danger: #c92a2a;
  --shadow: 0 18px 42px rgba(31, 52, 47, 0.14);
  --body-bg: radial-gradient(circle at top, rgba(8, 127, 91, 0.11), transparent 42%),
    radial-gradient(circle at 18% 38%, rgba(255, 154, 60, 0.12), transparent 40%),
    var(--bg);
  --grid-line: rgba(31, 63, 57, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --control-bg: rgba(20, 48, 42, 0.05);
  --control-border: rgba(20, 48, 42, 0.16);
  --input-bg: rgba(255, 255, 255, 0.9);
  --inventory-pinned-header-bg: var(--panel);
  --inventory-pinned-row-bg: #ffffff;
  --input-border: rgba(20, 48, 42, 0.16);
  --dropdown-bg: #ffffff;
  --dropdown-panel-bg: rgba(244, 248, 246, 0.96);
  --item-bg: #f6faf8;
  --item-border: rgba(20, 48, 42, 0.12);
  --subtle-border: rgba(20, 48, 42, 0.16);
  --divider: rgba(20, 48, 42, 0.1);
  --badge-ring: rgba(255, 255, 255, 0.95);
  --button-text-on-accent: #ffffff;
  --action-map-bg: rgba(14, 116, 144, 0.1);
  --action-map-border: rgba(14, 116, 144, 0.32);
  --action-map-text: #0e7490;
  --action-score-bg: rgba(8, 127, 91, 0.1);
  --action-score-border: rgba(8, 127, 91, 0.32);
  --action-score-text: #087f5b;
  --action-stats-bg: rgba(109, 40, 217, 0.09);
  --action-stats-border: rgba(109, 40, 217, 0.3);
  --action-stats-text: #6d28d9;
  --action-report-bg: rgba(192, 90, 18, 0.11);
  --action-report-border: rgba(192, 90, 18, 0.32);
  --action-report-text: #a3480f;
  --alert-summary: rgba(20, 32, 31, 0.82);
  --detect-bg: linear-gradient(180deg, #fff6e8, #f8fbfa);
  --confirm-bg: linear-gradient(180deg, #fff0f0, #f8fbfa);
  --crash-bg: linear-gradient(180deg, #fff0f0, #f8fbfa);
  --vehicle-fall-bg: linear-gradient(180deg, rgba(255, 154, 60, 0.16), #f8fbfa);
  --dismiss-bg: linear-gradient(180deg, rgba(46, 204, 113, 0.14), #f8fbfa);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: var(--body-bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.background-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.2;
  pointer-events: none;
}

.dashboard {
  position: relative;
  z-index: 1;
  padding: 0 clamp(20px, 4vw, 56px) 56px;
}

.top-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 10px 14px;
  border-radius: 0 0 14px 14px;
  background: var(--nav-bg);
  border: 1px solid var(--panel-border);
  border-top: none;
  backdrop-filter: blur(6px);
  isolation: isolate;
  overflow: visible;
}

.top-brand {
  gap: 12px;
  cursor: pointer;
  border-radius: 12px;
  padding: 4px 6px;
}

.top-brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.top-brand .brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 12px;
}

.nav-title {
  font-size: clamp(1.02rem, 1.8vw, 1.24rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
}

.auth-panel {
  display: inline-flex;
  align-items: center;
  background: transparent;
  padding: 0;
  gap: 0;
}

.auth-user-meta {
  display: flex;
  align-items: center;
}

.auth-user-meta-button {
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: inherit;
  cursor: pointer;
  text-align: center;
  border-radius: 12px;
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-user-meta-button:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 217, 138, 0.5);
  box-shadow: 0 10px 24px rgba(57, 217, 138, 0.2);
}

.auth-user-meta-button:focus-visible {
  outline: 2px solid rgba(57, 217, 138, 0.65);
  outline-offset: 2px;
  border-radius: 12px;
}

.auth-user-name {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.auth-user-company {
  display: none;
}

.auth-action-button {
  border: 1px solid var(--subtle-border);
  background: var(--item-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-action-button:hover {
  border-color: rgba(57, 217, 138, 0.5);
}

.nav-icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-icon-button svg {
  width: 23px;
  height: 23px;
}

.nav-icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 217, 138, 0.5);
  box-shadow: 0 10px 24px rgba(57, 217, 138, 0.2);
}

.nav-icon-button:focus-visible {
  outline: 2px solid rgba(57, 217, 138, 0.7);
  outline-offset: 2px;
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff6b6b;
  box-shadow: 0 0 0 3px var(--badge-ring);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  letter-spacing: 0;
  pointer-events: none;
}

.notification-dot.hidden {
  display: none;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 50px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(72vh, 560px);
  overflow-y: auto;
  background: var(--dropdown-bg);
  backdrop-filter: none;
  background-image: none;
  border: 1px solid var(--subtle-border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.52);
  z-index: 9999;
  isolation: isolate;
  contain: paint;
  opacity: 1;
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(260px, calc(100vw - 32px));
  background: var(--dropdown-bg);
  border: 1px solid var(--subtle-border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  z-index: 9999;
}

.settings-dropdown.hidden {
  display: none;
}

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

.inventory-settings-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}

.inventory-column-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 2px;
}

.inventory-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-left: auto;
  width: fit-content;
  color: var(--text);
  font-size: 0.82rem;
}

.inventory-select-all input {
  accent-color: var(--accent);
}

.inventory-column-item {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--item-border);
  border-radius: 10px;
  background: var(--item-bg);
  min-height: 36px;
  padding: 4px 6px;
}

.inventory-column-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.15;
}

.inventory-column-label input {
  accent-color: var(--accent);
}

.inventory-filter-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--item-border);
  border-radius: 10px;
  background: var(--item-bg);
  color: var(--text);
  font-size: 0.82rem;
}

.inventory-filter-item input {
  accent-color: var(--accent);
}

.settings-title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-options {
  display: grid;
  gap: 6px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid var(--item-border);
  border-radius: 10px;
  background: var(--item-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.84rem;
}

.theme-option input {
  accent-color: var(--accent);
}

@media (max-width: 1100px) {
  .inventory-column-controls {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  }
}

@media (max-width: 720px) {
  .inventory-column-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .inventory-controls-panel-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .inventory-select-all {
    margin-left: 0;
  }

  .inventory-column-controls {
    grid-template-columns: minmax(0, 1fr);
  }
}

.notification-dropdown.hidden {
  display: none;
}

.notification-empty {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: left;
}

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

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

.notification-toolbar-copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.notification-toolbar-title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notification-toolbar-count {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notification-mark-all,
.notification-read-toggle,
.notification-archive-toggle {
  border: 1px solid var(--subtle-border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.66rem;
  cursor: pointer;
}

.notification-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--subtle-border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
}

.notification-filter-toggle svg {
  width: 13px;
  height: 13px;
}

.notification-filter-toggle:hover {
  border-color: rgba(57, 217, 138, 0.5);
}

.notification-filter-panel {
  display: grid;
  gap: 6px;
  margin: 2px 0 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--dropdown-panel-bg);
}

.notification-filter-panel.hidden {
  display: none;
}

.notification-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.73rem;
  color: var(--text);
  user-select: none;
}

.notification-filter-option input {
  width: 14px;
  height: 14px;
}

.notification-mark-all:disabled,
.notification-read-toggle:disabled {
  opacity: 0.5;
  cursor: default;
}

.notification-archive-toggle {
  border-color: rgba(255, 154, 60, 0.4);
  color: var(--accent-2);
}

.notification-list {
  list-style: none;
  display: grid;
  gap: 6px;
}

.notification-item {
  position: relative;
  font-size: 0.8rem;
  color: var(--text);
  padding: 8px 9px;
  border-radius: 10px;
  background: var(--item-bg);
  border: 1px solid var(--item-border);
  display: grid;
  gap: 5px;
  isolation: isolate;
  opacity: 1;
}

.notification-item-detect {
  border-color: rgba(255, 184, 77, 0.28);
  background: var(--detect-bg);
}

.notification-item-confirm {
  border-color: rgba(255, 107, 107, 0.32);
  background: var(--confirm-bg);
}

.notification-item-alarm-crash {
  border-color: rgba(255, 107, 107, 0.32);
  background: var(--crash-bg);
}

.notification-item-alarm-vehicle-fall {
  border-color: rgba(255, 154, 60, 0.46);
  background: var(--vehicle-fall-bg);
}

.notification-item-dismiss {
  border-color: rgba(88, 214, 141, 0.45);
  background: var(--dismiss-bg);
}

.notification-item-read {
  opacity: 0.72;
}

.alert-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.alert-row-title {
  font-weight: 600;
  font-size: 0.82rem;
}

.alert-pill {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}

.alert-pill-detect {
  color: #ffcf85;
  background: rgba(255, 184, 77, 0.14);
  border-color: rgba(255, 184, 77, 0.26);
}

.alert-pill-confirm {
  color: #ff9c9c;
  background: rgba(255, 107, 107, 0.16);
  border-color: rgba(255, 107, 107, 0.3);
}

.alert-pill-general {
  color: #a8c4d6;
  background: rgba(168, 196, 214, 0.12);
  border-color: rgba(168, 196, 214, 0.22);
}

.alert-pill-dismiss {
  color: #82f0b3;
  background: rgba(46, 204, 113, 0.18);
  border-color: rgba(88, 214, 141, 0.38);
}

.alert-summary {
  margin: 0;
  color: var(--alert-summary);
  font-size: 0.76rem;
  line-height: 1.3;
}

.alert-field {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: start;
  gap: 4px 8px;
}

.alert-field-label {
  font-size: 0.64rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.alert-field-value {
  font-size: 0.74rem;
  line-height: 1.25;
  word-break: break-word;
  white-space: normal;
}

.gps-location-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-location-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.map-location-link:hover {
  border-color: rgba(57, 217, 138, 0.55);
  background: rgba(57, 217, 138, 0.16);
}

.map-location-link-ride {
  border-color: var(--action-map-border);
  background: var(--action-map-bg);
  color: var(--action-map-text);
}

.map-location-link-ride:hover {
  border-color: var(--action-map-border);
  background: var(--action-map-bg);
}

.map-location-link svg {
  width: 12px;
  height: 12px;
}

.notification-footer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-footer-row .alert-field {
  flex: 1;
  margin: 0;
}

.notification-footer-row .notification-read-toggle {
  flex-shrink: 0;
  white-space: nowrap;
}

.notification-item-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.dashboard-header {
  display: none;
}

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

.brand-mark {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: transparent;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.brand-eyebrow {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  font-weight: 700;
}

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

.search-panel label {
  font-size: 0.9rem;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.search-row {
  display: flex;
  gap: 12px;
}

.search-row input {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
  font-family: "IBM Plex Mono", monospace;
}

.search-row button {
  background: linear-gradient(140deg, var(--accent), #2bbf88);
  border: none;
  color: var(--button-text-on-accent);
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#searchButton {
  border: 1px solid rgba(57, 217, 138, 0.45);
  background: linear-gradient(140deg, rgba(57, 217, 138, 0.22), rgba(43, 191, 136, 0.35));
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 400;
  padding: 10px 12px;
  transition: border 0.2s ease, transform 0.2s ease;
}

#searchButton:hover {
  box-shadow: none;
}

#showRidersButton {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  padding: 12px 14px;
  min-width: 40px;
}

#showRidersButton:hover {
  background: var(--bg-soft);
  border-color: var(--accent);
  box-shadow: none;
}

.search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
  position: relative;
  z-index: 30;
}

.riders-dropdown {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--control-border);
  border-radius: 12px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 12000;
}

.riders-dropdown.hidden {
  display: none;
}

.riders-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--divider);
  transition: background-color 0.15s ease;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.riders-dropdown-item:hover {
  background: rgba(57, 217, 138, 0.1);
}

.riders-dropdown-item:last-child {
  border-bottom: none;
}

.riders-dropdown-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.link-button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 0;
}

.link-button:hover {
  color: var(--accent);
}

.search-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(57, 217, 138, 0.25);
}

.helper {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.right-column {
  position: relative;
  z-index: 0;
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.profile-card,
.rides-panel,
.report-panel {
  position: relative;
  z-index: 0;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.profile-card {
  display: flex;
  flex-direction: column;
}

.profile-body {
  flex: 1;
}

.report-panel {
  z-index: 2;
  min-height: 190px;
}

.rides-panel {
  z-index: 1;
}

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

.section-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.status-pill::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(57, 217, 138, 0.6);
}

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

.status-pill.status-error::before {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.55);
}

.profile-main {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--accent-2);
}

.profile-name {
  font-size: 1.2rem;
  font-weight: 600;
}

.profile-id {
  color: var(--muted);
  font-size: 0.9rem;
  font-family: "IBM Plex Mono", monospace;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.summary-card {
  background: var(--input-bg);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--divider);
}

.summary-label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-value {
  font-size: 1.2rem;
  margin-top: 6px;
  font-weight: 600;
}

.profile-footer {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-footer[hidden] {
  display: none;
}

.primary-button {
  background: rgba(57, 217, 138, 0.18);
  border: 1px solid rgba(57, 217, 138, 0.4);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.report-rider-row {
  position: relative;
  z-index: 30;
  margin-bottom: 12px;
}

.report-summary-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}

.report-rider-field {
  width: 100%;
}

.report-rider-field .search-footer {
  margin-top: 8px;
}

.report-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.report-field input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: "IBM Plex Mono", monospace;
}

.report-button {
  position: relative;
  z-index: 0;
  border: 1px solid var(--subtle-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--control-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  width: 100%;
  transition: border 0.2s ease, transform 0.2s ease;
}

.report-button.primary {
  background: linear-gradient(140deg, rgba(57, 217, 138, 0.22), rgba(43, 191, 136, 0.35));
  border-color: rgba(57, 217, 138, 0.45);
}

.report-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.report-button:hover {
  transform: translateY(-1px);
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

.rides-panel .section-header {
  align-items: flex-start;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.inventory-controls-button {
  flex-shrink: 0;
}

.inventory-controls-button:hover {
  border-color: rgba(57, 217, 138, 0.45);
}

.inventory-controls-button[aria-expanded="true"] {
  border-color: rgba(57, 217, 138, 0.5);
  box-shadow: 0 10px 24px rgba(57, 217, 138, 0.2);
  transform: translateY(-1px);
}

.inventory-controls-panel {
  margin-bottom: 12px;
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--subtle-border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.inventory-controls-panel.hidden {
  display: none;
}

.inventory-controls-panel-section {
  display: grid;
  gap: 10px;
}

.inventory-controls-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-settings-group {
  display: none;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(57, 217, 138, 0.6);
}

.rides-table {
  --rides-grid-columns: 200px 120px 96px 108px 120px 112px 120px 190px 260px;
  --rides-pinned-company-width: 120px;
  --rides-pinned-fleet-width: 110px;
  --rides-cell-gap: 2px;
  --rides-pinned-right-overlap: 4px;
  --rides-pinned-seam-mask: 6px;
  --rides-table-inline-padding: 3px;
  --rides-row-inline-padding: 14px;
  --rides-row-block-padding: 12px;
  display: grid;
  width: 100%;
  max-width: 100%;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-inline: var(--rides-table-inline-padding);
  padding-bottom: 6px;
}

.rides-table::-webkit-scrollbar {
  display: none;
}

.inventory-table-scrollbar {
  box-sizing: border-box;
  height: 14px;
  margin-top: 2px;
  margin-left: var(--inventory-scrollbar-left, 0px);
  margin-right: var(--inventory-scrollbar-right, 0px);
  overflow-x: auto;
  overflow-y: hidden;
}

.inventory-table-scrollbar.is-hidden {
  display: none;
}

.inventory-table-scrollbar-content {
  height: 1px;
}

.inventory-pagination {
  --inventory-page-control-height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.inventory-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--inventory-page-control-height);
  border: 1px solid var(--subtle-border);
  background: var(--item-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 0 10px;
  font-size: 0.74rem;
  cursor: pointer;
}

.inventory-page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.inventory-page-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  min-width: 90px;
  text-align: center;
}

.inventory-page-input {
  box-sizing: border-box;
  width: 36px;
  height: 26px;
  min-width: 0;
  border: 1px solid var(--subtle-border);
  background: var(--item-bg);
  color: var(--text);
  border-radius: 8px;
  padding: 0 4px;
  font: inherit;
  text-align: center;
  appearance: textfield;
}

.inventory-page-input::-webkit-inner-spin-button,
.inventory-page-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.inventory-page-input:focus {
  outline: 2px solid rgba(57, 217, 138, 0.28);
  outline-offset: 1px;
}

.inventory-page-input:disabled {
  opacity: 0.6;
}

.auth-modal-panel {
  width: min(360px, 92vw);
  padding: 16px;
  border-radius: 14px;
  border-color: rgba(57, 217, 138, 0.3);
}

.auth-modal-subtitle {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.auth-credential-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 6px 0 6px;
}

.auth-credential-grid label {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-credential-grid input,
.user-center-section input,
.user-center-section select,
.user-center-section textarea {
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

.auth-mode-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 3px;
}

.auth-mode-actions .modal-choice {
  min-height: 38px;
}

#authModal .modal-cancel {
  margin-top: 2px;
}

.auth-hint-text {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 4px;
  margin-bottom: 0px;
  min-height: 0;
  line-height: 1.3;
}

.user-center-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 100px;
  width: min(260px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  z-index: 9999;
  display: none;
}

.user-center-popup:not(.hidden) {
  display: block;
}

.user-center-popup-panel {
  width: 100%;
  max-height: inherit;
  overflow-y: auto;
  background: var(--dropdown-bg);
  border: 1px solid var(--subtle-border);
  border-radius: 14px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.52);
  padding: 12px;
}

.user-center-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.user-center-profile-info {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}

.user-center-section label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.user-center-section input,
.user-center-section select,
.user-center-section textarea {
  padding: 6px 8px;
  font-size: 0.8rem;
}

.user-center-section .modal-choice {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.84rem;
  background: var(--item-bg);
  border: 1px solid var(--item-border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}

.user-center-primary {
  font-size: 0.84rem;
  font-weight: 600;
}

.user-center-secondary {
  font-size: 0.72rem;
  color: var(--muted);
}

.user-center-kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.user-center-kv-label {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.user-center-kv-value {
  font-size: 0.82rem;
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.user-center-actions-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.user-center-actions-row .modal-choice {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.82rem;
  background: var(--item-bg);
  border: 1px solid var(--item-border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.rides-header,
.ride-row {
  display: grid;
  grid-template-columns: var(--rides-grid-columns);
  gap: var(--rides-cell-gap);
  align-items: center;
  min-width: max-content;
}

.rides-header {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 14px 8px;
  border-bottom: 1px solid var(--divider);
}

.inventory-header-cell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  cursor: grab;
  user-select: none;
}

.inventory-cell {
  min-width: 0;
}

.inventory-cell > span {
  display: block;
  box-sizing: border-box;
  padding-inline: 4px;
}

.inventory-cell > .inventory-metric-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
}

.inventory-metric-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: inventoryMetricSpin 0.8s linear infinite;
}

@keyframes inventoryMetricSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .inventory-metric-spinner {
    animation-duration: 1.6s;
  }
}

.inventory-header-cell:not([data-column-id="actions"]) .inventory-header-label {
  justify-content: center;
  text-align: center;
}

.inventory-cell:not([data-column-id="actions"]) > span {
  text-align: center;
}

.inventory-header-cell:is(
  [data-column-id="company_id"],
  [data-column-id="fleet"],
  [data-column-id="vehicle_id"]
) .inventory-header-label {
  justify-content: flex-start;
  text-align: left;
}

.inventory-cell:is(
  [data-column-id="company_id"],
  [data-column-id="fleet"],
  [data-column-id="vehicle_id"]
) > span {
  text-align: left;
}

.inventory-cell-width-measurer {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

.inventory-cell-pinned {
  position: sticky;
  z-index: 4;
}

.inventory-header-cell.inventory-cell-pinned {
  align-self: stretch;
  z-index: 6;
  background: var(--inventory-pinned-header-bg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.ride-row .inventory-cell-pinned {
  align-self: stretch;
  display: flex;
  align-items: center;
  background: var(--inventory-pinned-row-bg);
}

.inventory-cell-pinned-left {
  box-shadow: calc(var(--rides-cell-gap) / -2) 0 0 var(--inventory-pinned-row-bg),
    calc(var(--rides-cell-gap) / 2) 0 0 var(--inventory-pinned-row-bg);
}

.inventory-header-cell.inventory-cell-pinned-left {
  box-shadow: calc(var(--rides-cell-gap) / -2) 0 0 var(--inventory-pinned-header-bg),
    calc(var(--rides-cell-gap) / 2) 0 0 var(--inventory-pinned-header-bg);
}

.inventory-cell-pinned-left-first {
  left: var(--rides-row-inline-padding);
}

.inventory-cell-pinned-left-first::before {
  content: "";
  position: absolute;
  inset-block: 0;
  right: 100%;
  width: calc(var(--rides-row-inline-padding) + var(--rides-table-inline-padding));
  background: var(--inventory-pinned-row-bg);
  pointer-events: none;
}

.ride-row .inventory-cell-pinned-left-first::before {
  display: none;
  inset-block: calc((var(--rides-row-block-padding) + 1px) * -1);
  right: calc(var(--rides-cell-gap) / -2);
  width: calc(100% + var(--rides-row-inline-padding) + var(--rides-cell-gap) / 2 + var(--rides-table-inline-padding));
  border: 1px solid var(--divider);
  border-right: 0;
  border-radius: 16px 0 0 16px;
}

.rides-table.is-scrolled-from-left .ride-row .inventory-cell-pinned-left-first::before {
  display: block;
}

.ride-row .inventory-cell-pinned-left-first > span {
  position: relative;
  z-index: 1;
}

.inventory-header-cell.inventory-cell-pinned-left-first::before {
  background: var(--inventory-pinned-header-bg);
}

.inventory-cell-pinned-left-second {
  left: calc(var(--rides-row-inline-padding) + var(--rides-pinned-company-width) + var(--rides-cell-gap));
}

.inventory-cell-pinned-left-third {
  left: calc(
    var(--rides-row-inline-padding)
    + var(--rides-pinned-company-width)
    + var(--rides-pinned-fleet-width)
    + (var(--rides-cell-gap) * 2)
  );
}

.inventory-cell-pinned-left-second::after,
.inventory-cell-pinned-left-third::after,
.inventory-cell-pinned-right::before {
  content: "";
  position: absolute;
  inset-block: 0;
  width: var(--rides-pinned-seam-mask);
  background: var(--inventory-pinned-row-bg);
  display: none;
  pointer-events: none;
}

.inventory-cell-pinned-left-second::after,
.inventory-cell-pinned-left-third::after {
  left: 100%;
}

.inventory-cell-pinned-right::before {
  right: 100%;
}

.rides-table.is-scrolled-from-left .inventory-cell-pinned-left-third::after,
.rides-table.has-hidden-right .inventory-cell-pinned-right::before {
  display: block;
}

.inventory-header-cell.inventory-cell-pinned-left-second::after,
.inventory-header-cell.inventory-cell-pinned-left-third::after,
.inventory-header-cell.inventory-cell-pinned-right::before {
  background: var(--inventory-pinned-header-bg);
}

.inventory-cell-pinned-right {
  right: var(--rides-row-inline-padding);
  box-shadow: calc(var(--rides-pinned-right-overlap) * -1) 0 0 var(--inventory-pinned-row-bg);
}

.inventory-cell-pinned-right::after {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 100%;
  width: calc(var(--rides-row-inline-padding) + var(--rides-table-inline-padding));
  background: var(--inventory-pinned-row-bg);
  pointer-events: none;
}

.ride-row .inventory-cell-pinned-right::after {
  display: none;
  inset-block: calc((var(--rides-row-block-padding) + 1px) * -1);
  left: calc(var(--rides-cell-gap) / -2);
  width: calc(100% + var(--rides-row-inline-padding) + var(--rides-cell-gap) / 2 + var(--rides-table-inline-padding) + 1px);
  border: 1px solid var(--divider);
  border-left: 0;
  border-radius: 0 16px 16px 0;
}

.rides-table.has-hidden-right .ride-row .inventory-cell-pinned-right::after {
  display: block;
}

.ride-row .inventory-cell-pinned-right > .ride-actions {
  position: relative;
  z-index: 1;
}

.inventory-header-cell.inventory-cell-pinned-right {
  box-shadow: calc(var(--rides-pinned-right-overlap) * -1) 0 0 var(--inventory-pinned-header-bg);
}

.inventory-header-cell.inventory-cell-pinned-right::after {
  background: var(--inventory-pinned-header-bg);
}

.inventory-header-cell.is-dragging {
  opacity: 0.55;
}

.inventory-header-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  padding: 0;
  min-width: 0;
}

.inventory-header-label > span:first-child {
  min-width: 0;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.15;
}

.inventory-header-label-static {
  cursor: default;
}

.inventory-sort-indicator {
  flex: 0 0 auto;
  font-size: 0.68rem;
  opacity: 0.7;
}

.inventory-sort-indicator:empty {
  display: none;
}

.inventory-resizer {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 12px;
  height: calc(100% + 12px);
  cursor: col-resize;
  touch-action: none;
}

.inventory-controls-button,
.inventory-header-label,
.inventory-column-label,
.inventory-column-item {
  user-select: none;
}

.inventory-header-cell.is-dragging,
body.column-dragging .inventory-header-cell {
  cursor: grabbing;
}

.rides-body {
  display: grid;
  gap: 12px;
}

.rides-body[data-density="compact"] {
  gap: 8px;
}

.rides-body[data-density="comfortable"] {
  gap: 16px;
}

.ride-row {
  background: var(--input-bg);
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid var(--divider);
  animation: riseIn 0.3s ease-out;
  min-width: max-content;
}

.ride-row:has(.ride-actions-menu:not(.hidden)) {
  position: relative;
  z-index: 7;
}

.rides-body[data-density="compact"] .ride-row {
  --rides-row-block-padding: 8px;
  --rides-row-inline-padding: 12px;
  padding: 8px 12px;
}

.rides-body[data-density="comfortable"] .ride-row {
  --rides-row-block-padding: 15px;
  --rides-row-inline-padding: 15px;
  padding: 15px 15px;
}

.ride-row span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ride-actions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 6px;
  width: 100%;
}

.ride-actions button,
.ride-actions-menu button {
  border: 1px solid var(--subtle-border);
  border-radius: 10px;
  padding: 6px 6px;
  background: var(--control-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 500;
  transition: border 0.2s ease, transform 0.2s ease, background 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.ride-actions-more {
  position: relative;
}

.ride-actions button.more-button {
  min-width: 30px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 8px;
}

.ride-actions-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 12000;
  display: grid;
  gap: 6px;
  min-width: 118px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--subtle-border);
  background: var(--dropdown-bg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.ride-actions-menu.hidden {
  display: none;
}

.ride-actions-menu button {
  width: 100%;
}

.ride-actions button.primary {
  background: var(--action-report-bg);
  border-color: var(--action-report-border);
  color: var(--action-report-text);
}

.ride-actions button.map-action {
  background: var(--action-map-bg);
  border-color: var(--action-map-border);
  color: var(--action-map-text);
}

.ride-actions button.score-action {
  background: var(--action-score-bg);
  border-color: var(--action-score-border);
  color: var(--action-score-text);
}

.ride-actions button.report-action {
  background: var(--action-report-bg);
  border-color: var(--action-report-border);
  color: var(--action-report-text);
}

.ride-actions button.secondary,
.ride-actions-menu button.secondary {
  background: rgba(255, 154, 60, 0.16);
  border-color: rgba(255, 154, 60, 0.4);
  color: var(--accent-2);
}

.ride-actions-menu button.stats-action {
  background: var(--action-stats-bg);
  border-color: var(--action-stats-border);
  color: var(--action-stats-text);
}

.ride-actions button.danger,
.ride-actions-menu button.danger {
  background: rgba(255, 107, 107, 0.18);
  border-color: rgba(255, 107, 107, 0.45);
  color: #ffb3b3;
}

.ride-actions button:hover,
.ride-actions-menu button:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.ride-actions button:disabled,
.ride-actions-menu button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

body.column-resizing,
body.column-resizing * {
  cursor: col-resize !important;
}

.empty-state {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--subtle-border);
  border-radius: 16px;
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(4, 10, 14, 0.56);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-panel {
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
  animation: riseIn 0.2s ease-out;
}

.modal-panel h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.modal-description {
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.modal-choice,
.modal-cancel {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--subtle-border);
  background: var(--control-bg);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.modal-choice:hover,
.modal-cancel:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 217, 138, 0.4);
}

.modal-choice:focus-visible,
.modal-cancel:focus-visible {
  outline: 2px solid rgba(57, 217, 138, 0.7);
  outline-offset: 2px;
}

.modal-choice[data-json-filter="dangerous"] {
  border-color: rgba(255, 154, 60, 0.45);
  background: rgba(255, 154, 60, 0.14);
}

.modal-choice[data-json-filter="normal"] {
  border-color: rgba(57, 217, 138, 0.45);
  background: rgba(57, 217, 138, 0.14);
}

.modal-cancel {
  margin-top: 14px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--dropdown-bg);
  border: 1px solid var(--subtle-border);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 960px) {
  .top-nav {
    margin-bottom: 16px;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .auth-panel {
    order: 2;
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .search-row {
    flex-wrap: wrap;
  }

  .search-row input {
    width: 100%;
  }

  .rides-header {
    display: none;
  }

  .ride-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ride-row span {
    font-size: 0.9rem;
  }

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

  .inventory-pagination {
    justify-content: space-between;
  }

  .modal-panel {
    padding: 18px;
    border-radius: 14px;
  }

  .user-center-popup {
    position: fixed;
    top: 74px;
    right: 12px;
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100vh - 92px);
    z-index: 10000;
  }
}
