/* ═══════════════════════════════════════════════
   CHASSI PRO — Premium Design System v2.0
   ═══════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --bg: #06101c;
  --surface: rgba(12, 24, 42, 0.3);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.04);
  --text: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.58);
  --text-tertiary: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --electric: #3b82f6;
  --teal: #14b8a6;
  --mint: #9ff4df;
  --gold: #f5a524;
  --ok: #22c55e;
  --ok-glow: rgba(34, 197, 94, 0.2);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 24px 64px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.08), 0 0 80px rgba(20, 184, 166, 0.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --rail: min(1120px, calc(100% - clamp(40px, 8vw, 120px)));
  color-scheme: dark;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* ── Base ── */
html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'tnum';
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.auth-checking .app,
body.auth-guest .app {
  display: none;
}

body.auth-authenticated .login-screen {
  display: none;
}

/* ── Auth ── */
.login-screen {
  min-height: 100vh;
  width: var(--rail);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: clamp(22px, 4.8vh, 54px) 0;
}

.login-shell {
  position: relative;
  width: min(1120px, 100%);
  min-height: min(560px, calc(100vh - 52px));
  display: grid;
  grid-template-columns: minmax(360px, 456px) minmax(410px, 1fr);
  align-items: center;
  gap: clamp(44px, 7vw, 104px);
  padding: 0;
}

.login-shell::before {
  content: none;
}

.login-shell::after {
  content: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  order: 1;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.login-brand h1 {
  max-width: 520px;
  margin: 0 0 18px;
  font-size: clamp(39px, 4.9vw, 64px);
  line-height: 0.88;
  font-weight: 900;
  letter-spacing: 0;
  background: linear-gradient(135deg, #fff 0%, rgba(238, 244, 255, 0.82) 48%, rgba(255, 232, 168, 0.86) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease-in-out infinite alternate;
}

.login-brand p {
  max-width: 430px;
  margin: 0;
  color: rgba(226, 232, 240, 0.76);
  font-size: 15.5px;
  line-height: 1.72;
  font-weight: 560;
}

.login-card {
  position: relative;
  z-index: 2;
  order: 2;
  overflow: visible;
  width: 100%;
  max-width: 392px;
  justify-self: end;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.145), rgba(255, 255, 255, 0.045) 38%, rgba(255, 255, 255, 0.025)),
    rgba(8, 14, 24, 0.58);
  backdrop-filter: blur(34px) saturate(1.25);
  -webkit-backdrop-filter: blur(34px) saturate(1.25);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.52),
    0 12px 34px rgba(2, 8, 23, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 -1px 0 rgba(255, 255, 255, 0.055) inset;
  animation: panel-arrive 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.13), transparent 18%, transparent 72%, rgba(255, 255, 255, 0.045)),
    linear-gradient(180deg, transparent 64%, rgba(2, 8, 23, 0.2));
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent 8%, rgba(255, 255, 255, 0.52) 36%, rgba(159, 244, 223, 0.5) 68%, transparent 92%) top / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 26%) top / 100% 72px no-repeat;
  opacity: 0.85;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-card-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 30px;
}

.login-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--mint);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.login-card-head strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
}

.login-card-head small {
  display: block;
  margin-top: 5px;
  color: rgba(226, 232, 240, 0.56);
  font-size: 12px;
  font-weight: 650;
}

.login-field {
  margin-top: 18px;
}

.login-card label {
  display: block;
  margin: 0 0 8px;
  color: rgba(242, 246, 252, 0.82);
  font-size: 12px;
  font-weight: 780;
}

.login-input-wrap {
  height: 50px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 9px 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(3, 9, 18, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 24px rgba(0, 0, 0, 0.16);
  color: rgba(159, 244, 223, 0.68);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.login-input-wrap > svg {
  justify-self: center;
  opacity: 0.92;
}

.login-input-wrap:focus-within {
  border-color: rgba(159, 244, 223, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.024)),
    rgba(3, 12, 24, 0.58);
  color: rgba(159, 244, 223, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.095),
    0 0 0 3px rgba(159, 244, 223, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.22);
}

.login-card .login-input-wrap input {
  width: 100%;
  height: 48px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 620;
  caret-color: var(--mint);
  transition: none;
}

.login-card .login-input-wrap input:focus {
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.login-card .login-input-wrap input::placeholder {
  color: rgba(226, 232, 240, 0.34);
}

.login-card .login-input-wrap input::selection {
  background: rgba(159, 244, 223, 0.22);
  color: #ffffff;
}

.login-card .login-input-wrap input:hover,
.login-card .login-input-wrap input:active {
  background: transparent;
  box-shadow: none;
}

.login-card .login-input-wrap input:-webkit-autofill,
.login-card .login-input-wrap input:-webkit-autofill:hover,
.login-card .login-input-wrap input:-webkit-autofill:focus,
.login-card .login-input-wrap input:-webkit-autofill:active {
  -webkit-text-fill-color: rgba(255, 255, 255, 0.92);
  caret-color: var(--mint);
  box-shadow: 0 0 0 1000px transparent inset;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 999999s ease-in-out 0s, color 999999s ease-in-out 0s;
}

.password-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 232, 240, 0.66);
  box-shadow: none;
}

.login-card .password-toggle {
  min-width: 0;
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 10px;
}

.password-toggle:hover {
  border-color: rgba(159, 244, 223, 0.25);
  color: #fff;
  background: rgba(159, 244, 223, 0.08);
}

.login-card button {
  width: 100%;
  margin-top: 24px;
  height: 50px;
  border-radius: 12px;
}

#login-submit {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, #4aa8ff 0%, #1fb7a9 100%);
  box-shadow:
    0 14px 28px rgba(20, 184, 166, 0.16),
    0 10px 22px rgba(59, 130, 246, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

#login-submit:hover {
  box-shadow:
    0 16px 34px rgba(20, 184, 166, 0.2),
    0 12px 26px rgba(59, 130, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#login-submit:focus-visible,
.password-toggle:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(159, 244, 223, 0.18),
    0 16px 34px rgba(20, 184, 166, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* ── Mobile Blocker ── */
.mobile-blocker {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999999;
  background-color: #020617;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  box-sizing: border-box;
}

.mobile-blocker svg {
  color: var(--mint, #22d3ee);
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.mobile-blocker h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.mobile-blocker p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  line-height: 1.5;
  max-width: 320px;
}

.mobile-notice {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 320px;
}

.neon-highlight {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.05);
  box-shadow: 
    0 0 10px rgba(34, 211, 238, 0.2),
    inset 0 0 15px rgba(34, 211, 238, 0.1);
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
  animation: neon-pulse 2s ease-in-out infinite alternate;
}

@keyframes neon-pulse {
  0% {
    box-shadow: 
      0 0 10px rgba(34, 211, 238, 0.2),
      inset 0 0 15px rgba(34, 211, 238, 0.1);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
    border-color: rgba(34, 211, 238, 0.5);
  }
  100% {
    box-shadow: 
      0 0 20px rgba(34, 211, 238, 0.5),
      0 0 35px rgba(34, 211, 238, 0.3),
      inset 0 0 20px rgba(34, 211, 238, 0.2);
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.9), 0 0 24px rgba(34, 211, 238, 0.6);
    border-color: rgba(34, 211, 238, 0.9);
  }
}

@media (max-width: 760px) {
  body > *:not(.mobile-blocker) {
    display: none !important;
  }
  .mobile-blocker {
    display: flex !important;
  }
}

.login-card .password-toggle {
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 10px;
}

.login-status {
  min-height: 32px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.026);
  color: rgba(226, 232, 240, 0.54);
  font-size: 11.5px;
  font-weight: 800;
}

.login-status.error {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
}

.login-status.loading {
  border-color: rgba(159, 244, 223, 0.16);
  background: linear-gradient(110deg, #888 30%, #fff 50%, #888 70%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: loading-text-shimmer 1.2s linear infinite;
}

.login-footnote {
  margin-top: 15px;
  color: rgba(226, 232, 240, 0.42);
  font-size: 10.5px;
  font-weight: 680;
  text-align: center;
}

/* ── Ambient Background ── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url('/bg-premium.png?v=e76e329d') center/cover no-repeat;
  opacity: 0.10;
}

/* ── Starfield Layer ── */
.starfield {
  position: fixed;
  inset: -8%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(6, 16, 28, 0) 0%, rgba(6, 16, 28, 0.22) 62%, rgba(6, 16, 28, 0.72) 100%),
    url('/falling-stars-stars.gif?v=89435d7c') center/cover repeat;
  opacity: 0.02;
  mix-blend-mode: screen;
  filter: saturate(0.95) contrast(1.08);
}

/* ── Floating Glow Orbs ── */
.glow-orb {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  will-change: transform;
}

.glow-orb--1 {
  top: -10%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 70%);
  animation: orb-float-1 18s ease-in-out infinite;
}

.glow-orb--2 {
  top: 30%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.35), transparent 70%);
  animation: orb-float-2 22s ease-in-out infinite;
}

.glow-orb--3 {
  bottom: -15%;
  left: 40%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(245, 165, 36, 0.2), transparent 70%);
  animation: orb-float-3 25s ease-in-out infinite;
}

@keyframes orb-float-1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(60px, 40px) scale(1.1);
  }

  66% {
    transform: translate(-30px, 20px) scale(0.95);
  }
}

@keyframes orb-float-2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-40px, -30px) scale(1.08);
  }

  66% {
    transform: translate(20px, 50px) scale(0.92);
  }
}

@keyframes orb-float-3 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -40px) scale(1.05);
  }

  66% {
    transform: translate(-50px, -20px) scale(0.97);
  }
}

/* ── App Container ── */
.app {
  width: var(--rail);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vh, 64px) 0;
}

/* ── Hero ── */
.hero {
  max-width: 760px;
  margin: 0 auto 32px;
  text-align: center;
  color: #fff;
  opacity: 1;
  max-height: 320px;
  transform: translateY(0);
  transition: opacity 400ms ease, max-height 500ms ease, margin 500ms ease, transform 500ms ease;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(16px);
}

.hero h1 {
  max-width: 720px;
  margin: 20px auto 14px;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 50%, var(--mint) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease-in-out infinite alternate;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 480;
  letter-spacing: -0.01em;
}

/* ── Panel (Glass Card) ── */
.panel {
  position: relative;
  z-index: 2;
  width: min(2000px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2vw, 26px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(14, 28, 48, 0.3) 0%, rgba(8, 18, 32, 0.25) 100%);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform-origin: top center;
  animation: panel-arrive 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--electric), var(--teal), var(--gold));
  background-size: 200% auto;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  animation: gradient-bar 4s linear infinite;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 2px 0 auto;
  height: 80px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
}

@keyframes gradient-bar {
  0% {
    background-position: 0% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes quote-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: saturate(0.85);
  }

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

@keyframes panel-arrive {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

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

/* ── Toolbar ── */
.toolbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  z-index: 3;
}

.auth-user {
  position: fixed;
  top: clamp(18px, 3vh, 32px);
  right: max(24px, calc((100vw - 1120px) / 2));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: calc(100vw - 36px);
  padding: 6px 6px 6px 13px;
  border: 1px solid rgba(159, 244, 223, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(4, 12, 24, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 38px rgba(2, 8, 23, 0.28),
    0 0 24px rgba(20, 184, 166, 0.07);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

body.auth-authenticated:not(.workbench-mode) .app {
  padding-top: clamp(92px, 12vh, 128px);
}

.auth-user span {
  max-width: 260px;
  overflow: hidden;
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  min-width: 0;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.78), rgba(20, 184, 166, 0.82));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 22px rgba(2, 8, 23, 0.16);
  font-size: 12px;
  font-weight: 850;
}

body.workbench-mode .auth-user {
  top: clamp(24px, 3vh, 48px);
  right: max(5px, calc((100vw - min(1280px, calc(100vw - clamp(24px, 4vw, 72px)))) / 2 - 53px));
  padding: 4px;
  border-radius: 13px;
}

body.workbench-mode .auth-user span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

body.workbench-mode .logout-button {
  width: 42px;
  height: 42px;
  justify-content: center;
  padding: 0;
  border-radius: 11px;
}

body.workbench-mode .logout-button span {
  display: none;
}

body.workbench-mode .logout-button svg {
  width: 17px;
  height: 17px;
}

/* ── Tabs ── */
.tabs {
  width: fit-content;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(159, 244, 223, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    rgba(4, 12, 24, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 16px 34px rgba(2, 8, 23, 0.24);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  position: relative;
  z-index: 1;
  max-width: 100%;
  isolation: isolate;
}

.toolbar .tabs {
  margin: 0;
}

.tab {
  position: relative;
  height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 11px;
  padding: 0 17px;
  background: transparent;
  color: rgba(226, 232, 240, 0.58);
  box-shadow: none;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  cursor: pointer;
  overflow: hidden;
  transform: translateY(0);
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 220ms ease,
    transform 180ms ease;
}

.tab::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.025));
  opacity: 0;
  transition: opacity 180ms ease;
}

.tab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, transparent, rgba(159, 244, 223, 0.72), transparent);
  opacity: 0;
  transform: scaleX(0.62);
  transition: opacity 180ms ease, transform 220ms ease;
}

.tab svg {
  flex: 0 0 auto;
  opacity: 0.58;
  filter: drop-shadow(0 0 0 rgba(159, 244, 223, 0));
  transition: opacity 180ms ease, filter 220ms ease, transform 180ms ease;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(2, 8, 23, 0.14);
  transform: translateY(-1px);
}

.tab:hover::before {
  opacity: 0.5;
}

.tab:hover::after {
  opacity: 0.45;
  transform: scaleX(1);
}

.tab:hover svg {
  opacity: 0.88;
  transform: translateY(-0.5px);
}

.tab.active {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.92));
  color: #07111f;
  box-shadow:
    0 13px 28px rgba(2, 8, 23, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 24px rgba(20, 184, 166, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.tab.active::before {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.72), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
}

.tab.active::after {
  opacity: 0.82;
  transform: scaleX(1);
  background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.72), rgba(34, 211, 238, 0.7), transparent);
}

.tab.active svg {
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(20, 184, 166, 0.18));
}

.tab:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(20, 184, 166, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.view {
  display: block;
}

/* ── Search ── */
.search {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}

.search label {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.search-row {
  display: flex;
  gap: 10px;
  min-width: 0;
}

/* ── Inputs ── */
input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 0 14px;
  background: rgba(4, 12, 24, 0.7);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 550;
  caret-color: var(--mint);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

input:focus {
  outline: 0;
  border-color: rgba(20, 184, 166, 0.6);
  box-shadow:
    0 0 0 1px rgba(20, 184, 166, 0.5),
    0 0 0 4px rgba(20, 184, 166, 0.1),
    0 0 20px rgba(20, 184, 166, 0.08),
    inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(4, 12, 24, 0.95) inset;
  transition: background-color 9999s ease-out;
}

/* ── Buttons ── */
button {
  height: 44px;
  min-width: 110px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0 20px;
  background: linear-gradient(135deg, var(--electric) 0%, var(--teal) 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 150ms ease, box-shadow 200ms ease, filter 200ms ease;
  position: relative;
  overflow: hidden;
}

button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 300ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.08);
}

button:hover::after {
  opacity: 1;
  animation: btn-shine 0.6s ease forwards;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
  filter: none;
}

@keyframes btn-shine {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

/* ── Status ── */
.status {
  min-height: 18px;
  margin: 12px 14px 10px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.status.ok {
  color: var(--mint);
}

.status.error {
  color: #fca5a5;
}

@keyframes loading-text-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.status.loading,
.quote-status.loading,
.plate-verify-status.loading,
.loading-text-shimmer {
  background: linear-gradient(110deg, #888 30%, #fff 50%, #888 70%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: loading-text-shimmer 1.5s linear infinite;
  opacity: 0.9;
}

/* ── Stock Result ── */
.stock-dashboard {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(380px, 1.1fr);
  grid-template-areas:
    "result reference"
    "plate reference"
    "compat compat";
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}

.stock-dashboard:empty {
  display: none;
}

/* ── Quote Workspace ── */
.quote-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 12px;
  animation: quote-rise 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.quote-flow,
.quote-board {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.quote-board {
  overflow: hidden;
}

.quote-flow {
  overflow: visible;
}

body.quote-mode .quote-flow,
body.quote-mode .quote-board {
  border-color: transparent;
  background:
    linear-gradient(180deg, #091322, #050c17) padding-box,
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.72),
      rgba(20, 184, 166, 0.92) 42%,
      rgba(159, 244, 223, 0.66)) border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    var(--shadow-card),
    0 0 22px rgba(20, 184, 166, 0.1);
}

body.quote-mode .quote-flow::before,
body.quote-mode .quote-board::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  pointer-events: none;
  border-radius: calc(var(--radius-lg) - 2px);
  display: none;
}

body.quote-mode .quote-flow>*,
body.quote-mode .quote-board>* {
  position: relative;
  z-index: 1;
}

.quote-flow {
  align-self: start;
  isolation: isolate;
  z-index: 200;
}

.quote-stage {
  position: relative;
  padding: 14px;
  border-top: 1px solid var(--line);
  transition:
    opacity 220ms ease,
    filter 220ms ease,
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
    background 220ms ease,
    box-shadow 220ms ease;
  transform-origin: top center;
}

.quote-stage:first-child {
  border-top: 0;
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
}

.quote-stage:last-child {
  border-bottom-left-radius: calc(var(--radius-lg) - 1px);
  border-bottom-right-radius: calc(var(--radius-lg) - 1px);
}

.quote-stage.is-active {
  z-index: 20;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 58%);
}

.quote-stage-vehicle.is-active {
  background:
    radial-gradient(circle at 12% 0%, rgba(159, 244, 223, 0.11), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.014) 68%);
  box-shadow:
    0 18px 44px rgba(2, 8, 23, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.quote-stage.is-complete {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 68%);
}

.quote-stage-parts {
  z-index: 1;
  background:
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.012) 68%);
}

.quote-flow.is-manual-mode .quote-stage-vehicle {
  z-index: 35;
}

.quote-stage-parts.is-waiting {
  opacity: 0.58;
  transform: translateY(6px) scale(0.985);
  filter: saturate(0.62);
}

.quote-stage-parts.is-waiting::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 8, 23, 0.08), rgba(2, 8, 23, 0.24));
}

.quote-flow.is-plate-guiding .quote-stage-parts.is-waiting {
  opacity: 0.42;
  transform: translateY(14px) scale(0.975);
  filter: saturate(0.48) blur(0.35px);
}

.quote-flow.is-plate-guiding .quote-stage-vehicle.is-active {
  box-shadow:
    0 20px 54px rgba(2, 8, 23, 0.34),
    0 0 26px rgba(20, 184, 166, 0.14);
}

.quote-stage-head,
.quote-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.quote-stage-head {
  justify-content: flex-start;
}

.quote-stage-head span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(159, 244, 223, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(20, 184, 166, 0.1);
  color: var(--mint);
  font-size: 11px;
  font-weight: 900;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.quote-stage.is-active .quote-stage-head span {
  border-color: rgba(159, 244, 223, 0.44);
  background: rgba(20, 184, 166, 0.2);
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.16);
}

.quote-stage.is-complete .quote-stage-head span {
  border-color: rgba(34, 197, 94, 0.36);
  background: rgba(34, 197, 94, 0.16);
  color: rgba(187, 247, 208, 0.95);
}

.quote-stage-head strong,
.quote-board-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.quote-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 9px;
}

.quote-vehicle-mode {
  position: relative;
  display: grid;
  grid-template-columns: minmax(118px, 0.48fr) minmax(90px, 0.34fr);
  align-items: end;
  gap: 4px;
  width: min(100%, 470px);
  margin: -1px 0 0;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.quote-vehicle-mode::after {
  display: none;
}

.quote-vehicle-mode button {
  position: relative;
  height: 36px;
  min-width: 0;
  margin-bottom: 0;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-bottom-color: rgba(159, 244, 223, 0.22);
  border-radius: 10px 10px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(15, 23, 42, 0.72) 52%, rgba(2, 8, 23, 0.82)),
    rgba(15, 23, 42, 0.82);
  color: rgba(226, 232, 240, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 -1px 0 rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  isolation: isolate;
  z-index: 2;
}

.quote-vehicle-mode button + button {
  border-left: 1px solid rgba(148, 163, 184, 0.32);
}

.quote-vehicle-mode button::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 44%;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent);
  border-radius: 9px 9px 0 0;
  opacity: 0.5;
  transition: opacity 160ms ease;
}

.quote-vehicle-mode button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  border-radius: 10px 10px 0 0;
  background: transparent;
  box-shadow: none;
  transition:
    background 180ms ease,
    box-shadow 180ms ease;
}

.quote-vehicle-mode button:hover {
  color: rgba(248, 250, 252, 0.9);
  transform: none;
  border-color: rgba(159, 244, 223, 0.3);
}

.quote-vehicle-mode button:hover::before {
  opacity: 1;
}

.quote-vehicle-mode button.active {
  color: rgba(204, 251, 241, 0.98);
  height: 40px;
  z-index: 4;
  border-color: rgba(159, 244, 223, 0.56);
  border-bottom-color: rgba(8, 47, 73, 0.95);
  background:
    linear-gradient(180deg, rgba(159, 244, 223, 0.18), rgba(13, 148, 136, 0.18) 44%, rgba(8, 47, 73, 0.95)),
    rgba(8, 47, 73, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 -8px 22px rgba(20, 184, 166, 0.1),
    0 1px 0 rgba(8, 47, 73, 0.95);
}

.quote-vehicle-mode button.active::after {
  background: linear-gradient(90deg, rgba(159, 244, 223, 0.92), rgba(20, 184, 166, 0.95), rgba(59, 130, 246, 0.68));
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.3);
}

.quote-stage-vehicle > .quote-form,
.quote-manual-form {
  position: relative;
  display: grid;
  margin-top: -1px;
  padding: 9px;
  border: 1px solid rgba(159, 244, 223, 0.34);
  border-top-color: rgba(159, 244, 223, 0.24);
  border-radius: 0 11px 11px 11px;
  background:
    linear-gradient(180deg, rgba(8, 47, 73, 0.56), rgba(2, 8, 23, 0.48)),
    rgba(2, 8, 23, 0.42);
  box-shadow:
    0 16px 28px rgba(2, 8, 23, 0.16),
    inset 0 1px 0 rgba(159, 244, 223, 0.08);
}

.quote-stage-vehicle > .quote-form {
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
  z-index: 30;
}

.quote-manual-form {
  grid-template-columns: 1fr;
  gap: 8px;
  z-index: 30;
}

.quote-manual-form[hidden] {
  display: none !important;
}

.quote-manual-form input {
  width: 100%;
  height: 44px;
  min-width: 0;
  border-color: rgba(159, 244, 223, 0.2);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(2, 8, 23, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 20px rgba(2, 8, 23, 0.16);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 750;
}

.quote-manual-form input:focus {
  border-color: rgba(159, 244, 223, 0.78);
  background:
    linear-gradient(180deg, rgba(159, 244, 223, 0.08), rgba(59, 130, 246, 0.035)),
    rgba(2, 8, 23, 0.68);
  box-shadow:
    0 0 0 3px rgba(20, 184, 166, 0.14),
    0 16px 34px rgba(2, 8, 23, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quote-manual-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 12000;
  display: grid;
  gap: 6px;
  max-height: min(330px, calc(100vh - 260px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid rgba(159, 244, 223, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(12, 24, 42, 0.99), rgba(5, 12, 22, 0.99)) padding-box,
    linear-gradient(135deg, rgba(159, 244, 223, 0.36), rgba(59, 130, 246, 0.2)) border-box;
  box-shadow:
    0 26px 54px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 32px rgba(20, 184, 166, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.quote-manual-results::-webkit-scrollbar {
  width: 6px;
}

.quote-manual-results::-webkit-scrollbar-track {
  background: transparent;
}

.quote-manual-results::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(159, 244, 223, 0.26);
}

.quote-manual-results::-webkit-scrollbar-thumb:hover {
  background: rgba(159, 244, 223, 0.42);
}

.quote-manual-results[hidden] {
  display: none !important;
}

.quote-manual-option {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(74px, 0.32fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  color: var(--text);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.quote-manual-option:hover,
.quote-manual-option:focus {
  outline: none;
  border-color: rgba(159, 244, 223, 0.34);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(59, 130, 246, 0.11));
  box-shadow: 0 12px 26px rgba(2, 8, 23, 0.32);
  transform: translateY(-1px);
}

.quote-manual-brand,
.quote-manual-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.quote-manual-brand {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(159, 244, 223, 0.18);
  background: rgba(20, 184, 166, 0.1);
  color: rgba(159, 244, 223, 0.92);
  font-size: 10px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-manual-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.quote-manual-option strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-manual-option small,
.quote-manual-empty {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.quote-manual-state {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 900;
}

.quote-manual-state.has-catalog {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.12);
  color: rgba(187, 247, 208, 0.92);
}

.quote-manual-empty {
  padding: 14px 10px;
  text-align: center;
}

.quote-manual-loading {
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(159, 244, 223, 0.14);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(59, 130, 246, 0.07)),
    rgba(255, 255, 255, 0.035);
}

.quote-manual-loading-orbit {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(159, 244, 223, 0.16);
  border-top-color: rgba(159, 244, 223, 0.95);
  border-right-color: rgba(59, 130, 246, 0.68);
  box-shadow:
    0 0 18px rgba(20, 184, 166, 0.18),
    inset 0 0 10px rgba(159, 244, 223, 0.08);
  animation: quote-cilia-spin 860ms linear infinite;
}

.quote-manual-loading-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.quote-manual-loading-copy strong {
  color: rgba(236, 253, 245, 0.96);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-manual-loading-copy small {
  color: rgba(226, 232, 240, 0.5);
  font-size: 10px;
  font-weight: 800;
}

.quote-manual-loading-bars {
  display: grid;
  gap: 6px;
}

.quote-manual-loading-bars i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(159, 244, 223, 0.18), rgba(159, 244, 223, 0.62), rgba(59, 130, 246, 0.18));
  background-size: 220% 100%;
  animation: quote-cilia-scan 1.1s ease-in-out infinite;
}

.quote-manual-loading-bars i:nth-child(2) {
  width: 82%;
  animation-delay: 120ms;
}

.quote-manual-loading-bars i:nth-child(3) {
  width: 62%;
  animation-delay: 240ms;
}

#quote-part-form {
  position: relative;
  grid-template-columns: 1fr;
  padding: 9px;
  border: 1px solid rgba(159, 244, 223, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(8, 47, 73, 0.42), rgba(2, 8, 23, 0.46)),
    rgba(2, 8, 23, 0.4);
  box-shadow:
    0 16px 28px rgba(2, 8, 23, 0.16),
    inset 0 1px 0 rgba(159, 244, 223, 0.06);
}

.quote-form input,
.quote-form button {
  height: 44px;
  border-radius: 11px;
  font-size: 12px;
}

.quote-stage-vehicle .quote-form input {
  border-color: rgba(159, 244, 223, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    rgba(2, 8, 23, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(2, 8, 23, 0.22);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 800;
}

.quote-stage-vehicle .quote-form input:focus {
  border-color: rgba(159, 244, 223, 0.78);
  box-shadow:
    0 0 0 3px rgba(20, 184, 166, 0.14),
    0 16px 34px rgba(2, 8, 23, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quote-stage-vehicle .quote-form button {
  min-width: 0;
  padding: 0 14px;
  color: #f8ffff;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.98), rgba(20, 184, 166, 0.96)),
    var(--teal);
  box-shadow:
    0 14px 28px rgba(20, 184, 166, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-weight: 900;
}

.quote-stage-parts.is-waiting .quote-form input,
.quote-stage-parts.is-waiting .quote-form button {
  cursor: not-allowed;
}

.quote-stage-parts #quote-part-input {
  height: 44px;
  border-color: rgba(159, 244, 223, 0.16);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(2, 8, 23, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 10px 20px rgba(2, 8, 23, 0.14);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 800;
}

.quote-stage-parts #quote-part-input:focus {
  border-color: rgba(159, 244, 223, 0.78);
  background:
    linear-gradient(180deg, rgba(159, 244, 223, 0.07), rgba(59, 130, 246, 0.032)),
    rgba(2, 8, 23, 0.72);
  box-shadow:
    0 0 0 3px rgba(20, 184, 166, 0.14),
    0 16px 34px rgba(2, 8, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quote-stage-parts #quote-part-input:disabled {
  opacity: 0.62;
}

.quote-vehicle-card {
  position: relative;
  margin-top: 12px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas:
    "mark title"
    "mark detail";
  align-items: center;
  column-gap: 10px;
  width: min(100%, 506px);
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(159, 244, 223, 0.2);
  border-radius: 11px;
  overflow: hidden;
  background:
    radial-gradient(circle at 6% 0%, rgba(159, 244, 223, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.78), rgba(6, 78, 59, 0.2) 48%, rgba(15, 23, 42, 0.68)),
    rgba(2, 8, 23, 0.66);
  box-shadow:
    0 16px 36px rgba(2, 8, 23, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 0 28px rgba(20, 184, 166, 0.08);
}

.quote-vehicle-card::before {
  content: "✓";
  grid-area: mark;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(159, 244, 223, 0.38);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(110, 231, 183, 0.24), rgba(59, 130, 246, 0.12)),
    rgba(255, 255, 255, 0.05);
  color: rgba(236, 253, 245, 0.98);
  font-size: 13px;
  font-weight: 950;
  box-shadow:
    0 0 14px rgba(20, 184, 166, 0.16),
    inset 0 0 14px rgba(159, 244, 223, 0.08);
}

.quote-vehicle-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(159, 244, 223, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 44%);
  opacity: 0.48;
}

.quote-vehicle-card span {
  display: none;
}

.quote-vehicle-card strong,
.quote-vehicle-card small {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
}

.quote-vehicle-card strong {
  grid-area: title;
  color: rgba(248, 250, 252, 0.98);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.22;
  letter-spacing: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-vehicle-card small {
  grid-area: detail;
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.72);
  font-size: 10.5px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-status {
  position: relative;
  min-height: 34px;
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 7px 10px 7px 30px;
  border: 1px solid rgba(159, 244, 223, 0.12);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(2, 8, 23, 0.32);
  color: rgba(226, 232, 240, 0.7);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 10px 22px rgba(2, 8, 23, 0.14);
}

.quote-status::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(148, 163, 184, 0.72);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.08);
}

.quote-status.ok {
  color: var(--mint);
  border-color: rgba(159, 244, 223, 0.2);
  background:
    linear-gradient(180deg, rgba(20, 184, 166, 0.1), rgba(20, 184, 166, 0.025)),
    rgba(2, 8, 23, 0.34);
}

.quote-status.ok::before {
  background: rgba(159, 244, 223, 0.95);
  box-shadow:
    0 0 0 4px rgba(20, 184, 166, 0.12),
    0 0 16px rgba(20, 184, 166, 0.32);
}

.quote-status.warn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.2);
}

.quote-status.warn::before {
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

.quote-status.error {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.22);
}

.quote-status.error::before {
  background: #fca5a5;
  box-shadow: 0 0 0 4px rgba(252, 165, 165, 0.1);
}

.quote-status.loading::before {
  background: rgba(159, 244, 223, 0.85);
  box-shadow:
    0 0 0 4px rgba(20, 184, 166, 0.1),
    0 0 16px rgba(20, 184, 166, 0.28);
  animation: quote-status-pulse 1.1s ease-in-out infinite;
}

.quote-status.loading {
  background:
    linear-gradient(180deg, rgba(20, 184, 166, 0.1), rgba(59, 130, 246, 0.025)),
    rgba(2, 8, 23, 0.34);
  background-clip: border-box;
  -webkit-background-clip: border-box;
  border-color: rgba(159, 244, 223, 0.2);
  color: rgba(204, 251, 241, 0.92);
  animation: none;
  opacity: 1;
}

@keyframes quote-status-pulse {
  0%,
  100% {
    transform: translateY(-50%) scale(0.86);
    opacity: 0.62;
  }

  50% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}

.quote-board {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.quote-board-head {
  min-height: 58px;
  margin: 0;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.quote-board-head span {
  display: block;
  margin-bottom: 2px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 750;
}

.quote-clear-button {
  width: auto;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.68);
  box-shadow: none;
  font-size: 11px;
}

.quote-board-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 360px;
}

.quote-cilia-search {
  position: relative;
  flex: 1 1 300px;
  min-width: 250px;
}

.quote-cilia-search input {
  width: 100%;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  outline: none;
}

.quote-cilia-search input:focus {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.quote-cilia-search input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.quote-cilia-search-results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  right: 0;
  width: min(680px, 72vw);
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(6, 14, 27, 0.98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.quote-cilia-search-option {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.quote-cilia-search-option:hover,
.quote-cilia-search-option:focus {
  background: rgba(34, 211, 238, 0.1);
}

.quote-cilia-image-wrap {
  position: relative;
  width: 48px;
  height: 46px;
  display: grid;
  place-items: center;
}

.quote-cilia-search-image {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.quote-cilia-search-image[data-cilia-image-url] {
  cursor: zoom-in;
}

.quote-cilia-search-image[data-cilia-image-url]::after {
  content: none;
}

.quote-cilia-search-image[data-cilia-image-url]:hover {
  transform: scale(1.06);
  border-color: rgba(159, 244, 223, 0.95);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    0 0 0 3px rgba(20, 184, 166, 0.16);
}

.quote-cilia-search-image img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}

.quote-cilia-image-preview-button {
  position: absolute;
  right: -1px;
  bottom: 1px;
  z-index: 3;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(159, 244, 223, 0.78);
  border-radius: 999px;
  background: #06251f;
  color: #9ff4df;
  cursor: zoom-in;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.34),
    0 0 0 3px rgba(6, 14, 27, 0.84);
}

.quote-cilia-image-preview-button:hover,
.quote-cilia-image-preview-button:focus {
  border-color: rgba(255, 255, 255, 0.92);
  background: #0f766e;
  color: #ffffff;
  outline: none;
  transform: scale(1.08);
}

.quote-cilia-image-wrap .quote-cilia-image-preview-button {
  all: unset;
  position: absolute !important;
  right: 1px !important;
  bottom: 1px !important;
  z-index: 4 !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 13px !important;
  min-height: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 4px !important;
  border: 1px solid rgba(159, 244, 223, 0.82) !important;
  border-radius: 999px !important;
  background: rgba(6, 37, 31, 0.96) !important;
  color: #9ff4df !important;
  cursor: zoom-in !important;
  font: 900 6.5px/1 Inter, system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.34),
    0 0 0 2px rgba(255, 255, 255, 0.92) !important;
}

.quote-cilia-image-wrap .quote-cilia-image-preview-button:hover,
.quote-cilia-image-wrap .quote-cilia-image-preview-button:focus {
  background: #0f766e !important;
  color: #ffffff !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

.quote-cilia-search-text {
  min-width: 0;
}

.quote-cilia-search-text strong,
.quote-cilia-search-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-cilia-search-text strong {
  font-size: 12px;
}

.quote-cilia-search-text small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 10px;
}

.quote-cilia-search-option b {
  color: #bbf7d0;
  font-size: 12px;
  white-space: nowrap;
}

.quote-cilia-search-empty {
  padding: 13px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.quote-pdf-button {
  width: auto;
  min-width: 138px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 850;
}

.quote-table-head {
  display: grid;
  grid-template-columns: minmax(156px, auto) minmax(170px, 0.82fr) 104px 78px minmax(520px, 1.36fr);
  gap: 0;
  align-items: center;
  margin: 8px 12px 0;
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(2, 8, 23, 0.26);
}

.quote-table-head span {
  min-width: 0;
  color: rgba(226, 232, 240, 0.44);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-table-head span:nth-child(n+3) {
  text-align: center;
}

.quote-list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0 12px 12px;
  list-style: none;
  overflow: auto;
  overflow-x: hidden;
}

.quote-item {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(156px, auto) minmax(170px, 0.82fr) 104px 78px minmax(520px, 1.36fr);
  grid-template-areas:
    "code description chip qty metrics";
  gap: 0;
  align-items: center;
  margin-bottom: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.105);
  border-top: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.012)),
    rgba(4, 11, 22, 0.34);
  box-shadow: none;
  transition: background 180ms ease, border-color 180ms ease;
}

.quote-item:last-child {
  border-radius: 0 0 8px 8px;
}

.quote-item:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.044), rgba(255, 255, 255, 0.018)),
    rgba(4, 11, 22, 0.42);
  border-color: rgba(159, 244, 223, 0.12);
}

.quote-item.quote-price-fallback {
  border-color: rgba(248, 113, 113, 0.24);
  background:
    linear-gradient(180deg, rgba(248, 113, 113, 0.06), rgba(255, 255, 255, 0.018)),
    rgba(18, 9, 14, 0.46);
}

.quote-item.quote-price-fallback:hover {
  border-color: rgba(248, 113, 113, 0.34);
  background:
    linear-gradient(180deg, rgba(248, 113, 113, 0.08), rgba(255, 255, 255, 0.024)),
    rgba(18, 9, 14, 0.5);
}

.quote-item.quote-item-corrected {
  border-left: 2px solid rgba(52, 211, 153, 0.82);
  background:
    linear-gradient(180deg, rgba(52, 211, 153, 0.045), rgba(255, 255, 255, 0.014)),
    rgba(4, 11, 22, 0.36);
}

.quote-code {
  grid-area: code;
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.quote-code strong {
  min-width: max-content;
  color: rgba(248, 250, 252, 0.93);
  font-size: 12px;
  font-weight: 900;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.quote-code-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.quote-code-stack small {
  color: rgba(148, 163, 184, 0.68);
  font-size: 7.5px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.quote-code-stack del {
  width: fit-content;
  color: rgba(248, 113, 113, 0.9);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(248, 113, 113, 0.82);
  white-space: nowrap;
}

.quote-code-stack strong {
  color: rgba(187, 247, 208, 0.96);
}

.quote-code button {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  font-size: 13px;
  line-height: 1;
}

.quote-description {
  grid-area: description;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(226, 232, 240, 0.66);
  font-size: 11.5px;
  font-weight: 760;
}

.quote-import-source {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(45, 212, 191, 0.68);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.quote-chip,
.quote-table-price,
.quote-discount-pill,
.quote-price,
.quote-subtotal,
.quote-stock {
  justify-self: start;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
}

.quote-chip {
  grid-area: chip;
  justify-self: center;
  min-width: 78px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 10px;
}

.quote-metrics {
  grid-area: metrics;
  min-width: 0;
  display: grid;
  grid-template-columns: 1.02fr 1.46fr 1.04fr 1.2fr 0.58fr;
  gap: 0;
  align-self: stretch;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.105);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.006)),
    rgba(2, 8, 23, 0.22);
}

.quote-metrics>* {
  width: 100%;
  min-width: 0;
}

.quote-metrics>span {
  position: relative;
  min-height: 42px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.095);
  border-radius: 0;
  background: transparent;
  line-height: 1;
}

.quote-metrics .quote-subtotal {
  align-items: flex-start;
}

.quote-metrics>span:last-child {
  border-right: 0;
}

.quote-metrics>span::before {
  content: attr(data-label);
  color: rgba(226, 232, 240, 0.38);
  font-size: 7.5px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.quote-metrics>span {
  color: rgba(226, 232, 240, 0.84);
  font-size: 10.5px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.quote-metrics>span small {
  position: absolute;
  top: 7px;
  right: 8px;
  margin: 0;
  padding: 1px 5px 2px;
  border: 1px solid rgba(159, 244, 223, 0.18);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.055);
  color: rgba(159, 244, 223, 0.76);
  font-size: 6.8px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.quote-metrics .quote-subtotal {
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.055), rgba(20, 184, 166, 0.018));
  color: rgba(159, 244, 223, 0.98);
}

.quote-quantity {
  grid-area: qty;
  justify-self: center;
  width: 70px;
  height: 30px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.quote-quantity button {
  width: 20px;
  height: 28px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  box-shadow: none;
  font-size: 14px;
  font-weight: 900;
}

.quote-quantity input {
  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  appearance: textfield;
}

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

.quote-chip.ok {
  border: 1px solid rgba(159, 244, 223, 0.24);
  background: rgba(20, 184, 166, 0.09);
  color: rgba(187, 247, 208, 0.88);
}

.quote-chip.fail {
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.quote-chip.warn,
.quote-chip.loading {
  border: 1px solid rgba(245, 165, 36, 0.22);
  background: rgba(245, 165, 36, 0.075);
  color: rgba(253, 230, 138, 0.88);
}

.quote-table-price,
.quote-price {
  color: rgba(226, 232, 240, 0.86);
  font-variant-numeric: tabular-nums;
}

.quote-table-price {
  color: rgba(226, 232, 240, 0.78);
}

.quote-table-price.fresh {
  color: rgba(204, 251, 241, 0.9);
}

.quote-table-price.fresh::before {
  max-width: calc(100% - 46px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-table-price.fallback {
  color: #fecaca;
}

.quote-table-price.fallback small {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.quote-discount-pill {
  color: rgba(226, 232, 240, 0.86);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 10px;
}

.quote-stock {
  grid-column: auto;
}

.quote-subtotal {
  color: rgba(159, 244, 223, 0.96);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.quote-subtotal.ok {
  color: rgba(159, 244, 223, 0.98);
}

.quote-table-price.nd,
.quote-discount-pill.nd,
.quote-subtotal.nd {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.48);
  text-decoration: none;
}

.quote-price.nd {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.48);
}

.quote-price.loading {
  color: rgba(217, 255, 245, 0.72);
}

.quote-stock {
  justify-self: stretch;
  min-width: 0;
  color: rgba(226, 232, 240, 0.56);
  font-variant-numeric: tabular-nums;
}

.quote-stock.stock {
  color: rgba(187, 247, 208, 0.86);
}

.quote-stock.zero {
  color: rgba(226, 232, 240, 0.38);
}

.quote-empty {
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 22px;
  text-align: center;
}

.quote-empty strong {
  color: var(--text);
  font-size: 14px;
}

.quote-empty span {
  max-width: 340px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.quote-board-footer {
  margin-top: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(2, 8, 23, 0.18);
}

.quote-total-detail {
  min-width: min(100%, 310px);
  text-align: right;
}

.quote-total-detail span,
.quote-total-detail strong {
  display: block;
}

.quote-total-detail span {
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 750;
}

.quote-total-detail strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.quote-pulse {
  background: rgba(20, 184, 166, 0.12);
  box-shadow: inset 3px 0 0 rgba(159, 244, 223, 0.75);
}

@media (min-width: 901px) {
  .quote-workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .quote-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .quote-stage {
    border-top: 0;
  }

  .quote-stage-parts {
    border-left: 1px solid var(--line);
  }

  .quote-board {
    min-height: 430px;
  }

  .quote-item {
    grid-template-columns: minmax(156px, auto) minmax(170px, 0.82fr) 104px 78px minmax(520px, 1.36fr);
    grid-template-areas: "code description chip qty metrics";
    min-height: 74px;
  }

  .quote-code,
  .quote-description,
  .quote-chip,
  .quote-quantity,
  .quote-metrics {
    align-self: center;
  }

  .quote-description {
    white-space: normal;
    line-height: 1.35;
  }

  .quote-metrics {
    grid-template-columns: 1.05fr 1.22fr 1.05fr 1.18fr 0.72fr;
  }

  .quote-table-price,
  .quote-discount-pill,
  .quote-price,
  .quote-subtotal,
  .quote-stock {
    min-height: 42px;
  }
}

.stock-dashboard .result,
.stock-dashboard .technical-reference,
.stock-dashboard .compat {
  margin-top: 0;
  min-height: 0;
}

.stock-dashboard .result[hidden],
.stock-dashboard .technical-reference[hidden],
.stock-dashboard .compat[hidden] {
  display: none !important;
}

.result {
  grid-area: result;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px 146px;
  gap: 12px;
  align-items: stretch;
  align-content: start;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.stock-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
}

.stock-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 800;
  transition: box-shadow 300ms ease;
}

.in-stock .stock-icon {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  box-shadow: 0 0 16px var(--ok-glow);
}

.out-stock .stock-icon {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  box-shadow: 0 0 16px var(--danger-glow);
}

.stock-copy {
  min-width: 0;
}

.stock-copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  color: var(--text);
}

.stock-copy span {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-number,
.result-price {
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  overflow: hidden;
  text-align: left;
}

.result-price {
  padding-left: 13px;
}

.label {
  display: block;
  margin-bottom: 3px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stock-number strong,
.result-price strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

.result-price strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 19px;
  white-space: nowrap;
  text-overflow: clip;
}

.result-price strong.price-nd {
  color: rgba(255, 255, 255, 0.48);
}

.result-price strong.price-ok {
  color: #bbf7d0;
}

.stock-note,
.price-note {
  display: block;
  margin-top: 5px;
  color: rgba(203, 213, 225, 0.72);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
  max-width: 118px;
}

.price-note {
  max-width: none;
  color: rgba(203, 213, 225, 0.62);
}

.stock-note[hidden] {
  display: none;
}

.part-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.part-line span {
  overflow-wrap: anywhere;
}

#result-code {
  color: var(--text);
  font-weight: 800;
  flex: 0 0 auto;
}

#result-description {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Technical Reference ── */
.technical-reference {
  grid-area: reference;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 18% 0%, rgba(159, 244, 223, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(12, 24, 42, 0.58), rgba(5, 14, 26, 0.48));
  box-shadow:
    var(--shadow-card),
    0 18px 42px rgba(20, 184, 166, 0.08);
  overflow: hidden;
}

.technical-reference-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(20, 184, 166, 0.11), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
}

.technical-reference-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 15px;
}

.technical-reference-status {
  min-width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  font-size: 11px;
  font-weight: 900;
}

.technical-reference.is-loading .technical-reference-status,
.technical-reference.is-empty .technical-reference-status {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.72);
}

.technical-reference-body {
  padding: 14px 14px 16px;
}

.technical-reference-body>strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.32;
}

.technical-reference.is-loading .technical-reference-body>strong {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), rgba(159, 244, 223, 0.95), rgba(255, 255, 255, 0.5));
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: loading-text-shimmer 1.5s linear infinite;
}

.technical-reference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.technical-reference-tags span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(159, 244, 223, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(20, 184, 166, 0.09);
  color: rgba(210, 255, 244, 0.9);
  font-size: 11px;
  font-weight: 800;
}

.technical-reference-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.technical-reference-details div {
  min-width: 0;
}

.technical-reference-details dt {
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.technical-reference-details dd {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.technical-reference-vehicles {
  display: none;
}

.technical-reference-vehicles>span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.technical-reference-vehicles ul {
  list-style: none;
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.technical-reference-vehicles li {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* ── Compatibility ── */
.compat {
  grid-area: compat;
  margin-top: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.compat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.compat-head strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--text);
}

.compat-count {
  min-width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(20, 184, 166, 0.14);
  color: var(--mint);
  font-size: 14px;
  font-weight: 900;
}

.compat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 290px;
  overflow-y: auto;
  overflow-x: hidden;
}

.compat-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  transition: background 150ms ease;
}

.compat-list li:first-child {
  border-top: 0;
}

.compat-list li:hover {
  background: rgba(255, 255, 255, 0.04);
}

.compat-list li.compat-enriched {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.13), rgba(34, 197, 94, 0.05));
}

.compat-list li.compat-plate-vehicle {
  min-height: 44px;
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.2), rgba(20, 184, 166, 0.08)),
    rgba(255, 255, 255, 0.025);
}

.compat-list li.compat-enriched strong {
  min-width: 32px;
  color: #7dd3fc;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.compat-list li.compat-plate-vehicle strong {
  min-width: 58px;
  max-width: 68px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: var(--radius-pill);
  background: rgba(34, 197, 94, 0.13);
  color: #bbf7d0;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.compat-list span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 650;
}

.compat-list strong {
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  justify-self: end;
}

/* ── Plate Result ── */
.plate-content {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 10px;
}

.plate-result {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  align-self: start;
}

.plate-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.plate-identity {
  min-width: 0;
}

.plate-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 54px;
}

.plate-logo {
  width: 46px;
  height: 46px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  object-fit: contain;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#plate-result-code {
  width: 210px;
  height: 66px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  position: relative;
  border: 1px solid #111827;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #f8f9fa, #e9ecef 40%, #ffffff 50%, #e2e8f0);
  color: #111827;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 
    inset 0 0 0 1px #cbd5e1, 
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 6px rgba(0, 0, 0, 0.1),
    0 8px 30px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

#plate-result-code::before {
  content: "BRASIL";
  position: absolute;
  inset: 0 0 auto;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1d4ed8, #1e3a8a);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #172554;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#plate-result-code::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 26px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.8);
}

.plate-result.plate-is-loading {
  position: relative;
  box-shadow: var(--shadow-card), 0 0 42px rgba(20, 184, 166, 0.12);
}

.plate-result.plate-is-loading .plate-main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    linear-gradient(105deg, transparent 0%, rgba(159, 244, 223, 0.08) 44%, transparent 72%);
  background-size: 100% 100%, 220% 100%;
  animation: shimmer 1.55s ease-in-out infinite;
}

.plate-result.plate-is-loading #plate-result-code {
  color: transparent;
  text-shadow: none;
  background:
    linear-gradient(145deg, #f8f9fa, #e9ecef 40%, #ffffff 50%, #e2e8f0),
    linear-gradient(105deg, transparent 0%, rgba(29, 78, 216, 0.14) 42%, transparent 70%);
  background-size: 100% 100%, 220% 100%;
  animation: shimmer 1.45s ease-in-out infinite;
}

.plate-result.plate-is-loading .plate-side::before {
  content: "";
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.05), rgba(159, 244, 223, 0.16), rgba(255, 255, 255, 0.05));
  background-size: 220% 100%;
  animation: shimmer 1.45s ease-in-out infinite;
}

.plate-skel-field dt,
.plate-skel-field dd {
  border-radius: 5px;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.06) 0%, rgba(159, 244, 223, 0.14) 40%, rgba(59, 130, 246, 0.1) 72%, rgba(255, 255, 255, 0.06) 100%);
  background-size: 220% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.plate-skel-field dt {
  width: 46px;
  height: 8px;
}

.plate-skel-field dd {
  width: min(100%, 118px);
  height: 13px;
}

.plate-skel-field:first-child dd {
  width: min(100%, 230px);
}

.plate-skel-field:nth-child(2) dt,
.plate-skel-field:nth-child(2) dd {
  animation-delay: 0.08s;
}

.plate-skel-field:nth-child(3) dt,
.plate-skel-field:nth-child(3) dd {
  animation-delay: 0.16s;
}

.plate-skel-field:nth-child(4) dt,
.plate-skel-field:nth-child(4) dd {
  animation-delay: 0.24s;
}

.plate-skel-field:nth-child(5) dt,
.plate-skel-field:nth-child(5) dd {
  animation-delay: 0.32s;
}

.plate-skel-field:nth-child(6) dt,
.plate-skel-field:nth-child(6) dd {
  animation-delay: 0.4s;
}

.plate-content.plate-is-loading .parts-result {
  opacity: 0.72;
  pointer-events: none;
}

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

.plate-details div {
  min-width: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.plate-details div:first-child {
  grid-column: 1 / -1;
}

.plate-details div:nth-child(1),
.plate-details div:nth-child(2) {
  border-top: 0;
}

.plate-details div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.plate-details dt {
  margin: 0 0 3px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plate-details dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

/* ── Plate Extra / FIPE ── */
.plate-extra,
.plate-fipe {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.collapse-trigger {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 0;
  padding: 0 14px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 0;
}

.collapse-trigger:hover {
  background: rgba(159, 244, 223, 0.08);
  color: var(--mint);
  box-shadow: none;
}

.collapse-trigger[aria-expanded="true"] {
  background: rgba(159, 244, 223, 0.06);
  color: var(--mint);
}

.collapse-arrow {
  color: var(--text-secondary);
  font-size: 16px;
  transition: transform 200ms ease;
}

.collapse-trigger[aria-expanded="true"] .collapse-arrow {
  transform: rotate(180deg);
  color: var(--mint);
}

.collapsed {
  display: none !important;
}

.plate-extra-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 4px 0 0;
}

.plate-extra-list div {
  min-width: 0;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
}

.plate-extra-list div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.plate-extra-list dt {
  margin: 0 0 3px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.plate-extra-list dd {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.plate-extra-list:not(.collapsed),
.plate-fipe-list:not(.collapsed) {
  background: linear-gradient(180deg, rgba(159, 244, 223, 0.04), transparent);
}

.plate-fipe-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
}

.plate-fipe-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.plate-fipe-list span {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.plate-fipe-list strong {
  color: var(--mint);
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.plate-fipe-list small {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 11px;
}

/* ── Parts Result ── */
.parts-result {
  --parts-grid: minmax(128px, 0.68fr) minmax(240px, 1.55fr) minmax(82px, 0.4fr) 92px 74px;
  min-height: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.parts-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.parts-head strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--text);
}

.parts-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.parts-price-button {
  height: 32px;
  min-width: 138px;
  border: 1px solid rgba(94, 234, 212, 0.36);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: rgba(20, 184, 166, 0.13);
  color: #bdfced;
  font-size: 11px;
  font-weight: 800;
  box-shadow: none;
}

.parts-price-button:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.56);
  background: rgba(20, 184, 166, 0.2);
  box-shadow: 0 10px 22px rgba(20, 184, 166, 0.14);
}

.parts-price-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.parts-summary {
  display: block;
  margin-bottom: 2px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.parts-controls {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(260px, 360px);
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.parts-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.parts-filter {
  height: 32px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  transition: all 180ms ease;
}

.parts-filter:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
  transform: none;
}

.parts-filter.active {
  border-color: rgba(20, 184, 166, 0.4);
  background: rgba(20, 184, 166, 0.14);
  color: var(--mint);
}

.parts-progress {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 12, 23, 0.5);
}

.parts-progress[hidden] {
  display: none !important;
}

.parts-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
}

.parts-progress-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(159, 244, 223, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.36);
}

.parts-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #2dd4bf 48%, #bef264);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.38);
  transition: width 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.parts-progress-text {
  color: #d9fff5;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.parts-stack {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.parts-search {
  min-width: 0;
}

.parts-search input {
  width: 100%;
  height: 32px;
  border-color: var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 650;
  transition: all 200ms ease;
}

.parts-search input:hover,
.parts-search input:focus {
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.08), 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* ── Parts Table Header ── */
.parts-table-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: var(--parts-grid);
  gap: 14px;
  align-items: center;
  min-height: 28px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-tertiary);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.parts-table-head span:last-child {
  text-align: right;
}

/* ── Parts List ── */
.parts-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(159, 244, 223, 0.35) transparent;
}

.parts-list::-webkit-scrollbar {
  width: 7px;
}

.parts-list::-webkit-scrollbar-track {
  background: transparent;
}

.parts-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: rgba(159, 244, 223, 0.35);
  background-clip: padding-box;
}

.parts-list li {
  display: grid;
  grid-template-columns: var(--parts-grid);
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  transition: background 150ms ease, transform 150ms ease;
}

.parts-list li:first-child {
  border-top: 0;
}

.parts-list li:hover {
  background: rgba(255, 255, 255, 0.04);
}

.parts-list li.parts-row-pending {
  background: rgba(255, 255, 255, 0.018);
}

.parts-list strong {
  min-width: 0;
  max-width: none;
  font-size: 13px;
  font-weight: 850;
  color: var(--text);
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parts-list small {
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.25;
}

.parts-list em {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-top: 0;
  padding: 3px 9px;
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: var(--radius-pill);
  background: rgba(20, 184, 166, 0.1);
  color: var(--mint);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 900;
}

.parts-list em.warn {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}

/* ── Price / Stock Pills ── */
.price-pill,
.stock-pill {
  min-height: 30px;
  display: grid;
  align-content: center;
  align-self: stretch;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.price-pill {
  color: #bbf7d0;
}

.price-pill.price-nd {
  color: rgba(255, 255, 255, 0.48);
}

.price-pill.price-ok {
  color: #bbf7d0;
}

.price-pill.price-loading {
  color: #bfdbfe;
}

.part-quote-button {
  justify-self: end;
  width: 58px;
  height: 24px;
  min-width: 0;
  border: 1px solid rgba(94, 234, 212, 0.38);
  border-radius: var(--radius-pill);
  padding: 0 10px;
  background: rgba(20, 184, 166, 0.14);
  color: #bdfced;
  font-size: 10px;
  font-weight: 900;
  box-shadow: none;
}

.part-quote-button:hover {
  transform: translateY(-1px);
  background: rgba(20, 184, 166, 0.22);
  box-shadow: 0 8px 18px rgba(20, 184, 166, 0.13);
}

.price-pill span,
.stock-pill span {
  display: block;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price-pill small,
.stock-pill small {
  display: block;
  margin: 2px 0 0;
  color: var(--text-tertiary);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.parts-list b.stock-ok {
  color: #4ade80;
}

.parts-list b.stock-zero {
  color: rgba(255, 255, 255, 0.35);
}

.parts-list b.stock-loading {
  color: rgba(217, 255, 245, 0.72);
}

.stock-pill.stock-loading span {
  display: inline-block;
  min-width: 24px;
  border-radius: var(--radius-pill);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.16), rgba(159, 244, 223, 0.42), rgba(255, 255, 255, 0.16));
  background-size: 220% 100%;
  color: transparent;
  animation: shimmer 1.05s ease-in-out infinite;
}

/* ── Empty Parts ── */
.parts-list li.parts-empty {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  background: rgba(239, 68, 68, 0.05);
  border-top: 0;
  text-align: center;
}

.parts-list li.parts-empty:hover {
  background: rgba(239, 68, 68, 0.05);
  transform: none;
}

.parts-list li.parts-empty span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 340px;
  white-space: normal;
}

.parts-list li.parts-empty strong {
  max-width: none;
  color: #fca5a5;
  font-size: 14px;
  white-space: normal;
  overflow: visible;
}

.parts-list li.parts-empty small {
  margin-top: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
}

/* ── Search Highlight ── */
.parts-result.searching .parts-list li {
  opacity: 0.65;
}

.parts-result.searching .parts-list li.match,
.parts-list li.match {
  opacity: 1;
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.15), rgba(20, 184, 166, 0.04));
  box-shadow: inset 3px 0 0 rgba(159, 244, 223, 0.7), inset 0 1px 0 rgba(159, 244, 223, 0.08), inset 0 -1px 0 rgba(159, 244, 223, 0.08);
  transform: none;
}

.parts-list li.match strong {
  color: #d9fff5;
}

.parts-list li.match small {
  color: rgba(255, 255, 255, 0.7);
}

.parts-list li.match em {
  border-color: rgba(159, 244, 223, 0.4);
  background: rgba(159, 244, 223, 0.14);
  color: #d9fff5;
}

/* ── Loading States ── */
.parts-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 14px;
  background: linear-gradient(180deg, rgba(6, 15, 28, 0.94), rgba(4, 10, 20, 0.9));
  backdrop-filter: blur(14px);
}

.parts-loading[hidden] {
  display: none !important;
}

.parts-loading-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.parts-loading-indicator {
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  border: 2px solid rgba(137, 245, 220, 0.2);
  border-top-color: rgba(137, 245, 220, 0.88);
  border-radius: 50%;
  animation: partsLoadingSpin 0.9s linear infinite;
}

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

.parts-loading-title {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.parts-loading-sub {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.4;
}

.parts-loading-skels {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.parts-skel-row {
  height: 46px;
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 12px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  align-items: center;
}

.parts-skel-row:first-child {
  border-top: 0;
}

.parts-skel-row::before,
.parts-skel-row::after {
  content: "";
  height: 12px;
  border-radius: 5px;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.06) 0%, rgba(159, 244, 223, 0.14) 38%, rgba(59, 130, 246, 0.1) 72%, rgba(255, 255, 255, 0.06) 100%);
  background-size: 220% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.parts-skel-row::before {
  grid-column: 1;
  width: 58%;
}

.parts-skel-row::after {
  grid-column: 2;
  width: 100%;
  height: 22px;
  animation-delay: 0.15s;
}

.parts-skel-row:nth-child(2)::before,
.parts-skel-row:nth-child(2)::after {
  animation-delay: 0.08s;
}

.parts-skel-row:nth-child(3)::before,
.parts-skel-row:nth-child(3)::after {
  animation-delay: 0.16s;
}

.parts-skel-row:nth-child(4)::before,
.parts-skel-row:nth-child(4)::after {
  animation-delay: 0.24s;
}

.parts-skel-row:nth-child(5)::before,
.parts-skel-row:nth-child(5)::after {
  animation-delay: 0.32s;
}

.parts-skel-row:nth-child(6)::before,
.parts-skel-row:nth-child(6)::after {
  animation-delay: 0.4s;
}

.parts-result.parts-is-loading .parts-head .compat-count {
  letter-spacing: 1px;
  color: var(--mint);
  animation: count-pulse 1.1s ease-in-out infinite;
}

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

@keyframes shimmer {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

@keyframes count-pulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

/* ── Result Animations ── */
.result:not([hidden]),
.compat:not([hidden]),
.plate-content:not([hidden]) {
  animation: result-rise 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.parts-list li {
  animation: row-reveal 280ms ease both;
}

.parts-list li:nth-child(2) {
  animation-delay: 20ms;
}

.parts-list li:nth-child(3) {
  animation-delay: 40ms;
}

.parts-list li:nth-child(4) {
  animation-delay: 60ms;
}

.parts-list li:nth-child(5) {
  animation-delay: 80ms;
}

.parts-list li:nth-child(n+6) {
  animation-delay: 100ms;
}

@keyframes result-rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

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

@keyframes row-reveal {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }

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

/* ── Workbench Mode ── */
body.workbench-mode .hero {
  max-height: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

body.quote-mode .hero {
  max-height: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(-26px) scale(0.985);
  filter: blur(4px);
  pointer-events: none;
}

body.workbench-mode .app {
  width: min(1280px, calc(100% - clamp(24px, 4vw, 72px)));
  min-height: 0;
  display: block;
  padding-top: clamp(24px, 3vh, 48px);
  padding-bottom: clamp(28px, 5vh, 64px);
}

body.quote-mode .app {
  min-height: 0;
  display: block;
  padding-top: clamp(22px, 3vh, 42px);
  padding-bottom: clamp(28px, 5vh, 64px);
}

body.workbench-mode .panel {
  width: min(1280px, 100%);
  transform: translateY(0) scale(1);
  display: block;
  min-height: 0;
}

body.quote-mode .panel {
  width: min(1120px, 100%);
  border-color: rgba(159, 244, 223, 0.18);
  overflow: visible;
  box-shadow:
    var(--shadow-card),
    0 0 34px rgba(20, 184, 166, 0.08);
}

body.workbench-mode .plate-content {
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
}

body.workbench-mode .parts-result {
  min-height: clamp(460px, calc(100vh - 148px), 680px);
}

body.is-querying .panel {
  transform: translateY(3px) scale(0.998);
}

body.is-querying .parts-result {
  box-shadow: var(--shadow-card), 0 0 40px rgba(20, 184, 166, 0.1);
}

/* ── Compact Search (inline with toolbar) ── */
.panel>.view {
  position: relative;
}

.panel>.view.active>.search {
  position: absolute;
  z-index: 4;
  top: -54px;
  right: 0;
  width: min(560px, calc(100% - 470px));
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.panel>.view.active>.search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.panel>.view.active>.search .search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 112px;
  gap: 10px;
}

#plate-form .search-row {
  grid-template-columns: minmax(220px, 1fr) 112px;
}

.panel>.view.active>.search input {
  height: 40px;
  border-radius: var(--radius-sm);
}

.panel>.view.active>.search button {
  height: 40px;
  min-width: 0;
}

.plate-action-group {
  display: grid;
  grid-template-columns: 1fr;
  width: 112px;
  min-width: 112px;
  height: 40px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.22);
}

.plate-action-group button {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-size: 11px;
  letter-spacing: 0;
  white-space: nowrap;
}

.turbo-button {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 52%, #a855f7 100%);
  box-shadow: none;
}

.turbo-button:hover {
  box-shadow: none;
}

.panel>.view.active>.status {
  margin-top: 12px;
}

/* ── Initial (non-workbench) panel centering ── */
body:not(.workbench-mode) .panel {
  display: block;
  padding: 24px;
}

body:not(.workbench-mode) .toolbar {
  min-height: 46px;
}

body:not(.workbench-mode) .panel>.view {
  position: static;
}

body:not(.workbench-mode) .status,
body:not(.workbench-mode) .stock-dashboard,
body:not(.workbench-mode) .plate-content {
  display: none !important;
  margin: 0;
}

body:not(.workbench-mode) .panel>.view.active>.search {
  top: 47px;
  transform: translateY(-50%);
  right: 24px;
}

@media (min-width: 761px) and (max-width: 1100px) {
  body.workbench-mode .panel>.view.active>.search {
    width: min(520px, calc(100% - 390px));
  }

  body.workbench-mode .plate-content {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 12px;
  }

  body.workbench-mode #plate-result-code {
    width: 190px;
    height: 60px;
    font-size: 24px;
  }

  body.workbench-mode .parts-result {
    --parts-grid: minmax(112px, 0.68fr) minmax(170px, 1.35fr) 70px 82px 66px;
  }

  body.workbench-mode .parts-controls {
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 300px);
  }

  body.workbench-mode .parts-list li,
  body.workbench-mode .parts-table-head {
    gap: 10px;
    padding-right: 12px;
    padding-left: 12px;
  }

  body.workbench-mode .parts-list em {
    padding-inline: 7px;
    font-size: 9px;
  }
}

/* ── Scrollbar for compat ── */
.stock-dashboard .compat-list::-webkit-scrollbar {
  width: 7px;
}

.stock-dashboard .compat-list::-webkit-scrollbar-track {
  background: transparent;
}

.stock-dashboard .compat-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: rgba(159, 244, 223, 0.35);
  background-clip: padding-box;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

/* ── Tablet ── */
@media (max-width: 1024px) {
  :root {
    --rail: min(100% - 32px, 940px);
  }

  .search {
    grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  }
}

/* ── Large mobile / small tablet ── */
@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
    width: min(520px, 100%);
    min-height: 0;
    padding: 0;
  }

  .login-brand {
    order: 1;
    min-height: 0;
    text-align: center;
  }

  .login-card {
    order: 2;
    justify-self: center;
  }

  .login-brand::before,
  .login-brand::after {
    display: none;
  }

  .login-brand p {
    margin: 0 auto;
  }

  .toolbar {
    min-height: 110px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .auth-user {
    top: 12px;
    right: 12px;
  }

  body.auth-authenticated:not(.workbench-mode) .app {
    padding-top: 86px;
  }

  body.workbench-mode .auth-user {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .panel>.view.active>.search {
    top: -54px;
    left: 0;
    right: auto;
    width: 100%;
  }

  .stock-dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "reference"
      "result"
      "plate"
      "compat";
  }

  .quote-workspace {
    grid-template-columns: 1fr;
  }

  .stock-dashboard .compat-list {
    max-height: 260px;
  }
}

/* ── Mobile ── */
@media (max-width: 760px) {
  :root {
    --rail: min(100% - 22px, 560px);
  }

  .login-screen {
    width: min(100% - 20px, 460px);
    padding: 24px 0;
  }

  .login-shell {
    padding: 0;
  }

  .login-card {
    padding: 20px;
    border-radius: 16px;
  }

  .login-brand h1 {
    margin-top: 16px;
    font-size: 31px;
  }

  .login-brand p {
    font-size: 14px;
    line-height: 1.55;
  }

  .login-card-head {
    margin-bottom: 20px;
  }

  .login-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .login-card-head strong {
    font-size: 18px;
  }

  .login-input-wrap,
  .login-card button {
    height: 48px;
  }

  .auth-user span {
    max-width: min(190px, calc(100vw - 132px));
  }

  .app,
  body.workbench-mode .app {
    min-height: 0;
    display: block;
    padding-top: 22px;
  }

  .hero {
    max-height: 280px;
    margin: 16px 0 18px;
    text-align: left;
  }

  .hero h1 {
    max-width: 420px;
    margin: 12px 0 10px;
    font-size: clamp(32px, 10vw, 44px);
  }

  .hero p {
    max-width: 380px;
    margin: 0;
    font-size: 14px;
  }

  body.workbench-mode .hero {
    max-height: 0;
    margin: 0;
  }

  .panel,
  body.workbench-mode .panel,
  body:not(.workbench-mode) .panel {
    width: 100%;
    min-height: 0;
    padding: 14px;
    border-radius: 18px;
  }

  body:not(.workbench-mode) .panel {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .toolbar,
  body:not(.workbench-mode) .toolbar {
    min-height: auto;
    display: block;
  }

  .toolbar .tabs,
  .tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
  }

  .tab {
    min-width: 0;
    height: 40px;
    padding: 0 8px;
    font-size: 12px;
  }

  .panel>.view.active>.search,
  body:not(.workbench-mode) .panel>.view.active>.search,
  body.workbench-mode .panel>.view.active>.search {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    min-height: 0;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: none;
  }

  .panel>.view.active>.search label {
    position: static;
    width: auto;
    height: auto;
    display: block;
    margin: 0 0 12px;
    overflow: visible;
    clip: auto;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
    white-space: normal;
  }

  .panel>.view.active>.search .search-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .panel>.view.active>.search input,
  .panel>.view.active>.search button {
    width: 100%;
    height: 44px;
  }

  .plate-action-group {
    width: 100%;
    min-width: 0;
    height: 44px;
  }

  .plate-action-group button {
    height: 44px;
  }

  .panel>.view.active>.status {
    margin: 12px 2px;
  }

  .plate-content,
  body.workbench-mode .plate-content {
    grid-template-columns: 1fr !important;
    gap: 14px;
    margin-top: 12px;
  }

  .quote-workspace {
    grid-template-columns: 1fr;
    margin-top: 14px;
    overflow-anchor: none;
  }

  body.quote-mode:not(.quote-has-vehicle) .quote-stage-parts,
  body.quote-mode:not(.quote-has-vehicle) .quote-board,
  body.quote-mode:not(.quote-has-items) .quote-board {
    display: none;
  }

  .quote-flow,
  .quote-board {
    border-radius: 14px;
  }

  .quote-flow {
    overflow: visible;
    position: sticky;
    top: 0px; /* changed from 10px to 0 for a better sentinel detection and sticky look */
    z-index: 40;
    transition: padding 0.3s ease;
  }

  .quote-flow.is-stuck {
    padding: 8px;
    border-radius: 0 0 14px 14px;
    border-top: none;
  }

  .quote-flow.is-stuck .quote-stage-head,
  .quote-flow.is-stuck #quote-plate-form,
  .quote-flow.is-stuck #quote-vehicle-detail {
    display: none !important;
  }

  .quote-flow.is-stuck .quote-stage-vehicle {
    padding: 0;
    margin-bottom: 8px;
  }

  .quote-flow.is-stuck .quote-vehicle-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
  }

  .quote-flow.is-stuck #quote-vehicle-plate {
    font-size: 10px;
    padding: 2px 6px;
    margin-bottom: 0;
  }

  .quote-flow.is-stuck #quote-vehicle-title {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-width: 100%;
    text-align: center;
  }

  .quote-flow.is-stuck .quote-stage-parts {
    border-left: none;
    padding: 0;
  }

  .quote-flow.is-stuck .quote-status {
    margin-top: 6px;
    font-size: 11px;
  }


  .quote-flow.is-vehicle-ready .quote-stage-parts,
  body.quote-has-vehicle .quote-board {
    animation: quote-rise 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  body.quote-mode:not(.quote-has-vehicle) .quote-stage-vehicle {
    border-top: 0;
    padding-bottom: 16px;
  }

  body.quote-mode:not(.quote-has-vehicle) .quote-status {
    margin-top: 12px;
  }

  .quote-board {
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(9, 19, 34, 0.94), rgba(4, 11, 21, 0.96)) padding-box,
      linear-gradient(135deg, rgba(34, 211, 238, 0.68), rgba(20, 184, 166, 0.82)) border-box;
  }

  .quote-board-head {
    min-height: 58px;
    padding: 12px 14px;
    align-items: center;
    flex-wrap: wrap;
  }

  .quote-board-head span {
    max-width: 210px;
    margin-bottom: 3px;
    font-size: 10px;
    line-height: 1.25;
  }

  .quote-board-head strong {
    font-size: 15px;
  }

  .quote-clear-button {
    min-width: 76px;
    height: 30px;
    background: rgba(255, 255, 255, 0.035);
  }

  .quote-board-actions {
    width: 100%;
    min-width: 0;
    justify-content: stretch;
  }

  .quote-cilia-search {
    min-width: 0;
  }

  .quote-cilia-search-results {
    width: calc(100vw - 32px);
    right: auto;
    left: 0;
    max-height: 320px;
  }

  .quote-list {
    flex: 0 0 auto;
    padding: 8px;
    overflow: visible;
  }

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

  .quote-form input,
  .quote-form button {
    width: 100%;
    height: 42px;
  }

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

  .quote-table-head {
    display: none;
  }

  .quote-list {
    padding-top: 8px;
  }

  .quote-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "code chip"
      "description description"
      "quantity quantity"
      "metrics metrics";
    gap: 7px 10px;
    min-height: 0;
    margin-top: 8px;
    padding: 11px;
    border: 1px solid rgba(159, 244, 223, 0.13);
    border-radius: 10px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
      rgba(5, 13, 25, 0.58);
    box-shadow:
      0 12px 24px rgba(0, 0, 0, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.045);
  }

  .quote-item:first-child {
    margin-top: 0;
  }

  .quote-item:hover {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.032)),
      rgba(3, 10, 20, 0.42);
  }

  .quote-code strong {
    font-size: 13px;
    line-height: 1.15;
  }

  .quote-code button {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: rgba(255, 255, 255, 0.075);
    color: rgba(255, 255, 255, 0.62);
  }

  .quote-description {
    grid-area: description;
    white-space: normal;
    line-height: 1.28;
    font-size: 11.5px;
  }

  .quote-chip {
    grid-area: chip;
    justify-self: end;
    align-self: center;
    min-width: 74px;
    min-height: 22px;
    padding: 3px 8px;
    font-size: 9px;
  }

  .quote-quantity {
    grid-area: quantity;
    justify-self: start;
    width: 92px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
  }

  .quote-quantity button,
  .quote-quantity input {
    height: 30px;
  }

  .quote-metrics {
    grid-area: metrics;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
    margin-top: 2px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 10px;
    background: rgba(2, 8, 23, 0.28);
  }

  .quote-table-price,
  .quote-discount-pill,
  .quote-price,
  .quote-subtotal,
  .quote-stock {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-self: stretch;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.075);
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 0;
    background: transparent;
    font-size: 10.5px;
    line-height: 1;
  }

  .quote-subtotal {
    order: 5;
    grid-column: 1 / -1;
    min-height: 54px;
    font-size: 17px;
    border-right: 0;
    border-bottom: 0;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(34, 197, 94, 0.105));
  }

  .quote-table-price {
    order: 1;
  }

  .quote-price {
    order: 3;
    border-right: 1px solid rgba(255, 255, 255, 0.075);
  }

  .quote-discount-pill {
    order: 2;
    grid-column: auto;
    min-height: 44px;
    border-right: 0;
    background: transparent;
  }

  .quote-stock {
    order: 4;
    grid-column: auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    padding: 8px 10px;
    border-radius: 0;
    font-size: 10.5px;
  }

  .quote-table-price::before,
  .quote-discount-pill::before,
  .quote-price::before,
  .quote-subtotal::before,
  .quote-stock::before {
    content: attr(data-label);
    color: rgba(255, 255, 255, 0.48);
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
  }

  .quote-stock::before {
    content: "Estoque";
    margin-right: 5px;
  }

  .quote-board-footer {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 12px 14px 14px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
      rgba(2, 8, 23, 0.36);
  }

  .quote-total-detail {
    min-width: 0;
    text-align: left;
  }

  .quote-total-detail span {
    margin-bottom: 5px;
    font-size: 10.5px;
    line-height: 1.3;
  }

  .quote-total-detail strong {
    font-size: 18px;
    line-height: 1.1;
  }

  .quote-pdf-button {
    width: 100%;
    height: 42px;
    border-radius: 10px;
  }

  .plate-result,
  .parts-result {
    width: 100%;
    min-width: 0;
    border-radius: 14px;
  }

  .plate-main {
    align-items: center;
    flex-direction: row;
    padding: 14px;
  }

  #plate-result-code {
    width: min(100%, 220px);
    height: 56px;
    font-size: 23px;
  }

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

  .plate-details div,
  .plate-details div:nth-child(odd),
  .plate-extra-list div,
  .plate-extra-list div:nth-child(odd) {
    border-right: 0;
  }

  .plate-details div:first-child {
    grid-column: auto;
  }

  .plate-details div {
    min-height: 56px;
    padding: 10px 8px;
    border-top: 1px solid var(--line);
  }

  .plate-details div:nth-child(-n+3) {
    border-top: 0;
  }

  .plate-details div:not(:nth-child(3n)) {
    border-right: 1px solid var(--line);
  }

  .plate-details div:nth-child(2) {
    border-top: 0;
  }

  .plate-details dt {
    margin-bottom: 4px;
    font-size: 9px;
    line-height: 1.1;
  }

  .plate-details dd {
    font-size: 12px;
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .plate-extra-list {
    grid-template-columns: 1fr;
  }

  .plate-extra-list div:nth-child(2) {
    border-top: 1px solid var(--line);
  }

  .parts-result,
  body.workbench-mode .parts-result {
    min-height: 500px;
    max-height: none !important;
  }

  .parts-head {
    align-items: flex-start;
    gap: 10px;
    min-height: 60px;
    padding: 13px;
  }

  .parts-head-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 6px;
  }

  .parts-price-button {
    min-width: 120px;
    height: 30px;
    padding: 0 9px;
    font-size: 10px;
  }

  .parts-summary {
    max-width: 240px;
    font-size: 10.5px;
  }

  .parts-controls {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 9px;
  }

  .parts-filters {
    gap: 5px;
  }

  .parts-filter {
    height: 34px;
    padding: 0 4px;
    font-size: 10px;
  }

  .parts-table-head {
    display: none;
  }

  .parts-list {
    max-height: 420px;
  }

  .parts-list li {
    grid-template-columns: minmax(0, 1fr) 76px 56px;
    min-height: 56px;
    padding: 10px 11px;
  }

  .parts-list li:not(.parts-empty) {
    grid-template-columns: minmax(0, 1fr) 76px 58px;
    gap: 5px 10px;
    align-items: center;
  }

  .parts-list strong {
    grid-column: 1;
    min-width: 0;
    font-size: 12.5px;
  }

  .parts-list small {
    grid-column: 1;
    white-space: nowrap;
  }

  .parts-list em {
    grid-column: 1;
    width: fit-content;
    justify-self: start;
  }

  .price-pill {
    grid-column: 2;
    grid-row: 1 / span 3;
    min-height: 34px;
    padding-left: 8px;
  }

  .stock-pill {
    grid-column: 3;
    grid-row: 1 / span 3;
    min-height: 34px;
    padding-left: 8px;
  }

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

  .stock-number,
  .result-price {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 10px;
    padding-left: 0;
  }
}

/* ── Small mobile ── */
@media (max-width: 380px) {
  :root {
    --rail: min(100% - 14px, 360px);
  }

  .panel,
  body.workbench-mode .panel,
  body:not(.workbench-mode) .panel {
    padding: 10px;
    border-radius: 15px;
  }

  .tab {
    font-size: 11px;
  }

  .quote-metrics {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .quote-price,
  .quote-table-price,
  .quote-discount-pill,
  .quote-subtotal,
  .quote-stock {
    min-height: 40px;
    padding: 8px;
    border-right: 0;
    font-size: 10.5px;
    overflow: hidden;
  }

  .quote-subtotal {
    min-height: 52px;
    font-size: 16px;
  }

  .quote-price::before,
  .quote-table-price::before,
  .quote-discount-pill::before,
  .quote-subtotal::before,
  .quote-stock::before {
    font-size: 8.5px;
  }

  .parts-filter {
    font-size: 9px;
  }
}

/* ── Desktop alignment ── */
@media (min-width: 761px) {

  .plate-content,
  body.workbench-mode .plate-content {
    align-items: start;
  }

  .plate-result {
    align-self: start;
  }

  .plate-content .parts-result,
  body.workbench-mode .plate-content .parts-result {
    min-height: 0;
    transition: height 220ms ease, max-height 220ms ease;
  }
}

@media (min-width: 1440px) {
  body.workbench-mode .app {
    padding-top: clamp(34px, 5vh, 68px);
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {

  .panel,
  .hero,
  body {
    transition: none;
  }

  .panel {
    animation: none;
  }

  .glow-orb {
    animation: none;
  }

  .hero h1 {
    animation: none;
  }

  .parts-loading-indicator,
  .stock-pill.stock-loading span {
    animation: none;
  }

  .parts-skel-row::before,
  .parts-skel-row::after {
    animation: none;
    background: rgba(255, 255, 255, 0.08);
  }

  .parts-result.parts-is-loading .parts-head .compat-count {
    animation: none;
    opacity: 0.7;
  }

  .result:not([hidden]),
  .compat:not([hidden]),
  .plate-content:not([hidden]),
  .parts-list li {
    animation: none;
  }

}

/* ═══════════════════════════════════════
   PLATE VERIFY — Cross-check feature
   ═══════════════════════════════════════ */

.plate-verify {
  grid-area: plate;
  grid-column: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: result-rise 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 100ms;
}

.plate-verify-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plate-verify-head svg {
  color: var(--teal);
  flex-shrink: 0;
}

.plate-verify-form {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 8px;
  padding: 12px;
}

.plate-verify-form input {
  height: 38px;
  border-color: var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 200ms ease;
}

.plate-verify-form input:hover,
.plate-verify-form input:focus {
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.08), 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.plate-verify-form button {
  height: 38px;
  min-width: 0;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* ── Verify Status Result ── */
.plate-verify-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  animation: result-rise 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.plate-verify-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  transition: all 400ms ease;
}

.plate-verify-status.verify-ok .plate-verify-icon {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(16, 185, 129, 0.24), rgba(6, 95, 70, 0.14));
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  text-shadow: 0 1px 10px rgba(134, 239, 172, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 20px rgba(34, 197, 94, 0.25), 0 0 40px rgba(34, 197, 94, 0.1);
  animation: verify-glow-ok 2s ease-in-out infinite alternate;
}

.plate-verify-status.verify-fail .plate-verify-icon {
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: #fb923c;
  box-shadow: 0 0 16px rgba(251, 146, 60, 0.15);
}

.plate-verify-status.verify-loading .plate-verify-icon {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--electric);
  animation: spin 1s linear infinite;
}

@keyframes verify-glow-ok {
  0% {
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.2), 0 0 32px rgba(34, 197, 94, 0.06);
  }

  100% {
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.35), 0 0 48px rgba(34, 197, 94, 0.12);
  }
}

.plate-verify-copy {
  min-width: 0;
}

.plate-verify-copy strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
  color: var(--text);
}

.plate-verify-copy span {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.plate-verify-copy .ai-advice {
  display: block;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(203, 213, 225, 0.84);
  font-style: normal;
  font-size: 11px;
  line-height: 1.35;
}

.vehicle-progress-main {
  color: rgba(241, 245, 249, 0.98);
  font-weight: 850;
}

.technical-details {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.9);
}

.technical-details > strong {
  display: block;
  margin-bottom: 7px;
  color: rgba(241, 245, 249, 0.96);
  font-size: 12px;
  line-height: 1.25;
}

.technical-details ul {
  margin: 0;
  padding-left: 16px;
}

.technical-details li {
  margin-top: 5px;
  color: rgba(203, 213, 225, 0.86);
  font-size: 11px;
  line-height: 1.35;
}

.technical-details li b {
  color: rgba(241, 245, 249, 0.96);
  font-weight: 850;
}

.plate-verify-status.verify-ok .plate-verify-copy strong {
  color: #4ade80;
}

.plate-verify-status.verify-fail .plate-verify-copy strong {
  color: #fb923c;
}

/* ── Compat List Match Highlight ── */
.compat-list li.compat-match {
  position: relative;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04));
  border-top-color: rgba(34, 197, 94, 0.2);
  animation: match-pulse 2.5s ease-in-out infinite;
}

.compat-list li.compat-match::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.5), rgba(20, 184, 166, 0.4), rgba(34, 197, 94, 0.5)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background-size: 300% 300%;
  animation: border-flow 3s ease infinite;
  pointer-events: none;
}

.compat-list li.compat-match span {
  color: #d9fff5;
  font-weight: 800;
}

.compat-list li.compat-plate-vehicle span {
  color: #ecfdf5;
  font-weight: 900;
}

.compat-list li.compat-match strong {
  color: #4ade80;
}

.compat-list li.compat-match::after {
  content: "✓";
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  font-size: 10px;
  font-weight: 900;
}

@keyframes match-pulse {

  0%,
  100% {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04));
  }

  50% {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
  }
}

@keyframes border-flow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ── Compat Card glow when match found ── */
.compat.has-match {
  box-shadow: var(--shadow-card), 0 0 30px rgba(34, 197, 94, 0.1), 0 0 60px rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
  transition: box-shadow 600ms ease, border-color 600ms ease;
}

.compat.has-match .compat-head {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), rgba(255, 255, 255, 0.02));
}

.compat.has-match .compat-count {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

/* ── Responsive for plate-verify ── */
@media (max-width: 900px) {
  .plate-verify {
    grid-column: 1 / -1;
  }

  .stock-dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "reference"
      "result"
      "plate"
      "compat";
  }
}

@media (max-width: 760px) {
  .plate-verify-form {
    grid-template-columns: 1fr;
  }

  .plate-verify-form button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {

  .plate-verify,
  .plate-verify-status {
    animation: none;
  }

  .plate-verify-status.verify-ok .plate-verify-icon {
    animation: none;
  }

  .compat-list li.compat-match {
    animation: none;
  }

  .compat-list li.compat-match::before {
    animation: none;
  }
}


/* ========================================================= */
/* CORRECAO DE EMPILHAMENTO (Z-INDEX): Dropdown de pecas    */
/* Garante que a lista flutue sobre TODOS os elementos       */
/* ========================================================= */

body.quote-mode .quote-board-head {
  position: relative;
  z-index: 100; /* Eleva o cabeçalho acima do fluxo da tabela de itens (sobrepõe o z-index: 1 global) */
}

/* Busca de pecas */

.quote-cilia-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  
  /* Estética Ambient Glass Premium */
  background: rgba(10, 20, 32, 0.96); /* Fundo escuro levemente mais denso para isolar o fundo */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
  
  /* Configuração de Rolagem e Camada Máxima */
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain; /* Prende o scroll do mouse na lista */
  scroll-behavior: smooth;
  z-index: 9999 !important; /* Força o topo absoluto do DOM */
  padding: 6px;
  display: flex;
  flex-direction: column;
}

.quote-cilia-search-results[hidden] {
  display: none !important;
}

/* Customização Perfeita da Barra de Rolagem */
.quote-cilia-search-results::-webkit-scrollbar {
  width: 6px;
}

.quote-cilia-search-results::-webkit-scrollbar-track {
  background: transparent;
}

.quote-cilia-search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}

.quote-cilia-search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.quote-cilia-search-option {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
  color: rgba(255, 255, 255, 0.95);
  font-family: inherit;
  border-radius: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.quote-cilia-search-option:last-child {
  border-bottom: none;
}

.quote-cilia-search-option:hover,
.quote-cilia-search-option:focus {
  background-color: rgba(255, 255, 255, 0.06);
  outline: none;
}

.quote-cilia-image-wrap {
  position: relative;
  width: 52px;
  height: 48px;
  display: grid;
  place-items: center;
}

.quote-cilia-search-image {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  position: relative;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.quote-cilia-search-image[data-cilia-image-url] {
  cursor: zoom-in;
}

.quote-cilia-search-image[data-cilia-image-url]::after {
  content: none;
}

.quote-cilia-search-image[data-cilia-image-url]:hover {
  transform: scale(1.06);
  border-color: rgba(159, 244, 223, 0.95);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    0 0 0 3px rgba(20, 184, 166, 0.16);
}

.quote-cilia-search-image img {
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: contain;
}

.quote-cilia-search-image span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
}

.quote-cilia-image-preview-button {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(159, 244, 223, 0.78);
  border-radius: 999px;
  background: #06251f;
  color: #9ff4df;
  cursor: zoom-in;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.34),
    0 0 0 3px rgba(6, 14, 27, 0.84);
}

.quote-cilia-image-preview-button:hover,
.quote-cilia-image-preview-button:focus {
  border-color: rgba(255, 255, 255, 0.92);
  background: #0f766e;
  color: #ffffff;
  outline: none;
  transform: scale(1.08);
}

.quote-cilia-search-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.quote-cilia-search-text strong {
  font-size: 13px;
  font-weight: 600;
  color: #9ff4df; /* Padronizado com o Mint token do sistema */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.quote-cilia-search-text small {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-top: 2px;
}

.quote-cilia-search-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  white-space: nowrap;
}

.quote-cilia-search-price small {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 2px;
  line-height: 1;
}

.quote-cilia-search-price b {
  font-size: 14px;
  font-weight: 700;
  color: #22c55e; /* Padronizado com o verde OK token do sistema */
  line-height: 1;
}

.quote-image-preview-open {
  overflow: hidden;
}

.quote-image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.quote-image-preview-modal[hidden] {
  display: none !important;
}

.quote-image-preview-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.quote-image-preview-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 24%, rgba(20, 184, 166, 0.18), transparent 42%),
    rgba(1, 6, 15, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: zoom-out;
}

.quote-image-preview-shell {
  position: relative;
  width: min(760px, calc(100vw - 44px));
  max-height: min(760px, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(7, 16, 29, 0.96);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateY(10px) scale(0.985);
  transition: transform 0.18s ease;
}

.quote-image-preview-modal.is-open .quote-image-preview-shell {
  transform: translateY(0) scale(1);
}

.quote-image-preview-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.quote-image-preview-head span,
.quote-image-preview-head small {
  display: block;
  color: rgba(148, 163, 184, 0.86);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.quote-image-preview-head strong {
  display: block;
  max-width: 560px;
  margin: 3px 0;
  overflow: hidden;
  color: rgba(240, 253, 250, 0.96);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-image-preview-close {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.92);
  box-shadow: none;
}

.quote-image-preview-close:hover,
.quote-image-preview-close:focus {
  border-color: rgba(159, 244, 223, 0.46);
  background: rgba(20, 184, 166, 0.14);
  color: #ffffff;
  outline: none;
}

.quote-image-preview-stage {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 28px);
  background:
    linear-gradient(45deg, rgba(15, 23, 42, 0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(15, 23, 42, 0.03) 25%, transparent 25%),
    #ffffff;
  background-position: 0 0, 0 10px;
  background-size: 20px 20px;
}

.quote-image-preview-stage img {
  width: auto;
  max-width: 100%;
  max-height: min(610px, calc(100vh - 170px));
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.18));
}

.quote-cilia-search-loading {
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(159, 244, 223, 0.14);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(59, 130, 246, 0.07)),
    rgba(255, 255, 255, 0.035);
}

.quote-cilia-loading-orbit {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(159, 244, 223, 0.16);
  border-top-color: rgba(159, 244, 223, 0.95);
  border-right-color: rgba(59, 130, 246, 0.68);
  box-shadow:
    0 0 18px rgba(20, 184, 166, 0.18),
    inset 0 0 10px rgba(159, 244, 223, 0.08);
  animation: quote-cilia-spin 860ms linear infinite;
}

.quote-cilia-loading-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.quote-cilia-loading-copy strong {
  color: rgba(236, 253, 245, 0.96);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-cilia-loading-copy small {
  color: rgba(226, 232, 240, 0.5);
  font-size: 10px;
  font-weight: 800;
}

.quote-cilia-loading-bars {
  display: grid;
  gap: 6px;
}

.quote-cilia-loading-bars i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(159, 244, 223, 0.18), rgba(159, 244, 223, 0.62), rgba(59, 130, 246, 0.18));
  background-size: 220% 100%;
  animation: quote-cilia-scan 1.1s ease-in-out infinite;
}

.quote-cilia-loading-bars i:nth-child(2) {
  width: 82%;
  animation-delay: 120ms;
}

.quote-cilia-loading-bars i:nth-child(3) {
  width: 62%;
  animation-delay: 240ms;
}

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

@keyframes quote-cilia-scan {
  0%,
  100% {
    background-position: 160% 0;
    opacity: 0.42;
  }

  50% {
    background-position: 0 0;
    opacity: 0.95;
  }
}

.quote-cilia-search-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

@media (max-width: 760px) {
  .quote-cilia-search-results {
    width: 100%;
  }
}
