:root {
  color-scheme: dark;
  --bg: #101214;
  --panel: #181c20;
  --panel-2: #20262b;
  --line: #343c44;
  --text: #f6f7f4;
  --muted: #aeb8bd;
  --accent: #2dd4bf;
  --accent-2: #f45d48;
  --focus: #f7c948;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

.mini-link {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.mini-link:hover { color: var(--text); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: #0d0f11;
}

.brand, nav, .actions, .admin-head, .metrics {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #06110f;
}

nav { gap: 16px; color: var(--muted); }
nav a { text-decoration: none; }
nav a:hover { color: var(--text); }

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 0.98; letter-spacing: 0; }
h2 { margin-bottom: 16px; font-size: 1.35rem; letter-spacing: 0; }

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lede { max-width: 740px; color: var(--muted); font-size: 1.1rem; }
.muted { color: var(--muted); }

.panel, .track-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

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

.form-grid h2, .span-2 { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1215;
  color: var(--text);
  padding: 9px 11px;
  font: inherit;
}

textarea { resize: vertical; }

button, .button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent-2), white 18%);
  border-radius: 8px;
  background: var(--accent-2);
  color: white;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover, .button:hover { filter: brightness(1.05); }

.danger-button {
  border-color: #ff4d5f;
  background: #c92f42;
}

.track-form {
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.tabs {
  margin-bottom: 16px;
  justify-content: flex-start;
}

.tabs a.active {
  color: #fff;
  font-weight: 900;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics article,
.metrics .metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 16px;
}

.metrics .metric-card {
  color: inherit;
  text-decoration: none;
}

.metrics .metric-card:hover {
  border-color: var(--accent);
}

.metrics article.metric-green {
  background: linear-gradient(135deg, #0f766e, #134e4a);
}

.metrics strong {
  display: block;
  font-size: 2rem;
}

.metrics span, small, dd { color: var(--muted); }

.notification-list {
  display: grid;
  gap: 12px;
}

.notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151a1f;
  padding: 16px;
}

.notification-card.is-unread {
  border-color: rgba(45, 212, 191, 0.65);
}

.notification-card h2 {
  margin: 8px 0;
  font-size: 1.15rem;
}

.notification-card p {
  margin: 0 0 8px;
  color: #d7e0ea;
}

.notification-card a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notification-actions {
  min-width: 110px;
  text-align: right;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.revenue-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.revenue-mini-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11161a;
  padding: 12px;
}

.revenue-mini-metrics span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.service-hours-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-hours-table {
  display: grid;
  gap: 8px;
}

.service-hours-head,
.service-hours-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 120px 130px 130px;
  gap: 10px;
  align-items: center;
}

.service-hours-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.service-hours-row {
  border: 1px solid #313941;
  border-radius: 8px;
  background: #121619;
  padding: 10px;
}

.compact-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
}

.compact-check input {
  width: 20px;
  min-height: 20px;
  accent-color: #20e0ca;
}

.notice-form,
.notice-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.notice-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.notice-editor {
  display: grid;
  gap: 12px;
  border: 1px solid #313941;
  border-radius: 8px;
  background: #121619;
  padding: 16px;
}

.notice-editor form:last-child {
  justify-self: start;
}

.block-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  min-height: 260px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.block-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-width: 0;
  height: 240px;
}

.block-bar span {
  align-self: end;
  display: block;
  min-height: 8px;
  border: 1px solid color-mix(in srgb, var(--accent), white 8%);
  border-radius: 5px 5px 2px 2px;
  background:
    repeating-linear-gradient(
      to top,
      rgba(255, 255, 255, 0.1) 0 8px,
      rgba(255, 255, 255, 0) 8px 16px
    ),
    linear-gradient(180deg, #38bdf8, #0f766e);
}

.block-bar small {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-panel table {
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; }

.status {
  display: inline-flex;
  border-radius: 999px;
  background: #26323a;
  padding: 3px 9px;
  color: var(--accent);
  font-weight: 800;
}

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

dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd { margin: 0; overflow-wrap: anywhere; }

.actions { gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.inline-form { display: inline-flex; margin: 0; }
.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.error { color: #ffb0a4; font-weight: 800; }
.auth { max-width: 420px; margin: 6vh auto 0; }

@media (max-width: 760px) {
  .topbar, .admin-head { align-items: flex-start; flex-direction: column; }
  .hero,
  .form-grid,
  .metrics,
  .details,
  .admin-dashboard-grid,
  .revenue-mini-metrics,
  .notice-form,
  .notice-edit-form {
    grid-template-columns: 1fr;
  }
  .span-2, .form-grid h2 { grid-column: auto; }
  .customer-notice { display: grid; }
  table { display: block; overflow-x: auto; }
  .block-chart { gap: 5px; }
  .block-bar { height: 180px; }
}

/* Customer portal */
.auth-body,
.portal-body {
  min-height: 100vh;
  background: #0b0b12;
}

.auth-body {
  --auth-brand-width: clamp(420px, 38vw, 720px);
  height: 100vh;
  overflow: hidden;
  display: block;
}

.auth-brand-panel {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--auth-brand-width);
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-content: start;
  justify-items: center;
  height: 100vh;
  padding: clamp(24px, 5.5vh, 54px) 48px 48px;
  background:
    radial-gradient(circle at 50% 20%, rgba(22, 104, 211, 0.24), transparent 34%),
    linear-gradient(135deg, #00050c, #061527 46%, #02050b),
    url("/assets/hero-tuning-garage.png") center/cover;
  text-align: center;
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  position: absolute;
  inset: -60% 0 0;
  pointer-events: none;
}

.auth-brand-panel::before {
  z-index: 0;
  content:
    "L C 0 1 1 0 1 0 1 1 0 0 1 0 1 1 L A I R D C A L 0 1 1 0 1 0\A"
    "0 1 0 1 L C 1 0 0 1 1 0 1 0 1 0 C A L 1 0 1 1 0 0 1 0 1\A"
    "1 1 0 0 1 0 L A I R D C A L 0 1 1 0 1 0 0 1 L C 1 0 1 0\A"
    "0 0 1 1 0 1 0 L C 1 0 1 1 0 0 1 0 1 1 0 1 0 C A L 0 1\A"
    "L C 0 1 1 0 1 0 1 1 0 0 1 0 1 1 L A I R D C A L 0 1 1 0\A"
    "0 1 0 1 L C 1 0 0 1 1 0 1 0 1 0 C A L 1 0 1 1 0 0 1 0 1\A"
    "1 1 0 0 1 0 L A I R D C A L 0 1 1 0 1 0 0 1 L C 1 0 1 0\A"
    "0 0 1 1 0 1 0 L C 1 0 1 1 0 0 1 0 1 1 0 1 0 C A L 0 1";
  width: 140%;
  color: rgba(42, 144, 255, 0.34);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.9rem, 1.35vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.46rem;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
  opacity: 0.9;
  text-shadow:
    42px 0 rgba(71, 184, 255, 0.16),
    84px 0 rgba(7, 72, 165, 0.32),
    168px 0 rgba(28, 116, 220, 0.22),
    252px 0 rgba(101, 210, 255, 0.16),
    336px 0 rgba(10, 79, 186, 0.3);
  animation: matrix-rain 11s linear infinite;
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 76%, transparent);
}

.auth-brand-panel::after {
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.4), transparent 48%, rgba(0, 0, 0, 0.46)),
    linear-gradient(to bottom, rgba(0, 5, 12, 0.1), rgba(0, 3, 8, 0.28)),
    repeating-linear-gradient(
      to bottom,
      rgba(78, 168, 255, 0.12) 0,
      rgba(78, 168, 255, 0.12) 1px,
      transparent 1px,
      transparent 7px
    );
}

.auth-brand-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  width: min(470px, 100%);
  margin-top: 0;
}

.auth-brand-panel h1,
.auth-brand-panel p,
.auth-logo {
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.72);
}

@keyframes matrix-rain {
  from { transform: translateY(-22%); }
  to { transform: translateY(18%); }
}

.portal-logo {
  display: grid;
  place-items: center;
  border: 6px solid #fff;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.auth-logo {
  width: min(210px, 56%);
  height: 126px;
  margin-bottom: 18px;
}

.auth-homepage-logo {
  background-image: url("/static/assets/lairdcal-logo-icon-transparent-v2.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.5));
}

.auth-brand-panel h1 {
  max-width: 420px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.auth-brand-panel p {
  max-width: 360px;
  color: #c6c4d2;
}

.auth-panel {
  display: grid;
  height: 100vh;
  margin-left: var(--auth-brand-width);
  overflow-y: auto;
  align-content: start;
  justify-items: center;
  padding: clamp(44px, 8vh, 88px) 24px 64px;
}

.auth-card {
  display: grid;
  width: min(450px, 100%);
  gap: 20px;
}

.signup-body .auth-brand-panel {
  height: 100vh;
  align-content: start;
  padding: clamp(24px, 5.5vh, 54px) 48px 48px;
}

.signup-body .auth-logo {
  width: min(210px, 56%);
  height: 126px;
  margin-bottom: 18px;
}

.signup-panel {
  height: 100vh;
  align-content: start;
  padding: clamp(44px, 8vh, 88px) 24px 64px;
}

.signup-card {
  width: min(450px, 100%);
  gap: 18px;
  border: 0;
  background: transparent;
  padding: 0;
}

.signup-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  border-top: 1px solid #2b3142;
  padding-top: 18px;
}

.signup-section.single {
  grid-template-columns: 1fr;
}

.signup-section h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #fff;
  font-size: 1rem;
}

.signup-section .span-2 {
  grid-column: auto;
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-heading h2 {
  margin-bottom: 4px;
  font-size: 1.8rem;
}

.auth-heading p {
  color: #c1c2ce;
  font-weight: 700;
}

.auth-heading a,
.portal-table a {
  color: #2f98ff;
  font-weight: 800;
  text-decoration: none;
}

.notice {
  border-radius: 8px;
  padding: 12px 14px;
  background: #1b2f31;
  color: #79f2e4;
}

.status-card {
  width: min(620px, 100%);
  border: 1px solid #30374b;
  border-radius: 8px;
  background: #171a23;
  padding: 28px;
}

.portal-body {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
}

.portal-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background: #1f1d2f;
  border-right: 1px solid #242235;
}

.portal-logo {
  width: 72px;
  height: 72px;
  margin: 28px auto;
  font-size: 1.5rem;
  text-decoration: none;
}

.portal-nav {
  display: grid;
  gap: 0;
}

.portal-nav a {
  display: grid;
  min-height: 88px;
  place-items: center;
  gap: 8px;
  padding: 12px;
  color: #c8c5df;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.portal-nav a.active,
.portal-nav a:hover {
  background: #191827;
  color: #fff;
}

.nav-icon {
  color: #2f98ff;
  font-size: 1.35rem;
  line-height: 1;
}

.portal-main {
  min-width: 0;
  background: #0d0d15;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: #020202;
  border-bottom: 1px solid #151520;
}

.portal-title,
.portal-user,
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-title span,
.portal-user span {
  color: #a9a9b7;
}

.service-pill,
.credit-pill {
  border-radius: 6px;
  padding: 6px 10px;
  background: #fb4d68;
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.service-pill.online {
  background: #08796f;
}

.service-pill.offline {
  background: #fb4d68;
}

.credit-pill {
  background: #1680e5;
  text-transform: none;
  text-decoration: none;
}

.icon-button {
  min-width: 38px;
  border: 0;
  background: transparent;
  color: #fb4d68;
  font-size: 1.4rem;
}

.user-chip {
  text-decoration: none;
}

.user-chip strong {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #08796f;
}

.portal-content {
  width: min(1290px, calc(100vw - 192px));
  margin: 0 auto;
  padding: 24px 24px 44px;
}

.portal-footer {
  padding: 22px 28px;
  background: #020202;
  color: #b9c2d6;
  font-size: 0.82rem;
}

.panel-flat {
  border-radius: 6px;
  background: #20232d;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  padding: 28px;
}

.portal-alert {
  margin: 0 auto 14px;
  border-radius: 6px;
  background: #fb4d68;
  padding: 13px 18px;
  color: #fff;
  font-weight: 800;
}

.service-offline-alert {
  margin-bottom: 24px;
}

.customer-notice-board {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

.customer-notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 55%);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(18, 42, 52, 0.96), rgba(19, 28, 36, 0.96));
  padding: 15px 18px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.customer-notice strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 1.05rem;
}

.customer-notice p {
  margin: 0;
  color: #d8f8f4;
  font-weight: 650;
  line-height: 1.45;
}

.customer-notice small {
  flex: 0 0 auto;
  color: #9fb7c0;
  font-weight: 800;
}

.dashboard-graph {
  display: grid;
  min-height: 385px;
  align-content: space-between;
  margin-bottom: 26px;
}

.dashboard-graph h1,
.panel-flat h1 {
  margin-bottom: 8px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.dashboard-graph p,
.panel-flat p,
.promo-card p,
.pricing-band p {
  margin-bottom: 0;
  color: #c6c9e4;
  font-weight: 650;
}

.tile-icon {
  display: inline-block;
  margin-bottom: 10px;
  color: #2f98ff;
  font-size: 1.8rem;
  font-weight: 900;
}

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

.stat-row article {
  min-height: 82px;
  border-radius: 6px;
  background: #020202;
  padding: 20px 28px;
}

.stat-row article.teal {
  background: #178f86;
}

.stat-row article.blue {
  background: #1082e8;
}

.stat-row span,
.stat-row small {
  display: block;
  font-weight: 800;
}

.stat-row strong {
  margin-right: 6px;
  font-size: 1.35rem;
}

.stat-row small {
  display: inline-flex;
  border-radius: 999px;
  background: #050509;
  padding: 2px 7px;
  font-size: 0.68rem;
}

.pricing-band,
.promo-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  border-radius: 6px;
  background: #178f86;
  padding: 28px;
}

.portal-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.credit-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.credit-pack {
  display: grid;
  align-content: start;
  gap: 12px;
}

.credit-pack strong {
  font-size: 2rem;
}

.unlock-panel {
  margin-top: 18px;
}

.promo-card {
  min-height: 178px;
  align-items: flex-end;
  background: #20232d;
}

.promo-card.purple,
.promo-card.wide {
  background:
    linear-gradient(135deg, rgba(94, 40, 228, 0.92), rgba(104, 48, 230, 0.82)),
    url("/assets/hero-tuning-garage.png") center/cover;
}

.promo-card.wide {
  display: block;
}

.light-button,
.dark-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 850;
  text-decoration: none;
}

.light-button {
  background: #fff;
  color: #20232d;
}

.dark-button {
  background: #2f3445;
  color: #fff;
}

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

.section-head label {
  min-width: min(320px, 100%);
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 18px;
  color: #fff;
}

.table-tools input {
  width: 180px;
}

.portal-table th,
.portal-table td {
  border-color: #151823;
  padding: 16px 12px;
}

.portal-table th {
  color: #fff;
  font-size: 0.82rem;
  text-transform: none;
}

.portal-table td {
  color: #f5f7ff;
}

.button.small {
  min-height: 38px;
  padding: 0 18px;
  background: #2f98ff;
  border-color: #2f98ff;
  color: #fff;
}

.view-button {
  min-width: 78px;
}

.revision-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.revision-form h2 {
  margin-bottom: 0;
}

.support-thread {
  display: grid;
  gap: 18px;
}

.chat-window {
  display: grid;
  gap: 12px;
}

.chat-message {
  max-width: 78%;
  padding: 14px 16px;
  border: 1px solid #2f374b;
  border-radius: 8px;
  background: #131720;
}

.chat-message.from-admin {
  justify-self: start;
  border-color: rgba(45, 213, 195, 0.38);
  background: rgba(45, 213, 195, 0.1);
}

.chat-message.from-customer {
  justify-self: end;
  border-color: rgba(47, 152, 255, 0.42);
  background: rgba(47, 152, 255, 0.1);
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.chat-message p {
  margin: 0;
  white-space: pre-wrap;
}

.portal-upload {
  display: grid;
  gap: 28px;
}

.select-row,
.choice-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 26px;
}

.drop-zone {
  min-height: 542px;
  place-items: center;
  align-content: center;
  border: 2px solid #3b435c;
  border-radius: 8px;
  background: #15161e;
  color: #8f95a6;
  cursor: pointer;
}

.drop-zone.dragging,
.drop-zone.has-file {
  border-color: #2f98ff;
  background: #171c28;
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.drop-zone strong {
  color: #d7d9e2;
  font-size: 3rem;
}

.drop-zone em {
  max-width: min(420px, 90%);
  margin-top: 10px;
  color: #fff;
  font-style: normal;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: center;
}

.file-scan-warning {
  margin-top: 14px;
  border: 1px solid rgba(255, 196, 87, 0.45);
  border-radius: 6px;
  background: rgba(255, 196, 87, 0.12);
  padding: 13px 15px;
  color: #ffd789;
  font-weight: 800;
  line-height: 1.45;
}

.choice-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.vehicle-manual-toggle {
  width: fit-content;
  margin: 14px 0 0;
}

.vehicle-manual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.choice-row label,
.check-line {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  border: 1px solid #343a50;
  border-radius: 6px;
  background: #20232d;
  padding: 12px 16px;
  color: #fff;
}

.choice-row input[type="radio"],
.check-line input {
  width: 24px;
  min-height: 24px;
  accent-color: #2f98ff;
}

.burble-duration-panel {
  margin: -2px 0 16px;
  border: 1px solid #343a50;
  border-radius: 6px;
  background: #20232d;
  padding: 14px 16px;
}

.burble-duration-header,
.burble-duration-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.burble-duration-header {
  margin-bottom: 10px;
  color: #fff;
  font-weight: 800;
}

.burble-duration-header strong {
  color: #20e0ca;
  font-size: 0.92rem;
}

.burble-duration-panel input[type="range"] {
  width: 100%;
  min-height: 32px;
  accent-color: #2f98ff;
}

.burble-duration-scale {
  color: var(--muted);
  font-size: 0.78rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  border: 1px solid #343a50;
  border-radius: 8px;
  background: #191d26;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  padding: 28px;
}

.modal-card h2 {
  margin: 4px 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.modal-card p {
  color: #d8deef;
}

.modal-check {
  margin: 18px 0 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

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

.modal-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.modal-actions .secondary-button {
  border: 1px solid #3a4155;
  background: #20232d;
  color: #fff;
}

.square-check {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border-radius: 4px;
  background: #2f98ff;
  vertical-align: -2px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
}

.profile-person {
  display: grid;
  gap: 4px;
  margin: 22px 0;
}

.profile-person span {
  color: #bcc1d2;
}

@media (max-width: 980px) {
  .auth-body,
  .portal-body,
  .upload-layout,
  .portal-grid,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 320px;
  }

  .portal-sidebar {
    position: static;
    min-height: auto;
  }

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

  .portal-nav a {
    min-height: 74px;
  }

  .portal-content {
    width: min(100vw - 24px, 100%);
    padding: 18px 0 32px;
  }

  .portal-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .stat-row,
  .select-row,
  .signup-section {
    grid-template-columns: 1fr;
  }

  .signup-section .span-2 {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-brand-panel::before {
    animation: none;
    transform: translateY(0);
  }
}

/* Final auth guard: keeps login/register fields compact while the left panel stays fixed. */
body.auth-body {
  --auth-brand-width: clamp(420px, 38vw, 720px);
  display: block;
  height: 100vh;
  overflow: hidden;
}

body.auth-body .auth-panel {
  justify-items: center;
  margin-left: var(--auth-brand-width);
  overflow-y: auto;
}

body.auth-body .auth-card {
  width: 100%;
  max-width: 450px;
}

body.auth-body .auth-card input,
body.auth-body .auth-card select,
body.auth-body .auth-card textarea {
  max-width: 450px;
}

@media (max-width: 980px) {
  body.auth-body {
    height: auto;
    overflow: auto;
  }

  body.auth-body .auth-brand-panel {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 360px;
    padding: 34px 22px;
  }

  body.auth-body .auth-panel {
    height: auto;
    min-height: auto;
    margin-left: 0;
    overflow: visible;
  }
}
