@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --bg: #eef3f8;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --line: #d7e0ea;
    --line-strong: #b9c7d8;
    --text: #142033;
    --muted: #637184;
    --blue: #165dcc;
    --blue-dark: #10499f;
    --blue-soft: #e9f1ff;
    --green-bg: #e8f7ee;
    --green: #17633a;
    --red-bg: #fdeceb;
    --red: #9f2420;
    --shadow: 0 18px 45px rgba(20, 32, 51, 0.08);
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
        var(--bg);
    color: var(--text);
    font-family: "Inter", "Aptos", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.wrap {
    max-width: 1120px;
    width: 100%;
}

.topbar {
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
}

h1 {
    color: var(--text);
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.08;
}

h2 {
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0;
}

.eyebrow {
    color: var(--blue);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.meta,
.muted {
    color: var(--muted);
    font-size: 0.92rem;
}

.nav-button,
.topbar > a {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    display: inline-flex;
    min-height: 42px;
    padding: 9px 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.nav-button:hover,
.topbar > a:hover {
    border-color: var(--line-strong);
    box-shadow: 0 8px 22px rgba(20, 32, 51, 0.08);
    color: var(--blue);
}

.panel,
.test {
    border-color: var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.panel-head {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-head h2 {
    margin-bottom: 4px;
}

.count-pill {
    background: var(--blue-soft);
    border: 1px solid #cbdcff;
    border-radius: 999px;
    color: var(--blue-dark);
    flex: 0 0 auto;
    font-size: 0.86rem;
    font-weight: 800;
    padding: 7px 11px;
}

.grid {
    align-items: start;
}

.row {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

label {
    color: #26354a;
    font-size: 0.88rem;
}

input,
select,
textarea {
    background: #ffffff;
    border-color: #cad5e3;
    color: var(--text);
    min-height: 44px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
    line-height: 1.48;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(22, 93, 204, 0.13);
}

input[type="file"] {
    background: var(--panel-soft);
}

input[type="checkbox"] {
    accent-color: var(--blue);
    min-height: auto;
    width: 18px;
}

.check-row {
    align-items: center;
    display: flex;
    gap: 10px;
}

.check-row label {
    margin: 0;
}

button {
    min-height: 46px;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button:hover {
    box-shadow: 0 10px 24px rgba(22, 93, 204, 0.22);
    transform: translateY(-1px);
}

.test {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.toast-stack {
    display: grid;
    gap: 12px;
    max-width: min(420px, calc(100vw - 32px));
    position: fixed;
    right: 24px;
    top: 24px;
    z-index: 1000;
}

.toast {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--line);
    border-left: 5px solid var(--blue);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(20, 32, 51, 0.16);
    color: var(--text);
    display: grid;
    gap: 11px;
    grid-template-columns: 18px 1fr 24px;
    opacity: 0;
    padding: 14px;
    transform: translateY(-12px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left-color: #1f9d55;
}

.toast-error {
    border-left-color: #d13f32;
}

.toast-icon {
    border-radius: 50%;
    display: block;
    height: 12px;
    margin-top: 5px;
    width: 12px;
}

.toast-success .toast-icon {
    background: #1f9d55;
}

.toast-error .toast-icon {
    background: #d13f32;
}

.toast-message {
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    min-height: 0;
    padding: 0;
    width: 24px;
}

.toast-close:hover {
    background: transparent;
    box-shadow: none;
    color: var(--text);
    transform: none;
}

@media (max-width: 780px) {
    h1 {
        font-size: 1.75rem;
    }

    body {
        padding: 18px;
    }

    .topbar {
        align-items: stretch;
        gap: 14px;
    }

    .nav-button,
    .topbar > a {
        justify-content: center;
        width: 100%;
    }

    .row,
    .grid {
        grid-template-columns: 1fr;
    }

    .panel,
    .test {
        padding: 18px;
    }

    .panel-head {
        display: block;
    }

    .count-pill {
        display: inline-flex;
        margin-top: 10px;
    }

    .toast-stack {
        left: 16px;
        right: 16px;
        top: 16px;
        max-width: none;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }
}

@media (max-width: 520px) {
    body {
        padding: 12px;
    }

    h1 {
        font-size: 1.55rem;
    }

    .meta,
    .muted {
        font-size: 0.88rem;
    }

    .panel,
    .test {
        padding: 16px;
    }

    textarea {
        min-height: 132px;
    }

    .check-row {
        align-items: flex-start;
    }

    .toast-stack {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .toast {
        grid-template-columns: 14px 1fr 24px;
        padding: 12px;
    }
}
