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

:root {
    --ink: #17243a;
    --muted: #758198;
    --line: #e8edf4;
    --bg: #f4f7fb;
    --blue: #315ee8;
    --green: #138a68;
    --red: #c45151;
    --card: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px 'DM Sans', sans-serif;
}

.topbar {
    height: 76px;
    background: white;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font: 700 15px Manrope;
}

.brand small {
    font-size: 11px;
    color: var(--muted);
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: #eaf0ff;
    color: var(--blue);
    display: grid;
    place-items: center;
    font: 800 26px Manrope;
}

.brand-mark.small {
    width: 38px;
    height: 38px;
    font-size: 21px;
}

.top-actions {
    display: flex;
    gap: 18px;
    align-items: center;
}

.save-state {
    color: var(--green);
    font-size: 12px;
}

.wrap {
    max-width: 1200px;
    margin: 34px auto;
    padding: 0 24px;
}

.welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.welcome h1 {
    font: 800 30px Manrope;
    margin: 4px 0;
}

.welcome p {
    color: var(--muted);
}

.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--blue);
}

.year-control {
    display: flex;
    align-items: center;
    gap: 9px;
}

.year-control label {
    font-size: 11px;
    color: var(--muted);
}

select,
input,
textarea {
    font: inherit;
    color: var(--ink);
    background: white;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    padding: 10px;
}

.btn {
    border: 0;
    border-radius: 9px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary {
    background: var(--blue);
    color: white;
}

.ghost {
    background: #f1f4f9;
    color: #526078;
}

.outline {
    border: 1px solid var(--line);
    background: white;
    color: #526078;
}

.soft {
    background: #edf2ff;
    color: var(--blue);
}

.full {
    width: 100%;
    margin-top: 8px;
}

.month-nav {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 7px;
    margin-bottom: 18px;
}

.month-btn {
    background: white;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 11px 3px;
    color: #66738a;
    font-weight: 600;
    cursor: pointer;
    font-size: 11px;
}

.month-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
    margin-bottom: 18px;
}

.summary-card,
.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: 0 4px 16px #1e345008;
}

.summary-card {
    padding: 18px;
}

.summary-card span {
    font-size: 12px;
    color: var(--muted);
}

.summary-card strong {
    display: block;
    font: 800 23px Manrope;
    margin: 9px 0 3px;
}

.summary-card small {
    color: #98a2b3;
    font-size: 11px;
}

.panel {
    padding: 24px;
    margin-bottom: 18px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 19px;
    border-bottom: 1px solid var(--line);
}

h2 {
    font: 800 22px Manrope;
}

h3 {
    font: 700 16px Manrope;
    margin: 0 0 4px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 23px 0 12px;
}

.section-title p {
    color: var(--muted);
    font-size: 11px;
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

th {
    text-align: left;
    background: #f8faff;
    color: #7a879c;
    font-size: 10px;
    padding: 11px 9px;
}

td {
    padding: 7px 8px;
    border-top: 1px solid #eef1f6;
}

td input,
td select {
    width: 100%;
    min-width: 65px;
    padding: 8px 7px;
    border-color: transparent;
    font-size: 12px;
}

.check {
    width: 17px;
    height: 17px;
    accent-color: var(--green);
}

.delete {
    border: 0;
    background: #fff0f0;
    color: var(--red);
    border-radius: 6px;
    padding: 7px;
    cursor: pointer;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

.simple-list {
    display: grid;
    gap: 7px;
}

.simple-row {
    display: grid;
    grid-template-columns: 1fr 115px 30px;
    gap: 7px;
    align-items: center;
}

.simple-row input {
    width: 100%;
    font-size: 12px;
}

textarea {
    width: 100%;
    min-height: 75px;
    resize: vertical;
}

.footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
}

.footer-actions span,
footer {
    font-size: 11px;
    color: var(--muted);
}

.positive {
    color: var(--green);
}

.negative {
    color: var(--red);
}

.login-bg {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #edf2ff, #f7f9fc);
}

.login-card {
    width: min(410px, calc(100% - 32px));
    background: white;
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 20px 70px #243a6518;
}

.login-card h1 {
    font: 800 23px Manrope;
}

.login-card label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin: 14px 0;
}

.login-card input {
    display: block;
    width: 100%;
    margin-top: 7px;
}

.login-card p {
    color: var(--muted);
}

.alert {
    background: #fff0f0;
    color: var(--red);
    padding: 10px;
    border-radius: 8px;
}

footer {
    text-align: center;
    padding: 12px;
}

@media(max-width:850px) {
    .month-nav {
        grid-template-columns: repeat(6, 1fr);
    }

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

    .welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .two-col {
        grid-template-columns: 1fr;
    }
}

@media(max-width:430px) {
    .month-btn {
        font-size: 10px;
    }

    .summary-card strong {
        font-size: 18px;
    }

    .topbar {
        padding: 0 12px;
    }

    .wrap {
        padding: 0 12px;
    }

    .panel {
        padding: 14px;
    }

    .save-state {
        display: none;
    }
}
