:root {
  --bg: #071b33;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --text: #0b1830;
  --muted: #526179;
  --border: #d8e4f5;
  --blue: #0b7cff;
  --green: #059669;
  --yellow: #d8a73a;
  --red: #dc2626;
  --gold: #0b7cff;
  --gold-strong: #065fcc;
  --gold-soft: #e8f3ff;
  --ink-dark: #071b33;
  --shadow: 0 22px 65px rgba(7, 27, 51, 0.16);
}

:root[data-theme="dark"] {
  --bg: #060b14;
  --panel: rgba(12, 18, 31, 0.94);
  --panel-strong: #111827;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --border: rgba(148, 163, 184, 0.24);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(11, 124, 255, 0.16), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(2, 191, 255, 0.12), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #eef6ff 52%, #ffffff 100%);
}

:root[data-theme="dark"] body {
  background: radial-gradient(circle at top, #13233a 0%, #060b14 58%, #030712 100%);
}

a {
  color: inherit;
}

input,
textarea,
select,
button {
  font: inherit;
}

button,
a.secondary-btn,
a.ghost-btn,
a.danger-btn {
  cursor: pointer;
}

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

.site-footer {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.auth-card {
  width: min(430px, 100%);
  margin: 7vh auto;
  padding: 28px;
  border: 1px solid rgba(11, 124, 255, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(11, 124, 255, 0.16), transparent 48%);
  box-shadow: 0 28px 85px rgba(7, 27, 51, 0.18);
  backdrop-filter: blur(16px);
}

.login-logo {
  display: block;
  width: 150px;
  max-width: 48%;
  margin: 0 auto 20px;
  filter: drop-shadow(0 18px 24px rgba(11, 124, 255, 0.24));
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-byline {
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.2;
}

h2 {
  margin-bottom: 18px;
  font-size: 22px;
}

.muted,
.topbar p,
.garage-card span,
.request-card span,
.empty {
  color: var(--muted);
}

.form-stack,
.form-grid {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: #fffdf8;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(200, 148, 53, 0.2);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: 18px 22px, 11px 22px;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
}

input[type="color"] {
  width: 84px;
  padding: 5px;
}

.notice-banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(200, 148, 53, 0.3);
  border-radius: 16px;
  color: var(--text);
  background: var(--gold-soft);
  font-weight: 800;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.warning-btn,
.success-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, #d8a73a, #a66f1d);
  box-shadow: 0 16px 34px rgba(166, 111, 29, 0.28);
}

.secondary-btn {
  color: white;
  background: var(--green);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 250, 240, 0.82);
}

.danger-btn {
  color: white;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 16px 34px rgba(153, 27, 27, 0.22);
}

.warning-btn {
  color: #1f1300;
  background: var(--yellow);
}

.success-btn {
  color: #04130a;
  background: var(--green);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.warning-btn:hover,
.success-btn:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(11, 124, 255, 0.22);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

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

.brand-row img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 14px;
  background: white;
  padding: 8px;
}

.brand-row h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.brand-row p {
  margin: 0;
  font-size: 14px;
}

.actions {
  display: flex;
  gap: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stats-grid.compact {
  margin-bottom: 16px;
}

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

.owner-stats-secondary {
  margin-top: -8px;
}

.stat-card {
  display: grid;
  gap: 8px;
  min-height: 110px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 14px 44px rgba(7, 27, 51, 0.09);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  align-self: end;
  color: var(--text);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
  padding: 24px;
  border: 1px solid rgba(216, 167, 58, 0.28);
  border-radius: 24px;
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    radial-gradient(circle at 12% 0%, rgba(216, 167, 58, 0.34), transparent 36%),
    radial-gradient(circle at 90% 18%, rgba(200, 148, 53, 0.25), transparent 38%),
    #17120a;
  box-shadow: 0 28px 75px rgba(64, 42, 11, 0.22);
}

.admin-hero h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 46px);
}

.admin-hero p:not(.eyebrow) {
  margin: 0;
  max-width: 680px;
  color: #cbd5e1;
  line-height: 1.8;
  font-weight: 700;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-metrics span {
  display: grid;
  gap: 4px;
  min-height: 82px;
  place-items: center;
  padding: 10px;
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.5);
  font-size: 12px;
  font-weight: 800;
}

.hero-metrics b {
  color: #ffd982;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

.admin-tabs {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid rgba(200, 148, 53, 0.32);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.88);
  box-shadow: 0 18px 45px rgba(75, 52, 14, 0.1);
  backdrop-filter: blur(18px);
}

.admin-tabs a {
  min-height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.admin-tabs a:hover {
  color: var(--text);
  background: #fff4d6;
}

.admin-tabs a.active {
  color: white;
  background: linear-gradient(135deg, #d8a73a, #a66f1d);
  box-shadow: 0 14px 30px rgba(166, 111, 29, 0.25);
}

.admin-tab-shell {
  display: block;
}

.tab-panel {
  display: none;
  gap: 18px;
}

.tab-panel.active {
  display: grid;
}

.tab-panel > .panel + .panel {
  margin-top: 0;
}

.qr-admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.qr-admin-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fffaf0;
}

.qr-admin-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

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

.rule-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffaf0;
}

.rule-list strong {
  color: var(--text);
}

.rule-list span {
  color: var(--muted);
  font-weight: 800;
}

.diagnostic-list span {
  direction: ltr;
  max-width: min(720px, 100%);
  overflow-wrap: anywhere;
  text-align: left;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.table-wrap th {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.table-wrap td {
  padding: 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fffaf0;
  color: var(--text);
  font-weight: 800;
}

.table-wrap td:first-child {
  border-right: 1px solid var(--border);
  border-radius: 0 16px 16px 0;
}

.table-wrap td:last-child {
  border-left: 1px solid var(--border);
  border-radius: 16px 0 0 16px;
}

.table-wrap td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  padding: 22px;
  border: 1px solid rgba(200, 148, 53, 0.26);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel > .muted {
  margin-top: -8px;
  margin-bottom: 16px;
  line-height: 1.7;
  font-weight: 700;
}

.wide {
  min-width: 0;
  grid-column: 1 / -1;
}

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

.date-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-filter input {
  min-width: 170px;
}

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

.garage-layout {
  display: grid;
  gap: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head h2,
.section-head p {
  margin-bottom: 0;
}

.cards,
.request-list {
  display: grid;
  gap: 12px;
}

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.mini-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffaf0;
}

.mini-list span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

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

.account-edit {
  flex-basis: 100%;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.account-edit summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.compact-form {
  margin-top: 10px;
}

.delete-form {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

.danger-panel {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(180deg, #fff7ed, #fff);
}

.garage-card,
.request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffaf0;
}

.inline-fee-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-fee-form label {
  min-width: 160px;
}

.garage-card div,
.request-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.garage-card strong,
.garage-card span,
.request-card b,
.request-card span {
  overflow-wrap: anywhere;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(200, 148, 53, 0.12);
}

.metric-row strong {
  font-size: 34px;
  color: var(--gold-strong);
}

.request-card.requested {
  border-color: rgba(239, 68, 68, 0.65);
}

.request-card.waiting {
  border-color: rgba(250, 204, 21, 0.65);
}

.request-card.ready {
  border-color: rgba(34, 197, 94, 0.65);
}

.request-card.closed {
  border-color: rgba(148, 163, 184, 0.48);
  opacity: 0.72;
}

.timer-line {
  font-size: 12px;
}

.timer-line b {
  color: var(--text);
}

.timer-line.is-overdue,
.customer-metrics span.is-overdue {
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.38);
  background: #fff1f2;
}

.timer-line.is-overdue b,
.customer-metrics span.is-overdue b {
  color: #dc2626;
}

.amount-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(5, 150, 105, 0.1);
  white-space: nowrap;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.qr-ticket {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px;
  border: 2px solid var(--garage-color, var(--gold));
  border-radius: 20px;
  color: #0f172a;
  background: white;
  box-shadow: 0 16px 36px rgba(7, 27, 51, 0.08);
  text-align: center;
  page-break-inside: avoid;
}

.qr-ticket > img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.qr-ticket h2 {
  margin: 0;
  font-size: 18px;
}

.qr-box {
  width: 192px;
  min-height: 192px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid #d7dde8;
  border-radius: 18px;
}

.qr-box svg {
  width: 170px;
  height: 170px;
  display: block;
}

.qr-ticket a {
  max-width: 100%;
  color: var(--gold-strong);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.customer-page,
body:has(.customer-screen) {
  min-height: 100dvh;
  overflow: hidden;
}

.customer-page .page-shell,
.page-shell:has(.customer-screen) {
  width: 100%;
  min-height: 100dvh;
  padding: max(8px, env(safe-area-inset-top)) 12px max(8px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
}

.customer-page .site-footer,
body:has(.customer-screen) .site-footer {
  display: none;
}

.customer-screen {
  width: min(390px, 100%);
  height: min(760px, calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))));
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(5px, 0.72dvh, 8px);
  padding: clamp(12px, 1.65dvh, 18px);
  border: 1px solid rgba(216, 228, 245, 0.92);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,251,255,0.9)),
    radial-gradient(circle at 50% -8%, color-mix(in srgb, var(--garage-color, #0b7cff), transparent 72%), transparent 44%),
    radial-gradient(circle at 50% 76%, rgba(11, 124, 255, 0.1), transparent 34%);
  box-shadow: 0 30px 90px rgba(7, 27, 51, 0.18);
  text-align: center;
  backdrop-filter: blur(18px);
  overflow: hidden;
}

:root[data-theme="dark"] .customer-screen {
  border-color: rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.94)),
    radial-gradient(circle at 50% -8%, color-mix(in srgb, var(--garage-color, #0b7cff), transparent 60%), transparent 46%),
    radial-gradient(circle at 50% 76%, rgba(216, 167, 58, 0.12), transparent 34%);
}

.customer-tools {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

.customer-tools button {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(210, 181, 116, 0.48);
  border-radius: 999px;
  color: #10203a;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 240, 226, 0.82));
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font-size: 0;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.customer-tools button:active {
  transform: scale(0.96);
}

:root[data-theme="dark"] .customer-tools button {
  color: #ffdd85;
  background: linear-gradient(145deg, rgba(35, 31, 24, 0.95), rgba(15, 23, 42, 0.9));
  border-color: rgba(255, 219, 139, 0.38);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.customer-tools button::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
}

.customer-tools button:has(svg)::before {
  display: none;
}

.customer-icon-btn::before {
  display: none !important;
}

.customer-tools [data-lang-toggle]::before {
  content: "ع";
  color: currentColor;
  font-size: 20px;
  font-weight: 900;
  line-height: 22px;
}

.customer-tools [data-theme-toggle]::before {
  border-radius: 50%;
  box-shadow: inset -7px -4px 0 0 currentColor;
}

:root[data-theme="dark"] .customer-tools [data-theme-toggle]::before {
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    0 -9px 0 -7px currentColor,
    0 9px 0 -7px currentColor,
    9px 0 0 -7px currentColor,
    -9px 0 0 -7px currentColor,
    6px 6px 0 -7px currentColor,
    -6px -6px 0 -7px currentColor,
    6px -6px 0 -7px currentColor,
    -6px 6px 0 -7px currentColor;
}

.customer-icon-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.1));
}

.theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.customer-logo {
  order: 2;
  width: clamp(104px, 13dvh, 132px);
  height: clamp(52px, 7.5dvh, 78px);
  display: block;
  justify-self: center;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 16px 24px rgba(15, 23, 42, 0.13));
}

.customer-screen .eyebrow {
  order: 3;
  margin: 0;
  font-size: clamp(11px, 1.35dvh, 13px);
  font-weight: 900;
}

.customer-screen .brand-byline {
  order: 4;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: clamp(10px, 1.18dvh, 12px);
  font-weight: 900;
}

.customer-screen h1 {
  order: 5;
  margin: clamp(8px, 1.25dvh, 14px) 0 clamp(5px, 0.75dvh, 8px);
  font-size: clamp(26px, 3.6dvh, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

.customer-screen h2 {
  order: 8;
  margin: 0;
  font-size: clamp(24px, 3.25dvh, 31px);
  line-height: 1.1;
  letter-spacing: 0;
}

.space-number {
  order: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  margin-top: -2px;
  margin-bottom: -1px;
  min-height: 36px;
  padding: 6px 18px;
  border-radius: 999px;
  color: #071b33;
  background: linear-gradient(135deg, #f8fbff, #dbeafe);
  font-size: clamp(17px, 2.1dvh, 20px);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

:root[data-theme="dark"] .space-number {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(216, 167, 58, 0.95), rgba(161, 98, 7, 0.92));
  box-shadow: 0 12px 28px rgba(216, 167, 58, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.status-orb {
  order: 7;
  width: clamp(74px, 10.8dvh, 96px);
  height: clamp(74px, 10.8dvh, 96px);
  justify-self: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.22), transparent 28%),
    linear-gradient(135deg, #f43f3f, var(--red));
  box-shadow: 0 0 0 clamp(9px, 1.35dvh, 13px) rgba(239, 68, 68, 0.13), 0 16px 38px rgba(239, 68, 68, 0.28);
}

.service-lock {
  order: 7;
  width: clamp(88px, 14svh, 118px);
  height: clamp(88px, 14svh, 118px);
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 36px;
  color: white;
  background: linear-gradient(135deg, #64748b, #111827);
  font-size: clamp(46px, 7svh, 64px);
  font-weight: 900;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.22);
}

.customer-screen.waiting .status-orb,
.customer-screen.requested .status-orb {
  background: var(--yellow);
  box-shadow: 0 0 0 clamp(10px, 1.55dvh, 14px) rgba(250, 204, 21, 0.14), 0 0 38px rgba(250, 204, 21, 0.34);
}

.customer-screen.ready .status-orb {
  background: var(--green);
  box-shadow: 0 0 0 clamp(10px, 1.55dvh, 14px) rgba(34, 197, 94, 0.14), 0 0 38px rgba(34, 197, 94, 0.34);
}

.customer-screen.closed .status-orb {
  background: #64748b;
  box-shadow: 0 0 0 18px rgba(100, 116, 139, 0.14), 0 0 55px rgba(100, 116, 139, 0.32);
}

.customer-metrics {
  order: 11;
  width: 100%;
  display: grid;
  gap: 6px;
}

.customer-metrics span {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
}

:root[data-theme="dark"] .customer-metrics span {
  background: rgba(15, 23, 42, 0.72);
}

.customer-metrics b {
  color: var(--text);
  white-space: nowrap;
}

.customer-metrics em {
  font-style: normal;
}

.is-hidden {
  display: none !important;
}

.request-box {
  order: 9;
  width: 100%;
  margin-top: -2px;
  padding: 5px;
  border: 1px dashed color-mix(in srgb, var(--garage-color, #0b7cff), transparent 56%);
  border-radius: 24px;
}

.request-btn {
  width: 100%;
  min-height: clamp(48px, 6.2dvh, 56px);
  border: 0;
  border-radius: 20px;
  color: white;
  background: linear-gradient(135deg, var(--red), #b91c1c);
  font-size: clamp(16px, 2.1dvh, 19px);
  font-weight: 900;
  box-shadow: 0 20px 42px rgba(239, 68, 68, 0.26);
}

.customer-message {
  order: 10;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  font-size: clamp(13px, 1.55dvh, 15px);
  font-weight: 900;
  line-height: 1.42;
  text-align: center;
}

.customer-message.is-live-note,
.customer-screen.requested .customer-message {
  animation: customerNotePulse 1.15s ease-in-out infinite;
  border: 1px solid rgba(216, 167, 58, 0.34);
  background: rgba(255, 248, 225, 0.86);
}

@keyframes customerNotePulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 10px 24px rgba(216, 167, 58, 0.08);
  }

  50% {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(216, 167, 58, 0.2);
  }
}

:root[data-theme="dark"] .customer-message {
  background: rgba(15, 23, 42, 0.68);
}

:root[data-theme="dark"] .customer-message.is-live-note,
:root[data-theme="dark"] .customer-screen.requested .customer-message {
  color: #fff7df;
  border-color: rgba(255, 219, 139, 0.3);
  background: rgba(78, 55, 18, 0.72);
}

.customer-screen.unavailable .customer-message {
  color: var(--muted);
}

.rating-screen {
  height: min(760px, calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))));
  justify-content: center;
  gap: clamp(6px, 0.9dvh, 10px);
}

.rating-logo {
  order: 1;
  width: clamp(118px, 16dvh, 148px);
  height: clamp(58px, 8.5dvh, 86px);
}

.rating-screen .eyebrow {
  order: 2;
}

.rating-screen .brand-byline {
  order: 3;
}

.rating-screen h1 {
  order: 4;
  margin-top: clamp(6px, 1dvh, 12px);
}

.rating-screen .space-number {
  order: 5;
}

.rating-screen h2 {
  order: 6;
  font-size: clamp(22px, 3dvh, 30px);
}

.rating-note {
  order: 7;
}

.rating-form {
  order: 8;
  width: 100%;
  display: grid;
  gap: 8px;
}

.rating-question {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--garage-color, #0b7cff), transparent 72%);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  text-align: start;
}

:root[data-theme="dark"] .rating-question {
  background: rgba(15, 23, 42, 0.74);
  border-color: rgba(255, 219, 139, 0.25);
}

.rating-question > label {
  color: var(--text);
  font-weight: 900;
  font-size: clamp(13px, 1.55dvh, 15px);
}

.rating-question textarea {
  width: 100%;
  min-height: 58px;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-weight: 800;
}

:root[data-theme="dark"] .rating-question textarea {
  background: rgba(2, 6, 23, 0.55);
}

.rating-stars,
.rating-moods {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  direction: ltr;
}

.rating-moods {
  grid-template-columns: repeat(3, 1fr);
  direction: rtl;
}

.rating-stars label,
.rating-moods label {
  min-height: 44px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(248, 251, 255, 0.9);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.rating-stars input,
.rating-moods input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-stars span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #8a5b06;
  background: #ffe8a3;
  font-size: 15px;
  font-weight: 900;
}

.rating-stars label:has(input:checked),
.rating-moods label:has(input:checked) {
  border-color: rgba(216, 167, 58, 0.92);
  background: rgba(255, 244, 214, 0.95);
  transform: translateY(-1px);
}

.mood-face {
  width: 26px;
  height: 26px;
  position: relative;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe08a, #d49a24);
}

.mood-face::before {
  content: "";
  position: absolute;
  inset: 7px 6px auto;
  height: 4px;
  border-radius: 99px;
  background:
    radial-gradient(circle at 25% 50%, #14213d 0 2px, transparent 2.5px),
    radial-gradient(circle at 75% 50%, #14213d 0 2px, transparent 2.5px);
}

.mood-face::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  height: 6px;
  border-bottom: 3px solid #14213d;
  border-radius: 0 0 99px 99px;
}

.rating-moods b {
  font-size: 11px;
  white-space: nowrap;
}

.rating-submit {
  margin-top: 2px;
  background: linear-gradient(135deg, #d8a73a, #b7791f);
  box-shadow: 0 18px 38px rgba(216, 167, 58, 0.28);
}

.rating-thanks {
  min-height: 520px;
}

@media (max-height: 680px) {
  .customer-screen {
    min-height: 0;
    gap: 6px;
    padding: 10px;
    border-radius: 26px;
  }

  .customer-logo {
    width: 96px;
    height: 68px;
  }

  .customer-screen .brand-byline {
    display: none;
  }

  .status-orb,
  .service-lock {
    width: 82px;
    height: 82px;
  }

  .customer-metrics span {
    min-height: 38px;
    padding-block: 6px;
  }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 900;
  background: #fff4d6;
  color: var(--gold-strong);
}

.status-pill.ok {
  color: #047857;
  background: #dcfce7;
}

.status-pill.danger {
  color: #b91c1c;
  background: #fee2e2;
}

.garage-edit {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.garage-edit summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.check-field input {
  width: 18px;
  height: 18px;
}

@media (max-width: 820px) {
  .dashboard-grid,
  .form-grid,
  .stats-grid,
  .admin-hero {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    padding: 18px;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    overflow-x: auto;
  }

  .topbar,
  .garage-card,
  .request-card,
  .report-card,
  .rule-list div {
    grid-template-columns: 1fr;
  }

  .topbar,
  .brand-row,
  .actions {
    align-items: stretch;
  }

  .topbar {
    flex-direction: column;
  }

  .inline-actions {
    display: grid;
  }

  .date-filter {
    display: grid;
  }

  .admin-tabs {
    top: 0;
    border-radius: 0 0 18px 18px;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  html,
  body {
    width: auto;
    min-height: auto;
    background: white;
    overflow: visible !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .page-shell {
    max-width: none;
    width: 100%;
    min-height: auto;
    padding: 0 !important;
    margin: 0;
  }

  .print-hide,
  .site-footer {
    display: none !important;
  }

  .qr-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 58mm);
    gap: 7mm 6mm;
    justify-content: center;
    align-items: start;
  }

  .qr-ticket {
    width: 58mm;
    height: 60mm;
    min-height: 60mm;
    padding: 4mm 3mm 3mm;
    gap: 2mm;
    border: 1.4pt solid #111827;
    border-radius: 4mm;
    box-shadow: none;
    background: #fff;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .qr-ticket > img,
  .qr-ticket h2,
  .qr-ticket .qr-url {
    display: none !important;
  }

  .qr-box {
    width: 45mm;
    height: 45mm;
    min-height: 45mm;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .qr-box svg {
    width: 45mm !important;
    height: 45mm !important;
  }

  .qr-number {
    display: block;
    margin: 0;
    color: #111827;
    font-size: 12pt;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
  }
}
