:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #fbfbfc;
    --ink: #111820;
    --ink-soft: #303a46;
    --muted: #737d8c;
    --muted-2: #98a1ad;
    --line: #e5e8ed;
    --line-strong: #d5dae1;
    --navy: #2b2b2b;
    --navy-2: #333333;
    --navy-3: #404040;
    --brand: #e53935;
    --brand-dark: #c62828;
    --brand-soft: #fdecea;
    --green: #3f9e51;
    --green-soft: #edf7ee;
    --red: #d32f2f;
    --red-soft: #ffebee;
    --blue: #2f6fed;
    --blue-soft: #edf3ff;
    --purple: #7c5cff;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow: 0 12px 36px rgba(16, 24, 40, .08);
    --shadow-lg: 0 26px 80px rgba(16, 24, 40, .16);
    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 500;
    width: min(560px, calc(100% - 32px));
    background: #1d2630;
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 13px 16px;
    font-size: 12px;
    text-align: center;
}

#blazor-error-ui .reload {
    color: #ff8a80;
    font-weight: 700;
    margin-left: 6px;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 10px;
    top: 6px;
    color: #9aa6b4;
    cursor: pointer;
    font-size: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-dark);
    text-decoration: none;
    transition: color .15s ease;
}

a:hover {
    color: var(--brand);
}

img {
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    letter-spacing: -.02em;
    color: var(--ink);
}

/* FocusOnNavigate программно фокусирует h1 — визуальную рамку не показываем. */
h1:focus,
h1:focus-visible {
    outline: none;
}

p {
    margin: 0;
}

.container {
    width: min(1200px, calc(100% - 40px));
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-dark);
    font-weight: 800;
}

.muted {
    color: var(--muted);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.wrap {
    overflow-wrap: anywhere;
}

.required {
    color: var(--red);
}

/* ---------- Buttons / forms ---------- */

.btn {
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 18px;
    border: 1px solid transparent;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 8px 22px rgba(229, 57, 53, .28);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.btn-outline-secondary {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

.btn-outline-secondary:hover {
    background: var(--surface-2);
    border-color: var(--muted-2);
    color: var(--ink);
}

.btn-dark-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, .24);
    color: #fff;
}

.btn-dark-outline:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .4);
    color: #fff;
}

.admin-content .btn-dark-outline {
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

.admin-content .btn-dark-outline:hover {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--muted-2);
}

.btn-ghost-light {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .18);
    color: #fff;
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 9px;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: .6;
    pointer-events: none;
}

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background-color: #fff;
    color: var(--ink);
    font-size: 14px;
    min-height: 46px;
    padding: 10px 14px;
    box-shadow: none;
}

.form-control::placeholder {
    color: var(--muted-2);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, .14);
}

textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-field > label {
    font-size: 12px;
    font-weight: 800;
    color: var(--ink-soft);
    letter-spacing: .01em;
}

.field-help {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.field-help code,
code {
    background: #f0f2f5;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 1px 5px;
    color: var(--ink-soft);
    font-size: 11px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.span-2 {
    grid-column: span 2;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--ink-soft);
    cursor: pointer;
    font-weight: 600;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.inline-field {
    display: flex;
    gap: 10px;
}

.inline-field .form-control {
    flex: 1;
}

.toggle-line {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    color: var(--ink-soft);
    font-size: 13px;
}

.switch {
    width: 46px;
    height: 26px;
    border-radius: 20px;
    border: 0;
    background: #d7dce3;
    padding: 3px;
    display: inline-flex;
    align-items: center;
    transition: background .18s ease;
    flex: none;
}

.switch span {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .18s ease;
}

.switch.on {
    background: var(--green);
}

.switch.on span {
    transform: translateX(20px);
}

/* ---------- Alerts / badges / spinner ---------- */

.alert {
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 13px 16px;
    font-size: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.alert-danger {
    background: var(--red-soft);
    border-color: #ffd1d2;
    color: #a4252a;
}

.alert-success {
    background: var(--green-soft);
    border-color: #c8efdf;
    color: #06714d;
}

.alert-link-button {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    text-decoration: underline;
    font-weight: 700;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0f2f5;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-completed,
.health-ok {
    background: var(--green-soft);
    color: #087a56;
}

.status-failed,
.health-fail {
    background: var(--red-soft);
    color: #b22b30;
}

.status-running {
    background: var(--blue-soft);
    color: var(--blue);
}

.status-pending,
.health-unknown {
    background: #f2f3f5;
    color: var(--muted);
}

.delta-up {
    color: var(--green);
    font-weight: 700;
}

.delta-down {
    color: var(--red);
    font-weight: 700;
}

.spinner {
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
    flex: none;
}

.spinner-lg {
    width: 28px;
    height: 28px;
    border-width: 3px;
    color: var(--brand);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Public header ---------- */

.site-header {
    background: var(--navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    flex: none;
}

.site-brand:hover {
    color: #fff;
}

.site-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--brand), #ef5350);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(229, 57, 53, .26);
}

.site-brand-mark svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.site-brand-text strong {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.03em;
}

.site-brand-logo {
    width: 44px;
    height: 32px;
    object-fit: contain;
    flex: none;
    display: block;
}

.site-brand-text small {
    font-size: 10px;
    color: #9aa6b4;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-top: 3px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: 10px;
}

.site-nav a {
    color: #c9d1da;
    font-size: 13px;
    font-weight: 600;
    position: relative;
    padding: 6px 0;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
}

.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-login {
    min-width: 84px;
}

.rate-chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    line-height: 1.15;
    min-width: 112px;
}

.rate-chip-label {
    font-size: 8px;
    letter-spacing: .1em;
    color: #96a2af;
    font-weight: 800;
}

.rate-chip strong {
    font-size: 13px;
    color: #fff;
    font-weight: 800;
}

.rate-chip-source {
    font-size: 9px;
    color: #8e9aa7;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 10px;
    background: transparent;
    padding: 10px;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.nav-toggle span {
    height: 2px;
    background: #fff;
    border-radius: 2px;
    display: block;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    background:
        radial-gradient(900px 480px at 78% 18%, rgba(229, 57, 53, .18), transparent 60%),
        radial-gradient(700px 400px at 10% 90%, rgba(47, 111, 237, .12), transparent 60%),
        linear-gradient(150deg, #0d131a 0%, #121b25 55%, #0d131a 100%);
    color: #fff;
    overflow: hidden;
    padding: 76px 0 140px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
}

.hero-glow-1 {
    width: 380px;
    height: 380px;
    background: rgba(229, 57, 53, .1);
    top: -160px;
    right: 8%;
}

.hero-glow-2 {
    width: 280px;
    height: 280px;
    background: rgba(47, 111, 237, .08);
    bottom: -140px;
    left: 4%;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    gap: 60px;
    align-items: center;
}

.hero-copy h1 {
    color: #fff;
    font-size: clamp(38px, 4.6vw, 66px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -.045em;
    margin: 22px 0 20px;
}

.hero-copy h1 span {
    background: linear-gradient(120deg, #ff8a80, #e53935 60%, #ffcdd2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    color: #aeb9c5;
    font-size: 16px;
    line-height: 1.65;
    max-width: 610px;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 24px 0 28px;
    color: #9fabb8;
    font-size: 12px;
}

.hero-points b {
    color: #fff;
}

.hero-points span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-points span::before {
    content: "•";
    color: var(--brand);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-rate {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 34px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    color: #8794a3;
    font-size: 11px;
}

.hero-rate strong {
    color: #fff;
    font-size: 14px;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 430px;
}

.hero-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.07);
}

.orbit-one {
    width: 440px;
    height: 440px;
}

.orbit-two {
    width: 540px;
    height: 540px;
    border-style: dashed;
    opacity: .55;
}

.hero-showcase {
    position: relative;
    z-index: 2;
    width: min(430px, 100%);
    border-radius: 26px;
    background: linear-gradient(165deg, rgba(255,255,255,.095), rgba(255,255,255,.035));
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 40px 100px rgba(0,0,0,.35);
    backdrop-filter: blur(8px);
    padding: 20px;
    transform: rotate(-2deg);
}

.showcase-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.showcase-badge {
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #ff8a80;
    font-weight: 800;
}

.showcase-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7fe4b8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 800;
}

.showcase-live i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #46d39b;
    box-shadow: 0 0 0 4px rgba(70,211,155,.13);
}

.showcase-car {
    padding: 12px 0 4px;
}

.showcase-car svg {
    width: 100%;
    display: block;
    filter: drop-shadow(0 22px 28px rgba(0,0,0,.3));
}

.showcase-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.08);
}

.showcase-stats div:not(.showcase-divider) {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.showcase-stats span {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #8694a2;
}

.showcase-stats b {
    font-size: 15px;
    color: #fff;
}

.showcase-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,.1);
}

.showcase-source {
    margin-top: 12px;
    text-align: center;
    font-size: 9px;
    color: #7d8a98;
}

/* ---------- Search panel ---------- */

.search-panel-wrap {
    position: relative;
    z-index: 10;
    margin-top: -78px;
}

.search-panel {
    position: relative;
    background: #fff;
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    overflow: hidden;
}

.search-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.search-panel-head h2 {
    font-size: 27px;
    font-weight: 900;
    margin: 8px 0 6px;
    letter-spacing: -.03em;
}

.search-panel-head p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.source-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f7f8fa;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.source-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(63, 158, 81, .12);
}

.budget-fields {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.segmented {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    background: #e9edf1;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.segmented button {
    border: 0;
    background: transparent;
    border-radius: 7px;
    padding: 6px 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.segmented button:hover {
    color: var(--ink);
}

.segmented button.active {
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    align-items: end;
}

.search-grid .span-2 {
    grid-column: span 2;
}

.search-grid .form-field {
    grid-column: span 2;
}

.search-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f7f8fa;
    box-shadow: inset 0 1px 0 #fff;
}

.btn-advanced {
    background: var(--brand-soft);
    border-color: rgba(229, 57, 53, .35);
    color: var(--brand-dark);
}

.btn-advanced:hover,
.btn-advanced:focus {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-search {
    width: auto;
    min-width: 280px;
    min-height: 46px;
    background: var(--navy);
    border-color: var(--navy);
    box-shadow: 0 10px 26px rgba(15, 21, 29, .22);
}

.btn-search:hover {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-search svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.search-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 21, 29, .66);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: 24px;
    animation: fadeIn .2s ease;
}

.search-progress-card {
    width: min(460px, calc(100% - 40px));
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.search-progress-icon {
    position: relative;
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-dark);
}

.search-progress-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.pulse-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(229, 57, 53, .2);
    animation: pulse 1.6s ease-out infinite;
}

.search-progress-card h3 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 8px;
}

.search-progress-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.progress-steps span {
    font-size: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f3f6;
    color: var(--muted);
    font-weight: 700;
}

.progress-steps span.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

@keyframes pulse {
    0% { transform: scale(.9); opacity: .8; }
    100% { transform: scale(1.25); opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Sections ---------- */

.section {
    padding: 80px 0;
}

.section-soft {
    background:
        linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0)),
        #eef1f4;
    border-top: 1px solid #e9ecf0;
    border-bottom: 1px solid #e9ecf0;
}

.section-head {
    max-width: 720px;
    margin: 0 auto 38px;
    text-align: center;
}

.section-head.left {
    margin: 0;
    text-align: left;
}

.section-head h2 {
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 900;
    letter-spacing: -.04em;
    margin: 12px 0 12px;
}

.section-head p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.step-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.step-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    transition: .2s ease;
}

.step-number {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 44px;
    font-weight: 900;
    color: #f0f2f5;
    letter-spacing: -.06em;
    line-height: 1;
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 8px;
}

.step-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.feature-grid {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 60px;
    align-items: center;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    display: flex;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.feature-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    flex: none;
    margin-top: 2px;
}

.feature-item h3 {
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 4px;
}

.feature-item p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.source-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: linear-gradient(135deg, #fff, #f7f8fa);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.source-banner-copy {
    max-width: 680px;
}

.source-banner h2 {
    font-size: 30px;
    font-weight: 900;
    margin: 10px 0;
    letter-spacing: -.03em;
}

.source-banner p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 18px;
}

.source-banner-mark {
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 900;
    color: #e8ebef;
    letter-spacing: -.04em;
    white-space: nowrap;
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--navy);
    color: #8e9aa7;
    padding-top: 54px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr .8fr .9fr;
    gap: 50px;
    padding-bottom: 38px;
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 13px;
    line-height: 1.65;
    max-width: 430px;
    margin-bottom: 12px;
}

.footer-note {
    color: #6f7b88;
    font-size: 11px;
    line-height: 1.6;
}

.site-footer h3 {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a {
    color: #96a2af;
    font-size: 13px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.07);
    padding-top: 18px;
    padding-bottom: 22px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #6c7885;
    font-size: 11px;
}

/* ---------- Generic page / results ---------- */

.page-pad {
    padding-top: 34px;
    padding-bottom: 64px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-heading h1 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -.04em;
    margin: 8px 0 6px;
}

.page-heading p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    max-width: 720px;
}

.page-heading-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-2);
    font-size: 11px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs span {
    color: var(--muted-2);
}

.results-hero {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 30px 0 26px;
}

.results-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 24px;
}

.results-head h1 {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 900;
    letter-spacing: -.045em;
    margin: 8px 0 8px;
}

.results-head p {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    color: var(--muted);
    font-size: 12px;
}

.results-head p span:not(:first-child)::before {
    content: "·";
    margin-right: 8px;
    color: var(--brand);
}

.results-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.results-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.summary-item {
    background: #fff;
    padding: 15px 17px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.summary-item > span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 800;
}

.summary-item strong {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.02em;
}

.summary-item small {
    font-size: 10px;
    color: var(--muted-2);
}

.results-content {
    padding-top: 42px;
}

.result-section {
    margin-bottom: 46px;
}

.result-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.result-section-head > div {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.result-section-head h2 {
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -.035em;
}

.section-count {
    color: var(--muted);
    font-size: 12px;
}

.tier-marker {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.tier-marker-cheap {
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(15,159,110,.12);
}

.tier-marker-expensive {
    background: var(--brand);
    box-shadow: 0 0 0 5px rgba(229,57,53,.12);
}

.tier-note {
    color: var(--muted-2);
    font-size: 11px;
    text-align: right;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ---------- Car cards ---------- */

.car-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.car-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--line-strong);
}

.car-card-cheap {
    border-top: 3px solid var(--green);
}

.car-card-expensive {
    border-top: 3px solid var(--brand);
}

.car-card-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: #e9edf1;
    overflow: hidden;
}

.car-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.car-card:hover .car-card-media img {
    transform: scale(1.035);
}

.car-rank {
    position: absolute;
    left: 10px;
    top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 800;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,.16);
}

.car-rank b {
    font-size: 10px;
    padding-left: 4px;
    border-left: 1px solid rgba(255,255,255,.3);
}

.car-rank-cheap {
    background: rgba(7, 122, 86, .9);
}

.car-rank-expensive {
    background: rgba(215, 76, 24, .9);
}

.car-rank-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: .85;
}

.car-photo-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(15,21,29,.7);
    color: #fff;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.car-photo-count svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.car-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.car-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.car-brand-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--brand-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.car-year {
    font-size: 10px;
    color: var(--muted);
    background: #f3f5f7;
    border-radius: 6px;
    padding: 2px 6px;
    font-weight: 700;
    flex: none;
}

.car-card-title {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 800;
    margin-bottom: 8px;
    min-height: 40px;
    letter-spacing: -.01em;
}

.car-card-title a {
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.car-card-title a:hover {
    color: var(--brand-dark);
}

.car-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 12px;
}

.car-meta-row span:not(:last-child)::after {
    content: "·";
    margin-left: 10px;
    color: var(--muted-2);
}

.car-card-footer {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding-top: 11px;
    border-top: 1px solid var(--line);
}

.car-price-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.car-price-block strong {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.03em;
    color: var(--ink);
}

.car-price-block span {
    color: var(--muted);
    font-size: 11px;
}

.car-details-link {
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.car-details-link svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.car-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    color: var(--muted-2);
    font-size: 9px;
    border-top: 1px dashed var(--line);
    padding-top: 8px;
}

.car-source a {
    color: var(--muted);
    font-weight: 700;
}

.car-grid-admin {
    grid-template-columns: repeat(3, 1fr);
}

/* ---------- Empty / loading / attribution ---------- */

.empty-state {
    background: #fff;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 54px 24px;
    text-align: center;
    max-width: 720px;
    margin: 30px auto;
}

.empty-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 12px;
}

.empty-state h1,
.empty-state h3 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 18px;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 70px 20px;
    color: var(--muted);
    font-size: 13px;
}

.loading-block.compact {
    padding: 34px 16px;
}

.loading-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    animation: toastIn .22s ease both;
}

.loading-toast .spinner {
    width: 20px;
    height: 20px;
    border-width: 2.5px;
    color: var(--brand);
}

.loading-toast-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.loading-toast-text strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink);
}

.loading-toast-text span {
    font-size: 11px;
    color: var(--muted);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.attribution-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-top: 10px;
}

.attribution-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.source-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
    background: #f7f8fa;
    border: 1px solid var(--line);
    padding: 6px;
    flex: none;
}

.attribution-box strong {
    font-size: 13px;
    font-weight: 900;
}

.attribution-box p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    margin-top: 4px;
}

.legal-note {
    margin-top: 16px;
    padding: 15px 18px;
    border-radius: 12px;
    background: #f0f2f5;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.legal-note strong {
    color: var(--ink-soft);
}

/* ---------- Car detail ---------- */

.car-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 28px;
}

.car-detail-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.detail-tag {
    background: #f0f2f5;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 800;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.detail-tag-green {
    background: var(--green-soft);
    border-color: #c8efdf;
    color: #087a56;
}

.car-detail-head h1 {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
    letter-spacing: -.045em;
    line-height: 1.1;
    max-width: 800px;
}

.car-detail-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--muted);
    font-size: 13px;
    margin-top: 10px;
}

.car-detail-sub span::before {
    content: "·";
    margin-right: 8px;
    color: var(--brand);
}

.car-detail-price {
    flex: none;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-sm);
}

.price-cny {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.price-rub {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.price-note {
    color: var(--muted-2);
    font-size: 10px;
    margin-bottom: 8px;
}

.car-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.car-detail-main {
    min-width: 0;
}

.car-gallery {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 22px;
}

.gallery-main {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #e9edf1;
    cursor: zoom-in;
}

.gallery-main img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.gallery-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(15,21,29,.7);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
    margin-top: 9px;
}

.gallery-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #e9edf1;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery-thumb.active {
    border-color: var(--brand);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
}

.detail-section h2 {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -.03em;
    margin-bottom: 16px;
}

.detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.detail-section-head span {
    color: var(--muted);
    font-size: 12px;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 30px;
}

.spec-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.spec-row span {
    color: var(--muted);
}

.spec-row strong {
    text-align: right;
    font-weight: 700;
    color: var(--ink-soft);
}

.detail-description {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.75;
    white-space: pre-line;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.photo-grid-item {
    border: 0;
    padding: 0;
    border-radius: 9px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e9edf1;
    cursor: zoom-in;
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.car-detail-aside {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aside-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.aside-card h3 {
    font-size: 18px;
    font-weight: 900;
    margin: 6px 0 12px;
}

.aside-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aside-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

.aside-list dt {
    color: var(--muted);
    font-weight: 500;
}

.aside-list dd {
    margin: 0;
    color: var(--ink-soft);
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

.aside-note {
    color: var(--muted-2);
    font-size: 10px;
    line-height: 1.6;
    margin: 14px 0;
}

.aside-price-card {
    background: linear-gradient(150deg, var(--navy), #1d2a38);
    color: #fff;
    border-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.aside-price-card span {
    color: #98a5b3;
    font-size: 11px;
}

.aside-price-card strong {
    color: #fff;
    font-size: 26px;
    letter-spacing: -.04em;
}

.aside-price-card small {
    color: #7c8997;
    font-size: 10px;
}

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(6, 9, 13, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: fadeIn .18s ease;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 30px 100px rgba(0,0,0,.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: #b9c2cc;
    font-size: 12px;
}

/* ---------- Auth ---------- */

.auth-shell {
    min-height: calc(100vh - 240px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background:
        radial-gradient(700px 400px at 50% 15%, rgba(229,57,53,.08), transparent 65%),
        #f5f6f8;
}

.auth-card {
    width: min(440px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    margin-bottom: 26px;
}

.auth-logo .site-brand-text strong {
    color: var(--ink);
}

.auth-logo .site-brand-text small {
    color: var(--muted);
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-heading h1 {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -.04em;
    margin: 0 0 6px;
}

.auth-heading p {
    color: var(--muted);
    font-size: 13px;
}

.auth-card .form-field {
    margin-bottom: 15px;
}

.auth-card .checkbox-row {
    margin-bottom: 18px;
}

.auth-card .alert {
    margin-bottom: 16px;
}

/* ---------- Admin ---------- */

.admin-shell {
    min-height: 100vh;
    display: flex;
    background: #f3f5f7;
}

.admin-sidebar {
    width: 258px;
    flex: none;
    background: var(--navy);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 14px 16px;
    overflow-y: auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    padding: 4px 8px 22px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    margin-bottom: 18px;
}

.admin-brand:hover {
    color: #fff;
}

.admin-brand .site-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

.admin-brand .site-brand-mark svg {
    width: 26px;
    height: 26px;
}

.admin-brand .site-brand-logo {
    width: 36px;
    height: 28px;
}

.admin-brand .site-brand-text strong {
    font-size: 16px;
}

.admin-brand .site-brand-text small {
    font-size: 9px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admin-nav-caption {
    font-size: 9px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #5f6c7a;
    font-weight: 800;
    padding: 16px 10px 6px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    color: #aeb9c5;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid transparent;
}

.admin-nav-link svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.admin-nav-link:hover {
    background: rgba(255,255,255,.05);
    color: #fff;
}

.admin-nav-link.active {
    background: linear-gradient(90deg, rgba(229,57,53,.18), rgba(229,57,53,.04));
    border-color: rgba(229,57,53,.18);
    color: #fff;
}

.admin-nav-link.active svg {
    color: #ef5350;
}

.admin-sidebar-footer {
    margin-top: auto;
    padding: 18px 10px 0;
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #6e7b89;
    font-size: 10px;
}

.admin-sidebar-footer a {
    color: #aeb9c5;
    font-size: 11px;
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    height: 64px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.admin-topbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.admin-topbar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(15,159,110,.12);
}

.admin-userbox {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
}

.admin-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.admin-user-meta strong {
    font-size: 12px;
    color: var(--ink);
}

.admin-user-meta span {
    font-size: 10px;
    color: var(--muted);
}

.logout-form {
    margin: 0;
}

.admin-content {
    padding: 28px;
    max-width: 1500px;
    width: 100%;
}

.admin-content .page-heading h1 {
    font-size: 28px;
}

.admin-content .page-heading {
    margin-bottom: 22px;
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-head h2 {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.03em;
    margin-top: 5px;
}

.panel-head h3 {
    font-size: 15px;
    font-weight: 900;
    margin: 0;
}

.panel-head.compact {
    margin-bottom: 10px;
}

.panel-link {
    font-size: 11px;
    font-weight: 800;
    color: var(--brand-dark);
    white-space: nowrap;
    margin-top: 4px;
}

.panel-divider {
    height: 1px;
    background: var(--line);
    margin: 18px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stats-grid-sm {
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 17px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 112px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    right: -26px;
    bottom: -30px;
    background: var(--blue-soft);
    opacity: .8;
}

.stat-green::after { background: var(--green-soft); }
.stat-orange::after { background: var(--brand-soft); }
.stat-purple::after { background: #f1edff; }
.stat-red::after { background: var(--red-soft); }

.stat-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 800;
}

.stat-icon {
    font-size: 16px;
    opacity: .85;
}

.stat-value {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-top: 4px;
}

.stat-hint {
    font-size: 10px;
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr);
    gap: 20px;
}

.dashboard-side {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    padding: 6px 2px 0;
}

.mini-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    height: 100%;
}

.mini-chart-value {
    font-size: 9px;
    color: var(--muted);
    font-weight: 700;
}

.mini-chart-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.mini-chart-bar {
    width: min(30px, 70%);
    min-height: 4px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #ef5350, var(--brand));
    opacity: .9;
}

.mini-chart-label {
    font-size: 8px;
    color: var(--muted-2);
}

.source-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.source-row:last-child {
    border-bottom: 0;
}

.source-row-main {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.source-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: none;
}

.source-on { background: var(--green); box-shadow: 0 0 0 4px rgba(15,159,110,.1); }
.source-off { background: var(--muted-2); }

.source-row-main > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.source-row-main strong {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-row-main span {
    font-size: 9px;
    color: var(--muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-health {
    font-size: 9px;
    padding: 3px 7px;
    border-radius: 999px;
    font-weight: 800;
    flex: none;
}

.catalog-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.catalog-mini > div {
    background: #f7f8fa;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.catalog-mini strong {
    font-size: 22px;
    font-weight: 900;
}

.catalog-mini span {
    font-size: 9px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.rate-big {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rate-big span {
    font-size: 11px;
    color: var(--muted);
}

.rate-big strong {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.rate-big small {
    font-size: 10px;
    color: var(--muted-2);
}

.admin-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, .9fr);
    gap: 20px;
    align-items: start;
}

.admin-side {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.table-wrap {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    text-align: left;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    padding: 8px 9px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    font-weight: 800;
}

.data-table td {
    padding: 11px 9px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: #fafbfc;
}

.data-table-wide {
    min-width: 760px;
}

.table-empty {
    text-align: center;
    color: var(--muted);
    padding: 30px 12px !important;
}

.table-title {
    display: block;
    color: var(--ink);
    font-weight: 800;
    font-size: 12.5px;
}

.table-title:hover {
    color: var(--brand-dark);
}

.table-actions {
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

.table-actions > * + * {
    margin-left: 12px;
}

.table-actions a,
.table-actions button {
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.table-actions .danger {
    color: var(--red);
}

.table-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.permissions-row > td {
    padding: 0 !important;
    background: #fafbfc;
}

.permissions-editor {
    padding: 16px 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.permissions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.permissions-head > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.permissions-head strong {
    font-size: 13px;
}

.permissions-head span {
    color: var(--muted);
    font-size: 11px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 18px;
}

.permissions-grid .checkbox-row {
    margin: 0;
}

.row-selected {
    background: #fff5f5;
}

.link-button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--ink);
    font-weight: 700;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.link-button:hover {
    color: var(--brand-dark);
}

.filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.filter-bar-wrap {
    flex-wrap: wrap;
}

.filter-bar .form-control {
    flex: 1;
    min-width: 180px;
}

.filter-bar .form-select {
    width: auto;
    min-width: 160px;
}

.filter-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    font-size: 11px;
    color: var(--muted);
}

.source-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-card {
    text-align: left;
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.source-card:hover {
    border-color: var(--line-strong);
}

.source-card.active {
    border-color: var(--brand);
    background: #fff8f8;
    box-shadow: 0 0 0 3px rgba(229,57,53,.08);
}

.source-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    flex: none;
}

.source-card-head > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.source-card-head strong {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-card-head span {
    font-size: 9px;
    color: var(--muted-2);
    font-family: ui-monospace, monospace;
}

.source-toggle {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f2f3f5;
    color: var(--muted);
}

.source-toggle.on {
    background: var(--green-soft);
    color: #087a56;
}

.source-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
    font-size: 9px;
    color: var(--muted-2);
}

.adapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adapter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
}

.adapter-row strong {
    color: var(--ink-soft);
    font-family: ui-monospace, monospace;
    font-size: 10px;
}

.adapter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
}

.tech-info {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.tech-info > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 11px;
}

.tech-info span {
    color: var(--muted);
}

.tech-info strong {
    color: var(--ink-soft);
    font-weight: 700;
    text-align: right;
}

.brand-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.brand-cell img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    background: #f6f7f9;
    padding: 3px;
}

.brand-cell > span {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-cell strong {
    font-size: 12px;
}

.brand-cell small {
    color: var(--muted);
    font-size: 9px;
}

.series-list {
    display: flex;
    flex-direction: column;
    max-height: 560px;
    overflow-y: auto;
}

.series-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
}

.series-row:last-child {
    border-bottom: 0;
}

.series-row > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.series-name-editor {
    flex: 1;
    min-width: 150px;
    max-width: 280px;
}

.series-name-editor input {
    font-size: 11px;
    padding: 6px 9px;
}

.series-row strong {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.series-row span {
    color: var(--muted-2);
    font-size: 9px;
}

.series-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex: none;
}

.detail-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.detail-summary-grid .summary-item {
    border: 1px solid var(--line);
    border-radius: 12px;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.criteria-grid > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #f7f8fa;
    border-radius: 10px;
    padding: 10px 12px;
}

.criteria-grid span {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    font-weight: 800;
}

.criteria-grid strong {
    font-size: 13px;
    font-weight: 700;
}

.raw-details summary {
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    padding: 8px 0;
}

.raw-details pre {
    background: #2b2b2b;
    color: #b9c5d2;
    border-radius: 10px;
    padding: 14px;
    font-size: 10px;
    line-height: 1.5;
    max-height: 420px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.raw-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 340px;
    overflow: auto;
}

.raw-settings > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}

.raw-settings .mono {
    color: var(--brand-dark);
    font-size: 9px;
}

.raw-settings strong {
    font-size: 11px;
    overflow-wrap: anywhere;
}

.raw-settings small {
    font-size: 9px;
    color: var(--muted-2);
}

.listing-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.listing-cell img {
    width: 50px;
    height: 38px;
    object-fit: cover;
    border-radius: 6px;
    background: #e9edf1;
    flex: none;
}

.listing-cell > div {
    min-width: 0;
}

.listing-cell .table-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.admin-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}

.admin-gallery a {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #e9edf1;
}

.admin-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.price-stack strong {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -.03em;
}

.price-stack span {
    color: var(--brand-dark);
    font-size: 15px;
    font-weight: 800;
}

.price-stack small {
    color: var(--muted-2);
    font-size: 10px;
}

.rate-hero-panel .rate-hero {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 4px 0 18px;
}

.rate-hero strong {
    font-size: 54px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.06em;
}

.rate-hero span {
    color: var(--muted);
    font-size: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-visual {
        min-height: 340px;
    }

    .orbit-one { width: 340px; height: 340px; }
    .orbit-two { width: 430px; height: 430px; }
    .hero-showcase { width: min(400px, 92%); }

    .search-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .tool-layout {
        grid-template-columns: 1fr;
    }

    .tool-left-rail {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .tool-main {
        max-width: none;
    }

    .search-grid .form-field {
        grid-column: span 2;
    }

    .search-grid .span-2 {
        grid-column: span 2;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .car-grid,
    .car-grid-admin {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid,
    .admin-two-col {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        width: 226px;
    }

    .car-detail-layout {
        grid-template-columns: 1fr;
    }

    .car-detail-aside {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--navy-2);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 20px 18px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 20px 40px rgba(0,0,0,.25);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: 11px 0;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }

    .nav-toggle {
        display: flex;
    }

    .rate-chip {
        min-width: 0;
    }

    .hero {
        padding: 50px 0 120px;
    }

    .hero-copy h1 {
        font-size: 40px;
    }

    .search-panel {
        padding: 22px;
    }

    .search-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-grid .form-field,
    .search-grid .span-2 {
        grid-column: span 2;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .source-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px;
    }

    .source-banner-mark {
        font-size: 38px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .results-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .car-detail-head {
        flex-direction: column;
    }

    .car-detail-price {
        width: 100%;
        min-width: 0;
    }

    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 12px;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-nav-caption {
        display: none;
    }

    .admin-nav-link {
        font-size: 11px;
        padding: 7px 9px;
    }

    .admin-sidebar-footer {
        display: none;
    }

    .admin-topbar {
        padding: 0 16px;
    }

    .admin-content {
        padding: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .criteria-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .container {
        width: calc(100% - 28px);
    }

    .header-inner {
        gap: 10px;
        min-height: 68px;
    }

    .site-brand-text small {
        display: none;
    }

    .site-brand-text strong {
        font-size: 16px;
    }

    .rate-chip {
        display: none;
    }

    .site-nav {
        top: 68px;
    }

    .hero-copy h1 {
        font-size: 34px;
    }

    .hero-lead {
        font-size: 14px;
    }

    .hero-points {
        flex-direction: column;
        gap: 7px;
    }

    .hero-visual {
        min-height: 280px;
    }

    .orbit-one { width: 280px; height: 280px; }
    .orbit-two { display: none; }

    .showcase-stats {
        gap: 10px;
        padding: 10px;
    }

    .search-panel-wrap {
        margin-top: -50px;
    }

    .search-panel {
        padding: 18px;
        border-radius: 18px;
    }

    .search-panel-head {
        flex-direction: column;
        gap: 10px;
    }

    .search-panel-head h2 {
        font-size: 22px;
    }

    .search-grid {
        grid-template-columns: 1fr;
    }

    .search-grid .form-field,
    .search-grid .span-2 {
        grid-column: span 1;
    }

    .search-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .btn-search {
        width: 100%;
        min-width: 0;
    }

    .section {
        padding: 50px 0;
    }

    .section-head h2 {
        font-size: 28px;
    }

    .page-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-heading-actions {
        justify-content: flex-start;
    }

    .car-grid,
    .car-grid-admin {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .spec-grid {
        grid-template-columns: 1fr;
    }

    .car-detail-aside {
        grid-template-columns: 1fr;
    }

    .results-summary-grid {
        grid-template-columns: 1fr;
    }

    .results-actions {
        width: 100%;
    }

    .attribution-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-user-meta {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .detail-summary-grid,
    .criteria-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-count {
        margin-left: 0;
    }

    .cart-detail-price {
        width: 100%;
    }

    .lightbox {
        padding: 20px;
    }

    .lightbox-nav {
        width: 38px;
        height: 38px;
    }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

/* ---------- Internal tool page ---------- */

.header-logout {
    margin: 0;
}

.site-footer-minimal {
    padding: 0;
}

.footer-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    color: #7d8996;
    font-size: 10px;
}

.tool-page-shell {
    padding: 38px 24px 56px;
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    max-width: 1780px;
    margin: 0 auto;
}

.tool-left-rail {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    min-width: 0;
}

.tool-main {
    min-width: 0;
    max-width: 1200px;
}

.tool-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.tool-heading h1 {
    font-size: clamp(30px, 3.5vw, 42px);
    font-weight: 900;
    letter-spacing: -.045em;
    margin: 0;
}

.tool-rate-card {
    flex: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
}

.tool-rate-card > span {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    color: var(--muted);
}

.tool-rate-card strong {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.02em;
}

.tool-rate-card small {
    color: var(--muted-2);
    font-size: 9px;
}

.source-switcher {
    margin-bottom: 18px;
}

.source-switcher-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.source-switcher-head a {
    font-size: 10px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--brand-dark);
}

.source-tabs {
    display: flex;
    align-items: stretch;
    gap: 5px;
    background: #e9edf1;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 5px;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
}

.source-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: 9px 14px;
    min-width: 190px;
    text-align: left;
    cursor: pointer;
    color: var(--muted);
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.source-tab:hover {
    color: var(--ink-soft);
    background: rgba(255,255,255,.55);
}

.source-tab.active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
}

.source-tab-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: none;
    background: var(--muted-2);
}

.source-tab-status.ready {
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(15,159,110,.1);
}

.source-tab-status.pending {
    background: var(--brand);
    opacity: .65;
}

.source-tab-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.source-tab-text strong {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.source-tab-text small {
    font-size: 9px;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.source-tab.active .source-tab-text small {
    color: var(--muted);
}

.source-tabs-empty {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--muted);
}

.tool-placeholder {
    background: #fff;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 34px;
    margin-bottom: 20px;
    max-width: 760px;
}

.tool-placeholder-badge {
    display: inline-flex;
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.tool-placeholder h2 {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.03em;
    margin-bottom: 8px;
}

.tool-placeholder p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    max-width: 620px;
    margin-bottom: 18px;
}

.tool-placeholder-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tool-recent {
    margin-top: 22px;
}

.tool-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.tool-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.tool-panel-head h2 {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.03em;
    margin-top: 4px;
}

.tool-panel-head a {
    font-size: 10px;
    font-weight: 800;
    color: var(--brand-dark);
    margin-top: 5px;
}

.recent-list {
    display: flex;
    flex-direction: column;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

.recent-item:last-child {
    border-bottom: 0;
}

.recent-item:hover {
    color: var(--brand-dark);
}

.recent-main {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.recent-main strong {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.recent-main span {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    color: var(--muted-2);
    font-size: 9px;
}

.tool-empty {
    color: var(--muted);
    font-size: 12px;
    padding: 10px 0;
}

@media (max-width: 900px) {
    .tool-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .source-tab {
        min-width: 150px;
        flex: 1 1 150px;
    }
}

@media (max-width: 620px) {
    .tool-page-shell {
        padding-top: 24px;
    }

    .tool-heading h1 {
        font-size: 30px;
    }

    .tool-rate-card {
        width: 100%;
    }

    .source-tabs {
        width: 100%;
    }

    .source-tab {
        min-width: 0;
        flex: 1 1 100%;
    }

    .source-tab-text strong {
        max-width: none;
    }

    .recent-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .recent-meta {
        flex-wrap: wrap;
    }

    .footer-minimal {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ---------- Tariff settings / client cards admin ---------- */

.tariff-sections {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tariff-editor {
    border-color: rgba(229, 57, 53, .28);
    box-shadow: 0 14px 40px rgba(229, 57, 53, .08);
}

.tariff-default-badge {
    margin-left: 8px;
    white-space: nowrap;
}

.tariff-zero {
    color: var(--red);
    font-weight: 800;
    white-space: nowrap;
}

.tariff-warning {
    margin: 16px 0 0;
}

.tariff-empty {
    padding: 12px 0 4px;
    line-height: 1.6;
}

.copy-link-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 16px 0 10px;
}

.copy-link-row .form-control {
    flex: 1;
    min-width: 0;
}

.card-created-panel {
    border-color: rgba(63, 158, 81, .3);
    box-shadow: 0 16px 42px rgba(63, 158, 81, .09);
}

.card-created-note {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.7;
    margin: 8px 0 4px;
}

.card-preview-strip {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
    margin-bottom: 16px;
}

.card-preview-strip img {
    width: 180px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    background: #e9edf1;
    flex: 0 0 auto;
}

.card-preview-strip h3 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 5px;
}

.card-preview-strip p {
    color: var(--muted);
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 9px;
}

.country-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 800;
    padding: 5px 10px;
}

.quote-breakdown {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.quote-breakdown > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 12px;
}

.quote-breakdown dt {
    color: var(--muted);
    font-weight: 500;
}

.quote-breakdown dd {
    margin: 0;
    font-weight: 800;
    color: var(--ink-soft);
    text-align: right;
    white-space: nowrap;
}

.quote-breakdown .quote-total {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 2px solid var(--ink);
    border-bottom: 0;
}

.quote-breakdown .quote-total dt {
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.quote-breakdown .quote-total dd {
    color: var(--brand-dark);
    font-size: 25px;
    letter-spacing: -.04em;
}

.card-quote-panel .form-grid + .checkbox-row {
    margin-top: 12px;
}

.card-quote-panel .checkbox-row + .checkbox-row {
    margin-top: 8px;
}

/* ---------- Public client card ---------- */

.client-site-shell {
    background: #f3f4f6;
}

.client-site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 5;
}

.client-header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.client-brand {
    cursor: default;
    color: var(--ink);
}

.client-brand .site-brand-text strong {
    color: var(--ink);
}

.client-brand .site-brand-text small {
    color: var(--muted);
}

.client-header-contact {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    line-height: 1.5;
}

.client-site-footer {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 16px 0;
}

.client-site-footer .footer-minimal {
    color: var(--muted);
    font-size: 11px;
}

.client-card-hero {
    position: relative;
    overflow: hidden;
    padding: 58px 0 56px;
    background:
        radial-gradient(circle at 88% 12%, rgba(229, 57, 53, .28), transparent 30%),
        radial-gradient(circle at 8% 95%, rgba(124, 92, 255, .16), transparent 32%),
        linear-gradient(135deg, #151c25 0%, #1d2530 52%, #2b1f22 100%);
}

.client-card-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -130px;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    pointer-events: none;
}

.client-card-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, .9fr);
    gap: 46px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.client-card-hero-copy h1 {
    color: #fff;
    font-size: clamp(34px, 4.4vw, 56px);
    line-height: 1.03;
    font-weight: 900;
    letter-spacing: -.045em;
    margin: 16px 0 14px;
    outline: none;
}

.client-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 16px;
}

.client-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .17);
    background: rgba(255, 255, 255, .07);
    color: #e8edf3;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.client-tag-green {
    border-color: rgba(90, 190, 112, .32);
    background: rgba(63, 158, 81, .2);
    color: #c9f4d2;
}

.client-card-hero-sub {
    color: rgba(255, 255, 255, .68);
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.client-prepared-for {
    display: inline-flex;
    margin-top: 20px;
    border-left: 3px solid var(--brand);
    padding: 5px 0 5px 12px;
    color: rgba(255, 255, 255, .73);
    font-size: 13px;
}

.client-prepared-for strong {
    color: #fff;
    margin-left: 5px;
}

.client-total-card {
    position: relative;
    background: #fff;
    border-radius: 22px;
    padding: 27px 28px 25px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}

.client-total-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), #ff8a65);
}

.client-total-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.client-total-value {
    color: var(--ink);
    font-size: clamp(34px, 3.6vw, 48px);
    font-weight: 900;
    letter-spacing: -.055em;
    line-height: 1.05;
    margin: 2px 0 5px;
}

.client-total-hint {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.55;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.client-total-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.client-total-meta strong {
    color: var(--ink-soft);
    font-weight: 800;
}

.client-total-meta small {
    color: var(--muted-2);
    font-size: 10px;
}

.client-card-content {
    padding: 30px 0 48px;
}

.client-card-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
    align-items: start;
}

.client-card-main {
    min-width: 0;
}

.client-gallery {
    box-shadow: var(--shadow-sm);
}

.client-gallery .gallery-main {
    aspect-ratio: 16 / 10;
}

.client-photo-grid {
    grid-template-columns: repeat(5, 1fr);
}

.client-card-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 18px;
}

.client-info-card,
.client-included-card,
.client-note-card,
.client-contact-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.client-info-card .aside-list {
    margin-top: 12px;
}

.client-included-card ul {
    margin: 13px 0 12px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.client-included-card li {
    position: relative;
    padding-left: 23px;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.45;
}

.client-included-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    font-size: 10px;
    font-weight: 900;
}

.client-included-card p {
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.55;
    border-top: 1px dashed var(--line);
    padding-top: 11px;
}

.client-note-card p {
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.7;
    margin-top: 9px;
    white-space: pre-line;
}

.client-contact-card {
    background: linear-gradient(155deg, #1b232d, #2d1e20);
    border-color: transparent;
}

.client-contact-card .eyebrow {
    color: #ff9b96;
}

.client-contact-text {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    margin: 11px 0 14px;
    white-space: pre-line;
}

.client-contact-card .muted {
    color: #a9b2be;
    font-size: 11px;
    line-height: 1.6;
    margin: 10px 0 14px;
}

.client-contact-card .btn-outline-secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, .24);
    color: #fff;
}

.client-contact-card .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, .08);
}

.client-contact-line {
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 13px;
}

@media (max-width: 1080px) {
    .client-card-hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .client-total-card {
        max-width: 520px;
    }

    .client-card-layout {
        grid-template-columns: 1fr;
    }

    .client-card-aside {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .client-contact-card {
        grid-column: span 1;
    }

    .client-photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 820px) {
    .client-header-inner {
        min-height: 68px;
    }

    .client-header-contact {
        display: none;
    }

    .client-card-hero {
        padding: 42px 0 40px;
    }

    .client-card-content {
        padding-top: 20px;
    }

    .client-photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .spec-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .client-card-aside {
        grid-template-columns: 1fr;
    }

    .client-total-card {
        padding: 23px;
    }

    .client-card-hero-copy h1 {
        font-size: 33px;
    }

    .client-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-preview-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-preview-strip img {
        width: 100%;
        height: 170px;
    }

    .copy-link-row {
        flex-direction: column;
    }
}

@media print {
    .client-site-header,
    .client-site-footer,
    .client-contact-card,
    .lightbox,
    #blazor-error-ui {
        display: none !important;
    }

    body,
    .client-site-shell {
        background: #fff !important;
    }

    .client-card-hero {
        background: #fff !important;
        color: #111820 !important;
        padding: 0 0 22px;
        border-bottom: 2px solid #111820;
    }

    .client-card-hero-copy h1 {
        color: #111820 !important;
        font-size: 32px;
    }

    .client-card-hero-sub,
    .client-prepared-for {
        color: #4a5562 !important;
    }

    .client-tag {
        border-color: #d7dce2 !important;
        background: #f3f4f6 !important;
        color: #303a46 !important;
    }

    .client-total-card {
        box-shadow: none !important;
        border: 1px solid #d7dce2;
    }

    .client-card-layout {
        grid-template-columns: 1fr 280px;
    }

    .client-card-aside {
        position: static;
    }

    .client-gallery .gallery-thumbs {
        display: none;
    }

    .detail-section,
    .client-info-card,
    .client-included-card,
    .client-note-card {
        break-inside: avoid;
    }
}

/* ---------- Budget breakdown ---------- */

.budget-panel {
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid rgba(21, 74, 122, .14);
    border-radius: 16px;
    background: linear-gradient(135deg, #f7fafc 0%, #f3f6fa 100%);
}

.tool-left-rail .budget-panel {
    margin-bottom: 0;
}

.budget-section-title {
    margin: 4px 0 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.budget-car-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.budget-checkbox {
    margin-bottom: 12px;
}

.budget-city-field {
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .budget-car-grid {
        grid-template-columns: 1fr;
    }
}

.budget-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.budget-panel-head h3 {
    margin: 6px 0 6px;
    font-size: 20px;
    letter-spacing: -.02em;
}

.budget-panel-head p {
    max-width: 720px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.budget-rate {
    align-self: center;
    padding: 6px 11px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.budget-breakdown {
    padding: 6px 16px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.budget-breakdown-compact {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 0;
    background: transparent;
}

.budget-breakdown-head {
    padding: 10px 0 2px;
}

.budget-breakdown-head h3 {
    margin: 4px 0 0;
    font-size: 18px;
    letter-spacing: -.02em;
}

.budget-line dt {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.budget-expense-kind {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.budget-expense-secondary {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.budget-line-start {
    padding-top: 4px;
}

.budget-line-start dd {
    color: var(--ink);
}

.budget-line-expenses {
    color: var(--ink-soft);
}

.budget-line-expenses dt {
    color: var(--ink-soft);
    font-weight: 800;
}

.budget-line-cny dd {
    color: var(--brand-dark);
}

.budget-alert {
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.5;
}

.budget-alert-warning {
    background: #fff8e6;
    border: 1px solid #f0d9a6;
    color: #7a5a13;
}

.budget-alert-danger {
    background: #fff1f0;
    border: 1px solid #f0c2bd;
    color: #8a2a20;
}

.results-budget {
    padding-top: 18px;
}

@media (max-width: 640px) {
    .budget-panel {
        padding: 14px;
    }

    .budget-breakdown {
        padding-left: 12px;
        padding-right: 12px;
    }
}
