:root {
  --bg: #090e15;
  --surface: #111925;
  --surface-2: #151f2e;
  --surface-3: #1b2738;
  --border: rgba(184, 205, 230, .12);
  --text: #f2f6fb;
  --muted: #91a0b4;
  --subtle: #627289;
  --orange: #ff8450;
  --orange-bright: #ff9b70;
  --blue: #76c6ff;
  --brand-cyan: #27c0ee;
  --green: #54d49b;
  --red: #ff7777;
  --yellow: #f8ca65;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(0,0,0,.18);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 76% -12%, #20364c 0, transparent 34%), var(--bg); color: var(--text); font-family: "DM Sans", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; letter-spacing: -.03em; }
small { color: var(--muted); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; display: flex; flex-direction: column; padding: 28px 17px 20px; background: rgba(8, 13, 20, .92); border-right: 1px solid var(--border); backdrop-filter: blur(18px); z-index: 4; }
.main-content { grid-column: 2; min-width: 0; }
.page-wrap { max-width: 1500px; margin: 0 auto; padding: 34px 42px 56px; }

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-family: "Space Grotesk", sans-serif; font-size: 20px; letter-spacing: -.04em; }
.brand strong { color: var(--brand-cyan); }
.brand small { display: block; margin-top: 1px; color: #718096; font-family: "DM Sans", sans-serif; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.brand-mark { position: relative; display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border-radius: 9px; background: linear-gradient(145deg, var(--orange), #b64627); box-shadow: 0 8px 20px rgba(255,132,80,.25); }
.brand-mark:after { content: ""; position: absolute; width: 26px; height: 15px; bottom: 4px; border: 2px solid rgba(255,255,255,.95); border-radius: 11px 11px 4px 4px; transform: skewX(-15deg); }
.brand-mark i { position: absolute; z-index: 1; bottom: 2px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.brand-mark i:first-child { left: 7px; }
.brand-mark i:last-child { right: 7px; }
.brand-mark.brand-logo { width: 34px; height: 34px; overflow: visible; background: transparent; border-radius: 10px; box-shadow: none; }
.brand-mark.brand-logo:after { display: none; }
.brand-mark.brand-logo img { display: block; width: 100%; height: 100%; }

.nav { display: grid; gap: 5px; margin-top: 48px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 13px; border-radius: 11px; color: var(--muted); font-size: 14px; font-weight: 600; transition: .18s ease; }
.nav a span { width: 16px; color: #74859a; text-align: center; font-size: 18px; }
.nav a:hover, .nav a.active { color: #fff; background: #182331; }
.nav a.active span { color: var(--orange); }
.nav .nav-emphasis { margin-top: 13px; background: linear-gradient(135deg, rgba(255,132,80,.18), rgba(255,132,80,.08)); border: 1px solid rgba(255,132,80,.2); color: #ffd4c3; }
.nav .nav-emphasis span { color: var(--orange-bright); }
.sidebar-note { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.025); font-size: 11px; }
.sidebar-note strong { font-size: 12px; }
.pulse { width: 8px; height: 8px; flex: none; border-radius: 99px; background: var(--green); box-shadow: 0 0 0 5px rgba(84,212,155,.08); }

.topbar { display: flex; align-items: center; justify-content: flex-end; min-height: 72px; padding: 0 42px; border-bottom: 1px solid var(--border); background: rgba(9,14,21,.28); }
.topbar-context { margin-right: auto; color: #7e8d9e; font-size: 13px; }
.topbar-user { display: flex; align-items: center; gap: 9px; }
.avatar, .lead-avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: linear-gradient(145deg, #37546d, #213043); color: #cde9ff; font-weight: 700; font-size: 12px; }
.user-name { color: #cbd5e1; font-size: 13px; font-weight: 600; }
.mobile-brand { display: none; }

.hero-row, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 32px; }
.hero-row > div { max-width: 740px; }
.hero-row h1, .page-heading h1 { margin-bottom: 10px; font-size: clamp(30px, 3vw, 47px); line-height: 1.04; }
.hero-row h1 span { color: var(--orange-bright); }
.hero-row p, .page-heading p { max-width: 650px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.page-heading.compact { margin-bottom: 22px; }
.page-heading.compact h1 { font-size: 33px; }
.eyebrow { margin-bottom: 8px; color: var(--orange-bright); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.6; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: linear-gradient(135deg, var(--orange-bright), var(--orange)); color: #2a1008; box-shadow: 0 12px 28px rgba(255,132,80,.2); }
.button-primary:hover { box-shadow: 0 16px 34px rgba(255,132,80,.3); }
.button-secondary { background: #1c2a3b; border-color: #2b4058; color: #d7e8f7; }
.button-secondary:hover { background: #243750; }
.button-ghost { border-color: var(--border); color: #c8d5e3; background: rgba(255,255,255,.01); }
.button-full { width: 100%; }
.text-link { color: #a9d8ff; font-size: 12px; font-weight: 700; }
.text-link:hover { color: #fff; }
.icon-button { display: grid; place-items: center; width: 41px; border: 0; border-radius: 9px; background: var(--orange); color: #30150d; cursor: pointer; font-weight: 900; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.metric-card { display: flex; align-items: center; gap: 13px; min-height: 120px; padding: 19px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(28,40,56,.78), rgba(15,23,34,.78)); box-shadow: var(--shadow); }
.metric-icon { display: grid; place-items: center; flex: none; width: 39px; height: 39px; border-radius: 12px; background: rgba(118,198,255,.13); color: var(--blue); font-size: 19px; font-weight: 900; }
.metric-icon.warm { color: var(--yellow); background: rgba(248,202,101,.12); }
.metric-icon.green { color: var(--green); background: rgba(84,212,155,.12); }
.metric-icon.violet { color: #bf9cff; background: rgba(191,156,255,.12); }
.metric-card small { display: block; font-size: 11px; }
.metric-card strong { display: block; margin-top: 2px; font-family: "Space Grotesk"; font-size: 27px; }
.metric-card p { margin: 1px 0 0; color: #8291a4; font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-bottom: 37px; }
.panel, .form-card { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(21,31,46,.9), rgba(13,20,30,.9)); box-shadow: var(--shadow); }
.panel { padding: 22px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading .eyebrow { margin-bottom: 5px; font-size: 9px; }
.panel-heading h2 { margin: 0; font-size: 19px; }
.margin-value { margin: 26px 0 8px; color: #e0ffef; font-family: "Space Grotesk"; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.06em; }
.margin-panel .muted { max-width: 580px; font-size: 12px; }
.progress-track { height: 7px; margin-top: 24px; overflow: hidden; border-radius: 9px; background: #202e40; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--yellow)); }
.decision-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.decision-row:first-of-type { border-top: 0; }
.tiny-car { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #25364a; color: #cfe8ff; }
.decision-row > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.decision-row strong { font-size: 12px; }
.decision-row small { font-size: 10px; }
.decision-row b { color: var(--orange-bright); }
.empty-inline { padding: 16px 0; color: var(--muted); font-size: 13px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 22px; }

.vehicle-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.vehicle-card { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #111a26; transition: transform .18s ease, border-color .18s ease; }
.vehicle-card:hover { border-color: rgba(255,132,80,.45); transform: translateY(-3px); }
.vehicle-visual { position: relative; min-height: 151px; overflow: hidden; background: radial-gradient(circle at 75% 10%, #426986 0, transparent 30%), linear-gradient(142deg, #1d3246, #0e1722); }
.vehicle-visual:before { content: ""; position: absolute; left: 16%; bottom: 25px; width: 68%; height: 46px; border: 5px solid rgba(216,238,255,.79); border-top: 10px solid rgba(216,238,255,.79); border-radius: 34px 47px 13px 13px; transform: skewX(-16deg); box-shadow: inset 0 8px 0 rgba(10,18,28,.36), 0 13px 38px rgba(0,0,0,.32); }
.vehicle-visual:after { content: ""; position: absolute; left: 27%; bottom: 20px; width: 16px; height: 16px; border-radius: 50%; background: #0a111b; border: 4px solid #a9c5d9; box-shadow: 38px 0 0 -4px #0a111b, 38px 0 0 0 #a9c5d9; }
.vehicle-visual i { position: absolute; inset: auto 13% 14px; height: 1px; background: rgba(255,255,255,.2); }
.vehicle-visual span { position: absolute; top: 13px; left: 14px; z-index: 1; padding: 5px 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 7px; background: rgba(7,13,20,.35); color: #d5e7f5; font-size: 10px; font-weight: 700; }
.vehicle-visual.picape { background: radial-gradient(circle at 75% 10%, #947351 0, transparent 30%), linear-gradient(142deg, #413226, #15110f); }
.vehicle-visual.picape:before { border-radius: 23px 23px 12px 12px; }
.vehicle-card-body { padding: 16px; }
.card-top { display: flex; justify-content: space-between; gap: 8px; min-height: 22px; }
.status, .badge, .recommendation { display: inline-flex; align-items: center; width: max-content; padding: 5px 8px; border-radius: 7px; font-size: 10px; font-weight: 700; line-height: 1; }
.status.received { color: #c4d4e5; background: #263446; }
.status.evaluating, .status.quoting, .status.approval { color: #ffe2a2; background: rgba(248,202,101,.13); }
.status.approved, .status.available, .status.sold { color: #b1f1d2; background: rgba(84,212,155,.13); }
.status.preparing, .status.negotiating { color: #bce4ff; background: rgba(118,198,255,.13); }
.status.rejected, .status.archived { color: #ffb6b6; background: rgba(255,119,119,.13); }
.score { color: #a4b5c7; font-size: 10px; }
.vehicle-card h3 { margin: 11px 0 4px; font-size: 17px; }
.vehicle-card p { min-height: 30px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.card-price { display: flex; justify-content: space-between; align-items: end; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--border); }
.card-price strong { font-family: "Space Grotesk"; font-size: 16px; }
.card-price span { color: var(--orange-bright); }

.filter-bar { display: grid; grid-template-columns: 1fr 210px auto; gap: 10px; margin-bottom: 18px; }
.field { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #2a3b50; border-radius: 9px; outline: none; background: #0c141f; color: #e9f1f8; transition: border-color .15s ease, box-shadow .15s ease; }
.field:focus { border-color: rgba(118,198,255,.75); box-shadow: 0 0 0 3px rgba(118,198,255,.1); }
textarea.field { padding-top: 10px; min-height: 90px; resize: vertical; }
select.field { cursor: pointer; }
input[type=file].field { padding: 9px; }
.vehicle-list { display: grid; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: rgba(17,25,37,.76); }
.vehicle-list-row { display: grid; grid-template-columns: 58px minmax(230px,1fr) 150px 150px 24px; align-items: center; gap: 17px; min-height: 88px; padding: 12px 20px; border-top: 1px solid var(--border); transition: background .15s ease; }
.vehicle-list-row:first-child { border-top: 0; }
.vehicle-list-row:hover { background: rgba(255,255,255,.035); }
.list-visual { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(145deg, #2c4a64, #172637); color: #d8efff; font-size: 22px; }
.list-main small { font-size: 10px; }
.list-main h3 { margin: 3px 0; font-size: 15px; }
.list-main h3 span { color: #8a9caf; font-family: "DM Sans"; font-size: 11px; font-weight: 400; }
.list-main p { margin: 0; color: var(--muted); font-size: 11px; }
.list-status { display: grid; gap: 7px; }
.list-status small, .list-price small { font-size: 10px; }
.list-price { display: grid; justify-items: end; gap: 3px; }
.list-price strong { font-size: 13px; }
.row-arrow { color: var(--orange-bright); font-size: 18px; }
.empty-state { display: grid; justify-items: center; gap: 9px; max-width: 480px; margin: 36px auto; padding: 44px 22px; text-align: center; }
.empty-state > span { color: var(--orange); font-size: 36px; }
.empty-state h3 { margin: 0; font-size: 20px; }
.empty-state p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }

.form-card { padding: 0; overflow: hidden; }
.form-section { padding: 26px; border-top: 1px solid var(--border); }
.form-section:first-child { border-top: 0; }
.form-section h2 { margin-bottom: 7px; font-size: 19px; }
.form-section > .muted { margin-bottom: 20px; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.compact-grid { gap: 11px; margin: 14px 0 18px; }
.form-group { min-width: 0; }
.form-group.span-2 { grid-column: span 2; }
.form-group label, .status-control label, .login-form label { display: block; margin-bottom: 7px; color: #b9c9d8; font-size: 11px; font-weight: 700; }
.field-error { display: block; margin-top: 4px; color: #ff9999; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 20px 26px; border-top: 1px solid var(--border); background: rgba(0,0,0,.08); }

.breadcrumb { display: flex; align-items: center; gap: 8px; margin: -7px 0 18px; color: #77899b; font-size: 11px; }
.breadcrumb a { color: #a8d6fe; }
.vehicle-hero { display: grid; grid-template-columns: 230px minmax(0,1fr) 210px; gap: 26px; align-items: center; margin-bottom: 17px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(115deg, rgba(24,36,52,.96), rgba(13,20,30,.96)); }
.vehicle-hero-art { overflow: hidden; border-radius: 13px; min-height: 150px; background: #152435; }
.vehicle-hero-art > img { display: block; width: 100%; height: 160px; object-fit: cover; }
.vehicle-visual.large { min-height: 160px; }
.hero-chip-row { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.code { color: #8da3b8; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.vehicle-hero-info h1 { margin: 0; font-size: clamp(27px,3vw,38px); }
.vehicle-subtitle { margin: 5px 0 15px; color: var(--muted); font-size: 13px; }
.vehicle-facts { display: flex; flex-wrap: wrap; gap: 7px; }
.vehicle-facts span, .public-facts span { padding: 5px 8px; border-radius: 7px; background: rgba(255,255,255,.06); color: #b7c9da; font-size: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.status-control { display: grid; gap: 8px; padding-left: 20px; border-left: 1px solid var(--border); }
.status-control > div { display: flex; gap: 6px; }
.status-control .field { min-height: 39px; font-size: 11px; }
.finance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 18px; }
.finance-card { min-height: 105px; padding: 17px; border: 1px solid var(--border); border-radius: 13px; background: #111b27; }
.finance-card small { display: block; margin-bottom: 10px; font-size: 10px; }
.finance-card small em { margin-left: 4px; color: #71879d; font-style: normal; }
.finance-card strong { display: block; font-family: "Space Grotesk"; font-size: 17px; letter-spacing: -.04em; }
.finance-card.accent { border-color: rgba(84,212,155,.22); background: linear-gradient(145deg, rgba(25,63,56,.74), rgba(14,35,34,.74)); }
.finance-card.accent strong { color: #c9ffe5; }
.finance-card.accent span { display: block; margin-top: 5px; color: #86e9bc; font-size: 10px; font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 18px; }
.detail-main { display: grid; gap: 18px; }
.detail-side { display: grid; align-content: start; gap: 18px; }
.diagnostic-summary { display: flex; align-items: center; gap: 21px; }
.score-ring { display: grid; place-content: center; flex: none; width: 91px; height: 91px; border: 7px solid #2a5069; border-right-color: var(--orange); border-bottom-color: var(--orange); border-radius: 50%; text-align: center; }
.score-ring strong { display: block; font-family: "Space Grotesk"; font-size: 28px; line-height: 1; }
.score-ring small { font-size: 9px; }
.recommendation { margin-bottom: 8px; }
.recommendation.buy { color: #a9f3ce; background: rgba(84,212,155,.13); }
.recommendation.negotiate, .recommendation.pending { color: #ffe0a0; background: rgba(248,202,101,.12); }
.recommendation.reject { color: #ffb2b2; background: rgba(255,119,119,.13); }
.diagnostic-summary p { margin: 0; color: #bdcbd8; font-size: 13px; line-height: 1.55; }
.critical-note { margin-top: 10px; padding: 9px 10px; border-left: 2px solid var(--red); background: rgba(255,119,119,.08); color: #f4c3c3; font-size: 11px; line-height: 1.5; }
.expense-table { display: grid; }
.expense-head, .expense-row { display: grid; grid-template-columns: minmax(170px, 1fr) 115px 115px 105px; align-items: center; gap: 14px; }
.expense-head { padding: 0 0 9px; color: #8295a9; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.expense-row { padding: 12px 0; border-top: 1px solid var(--border); color: #d4e2ed; font-size: 12px; }
.expense-row > span:first-child { display: grid; gap: 3px; }
.expense-row small { font-size: 10px; }
.badge.neutral { color: #b8c9d9; background: rgba(176,202,227,.09); }
.inline-form { margin-top: 16px; border-top: 1px solid var(--border); }
.inline-form summary { padding-top: 14px; color: #a9d7fe; cursor: pointer; font-size: 12px; font-weight: 700; }
.inline-form form { padding: 3px 0 2px; }
.lead-list { display: grid; }
.lead-row { display: grid; grid-template-columns: 33px minmax(0,1fr) minmax(160px,.75fr); align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--border); }
.lead-row:first-child { border-top: 0; }
.lead-avatar { width: 29px; height: 29px; }
.lead-row div { display: grid; gap: 3px; }
.lead-row strong { font-size: 12px; }
.lead-row small { font-size: 10px; }
.lead-next { justify-self: end; text-align: right; }
.media-count { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: baseline; gap: 5px; margin-bottom: 13px; }
.media-count strong { color: #e0f2ff; font-family: "Space Grotesk"; font-size: 23px; }
.media-count span { color: var(--muted); font-size: 10px; }
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; min-height: 63px; }
.photo-strip img { width: 100%; height: 63px; border-radius: 7px; object-fit: cover; }
.photo-empty { display: grid; grid-column: span 4; place-items: center; min-height: 63px; border: 1px dashed #33455a; border-radius: 7px; color: #75899e; font-size: 10px; }
.side-panel .inline-form { font-size: 11px; }
.side-panel .inline-form .form-group { margin-top: 9px; }
.side-panel .inline-form .button { width: 100%; margin-top: 12px; }
.document-list { display: grid; gap: 8px; padding: 0; margin: 18px 0 0; list-style: none; }
.document-list li { display: grid; gap: 3px; padding-top: 9px; border-top: 1px solid var(--border); }
.document-list a { color: #b2dcff; font-size: 11px; }
.document-list small { font-size: 9px; }
.audit-list { display: grid; }
.audit-list > div { position: relative; display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 8px; padding: 0 0 12px; }
.audit-list > div:before { content: ""; position: absolute; left: 3px; top: 8px; bottom: -4px; width: 1px; background: #334355; }
.audit-list > div:last-child:before { display: none; }
.audit-list > div > span { position: relative; z-index: 1; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--orange); }
.audit-list p { display: grid; gap: 2px; margin: 0; }
.audit-list strong { font-size: 11px; }
.audit-list small, .audit-list time { font-size: 9px; }
.audit-list time { color: #6e8092; white-space: nowrap; }

.diagnostic-layout { display: grid; grid-template-columns: minmax(0,1fr) 265px; gap: 18px; margin-bottom: 18px; }
.diagnostic-aside { display: grid; align-content: start; gap: 13px; }
.score-panel { padding: 25px; border-radius: var(--radius); background: radial-gradient(circle at 50% 10%, rgba(255,132,80,.23), transparent 55%), #152232; border: 1px solid rgba(255,132,80,.19); text-align: center; }
.score-panel small { display: block; margin-bottom: 10px; font-size: 11px; }
.score-panel strong { font-family: "Space Grotesk"; font-size: 58px; line-height: 1; }
.score-panel span { color: #91a5b9; font-size: 13px; }
.score-panel p { margin: 13px 0 0; color: var(--orange-bright); font-size: 12px; font-weight: 700; }
.notice { padding: 17px; border: 1px solid rgba(118,198,255,.15); border-radius: 13px; background: rgba(45,94,130,.14); }
.notice strong { color: #b9e1ff; font-size: 12px; }
.notice p { margin: 6px 0 0; color: #a3bdcf; font-size: 11px; line-height: 1.55; }
.checklist-panel { padding-bottom: 8px; }
.checklist-row { display: grid; grid-template-columns: 12px minmax(0,1fr) 100px 110px; align-items: center; gap: 11px; padding: 12px 0; border-top: 1px solid var(--border); }
.result-dot { width: 8px; height: 8px; border-radius: 50%; background: #718197; }
.result-dot.ok, .result-label.ok { color: #aef0d0; background-color: var(--green); }
.result-dot.attention, .result-label.attention { color: #ffe2a2; background-color: var(--yellow); }
.result-dot.critical, .result-label.critical { color: #ffc0c0; background-color: var(--red); }
.result-dot.na, .result-label.na { color: #c5d2df; background-color: #718197; }
.checklist-row div { display: grid; gap: 3px; }
.checklist-row strong { font-size: 12px; }
.checklist-row small { font-size: 10px; }
.result-label { display: inline-flex; width: max-content; padding: 4px 7px; border-radius: 6px; background: transparent; font-size: 10px; font-weight: 700; }
.checklist-row > span:last-child { color: #d2e1ed; font-size: 11px; }

.messages { display: grid; gap: 9px; margin-bottom: 18px; }
.message { padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(118,198,255,.2); background: rgba(47,101,141,.17); color: #c8e6ff; font-size: 12px; }
.message.error { border-color: rgba(255,119,119,.28); background: rgba(125,44,44,.2); color: #ffd1d1; }
.message.success { border-color: rgba(84,212,155,.24); background: rgba(28,102,73,.19); color: #c6f8dc; }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: radial-gradient(circle at 17% 15%, rgba(255,132,80,.22), transparent 26%), radial-gradient(circle at 87% 88%, rgba(70,151,218,.2), transparent 28%), #081018; }
.login-card { width: min(100%, 440px); padding: 38px; border: 1px solid var(--border); border-radius: 24px; background: rgba(13,21,31,.9); box-shadow: 0 30px 100px rgba(0,0,0,.38); }
.login-brand { margin-bottom: 45px; }
.login-card h1 { margin: 8px 0 10px; font-size: 34px; }
.login-form { display: grid; gap: 9px; margin-top: 25px; }
.login-form label:not(:first-of-type) { margin-top: 8px; }
.login-form .button { margin-top: 14px; }
.login-recovery { margin: 14px 0 0; text-align: center; }
.login-recovery a { color: #a9d8ff; font-size: 12px; font-weight: 700; }
.login-foot { margin: 26px 0 0; color: #66798d; font-size: 10px; text-align: center; }

.public-body { background: #0a111a; }
.public-wrap { width: min(100% - 32px, 1120px); margin: 0 auto; padding: 22px 0 44px; }
.public-header { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 28px; }
.badge.verified { color: #aef0d0; background: rgba(84,212,155,.12); }
.public-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 35px; border: 1px solid var(--border); border-radius: 25px; background: linear-gradient(130deg, #142337, #101925); }
.public-image { overflow: hidden; min-height: 290px; border-radius: 17px; background: #1a2d3e; }
.public-image img { display: block; width: 100%; height: 320px; object-fit: cover; }
.public-image .vehicle-visual { height: 320px; }
.public-hero h1 { margin: 8px 0; font-size: clamp(30px,4vw,48px); }
.public-hero p { margin: 0 0 19px; color: var(--muted); }
.public-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.public-price { display: block; margin: 26px 0 15px; font-family: "Space Grotesk"; font-size: 30px; }
.public-section { display: grid; grid-template-columns: 220px 1fr; gap: 25px; padding: 40px 4px; border-bottom: 1px solid var(--border); }
.public-section h2 { margin: 0; font-size: 24px; }
.public-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.public-details > div { padding: 15px; border: 1px solid var(--border); border-radius: 11px; background: #111b27; }
.public-details small, .public-details strong { display: block; }
.public-details strong { margin-top: 4px; font-size: 13px; }
.public-gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.public-gallery img { display: block; width: 100%; height: 125px; border-radius: 9px; object-fit: cover; }
.public-wrap footer { padding-top: 24px; color: #7a8c9e; font-size: 10px; text-align: center; }

.metric-grid-wide { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-grid-wide .metric-card { min-height: 106px; padding: 15px; }
.metric-grid-wide .metric-icon { width: 34px; height: 34px; font-size: 16px; }
.metric-grid-wide .metric-card strong { font-size: 24px; }
.dashboard-grid-finance { grid-template-columns: 1.45fr .85fr; }
.finance-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.finance-summary-grid > div { padding: 17px; border: 1px solid var(--border); border-radius: 13px; background: rgba(7,13,20,.22); }
.finance-summary-grid small { display: block; min-height: 29px; color: #8fa4b8; font-size: 10px; }
.finance-summary-grid strong { display: block; margin: 7px 0; color: #d9f6e6; font-family: "Space Grotesk"; font-size: 20px; letter-spacing: -.04em; }
.finance-summary-grid p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.finance-grid-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.finance-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.checkbox-group { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border: 1px solid #2a3b50; border-radius: 9px; background: #0c141f; }
.checkbox-group label { display: flex; align-items: center; gap: 9px; margin: 0; cursor: pointer; }
.checkbox-group .checkbox { width: 16px; height: 16px; accent-color: var(--orange); }
.narrow-form { max-width: 820px; }
.responsible-card { display: flex; align-items: center; gap: 8px; color: #cddce8; font-size: 12px; font-weight: 700; }
.mining-row .list-visual { color: #e3c5ff; background: linear-gradient(145deg, #453262, #221b37); }
.status.mining-captured, .status.mining-reviewing { color: #ffe2a2; background: rgba(248,202,101,.13); }
.status.mining-contacted, .status.mining-scheduled { color: #bce4ff; background: rgba(118,198,255,.13); }
.status.mining-approved, .status.mining-converted { color: #b1f1d2; background: rgba(84,212,155,.13); }
.status.mining-rejected { color: #ffb6b6; background: rgba(255,119,119,.13); }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 38px; }
.team-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(28,40,56,.75), rgba(15,23,34,.75)); }
.team-card-top { display: flex; align-items: center; gap: 9px; }
.team-card-top > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.team-card-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.team-card-top small { font-size: 10px; }
.team-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 17px 0; }
.team-stats span { padding: 8px; border-radius: 9px; background: rgba(4,10,16,.22); }
.team-stats small { display: block; font-size: 9px; }
.team-stats b { display: block; margin-top: 2px; font-family: "Space Grotesk"; font-size: 17px; }
.team-card p { margin: 0; color: #a0b0c0; font-size: 11px; }
.team-card p strong { color: #d1f6e2; }
.team-list { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(17,25,37,.76); }
.team-list-row { display: grid; grid-template-columns: 35px minmax(180px,1fr) repeat(4, minmax(80px,.55fr)) minmax(145px,.85fr) 18px; align-items: center; gap: 14px; padding: 15px 20px; border-top: 1px solid var(--border); }
.team-list-row:first-child { border-top: 0; }
.team-list-row:hover { background: rgba(255,255,255,.035); }
.team-list-row > div { display: grid; gap: 2px; }
.team-list-row > div strong { font-size: 13px; }
.team-list-row small { display: block; font-size: 9px; }
.team-list-row b { color: #dae8f4; font-family: "Space Grotesk"; font-size: 14px; }
.team-list-row i { color: var(--orange-bright); font-style: normal; }

.catalog-body { background: radial-gradient(circle at 18% -10%, #2a4c64 0, transparent 37%), #0a111a; }
.catalog-wrap { width: min(100% - 32px, 1280px); }
.public-login { min-height: 36px; font-size: 11px; }
.catalog-hero { display: flex; align-items: end; justify-content: space-between; gap: 40px; padding: 48px 0 35px; }
.catalog-hero > div:first-child { max-width: 710px; }
.catalog-hero h1 { margin: 0 0 12px; font-size: clamp(39px, 6vw, 72px); line-height: .98; }
.catalog-hero h1 span { color: var(--orange-bright); }
.catalog-hero p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.catalog-hero-stat { display: flex; align-items: center; gap: 11px; min-width: 185px; padding: 19px; border: 1px solid var(--border); border-radius: 15px; background: rgba(18,29,43,.75); }
.catalog-hero-stat strong { color: #e7f4ff; font-family: "Space Grotesk"; font-size: 42px; }
.catalog-hero-stat span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.catalog-filter { display: grid; grid-template-columns: 1.3fr .8fr .75fr auto; gap: 9px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: rgba(18,29,43,.65); }
.catalog-filter .button { min-width: 150px; }
.public-vehicle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin: 24px 0 42px; }
.public-vehicle-card { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: rgba(17,27,39,.92); box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease; }
.public-vehicle-card:hover { border-color: rgba(255,132,80,.55); transform: translateY(-4px); }
.public-card-image { position: relative; min-height: 210px; overflow: hidden; background: #152536; }
.public-card-image > img { display: block; width: 100%; height: 226px; object-fit: cover; }
.public-card-image .vehicle-visual { min-height: 226px; }
.featured-badge { position: absolute; top: 13px; left: 13px; padding: 5px 8px; border-radius: 7px; background: var(--orange-bright); color: #30140a; font-size: 10px; font-weight: 800; }
.public-card-body { padding: 18px; }
.public-card-body .eyebrow { margin-bottom: 5px; }
.public-card-body h2 { margin: 0 0 5px; font-size: 22px; }
.public-card-body p { min-height: 22px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.public-card-footer { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: 19px; padding-top: 14px; border-top: 1px solid var(--border); }
.public-card-footer strong { font-family: "Space Grotesk"; font-size: 19px; }
.public-card-footer span { color: #a9d8ff; font-size: 10px; font-weight: 700; }
.catalog-empty { display: grid; grid-column: 1 / -1; justify-items: center; gap: 8px; padding: 75px 20px; border: 1px dashed #33475c; border-radius: 18px; text-align: center; }
.catalog-empty > span { color: var(--orange); font-size: 40px; }
.catalog-empty h2 { margin: 0; }
.catalog-empty p { margin: 0 0 12px; color: var(--muted); }
.interest-section { align-items: start; }
.interest-section > div { max-width: 245px; }
.public-interest-form { display: grid; gap: 12px; width: min(100%, 520px); padding: 21px; border: 1px solid var(--border); border-radius: 14px; background: #111b27; }
.public-interest-form .form-group { display: grid; gap: 6px; }
.public-interest-form .field { min-height: 43px; }
.public-interest-form textarea.field { min-height: 96px; }
.public-messages { margin-bottom: 16px; }

@media (max-width: 1100px) {
  .metric-grid, .finance-grid { grid-template-columns: repeat(2, 1fr); }
  .vehicle-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: repeat(2, 1fr); }
  .vehicle-hero { grid-template-columns: 190px minmax(0,1fr); }
  .status-control { grid-column: 1 / -1; display: flex; align-items: center; padding: 12px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .status-control > div { flex: 1; }
}
@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-content { width: 100%; }
  .topbar { min-height: 60px; padding: 0 20px; }
  .topbar-context { display: none; }
  .mobile-brand { display: block; margin-right: auto; font-family: "Space Grotesk"; }
  .mobile-brand strong { color: var(--orange); }
  .page-wrap { padding: 25px 19px 40px; }
  .user-name { display: none; }
  .hero-row, .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 25px; }
  .hero-row .button, .page-heading .button { width: 100%; }
  .dashboard-grid, .diagnostic-layout { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: 1fr; }
  .vehicle-list-row { grid-template-columns: 42px minmax(0,1fr) auto; gap: 10px; padding: 13px; }
  .list-visual { width: 40px; height: 40px; font-size: 17px; }
  .list-status, .list-price { display: none; }
  .vehicle-hero { grid-template-columns: 1fr; padding: 16px; }
  .vehicle-hero-art { min-height: 185px; }
  .vehicle-hero-art > img { height: 185px; }
  .finance-grid { gap: 9px; }
  .finance-card { min-height: 93px; padding: 13px; }
  .finance-card strong { font-size: 14px; }
  .expense-head { display: none; }
  .expense-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .expense-row > span:nth-child(2), .expense-row > span:nth-child(3) { color: var(--muted); font-size: 10px; }
  .expense-row > span:nth-child(4) { grid-column: 2; }
  .lead-row { grid-template-columns: 32px minmax(0,1fr); }
  .lead-next { display: none !important; }
  .checklist-row { grid-template-columns: 10px minmax(0,1fr) auto; }
  .checklist-row > span:last-child { display: none; }
  .public-hero { grid-template-columns: 1fr; gap: 23px; padding: 17px; }
  .public-image { min-height: 210px; }
  .public-image img, .public-image .vehicle-visual { height: 220px; }
  .public-section { grid-template-columns: 1fr; gap: 15px; padding: 28px 0; }
}
@media (max-width: 510px) {
  .metric-grid, .finance-grid, .vehicle-grid, .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: auto; }
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .diagnostic-summary { align-items: flex-start; flex-direction: column; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .photo-empty { grid-column: span 2; }
  .public-details { grid-template-columns: 1fr; }
  .public-gallery { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 1250px) {
  .metric-grid-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-grid-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-list-row { grid-template-columns: 35px minmax(180px,1fr) repeat(3, minmax(70px,.5fr)) 18px; }
  .team-list-row > span:nth-of-type(5) { display: none; }
}
@media (max-width: 1000px) {
  .dashboard-grid-finance { grid-template-columns: 1fr; }
  .finance-summary-grid { grid-template-columns: 1fr; }
  .catalog-filter { grid-template-columns: 1fr 1fr; }
  .catalog-filter .button { width: 100%; }
  .public-vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .metric-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-grid-five, .finance-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-list-row { grid-template-columns: 35px minmax(0, 1fr) auto; padding: 13px; }
  .team-list-row > span { display: none; }
  .team-list-row > span:nth-of-type(3) { display: block; }
  .catalog-hero { align-items: flex-start; flex-direction: column; gap: 20px; padding: 32px 0 27px; }
  .catalog-hero-stat { min-width: 0; }
  .public-vehicle-grid { grid-template-columns: 1fr; }
}
@media (max-width: 510px) {
  .metric-grid-wide, .finance-grid-five, .finance-grid-four, .team-grid, .catalog-filter { grid-template-columns: 1fr; }
  .catalog-wrap { width: min(100% - 24px, 1280px); }
  .public-header { gap: 12px; }
  .public-login { padding: 0 10px; }
  .catalog-hero h1 { font-size: 42px; }
}

/* Fotos do veículo — checklist, upload múltiplo e galeria gerenciável */
.photo-alert { margin: 12px 0; padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.45; background: rgba(255,155,112,.12); border: 1px solid rgba(255,155,112,.4); color: #ffd9c2; }
.photo-alert.ok { background: rgba(64,192,120,.12); border-color: rgba(64,192,120,.4); color: #bff3d2; }
.photo-checklist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.photo-check { font-size: 10px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); color: #90a2b5; background: rgba(255,255,255,.02); }
.photo-check.done { color: #bff3d2; border-color: rgba(64,192,120,.5); background: rgba(64,192,120,.10); }
.photo-add { display: grid; gap: 8px; margin-bottom: 16px; }
.photo-add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-drop { display: flex; align-items: center; justify-content: center; padding: 16px; border: 1.5px dashed var(--border); border-radius: 12px; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.photo-drop:hover { border-color: var(--orange-bright); background: rgba(255,155,112,.06); }
.photo-drop input[type=file] { display: none; }
.photo-drop span { font-size: 13px; color: #dae8f4; }
.photo-drop small { display: block; font-size: 10px; color: #90a2b5; margin-top: 2px; }
.photo-add-btn { width: 100%; }
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 8px; margin-bottom: 16px; }
.photo-card { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 3; background: rgba(0,0,0,.22); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-badge { position: absolute; top: 4px; font-size: 8px; padding: 2px 5px; border-radius: 5px; text-transform: uppercase; letter-spacing: .03em; line-height: 1.3; }
.photo-badge.cat { right: 4px; background: rgba(0,0,0,.62); color: #cdd9e5; }
.photo-badge.cover { left: 4px; background: var(--orange-bright); color: #1a1008; font-weight: 700; }
.photo-actions { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; padding: 3px; background: linear-gradient(transparent, rgba(0,0,0,.78)); opacity: 0; transition: opacity .15s; }
.photo-card:hover .photo-actions { opacity: 1; }
.photo-actions form { margin: 0; }
.photo-actions button { width: 22px; height: 22px; border: 0; border-radius: 5px; background: rgba(255,255,255,.16); color: #fff; font-size: 11px; cursor: pointer; line-height: 1; padding: 0; }
.photo-actions button:hover { background: rgba(255,255,255,.32); }
.photo-actions button.danger:hover { background: #e5484d; }
