/* ============================================
   СметаЧек — Premium Design System
   Inspired by T-Bank (Tinkoff)
   ============================================ */

:root {
    --c-primary: #1a56db;
    --c-primary-dark: #1e3a8a;
    --c-accent: #3b82f6;
    --c-accent-hover: #2563eb;
    --c-success: #22c55e;
    --c-success-bg: #f0fdf4;
    --c-warning: #f59e0b;
    --c-warning-bg: #fffbeb;
    --c-danger: #ef4444;
    --c-danger-bg: #fef2f2;
    --c-text: #0f172a;
    --c-text-2: #334155;
    --c-text-3: #64748b;
    --c-text-4: #94a3b8;
    --c-bg: #ffffff;
    --c-bg-2: #f8fafc;
    --c-surface: #ffffff;
    --c-border: #e2e8f0;
    --c-dark-bg: #0f172a;
    --c-dark-surface: #1e293b;

    --r: 16px;
    --r-lg: 24px;
    --r-full: 9999px;
    --shadow: 0 5px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
    --transition: 200ms cubic-bezier(0.2, 0, 0.4, 0.9);
    --max-w: 1104px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--c-text-2);
    background: var(--c-bg);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: none; }

/* ============================================
   Layout
   ============================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.home-container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ============================================
   Header
   ============================================ */
.header {
    padding: 16px 0;
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header .container { display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-text); }
.logo:hover { text-decoration: none; }
.logo__icon {
    width: 36px; height: 36px;
    background: var(--c-accent);
    color: #fff; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.logo__text { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }

.nav { display: flex; gap: 32px; align-items: center; }
.nav__link {
    text-decoration: none; color: var(--c-text-3);
    font-size: 15px; font-weight: 500;
    transition: color var(--transition);
}
.nav__link:hover { color: var(--c-text); }

.header__account {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--c-bg-2); color: var(--c-text-3);
    transition: all var(--transition); text-decoration: none;
    flex-shrink: 0;
}
.header__account:hover { background: rgba(59,130,246,0.1); color: var(--c-accent); }

.nav-burger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-burger span {
    display: block; width: 22px; height: 2px;
    background: var(--c-text); border-radius: 1px;
}

@media (max-width: 768px) {
    .nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: var(--c-bg); padding: 24px;
        flex-direction: column; gap: 20px;
        box-shadow: var(--shadow-lg); border-bottom: 1px solid var(--c-border);
    }
    .nav.open { display: flex; }
    .nav-burger { display: flex; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border: none; border-radius: var(--r);
    font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: all var(--transition); line-height: 1.4;
}
.btn:hover { transform: scale3d(1.03, 1.03, 1.03); text-decoration: none; }
.btn:active { transform: scale3d(0.98, 0.98, 0.98); }

.btn--accent {
    background: var(--c-accent); color: #fff;
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}
.btn--accent:hover { background: var(--c-accent-hover); box-shadow: 0 6px 24px rgba(59,130,246,0.4); }

.btn--secondary {
    background: var(--c-bg-2); color: var(--c-text);
    border: 1px solid var(--c-border);
}
.btn--secondary:hover { background: #fff; border-color: var(--c-accent); color: var(--c-accent); }

.btn--outline {
    background: transparent; color: var(--c-text-2);
    border: 1px solid var(--c-border);
}
.btn--outline:hover { border-color: var(--c-accent); color: var(--c-accent); }

.btn--primary { background: var(--c-accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-accent); }

.btn--xl { padding: 18px 36px; font-size: 17px; border-radius: var(--r-lg); }
.btn--lg { padding: 14px 28px; font-size: 16px; border-radius: var(--r); }
.btn--sm { padding: 8px 16px; font-size: 14px; border-radius: 10px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ============================================
   Hero
   ============================================ */
.hero {
    padding: 80px 24px 96px;
    text-align: center;
    background: linear-gradient(180deg, #f0f6ff 0%, var(--c-bg) 100%);
}

.hero__container { max-width: 720px; margin: 0 auto; }

.hero__title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--c-text);
    margin-bottom: 20px;
}

.hero__text {
    font-size: 19px;
    color: var(--c-text-3);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.hero__actions {
    display: flex; gap: 12px;
    justify-content: center; flex-wrap: wrap;
}

/* ============================================
   Home sections
   ============================================ */
.home-section { padding: 80px 0; }
.home-section--dark { background: var(--c-dark-bg); color: #fff; }

.home-heading {
    font-size: 36px; font-weight: 800; letter-spacing: -0.02em;
    text-align: center; margin-bottom: 48px; color: var(--c-text);
}
.home-heading--light { color: #fff; }

/* Step cards */
.home-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

.home-card {
    background: var(--c-bg-2);
    border-radius: var(--r-lg); padding: 36px 28px;
    transition: all var(--transition);
}
.home-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }

.home-card__num {
    font-size: 14px; font-weight: 700; color: var(--c-accent);
    margin-bottom: 16px; letter-spacing: 0.05em;
}
.home-card__title {
    font-size: 22px; font-weight: 700; color: var(--c-text);
    margin-bottom: 8px; letter-spacing: -0.01em;
}
.home-card__text { font-size: 15px; color: var(--c-text-3); line-height: 1.5; }

/* ============================================
   Demo report
   ============================================ */
.demo-report {
    max-width: 780px; margin: 0 auto;
    background: var(--c-dark-surface); border-radius: var(--r-lg);
    padding: 40px; overflow: hidden;
}

.demo-report__header {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    padding-bottom: 32px; margin-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.demo-report__metric { text-align: center; }
.demo-report__metric-value {
    display: block; font-size: 28px; font-weight: 800;
    color: #fff; letter-spacing: -0.02em; line-height: 1.2;
}
.demo-report__metric-label {
    display: block; font-size: 13px; color: rgba(255,255,255,0.5);
    margin-top: 6px;
}

.demo-report__items { display: flex; flex-direction: column; gap: 8px; }

.demo-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-radius: var(--r);
    background: rgba(255,255,255,0.05);
    transition: background var(--transition);
}
.demo-item:hover { background: rgba(255,255,255,0.08); }
.demo-item--danger { border-left: 3px solid var(--c-danger); }
.demo-item--warning { border-left: 3px solid var(--c-warning); }

.demo-item__main { flex: 1; min-width: 0; }
.demo-item__name { font-size: 15px; font-weight: 600; color: #fff; }
.demo-item__detail { font-size: 13px; color: rgba(255,255,255,0.4); margin-top: 2px; }

.demo-item__side { flex-shrink: 0; text-align: right; margin-left: 20px; }
.demo-item__market { font-size: 13px; color: rgba(255,255,255,0.4); }

.demo-badge {
    display: inline-block; padding: 3px 10px; border-radius: var(--r-full);
    font-size: 13px; font-weight: 600; margin-top: 4px;
}
.demo-badge--danger { background: rgba(239,68,68,0.15); color: #f87171; }
.demo-badge--warning { background: rgba(245,158,11,0.15); color: #fbbf24; }
.demo-badge--ok { background: rgba(34,197,94,0.15); color: #4ade80; }

.demo-report__cta { text-align: center; margin-top: 36px; }

/* Badges (reused in other pages) */
.badge--danger { display: inline-block; background: var(--c-danger-bg); color: #dc2626; padding: 2px 10px; border-radius: var(--r-full); font-size: 13px; font-weight: 600; }
.badge--warning { display: inline-block; background: var(--c-warning-bg); color: #d97706; padding: 2px 10px; border-radius: var(--r-full); font-size: 13px; font-weight: 600; }
.badge--ok { display: inline-block; background: var(--c-success-bg); color: #16a34a; padding: 2px 10px; border-radius: var(--r-full); font-size: 13px; font-weight: 600; }

/* ============================================
   Pages common
   ============================================ */
.page__title { font-size: 32px; font-weight: 800; color: var(--c-text); letter-spacing: -0.02em; margin-bottom: 8px; }
.page__subtitle { font-size: 16px; color: var(--c-text-3); margin-bottom: 32px; }

.section__tag {
    display: inline-block; background: rgba(59,130,246,0.1); color: var(--c-accent);
    padding: 4px 14px; border-radius: var(--r-full);
    font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.section__title { font-size: 32px; font-weight: 800; color: var(--c-text); letter-spacing: -0.02em; margin-bottom: 12px; }

/* ============================================
   Upload page
   ============================================ */
.upload-page { padding: 48px 0 96px; }

.upload-card {
    max-width: 520px; margin: 0 auto;
    background: var(--c-surface); border-radius: var(--r-lg); padding: 40px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--c-border);
}
.upload-card__title { font-size: 28px; font-weight: 800; color: var(--c-text); text-align: center; margin-bottom: 8px; }
.upload-card__subtitle { font-size: 15px; color: var(--c-text-3); text-align: center; margin-bottom: 32px; }

.upload-area__dropzone {
    border: 2px dashed var(--c-border); border-radius: var(--r-lg);
    padding: 48px 24px; text-align: center; cursor: pointer;
    transition: all var(--transition); background: var(--c-bg-2);
}
.upload-area__dropzone:hover, .upload-area__dropzone.dragover {
    border-color: var(--c-accent); background: rgba(59,130,246,0.04);
}
.upload-area__camera-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: rgba(59,130,246,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.upload-area__text { color: var(--c-text-3); margin-bottom: 8px; font-size: 15px; }
.upload-area__formats { font-size: 13px; color: var(--c-text-4); }
.upload-area__input { display: none; }
.upload-area__buttons { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.upload-area__preview { margin-top: 16px; text-align: center; }
.upload-area__preview img { max-width: 100%; max-height: 240px; border-radius: var(--r); margin-bottom: 12px; }

.upload-options { margin-top: 24px; }
.upload-options label { font-size: 14px; color: var(--c-text-3); display: flex; flex-direction: column; gap: 6px; }
.upload-submit { margin-top: 24px; }
.upload-checklist { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--c-border); }
.upload-checklist__title { font-size: 13px; font-weight: 600; color: var(--c-text-4); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.upload-checklist__list { list-style: none; }
.upload-checklist__list li { padding: 6px 0; font-size: 14px; color: var(--c-text-3); padding-left: 24px; position: relative; }
.upload-checklist__list li::before { content: "\2713"; position: absolute; left: 0; color: var(--c-success); font-weight: 700; }

.manual-entry { text-align: center; margin-top: 32px; font-size: 14px; color: var(--c-text-3); }

/* ============================================
   Result page
   ============================================ */
.result-page { padding: 32px 0 96px; }
.result-page .container { max-width: 720px; }

.score-card {
    background: var(--c-surface); border-radius: var(--r-lg); padding: 40px;
    box-shadow: var(--shadow-lg); text-align: center; margin-bottom: 24px;
}
.score-ring {
    width: 120px; height: 120px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.score-ring--good { background: conic-gradient(var(--c-success) 0deg, var(--c-success) calc(var(--score) * 3.6deg), var(--c-border) calc(var(--score) * 3.6deg)); }
.score-ring--mid { background: conic-gradient(var(--c-warning) 0deg, var(--c-warning) calc(var(--score) * 3.6deg), var(--c-border) calc(var(--score) * 3.6deg)); }
.score-ring--bad { background: conic-gradient(var(--c-danger) 0deg, var(--c-danger) calc(var(--score) * 3.6deg), var(--c-border) calc(var(--score) * 3.6deg)); }
.score-inner {
    width: 96px; height: 96px; border-radius: 50%; background: var(--c-surface);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-inner__value { font-size: 36px; font-weight: 800; line-height: 1; }
.score-inner__label { font-size: 12px; color: var(--c-text-3); }
.score-card__title { font-size: 18px; font-weight: 700; color: var(--c-text); margin-bottom: 8px; }
.score-card__summary { font-size: 15px; color: var(--c-text-3); line-height: 1.6; max-width: 440px; margin: 0 auto; }

.result-strip {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    margin-bottom: 32px;
}
.result-strip__item {
    background: var(--c-surface); border-radius: var(--r); padding: 20px;
    text-align: center; border: 1px solid var(--c-border);
}
.result-strip__value { font-size: 20px; font-weight: 700; }
.result-strip__value--danger { color: var(--c-danger); }
.result-strip__value--success { color: var(--c-success); }
.result-strip__label { font-size: 12px; color: var(--c-text-3); margin-top: 4px; }

.result-item {
    background: var(--c-surface); border-radius: var(--r); padding: 20px;
    border: 1px solid var(--c-border); margin-bottom: 12px;
    transition: box-shadow var(--transition);
}
.result-item:hover { box-shadow: var(--shadow); }
.result-item--danger { border-left: 3px solid var(--c-danger); }
.result-item--warning { border-left: 3px solid var(--c-warning); }
.result-item--ok { border-left: 3px solid var(--c-success); }
.result-item__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.result-item__name { font-weight: 600; font-size: 15px; color: var(--c-text); }
.result-item__badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-full); }
.result-item__prices { display: flex; gap: 20px; font-size: 14px; color: var(--c-text-3); }
.result-item__prices strong { color: var(--c-text); }
.result-item__comment { font-size: 14px; color: var(--c-text-3); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-border); }
.price-bar { margin: 8px 0; }
.price-bar__track { height: 6px; background: var(--c-border); border-radius: 3px; position: relative; }
.price-bar__range { position: absolute; height: 100%; background: var(--c-success); border-radius: 3px; opacity: 0.3; }
.price-bar__marker { position: absolute; top: -3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.price-bar__marker--danger { background: var(--c-danger); }
.price-bar__marker--warning { background: var(--c-warning); }
.price-bar__marker--ok { background: var(--c-success); }

/* City search */
.city-search { position: relative; }
.city-search__input {
    width: 100%; padding: 12px 16px; border: 1px solid var(--c-border);
    border-radius: 12px; font-size: 15px; background: var(--c-bg);
    color: var(--c-text); transition: all var(--transition);
}
.city-search__input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.city-search__input::placeholder { color: var(--c-text-4); }
.city-search__dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: 12px; margin-top: 4px; overflow: hidden;
    box-shadow: var(--shadow-lg); z-index: 50; max-height: 280px; overflow-y: auto;
}
.city-option {
    padding: 12px 16px; cursor: pointer; font-size: 15px; color: var(--c-text-2);
    transition: background var(--transition);
}
.city-option:hover { background: rgba(59,130,246,0.06); color: var(--c-accent); }
.city-option + .city-option { border-top: 1px solid var(--c-border); }
.city-empty { padding: 12px 16px; font-size: 14px; color: var(--c-text-4); }

/* Paywall */
.paywall { position: relative; margin-top: 8px; }
.paywall__blur { filter: blur(6px); pointer-events: none; user-select: none; opacity: 0.5; }
.paywall__fake-item {
    height: 80px; background: var(--c-bg-2); border-radius: var(--r);
    margin-bottom: 12px; border: 1px solid var(--c-border);
}
.paywall__cta {
    position: relative; margin-top: -60px;
    background: var(--c-surface); border-radius: var(--r-lg); padding: 32px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--c-border);
    text-align: center; z-index: 2;
}
.paywall__cta h3 { font-size: 20px; font-weight: 700; color: var(--c-text); margin-bottom: 8px; }
.paywall__cta p { font-size: 15px; color: var(--c-text-3); margin-bottom: 20px; line-height: 1.5; }

/* Processing */
.processing-card {
    max-width: 480px; margin: 48px auto;
    background: var(--c-surface); border-radius: var(--r-lg); padding: 48px;
    box-shadow: var(--shadow-lg); text-align: center;
}
.processing__icon { width: 72px; height: 72px; margin: 0 auto 24px; background: rgba(59,130,246,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; animation: pulse-icon 2s ease-in-out infinite; }
@keyframes pulse-icon { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.processing__title { font-size: 20px; font-weight: 700; color: var(--c-text); margin-bottom: 28px; }
.processing__stages { text-align: left; }
.processing__stage { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 10px; margin-bottom: 6px; font-size: 15px; transition: all 0.3s; }
.processing__stage--done { color: var(--c-success); }
.processing__stage--active { background: rgba(59,130,246,0.08); color: var(--c-accent); font-weight: 600; }
.processing__stage--pending { color: var(--c-text-4); }
.processing__stage-icon { width: 20px; text-align: center; }
.processing__stage--done .processing__stage-icon::before { content: "\2713"; }
.processing__stage--active .processing__stage-icon::before { content: "\25CB"; }
.processing__stage--pending .processing__stage-icon::before { content: "\25CB"; }
.processing__tip { margin-top: 28px; padding: 16px; background: var(--c-bg-2); border-radius: var(--r); font-size: 14px; color: var(--c-text-3); }

.error-card { max-width: 480px; margin: 48px auto; text-align: center; background: var(--c-surface); border-radius: var(--r-lg); padding: 48px; box-shadow: var(--shadow-lg); }
.error-card__icon { font-size: 48px; margin-bottom: 16px; }
.error-card__title { font-size: 20px; font-weight: 700; color: var(--c-text); margin-bottom: 12px; }
.error-card__text { font-size: 15px; color: var(--c-text-3); margin-bottom: 24px; }

/* ============================================
   Pricing
   ============================================ */
.pricing-page { padding: 64px 0 96px; }
.pricing-tabs {
    display: inline-flex; gap: 4px; background: var(--c-bg-2); border-radius: var(--r);
    padding: 4px; margin-bottom: 36px;
}
.pricing-tab {
    padding: 10px 24px; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    background: transparent; color: var(--c-text-3); transition: all var(--transition);
}
.pricing-tab--active { background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow); }

.pricing__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 1000px; margin: 0 auto; }
.pricing-card {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--r-lg); padding: 36px 28px;
    text-align: center; position: relative; transition: all var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.pricing-card--popular { border-color: var(--c-accent); box-shadow: var(--shadow-lg); }
.pricing-card__badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--c-accent); color: #fff; padding: 4px 16px; border-radius: var(--r-full);
    font-size: 13px; font-weight: 700;
}
.pricing-card__title { font-size: 16px; font-weight: 600; color: var(--c-text-3); margin-bottom: 8px; }
.pricing-card__price { font-size: 40px; font-weight: 800; color: var(--c-text); margin-bottom: 4px; letter-spacing: -0.03em; }
.pricing-card__price span { font-size: 16px; font-weight: 500; color: var(--c-text-4); }
.pricing-card__desc { font-size: 14px; color: var(--c-text-4); margin-bottom: 28px; }
.pricing-card__features { list-style: none; margin-bottom: 28px; text-align: left; }
.pricing-card__features li { padding: 8px 0; padding-left: 28px; position: relative; font-size: 15px; color: var(--c-text-2); }
.pricing-card__features li::before { content: "\2713"; position: absolute; left: 0; color: var(--c-success); font-weight: 700; }

/* ============================================
   Auth
   ============================================ */
.auth-page { padding: 64px 0; min-height: 60vh; display: flex; align-items: center; }
.auth-page .container { width: 100%; }
.auth-card { max-width: 420px; margin: 0 auto; background: var(--c-surface); border-radius: var(--r-lg); padding: 40px; box-shadow: var(--shadow-lg); }
.auth-card__title { text-align: center; font-size: 28px; font-weight: 800; color: var(--c-text); margin-bottom: 32px; }
.auth-card__footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--c-text-3); }
.alert { padding: 12px 16px; border-radius: var(--r); margin-bottom: 20px; font-size: 14px; }
.alert--error { background: var(--c-danger-bg); color: #dc2626; }

/* ============================================
   Forms
   ============================================ */
.input {
    width: 100%; padding: 12px 16px;
    border: 1px solid var(--c-border); border-radius: 12px;
    font-size: 15px; transition: all var(--transition);
    background: var(--c-bg); color: var(--c-text);
}
.input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--c-text-2); margin-bottom: 6px; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-group--grow { flex: 1; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }

/* ============================================
   Dashboard
   ============================================ */
.dashboard-page { padding: 32px 0 96px; }
.dash__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
.dash__card { background: var(--c-surface); border-radius: var(--r-lg); padding: 28px; text-align: center; border: 1px solid var(--c-border); }
.dash__card-label { font-size: 14px; color: var(--c-text-3); margin-bottom: 4px; }
.dash__card-value { font-size: 36px; font-weight: 800; color: var(--c-text); }
.dash__referral { background: var(--c-bg-2); border-radius: var(--r-lg); padding: 28px; margin-bottom: 28px; }
.dash__referral h3 { font-size: 18px; font-weight: 700; color: var(--c-text); margin-bottom: 8px; }
.dash__referral p { font-size: 14px; color: var(--c-text-3); margin-bottom: 16px; }
.dash__referral-code { display: flex; gap: 8px; }
.dash__referral-code .input { flex: 1; font-size: 14px; }
.dash__estimates { display: flex; flex-direction: column; gap: 8px; }
.dash__estimate-row { display: flex; justify-content: space-between; align-items: center; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r); padding: 16px; text-decoration: none; color: inherit; transition: box-shadow var(--transition); }
.dash__estimate-row:hover { box-shadow: var(--shadow); }
.dash__estimate-info { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.dash__estimate-id { font-weight: 700; color: var(--c-text); }
.dash__estimate-source { color: var(--c-text-3); }
.dash__estimate-region { color: var(--c-text-4); font-size: 14px; }
.dash__estimate-meta { display: flex; gap: 12px; align-items: center; }
.dash__estimate-date { font-size: 13px; color: var(--c-text-4); }
.empty-state { text-align: center; color: var(--c-text-3); padding: 48px; }

/* ============================================
   Builder
   ============================================ */
.builder-page { padding: 32px 0 96px; }
.builder-start-card { max-width: 420px; margin: 0 auto 36px; background: var(--c-surface); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow); border: 1px solid var(--c-border); }
.builder-info { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-bottom: 48px; text-align: center; }
.builder-info__item { display: flex; flex-direction: column; }
.builder-info__item strong { font-size: 28px; font-weight: 800; color: var(--c-accent); }
.builder-info__item span { font-size: 14px; color: var(--c-text-3); }
.builder-how { max-width: 520px; margin: 0 auto; background: var(--c-bg-2); border-radius: var(--r-lg); padding: 28px; }
.builder-how h3 { font-size: 16px; font-weight: 700; color: var(--c-text); margin-bottom: 20px; text-align: center; }
.builder-how__steps { display: flex; flex-direction: column; gap: 16px; }
.builder-how__step { display: flex; align-items: flex-start; gap: 14px; }
.builder-how__num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--c-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.builder-how__step p { font-size: 14px; color: var(--c-text-3); margin: 0; }
.builder-add { background: var(--c-surface); border-radius: var(--r-lg); padding: 24px; margin-bottom: 20px; border: 1px solid var(--c-border); }
.builder-add h3 { font-size: 16px; font-weight: 700; color: var(--c-text); margin-bottom: 12px; }
.builder-actions { text-align: center; margin-top: 28px; }
.items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.items-table th, .items-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--c-border); }
.items-table th { font-weight: 600; color: var(--c-text-4); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.items-table tfoot td { border-top: 2px solid var(--c-text); font-weight: 700; }
.catalog__category { font-size: 18px; font-weight: 700; margin: 28px 0 12px; color: var(--c-text); }
.catalog__grid { display: grid; gap: 2px; }
.catalog__item { display: flex; justify-content: space-between; padding: 10px 16px; border-radius: 8px; font-size: 14px; }
.catalog__item:nth-child(odd) { background: var(--c-bg-2); }
.catalog__price { color: var(--c-text-3); white-space: nowrap; font-weight: 500; }
.catalog-picker { margin-top: 12px; }
.catalog-picker summary { cursor: pointer; color: var(--c-accent); font-size: 14px; font-weight: 600; }
.catalog-picker__list { max-height: 300px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--c-border); border-radius: var(--r); }
.catalog-picker__item { display: block; width: 100%; text-align: left; padding: 10px 16px; border: none; background: none; cursor: pointer; font-size: 14px; border-bottom: 1px solid var(--c-border); }
.catalog-picker__item:hover { background: rgba(59,130,246,0.06); }

/* ============================================
   Calculators
   ============================================ */
.calculator-page { padding: 32px 0 96px; }
.calc-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; max-width: 800px; margin: 32px auto 0; }
.calc-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 28px; text-decoration: none; color: inherit; transition: all var(--transition); }
.calc-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--c-accent); }
.calc-card h3 { font-size: 18px; font-weight: 700; color: var(--c-text); margin-bottom: 6px; }
.calc-card p { font-size: 14px; color: var(--c-text-3); margin: 0; }
.calc-form { max-width: 520px; background: var(--c-surface); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow); border: 1px solid var(--c-border); }
.calc-form__section { margin-bottom: 20px; }
.calc-form__section h3 { font-size: 16px; font-weight: 700; color: var(--c-text); margin-bottom: 12px; }
.calc-result { margin-top: 28px; padding: 28px; background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid var(--c-border); }
.calc-result h3 { font-size: 18px; font-weight: 700; color: var(--c-text); margin-bottom: 16px; }
.calc-result__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.calc-result__item { padding: 16px; background: var(--c-bg-2); border-radius: var(--r); text-align: center; }
.calc-result__item--highlight { background: rgba(59,130,246,0.08); }
.calc-result__label { display: block; font-size: 12px; color: var(--c-text-3); margin-bottom: 4px; }
.calc-result__value { font-size: 22px; font-weight: 700; color: var(--c-text); }

/* ============================================
   Footer
   ============================================ */
.footer {
    border-top: 1px solid var(--c-border); padding: 40px 0;
}
.footer .container { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer__link { font-size: 14px; color: var(--c-text-3); }
.footer__link:hover { color: var(--c-accent); }
.footer__copy { font-size: 13px; color: var(--c-text-4); }

/* ============================================
   Sticky CTA
   ============================================ */
.sticky-cta {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--c-bg); border-top: 1px solid var(--c-border);
    padding: 12px 16px; z-index: 90;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero { padding: 48px 16px 64px; }
    .hero__title { font-size: 32px; }
    .hero__text { font-size: 16px; }
    .home-cards { grid-template-columns: 1fr; }
    .home-section { padding: 48px 0; }
    .demo-report { padding: 24px; }
    .demo-report__header { grid-template-columns: repeat(2, 1fr); }
    .demo-item { flex-direction: column; align-items: flex-start; }
    .demo-item__side { margin-left: 0; margin-top: 8px; }
    .pricing__grid { grid-template-columns: 1fr; }
    .result-strip { grid-template-columns: 1fr; }
    .dash__grid { grid-template-columns: 1fr; }
    .dash__estimate-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .sticky-cta { display: block; }
    body { padding-bottom: 64px; }
}

@media (min-width: 1024px) {
    .hero__title { font-size: 56px; }
}
