:root {
    --red: #E53935;
    --red-dark: #C62828;
    --dark: #1a1d24;
    --text: #212121;
    --muted: #616161;
    --bg: #fafafa;
    --card: #fff;
    --border: #e8e8e8;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--red); text-decoration: none; letter-spacing: 1px; }
.nav-desktop { display: flex; align-items: center; gap: 20px; }
.nav-desktop a { color: var(--text); text-decoration: none; font-size: .95rem; }
.nav-toggle { display: none; border: none; background: none; font-size: 1.4rem; cursor: pointer; }
.nav-mobile { display: flex; flex-direction: column; padding: 12px 20px 20px; gap: 12px; border-top: 1px solid var(--border); background: #fff; }
.nav-mobile a { text-decoration: none; color: var(--text); font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: none; cursor: pointer; transition: transform .15s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled,
.btn.is-loading { opacity: .75; cursor: wait; pointer-events: none; }
.btn-spinner {
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: btn-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline { border: 1px solid var(--red); color: var(--red); background: #fff; }
.btn-ghost { color: var(--muted); }
.btn-lg { padding: 14px 24px; font-size: 1rem; }

.hero { background: linear-gradient(135deg, #1a1d24 0%, #2a3140 50%, #1a1d24 100%); color: #fff; padding: 64px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero-tag { color: #ff8a80; font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 12px 0; line-height: 1.15; }
.hero h1 span { color: var(--red); }
.hero-lead { font-size: 1.1rem; opacity: .9; max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card { background: rgba(255,255,255,.08); border-radius: 20px; padding: 28px; display: grid; gap: 12px; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.12); }
.feature-pill { background: rgba(255,255,255,.12); padding: 14px 18px; border-radius: 12px; font-weight: 500; }

.section { padding: 72px 0; }
.section-alt { background: #fff; }
.section h2 { text-align: center; font-size: 2rem; margin: 0 0 12px; }
.section-sub { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 40px; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card { background: var(--card); border-radius: 16px; padding: 28px; box-shadow: 0 4px 20px rgba(0,0,0,.06); border: 1px solid var(--border); }
.service-icon { font-size: 2.2rem; margin-bottom: 12px; }
.service-card h3 { margin: 0 0 8px; color: var(--red); }

.partner-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.partner-card { background: #fff; border: 2px solid var(--border); border-radius: 16px; padding: 28px 20px; text-align: center; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.partner-card:hover { border-color: var(--red); box-shadow: 0 8px 24px rgba(229,57,53,.12); }
.partner-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.partner-card strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.partner-card small { color: var(--muted); }

.site-footer { background: var(--dark); color: #bbb; padding: 32px 0; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #ddd; text-decoration: none; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal-panel { position: relative; background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 28px 24px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-close { position: absolute; top: 12px; right: 16px; border: none; background: none; font-size: 1.8rem; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-panel h2 { margin: 0 0 16px; font-size: 1.25rem; color: var(--red); }

.steps-bar { display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.step-dot { width: 32px; height: 32px; border-radius: 50%; background: #eee; color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.step-dot.active { background: var(--red); color: #fff; }
.step-dot.done { background: #c8e6c9; color: #2e7d32; }
.step-line { width: 40px; height: 2px; background: #eee; }
.step-label { text-align: center; font-size: .85rem; color: var(--muted); margin-bottom: 20px; }

.form-step { display: none; }
.form-step.active { display: block; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.tafuta-phone-row { display: flex; gap: 8px; align-items: stretch; }
.tafuta-phone-dial { flex: 0 0 auto; max-width: 48%; min-width: 130px; padding: 10px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem; background: #fff; font-family: inherit; }
.tafuta-phone-national { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: .88rem; color: var(--muted); margin: 0 0 12px; }
.btn-gps { width: 100%; margin-bottom: 12px; }
.gps-status { font-size: .85rem; color: #2e7d32; margin: 0 0 12px; }
.gps-status.hidden { display: none; }
.field-caption { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input[type="file"] { padding: 8px; background: #fafafa; }

.upload-zone {
    position: relative;
    border: 2px dashed #d0d0d0;
    border-radius: 14px;
    background: linear-gradient(180deg, #fafafa 0%, #f3f3f3 100%);
    padding: 16px;
    transition: border-color .15s, background .15s, box-shadow .15s;
    cursor: pointer;
    min-height: 140px;
}
.upload-zone:hover, .upload-zone.is-drag {
    border-color: var(--red);
    background: #fff8f8;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, .08);
}
.upload-zone.has-file { border-style: solid; border-color: #66bb6a; background: #fff; cursor: default; }
.upload-zone.is-valid { border-color: #43a047; }
.upload-zone.is-invalid { border-color: var(--red); background: #fff5f5; }
.upload-zone.is-checking {
    opacity: .95;
    pointer-events: none;
    border-color: #1565c0;
    background: #e3f2fd;
    animation: uploadPulse 1.2s ease-in-out infinite;
}
@keyframes uploadPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(21, 101, 192, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(21, 101, 192, 0.08); }
}
.upload-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    opacity: 0 !important;
}
.upload-zone-empty {
    pointer-events: none;
    text-align: center;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.upload-zone-empty.hidden, .upload-zone-preview.hidden { display: none !important; }
.upload-icon-svg { color: var(--red); display: flex; opacity: .9; }
.upload-zone-empty strong { font-size: .98rem; color: var(--text); }
.upload-hint { font-size: .8rem; color: var(--muted); max-width: 300px; line-height: 1.35; }
.upload-btn {
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
}
.upload-zone-preview { position: relative; z-index: 2; }
.upload-zone-preview img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 10px;
    background: #eee;
    border: 1px solid var(--border);
}
.upload-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    border: none;
    border-radius: 999px;
    background: rgba(0,0,0,.75);
    color: #fff;
    padding: 7px 14px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}
.upload-status { margin: 10px 0 0; font-size: .84rem; min-height: 1.15em; text-align: center; }
.upload-status.status-ok { color: #2e7d32; font-weight: 600; }
.upload-status.status-err { color: var(--red); font-weight: 600; }
.upload-status.status-info { color: #1565c0; }
.upload-zone-vehicle { min-height: 160px; }

.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 16px 0; }
.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-error { color: var(--red); font-size: .9rem; margin-top: 12px; text-align: center; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: .85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-mode-btn.active { border-color: var(--red); color: var(--red); background: #fff5f5; }
.login-step { display: none; }
.login-step.active { display: block; }
.dev-otp-box { background: #fff3e0; border: 1px dashed #ff9800; padding: 10px; border-radius: 8px; font-weight: 700; color: #e65100; text-align: center; margin: 8px 0 12px; }
.dev-otp-box.hidden { display: none; }
.google-btn-wrap { min-height: 40px; }
.success-icon { width: 64px; height: 64px; background: #e8f5e9; color: #2e7d32; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 16px; font-weight: 700; }
.success-box h3 { margin: 0 0 8px; }
.success-box p { color: var(--muted); margin-bottom: 20px; }

@media (max-width: 768px) {
    .nav-desktop { display: none; }
    .nav-toggle { display: block; }
    .nav-mobile:not(.hidden) { display: flex; }
    .hero-grid { grid-template-columns: 1fr; }
    .cards-3, .partner-btns { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
}
