:root {
    --brand-primary: #116b55;
    --brand-secondary: #0a4d3d;
    --brand-accent: #dff4ec;
    --ink: #17211e;
    --muted: #687570;
    --surface: #ffffff;
    --canvas: #f3f5f3;
    --line: #dfe6e2;
}

body {
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

a { color: var(--brand-primary); }
a:hover { color: var(--brand-secondary); }

.landing-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 88% 8%, var(--brand-accent) 0, transparent 34%),
        #f7f5ef;
}

.landing-shell { padding-top: clamp(2rem, 7vw, 6rem); padding-bottom: 3rem; }
.hero-panel { padding-top: 1rem; }
.hero-panel h1 { letter-spacing: -.055em; line-height: .98; }
.hero-panel .lead { max-width: 32rem; line-height: 1.65; }
.form-card, .login-card { border-radius: 1.35rem; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    text-decoration: none;
    min-width: 0;
}
.brand-logo { display: block; max-width: 190px; max-height: 58px; width: auto; height: auto; object-fit: contain; }
.brand-title { color: var(--brand-primary); font-weight: 800; letter-spacing: -.025em; }
.brand-description { color: var(--muted); font-weight: 600; font-size: .82rem; line-height: 1.2; max-width: 13rem; }
.landing-brand .brand-title { font-size: 1.15rem; }
.landing-brand .brand-logo { max-width: 240px; max-height: 78px; }

.eyebrow {
    color: var(--brand-primary);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.btn-brand {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    font-weight: 700;
}
.btn-brand:hover, .btn-brand:focus {
    background: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: #fff;
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 .25rem var(--brand-accent);
}
.form-check-input:checked { background-color: var(--brand-primary); border-color: var(--brand-primary); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.legal-links { color: var(--muted); font-size: .86rem; }
.legal-links a { color: var(--muted); }
.legal-links span { margin: 0 .5rem; }

.success-shell { min-height: 100vh; display: grid; place-items: center; max-width: 680px; }
.success-icon {
    display: grid; place-items: center; width: 4.2rem; height: 4.2rem;
    margin: 0 auto 1.5rem; border-radius: 50%; color: var(--brand-primary);
    background: var(--brand-accent); font-size: 2rem; font-weight: 900;
}

.admin-body { min-height: 100vh; background: var(--canvas); }
.admin-navbar { background: var(--brand-secondary); }
.admin-container { max-width: 1440px; }
.admin-navbar .brand-title, .admin-navbar .brand-description { color: #fff; }
.admin-navbar .brand-logo { max-height: 44px; max-width: 175px; }
.admin-navbar .nav-link { color: rgba(255,255,255,.82); font-weight: 600; }
.admin-navbar .nav-link:hover, .admin-navbar .nav-link:focus { color: #fff; }
.admin-identity {
    color: #fff; border-left: 1px solid rgba(255,255,255,.25);
    display: grid; line-height: 1.15; margin-left: .5rem; padding: .25rem .85rem;
}
.admin-identity small { color: rgba(255,255,255,.66); font-size: .7rem; margin-top: .2rem; }
.admin-main { min-height: calc(100vh - 72px); }
.report-search { width: min(100%, 480px); }
.stat-card {
    background: #fff; border: 1px solid var(--line); border-radius: .85rem;
    padding: 1.2rem 1.4rem; display: grid;
}
.stat-card strong { font-size: 2rem; letter-spacing: -.04em; }
.stat-card span { color: var(--muted); font-size: .86rem; }
.table thead th {
    background: #f8faf9; color: var(--muted); font-size: .7rem;
    letter-spacing: .07em; padding: .9rem 1rem; text-transform: uppercase; white-space: nowrap;
}
.table td { padding: 1rem; }
.report-row { cursor: pointer; }
.report-row:focus { outline: 3px solid var(--brand-accent); outline-offset: -3px; }
.detail-hint { color: var(--brand-primary); display: block; font-size: .72rem; margin-top: .18rem; }
.detail-row { --bs-table-hover-bg: transparent; }
.submission-details {
    background: var(--brand-accent); border-left: 4px solid var(--brand-primary);
    display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 1rem 1rem; padding: 1.35rem;
}
.submission-details > div { display: grid; gap: .2rem; }
.submission-details span { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.detail-message { grid-column: 1 / -1; }
.detail-message p { margin: 0; white-space: normal; }
.bg-soft { background: var(--brand-accent); color: var(--brand-secondary); }
.qr-modal-image { image-rendering: auto; max-height: 60vh; }
.current-logo {
    align-items: center; background: var(--canvas); border: 1px solid var(--line);
    border-radius: .75rem; display: flex; min-height: 90px; padding: 1rem;
}
.theme-preset {
    align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px;
    color: var(--ink); display: inline-flex; font-size: .82rem; gap: .45rem; padding: .45rem .75rem;
}
.theme-preset:hover { border-color: var(--brand-primary); }
.theme-preset span { background: var(--preset, var(--brand-primary)); border-radius: 50%; height: 1rem; width: 1rem; }
.theme-preset[data-primary="#116b55"] span { background: #116b55; }
.theme-preset[data-primary="#155eef"] span { background: #155eef; }
.theme-preset[data-primary="#7c3aed"] span { background: #7c3aed; }
.theme-preset[data-primary="#c2410c"] span { background: #c2410c; }
.theme-preset[data-primary="#be123c"] span { background: #be123c; }
.form-control-color { flex: 0 0 4rem !important; max-width: 4rem; }

.login-shell { min-height: 100vh; display: grid; place-items: center; max-width: 500px; padding-top: 2rem; padding-bottom: 2rem; }
.login-brand .brand-logo { max-width: 220px; max-height: 70px; }
.legal-body { background: var(--canvas); min-height: 100vh; }
.legal-shell { max-width: 900px; padding-top: 3rem; padding-bottom: 4rem; }
.legal-shell article { border-radius: 1rem; }

@media (max-width: 991.98px) {
    .hero-panel { padding-top: 0; }
    .admin-identity { border-left: 0; margin: .5rem 0; padding-left: 0; }
    .navbar-collapse { padding: 1rem 0; }
}
@media (max-width: 767.98px) {
    .landing-shell { padding-left: 1rem; padding-right: 1rem; }
    .submission-details { grid-template-columns: 1fr; }
    .detail-message { grid-column: auto; }
    .report-table { min-width: 760px; }
}
