:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #18202a;
  --muted: #687384;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --danger: #b42318;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
  --header-font: "Arial Rounded MT Bold", "Trebuchet MS", "Arial Black", Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  color: var(--text);
  background: #05070d;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  overflow-x: hidden;
}
.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #05070d url("/assets/background-poster.jpg") center / cover no-repeat;
}
#app {
  position: relative;
  z-index: 1;
}
.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}
.shell::before,
.shell::after {
  display: none;
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 0% 82%, rgba(255,255,255,.24), transparent 22%),
    radial-gradient(ellipse at 18% 92%, rgba(226,232,240,.18), transparent 24%),
    radial-gradient(ellipse at 100% 78%, rgba(255,255,255,.22), transparent 22%),
    radial-gradient(ellipse at 82% 96%, rgba(148,163,184,.16), transparent 26%),
    radial-gradient(ellipse at 50% 105%, rgba(255,255,255,.13), transparent 30%);
  filter: blur(22px);
  opacity: .95;
  animation: smokeFromEdges 18s ease-in-out infinite alternate;
}
.shell::after {
  background:
    radial-gradient(ellipse at 7% 72%, rgba(255,255,255,.28), transparent 18%),
    radial-gradient(ellipse at 95% 88%, rgba(255,255,255,.3), transparent 20%),
    radial-gradient(ellipse at 38% 100%, rgba(203,213,225,.22), transparent 28%);
  opacity: .72;
  filter: blur(34px);
  animation-name: smokeFromEdges2;
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}
@keyframes smokeFromEdges {
  0% { transform: translate3d(-7%, 6%, 0) scale(1.02); opacity: .56; }
  45% { transform: translate3d(2%, 0, 0) scale(1.08); opacity: .82; }
  100% { transform: translate3d(7%, -5%, 0) scale(1.14); opacity: .66; }
}
@keyframes smokeFromEdges2 {
  0% { transform: translate3d(8%, 7%, 0) scale(1); opacity: .34; }
  52% { transform: translate3d(-2%, 1%, 0) scale(1.1); opacity: .58; }
  100% { transform: translate3d(-8%, -6%, 0) scale(1.18); opacity: .44; }
}

html[dir="ltr"] body { direction: ltr; }
html[dir="rtl"] body { direction: rtl; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.secondary { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
button.bluetooth-button {
  color: #fff;
  border-color: #2563eb;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
}
button.danger { color: var(--danger); }
button:disabled { opacity: .55; cursor: not-allowed; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    radial-gradient(circle at 0 0, rgba(255,255,255,.44) 0 1px, transparent 1.55px) 0 0 / 9px 9px,
    linear-gradient(180deg, rgba(2, 6, 23, .82), rgba(0,0,0,.68));
  background-size: 9px 9px, 100% 100%;
  border-bottom: 1px solid rgba(45, 212, 191, .16);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
  overflow: visible;
}
.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.topbar::before {
  background:
    radial-gradient(circle at 0 0, rgba(255,255,255,.22) 0 1px, transparent 1.45px) 3px 2px / 12px 12px;
  opacity: .26;
  filter: blur(.25px);
  animation: headerWave 16s ease-in-out infinite alternate;
}
.topbar::after {
  background:
    linear-gradient(90deg, rgba(0,0,0,.38), transparent 18%, transparent 82%, rgba(0,0,0,.38)),
    linear-gradient(90deg, transparent, rgba(45, 212, 191, .18) 52%, transparent);
  box-shadow: inset 0 0 32px rgba(0,0,0,.42);
}
.main {
  position: relative;
  z-index: 1;
}
.topbar {
  position: sticky;
  z-index: 2000;
}
.nav {
  z-index: 3000;
}
.topbar-inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 66px;
  padding: 8px 20px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: #fff;
  font-family: "Arial Black", Impact, var(--header-font);
  font-weight: 900;
  font-size: 24px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow:
    0 0 3px rgba(255,255,255,.56),
    0 2px 10px rgba(0,0,0,.92);
}
@keyframes headerWave {
  0% { transform: translate3d(-10px, 4px, 0) skewX(-5deg) scale(1.02); opacity: .38; }
  50% { transform: translate3d(8px, -3px, 0) skewX(4deg) scale(1.06); opacity: .56; }
  100% { transform: translate3d(16px, 5px, 0) skewX(-2deg) scale(1.04); opacity: .44; }
}
@keyframes particleWave {
  0% { transform: translate3d(-10px, 4px, 0) skewX(-5deg) scale(1.02); opacity: .38; }
  50% { transform: translate3d(8px, -3px, 0) skewX(4deg) scale(1.06); opacity: .56; }
  100% { transform: translate3d(16px, 5px, 0) skewX(-2deg) scale(1.04); opacity: .44; }
}
@keyframes particleWaveSlow {
  0% { transform: translate3d(14px, -5px, 0) skewY(2deg) scale(1.04); opacity: .32; }
  100% { transform: translate3d(-12px, 6px, 0) skewY(-3deg) scale(1.08); opacity: .58; }
}
@keyframes dotTextPulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 1px rgba(255,255,255,1))
      drop-shadow(0 0 5px rgba(255,255,255,.78))
      drop-shadow(0 0 12px rgba(255,255,255,.36));
    opacity: .96;
  }
  50% {
    filter:
      drop-shadow(0 0 2px rgba(255,255,255,1))
      drop-shadow(0 0 7px rgba(255,255,255,.92))
      drop-shadow(0 0 16px rgba(255,255,255,.48));
    opacity: 1;
  }
}
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: relative; }
.menu-backdrop {
  display: none;
}
.language-select { min-width: 150px; }
.menu-toggle {
  font-family: var(--header-font);
  color: #fff;
  min-width: 74px;
  min-height: 38px;
  border-radius: 10px;
  border-color: rgba(45, 212, 191, .45);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .95), rgba(15,118,110,.72));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.1) inset,
    0 8px 18px rgba(2,6,23,.24),
    0 0 16px rgba(20, 184, 166, .24);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  transform: scaleX(1.08);
}
.menu-toggle:hover {
  transform: translateY(-1px) scaleX(1.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.16) inset,
    0 10px 22px rgba(2,6,23,.26),
    0 0 24px rgba(20, 184, 166, .34);
}
.nav {
  display: grid;
  gap: 6px;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(330px, calc(100vw - 24px));
  padding: 12px;
  z-index: 1000;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, .94), rgba(2, 6, 23, .95)),
    radial-gradient(circle at 12% 0, rgba(45, 212, 191, .22), transparent 34%);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, .46),
    0 0 0 1px rgba(255, 255, 255, .05) inset,
    0 0 28px rgba(20, 184, 166, .16);
  opacity: 0;
  transform: translateY(-10px) scale(.96);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .22s cubic-bezier(.2,.8,.2,1), transform .28s cubic-bezier(.2,.8,.2,1), visibility .22s;
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}
.nav.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  animation: menuSoft .16s ease-out;
}
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 11px 8px 13px;
  border-radius: 9px;
  color: rgba(255, 255, 255, .88);
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(255, 255, 255, .045);
  font-weight: 700;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, color .16s ease;
}
.nav a::before {
  content: "";
  width: 3px;
  height: 18px;
  border-radius: 99px;
  background: transparent;
  position: absolute;
  left: 7px;
}
.nav a.active {
  color: #fff;
  border-color: rgba(45, 212, 191, .58);
  background: linear-gradient(135deg, rgba(15, 118, 110, .34), rgba(37, 99, 235, .15));
}
.nav a.active::before {
  background: #2dd4bf;
  box-shadow: 0 0 12px rgba(45, 212, 191, .72);
}
.nav a:hover {
  color: #fff;
  border-color: rgba(45, 212, 191, .38);
  background: rgba(20, 184, 166, .13);
  transform: translateX(-2px);
}
.menu-footer {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, .18);
}
.badge {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  margin-inline-start: 5px;
  box-shadow: 0 0 12px rgba(239, 68, 68, .45);
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 11px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(6, 24, 95, .88), rgba(15, 118, 110, .72));
  border: 1px solid rgba(62, 231, 255, .52);
  box-shadow:
    0 0 0 1px rgba(77, 125, 255, .16) inset,
    0 0 16px rgba(62, 231, 255, .24);
  text-shadow: 0 0 8px rgba(255, 255, 255, .35);
  white-space: nowrap;
}
.super-admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #04111f;
  background: linear-gradient(135deg, #facc15, #2dd4bf);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: none;
}
.menu-footer select,
.menu-footer button {
  border-radius: 9px;
  min-height: 38px;
}
.menu-footer button {
  border-color: rgba(148, 163, 184, .28);
  background: rgba(255, 255, 255, .92);
}

.main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 18px 44px;
  animation: pageSoft .24s ease-out;
}
@keyframes menuSoft {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes pageSoft {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.page-title {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
h1 {
  font-family: var(--header-font);
  font-size: 24px;
  margin: 0;
  color: #f8fafc;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  display: inline-block;
  transform: scaleX(1.12);
  transform-origin: left center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .85);
}
h2 {
  font-family: var(--header-font);
  font-size: 18px;
  margin: 0 0 12px;
  color: #f8fafc;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  display: inline-block;
  transform: scaleX(1.08);
  transform-origin: left center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .75);
}
.panel h2, .card h2, .receipt h2 {
  color: var(--text);
  text-shadow: none;
}
.muted { color: var(--muted); }
.grid { display: grid; gap: 14px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.panel { padding: 16px; }
.manage-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
  align-items: start;
  gap: 10px;
}
.manage-column {
  display: grid;
  gap: 10px;
  align-content: start;
}
.compact-panel {
  align-self: start;
  padding: 12px;
}
.compact-panel h2 {
  font-size: 14px;
  margin-bottom: 10px;
}
.compact-panel .grid {
  gap: 9px;
}
.compact-panel input,
.compact-panel select {
  min-height: 34px;
}
.compact-panel button {
  min-height: 34px;
  padding: 6px 10px;
}
.compact-panel .plan-card {
  padding: 10px;
}
.admin-settings-panel {
  display: grid;
  gap: 18px;
}
.settings-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.settings-block h2 {
  margin-bottom: 4px;
}
.settings-block p {
  margin: 0;
}
.backup-block {
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 118, 110, .06), rgba(37, 99, 235, .04));
}
.backup-block button {
  flex: 0 0 auto;
  min-width: 150px;
}
.settings-divider {
  height: 1px;
  background: var(--line);
}
.section-heading {
  margin-top: 6px;
}
.hidden {
  display: none !important;
}
.platform-warning {
  border-color: rgba(245, 158, 11, .45);
  background: linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(15, 23, 42, .05));
}
.platform-warning strong {
  display: block;
  color: #92400e;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.platform-detail {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}
.platform-detail ul {
  margin: 6px 0 0;
  padding-inline-start: 18px;
}
.technician-edit-list {
  display: grid;
  gap: 10px;
}
.technician-edit-card,
.part-edit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.technician-edit-card summary,
.part-edit-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(135deg, #f8fafc, #eef7f6);
}
.technician-edit-card summary::-webkit-details-marker,
.part-edit-card summary::-webkit-details-marker {
  display: none;
}
.technician-edit-card summary strong,
.part-edit-card summary strong {
  display: block;
  font-size: 15px;
  color: var(--text);
}
.technician-edit-card summary small,
.part-edit-card summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.technician-edit-card .chevron,
.part-edit-card .chevron {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  transition: transform .18s ease;
}
.technician-edit-card[open] .chevron,
.part-edit-card[open] .chevron {
  transform: rotate(90deg);
}
.technician-edit-grid,
.part-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}
.technician-edit-actions,
.part-edit-actions {
  align-self: end;
  justify-content: flex-start;
}
.parts-tree {
  gap: 10px;
}
.parts-tree details {
  padding: 0;
  overflow: hidden;
}
.parts-tree > details > summary {
  padding: 13px 14px;
  background: linear-gradient(135deg, #f8fafc, #eef7f6);
}
.part-edit-list {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}
.part-edit-card summary {
  background: #fff;
}
.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
}
.login-main {
  width: min(650px, 100%);
  max-width: 650px;
  margin: 0;
  padding: 0;
}
.login-panel {
  position: relative;
  overflow: hidden;
  padding: 36px 42px 38px;
  border-radius: 14px;
  color: #fff;
  background: rgba(0, 0, 0, .1);
  border: 1px solid rgba(125, 225, 255, .78);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 0 12px rgba(65, 190, 255, .52),
    0 0 26px rgba(32, 218, 255, .28),
    0 20px 56px rgba(0, 0, 0, .44);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.login-panel::before,
.login-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.login-panel::before {
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent 8%, rgba(255,255,255,.58) 16%, transparent 26%),
    linear-gradient(90deg, transparent 66%, rgba(255,255,255,.42) 78%, transparent 91%);
  height: 2px;
  top: 0;
  opacity: .95;
}
.login-panel::after {
  inset: 1px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .06);
}
.login-title {
  position: relative;
  overflow: hidden;
  color: #fff;
  width: 100%;
  text-align: center;
  font-size: 38px;
  line-height: 1.12;
  margin-bottom: 34px;
  padding: 27px 20px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .03);
  border: 1px solid rgba(210, 230, 255, .5);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 0 12px rgba(255,255,255,.14),
    0 8px 18px rgba(0,0,0,.12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
  text-shadow: 0 0 6px rgba(255,255,255,.26), 0 2px 12px rgba(0,0,0,.82);
}
.login-brand-title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(120px, 18vw, 176px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
  text-shadow: none;
  border-radius: 32px;
  overflow: hidden;
}
.login-brand-title img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.login-title::before,
.login-title::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.login-title::before {
  display: none;
}
.login-title::after {
  display: none;
}
.login-subtitle {
  color: #fff;
  margin-top: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,.78);
}
.login-panel label {
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
}
.login-panel input {
  color: #fff;
  background: rgba(0, 0, 0, .02);
  border-color: rgba(210, 230, 255, .52);
  min-height: 38px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 8px 20px rgba(0,0,0,.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.login-panel input:focus {
  outline: 0;
  border-color: rgba(255,255,255,.78);
  box-shadow: 0 0 0 3px rgba(255,255,255,.09), 0 0 12px rgba(255,255,255,.18);
}
.login-panel button.primary {
  min-height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  border-color: rgba(45, 212, 191, .85);
  font-size: 18px;
  font-weight: 800;
}
.public-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
}
.public-track-main {
  width: min(680px, 100%);
  max-width: 680px;
  margin: 0;
  padding: 0;
}
.public-track-card {
  padding: 28px;
}
.public-track-card h1 {
  color: var(--text);
  text-shadow: none;
  transform: none;
  margin-bottom: 18px;
}
.tracking-status {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.plan-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #b7d8d4;
  border-radius: 8px;
  background: #f7fbfa;
}
.plan-card strong {
  text-transform: uppercase;
  color: var(--accent);
  font-size: 22px;
}
.stat {
  padding: 15px;
  border-inline-start: 4px solid var(--accent);
}
.stat.clickable {
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.stat.clickable:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.12);
}
.stat strong { display: block; font-size: 28px; margin-top: 4px; direction: ltr; text-align: right; }

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.icon-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.icon-button svg { width: 16px; height: 16px; }
.toolbar input, .toolbar select { max-width: 230px; }
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.section-title-row h2 { margin: 0; }

label { display: grid; gap: 6px; color: #344054; font-size: 13px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  min-height: 38px;
  padding: 8px 10px;
}
.password-field {
  gap: 7px;
}
.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.password-row input {
  min-width: 0;
}
.password-generate {
  min-height: 38px;
  white-space: nowrap;
  color: #fff;
  border-color: rgba(37, 99, 235, .72);
  background: linear-gradient(135deg, #2563eb, #0f766e);
}
.password-meter {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}
.password-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width .18s ease, background .18s ease;
}
.password-meter[data-level="weak"] span { background: #ef4444; }
.password-meter[data-level="medium"] span { background: #f59e0b; }
.password-meter[data-level="strong"] span { background: #10b981; }
.password-hint {
  color: var(--muted);
}
.password-hint[data-level="weak"] { color: #b91c1c; }
.password-hint[data-level="medium"] { color: #92400e; }
.password-hint[data-level="strong"] { color: #047857; }
.scroll-select {
  min-height: 148px;
  overflow-y: auto;
  padding: 0;
}
.scroll-select option {
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
}
textarea { min-height: 86px; resize: vertical; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.device-choice-field {
  display: grid;
  gap: 12px;
}
.intake-top-actions {
  position: sticky;
  top: 82px;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: -2px 0 16px;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, .76);
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.intake-top-actions button {
  min-height: 44px;
  min-width: 112px;
  font-weight: 850;
}
.intake-form {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding: 26px;
  border-radius: 22px;
}
.intake-form .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.intake-form label {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0;
}
.intake-form input,
.intake-form select,
.intake-form textarea {
  min-height: 46px;
  border-radius: 12px;
  font-size: 15px;
  background: rgba(255, 255, 255, .92);
}
.intake-form textarea {
  min-height: 112px;
}
.design-mode-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border-soft));
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary) 7%, #fff);
}
.design-toolbar-main,
.design-global-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.design-global-controls {
  justify-content: flex-end;
}
.design-global-controls label {
  display: grid;
  gap: 4px;
  min-width: 116px;
  margin: 0;
  font-size: 12px;
}
.design-global-controls input {
  min-height: 24px;
}
.design-help-panel {
  display: grid;
  gap: 4px;
  max-width: 520px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border-soft));
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 6%, #fff);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
.design-help-panel span {
  color: var(--muted);
}
.design-slider-value {
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}
.design-mode-toggle {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 10px;
  margin: 0;
  color: var(--text-strong);
  font-weight: 900;
}
.design-mode-toggle input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--primary);
}
.intake-section-stack {
  display: grid;
  gap: var(--intake-section-spacing, 18px);
}
.intake-design-section {
  min-width: 0;
  border: calc(var(--intake-section-border-strength, 1) * 1px) solid color-mix(in srgb, var(--section-accent, var(--primary)) 18%, rgba(226, 232, 240, .92));
  border-left-width: max(3px, calc(var(--intake-section-border-strength, 1) * 2px));
  border-left-color: var(--section-accent, var(--primary));
  border-radius: var(--intake-section-radius, 18px);
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 calc(var(--intake-section-shadow-strength, 0) * 4px) calc(var(--intake-section-shadow-strength, 0) * 10px) rgba(15, 23, 42, .08);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.intake-design-section-body {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 16px;
}
.intake-design-section[data-density="compact"] .intake-design-section-body {
  gap: 10px;
  padding: 12px;
}
.intake-design-section.is-collapsed .intake-design-section-body {
  display: none;
}
.intake-design-section .section-grid {
  margin: 0;
}
.intake-design-section-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px dashed color-mix(in srgb, var(--primary) 22%, var(--border-soft));
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  border-radius: 18px 18px 0 0;
}
.intake-section-display-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 0;
}
.intake-design-section[data-density="compact"] .intake-section-display-head {
  padding: 10px 12px 0;
}
.intake-section-display-head h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 900;
}
.intake-section-display-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.section-collapse-toggle {
  display: none;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--section-accent, var(--primary)) 30%, var(--border-soft));
  border-radius: 10px;
  color: var(--section-accent, var(--primary));
  background: color-mix(in srgb, var(--section-accent, var(--primary)) 8%, #fff);
  font-weight: 900;
}
.intake-form.design-mode-active .section-collapse-toggle,
.intake-design-section.is-collapsed .section-collapse-toggle {
  display: inline-grid;
}
.section-style-controls {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 16px 0;
  padding: 12px;
  border: 1px dashed color-mix(in srgb, var(--section-accent, var(--primary)) 28%, var(--border-soft));
  border-radius: 14px;
  background: rgba(248, 250, 252, .82);
}
.section-style-controls label {
  margin: 0;
  font-size: 12px;
}
.section-style-controls input,
.section-style-controls select {
  min-height: 38px;
  font-size: 13px;
}
.section-style-controls .check-control {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
}
.section-style-controls .check-control input {
  width: 18px;
  min-height: 18px;
}
.intake-form.design-mode-active .section-style-controls {
  display: grid;
}
.intake-field {
  position: relative;
  min-width: 0;
}
.field-width-full {
  grid-column: 1 / -1;
}
.field-width-half {
  grid-column: span 2;
}
.field-width-third {
  grid-column: span 1;
}
.intake-field.is-field-hidden .intake-field-content,
.intake-field.is-field-hidden .field-help {
  display: none;
}
.field-help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.field-design-bar {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px dashed color-mix(in srgb, var(--primary) 28%, var(--border-soft));
  border-radius: 12px;
  background: rgba(248, 250, 252, .88);
}
.intake-form.design-mode-active .field-design-bar {
  display: flex;
}
.intake-form.design-mode-active .intake-field {
  outline: 1px dashed color-mix(in srgb, var(--primary) 28%, transparent);
  outline-offset: 4px;
  border-radius: 12px;
}
.field-drag-handle,
.field-design-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border-soft));
  border-radius: 9px;
  background: #fff;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 850;
}
.field-drag-handle {
  width: 34px;
  cursor: grab;
}
.field-design-actions {
  display: inline-flex;
  gap: 5px;
  margin-left: auto;
}
.field-settings-popover {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border-soft));
  border-radius: 12px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}
.intake-field.field-settings-open .field-settings-popover {
  display: grid;
}
.field-settings-popover label {
  margin: 0;
  font-size: 12px;
}
.field-settings-popover input,
.field-settings-popover select {
  min-height: 38px;
  font-size: 13px;
}
.field-settings-popover .check-control {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
}
.field-settings-popover .check-control input {
  width: 18px;
  min-height: 18px;
}
.required-hidden-warning {
  padding: 9px 10px;
  border: 1px solid rgba(245, 158, 11, .34);
  border-radius: 10px;
  background: rgba(255, 251, 235, .95);
  color: #92400e;
  font-size: 12px;
  line-height: 1.35;
}
.special-section-drop-message {
  display: none;
  align-items: center;
  gap: 6px;
  margin: 4px 16px 0;
  color: color-mix(in srgb, var(--muted) 84%, var(--text));
  font-size: 11px;
  line-height: 1.3;
}
.intake-form.design-mode-active .special-section-drop-message {
  display: inline-flex;
}
.special-section-drop-message span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}
.intake-design-section.drop-not-allowed .special-section-drop-message {
  color: color-mix(in srgb, var(--text) 70%, var(--muted));
}
.intake-field.is-dragging-field {
  opacity: .7;
  transform: scale(.99);
}
.intake-form.design-mode-active .intake-design-section {
  border-color: color-mix(in srgb, var(--primary) 58%, var(--border-soft));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}
.intake-form.design-mode-active .intake-design-section-bar {
  display: flex;
}
.intake-design-section.is-dragging {
  opacity: .7;
  transform: scale(.99);
}
.design-drag-handle,
.design-section-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border-soft));
  border-radius: 10px;
  background: #fff;
  color: var(--primary-strong);
  font-weight: 850;
}
.design-drag-handle {
  width: 38px;
  cursor: grab;
}
.design-section-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}
.intake-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 -4px;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.intake-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}
.chip-fallback-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.option-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  align-items: stretch;
}
.option-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  cursor: pointer;
  user-select: none;
  transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.option-chip:hover {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border-soft));
  transform: translateY(-1px);
}
.option-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.option-chip-indicator {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 2px solid color-mix(in srgb, var(--primary) 46%, #94a3b8);
  border-radius: 50%;
  background: transparent;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.option-chip-indicator::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .16s ease, transform .16s ease;
}
.option-chip.selected,
.option-chip:has(input:checked) {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 72%, var(--border-soft));
  background: color-mix(in srgb, var(--primary) 10%, #fff);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .14);
}
.option-chip.selected .option-chip-text,
.option-chip:has(input:checked) .option-chip-text {
  font-weight: 800;
}
.option-chip.selected .option-chip-indicator,
.option-chip:has(input:checked) .option-chip-indicator {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}
.option-chip.selected .option-chip-indicator::after,
.option-chip:has(input:checked) .option-chip-indicator::after {
  opacity: 1;
  transform: scale(1);
}
.option-chip:focus-within {
  outline: 3px solid color-mix(in srgb, var(--primary) 24%, transparent);
  outline-offset: 2px;
}
.selected-parts-panel {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  min-width: 0;
}
.selected-parts-mobile-toggle {
  display: none;
}
.selected-parts-content {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border-soft));
  border-radius: 18px;
  background: color-mix(in srgb, var(--primary) 5%, #fff);
}
.selected-parts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.selected-parts-head strong {
  color: var(--text);
}
.selected-parts-head span {
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 850;
}
.selected-parts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 10px;
  min-width: 0;
}
.selected-part-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}
.selected-part-card.primary-part {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border-soft));
  background: color-mix(in srgb, var(--primary) 6%, #fff);
}
.selected-part-jump {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}
.selected-part-jump strong {
  min-width: 0;
  color: var(--primary-strong);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.selected-part-jump small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selected-part-controls {
  display: grid;
  grid-template-columns: minmax(112px, .8fr) minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.quantity-stepper {
  display: grid;
  grid-template-columns: 34px minmax(40px, 1fr) 34px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
}
.quantity-stepper button,
.quantity-stepper input {
  min-height: 34px;
  border: 0;
  border-radius: 0;
  text-align: center;
}
.quantity-stepper button {
  padding: 0;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  font-weight: 900;
}
.quantity-stepper input {
  min-width: 0;
  padding: 0 4px;
  border-inline: 1px solid var(--border-soft);
  font-weight: 800;
}
.selected-part-controls select {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding-block: 6px;
  border-radius: 12px;
}
.selected-part-remove {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #475569;
  background: color-mix(in srgb, var(--border-soft) 55%, #fff);
  font-size: 20px;
  line-height: 1;
}
.selected-part-remove:hover {
  color: #fff;
  background: #dc2626;
}
.selected-part-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 8px 7px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  font-size: 13px;
  font-weight: 750;
}
.selected-part-chip > span {
  display: grid;
  gap: 2px;
  cursor: pointer;
}
.selected-part-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.selected-part-chip.primary-part {
  color: var(--primary-strong);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border-soft));
  background: color-mix(in srgb, var(--primary) 9%, #fff);
}
.selected-part-chip.primary-part small {
  color: color-mix(in srgb, var(--primary-strong) 70%, var(--muted));
}
.selected-part-chip button {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #475569;
  background: color-mix(in srgb, var(--border-soft) 55%, #fff);
  font-size: 18px;
  line-height: 1;
}
.selected-part-chip button:hover {
  color: #fff;
  background: #dc2626;
}
.selected-parts-empty {
  margin: 0;
}
.part-jump-highlight {
  animation: partJumpPulse 1.1s ease-out;
}
@keyframes partJumpPulse {
  0%, 100% { box-shadow: 0 8px 18px rgba(15, 23, 42, .05); }
  35% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 20%, transparent), 0 16px 30px rgba(37, 99, 235, .2); }
}
.location-field {
  display: grid;
  gap: 6px;
}
.location-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
  align-items: center;
}
.location-input-row input {
  width: 100%;
}
.location-pin-button {
  width: 46px;
  min-width: 46px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
}
.location-pin-button svg {
  width: 20px;
  height: 20px;
}
.location-pin-button.loading svg {
  animation: locationPulse .8s ease-in-out infinite alternate;
}
.location-message {
  min-height: 18px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.location-message[data-type="success"] {
  color: #047857;
}
.location-message[data-type="error"] {
  color: #b42318;
}
.location-message[data-type="loading"] {
  color: var(--primary);
}
@keyframes locationPulse {
  from { transform: translateY(0) scale(1); opacity: .72; }
  to { transform: translateY(-1px) scale(1.08); opacity: 1; }
}
.mobile-action-bar {
  display: none;
}
.intake-scan-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border-soft));
  border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, #fff), rgba(255,255,255,.86));
  box-shadow: 0 12px 28px rgba(37, 99, 235, .08);
}
.intake-scan-panel h2 {
  margin: 0 0 4px;
  font-size: 19px;
}
.intake-scan-actions {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr);
  gap: 12px;
  align-items: center;
}
.intake-scan-main {
  min-height: 54px;
  justify-content: center;
  font-weight: 900;
}
.intake-manual-scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
  gap: 8px;
}
.intake-scan-result {
  display: grid;
  gap: 8px;
}
.intake-scan-result:empty {
  display: none;
}
.scan-found {
  display: grid;
  gap: 8px;
}
.scan-found .primary {
  justify-self: start;
  min-height: 40px;
}
.scan-attached {
  color: #047857;
  font-weight: 750;
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 10px 0;
}
.scan-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .72);
}
.scan-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.scan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.scan-head h2 { margin: 0; color: var(--text); text-shadow: none; }
.scan-head button {
  min-width: 38px;
  padding: 4px 10px;
  font-size: 24px;
  line-height: 1;
}
.scan-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  margin: 12px 0;
}
.scan-video.hidden { display: none; }
.scan-video video,
#html5ScanRegion video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 8px;
}
#html5ScanRegion img,
#html5ScanRegion canvas {
  max-width: 100%;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th, td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  text-align: right;
  vertical-align: middle;
}
html[dir="ltr"] th, html[dir="ltr"] td { text-align: left; }
html[dir="ltr"] .stat strong { text-align: left; }
th { background: #f8fafc; color: #475467; font-size: 13px; white-space: nowrap; }
tbody tr:hover { background: #fbfcfe; }
tr:last-child td { border-bottom: 0; }
.table-subtext {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  margin-top: 2px;
}
.row-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 6px;
  max-width: 250px;
}
.row-actions button {
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #b7d8d4;
  border-radius: 999px;
  color: #0f766e;
  background: #eef8f6;
  font-size: 12px;
  white-space: nowrap;
}
.pill.urgent { border-color: #fecaca; color: #b42318; background: #fef2f2; }
.status-badge {
  --status-color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--status-color) 34%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--status-color) 78%, #0f172a);
  background: color-mix(in srgb, var(--status-color) 10%, white);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-color) 14%, transparent);
}
.status-badge.status-mini {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 11px;
}
.status-badge.status-mini::before { width: 6px; height: 6px; }
.status-stat {
  border-left-color: var(--status-color);
}
.dashboard-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.status-detail-head {
  display: grid;
  gap: 12px;
  margin: 8px 0 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
}
.status-progress,
.public-status-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  width: 100%;
}
.status-progress.cancelled {
  display: flex;
}
.status-step,
.public-status-step {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 5px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}
.status-step i,
.public-status-step i {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.status-step.complete,
.public-status-step.complete {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}
.status-step.complete i,
.public-status-step.complete i {
  background: currentColor;
}
.status-step.current,
.public-status-step.current {
  color: var(--status-color, var(--primary));
  background: color-mix(in srgb, var(--status-color, var(--primary)) 10%, white);
  border-color: color-mix(in srgb, var(--status-color, var(--primary)) 34%, white);
}
.status-step.current i,
.public-status-step.current i {
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 16%, transparent);
}
.status-workflow-form {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.status-workflow-form select,
.status-workflow-form input {
  min-height: 42px;
}
.overdue { background: #fff1f2; }
.overdue td { border-bottom-color: #fecdd3; }

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}
.qr-box { text-align: center; }
.qr-box img { width: 180px; height: 180px; image-rendering: pixelated; }
.tracking-qr-block {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}
.tracking-qr-frame {
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  filter: none;
  transform: none;
}
.tracking-qr-label {
  color: #667085;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tracking-qr-payload {
  max-width: 100%;
  color: #344054;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}
.tracking-qr-open {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid #2563eb;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}
.tracking-qr-empty {
  color: var(--muted);
  font-size: 13px;
}
.detail-tracking-qr {
  margin-bottom: 12px;
}
.kv {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.kv div { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.kv div:nth-child(odd) { background: #f8fafc; color: #475467; }
.kv div:nth-last-child(-n + 2) { border-bottom: 0; }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.note-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.note-box h3 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 14px;
}
.note-box h3 span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.note-box p { margin: 0; color: var(--text); }
.public-note-box { border-color: #b7d8d4; background: #f7fbfa; }
.internal-note-box { border-color: #fed7aa; background: #fff7ed; }
.timeline {
  position: relative;
  display: grid;
  gap: 10px;
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px #eef8f6;
}
.timeline-item p { margin: 3px 0 0; }
.internal-note {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  padding: 7px 9px;
}
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.photo-grid img,
.photo-preview-button img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.photo-thumb-readonly {
  margin: 0;
}
.photo-thumb-readonly figcaption {
  max-width: 120px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.photo-workflow {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 90%, #fff);
}
.photo-workflow-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}
.photo-workflow-head h2 {
  margin: 0 0 4px;
  font-size: 19px;
}
.photo-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border-soft));
  border-radius: 999px;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  font-size: 12px;
  font-weight: 800;
}
.photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.photo-pick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  cursor: pointer;
  font-weight: 850;
  text-align: center;
}
.photo-pick-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.photo-pick-button.primary {
  color: #fff;
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 14px 30px rgba(37, 99, 235, .18);
}
.photo-pick-button.secondary {
  color: var(--primary-strong);
  background: #fff;
}
.signature-workflow {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 92%, #fff);
}
.signature-workflow-head h2 {
  margin: 0 0 4px;
  font-size: 19px;
}
.signature-capture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.signature-capture-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: #fff;
}
.signature-capture-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.signature-capture-head h3 {
  margin: 0 0 4px;
  color: var(--text-strong);
  font-size: 15px;
}
.signature-state {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border-soft));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 7%, #fff);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 850;
}
.signature-pad {
  width: 100%;
  height: 170px;
  border: 1px solid #98a2b3;
  border-radius: 12px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(0deg, transparent 0 33px, rgba(15, 23, 42, .08) 34px 35px);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .05);
  cursor: crosshair;
  touch-action: none;
}
.signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.signature-preview {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 10px;
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}
.signature-preview img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}
.photo-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.photo-message[data-type="success"] { color: #047857; }
.photo-message[data-type="error"] { color: #b42318; }
.photo-message[data-type="loading"] { color: var(--primary); }
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.photo-edit-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: #fff;
}
.photo-preview-button {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: zoom-in;
}
.photo-preview-button img {
  display: block;
  width: 100%;
  height: 132px;
  border-radius: 12px;
}
.photo-remove-button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  color: #fff;
  background: rgba(185, 28, 28, .92);
  box-shadow: 0 10px 20px rgba(15, 23, 42, .22);
  font-size: 22px;
  line-height: 1;
}
.photo-edit-card label {
  gap: 4px;
  font-size: 12px;
}
.photo-edit-card select,
.photo-edit-card input {
  min-height: 42px;
}
.empty-photo-state {
  padding: 18px;
  border: 1px dashed var(--border-soft);
  border-radius: 14px;
  color: var(--muted);
  background: color-mix(in srgb, var(--primary) 3%, #fff);
  text-align: center;
}
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .82);
}
.photo-lightbox figure {
  margin: 0;
  width: min(920px, 100%);
}
.photo-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 14px;
  object-fit: contain;
}
.photo-lightbox figcaption {
  margin-top: 10px;
  color: #fff;
  text-align: center;
  font-weight: 750;
}
.photo-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .78);
  font-size: 28px;
  line-height: 1;
}
.tree {
  display: grid;
  gap: 8px;
}
.tree details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.tree summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
}

.print-page {
  max-width: 520px;
  margin: 18px auto;
}
.print-label, .receipt {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  box-shadow: none;
}
.print-label *, .receipt * {
  color: #000 !important;
  text-shadow: none !important;
}
.print-label {
  width: 112mm;
  min-height: 70mm;
  padding: 4mm;
  display: grid;
  grid-template-columns: 252px 1fr;
  gap: 3mm;
  align-items: center;
}
.print-label img { width: 27mm; height: 27mm; }
.print-label h2 { font-size: 14px; font-weight: 800; margin: 0 0 2mm; direction: ltr; text-align: left; }
.print-label p { margin: 1mm 0; font-size: 10px; line-height: 1.25; font-weight: 600; }
.print-label .tracking-qr-frame,
.receipt .tracking-qr-frame {
  border-color: #000;
  background: #fff;
}
.print-label .tracking-qr-payload {
  max-width: 252px;
  font-size: 7px;
  line-height: 1.15;
}
.print-label .tracking-qr-label,
.receipt .tracking-qr-label {
  font-size: 7px;
}
.receipt .receipt-tracking-qr {
  margin: 0 auto 4mm;
}
.receipt .tracking-qr-payload {
  max-width: 68mm;
  font-size: 8px;
}
.receipt {
  width: 80mm;
  min-height: 120mm;
  padding: 5mm;
}
.receipt h2 { text-align: center; font-size: 16px; margin: 0 0 4mm; }
.receipt .line { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed #999; padding: 2mm 0; font-size: 12px; }
.signature { margin-top: 12mm; border-top: 1px solid #000; padding-top: 2mm; font-size: 12px; }

.report-preview-shell {
  display: grid;
  gap: 18px;
}
.report-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-sm);
}
.report-preview-actions h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 22px;
}
.report-preview-actions p {
  margin: 4px 0 0;
  color: var(--muted);
}
.repair-report {
  width: min(100%, 210mm);
  min-height: 297mm;
  margin: 0 auto 32px;
  padding: 16mm;
  box-sizing: border-box;
  background: #fff;
  color: #111827;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
  font-family: Arial, Helvetica, sans-serif;
  page: repairReport;
}
.repair-report * {
  color: inherit;
  text-shadow: none;
}
.report-page-chrome {
  display: none;
}
.report-header {
  display: grid;
  grid-template-columns: 34mm minmax(0, 1fr) 64mm;
  gap: 8mm;
  align-items: start;
  padding-bottom: 9mm;
  border-bottom: 2px solid #111827;
}
.report-logo-area {
  display: grid;
  place-items: center;
  min-height: 24mm;
  padding: 4mm;
  border: 1px solid #d0d5dd;
  border-radius: 5px;
  background: #f8fafc;
}
.report-logo-area img {
  width: 100%;
  max-height: 20mm;
  object-fit: contain;
}
.report-tracking-qr {
  display: grid;
  justify-items: center;
  gap: 2.5mm;
  min-width: 0;
}
.report-qr-frame {
  display: grid;
  place-items: center;
  width: 60mm;
  min-width: 220px;
  height: 60mm;
  min-height: 220px;
  padding: 4mm;
  border: 1px solid #d0d5dd;
  border-radius: 2px;
  background: #fff;
  box-shadow: none;
  filter: none;
  transform: none;
}
.report-real-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 220px;
  max-height: 100%;
  background: #fff !important;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
  filter: none !important;
  transform: none !important;
}
.report-qr-label {
  color: #667085;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.report-tracking-qr .report-qr-payload {
  display: block;
  max-width: 64mm;
  color: #344054;
  font-size: 8.5px;
  line-height: 1.25;
  text-align: center;
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.report-open-tracking {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid #2563eb;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.report-tracking-qr-empty {
  align-content: start;
}
.report-kicker {
  margin: 0 0 2mm;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.report-header h1 {
  margin: 0;
  color: #101828;
  font-size: 28px;
  line-height: 1;
}
.report-subtitle {
  margin: 3mm 0 0;
  color: #475467;
  font-size: 12px;
}
.report-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 4mm;
  color: #667085;
  font-size: 11px;
}
.report-meta-line span {
  color: #667085;
}
.report-status,
.report-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid #98a2b3;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.report-section {
  margin-top: 8mm;
}
.report-section h2 {
  margin: 0 0 4mm;
  color: #101828;
  font-size: 15px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.report-summary,
.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3mm;
}
.report-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.report-field {
  display: grid;
  gap: 1mm;
  min-width: 0;
  padding: 3mm;
  border: 1px solid #e4e7ec;
  border-radius: 4px;
  background: #fcfcfd;
}
.report-field span {
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.report-field strong {
  color: #101828;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.report-table th,
.report-table td {
  padding: 3mm;
  border: 1px solid #e4e7ec;
  text-align: left;
  vertical-align: top;
}
.report-table th {
  background: #f2f4f7;
  color: #344054;
  font-size: 10px;
  text-transform: uppercase;
}
.report-table td strong {
  display: block;
  color: #101828;
  font-size: 12px;
}
.report-table td small {
  display: block;
  margin-top: 1mm;
  color: #667085;
  font-size: 10px;
}
.report-table thead {
  display: table-header-group;
}
.report-table tr {
  break-inside: avoid;
  page-break-inside: avoid;
}
.report-timeline-section {
  break-inside: auto;
  page-break-inside: auto;
}
.report-timeline-table {
  font-size: 11px;
}
.report-timeline-table th:first-child {
  width: 23%;
}
.report-timeline-table th:nth-child(2),
.report-timeline-table th:nth-child(3) {
  width: 18%;
}
.report-timeline-table th:nth-child(4) {
  width: 16%;
}
.report-timeline-table td {
  line-height: 1.35;
}
.report-timeline-table .report-mini-badge {
  padding: 3px 7px;
  font-size: 10px;
}
.report-timeline-note {
  color: #344054;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.report-muted {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}
.report-empty {
  padding: 5mm;
  border: 1px dashed #d0d5dd;
  border-radius: 5px;
  color: #667085;
  font-size: 12px;
}
.report-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4mm;
}
.report-notes > div {
  min-height: 24mm;
  padding: 4mm;
  border: 1px solid #e4e7ec;
  border-radius: 5px;
}
.report-notes h3 {
  margin: 0 0 2mm;
  color: #344054;
  font-size: 11px;
  text-transform: uppercase;
}
.report-notes p {
  margin: 0;
  color: #101828;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.report-photo-groups {
  display: grid;
  gap: 6mm;
}
.report-photo-group {
  break-inside: auto;
  page-break-inside: auto;
}
.report-photo-group h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 3mm;
  padding-bottom: 2mm;
  border-bottom: 1px solid #e4e7ec;
  color: #344054;
  font-size: 12px;
  text-transform: uppercase;
}
.report-photo-group h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
}
.report-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4mm;
}
.report-photo-card {
  display: grid;
  gap: 2mm;
  margin: 0;
  padding: 3mm;
  border: 1px solid #e4e7ec;
  border-radius: 5px;
  background: #fff;
  color: #667085;
  font-size: 11px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.report-photo-card img {
  width: 100%;
  height: 38mm;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid #eef2f7;
}
.report-photo-card figcaption {
  display: grid;
  gap: 1mm;
  min-height: 10mm;
}
.report-photo-card figcaption strong {
  color: #344054;
  font-size: 10px;
  text-transform: uppercase;
}
.report-photo-card figcaption span {
  color: #475467;
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.report-photo-empty {
  display: grid;
  gap: 2mm;
  padding: 8mm;
  border: 1px dashed #cbd5e1;
  border-radius: 5px;
  background: #f8fafc;
  color: #667085;
  text-align: center;
}
.report-photo-empty strong {
  color: #344054;
  font-size: 13px;
}
.report-photo-empty span {
  color: #667085;
  font-size: 12px;
}
.report-signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6mm;
  margin-top: 14mm;
}
.report-signature-box {
  display: grid;
  align-content: end;
  gap: 2mm;
  min-height: 22mm;
  padding-top: 4mm;
}
.report-signature-box img {
  width: 100%;
  max-height: 18mm;
  object-fit: contain;
  object-position: left bottom;
}
.report-signature-line {
  display: block;
  min-height: 15mm;
  border-bottom: 1px solid #101828;
}
.report-signature-box strong {
  color: #475467;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.report-preview-actions button.is-loading {
  cursor: wait;
  opacity: .78;
}

@media (max-width: 820px) {
  .topbar-inner, .page-title { align-items: stretch; flex-direction: column; }
  .topbar-inner { min-height: 0; padding: 10px 12px; }
  .brand { min-width: 0; width: 100%; font-size: 20px; padding-inline: 12px; }
  .login-panel {
    padding: 24px 18px 26px;
  }
  .login-title { font-size: 26px; padding: 20px 12px; margin-bottom: 22px; }
  .login-brand-title {
    height: 112px;
    padding: 0;
  }
  .menu-toggle { width: 100%; }
  .top-actions { display: grid; gap: 8px; }
  .report-preview-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .repair-report {
    min-height: 0;
    padding: 18px;
    border-radius: 16px;
  }
  .report-header,
  .report-summary,
  .report-grid,
  .report-notes,
  .report-photo-grid,
  .report-signatures {
    grid-template-columns: 1fr;
  }
  .report-tracking-qr {
    justify-items: start;
  }
  .report-qr-frame {
    width: 220px;
    height: 220px;
  }
  .report-tracking-qr .report-qr-payload {
    max-width: 100%;
    text-align: left;
  }
  .report-logo-area {
    width: 180px;
    min-height: 56px;
  }
  .report-header {
    gap: 16px;
  }
  .report-photo-card img {
    height: 180px;
  }
  .nav { position: absolute; top: calc(100% + 10px); right: 0; width: calc(100vw - 24px); }
  .nav a { text-align: center; }
  .language-select { min-width: 0; }
  .main { padding: 14px 10px 34px; }
  h1 { font-size: 21px; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2, .form-grid, .detail-layout, .notes-grid { grid-template-columns: 1fr; }
  .manage-layout { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .toolbar { display: grid; grid-template-columns: 1fr; }
  .toolbar input, .toolbar select, .toolbar button { max-width: none; width: 100%; }
  .password-row { grid-template-columns: 1fr; }
  .password-generate { width: 100%; }
  .technician-edit-grid, .part-edit-grid { grid-template-columns: 1fr; }
  .technician-edit-actions button, .part-edit-actions button { width: 100%; }
  .actions { display: grid; grid-template-columns: 1fr; }
  .actions button { width: 100%; }
  .table-wrap { border-radius: 6px; }
  table { min-width: 720px; }
  .kv { grid-template-columns: 1fr; }
  .kv div:nth-child(even) { padding-top: 0; }
  .print-page { margin: 10px auto; }
}

@media print {
  @page { margin: 0; }
  body { background: #fff; }
  .topbar, .no-print, .page-title .actions { display: none !important; }
  .main, .print-page { margin: 0; padding: 0; max-width: none; }
  .repair-report {
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    padding: 14mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .report-section,
  .report-photo-group,
  .report-photo-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .report-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .report-photo-card img {
    height: 45mm !important;
  }
  .print-label, .receipt { border: 0; margin: 0; page-break-after: always; }
}

/* Modern SaaS refresh */
:root {
  --bg: #eef4fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --line: #dbe5f0;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --danger: #dc2626;
  --shadow: 0 12px 30px rgba(15, 23, 42, .08);
  --app-bg: #eef4fb;
  --app-bg-soft: #f7fbff;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --text-strong: #172033;
  --text-muted: #64748b;
  --border-soft: #dbe5f0;
  --primary: #2563eb;
  --primary-2: #0f766e;
  --menu-bg: #0f172a;
  --menu-text: #cbd5e1;
  --rf-card-opacity: .96;
  --rf-sidebar-opacity: .96;
  --rf-backdrop-blur: 14px;
  --rf-radius: 18px;
  --rf-glow-strength: 0;
  --rf-glow-color: #2563eb;
  --rf-bg-image: none;
  --rf-bg-video: none;
  --rf-bg-dim: .72;
  --rf-bg-brightness: 1;
  --rf-bg-blur: 0px;
  --rf-bg-fit: cover;
}

body {
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--app-bg);
  color: var(--text-strong);
}
.video-bg video {
  display: none;
  filter: brightness(var(--rf-bg-brightness)) blur(var(--rf-bg-blur));
}
.video-bg {
  background:
    radial-gradient(circle at 8% 8%, rgba(59, 130, 246, .14), transparent 30%),
    linear-gradient(180deg, var(--app-bg-soft) 0%, var(--app-bg) 52%, var(--app-bg) 100%);
}
.video-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--rf-bg-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: var(--rf-bg-fit);
  filter: brightness(var(--rf-bg-brightness)) blur(var(--rf-bg-blur));
  transform: scale(1.03);
  opacity: 0;
  transition: opacity .18s ease;
}
html[data-background-type="image"] .video-bg::before { opacity: 1; }
html[data-background-type="video"] .video-bg video {
  display: block;
  object-fit: var(--rf-bg-fit);
}
.video-overlay { background: rgba(255, 255, 255, var(--rf-bg-dim)); }
.shell { min-height: 100vh; overflow: visible; }

button {
  border-radius: 10px;
  border-color: #cfd9e7;
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 650;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 23, 42, .08); }
button.primary, .login-panel button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
button.secondary {
  background: var(--primary-2);
  border-color: var(--primary-2);
}
button.bluetooth-button { background: var(--primary); border-color: var(--primary); }

.topbar {
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(203, 213, 225, .8);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topbar::before,
.topbar::after { display: none; }
.topbar-inner {
  min-height: 72px;
  padding: 9px 24px;
  align-items: center;
}
.brand {
  width: 168px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1734;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}
.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.menu-toggle {
  min-width: 92px;
  min-height: 42px;
  border-radius: 999px;
  color: var(--primary);
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #fff, #eff6ff);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .10);
  font-family: inherit;
  font-weight: 850;
  transform: none;
  text-transform: none;
}
.menu-toggle:hover {
  color: #fff;
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(37, 99, 235, .22);
}
.nav {
  width: min(310px, calc(100vw - 24px));
  padding: 14px;
  border-radius: var(--rf-radius);
  border: 1px solid rgba(30, 41, 59, .12);
  background: color-mix(in srgb, var(--menu-bg) calc(var(--rf-sidebar-opacity) * 100%), transparent);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, .24),
    0 0 calc(30px * var(--rf-glow-strength)) color-mix(in srgb, var(--rf-glow-color) 68%, transparent);
  backdrop-filter: blur(var(--rf-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--rf-backdrop-blur));
}
.nav a {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 0;
  color: var(--menu-text);
  background: transparent;
  font-weight: 650;
}
.nav a::before { display: none; }
.nav a:hover {
  color: #fff;
  background: rgba(148, 163, 184, .12);
  transform: none;
}
.nav a.active {
  color: #fff;
  background: var(--primary);
  border-color: transparent;
}
.nav-link-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(96, 165, 250, .14);
  color: #93c5fd;
  font-size: 13px;
}
.nav-personalization.active .nav-icon {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
.badge { box-shadow: none; background: #ef4444; }
.menu-footer {
  gap: 10px;
  padding-top: 12px;
  border-top-color: rgba(148, 163, 184, .22);
}
.user-chip {
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(148, 163, 184, .20);
  box-shadow: none;
  text-shadow: none;
}
.super-admin-badge { background: #facc15; }
.menu-footer select,
.menu-footer button {
  border-radius: 10px;
  box-shadow: none;
}

.main {
  max-width: 1240px;
  padding: 28px 22px 54px;
}
h1, h2 {
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  transform: none;
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none;
}
h1 {
  color: var(--text-strong);
  font-size: clamp(26px, 3vw, 38px);
  margin: 0 0 18px;
}
h2 {
  color: var(--text-strong);
  font-size: 18px;
}
.panel h2, .card h2 { color: var(--text-strong); }
.muted {
  color: color-mix(in srgb, var(--text-muted) 86%, var(--text-strong));
}

.panel, .card {
  border-radius: var(--rf-radius);
  border: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--surface) calc(var(--rf-card-opacity) * 100%), transparent);
  box-shadow:
    var(--shadow),
    0 0 calc(28px * var(--rf-glow-strength)) color-mix(in srgb, var(--rf-glow-color) 48%, transparent);
}
.panel { padding: 22px; }
.card { padding: 18px; }
.grid { gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.stat {
  min-height: 112px;
  padding: 20px;
  border-radius: var(--rf-radius);
  border: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--surface) calc(var(--rf-card-opacity) * 100%), transparent);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
}
.stat strong {
  font-size: 34px;
  color: var(--text-strong);
}

label {
  gap: 7px;
  color: var(--text-muted);
  font-weight: 650;
}
input, select, textarea {
  min-height: 42px;
  border-radius: 12px;
  border-color: var(--border-soft);
  background: var(--surface);
  color: var(--text-strong);
  padding: 10px 12px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
textarea { min-height: 104px; }
.form-grid { gap: 16px; }
.actions { gap: 10px; margin-top: 18px; }

.toolbar {
  gap: 12px;
  margin-bottom: 18px;
}
.toolbar input, .toolbar select { max-width: 260px; }
.table-wrap {
  border-radius: var(--rf-radius);
  border-color: var(--border-soft);
  background: color-mix(in srgb, var(--surface) calc(var(--rf-card-opacity) * 100%), transparent);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, .05),
    0 0 calc(22px * var(--rf-glow-strength)) color-mix(in srgb, var(--rf-glow-color) 32%, transparent);
}
table { min-width: 860px; }
th, td {
  padding: 13px 14px;
  border-bottom-color: #e6edf5;
}
th {
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: .02em;
}
tbody tr:hover { background: var(--surface-muted); }
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 260px;
}
.row-actions button {
  border-radius: 10px;
  background: #fff;
}
.row-actions .action-icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-color: #d8e2ef;
  border-radius: 12px;
  color: var(--primary);
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}
.row-actions .action-icon-button svg {
  width: 18px;
  height: 18px;
}
.row-actions .action-icon-button:hover {
  color: #fff;
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}
.row-actions .action-label { display: none; }
.serial-number-field {
  display: block;
}
.serial-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.serial-input-row input {
  min-width: 0;
}
.serial-scan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: var(--primary);
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  font-weight: 800;
  white-space: nowrap;
}
.serial-scan-button svg {
  width: 17px;
  height: 17px;
}
.serial-scan-button:hover,
.serial-scan-button:focus-visible {
  color: #fff;
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}
.serial-scan-button.icon-only {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
}
.serial-number-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}
.serial-number-cell > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.kv .serial-number-cell {
  justify-content: flex-start;
}
@media (max-width: 640px) {
  .serial-input-row {
    grid-template-columns: 1fr;
  }
  .serial-scan-button.with-text {
    width: 100%;
  }
  .serial-scan-button.icon-only {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
}
.action-icon-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 30;
  width: max-content;
  max-width: 180px;
  padding: 6px 9px;
  border-radius: 8px;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .22);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .14s ease, transform .14s ease;
}
.action-icon-button::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  z-index: 31;
  border: 5px solid transparent;
  border-top-color: #0f172a;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}
.action-icon-button:hover::after,
.action-icon-button:focus-visible::after,
.action-icon-button:hover::before,
.action-icon-button:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}
.action-icon-button:hover::before,
.action-icon-button:focus-visible::before {
  transform: translateX(-50%);
}
.action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.pill {
  min-height: 28px;
  padding: 4px 10px;
  border-color: #bfdbfe;
  color: var(--primary);
  background: #eff6ff;
}

.landing-shell {
  min-height: 100vh;
  color: var(--text-strong);
}
.landing-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 10px max(16px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid rgba(203, 213, 225, .8);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.landing-logo {
  display: inline-flex;
  align-items: center;
  width: 176px;
  height: 50px;
  overflow: hidden;
  border-radius: 14px;
  background: #07142f;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}
.landing-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.landing-nav,
.landing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.landing-nav a:not(.button-link) {
  color: var(--text-strong);
  font-weight: 800;
  padding: 9px 10px;
  border-radius: 10px;
  transition: color .16s ease, background .16s ease;
}
.landing-nav a:not(.button-link):hover {
  color: var(--primary);
  background: #eff6ff;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  color: var(--text-strong);
  background: var(--surface);
  font-weight: 850;
  text-decoration: none;
}
.button-link.primary {
  border-color: var(--primary);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 26px rgba(37, 99, 235, .22);
}
.button-link.secondary {
  background: rgba(255,255,255,.82);
}
.landing-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 72px;
}
.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 190px);
}
.landing-hero-copy {
  display: grid;
  gap: 22px;
}
.eyebrow,
.section-kicker {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.landing-hero h1 {
  max-width: 760px;
  color: var(--text-strong);
  font-size: clamp(44px, 7vw, 82px);
  line-height: .96;
  letter-spacing: 0;
  text-shadow: none;
  transform: none;
}
.landing-hero p,
.landing-section > p,
.landing-final-cta p {
  max-width: 650px;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1.65;
}
.landing-product-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 24px 80px rgba(15, 23, 42, .16);
}
.landing-window-bar {
  display: flex;
  gap: 7px;
}
.landing-window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #cbd5e1;
}
.landing-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.landing-stats span,
.landing-table-preview span {
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-muted);
}
.landing-stats strong {
  display: block;
  color: var(--primary);
  font-size: 26px;
}
.landing-table-preview {
  display: grid;
  grid-template-columns: 1fr .8fr 1.2fr;
  gap: 8px;
  font-size: 14px;
}
.landing-section {
  display: grid;
  gap: 18px;
  padding: 76px 0 0;
}
.landing-section h2,
.landing-final-cta h2 {
  max-width: 760px;
  color: var(--text-strong);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}
.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.landing-card,
.landing-step,
.landing-price-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}
.landing-card {
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.landing-card:hover {
  border-color: color-mix(in srgb, var(--primary) 46%, var(--border-soft));
  box-shadow: 0 18px 42px rgba(37, 99, 235, .12);
  transform: translateY(-2px);
}
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.42), transparent 28%),
    linear-gradient(135deg, #3b82f6, #2563eb 54%, #06b6d4);
  box-shadow: 0 12px 26px rgba(37, 99, 235, .24);
  transition: box-shadow .16s ease, transform .16s ease;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
}
.landing-card:hover .feature-icon {
  box-shadow: 0 16px 34px rgba(37, 99, 235, .32);
  transform: translateY(-2px);
}
.landing-card h3,
.landing-step h3,
.landing-price-card h3 {
  color: var(--text-strong);
  font-size: 20px;
}
.landing-card p,
.landing-step p,
.landing-price-card p {
  color: var(--text-muted);
  line-height: 1.55;
}
.landing-steps,
.landing-pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.landing-step strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
}
.landing-price-card strong {
  color: var(--primary);
  font-size: 28px;
}
.landing-price-card.highlight {
  border-color: color-mix(in srgb, var(--primary) 44%, var(--border-soft));
  box-shadow: 0 18px 46px rgba(37, 99, 235, .16);
}
.landing-final-cta {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-top: 76px;
  padding: 44px 24px;
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(239,246,255,.95), rgba(255,255,255,.92));
  box-shadow: 0 24px 70px rgba(15, 23, 42, .10);
}

.login-shell, .public-shell {
  display: grid;
  place-items: center;
}
.login-panel {
  border-radius: calc(var(--rf-radius) + 6px);
  background: rgba(15, 23, 42, .84);
  border-color: rgba(148, 163, 184, .34);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
.login-brand-title {
  height: clamp(96px, 14vw, 138px);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
  margin-bottom: 28px;
}
.login-panel label { color: rgba(255,255,255,.88); }
.login-panel input {
  color: #fff;
  border-color: rgba(203, 213, 225, .52);
  background: rgba(15, 23, 42, .36);
}
.login-panel input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .18);
}
.login-subtitle a {
  color: #dbeafe;
  font-weight: 650;
}

.manage-layout {
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr);
  gap: 18px;
}
.manage-column { gap: 18px; }
.technician-edit-card,
.part-edit-card,
.parts-tree > details {
  border-radius: 14px;
  box-shadow: none;
}
.scan-card {
  border-radius: var(--rf-radius);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}

html[data-glass="true"] .panel,
html[data-glass="true"] .card,
html[data-glass="true"] .stat,
html[data-glass="true"] .table-wrap,
html[data-glass="true"] .scan-card {
  backdrop-filter: blur(var(--rf-backdrop-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--rf-backdrop-blur)) saturate(1.2);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.personalization-actions {
  align-items: center;
  gap: 10px;
}
.saved-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--success) 28%, var(--border-soft));
  border-radius: 999px;
  color: color-mix(in srgb, var(--success) 72%, var(--text-strong));
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  font-size: 13px;
  font-weight: 800;
  opacity: .82;
  transition: opacity .16s ease, transform .16s ease;
}
.saved-indicator.show {
  opacity: 1;
  transform: translateY(-1px);
}
.theme-card {
  display: grid;
  gap: 12px;
  min-height: 176px;
  padding: 16px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
html[dir="rtl"] .theme-card { text-align: right; }
.theme-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.theme-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10), 0 14px 30px rgba(15, 23, 42, .08);
}
.theme-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.theme-card-head strong {
  font-size: 16px;
}
.theme-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.theme-preview span {
  display: block;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
}
.personalization-layout {
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(300px, 1.05fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}
.settings-stack {
  display: grid;
  gap: 14px;
}
.range-control,
.toggle-control,
.color-control {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-muted) 88%, transparent);
  color: var(--text-strong);
}
.range-control > span,
.color-control > span,
.toggle-control {
  align-items: center;
}
.range-control > span,
.color-control > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.range-control output,
.color-control output {
  color: color-mix(in srgb, var(--text-muted) 72%, var(--text-strong));
  font-weight: 700;
}
.range-control input[type="range"] {
  accent-color: var(--primary);
}
.toggle-control {
  grid-template-columns: minmax(0, 1fr) auto;
}
.toggle-control input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--primary);
}
.color-control input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px;
}
.personalization-preview {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--rf-radius);
  border: 1px solid var(--border-soft);
  background: linear-gradient(135deg, var(--surface-muted), var(--surface));
}
.preview-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--rf-radius);
  background: color-mix(in srgb, var(--surface) calc(var(--rf-card-opacity) * 100%), transparent);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, .10),
    0 0 calc(34px * var(--rf-glow-strength)) color-mix(in srgb, var(--rf-glow-color) 55%, transparent);
}
html[data-glass="true"] .preview-card {
  backdrop-filter: blur(var(--rf-backdrop-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--rf-backdrop-blur)) saturate(1.2);
}
.preview-card strong {
  font-size: 20px;
}
.preview-sidebar {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--rf-radius);
  background: color-mix(in srgb, var(--menu-bg) calc(var(--rf-sidebar-opacity) * 100%), transparent);
  box-shadow: 0 0 calc(30px * var(--rf-glow-strength)) color-mix(in srgb, var(--rf-glow-color) 55%, transparent);
}
.preview-sidebar span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--menu-text) 72%, transparent);
}
.preview-sidebar span:nth-child(2) { width: 78%; }
.preview-sidebar span:nth-child(3) { width: 56%; }
.background-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, .9fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}
.upload-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-strong);
  cursor: pointer;
}
.upload-button input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.background-preview {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--rf-radius);
  background: color-mix(in srgb, var(--surface) calc(var(--rf-card-opacity) * 100%), transparent);
}
.background-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.background-preview-frame {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: calc(var(--rf-radius) - 4px);
  border: 1px solid var(--border-soft);
  color: #fff;
  background:
    linear-gradient(rgba(0,0,0,var(--rf-bg-dim)), rgba(0,0,0,var(--rf-bg-dim))),
    var(--rf-bg-image),
    linear-gradient(135deg, var(--app-bg-soft), var(--app-bg));
  background-size: auto, var(--rf-bg-fit), cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(var(--rf-bg-brightness));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.background-preview-frame img,
.background-preview-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--preview-fit, cover);
  filter: brightness(var(--rf-bg-brightness)) blur(min(var(--rf-bg-blur), 10px));
  transform: scale(1.02);
}
.background-preview-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0,0,0,var(--rf-bg-dim)), rgba(0,0,0,var(--rf-bg-dim))),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.16), transparent 28%);
}
.background-preview-empty,
.background-preview-frame > span {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .66);
  backdrop-filter: blur(8px);
  z-index: 1;
}

@media (max-width: 820px) {
  html,
  body,
  #app,
  .shell {
    max-width: 100%;
    overflow-x: hidden;
  }
  body.menu-open {
    overflow: hidden;
  }
  body.menu-open::after {
    display: none;
  }
  .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2400;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .38);
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transition: opacity .16s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  .menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  img,
  video,
  canvas,
  svg {
    max-width: 100%;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 2000;
  }
  .topbar-inner {
    align-items: center;
    flex-direction: row;
    min-height: 64px;
    padding: 8px 12px;
    gap: 10px;
    width: 100%;
  }
  .brand {
    flex: 0 1 148px;
    width: 148px;
    min-width: 0;
    height: 42px;
    padding-inline: 0;
  }
  .top-actions {
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
    min-width: 0;
  }
  .menu-toggle {
    width: auto;
    min-height: 42px;
    min-width: 78px;
    padding-inline: 14px;
  }
  .nav {
    position: fixed;
    top: 74px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 3200;
    border-radius: 18px;
    isolation: isolate;
  }
  .nav a {
    min-height: 44px;
  }
  .menu-footer {
    gap: 10px;
  }
  .main {
    width: 100%;
    max-width: 100%;
    padding: 18px 12px 42px;
  }
  .page-title {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .page-title .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card.stat {
    min-height: 86px;
  }
  .panel { padding: 16px; border-radius: 16px; }
  .login-shell {
    padding: 14px;
    align-items: center;
  }
  .login-main {
    width: 100%;
  }
  .login-panel {
    width: 100%;
    padding: 22px 16px 24px;
    border-radius: 18px;
  }
  .login-title { margin-bottom: 22px; }
  .login-brand-title {
    height: 82px;
    border-radius: 18px;
    margin-bottom: 22px;
  }
  .toolbar { grid-template-columns: 1fr; }
  .toolbar input, .toolbar select, .toolbar button { width: 100%; max-width: none; }
  .landing-header {
    position: sticky;
    width: 100%;
    padding: 10px 12px;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  .landing-logo {
    width: 144px;
    height: 42px;
    border-radius: 12px;
  }
  .landing-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }
  .landing-nav a:not(.button-link) {
    justify-content: center;
    padding: 9px 8px;
    font-size: 13px;
    text-align: center;
  }
  .landing-nav .button-link {
    justify-content: center;
    min-height: 38px;
    padding-inline: 12px;
    width: 100%;
  }
  .landing-main {
    width: min(100% - 24px, 1180px);
    padding-top: 28px;
  }
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 0;
  }
  .landing-hero h1 {
    font-size: clamp(34px, 11vw, 52px);
    line-height: 1.02;
  }
  .landing-hero p {
    font-size: 18px;
  }
  .landing-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .landing-actions .button-link {
    width: 100%;
    justify-content: center;
  }
  .landing-product-panel,
  .landing-final-cta {
    padding: 18px;
    border-radius: 18px;
  }
  .landing-stats,
  .landing-table-preview,
  .landing-steps,
  .landing-pricing {
    grid-template-columns: 1fr;
  }
  .landing-section {
    padding-top: 52px;
  }
  .personalization-layout { grid-template-columns: 1fr; }
  .personalization-actions { width: 100%; justify-content: stretch; }
  .personalization-actions button,
  .personalization-actions .saved-indicator { flex: 1; justify-content: center; }
  .background-layout { grid-template-columns: 1fr; }
  .upload-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .background-preview-frame { min-height: 180px; }
  html[data-background-type="video"] .video-bg video { filter: brightness(var(--rf-bg-brightness)); }
  html[data-background-type="image"] .video-bg::before { filter: brightness(var(--rf-bg-brightness)); }
  table { min-width: 760px; }
}

@media (max-width: 430px) {
  .topbar-inner {
    padding-inline: 10px;
  }
  .brand {
    flex-basis: 132px;
    width: 132px;
    height: 38px;
  }
  .menu-toggle {
    min-width: 72px;
    min-height: 40px;
    padding-inline: 12px;
  }
  .nav {
    top: 66px;
    left: 8px;
    right: 8px;
    max-height: calc(100dvh - 78px);
    padding: 12px;
  }
  .main {
    padding-inline: 10px;
  }
  .login-panel {
    padding: 18px 14px 22px;
  }
  .login-brand-title {
    height: 70px;
  }
  .login-panel button.primary {
    min-height: 50px;
  }
  .landing-header {
    padding-inline: 10px;
  }
  .landing-logo {
    width: 136px;
    height: 40px;
  }
  .landing-main {
    width: min(100% - 20px, 1180px);
  }
  .landing-hero h1 {
    font-size: clamp(32px, 12vw, 44px);
  }
  .landing-hero p {
    font-size: 16px;
  }
}

@media print {
  @page repairReport {
    size: A4;
    margin: 12mm;
  }
  body.report-route {
    background: #fff !important;
  }
  body.report-route .main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }
  body.report-route .repair-report {
    width: auto !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 16mm 0 14mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body.report-route .report-page-chrome {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8mm;
    color: #667085;
    font-size: 9px;
    letter-spacing: .02em;
  }
  body.report-route .report-page-header {
    top: 0;
    padding-bottom: 3mm;
    border-bottom: 1px solid #e4e7ec;
  }
  body.report-route .report-page-footer {
    bottom: 0;
    padding-top: 3mm;
    border-top: 1px solid #e4e7ec;
  }
  body.report-route .report-status,
  body.report-route .report-mini-badge {
    border-color: #667085 !important;
    background: #f8fafc !important;
    color: #101828 !important;
  }
  body.report-route .report-qr-frame,
  body.report-route .report-real-qr {
    background: #fff !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
  }
  body.report-route .report-section,
  body.report-route .report-notes > div,
  body.report-route .report-table tr,
  body.report-route .report-photo-card,
  body.report-route .report-signature-box {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.report-route .report-photos-section,
  body.report-route .report-photo-group,
  body.report-route .report-timeline-section {
    break-inside: auto;
    page-break-inside: auto;
  }
  body.report-route .report-timeline-table {
    font-size: 10px !important;
  }
  body.report-route .report-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4mm !important;
  }
  body.report-route .report-photo-card img {
    height: 45mm !important;
  }
}

@media (max-width: 700px) {
  #itemForm {
    padding-bottom: calc(182px + env(safe-area-inset-bottom));
  }
  .intake-form {
    width: 100%;
    padding: 16px;
    border-radius: 18px;
  }
  .design-mode-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .design-toolbar-main,
  .design-global-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .design-global-controls label {
    width: 100%;
  }
  .intake-section-stack {
    gap: 14px;
  }
  .intake-section-display-head {
    padding: 12px 12px 0;
  }
  .intake-section-display-head h2 {
    font-size: 15px;
  }
  .section-style-controls {
    grid-template-columns: 1fr;
    margin: 10px 12px 0;
  }
  .field-width-full,
  .field-width-half,
  .field-width-third {
    grid-column: 1 / -1;
  }
  .field-design-bar {
    flex-wrap: wrap;
  }
  .field-design-actions {
    width: 100%;
    margin-left: 0;
  }
  .field-design-actions button {
    flex: 1;
    min-height: 42px;
  }
  .field-settings-popover {
    grid-template-columns: 1fr;
  }
  .intake-design-section-body {
    padding: 12px;
  }
  .intake-form.design-mode-active .intake-design-section-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .design-section-actions {
    width: 100%;
    margin-left: 0;
  }
  .design-section-actions button {
    flex: 1;
    min-height: 44px;
  }
  .intake-form .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .intake-form label {
    font-size: 14px;
  }
  .intake-form input,
  .intake-form select,
  .intake-form textarea {
    min-height: 46px;
    font-size: 16px;
  }
  .intake-section-title {
    font-size: 13px;
    margin-top: 4px;
  }
  .intake-top-actions {
    top: 72px;
    justify-content: stretch;
    gap: 7px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 14px;
  }
  .intake-top-actions button {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    padding-inline: 10px;
    font-size: 13px;
  }
  .selected-parts-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    z-index: 2290;
    margin: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .selected-parts-panel[data-count="0"] {
    display: none;
  }
  .selected-parts-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 18px;
    color: var(--primary-strong);
    background: rgba(255, 255, 255, .92);
    font-weight: 850;
  }
  .selected-parts-content {
    display: none;
    max-height: 34vh;
    overflow: auto;
    min-width: 0;
    margin: 0 8px 8px;
    padding: 10px;
    border-radius: 14px;
  }
  .selected-parts-content.expanded {
    display: grid;
  }
  .selected-parts-head {
    font-size: 13px;
  }
  .selected-parts-list {
    display: grid;
    grid-template-columns: 1fr;
  }
  .selected-part-card {
    gap: 8px;
    padding: 9px;
    border-radius: 14px;
  }
  .selected-part-controls {
    grid-template-columns: 1fr;
  }
  .quantity-stepper {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
  .quantity-stepper button,
  .quantity-stepper input,
  .selected-part-controls select {
    min-height: 44px;
  }
  .selected-part-remove {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 44px;
    border-radius: 12px;
  }
  .selected-part-chip {
    justify-content: space-between;
    min-height: 44px;
    border-radius: 12px;
  }
  .selected-part-chip button {
    width: 34px;
    height: 34px;
  }
  .intake-scan-panel {
    padding: 14px;
    border-radius: 16px;
    margin-bottom: 16px;
  }
  .intake-scan-panel h2 {
    font-size: 18px;
  }
  .intake-scan-actions,
  .intake-manual-scan {
    grid-template-columns: 1fr;
  }
  .intake-scan-main,
  .intake-manual-scan button,
  .scan-found .primary {
    width: 100%;
    min-height: 48px;
  }
  .intake-manual-scan input {
    min-height: 48px;
  }
  .intake-scan-result .notice,
  .intake-scan-result .error {
    font-size: 14px;
  }
  .photo-workflow {
    padding: 14px;
    border-radius: 16px;
  }
  .photo-workflow-head {
    align-items: stretch;
    flex-direction: column;
  }
  .photo-actions {
    grid-template-columns: 1fr;
  }
  .signature-workflow {
    padding: 14px;
    border-radius: 16px;
  }
  .signature-capture-grid {
    grid-template-columns: 1fr;
  }
  .signature-capture-head,
  .signature-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .signature-actions button {
    width: 100%;
    min-height: 46px;
  }
  .signature-pad {
    height: 190px;
  }
  .photo-pick-button {
    min-height: 54px;
  }
  .photo-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .photo-preview-button img {
    height: 112px;
  }
  .photo-edit-card {
    padding: 8px;
  }
  .photo-edit-card select,
  .photo-edit-card input {
    min-height: 44px;
  }
  .photo-remove-button {
    width: 38px;
    height: 38px;
  }
  .mobile-action-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 2300;
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr 1fr 1fr;
    gap: 7px;
    padding: 9px;
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 22px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 20px 48px rgba(15, 23, 42, .24);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    animation: mobileBarIn .18s ease-out;
  }
  .mobile-action {
    min-width: 0;
    min-height: 48px;
    padding: 7px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.1;
    white-space: normal;
  }
  .mobile-action.primary {
    color: #fff;
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: 0 12px 24px rgba(37, 99, 235, .24);
  }
  .mobile-action.secondary {
    color: var(--text);
    border-color: rgba(203, 213, 225, .9);
    background: rgba(255, 255, 255, .78);
  }
  .mobile-action:active {
    transform: translateY(1px) scale(.98);
  }
  .mobile-action:disabled {
    opacity: .42;
    box-shadow: none;
  }
}

@keyframes mobileBarIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 700px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .table-wrap tbody {
    display: grid;
    gap: 12px;
  }
  .table-wrap tr {
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) calc(var(--rf-card-opacity) * 100%), transparent);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
  }
  .table-wrap tr.hidden {
    display: none;
  }
  .table-wrap tr.platform-detail-row {
    margin-top: -8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .table-wrap td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(203, 213, 225, .72);
    color: var(--text-strong);
    text-align: right;
    word-break: break-word;
  }
  html[dir="ltr"] .table-wrap td {
    text-align: right;
  }
  .table-wrap td:last-child {
    border-bottom: 0;
  }
  .table-wrap td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .02em;
    text-align: left;
    text-transform: uppercase;
  }
  html[dir="rtl"] .table-wrap td::before {
    text-align: right;
  }
  .table-wrap td:not([data-label]) {
    display: block;
    text-align: left;
  }
  .table-wrap td:not([data-label])::before {
    content: none;
  }
  .table-wrap td.row-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    gap: 8px;
    padding-top: 12px;
    max-width: none;
  }
  .table-wrap td.row-actions::before {
    grid-column: 1 / -1;
    flex: none;
    text-align: left;
  }
  html[dir="rtl"] .table-wrap td.row-actions::before {
    text-align: right;
  }
  .table-wrap td.row-actions button,
  .table-wrap td.row-actions .action-icon-button {
    width: 100%;
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    border-radius: 13px;
  }
  .table-wrap td.row-actions .action-icon-button::before,
  .table-wrap td.row-actions .action-icon-button::after {
    display: none;
  }
  .table-wrap input,
  .table-wrap select {
    width: 100%;
    min-height: 42px;
  }
  .platform-detail {
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--surface-muted);
  }
}

@media (max-width: 900px) {
  .personalization-preview {
    position: static;
  }
  .dashboard-insights {
    grid-template-columns: 1fr;
  }
  .status-workflow-form {
    grid-template-columns: 1fr;
  }
  .status-progress,
  .public-status-progress {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .personalization-actions,
  .upload-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .background-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  @page { margin: 0; }
  body { background: #fff !important; }
  .video-bg, .topbar, .no-print, .page-title .actions { display: none !important; }
  .main, .print-page { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .repair-report {
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    padding: 14mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .report-section,
  .report-photo-group,
  .report-photo-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .report-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .report-photo-card img {
    height: 45mm !important;
  }
  .print-label, .receipt {
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    page-break-after: always;
  }
}
