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

:root {
  --bg-root: #050d16;
  --bg-deep: #081523;
  --bg-accent-a: rgba(102, 196, 255, 0.2);
  --bg-accent-b: rgba(91, 224, 191, 0.17);
  --bg-bottom-a: rgba(70, 176, 222, 0.18);
  --bg-bottom-b: rgba(33, 158, 146, 0.16);
  --grid-line: rgba(255, 255, 255, 0.04);
  --grid-opacity: 0.25;
  --panel: rgba(9, 20, 32, 0.7);
  --panel-strong: rgba(10, 24, 38, 0.88);
  --panel-soft: rgba(14, 31, 47, 0.64);
  --line: rgba(151, 198, 223, 0.2);
  --line-strong: rgba(157, 215, 239, 0.38);
  --text: #e9f3ff;
  --muted: #9db5c8;
  --accent: #5be0bf;
  --accent-strong: #1eb3a5;
  --accent-alt: #66c4ff;
  --brand-green: #106953;
  --brand-green-strong: #0c5542;
  --warning: #f8c778;
  --danger: #ef8392;
  --success: #8ddfb5;
  --shadow: 0 26px 42px rgba(0, 0, 0, 0.35);
  --header-surface-a: rgba(13, 28, 44, 0.75);
  --header-surface-b: rgba(9, 21, 33, 0.9);
  --nav-link-a: rgba(102, 196, 255, 0.18);
  --nav-link-b: rgba(91, 224, 191, 0.1);
  --nav-link-text: #f0fbff;
  --surface-soft-a: rgba(17, 34, 50, 0.75);
  --surface-soft-b: rgba(13, 28, 45, 0.84);
  --metric-surface-a: rgba(12, 28, 43, 0.72);
  --metric-surface-b: rgba(11, 24, 36, 0.86);
  --metric-glow: rgba(102, 196, 255, 0.26);
  --field-bg: rgba(8, 18, 28, 0.78);
  --table-head-bg: rgba(12, 28, 43, 0.78);
  --table-head-text: #b6cce0;
  --table-row-even: rgba(17, 34, 50, 0.34);
  --table-row-hover: rgba(28, 57, 82, 0.42);
  --notice-surface-a: rgba(14, 31, 47, 0.78);
  --notice-surface-b: rgba(12, 27, 40, 0.92);
  --order-surface-a: rgba(16, 33, 50, 0.72);
  --order-surface-b: rgba(11, 25, 39, 0.91);
  --toast-surface-a: rgba(15, 34, 51, 0.95);
  --toast-surface-b: rgba(11, 25, 38, 0.95);
  --sidebar-surface-a: rgba(10, 24, 38, 0.94);
  --sidebar-surface-b: rgba(11, 26, 40, 0.88);
  --sidebar-link-hover: rgba(82, 157, 201, 0.16);
  --sidebar-link-active-a: rgba(91, 224, 191, 0.22);
  --sidebar-link-active-b: rgba(102, 196, 255, 0.14);
  --sidebar-icon-bg: rgba(15, 34, 50, 0.72);
  --sidebar-icon-text: #bee6ff;
  --group-title: #93afc3;
  --sidebar-scroll-track: rgba(13, 34, 51, 0.55);
  --sidebar-scroll-thumb: rgba(122, 189, 223, 0.6);
  --sidebar-scroll-thumb-hover: rgba(142, 211, 243, 0.75);
  --sidebar-motion-duration: 0.45s;
  --sidebar-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --border-thin: 0px;
  --border-accent: 0px;
  --border-strong: 0px;
}

html[data-theme='light'] {
  --bg-root: #e8f1f8;
  --bg-deep: #dceaf4;
  --bg-accent-a: rgba(76, 165, 221, 0.2);
  --bg-accent-b: rgba(66, 184, 166, 0.18);
  --bg-bottom-a: rgba(98, 165, 216, 0.16);
  --bg-bottom-b: rgba(101, 186, 156, 0.15);
  --grid-line: rgba(23, 65, 93, 0.08);
  --grid-opacity: 0.34;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(247, 252, 255, 0.95);
  --panel-soft: rgba(239, 248, 253, 0.78);
  --line: rgba(70, 124, 158, 0.24);
  --line-strong: rgba(60, 122, 160, 0.48);
  --text: #0e2a3f;
  --muted: #4f6a7b;
  --accent: #20b7aa;
  --accent-strong: #149088;
  --accent-alt: #2e8cd0;
  --warning: #d6973c;
  --danger: #c95266;
  --success: #3f9f66;
  --shadow: 0 14px 30px rgba(16, 62, 92, 0.16);
  --header-surface-a: rgba(255, 255, 255, 0.84);
  --header-surface-b: rgba(238, 247, 253, 0.95);
  --nav-link-a: rgba(101, 180, 223, 0.24);
  --nav-link-b: rgba(98, 196, 173, 0.2);
  --nav-link-text: #124057;
  --surface-soft-a: rgba(250, 253, 255, 0.82);
  --surface-soft-b: rgba(238, 247, 253, 0.92);
  --metric-surface-a: rgba(247, 252, 255, 0.9);
  --metric-surface-b: rgba(234, 245, 252, 0.96);
  --metric-glow: rgba(95, 172, 219, 0.2);
  --field-bg: rgba(255, 255, 255, 0.92);
  --table-head-bg: rgba(227, 240, 251, 0.9);
  --table-head-text: #36566c;
  --table-row-even: rgba(219, 234, 246, 0.45);
  --table-row-hover: rgba(206, 226, 241, 0.65);
  --notice-surface-a: rgba(248, 253, 255, 0.9);
  --notice-surface-b: rgba(233, 245, 252, 0.96);
  --order-surface-a: rgba(247, 252, 255, 0.88);
  --order-surface-b: rgba(234, 246, 253, 0.95);
  --toast-surface-a: rgba(255, 255, 255, 0.95);
  --toast-surface-b: rgba(236, 246, 252, 0.95);
  --sidebar-surface-a: rgba(246, 252, 255, 0.94);
  --sidebar-surface-b: rgba(231, 244, 252, 0.96);
  --sidebar-link-hover: rgba(91, 159, 202, 0.2);
  --sidebar-link-active-a: rgba(91, 224, 191, 0.26);
  --sidebar-link-active-b: rgba(102, 196, 255, 0.22);
  --sidebar-icon-bg: rgba(228, 240, 250, 0.96);
  --sidebar-icon-text: #245c82;
  --group-title: #4c6d85;
  --sidebar-scroll-track: rgba(202, 223, 238, 0.88);
  --sidebar-scroll-thumb: rgba(113, 160, 190, 0.72);
  --sidebar-scroll-thumb-hover: rgba(88, 141, 175, 0.84);
}

html[data-theme='black'] {
  --bg-root: #000000;
  --bg-deep: #050506;
  --bg-accent-a: rgba(76, 145, 196, 0.09);
  --bg-accent-b: rgba(62, 172, 149, 0.08);
  --bg-bottom-a: rgba(65, 131, 177, 0.1);
  --bg-bottom-b: rgba(48, 145, 129, 0.1);
  --grid-line: rgba(255, 255, 255, 0.03);
  --grid-opacity: 0.2;
  --panel: rgba(6, 8, 10, 0.84);
  --panel-strong: rgba(8, 10, 12, 0.96);
  --panel-soft: rgba(10, 13, 16, 0.86);
  --line: rgba(137, 173, 196, 0.22);
  --line-strong: rgba(154, 202, 229, 0.4);
  --text: #f1f6fb;
  --muted: #9aafbe;
  --accent: #43d6b8;
  --accent-strong: #1c9f91;
  --accent-alt: #66bbf3;
  --warning: #d8aa52;
  --danger: #d36a7e;
  --success: #59b988;
  --shadow: 0 30px 44px rgba(0, 0, 0, 0.58);
  --header-surface-a: rgba(7, 10, 13, 0.92);
  --header-surface-b: rgba(8, 12, 16, 0.98);
  --nav-link-a: rgba(81, 154, 197, 0.24);
  --nav-link-b: rgba(59, 173, 151, 0.16);
  --nav-link-text: #eaf6ff;
  --surface-soft-a: rgba(9, 14, 18, 0.86);
  --surface-soft-b: rgba(10, 16, 21, 0.92);
  --metric-surface-a: rgba(8, 12, 15, 0.88);
  --metric-surface-b: rgba(10, 15, 20, 0.96);
  --metric-glow: rgba(94, 170, 216, 0.18);
  --field-bg: rgba(8, 11, 14, 0.88);
  --table-head-bg: rgba(10, 16, 21, 0.9);
  --table-head-text: #a9c3d8;
  --table-row-even: rgba(11, 17, 22, 0.55);
  --table-row-hover: rgba(19, 31, 41, 0.68);
  --notice-surface-a: rgba(10, 15, 20, 0.88);
  --notice-surface-b: rgba(11, 17, 23, 0.95);
  --order-surface-a: rgba(9, 14, 18, 0.88);
  --order-surface-b: rgba(11, 18, 23, 0.96);
  --toast-surface-a: rgba(10, 15, 19, 0.98);
  --toast-surface-b: rgba(8, 13, 18, 0.98);
  --sidebar-surface-a: rgba(5, 9, 12, 0.96);
  --sidebar-surface-b: rgba(8, 12, 16, 0.98);
  --sidebar-link-hover: rgba(66, 125, 165, 0.23);
  --sidebar-link-active-a: rgba(71, 204, 171, 0.25);
  --sidebar-link-active-b: rgba(95, 168, 219, 0.2);
  --sidebar-icon-bg: rgba(13, 20, 26, 0.92);
  --sidebar-icon-text: #b5dcf7;
  --group-title: #8ba3b4;
  --sidebar-scroll-track: rgba(4, 8, 11, 0.96);
  --sidebar-scroll-thumb: rgba(52, 84, 107, 0.82);
  --sidebar-scroll-thumb-hover: rgba(74, 112, 140, 0.9);
}

html[data-theme='dark'],
html[data-theme='black'] {
  color-scheme: dark;
}

html[data-theme='light'] {
  color-scheme: light;
}

html[data-theme='black'] .sidebar {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(960px 420px at -4% -14%, var(--bg-accent-a), transparent 62%),
    radial-gradient(860px 380px at 106% -6%, var(--bg-accent-b), transparent 64%),
    linear-gradient(180deg, var(--bg-root), var(--bg-deep));
  position: relative;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  opacity: var(--grid-opacity);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 82%);
}

body::after {
  background:
    radial-gradient(440px 300px at 14% 98%, var(--bg-bottom-a), transparent 70%),
    radial-gradient(500px 300px at 92% 92%, var(--bg-bottom-b), transparent 70%);
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  letter-spacing: 0.02em;
}

a {
  color: inherit;
}

.page {
  width: min(1240px, 93vw);
  margin: 0 auto;
  padding: 1.35rem 0 2.2rem;
  position: relative;
  z-index: 1;
}

.topbar,
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 18px;
  border: var(--border-thin) solid var(--line);
  background: linear-gradient(160deg, var(--header-surface-a), var(--header-surface-b));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
  animation: rise-in 0.36s ease both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.brand-chip {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
  filter: saturate(1.9) hue-rotate(-16deg) brightness(1.04) contrast(1.08) drop-shadow(0 10px 22px rgba(32, 102, 187, 0.48));
}

.brand h1 {
  margin: 0;
  font-size: 1.18rem;
  color: #2f77cf;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand h1 {
    background: linear-gradient(150deg, #67b9ff 6%, #338be2 48%, #1f63b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.brand p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-link {
  width: auto;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: var(--border-thin) solid var(--line-strong);
  border-radius: 999px;
  padding: 0.52rem 0.88rem;
  color: var(--nav-link-text);
  background: linear-gradient(155deg, var(--nav-link-a), var(--nav-link-b));
  box-shadow: 0 8px 18px rgba(10, 40, 60, 0.34), inset 0 1px 0 rgba(229, 248, 255, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px rgba(39, 119, 151, 0.4), inset 0 1px 0 rgba(235, 251, 255, 0.2);
}

.nav-button {
  width: auto;
  color: var(--nav-link-text);
}

.theme-toggle-btn {
  min-width: 106px;
  gap: 0.42rem;
  padding-left: 0.72rem;
  padding-right: 0.72rem;
}

.theme-toggle-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.theme-toggle-icon::after {
  content: '';
  position: absolute;
  inset: 0;
}

.theme-toggle-text {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.theme-toggle-btn[data-theme-mode='dark'] .theme-toggle-icon {
  background: #9bc4ff;
}

.theme-toggle-btn[data-theme-mode='dark'] .theme-toggle-icon::after {
  inset: 2px 0 2px 5px;
  border-radius: 50%;
  background: var(--header-surface-b);
}

.theme-toggle-btn[data-theme-mode='light'] .theme-toggle-icon {
  background: radial-gradient(circle at center, #ffe187 34%, #ffb54a 70%);
  box-shadow: 0 0 0 2px rgba(255, 215, 124, 0.26);
}

.theme-toggle-btn[data-theme-mode='light'] .theme-toggle-icon::after {
  inset: -3px;
  border-radius: 50%;
  border: var(--border-thin) dashed rgba(255, 200, 106, 0.68);
}

.theme-toggle-btn[data-theme-mode='black'] .theme-toggle-icon {
  background: #050505;
  border: var(--border-thin) solid rgba(205, 229, 245, 0.3);
}

.theme-toggle-btn[data-theme-mode='black'] .theme-toggle-icon::after {
  inset: 3px;
  border-radius: 50%;
  background: rgba(172, 220, 246, 0.16);
}

.bell-link {
  min-width: 44px;
  width: 44px;
  padding: 0.5rem;
  position: relative;
}

.bell-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bell-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(150deg, #f095a4, #dc667b);
  border: var(--border-thin) solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 6px 16px rgba(158, 33, 58, 0.42);
}

.grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.grid > * {
  min-width: 0;
}

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

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

.card {
  border-radius: 18px;
  border: var(--border-thin) solid var(--line);
  background: linear-gradient(165deg, var(--panel), var(--panel-strong));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 1rem;
  animation: rise-in 0.42s ease both;
  min-width: 0;
}

.card h2,
.card h3 {
  margin: 0;
}

.card h2 {
  font-size: 1.03rem;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.center-card {
  max-width: 840px;
  margin: 8vh auto 0;
}

.auth-card {
  max-width: 760px;
}

.auth-page {
  margin-top: clamp(1.3rem, 3.6vh, 2.8rem);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.05fr);
  gap: 1rem;
  align-items: stretch;
}

.auth-visual {
  border-radius: 20px;
  border: var(--border-thin) solid rgba(145, 203, 234, 0.24);
  background:
    radial-gradient(520px 220px at 8% -8%, rgba(102, 196, 255, 0.16), transparent 70%),
    radial-gradient(380px 220px at 100% 108%, rgba(91, 224, 191, 0.14), transparent 72%),
    linear-gradient(165deg, var(--surface-soft-a), var(--surface-soft-b));
  box-shadow: var(--shadow);
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at 22% 16%, black 12%, transparent 60%);
  pointer-events: none;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: inherit;
}

.auth-brand .brand-chip {
  width: 156px;
  height: auto;
  filter: saturate(1.28) hue-rotate(-10deg) brightness(1.04);
}

.auth-brand-copy {
  display: grid;
  gap: 0.1rem;
}

.auth-brand-copy strong {
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #2f77cf;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .auth-brand-copy strong {
    background: linear-gradient(150deg, #6ec0ff 4%, #3a93ea 48%, #1f63b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.auth-brand-copy span {
  color: var(--muted);
  font-size: 0.76rem;
}

.auth-eyebrow {
  margin: 1rem 0 0;
  color: var(--accent-alt);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.auth-title {
  margin: 0.42rem 0 0;
  font-size: clamp(1.3rem, 2.6vw, 1.74rem);
  line-height: 1.2;
}

.auth-subtitle {
  margin: 0.58rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.auth-points {
  list-style: none;
  margin: 0.92rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.52rem;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.44;
}

.auth-points li::before {
  content: '';
  width: 0.78rem;
  height: 0.78rem;
  margin-top: 0.15rem;
  border-radius: 999px;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at center, rgba(91, 224, 191, 0.95) 36%, transparent 40%),
    radial-gradient(circle at center, rgba(102, 196, 255, 0.34) 0, rgba(102, 196, 255, 0.12) 70%, transparent 72%);
  box-shadow: 0 0 0 1px rgba(130, 203, 238, 0.28);
}

.auth-demo {
  margin-top: 1rem;
  border-radius: 14px;
  border: var(--border-thin) solid rgba(146, 203, 234, 0.24);
  background: linear-gradient(165deg, rgba(14, 33, 50, 0.42), rgba(11, 26, 41, 0.5));
  padding: 0.8rem 0.86rem;
}

.auth-demo h3 {
  margin: 0;
  font-size: 0.86rem;
}

.auth-demo p {
  margin: 0.36rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.auth-panel {
  display: grid;
  gap: 0.72rem;
  align-content: start;
  padding: 1.08rem;
}

.auth-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.auth-panel-kicker {
  margin: 0;
  color: var(--accent-alt);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.auth-panel-note {
  margin: 0.34rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-form {
  margin-top: 0.1rem;
}

.auth-form-stack {
  display: grid;
  gap: 0.16rem;
}

.form-row-single {
  grid-template-columns: 1fr;
}

.auth-form-footer {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.72rem;
  flex-wrap: wrap;
}

.auth-submit-btn {
  width: auto;
  min-width: 170px;
}

.auth-text-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-text-link:hover,
.auth-text-link:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.auth-divider {
  position: relative;
  margin: 0.06rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: var(--border-thin) dashed rgba(152, 206, 235, 0.34);
  transform: translateY(-50%);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 0.6rem;
  background: linear-gradient(165deg, var(--panel), var(--panel-strong));
}

.auth-google-btn {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 12px;
  border: 1px solid #dadce0;
  background: #fff;
  color: #3c4043;
  font-family: 'Roboto', 'Manrope', 'Segoe UI', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-google-btn:hover,
.auth-google-btn:focus-visible {
  background: #f8f9fa;
  border-color: #c6cacc;
  box-shadow: 0 6px 16px rgba(25, 40, 55, 0.12);
}

.auth-google-icon {
  width: 19px;
  height: 19px;
  display: block;
}

.auth-help {
  margin-top: 1rem;
}

.auth-help h3 {
  margin-bottom: 0.45rem;
}

.alert-error {
  border: var(--border-thin) solid rgba(236, 131, 146, 0.5);
  background: rgba(104, 35, 44, 0.38);
  color: #ffd8dd;
  border-radius: 11px;
  padding: 0.58rem 0.72rem;
  margin: 0;
}

.alert-success {
  border: var(--border-thin) solid rgba(141, 223, 181, 0.56);
  background: rgba(30, 83, 57, 0.3);
  color: #def8e9;
  border-radius: 11px;
  padding: 0.58rem 0.72rem;
  margin: 0;
}

.auth-alert-title {
  margin: 0 0 0.24rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.auth-alert-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.16rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

.landing-summary {
  margin: 0.95rem 0 1rem;
  line-height: 1.55;
}

@media (max-width: 1080px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    padding: 0.92rem;
  }

  .auth-panel {
    padding: 0.94rem;
  }

  .auth-demo {
    margin-top: 0.82rem;
  }
}

@media (max-width: 640px) {
  .auth-page {
    margin-top: 0.9rem;
  }

  .auth-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-submit-btn,
  .auth-google-btn {
    width: 100%;
  }

  .auth-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-brand-copy span {
    display: none;
  }
}

.home-hero {
  margin: 5vh auto 0;
  max-width: 1120px;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.95rem;
  align-items: stretch;
}

.home-eyebrow {
  margin: 0;
  color: var(--accent-alt);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
}

.home-title {
  margin: 0.46rem 0 0.45rem;
  max-width: 18ch;
  font-size: clamp(1.36rem, 3.4vw, 2.05rem);
  line-height: 1.16;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem;
}

.home-actions .nav-link {
  width: auto;
  min-width: 150px;
}

.home-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.home-metric-grid .metric {
  margin: 0;
  min-height: 118px;
}

.home-metric-grid .metric p {
  font-size: 1.04rem;
  line-height: 1.3;
}

.home-feature-grid {
  margin-top: 1rem;
}

.home-feature {
  min-height: 168px;
}

.home-feature p {
  margin-top: 0.52rem;
  line-height: 1.55;
}

.link-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr 1.2fr;
}

.link-grid > .nav-link {
  min-height: 92px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.96rem;
}

.action-panel {
  padding: 0.95rem;
  background: linear-gradient(165deg, var(--surface-soft-a), var(--surface-soft-b));
}

.action-panel label {
  margin-bottom: 0.45rem;
}

.section-stack {
  margin-bottom: 1rem;
}

.metric {
  border-radius: 14px;
  border: var(--border-thin) solid var(--line);
  padding: 0.85rem;
  background: linear-gradient(168deg, var(--metric-surface-a), var(--metric-surface-b));
  position: relative;
  overflow: hidden;
  animation: rise-in 0.5s ease both;
}

.metric::after {
  content: '';
  position: absolute;
  inset: auto -22% -70% auto;
  width: 65%;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--metric-glow), transparent 72%);
}

.metric h3 {
  margin: 0 0 0.42rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric p {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 700;
}

label {
  display: block;
  margin-bottom: 0.36rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

input,
select,
textarea,
button {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  border-radius: 12px;
}

input,
select,
textarea {
  border: var(--border-thin) solid rgba(168, 212, 232, 0.23);
  background: linear-gradient(165deg, var(--field-bg), var(--panel));
  color: var(--text);
  padding: 0.62rem 0.72rem;
  min-height: 42px;
  box-shadow:
    0 0 0 1px rgba(173, 220, 244, 0.32),
    0 8px 18px rgba(4, 15, 23, 0.34),
    inset 0 1px 0 rgba(235, 250, 255, 0.14);
  transition: box-shadow 0.16s ease, background 0.16s ease, filter 0.16s ease;
}

select {
  color-scheme: dark;
}

select option,
select optgroup {
  background-color: #0b1c2d;
  color: #e9f3ff;
}

html[data-theme='light'] select {
  color-scheme: light;
}

html[data-theme='light'] select option,
html[data-theme='light'] select optgroup {
  background-color: #ffffff;
  color: #0e2a3f;
}

html[data-theme='black'] select option,
html[data-theme='black'] select optgroup {
  background-color: #090d12;
  color: #f1f6fb;
}

#customerMapAddressTarget {
  color-scheme: dark;
}

#customerMapAddressTarget option {
  background-color: #0b1c2d !important;
  color: #e9f3ff !important;
}

html[data-theme='light'] #customerMapAddressTarget option {
  background-color: #ffffff !important;
  color: #0e2a3f !important;
}

html[data-theme='black'] #customerMapAddressTarget option {
  background-color: #090d12 !important;
  color: #f1f6fb !important;
}

input:hover,
select:hover,
textarea:hover {
  filter: brightness(1.03);
  box-shadow:
    0 0 0 1px rgba(190, 231, 250, 0.45),
    0 10px 20px rgba(6, 22, 34, 0.38),
    inset 0 1px 0 rgba(238, 251, 255, 0.18);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(85, 193, 192, 0.52),
    0 0 0 5px rgba(85, 193, 192, 0.18),
    0 12px 24px rgba(5, 22, 32, 0.42),
    inset 0 1px 0 rgba(242, 254, 255, 0.2);
  background: linear-gradient(165deg, var(--panel-soft), var(--panel-strong));
}

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

textarea {
  min-height: 84px;
  resize: vertical;
}

input[readonly] {
  cursor: not-allowed;
  color: var(--muted);
  background: linear-gradient(160deg, rgba(11, 22, 35, 0.86), rgba(8, 18, 30, 0.92));
  box-shadow:
    0 0 0 1px rgba(147, 184, 206, 0.24),
    0 6px 14px rgba(4, 14, 21, 0.25),
    inset 0 1px 0 rgba(217, 237, 249, 0.08);
}

input[readonly]:focus-visible {
  border-color: rgba(168, 212, 232, 0.23);
  box-shadow:
    0 0 0 2px rgba(122, 169, 196, 0.28),
    0 8px 18px rgba(4, 15, 23, 0.34),
    inset 0 1px 0 rgba(217, 237, 249, 0.08);
  background: linear-gradient(160deg, rgba(11, 22, 35, 0.86), rgba(8, 18, 30, 0.92));
}

button {
  border: var(--border-thin) solid transparent;
  cursor: pointer;
  font-weight: 700;
  padding: 0.64rem 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
  color: #f3fffa;
  background: linear-gradient(150deg, var(--brand-green), var(--brand-green-strong));
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E");
  box-shadow: 0 10px 20px rgba(10, 86, 66, 0.34), inset 0 1px 0 rgba(228, 253, 245, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button::before {
  content: '';
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--btn-icon) center / contain no-repeat;
  mask: var(--btn-icon) center / contain no-repeat;
}

button:hover:not(:disabled),
button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(10, 86, 66, 0.48), inset 0 1px 0 rgba(235, 255, 247, 0.3);
  filter: brightness(1.03);
}

button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(85, 193, 192, 0.28),
    0 14px 28px rgba(10, 86, 66, 0.48),
    inset 0 1px 0 rgba(235, 255, 247, 0.3);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.alt {
  color: var(--text);
  border-color: rgba(165, 216, 238, 0.26);
  background: linear-gradient(150deg, rgba(102, 196, 255, 0.18), rgba(102, 196, 255, 0.08));
  box-shadow: 0 10px 20px rgba(24, 66, 94, 0.3), inset 0 1px 0 rgba(233, 248, 255, 0.14);
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='6' x2='20' y2='6'/%3E%3Ccircle cx='9' cy='6' r='2'/%3E%3Cline x1='4' y1='12' x2='20' y2='12'/%3E%3Ccircle cx='15' cy='12' r='2'/%3E%3Cline x1='4' y1='18' x2='20' y2='18'/%3E%3Ccircle cx='11' cy='18' r='2'/%3E%3C/svg%3E");
}

button.warn {
  color: #261a06;
  background: linear-gradient(150deg, #f8cc87, #e8ac57);
  box-shadow: 0 10px 20px rgba(121, 80, 14, 0.3), inset 0 1px 0 rgba(255, 244, 226, 0.32);
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4 21 20H3Z'/%3E%3Cline x1='12' y1='10' x2='12' y2='14'/%3E%3Ccircle cx='12' cy='17' r='1'/%3E%3C/svg%3E");
}

button.danger {
  color: #2e0912;
  background: linear-gradient(150deg, #f095a4, #dc667b);
  box-shadow: 0 10px 20px rgba(120, 29, 49, 0.32), inset 0 1px 0 rgba(255, 237, 240, 0.28);
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E");
}

button[type='submit'] {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E");
}

button.nav-button {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5H5v14h5'/%3E%3Cpath d='m14 8 5 4-5 4'/%3E%3Cline x1='19' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
}

button.theme-toggle-btn::before {
  content: none;
}

button.sidebar-toggle {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3Cpolyline points='20 18 14 12 20 6'/%3E%3C/svg%3E");
  border: none;
}

body.sidebar-collapsed button.sidebar-toggle {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3Cpolyline points='4 18 10 12 4 6'/%3E%3C/svg%3E");
}

#calcPriceBtn {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s6-5.4 6-10a6 6 0 1 0-12 0c0 4.6 6 10 6 10z'/%3E%3Ccircle cx='12' cy='11' r='2.2'/%3E%3C/svg%3E");
}

#searchPickupBtn {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'/%3E%3C/svg%3E");
}

#customerUseCurrentLocationBtn {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

#customerUseCurrentLocationBtn::before {
  width: 1rem;
  height: 1rem;
}

#searchDropoffBtn {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E");
}

button[data-track-order] {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-6.2 7-11a7 7 0 1 0-14 0c0 4.8 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

#customerTrackingRefreshBtn {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-2.64-6.36'/%3E%3Cpolyline points='21 3 21 9 15 9'/%3E%3C/svg%3E");
}

#openDriver {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E");
}

button[data-toggle-driver] {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v8'/%3E%3Cpath d='M7.1 6.8a8 8 0 1 0 9.8 0'/%3E%3C/svg%3E");
}

button[data-assign-order] {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h13'/%3E%3Cpath d='m12 7 5 5-5 5'/%3E%3C/svg%3E");
}

button[data-accept-order],
button[data-complete-order] {
  --btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='m8.5 12.2 2.3 2.3 4.7-4.7'/%3E%3C/svg%3E");
}

button[data-decline-order] {
  color: #fff3f3;
  border-color: rgba(255, 154, 154, 0.45);
  background: linear-gradient(150deg, #f25656, #cb1f37);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  margin-bottom: 0.68rem;
}

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

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

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

.field-end {
  display: flex;
  align-items: flex-end;
}

.field-span-full {
  grid-column: 1 / -1;
}

.inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inline > * {
  flex: 1;
}

.topbar-actions {
  align-items: center;
}

.topbar-actions .nav-link {
  border-color: transparent;
}

.topbar-actions > * {
  flex: 0 0 auto;
}

.btn-fit {
  max-width: 135px;
}

.space-sm {
  margin-bottom: 0.7rem;
}

.overview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.overview-actions .nav-link {
  width: 100%;
  justify-content: flex-start;
}

.settings-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
  margin-bottom: 0.8rem;
}

.settings-rich-grid {
  margin-top: 0.8rem;
}

.settings-subcard {
  border: var(--border-thin) solid rgba(145, 192, 218, 0.2);
  border-radius: 14px;
  background: linear-gradient(165deg, var(--surface-soft-a), var(--surface-soft-b));
  padding: 0.8rem;
}

.settings-subcard h3 {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
}

.toggle-list {
  display: grid;
  gap: 0.48rem;
  margin-bottom: 0.68rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.62rem;
  border: var(--border-thin) solid rgba(145, 192, 218, 0.16);
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(14, 31, 47, 0.4), rgba(12, 27, 40, 0.6));
  padding: 0.52rem 0.62rem;
  margin: 0;
}

.toggle-row span {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.35;
}

.toggle-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  border-radius: 5px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.settings-actions > * {
  width: auto;
}

.customer-next-action {
  margin: 0 0 0.72rem;
  line-height: 1.45;
}

:is(
  .topbar,
  .header,
  .card,
  .profile-item,
  .notice-item,
  .order-card,
  .location-help,
  .settings-subcard,
  .toggle-row,
  .profile-hero,
  .modal-panel,
  .map-shell,
  .map-empty,
  .admin-panel-tag,
  .password-strength-track,
  .table-wrap,
  .nav-link,
  button,
  input,
  select,
  textarea,
  .auth-google-btn
) {
  border-width: 0 !important;
  border-color: transparent !important;
}

.customer-chip-row {
  margin-top: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.customer-inline-actions {
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.customer-inline-actions > * {
  width: auto;
  flex: 0 0 auto;
}

.customer-inline-actions > .muted {
  flex: 1 1 auto;
  min-width: 0;
}

.customer-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.62rem;
  margin-bottom: 0.65rem;
}

.customer-filter-actions {
  margin-bottom: 0.72rem;
  gap: 0.55rem;
  align-items: center;
}

.customer-filter-actions > * {
  width: auto;
  flex: 0 0 auto;
}

.customer-filter-actions .muted {
  flex: 1 1 auto;
  min-width: 0;
}

.customer-order-highlight {
  border-color: rgba(145, 232, 223, 0.62);
  box-shadow: 0 0 0 2px rgba(108, 219, 205, 0.24), var(--shadow);
}

.customer-input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

button.customer-inline-btn {
  width: auto;
  min-width: 74px;
  padding: 0.52rem 0.64rem;
}

button.customer-inline-btn::before {
  content: none;
}

.password-strength {
  margin: 0.2rem 0 0.58rem;
  display: grid;
  gap: 0.36rem;
}

.password-strength-track {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  border: var(--border-thin) solid rgba(149, 203, 230, 0.28);
  background: linear-gradient(160deg, rgba(12, 27, 41, 0.72), rgba(10, 22, 34, 0.86));
}

.password-strength-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(150deg, #f18796, #d5536c);
  transition: width 0.2s ease, background 0.2s ease;
}

.password-strength-bar[data-tone='weak'] {
  background: linear-gradient(150deg, #f18796, #d5536c);
}

.password-strength-bar[data-tone='fair'] {
  background: linear-gradient(150deg, #f0b86d, #d18d3d);
}

.password-strength-bar[data-tone='strong'] {
  background: linear-gradient(150deg, #66c4ff, #3f8fd0);
}

.password-strength-bar[data-tone='excellent'] {
  background: linear-gradient(150deg, #5be0bf, #1eb3a5);
}

#adminOverviewOrders,
#driverOverviewActivity {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.22rem;
}

#driver-login-section {
  align-items: start;
}

#driver-updates .notice-list {
  max-height: 460px;
  overflow-y: auto;
  padding-right: 0.22rem;
}

#driver-updates .notice-list::-webkit-scrollbar {
  width: 8px;
}

#driver-updates .notice-list::-webkit-scrollbar-track {
  background: rgba(78, 127, 158, 0.18);
  border-radius: 999px;
}

#driver-updates .notice-list::-webkit-scrollbar-thumb {
  background: rgba(116, 186, 223, 0.58);
  border-radius: 999px;
}

#admin-manage,
#admin-updates {
  align-items: start;
}

#admin-manage > .card,
#admin-updates > .card {
  min-height: 0;
}

#admin-driver-create .table-wrap,
#admin-orders-board .table-wrap,
#admin-notifications .table-wrap {
  max-height: 500px;
  overflow: auto;
}

#admin-driver-create .table-wrap {
  max-height: 460px;
}

#admin-notifications .notice-list {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.22rem;
}

#admin-notifications .notice-list::-webkit-scrollbar {
  width: 8px;
}

#admin-notifications .notice-list::-webkit-scrollbar-track {
  background: rgba(78, 127, 158, 0.18);
  border-radius: 999px;
}

#admin-notifications .notice-list::-webkit-scrollbar-thumb {
  background: rgba(116, 186, 223, 0.58);
  border-radius: 999px;
}

#admin-notifications #admin-revenue {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: var(--border-thin) solid rgba(145, 192, 218, 0.2);
}

#admin-driver-create .table-wrap thead th,
#admin-orders-board .table-wrap thead th,
#admin-notifications .table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--panel-strong);
  backdrop-filter: blur(6px);
}

.admin-panel-tag {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.72rem;
  border-radius: 999px;
  border: var(--border-thin) solid rgba(149, 203, 230, 0.28);
  background: linear-gradient(160deg, var(--surface-soft-a), var(--surface-soft-b));
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.56rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.profile-item {
  border: var(--border-thin) solid rgba(142, 195, 224, 0.2);
  border-radius: 12px;
  background: linear-gradient(162deg, var(--surface-soft-a), var(--surface-soft-b));
  padding: 0.6rem 0.66rem;
  min-height: 68px;
}

.profile-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-value {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.profile-pill.ok {
  color: #b0efd3;
  background: rgba(109, 227, 185, 0.18);
}

.profile-pill.off {
  color: #ffd0d8;
  background: rgba(239, 131, 146, 0.2);
}

.profile-pill:not(.ok):not(.off) {
  color: #cfe8f7;
  background: rgba(102, 196, 255, 0.16);
}

.profile-hero {
  border: var(--border-thin) solid rgba(145, 192, 218, 0.2);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--surface-soft-a), var(--surface-soft-b));
  padding: 0.72rem;
  display: flex;
  gap: 0.72rem;
  align-items: center;
  margin-bottom: 0.72rem;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(91, 224, 191, 0.28), rgba(102, 196, 255, 0.24));
  border: var(--border-thin) solid rgba(145, 192, 218, 0.34);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.profile-hero-copy h3 {
  margin: 0;
  font-size: 1.02rem;
}

.profile-hero-copy p {
  margin: 0.16rem 0 0;
}

.profile-hero-pills {
  margin-top: 0.5rem;
  gap: 0.42rem;
}

.profile-hero-pills > * {
  flex: 0 0 auto;
  width: auto;
}

.profile-kpi-grid {
  margin-bottom: 0.72rem;
}

.profile-rich-grid {
  margin-top: 0.72rem;
}

.profile-rich-grid .notice-list {
  margin: 0;
}

.profile-rich-grid .notice-item {
  cursor: default;
}

.profile-rich-grid .notice-item .msg {
  margin-bottom: 0;
}

.driver-compact .card,
.driver-compact .metric,
.driver-compact .profile-item,
.driver-compact .order-card,
.driver-compact .notice-item,
.driver-compact .settings-subcard {
  border-radius: 10px;
}

.driver-compact .card,
.driver-compact .metric {
  padding: 0.72rem;
}

.driver-compact .order-card {
  padding: 0.72rem;
}

.driver-compact .profile-grid,
.driver-compact .settings-meta-grid {
  gap: 0.44rem;
}

.driver-compact .topbar {
  border-radius: 12px;
}

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

.helper {
  margin-top: 0.55rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.72rem;
  border: var(--border-thin) solid rgba(145, 192, 218, 0.16);
  border-radius: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th,
td {
  padding: 0.58rem 0.54rem;
  border-bottom: var(--border-thin) solid rgba(134, 178, 205, 0.14);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--table-head-text);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  background: var(--table-head-bg);
}

tbody tr:nth-child(even) {
  background: var(--table-row-even);
}

tbody tr:hover {
  background: var(--table-row-hover);
}

.drivers-table {
  min-width: 860px;
}

.drivers-table th:nth-child(1),
.drivers-table td:nth-child(1) {
  min-width: 140px;
  white-space: nowrap;
}

.drivers-table th:nth-child(2),
.drivers-table td:nth-child(2) {
  min-width: 190px;
  white-space: nowrap;
}

.drivers-table th:nth-child(3),
.drivers-table td:nth-child(3) {
  min-width: 145px;
  white-space: nowrap;
}

.drivers-table th:nth-child(4),
.drivers-table td:nth-child(4) {
  min-width: 95px;
  white-space: nowrap;
}

.drivers-table th:nth-child(5),
.drivers-table td:nth-child(5) {
  width: 120px;
  white-space: nowrap;
}

.drivers-table th:nth-child(6),
.drivers-table td:nth-child(6) {
  min-width: 280px;
}

.drivers-table .btn-fit {
  width: 100%;
  min-width: 0;
  max-width: none;
  white-space: nowrap;
}

.drivers-table .driver-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.orders-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.orders-table th:nth-child(1),
.orders-table td:nth-child(1) {
  width: 6%;
  white-space: nowrap;
}

.orders-table th:nth-child(2),
.orders-table td:nth-child(2) {
  width: 13%;
}

.orders-table th:nth-child(3),
.orders-table td:nth-child(3) {
  width: 20%;
}

.orders-table th:nth-child(4),
.orders-table td:nth-child(4) {
  width: 10%;
  white-space: nowrap;
}

.orders-table th:nth-child(5),
.orders-table td:nth-child(5) {
  width: 8%;
  white-space: nowrap;
}

.orders-table th:nth-child(6),
.orders-table td:nth-child(6) {
  width: 11%;
  white-space: normal;
}

.orders-table th:nth-child(7),
.orders-table td:nth-child(7) {
  width: 8%;
}

.orders-table th:nth-child(8),
.orders-table td:nth-child(8) {
  width: 20%;
}

.orders-table td:nth-child(2),
.orders-table td:nth-child(3),
.orders-table td:nth-child(6),
.orders-table td:nth-child(7),
.orders-table td:nth-child(8) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.orders-table .order-actions {
  align-items: stretch;
  flex-direction: row;
  flex-wrap: wrap;
  min-width: 0;
  gap: 0.4rem;
}

.orders-table .order-actions > * {
  width: auto;
  min-width: 0;
}

.orders-table .order-actions > select {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orders-table .order-actions > button {
  flex: 1 1 calc(50% - 0.2rem);
  min-width: 0;
  white-space: nowrap;
  line-height: 1.15;
  padding: 0.46rem 0.5rem;
  font-size: 0.86rem;
}

.orders-table .order-actions > button[data-assign-order] {
  flex-basis: 100%;
}

.orders-table .order-actions.row-actions {
  margin-top: 0.45rem;
  align-items: stretch;
}

.orders-table .order-actions.row-actions > button {
  flex: 1 1 calc(50% - 0.2rem);
  min-width: 0;
}

.orders-table .order-actions > button::before {
  width: 0.72rem;
  height: 0.72rem;
}

.status {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status.pending {
  background: rgba(248, 199, 120, 0.18);
  color: #ffd89a;
}

.status.assigned {
  background: rgba(104, 192, 247, 0.18);
  color: #a7ddff;
}

.status.accepted {
  background: rgba(109, 227, 185, 0.2);
  color: #b0efd3;
}

.status.completed {
  background: rgba(127, 216, 167, 0.19);
  color: #b5edcd;
}

.status.declined {
  background: rgba(242, 86, 86, 0.22);
  color: #ffd6d6;
}

.status.unpaid {
  background: rgba(248, 199, 120, 0.18);
  color: #ffd89a;
}

.status.paid {
  background: rgba(109, 227, 185, 0.2);
  color: #b0efd3;
}

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.58rem;
}

.notice-item {
  background: linear-gradient(155deg, var(--notice-surface-a), var(--notice-surface-b));
  border: var(--border-thin) solid rgba(143, 193, 223, 0.22);
  border-left: var(--border-accent) solid var(--accent-alt);
  border-radius: 11px;
  padding: 0.58rem 0.68rem;
}

.notice-item .title {
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.notice-item .msg {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.22rem;
}

.empty {
  color: var(--muted);
  font-size: 0.87rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 16, 0.74);
  backdrop-filter: blur(3px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 16px;
  border: var(--border-thin) solid var(--line);
  background: linear-gradient(165deg, var(--panel), var(--panel-strong));
  box-shadow: var(--shadow);
  padding: 1rem;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.modal-title {
  margin: 0;
  font-size: 1rem;
}

.modal-close,
.modal-cancel {
  width: auto;
  min-width: 84px;
}

.modal-close::before,
.modal-cancel::before {
  content: none;
}

.modal-actions {
  margin-top: 0.8rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
}

.modal-actions > button {
  width: auto;
  min-width: 112px;
}

.pager {
  margin-top: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.62rem;
  flex-wrap: wrap;
}

.pager-summary {
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.35;
}

.pager-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pager-page {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 86px;
  text-align: center;
}

.pager .pager-btn {
  width: auto;
  min-width: 84px;
  padding: 0.46rem 0.72rem;
}

.pager .pager-btn::before {
  content: none;
}

.order-card {
  border: var(--border-thin) solid rgba(149, 203, 230, 0.28);
  border-radius: 14px;
  background: linear-gradient(165deg, var(--order-surface-a), var(--order-surface-b));
  padding: 0.88rem;
  animation: rise-in 0.45s ease both;
}

.order-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.order-meta {
  margin: 0.3rem 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.map-shell {
  position: relative;
  margin-top: 0.74rem;
  border: var(--border-thin) solid rgba(145, 192, 218, 0.2);
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(14, 27, 40, 0.88), rgba(10, 19, 29, 0.94));
}

.map-fullscreen-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 430;
  width: auto;
  min-width: 0;
  padding: 0.36rem 0.56rem;
  border-radius: 999px;
  border: var(--border-thin) solid rgba(145, 192, 218, 0.4);
  background: rgba(7, 17, 28, 0.86);
  color: #e7f1fb;
  box-shadow: 0 8px 18px rgba(5, 13, 20, 0.45);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.map-fullscreen-btn::before {
  content: none;
}

.map-fullscreen-btn .map-fullscreen-icon {
  width: 0.76rem;
  height: 0.76rem;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.map-fullscreen-btn[data-active='true'] .map-fullscreen-icon {
  border-style: dashed;
}

.map-fullscreen-btn:hover,
.map-fullscreen-btn:focus-visible {
  transform: none;
  filter: brightness(1.05);
  box-shadow: 0 10px 22px rgba(5, 13, 20, 0.54);
}

.map-fullscreen-btn:focus-visible {
  outline: 2px solid rgba(102, 196, 255, 0.58);
  outline-offset: 2px;
}

.map-shell:fullscreen,
.map-shell:-webkit-full-screen,
.map-shell.map-shell-fullscreen {
  width: 100vw;
  height: 100vh;
  margin-top: 0;
  border-radius: 0;
  border-color: rgba(145, 192, 218, 0.42);
}

.map-shell:fullscreen .live-map,
.map-shell:-webkit-full-screen .live-map,
.map-shell.map-shell-fullscreen .live-map {
  height: 100%;
  min-height: 100%;
}

.map-shell:fullscreen .map-empty,
.map-shell:-webkit-full-screen .map-empty,
.map-shell.map-shell-fullscreen .map-empty {
  left: max(0.66rem, env(safe-area-inset-left));
  right: max(0.66rem, env(safe-area-inset-right));
  bottom: max(0.66rem, env(safe-area-inset-bottom));
}

.address-map-shell {
  margin-bottom: 0.72rem;
}

.address-map-shell .live-map {
  height: 420px;
  min-height: 280px;
}

.address-map-shell .map-empty {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 0.5rem 0.66rem 0.66rem;
  background: rgba(8, 17, 25, 0.74);
  border-radius: 9px;
}

.live-map {
  width: 100%;
  height: 360px;
  min-height: 260px;
}

.map-empty {
  position: absolute;
  left: 0.66rem;
  right: 0.66rem;
  bottom: 0.66rem;
  z-index: 420;
  border-radius: 10px;
  border: var(--border-thin) solid rgba(145, 192, 218, 0.22);
  background: rgba(8, 17, 25, 0.82);
  padding: 0.5rem 0.62rem;
  line-height: 1.4;
}

.map-actions .nav-link {
  width: auto;
  white-space: nowrap;
}

.location-help {
  margin-top: 0.62rem;
  border: var(--border-thin) solid rgba(248, 199, 120, 0.34);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(60, 42, 15, 0.48), rgba(42, 30, 11, 0.62));
  padding: 0.68rem 0.74rem;
}

.location-help-title {
  margin: 0 0 0.24rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffdca8;
}

.location-help-reason,
.location-help-steps-title,
.location-help-step {
  margin: 0.2rem 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #f6d9ae;
}

.location-help-steps-title {
  margin-top: 0.36rem;
  font-weight: 700;
}

.map-driver-list {
  margin-top: 0.74rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.map-driver-list .notice-item {
  border-left-color: var(--accent);
}

.driver-map-title {
  display: flex;
  align-items: center;
  gap: 0.44rem;
  flex-wrap: wrap;
}

.driver-color-dot {
  width: 0.66rem;
  height: 0.66rem;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.driver-car-marker {
  background: transparent;
  border: 0;
}

.driver-car-marker svg {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.map-driver-list::-webkit-scrollbar {
  width: 8px;
}

.map-driver-list::-webkit-scrollbar-track {
  background: rgba(78, 127, 158, 0.18);
  border-radius: 999px;
}

.map-driver-list::-webkit-scrollbar-thumb {
  background: rgba(116, 186, 223, 0.58);
  border-radius: 999px;
}

.leaflet-container {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  background: #d8e5f1;
}

.leaflet-popup-content-wrapper {
  border-radius: 11px;
}

.leaflet-popup-content {
  margin: 0.62rem 0.7rem;
  color: #112a3d;
}

.leaflet-popup-content strong {
  display: block;
  margin-bottom: 0.2rem;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  border: var(--border-thin) solid rgba(169, 220, 242, 0.4);
  border-radius: 12px;
  background: linear-gradient(160deg, var(--toast-surface-a), var(--toast-surface-b));
  color: var(--text);
  padding: 0.66rem 0.84rem;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  z-index: 80;
  animation: toast-in 0.28s ease;
}

.toast.toast-success {
  color: #7effb3;
}

.toast.toast-error {
  color: #ff8f9d;
}

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

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

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

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

@keyframes sidebar-link-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

@keyframes sidebar-icon-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes sidebar-icon-pop {
  0% {
    transform: scale(1);
  }

  55% {
    transform: scale(1.16);
  }

  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-nav .sidebar-link,
  .sidebar-icon {
    animation: none !important;
  }

  .app-shell,
  .sidebar,
  .sidebar-link,
  .sidebar-icon {
    transition: none !important;
  }
}

@media (max-width: 1080px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .home-hero-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 820px) {
  .topbar,
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row,
  .form-row-3,
  .form-row-4,
  .form-row-5,
  .inline {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .inline > * {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    align-items: stretch;
  }

  .topbar-actions > .muted {
    width: 100%;
  }

  .page {
    padding-top: 1rem;
  }

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

  .live-map {
    height: 320px;
    min-height: 220px;
  }

  .address-map-shell .live-map {
    height: 340px;
    min-height: 240px;
  }

  .customer-filter-grid {
    grid-template-columns: 1fr;
  }

  .customer-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .customer-filter-actions > * {
    width: 100%;
  }

  .customer-inline-actions > .muted {
    width: 100%;
    flex: 0 0 auto;
  }

  .modal-panel {
    max-height: calc(100vh - 1.3rem);
  }

  .modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .modal-actions > button {
    width: 100%;
    min-width: 0;
  }

  .pager {
    align-items: stretch;
  }

  .pager-controls {
    width: 100%;
  }

  .pager-page {
    flex: 1 1 auto;
    min-width: 0;
  }

  .pager .pager-btn {
    flex: 0 0 auto;
  }

  #driver-updates .notice-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  #admin-notifications .notice-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  #admin-driver-create .table-wrap,
  #admin-orders-board .table-wrap,
  #admin-notifications .table-wrap {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(1280px, 94vw);
    padding-bottom: 1.5rem;
  }

  .card,
  .metric,
  .topbar,
  .header {
    border-radius: 14px;
    padding: 0.85rem;
  }

  .brand h1 {
    font-size: 1.04rem;
  }

  .metric p {
    font-size: 1.18rem;
  }

  .home-actions {
    flex-direction: column;
  }

  .home-actions .nav-link {
    width: 100%;
    min-width: 0;
  }

  .home-metric-grid {
    grid-template-columns: 1fr;
  }

  .live-map {
    height: 280px;
  }

  .address-map-shell .live-map {
    height: 300px;
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .drivers-table,
  .orders-table,
  .revenue-table {
    min-width: 0;
  }

  .drivers-table thead,
  .orders-table thead,
  .revenue-table thead {
    display: none;
  }

  .drivers-table tbody,
  .orders-table tbody,
  .revenue-table tbody {
    display: grid;
    gap: 0.55rem;
    padding: 0.46rem;
  }

  .drivers-table tr,
  .orders-table tr,
  .revenue-table tr {
    display: block;
    border: var(--border-thin) solid var(--line);
    border-radius: 12px;
    padding: 0.6rem 0.62rem;
    background: linear-gradient(165deg, var(--panel-soft), var(--panel-strong));
  }

  .drivers-table td,
  .orders-table td,
  .revenue-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.62rem;
    border-bottom: var(--border-thin) dashed var(--line);
    padding: 0.42rem 0;
    min-width: 0;
    width: auto;
    white-space: normal;
  }

  .drivers-table td:nth-child(n),
  .orders-table td:nth-child(n),
  .revenue-table td:nth-child(n) {
    width: auto;
    min-width: 0;
  }

  .drivers-table td:last-child,
  .orders-table td:last-child,
  .revenue-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .drivers-table td::before,
  .orders-table td::before,
  .revenue-table td::before {
    color: var(--table-head-text);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex: 0 0 6.2rem;
    line-height: 1.3;
  }

  .drivers-table td[colspan],
  .orders-table td[colspan],
  .revenue-table td[colspan] {
    display: block;
    border-bottom: 0;
    padding: 0.1rem 0;
  }

  .drivers-table td[colspan]::before,
  .orders-table td[colspan]::before,
  .revenue-table td[colspan]::before {
    content: none;
  }

  .drivers-table td:nth-child(1)::before { content: 'Name'; }
  .drivers-table td:nth-child(2)::before { content: 'Email'; }
  .drivers-table td:nth-child(3)::before { content: 'Phone'; }
  .drivers-table td:nth-child(4)::before { content: 'Vehicle'; }
  .drivers-table td:nth-child(5)::before { content: 'Status'; }
  .drivers-table td:nth-child(6)::before { content: 'Action'; }

  .orders-table td:nth-child(1)::before { content: 'ID'; }
  .orders-table td:nth-child(2)::before { content: 'Customer'; }
  .orders-table td:nth-child(3)::before { content: 'Route'; }
  .orders-table td:nth-child(4)::before { content: 'Price'; }
  .orders-table td:nth-child(5)::before { content: 'Status'; }
  .orders-table td:nth-child(6)::before { content: 'Payment'; }
  .orders-table td:nth-child(7)::before { content: 'Driver'; }
  .orders-table td:nth-child(8)::before { content: 'Action'; }

  .revenue-table td:nth-child(1)::before { content: 'Driver'; }
  .revenue-table td:nth-child(2)::before { content: 'Completed'; }
  .revenue-table td:nth-child(3)::before { content: 'Revenue'; }

  .drivers-table td:nth-child(6),
  .orders-table td:nth-child(8) {
    flex-direction: column;
    align-items: stretch;
  }

  .drivers-table td:nth-child(6)::before,
  .orders-table td:nth-child(8)::before {
    flex-basis: auto;
  }

  .drivers-table .btn-fit {
    width: 100%;
    min-width: 0;
  }

  .drivers-table .driver-actions {
    grid-template-columns: 1fr;
  }

  .orders-table .order-actions {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .orders-table .order-actions > select,
  .orders-table .order-actions > button {
    width: 100%;
    min-width: 0;
  }

  .pager-controls {
    justify-content: space-between;
  }

  .pager .pager-btn {
    flex: 1 1 0;
    min-width: 0;
  }
}

.app-shell {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  position: relative;
  z-index: 1;
  transition: grid-template-columns var(--sidebar-motion-duration) var(--sidebar-motion-ease), gap var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.app-shell > * {
  min-width: 0;
}

.app-shell .page {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 100vh;
  max-height: 100vh;
  border: 0;
  border-radius: 0 18px 18px 0;
  background: linear-gradient(165deg, var(--sidebar-surface-a), var(--sidebar-surface-b));
  box-shadow: var(--shadow);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  backdrop-filter: blur(10px);
  -ms-overflow-style: none;
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
  transition: padding var(--sidebar-motion-duration) var(--sidebar-motion-ease), gap var(--sidebar-motion-duration) var(--sidebar-motion-ease), border-radius var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.sidebar:hover,
.sidebar:focus-within {
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-scroll-thumb) var(--sidebar-scroll-track);
}

.sidebar::-webkit-scrollbar {
  width: 0;
}

.sidebar:hover::-webkit-scrollbar,
.sidebar:focus-within::-webkit-scrollbar {
  width: 10px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--sidebar-scroll-track);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--sidebar-scroll-thumb);
  border-radius: 999px;
  border: var(--border-strong) solid var(--sidebar-scroll-track);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--sidebar-scroll-thumb-hover);
}

.sidebar::-webkit-scrollbar-corner {
  background: transparent;
}

.sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  position: sticky;
  top: 0;
  z-index: 4;
  padding-bottom: 0.35rem;
  background: linear-gradient(180deg, var(--sidebar-surface-a) 72%, transparent);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.56rem;
  text-decoration: none;
}

.sidebar-brand .brand-chip {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  filter: saturate(2.1) hue-rotate(-18deg) brightness(1.06) contrast(1.09) drop-shadow(0 10px 22px rgba(31, 99, 184, 0.52));
}

.sidebar-brand-copy {
  display: flex;
  align-items: center;
}

.sidebar-brand-copy strong {
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1;
}

.sidebar-brand-copy span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1;
}

.sidebar-wordmark {
  color: #1f63b8;
  text-shadow: 0 0 12px rgba(65, 151, 242, 0.34);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .sidebar-wordmark {
    background: linear-gradient(150deg, #74c4ff 5%, #3994eb 50%, #1f63b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

html[data-theme='dark'] .sidebar-wordmark,
html[data-theme='black'] .sidebar-wordmark {
  text-shadow: none;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  html[data-theme='dark'] .sidebar-wordmark,
  html[data-theme='black'] .sidebar-wordmark {
    background: linear-gradient(150deg, #97d6ff 5%, #59acff 50%, #357dd7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.sidebar-toggle {
  width: auto;
  min-width: 42px;
  padding: 0.5rem 0.62rem;
  font-size: 0.75rem;
  font-weight: 800;
  border-color: transparent;
}

.sidebar-nav {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.sidebar-nav-bottom {
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: var(--border-thin) solid rgba(149, 203, 230, 0.2);
}

.sidebar-nav .sidebar-link:nth-of-type(1) { --nav-order: 0; }
.sidebar-nav .sidebar-link:nth-of-type(2) { --nav-order: 1; }
.sidebar-nav .sidebar-link:nth-of-type(3) { --nav-order: 2; }
.sidebar-nav .sidebar-link:nth-of-type(4) { --nav-order: 3; }
.sidebar-nav .sidebar-link:nth-of-type(5) { --nav-order: 4; }
.sidebar-nav .sidebar-link:nth-of-type(6) { --nav-order: 5; }
.sidebar-nav .sidebar-link:nth-of-type(7) { --nav-order: 6; }
.sidebar-nav .sidebar-link:nth-of-type(8) { --nav-order: 7; }
.sidebar-nav .sidebar-link:nth-of-type(9) { --nav-order: 8; }
.sidebar-nav .sidebar-link:nth-of-type(10) { --nav-order: 9; }
.sidebar-nav .sidebar-link:nth-of-type(11) { --nav-order: 10; }
.sidebar-nav .sidebar-link:nth-of-type(12) { --nav-order: 11; }
.sidebar-nav .sidebar-link:nth-of-type(13) { --nav-order: 12; }
.sidebar-nav .sidebar-link:nth-of-type(14) { --nav-order: 13; }

.sidebar-group-title {
  margin: 0.45rem 0 0.15rem;
  color: var(--group-title);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.sidebar-link {
  text-decoration: none;
  color: var(--text);
  border: 0;
  border-radius: 12px;
  padding: 0.56rem 0.62rem;
  display: flex;
  align-items: center;
  gap: 0.56rem;
  animation: sidebar-link-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(80ms + (var(--nav-order, 0) * 40ms));
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, padding var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  transform: translateX(2px);
  background: var(--sidebar-link-hover);
}

.sidebar-link.is-active {
  background: linear-gradient(150deg, var(--sidebar-link-active-a), var(--sidebar-link-active-b));
}

.sidebar-icon {
  flex: 0 0 auto;
  min-width: 2rem;
  height: 1.7rem;
  border-radius: 999px;
  border: 0;
  background: var(--sidebar-icon-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-icon-text);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  transform-origin: center;
  animation: sidebar-icon-float 2.6s ease-in-out infinite;
  animation-delay: calc(var(--nav-order, 0) * 120ms);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, min-width var(--sidebar-motion-duration) var(--sidebar-motion-ease), height var(--sidebar-motion-duration) var(--sidebar-motion-ease);
}

.sidebar-icon svg {
  width: 0.96rem;
  height: 0.96rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link:focus-visible .sidebar-icon {
  animation: sidebar-icon-pop 0.46s ease-out 1;
}

.sidebar-link.is-active .sidebar-icon {
  box-shadow: 0 0 12px rgba(102, 196, 255, 0.24);
}

.sidebar-label {
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 600;
  min-width: 0;
}

.sidebar-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  padding: 0 0.34rem;
  border: var(--border-thin) solid rgba(161, 214, 238, 0.32);
  background: linear-gradient(155deg, rgba(102, 196, 255, 0.2), rgba(91, 224, 191, 0.2));
  color: var(--text);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-meta-block {
  border-top: var(--border-thin) solid rgba(149, 203, 230, 0.2);
  margin-top: 0.5rem;
  padding-top: 0.62rem;
}

.sidebar-kpi-stack {
  display: grid;
  gap: 0.34rem;
}

.sidebar-kpi {
  border: var(--border-thin) solid rgba(149, 203, 230, 0.22);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(15, 33, 50, 0.68), rgba(11, 26, 40, 0.82));
  padding: 0.5rem 0.56rem;
}

.sidebar-kpi-label {
  display: block;
  color: var(--muted);
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.14rem;
}

.sidebar-kpi-value {
  display: block;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.25;
}

.sidebar-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
  border-top: 0;
  padding-top: 0.75rem;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 82px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
  padding-left: 0.58rem;
  padding-right: 0.58rem;
}

body.sidebar-collapsed .sidebar-top {
  flex-direction: column;
  align-items: center;
}

body.sidebar-collapsed .sidebar-brand .brand-chip {
  width: 36px;
  height: 36px;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
}

body.sidebar-collapsed .sidebar-brand-copy,
body.sidebar-collapsed .sidebar-group-title,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-badge,
body.sidebar-collapsed .sidebar-meta-block,
body.sidebar-collapsed .sidebar-note {
  display: none;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding-left: 0.44rem;
  padding-right: 0.44rem;
}

body.sidebar-collapsed .sidebar-icon {
  min-width: 1.9rem;
}

@media (max-width: 1080px) {
  .app-shell,
  body.sidebar-collapsed .app-shell {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .sidebar,
  body.sidebar-collapsed .sidebar {
    border-radius: 0;
    height: auto;
    max-height: none;
    min-height: auto;
    position: relative;
    top: 0;
    padding: 0.72rem;
    gap: 0.58rem;
  }

  .sidebar-note,
  .sidebar-meta-block,
  body.sidebar-collapsed .sidebar-note {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    gap: 0.44rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-nav-bottom {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .sidebar-group-title,
  body.sidebar-collapsed .sidebar-group-title {
    display: none;
  }

  .sidebar-link {
    flex: 0 0 auto;
    justify-content: flex-start;
    padding: 0.46rem 0.56rem;
    border-radius: 10px;
  }

  .sidebar-icon {
    min-width: 1.72rem;
    height: 1.5rem;
    font-size: 0.62rem;
  }

  body.sidebar-collapsed .sidebar-top {
    flex-direction: row;
    align-items: center;
  }

  body.sidebar-collapsed .sidebar-brand-copy,
  body.sidebar-collapsed .sidebar-nav,
  body.sidebar-collapsed .sidebar-label {
    display: none;
  }
}

@media (max-width: 720px) {
  .app-shell,
  body.sidebar-collapsed .app-shell {
    width: min(1280px, 96vw);
    gap: 0.72rem;
  }

  .sidebar,
  body.sidebar-collapsed .sidebar {
    padding: 0.62rem;
    border-radius: 14px;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .sidebar-link {
    min-height: 44px;
    width: 100%;
  }

  .sidebar-label {
    white-space: normal;
    line-height: 1.2;
  }

  .sidebar-brand-copy span {
    display: none;
  }

  .sidebar-toggle {
    min-width: 38px;
    padding: 0.42rem 0.56rem;
  }

  .sidebar-link {
    font-size: 0.8rem;
  }

  .overview-actions {
    grid-template-columns: 1fr;
  }

  .settings-meta-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-avatar {
    width: 48px;
    height: 48px;
  }

  .settings-subcard {
    padding: 0.72rem;
  }

  body.sidebar-collapsed .sidebar-nav,
  body.sidebar-collapsed .sidebar-label {
    display: none;
  }

  .table-wrap {
    border-radius: 11px;
  }

  th,
  td {
    padding: 0.52rem 0.5rem;
  }
}

@media (max-width: 520px) {
  .page {
    width: min(1280px, 96vw);
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .sidebar-brand-copy strong {
    font-size: 0.82rem;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

.app-splash {
  --splash-blue: #1d5fa7;
  --splash-blue-strong: #174d87;
  --splash-blue-soft: rgba(29, 95, 167, 0.35);
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(560px 240px at 50% 28%, var(--splash-blue-soft), transparent 68%),
    linear-gradient(180deg, #061220, #091a2d);
  transition: opacity 0.36s ease, visibility 0.36s ease;
}

html[data-theme='light'] .app-splash {
  --splash-blue: #1d5fa7;
  --splash-blue-strong: #174d87;
  --splash-blue-soft: rgba(29, 95, 167, 0.26);
  background:
    radial-gradient(560px 240px at 50% 28%, var(--splash-blue-soft), transparent 68%),
    linear-gradient(180deg, #eaf2fc, #dfeaf8);
}

html[data-theme='dark'] .app-splash,
html[data-theme='black'] .app-splash {
  --splash-blue: #4a8fdf;
  --splash-blue-strong: #3677c1;
  --splash-blue-soft: rgba(74, 143, 223, 0.34);
}

.app-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash-card {
  width: min(280px, 100%);
  border: 1px solid rgba(74, 143, 223, 0.3);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(10, 31, 52, 0.96), rgba(8, 25, 43, 0.9));
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.45);
  padding: 1.1rem 1rem 1rem;
  text-align: center;
  backdrop-filter: blur(8px);
}

html[data-theme='light'] .app-splash-card {
  border-color: rgba(29, 95, 167, 0.25);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(239, 247, 255, 0.93));
  box-shadow: 0 18px 34px rgba(13, 55, 95, 0.18);
}

.app-splash-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  display: block;
  margin: 0 auto 0.7rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 18px rgba(74, 143, 223, 0.45);
  filter: saturate(1.05) brightness(1.02);
  animation: splash-pulse 1.4s ease-in-out infinite;
}

.app-splash-title {
  margin: 0;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #e6f1ff;
}

html[data-theme='light'] .app-splash-title {
  color: #133a61;
}

.app-splash-text {
  margin: 0.22rem 0 0;
  color: #9bb4cf;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[data-theme='light'] .app-splash-text {
  color: #5a7591;
}

.app-splash-loader {
  width: 34px;
  height: 34px;
  margin: 0.7rem auto 0.46rem;
  border-radius: 50%;
  border: 2px solid rgba(121, 156, 195, 0.34);
  border-top-color: var(--splash-blue);
  animation: splash-spin 0.95s linear infinite;
}

.app-splash-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.33rem;
}

.app-splash-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--splash-blue);
  opacity: 0.22;
  animation: splash-dot 1s ease-in-out infinite;
}

.app-splash-dots span:nth-child(2) {
  animation-delay: 0.12s;
}

.app-splash-dots span:nth-child(3) {
  animation-delay: 0.24s;
}

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

@keyframes splash-dot {
  0%,
  100% {
    opacity: 0.22;
    transform: translateY(0);
  }

  45% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes splash-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }
}

/* Mobile hamburger — hidden on desktop */
.mobile-menu-btn {
  display: none;
}

/* Logout icon hidden on desktop, shown on mobile */
.logout-icon {
  display: none;
}

/* Theme toggle SVGs — hidden by default, shown by theme mode */
.theme-toggle-sun,
.theme-toggle-moon,
.theme-toggle-dot {
  display: none;
}

.theme-toggle-btn[data-theme-mode='light'] .theme-toggle-sun,
.theme-toggle-btn[data-theme-mode='dark'] .theme-toggle-moon,
.theme-toggle-btn[data-theme-mode='black'] .theme-toggle-dot {
  display: block;
}

/* ===== PWA Mobile Styles ===== */

@media (max-width: 767px) {
  .section-stack {
    scroll-margin-top: 60px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    position: static;
    z-index: auto;
  }

  /* Off-canvas drawer: sidebar slides in from left */
  .app-shell > .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    width: 280px;
    max-width: 85vw;
    border-radius: 0 16px 16px 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  /* Drawer backdrop */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  /* Hamburger button in topbar (mobile only) */
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text, #ccc);
    font-size: 1.1rem;
    line-height: 1;
    border-radius: 6px;
    --btn-icon: none;
  }

  .mobile-menu-btn::before {
    display: none;
  }

  .mobile-menu-btn:hover {
    background: rgba(255,255,255,0.08);
  }

  /* Keep desktop toggle hidden on mobile */
  .sidebar-toggle.alt {
    display: none;
  }

  body.sidebar-collapsed .app-shell > .sidebar {
    width: 280px;
    max-width: 85vw;
  }
  body.sidebar-collapsed .app-shell > .sidebar .sidebar-label {
    display: block;
  }
  body.sidebar-collapsed .app-shell > .sidebar .sidebar-nav {
    display: flex;
  }

  .page {
    padding: 0.5rem 0.2rem;
  }

  .topbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 0.5rem;
    min-height: 44px;
    width: 100%;
    gap: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-surface-b);
    border-radius: 0;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    box-shadow: var(--shadows-header);
  }

  .topbar .brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.25rem;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 55%;
    overflow: hidden;
  }

  .topbar .brand .brand-chip {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .topbar .brand h1 {
    font-size: 0.8rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar .brand p {
    display: none;
  }

  .topbar-actions.inline {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    width: auto;
    margin-left: auto;
    align-items: center;
    flex-shrink: 0;
  }

  .topbar-actions .muted,
  .topbar-actions a.nav-link:not(.bell-link),
  .topbar-actions .bell-link .bell-text,
  .theme-toggle-text,
  .topbar-actions .logout-label {
    display: none !important;
  }

  .topbar-actions .nav-link::before,
  .topbar-actions button::before,
  .topbar-actions form button::before {
    display: none !important;
  }

  .topbar-actions .nav-link,
  .topbar-actions button,
  .topbar-actions form button {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 28px;
    width: auto !important;
    padding: 0 0.15rem;
    font-size: 0;
    border-radius: 6px;
    white-space: nowrap;
  }

  .topbar-actions .logout-icon {
    display: block;
    width: 18px;
    height: 18px;
  }

  .topbar-actions form {
    margin: 0;
    padding: 0;
    display: inline-flex;
    width: auto;
    font-size: 0;
  }

  .bell-link .bell-icon svg {
    width: 18px;
    height: 18px;
  }

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

  .theme-toggle-sun,
  .theme-toggle-moon,
  .theme-toggle-dot {
    display: none;
  }

  .theme-toggle-btn[data-theme-mode='light'] .theme-toggle-sun,
  .theme-toggle-btn[data-theme-mode='dark'] .theme-toggle-moon,
  .theme-toggle-btn[data-theme-mode='black'] .theme-toggle-dot {
    display: block;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 0.75rem;
    border-radius: 14px;
  }

  .card-head h2 {
    font-size: 1rem;
  }

  .card-head p {
    font-size: 0.72rem;
  }

  .section-stack {
    gap: 0.6rem;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0.5rem;
  }

  .field-span-full {
    grid-column: 1;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }

  table {
    font-size: 0.7rem;
  }

  th,
  td {
    padding: 0.4rem 0.35rem;
    white-space: nowrap;
  }

  .overview-metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overview-actions {
    grid-template-columns: 1fr;
  }

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

  .profile-rich-grid {
    grid-template-columns: 1fr;
  }

  .settings-meta-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-avatar {
    width: 44px;
    height: 44px;
  }

  .notice-item {
    padding: 0.6rem;
  }

  .modal-content {
    width: 96vw;
    margin: 2vh auto;
    padding: 1rem;
    border-radius: 18px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.4rem;
  }

  .modal-actions button,
  .modal-actions .nav-link {
    width: 100%;
  }

  .inline {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .topbar-actions.inline {
    flex-wrap: nowrap;
  }

  .customer-inline-actions button {
    font-size: 0.68rem;
    padding: 0.25rem 0.45rem;
  }

  .driver-status-group {
    flex-direction: column;
  }

  .dispatch-card {
    padding: 0.7rem;
  }

  .dispatch-map-wrap {
    height: 200px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .pager {
    font-size: 0.72rem;
    gap: 0.3rem;
  }
}

@media (max-width: 480px) {
  .overview-metric-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-actions {
    flex-direction: column;
  }

  .home-actions .nav-link {
    width: 100%;
    min-width: 0;
  }

  .auth-page {
    width: calc(100% - 20px) !important;
    padding: 6px 0 22px !important;
  }

  .auth-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-submit-btn,
  .auth-google-btn {
    width: 100%;
  }

  .auth-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-brand-copy span {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .sidebar-link,
  button,
  .nav-link,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .sidebar-link {
    padding: 0.5rem 0.56rem;
  }

  button,
  .nav-link {
    padding: 0.5rem 0.8rem;
  }

  input,
  select,
  textarea {
    padding: 0.6rem 0.7rem;
  }
}
