:root {
    --bg: #eef3f9;
    --bg-strong: #e3ebf6;
    --card: #ffffff;
    --primary: #23499f;
    --primary-dark: #173573;
    --primary-soft: #edf3ff;
    --text: #172033;
    --muted: #6b768b;
    --line: #d7deeb;
    --ok: #0b7d4f;
    --error: #b32727;
    --warning: #a86600;
    --shadow: 0 14px 36px rgba(16, 39, 86, 0.08);
    --radius: 18px;
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f6f9fd 0%, var(--bg) 100%);
}
body { min-height: 100vh; }
a { color: inherit; }
img { max-width: 100%; display: block; }

body.portal-home {
    background:
        linear-gradient(
            180deg,
            rgba(12, 28, 58, 0.18) 0%,
            rgba(238, 243, 249, 0.28) 220px,
            rgba(238, 243, 249, 0.72) 720px,
            rgba(238, 243, 249, 0.92) 100%
        ),
        url('../img/tlo_portal.jpg') center center / cover no-repeat;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(215,222,235,0.9);
}
.topbar-home {
    background: rgba(255,255,255,0.84);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo {
    width: 64px;
    max-width: 64px;
    height: auto;
    object-fit: contain;
    flex: 0 0 auto;
}
.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.brand-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--primary);
    text-transform: uppercase;
}
.brand-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}
.brand-subtitle {
    font-size: 13px;
    color: var(--muted);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}
.home-wrap {
    padding-top: 34px;
}
.page-wrap.narrow { max-width: 960px; }

.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}
.hero-home {
    align-items: start;
}

.card {
    background: var(--card);
    border: 1px solid rgba(215,222,235,0.95);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
}
.hero-card-home,
.verify-card-home {
    background: rgba(255,255,255,0.84);
    backdrop-filter: blur(8px);
}

.instruction-card-home {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(8px);
}
.hero-overline {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 10px;
}
.hero-card h1,
.section-title,
.card h2 {
    margin: 0 0 10px;
    line-height: 1.1;
}
.hero-card p,
.card p,
.helper-text,
small {
    color: var(--muted);
}
.helper-text,
small {
    font-size: 13px;
    line-height: 1.45;
}
.instructions-list {
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--text);
}
.instructions-list li {
    margin-bottom: 8px;
    line-height: 1.45;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #41506a;
}
input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 15px;
    color: var(--text);
    background: #fff;
}
textarea {
    resize: vertical;
    min-height: 120px;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(35, 73, 159, 0.10);
}
.verify-form,
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.verify-actions,
.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}
.actions-row.right { justify-content: flex-end; }
.actions-row.center { justify-content: center; }

.primary-btn,
.ghost-btn,
.link-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--primary);
    transition: 0.18s ease;
}
.primary-btn {
    background: var(--primary);
    color: #fff;
}
.primary-btn:hover { background: var(--primary-dark); }
.primary-btn.outline,
.ghost-btn,
.link-btn {
    background: #fff;
    color: var(--primary);
}
.primary-btn.outline:hover,
.ghost-btn:hover,
.link-btn:hover { background: var(--primary-soft); }
.ghost-btn-light {
    background: rgba(255,255,255,0.88);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}
.badge-blue { background: #eaf1ff; color: #20479d; }
.badge-green { background: #e7f8f0; color: #11623f; }
.badge-amber { background: #fff2de; color: #8a5a00; }

.flash-stack { margin-bottom: 20px; }
.flash {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.flash.error { background: #ffe8e8; color: var(--error); }
.flash.info { background: #edf4ff; color: var(--primary); }

/* shared pages kept responsive */
.upload-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 20px;
}
.order-meta {
    display: grid;
    gap: 10px;
    margin: 18px 0 20px;
    padding: 16px;
    border-radius: 14px;
    background: var(--primary-soft);
    border: 1px solid #d7e4ff;
}
.status-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
.status-table th,
.status-table td {
    border: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
}
.status-table th {
    width: 38%;
    background: #f8fbff;
    font-weight: 600;
}
.status-ok { color: var(--ok); font-weight: 700; }

@media (max-width: 980px) {
    body.portal-home {
        background:
            linear-gradient(180deg, rgba(10,24,55,0.36) 0%, rgba(238,243,249,0.86) 200px, rgba(238,243,249,0.98) 430px),
            url('../img/tlo_portal.jpg') center top / cover no-repeat;
    }
    .hero,
    .upload-layout {
        grid-template-columns: 1fr;
    }
    .topbar {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }
    .top-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .page-wrap {
        padding: 18px 16px 36px;
    }
    .card {
        padding: 20px;
    }
    .brand-logo {
        width: 52px;
        max-width: 52px;
    }
    .brand-title {
        font-size: 18px;
    }
    .brand-subtitle {
        font-size: 12px;
    }
}

@media (max-width: 560px) {
    .verify-actions,
    .actions-row {
        flex-direction: column;
    }
    .primary-btn,
    .ghost-btn,
    .link-btn {
        width: 100%;
    }
    .card {
        border-radius: 16px;
    }
}
