/* Apply form — clean, focused, matches LicensePro's blue identity. */
:root {
    --a-primary: #3b82f6;
    --a-primary-600: #2563eb;
    --a-ink: #0f172a;
    --a-ink-2: #475569;
    --a-ink-3: #94a3b8;
    --a-line: #e2e8f0;
    --a-bg: #f1f5f9;
    --a-ok: #059669;
    --a-danger: #dc2626;
    --a-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body.apply-body { margin: 0; font-family: var(--a-font); background: var(--a-bg); color: var(--a-ink); }

.apply-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--a-line);
}
.apply-brand { font-weight: 800; color: var(--a-ink); text-decoration: none; font-size: 1.1rem; }
.apply-brand i { color: var(--a-primary); margin-right: 6px; }
.apply-back { color: var(--a-ink-2); text-decoration: none; font-size: .9rem; }
.apply-back:hover { color: var(--a-primary); }

.apply-main { display: grid; place-items: start center; padding: 32px 16px 64px; }
.apply-card {
    width: 100%; max-width: 620px; background: #fff;
    border: 1px solid var(--a-line); border-radius: 18px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .07);
    padding: 30px 30px 26px;
}

/* Steps */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 28px; }
.step {
    flex: 1; display: flex; align-items: center; gap: 8px;
    font-size: .82rem; color: var(--a-ink-3); font-weight: 600;
    padding-bottom: 10px; border-bottom: 3px solid var(--a-line);
}
.step span {
    display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    background: var(--a-line); color: var(--a-ink-2); font-size: .78rem;
}
.step.is-active { color: var(--a-primary-600); border-bottom-color: var(--a-primary); }
.step.is-active span { background: var(--a-primary); color: #fff; }
.step.is-done span { background: var(--a-ok); color: #fff; }
@media (max-width: 560px) { .step { font-size: 0; gap: 0; } .step span { font-size: .78rem; } }

/* Panels */
.panel { display: none; animation: fade .2s ease; }
.panel.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.panel .sub { color: var(--a-ink-2); margin: 0 0 22px; font-size: .92rem; }

.fieldset { margin-bottom: 18px; }
.fieldset label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 7px; }
.fieldset .opt { color: var(--a-ink-3); font-weight: 400; }
.apply-body input, .apply-body select {
    width: 100%; padding: 12px 13px; font-size: .95rem; font-family: inherit;
    border: 1.5px solid var(--a-line); border-radius: 10px; background: #fff; color: var(--a-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.apply-body input:focus, .apply-body select:focus {
    outline: none; border-color: var(--a-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.apply-body input.invalid { border-color: var(--a-danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Service list */
.service-list { display: flex; flex-direction: column; gap: 10px; }
.service-group { display: flex; flex-direction: column; gap: 10px; }
.service-group + .service-group { margin-top: 6px; }
.service-group__title {
    font-size: .74rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--a-primary-600); margin: 4px 0 2px;
}
.empty-hint { color: var(--a-ink-3); font-size: .9rem; margin: 0; padding: 10px 0; }
.service-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 15px; border: 1.5px solid var(--a-line); border-radius: 10px; cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.service-item:hover { border-color: var(--a-primary); }
.service-item.checked { border-color: var(--a-primary); background: #eff6ff; }
.service-item input { width: auto; accent-color: var(--a-primary); }
.service-item .s-name { flex: 1; font-weight: 500; }
.service-item .s-fee { font-weight: 700; color: var(--a-primary-600); }

.running-total {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 18px; padding: 16px 18px; border-radius: 12px;
    background: linear-gradient(135deg, var(--a-primary), #6366f1); color: #fff;
}
.running-total strong { font-size: 1.5rem; }

/* Privacy note */
.privacy-note {
    display: flex; gap: 12px; padding: 14px 16px; margin-bottom: 20px;
    background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
    font-size: .88rem; color: #14532d; line-height: 1.5;
}
.privacy-note i { color: var(--a-ok); margin-top: 2px; }

/* Review */
.review-box { border: 1px solid var(--a-line); border-radius: 12px; overflow: hidden; }
.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--a-line); font-size: .9rem; }
.review-row:last-child { border-bottom: none; }
.review-row .k { color: var(--a-ink-2); }
.review-row .v { font-weight: 600; text-align: right; }
.review-row.total { background: #f8fafc; font-size: 1rem; }
.review-row.total .v { color: var(--a-primary-600); }

/* Actions & buttons */
.panel-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 12px; }
.btn-next, .btn-submit, .btn-prev {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: .92rem;
    font-family: inherit; cursor: pointer; border: none;
}
.btn-next, .btn-submit { background: var(--a-primary); color: #fff; }
.btn-next:hover, .btn-submit:hover { background: var(--a-primary-600); }
.btn-submit:disabled { opacity: .6; cursor: default; }
.btn-prev { background: transparent; color: var(--a-ink-2); border: 1.5px solid var(--a-line); }
.btn-prev:hover { background: #f8fafc; }

.apply-status { text-align: center; font-weight: 600; min-height: 1.2em; margin: 8px 0 0; }
.apply-status.is-err { color: var(--a-danger); }

/* Done */
.panel-done { text-align: center; padding: 30px 0; }
.done-icon { font-size: 3.5rem; color: var(--a-ok); margin-bottom: 14px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
