/* Liberty Uganda — Protecta Bode
   Palette aligned to liberty.co.ug: deep navy + teal-cyan accent, steel-blue
   secondary, gold highlight. Danger tokens are semantic (errors/rejects). */
:root {
    --primary: #00164F;
    --primary-dark: #000A2E;
    --primary-light: #E6E9F0;
    --secondary: #547A91;
    --accent: #74BBC9;
    --accent-dark: #4E9AAB;
    --highlight: #FFAB00;
    --highlight-dark: #D99200;
    --danger: #C0392B;
    --danger-dark: #922D22;
    --bg: #F7F7F7;
    --bg-tinted: #EEF2F5;
    --text: #2A2E35;
    --muted: #666666;
    --border: #D8DEE7;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 22, 79, 0.10);
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --max: 1120px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }

/* ---------- header ---------- */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}
.brand { display: inline-flex; align-items: baseline; gap: 10px; }
.brand-mark {
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary);
    font-size: 22px;
}
.brand-sub {
    color: var(--muted);
    font-size: 14px;
    border-left: 2px solid var(--border);
    padding-left: 10px;
}
.site-nav { display: flex; gap: 16px; align-items: center; }
.nav-staff-link {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.nav-staff-link:hover { color: var(--primary); text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.05s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
    background: transparent;
    color: var(--primary);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--primary-light); text-decoration: none; }

/* ---------- hero ---------- */
.hero {
    background: linear-gradient(180deg, #fff 0%, var(--primary-light) 100%);
    padding: 64px 0 80px;
    border-bottom: 1px solid var(--border);
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}
.eyebrow {
    display: inline-block;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 12px;
    margin-bottom: 12px;
}
.hero h1 {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin: 0 0 20px;
    color: var(--text);
}
.lede { font-size: 18px; color: var(--muted); margin: 0 0 24px; max-width: 52ch; }
.pricing { font-size: 17px; margin: 0 0 28px; }
.pricing strong { color: var(--highlight-dark); font-weight: 700; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-art { display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.car-stage {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 18px 20px 10px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}
.car-svg { display: block; width: 100%; height: auto; }

.car-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.car-tile {
    margin: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px 18px 14px;
    text-align: center;
}
.car-tile figcaption {
    margin-top: 6px;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 15px;
    letter-spacing: 0.2px;
}
.art-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 360px;
}
.art-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--border);
    font-weight: 500;
}
.art-row:last-child { border-bottom: 0; }
.art-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-tinted { background: var(--bg-tinted); }
.section-title {
    font-size: 28px;
    letter-spacing: -0.3px;
    margin: 0 0 36px;
}

/* ---------- cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.card h3 {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 18px;
}
.card p { margin: 0; color: var(--muted); }

/* ---------- steps ---------- */
.steps { max-width: 760px; margin: 0 auto; }
.step-list { list-style: none; padding: 0; margin: 0 0 32px; }
.step-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.step-num {
    flex: 0 0 36px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.center { text-align: center; margin-top: 8px; }

/* ---------- form ---------- */
.form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-top: 24px;
}
.form-card fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 28px;
}
.form-card legend {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; flex: 1; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
    background: #fff;
    transition: border 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.field small.error {
    color: var(--danger);
    font-size: 13px;
}
.row { display: flex; gap: 16px; }
.row .field { flex: 1; min-width: 0; }

.form-actions { margin-top: 16px; display: flex; justify-content: flex-end; }

/* ---------- premium live box ---------- */
.premium-box {
    margin: 24px 0 8px;
    padding: 20px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-tinted);
    min-height: 72px;
}
.premium-placeholder { color: var(--muted); text-align: center; padding: 8px 0; }
.premium-valid { display: flex; flex-direction: column; gap: 10px; }
.premium-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}
.premium-row strong { font-variant-numeric: tabular-nums; }
.premium-row-accent {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    font-size: 18px;
    color: var(--primary-dark);
}

/* ---------- status page ---------- */
.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}
.status-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.status-card h3 {
    margin: 0 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}
.status-card small { color: var(--muted); }
.big-amount { font-size: 28px; font-weight: 700; margin: 4px 0; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.status-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    background: var(--primary-light);
    color: var(--primary-dark);
    margin: 0 0 6px;
}
.status-pill.status-paid { background: #E6F4EA; color: #1E6A2E; }
.status-pill.status-issued { background: #E6F4EA; color: #1E6A2E; }
.status-pill.status-rejected { background: #FDE7E6; color: var(--danger-dark); }

.next-steps ol { padding-left: 20px; margin: 10px 0; }
.next-steps li { padding: 8px 0; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; margin-left: 6px; }
.pill-muted { background: var(--bg-tinted); color: var(--muted); border: 1px solid var(--border); }
.hint { color: var(--muted); font-size: 14px; margin-top: 10px; }

/* ---------- alerts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-weight: 500;
    border: 1px solid transparent;
}
.alert-ok { background: #E6F4EA; color: #1E6A2E; border-color: #CFE9D6; }
.alert-error { background: #FDE7E6; color: var(--danger-dark); border-color: #F5C2C0; }

/* ---------- pay page ---------- */
.pay-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    margin-top: 24px;
}
.pay-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.pay-summary h3 { margin: 0 0 4px; font-size: 18px; }
.pay-summary p { margin: 0; color: var(--muted); }
.pay-amount { text-align: right; }
.pay-amount small { display: block; color: var(--muted); font-size: 13px; }
.pay-amount strong { font-size: 28px; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.pay-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.pay-foot { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- action card variants ---------- */
.status-card.action { padding: 24px; }
.status-card.action h3 { color: var(--primary); font-size: 18px; text-transform: none; letter-spacing: 0; margin-bottom: 10px; }
.status-card.action-ok { border-color: #CFE9D6; background: #F2FAF5; }
.status-card.action-ok h3 { color: #1E6A2E; }
.status-card.action-error { border-color: #F5C2C0; background: #FDF3F3; }
.status-card.action-error h3 { color: var(--danger-dark); }

/* ---------- upload forms + file lists ---------- */
.upload-form {
    margin: 20px 0 8px;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-tinted);
}
.upload-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}
.upload-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.upload-row input[type="file"] {
    flex: 1;
    min-width: 200px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
}
.file-list {
    margin: 0 0 16px;
    min-height: 24px;
}
.file-list ul { list-style: none; padding: 0; margin: 8px 0 0; }
.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 6px;
}
.file-icon { font-size: 18px; }
.file-meta { display: flex; flex-direction: column; }
.file-meta strong { font-size: 14px; }
.file-meta small { color: var(--muted); font-size: 12px; }
.file-empty {
    margin: 8px 0;
    color: var(--muted);
    font-size: 14px;
    font-style: italic;
}
.file-err {
    margin: 8px 0;
    padding: 8px 12px;
    background: #FDE7E6;
    color: var(--danger-dark);
    border-radius: var(--radius);
    font-size: 14px;
}

/* ---------- upload: progress, success badge, done state, submit bar ---------- */
.upload-progress {
    margin: 16px 0 4px;
}
.upload-progress-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}
.upload-progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}
.upload-progress-bar span {
    display: block;
    height: 100%;
    background: #1E6A2E;
    transition: width 300ms ease;
}
.upload-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    background: #E6F4EA;
    color: #1E6A2E;
    border: 1px solid #CFE9D6;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}
.upload-form-done {
    border-style: solid;
    border-color: #CFE9D6;
    background: #F4FBF6;
}
.file-item {
    position: relative;
}
.file-item .file-icon {
    color: #1E6A2E;
    font-weight: 700;
}
.file-status {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: #1E6A2E;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
@keyframes file-fresh-in {
    0%   { background: #E6F4EA; border-color: #8BC8A0; transform: translateY(-4px); opacity: 0; }
    50%  { opacity: 1; transform: translateY(0); }
    100% { background: #fff; border-color: var(--border); }
}
.file-item-fresh {
    animation: file-fresh-in 1400ms ease-out;
}
.submit-bar {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.submit-bar small { color: var(--muted); }
.submit-bar .btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---------- footer ---------- */
.site-footer {
    background: var(--primary);
    color: #C7CFE0;
    margin-top: 48px;
    padding: 48px 0 24px;
}
.footer-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.footer-col strong { color: #fff; display: block; margin-bottom: 8px; }
.footer-col p { margin: 0; font-size: 14px; line-height: 1.6; }
.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
    margin-top: 32px;
    color: #7A869F;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-staff-link { color: #7A869F; }
.footer-staff-link:hover { color: #fff; }

/* ---------- staff ---------- */
.staff-nav { gap: 14px; align-items: center; }
.staff-who { color: var(--muted); font-size: 14px; }
.staff-who em { font-style: normal; color: var(--primary-dark); text-transform: capitalize; }
.staff-badge {
    color: var(--highlight-dark);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 12px;
}
.inline-form { display: inline; margin: 0; }
.back-link { font-size: 14px; color: var(--muted); display: inline-block; margin-bottom: 12px; }
.back-link:hover { color: var(--primary); }

.queue-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-top: 16px;
}
.queue-table { width: 100%; border-collapse: collapse; }
.queue-table th, .queue-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.queue-table th { font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; color: var(--muted); background: var(--bg-tinted); }
.queue-table td.num, .queue-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.queue-table tr:last-child td { border-bottom: 0; }
.queue-table .btn { padding: 6px 12px; font-size: 13px; }

.staff-file-group { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.staff-file-group:last-child { border-bottom: 0; }
.staff-file-group h4 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.file-list-inline { list-style: none; padding: 0; margin: 0; }
.file-list-inline li { padding: 6px 0; }
.file-list-inline small { color: var(--muted); margin-left: 8px; font-size: 12px; }

.status-pill.status-in_review { background: #FFF4D6; color: #8A5A00; }

.decision-row { margin-bottom: 12px; }
.reject-form { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.reject-form textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: #fff;
    resize: vertical;
}
.btn-danger { color: var(--danger-dark); border-color: #F5C2C0; }
.btn-danger:hover { background: #FDE7E6; }

.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.event-list li:last-child { border-bottom: 0; }
.event-list time { color: var(--muted); margin-right: 10px; font-variant-numeric: tabular-nums; font-size: 13px; }
.event-list .muted { color: var(--muted); font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 840px) {
    .hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .cards { grid-template-columns: 1fr; }
    .car-gallery { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .row { flex-direction: column; gap: 0; }
    .status-grid { grid-template-columns: 1fr; }
    .queue-card { overflow-x: auto; }
    .queue-table { min-width: 640px; }
}

@media (max-width: 560px) {
    .container { padding: 0 16px; }

    /* header: drop the tagline + staff link so brand + CTA fit */
    .header-inner { padding: 12px 16px; }
    .brand-mark { font-size: 19px; letter-spacing: 1.5px; }
    .brand-sub { display: none; }
    .nav-staff-link { display: none; }
    .site-nav { gap: 8px; }

    /* tighter vertical rhythm */
    .hero { padding: 40px 0 48px; }
    .hero h1 { margin-bottom: 16px; }
    .lede { font-size: 16px; }
    .section { padding: 48px 0; }
    .section-title { font-size: 22px; margin-bottom: 24px; }

    /* customer CTAs: full-width, 44px+ tap target */
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { width: 100%; }
    .btn { min-height: 44px; }
    .btn-lg { padding: 12px 20px; font-size: 16px; }

    /* quote form */
    .form-card { padding: 20px; }
    .form-actions { justify-content: stretch; }
    .form-actions .btn { width: 100%; }

    /* pay page */
    .pay-card { padding: 20px; }
    .pay-summary { flex-direction: column; align-items: flex-start; gap: 8px; }
    .pay-amount { text-align: left; }
    .pay-amount strong { font-size: 24px; }
    .pay-actions { flex-direction: column; align-items: stretch; }
    .pay-actions .btn { width: 100%; }

    /* status page */
    .status-card { padding: 18px; }
    .big-amount { font-size: 24px; }
    .status-card.action .btn { width: 100%; }

    /* document upload: let the button wrap full-width under the file input */
    .upload-row .btn { width: 100%; }

    /* footer */
    .site-footer { padding: 32px 0 20px; }
    .footer-staff-link { display: none; }
}
