@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800;900&display=swap');

:root {
    --bg: #f7dfe9;
    --canvas: #fbf8f2;
    --surface: #fffdf8;
    --ink: #151312;
    --muted: #706b67;
    --line: rgba(21, 19, 18, .08);
    --black: #111111;
    --yellow: #ffe779;
    --pink: #f889c4;
    --blue: #8de2f4;
    --green: #96ef83;
    --mint: #9ce7d4;
    --lavender: #cbb9ff;
    --orange: #ffac6f;
    --red: #ef756b;
    --shadow: 0 24px 55px rgba(31, 20, 26, .14);
    --soft-shadow: 0 12px 28px rgba(31, 20, 26, .09);
    --radius: 30px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 13% 4%, rgba(255, 255, 255, .62), transparent 25rem),
        radial-gradient(circle at 93% 12%, rgba(203, 185, 255, .5), transparent 24rem),
        linear-gradient(160deg, #f6d7e4 0%, #f8e9ee 42%, #f5f8ee 100%);
    color: var(--ink);
    font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.4;
}

.topbar {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(1160px, calc(100% - 24px));
    margin: 12px auto 0;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 999px;
    background: rgba(255, 253, 248, .78);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(20px);
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
    color: var(--ink);
    font-weight: 900;
}

.brand-mark {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--black);
    color: #fff;
    font-size: 13px;
}

.brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-toggle {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: var(--black);
    color: #fff;
    padding: 0 16px;
    font: inherit;
    font-weight: 900;
}

.nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, .82);
    background: rgba(255, 253, 248, .96);
    box-shadow: var(--shadow);
}

.nav.is-open {
    display: grid;
}

.nav a {
    display: grid;
    min-width: 0;
    min-height: 58px;
    place-items: center;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 22px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 900;
}

.nav a:nth-child(6n+1) { background: var(--yellow); }
.nav a:nth-child(6n+2) { background: var(--blue); }
.nav a:nth-child(6n+3) { background: var(--green); }
.nav a:nth-child(6n+4) { background: var(--pink); }
.nav a:nth-child(6n+5) { background: var(--lavender); }
.nav a:nth-child(6n+6) { background: var(--orange); }

.main {
    width: min(1120px, calc(100% - 24px));
    margin: 0 auto;
    padding: 22px 0 92px;
}

.hero {
    display: grid;
    gap: 18px;
    padding: 28px 0 18px;
}

.hero h1,
.section-title h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(34px, 8vw, 72px);
    line-height: .95;
    letter-spacing: 0;
    font-weight: 900;
}

.lead {
    max-width: 680px;
    color: #5e5754;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 600;
}

.hero-panel,
.card,
.form-card,
.table-wrap,
.filter-bar {
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, .9);
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: 22px;
    background: var(--yellow);
}

.grid,
.cards,
.grid-2,
.grid-3,
.dashboard-grid {
    display: grid;
    gap: 12px;
}

.card {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

.card::before {
    content: "";
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 18px;
    border-radius: 19px;
    background: rgba(255, 255, 255, .58);
}

.card[data-icon-ready]::before {
    display: none;
}

.card-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, .68);
    color: var(--ink);
}

.card-icon svg {
    width: 23px;
    height: 23px;
}

.dashboard-grid .card:nth-child(1),
.grid-3 .card:nth-child(1),
.cards > .card:nth-child(6n+1) {
    background: var(--yellow);
}

.dashboard-grid .card:nth-child(2),
.grid-3 .card:nth-child(2),
.cards > .card:nth-child(6n+2) {
    background: var(--blue);
}

.dashboard-grid .card:nth-child(3),
.grid-3 .card:nth-child(3),
.cards > .card:nth-child(6n+3) {
    background: var(--green);
}

.cards > .card:nth-child(6n+4) { background: var(--pink); }
.cards > .card:nth-child(6n+5) { background: var(--lavender); }
.cards > .card:nth-child(6n+6) { background: var(--orange); }

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
    line-height: 1.08;
    font-weight: 900;
}

.card h2 { font-size: 23px; }
.card h3 { font-size: 18px; }

.muted {
    color: var(--muted);
    font-weight: 600;
}

.stat {
    margin: 5px 0 6px;
    color: var(--ink);
    font-size: clamp(34px, 8vw, 50px);
    font-weight: 900;
    line-height: .9;
    letter-spacing: 0;
}

.btn,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    background: var(--black);
    color: #fff;
    padding: 12px 18px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(17, 17, 17, .16);
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background: #2d2d2d;
    color: #fff;
}

.btn-secondary {
    border: 1px solid rgba(17, 17, 17, .08);
    background: rgba(255, 255, 255, .7);
    color: var(--ink);
    box-shadow: none;
}

.btn-secondary:hover {
    background: #fff;
    color: var(--ink);
}

.btn-small {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 13px;
}

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

.form-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 22px;
}

.form-card h1 {
    margin-top: 0;
    font-size: clamp(30px, 6vw, 46px);
    line-height: .98;
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}

label {
    color: #292524;
    font-size: 13px;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(17, 17, 17, .08);
    border-radius: 20px;
    outline: none;
    background: #f7f1ea;
    color: var(--ink);
    padding: 14px 15px;
    font: inherit;
    font-weight: 700;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--ink);
    background: #fff;
}

textarea {
    min-height: 124px;
    resize: vertical;
}

.help {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .8);
    background: #fff;
    box-shadow: var(--soft-shadow);
    font-weight: 800;
}

.alert-success { color: #167044; }
.alert-error { color: #b7362e; }

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, .62);
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
}

.badge svg {
    width: 14px;
    height: 14px;
}

.table-wrap {
    overflow-x: auto;
    padding: 8px;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0 9px;
}

th,
td {
    padding: 14px;
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

td {
    background: #fff;
    border-top: 1px solid rgba(17, 17, 17, .05);
    border-bottom: 1px solid rgba(17, 17, 17, .05);
}

td:first-child {
    border-left: 1px solid rgba(17, 17, 17, .05);
    border-radius: 20px 0 0 20px;
}

td:last-child {
    border-right: 1px solid rgba(17, 17, 17, .05);
    border-radius: 0 20px 20px 0;
}

.progress {
    overflow: hidden;
    height: 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .74);
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--black);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    padding: 16px;
    border: 1px solid rgba(17, 17, 17, .06);
    border-radius: 26px;
    background: #fff;
}

.timeline-item h3 {
    margin: 0 0 6px;
}

.timeline-item:nth-child(4n+1) { border-left: 10px solid var(--yellow); }
.timeline-item:nth-child(4n+2) { border-left: 10px solid var(--pink); }
.timeline-item:nth-child(4n+3) { border-left: 10px solid var(--blue); }
.timeline-item:nth-child(4n+4) { border-left: 10px solid var(--green); }

.evidence-grid {
    display: grid;
    gap: 12px;
}

.evidence-card {
    padding: 13px;
    border: 1px solid rgba(17, 17, 17, .06);
    border-radius: 26px;
    background: #fff;
}

.evidence-card img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 22px;
    border: 1px solid rgba(17, 17, 17, .06);
    background: #f7f1ea;
}

.filter-bar {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
}

.section-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin: 4px 0 14px;
}

.field-row {
    display: grid;
    gap: 10px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px dashed rgba(17, 17, 17, .18);
    border-radius: 26px;
    background: #fff6d7;
}

.inline-options {
    display: grid;
    gap: 8px;
}

.inline-options label {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-options input {
    width: auto;
}

@media (max-width: 759px) {
    .brand span:last-child {
        max-width: 168px;
    }

    .main {
        width: min(100% - 24px, 430px);
        padding-top: 18px;
        padding-bottom: 98px;
    }

    .nav {
        position: fixed;
        top: auto !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        z-index: 9999;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        padding: 8px;
        border-radius: 26px;
        width: auto;
        margin: 0;
        transform: none;
        backdrop-filter: none;
    }

    .nav:not(.is-open) {
        display: grid;
    }

    .nav a {
        min-height: 52px;
        border-radius: 18px;
        font-size: 10px;
        line-height: 1;
    }

    .nav a svg {
        width: 17px;
        height: 17px;
    }

    .nav a:nth-child(n+5) {
        display: none;
    }

    .nav-toggle {
        display: none;
    }

    .topbar {
        position: relative;
        top: auto;
        width: min(100% - 24px, 430px);
        margin-top: 8px;
        padding: 8px;
        border-radius: 28px;
        backdrop-filter: none;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .hero {
        padding-top: 18px;
    }

    .hero h1,
    .section-title h1 {
        font-size: 31px;
        line-height: 1.02;
    }

    .lead,
    .section-title .muted {
        font-size: 15px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid .card {
        min-height: 132px;
        padding: 16px;
    }

    .dashboard-grid .card:nth-child(3) {
        grid-column: span 2;
        min-height: 116px;
    }

    .dashboard-grid .card:nth-child(3) .card-icon,
    .dashboard-grid .card:nth-child(3)::before {
        margin-bottom: 8px;
    }

    .card {
        border-radius: 26px;
    }

    .card-icon {
        width: 42px;
        height: 42px;
        margin-bottom: 10px;
        border-radius: 15px;
    }

    .card h2 {
        font-size: 21px;
        margin-bottom: 8px;
    }

    .card h3 {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .cards {
        gap: 12px;
    }

    .cards > .card {
        padding: 18px;
        min-height: auto;
    }

    .cards > .card p:last-child,
    .card p:last-child {
        margin-bottom: 0;
    }

    .stat {
        font-size: 34px;
    }

    .badge {
        font-size: 11px;
        padding: 6px 9px;
    }

    .actions .btn,
    .actions button {
        flex: 1 1 auto;
    }
}

@media (min-width: 760px) {
    .topbar {
        top: 16px;
        margin-top: 16px;
        padding: 10px 12px;
    }

    .nav-toggle {
        display: none;
    }

    .nav {
        position: static;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .nav a {
        display: inline-flex;
        min-height: 42px;
        gap: 7px;
        padding: 0 12px;
        font-size: 13px;
        background: transparent !important;
    }

    .nav a:hover {
        background: rgba(255, 255, 255, .72) !important;
    }

    .hero,
    .grid-2 {
        grid-template-columns: 1.12fr .88fr;
    }

    .grid-3,
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-grid .card {
        min-height: 210px;
    }

    .evidence-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-bar {
        grid-template-columns: 1fr 220px 160px;
        align-items: end;
    }

    .form-card {
        padding: 32px;
    }
}
