:root {
    color-scheme: light;
    --font-sans: "Manrope", "Segoe UI", sans-serif;
    --font-display: "Syne", "Segoe UI", sans-serif;
    --ink: #121a22;
    --ink-soft: #3a4a58;
    --muted: #677887;
    --paper: #e8eef2;
    --surface: #f7fafb;
    --border: #cfd8df;
    --border-strong: #b5c1cb;
    --primary: #1a5f4a;
    --primary-hover: #144c3b;
    --primary-soft: #e4f0eb;
    --danger: #9b2c2c;
    --danger-soft: #fce8e8;
    --success: #1b6b45;
    --success-soft: #e6f5ee;
    --focus: #2a8f70;
    --header: #14212b;
    --radius: 14px;
    --shadow: 0 1px 0 rgba(20, 33, 43, 0.04),
        0 12px 32px rgba(20, 33, 43, 0.06);
    font-family: var(--font-sans);
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(
            ellipse 80% 50% at 100% -10%,
            rgba(26, 95, 74, 0.08),
            transparent 55%
        ),
        radial-gradient(
            ellipse 60% 40% at 0% 100%,
            rgba(20, 33, 43, 0.05),
            transparent 50%
        ),
        var(--paper);
}

a {
    color: var(--primary);
}

code {
    font-size: 0.9em;
}

.admin-shell {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 16px;
    color: #f7f4ef;
    background: var(--header);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
    margin: 0 8px 20px;
    color: inherit;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.sidebar-label {
    margin: 0 12px 4px;
    color: rgba(247, 244, 239, 0.45);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-user {
    margin: 0 8px 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-user-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sidebar-user-email {
    margin-top: 4px;
    color: rgba(247, 244, 239, 0.55);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.sidebar-logout {
    margin: auto 8px 0;
}

.sidebar-logout .button {
    width: 100%;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(247, 244, 239, 0.72);
    font-size: 0.925rem;
    font-weight: 500;
    text-decoration: none;
    transition:
        color 0.15s ease,
        background 0.15s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.is-active {
    color: #fff;
    background: rgba(26, 95, 74, 0.45);
}

.admin-main {
    min-width: 0;
}

.page-content {
    width: min(1080px, calc(100% - 40px));
    margin-inline: auto;
    padding-block: 40px 64px;
}

.sidebar-link:focus-visible,
.button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.page-heading h1 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.15rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.page-heading .muted {
    margin: 0;
}

.notice {
    margin-block: 20px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.notice-success {
    color: var(--success);
    border-color: #b7e0c9;
    background: var(--success-soft);
}

.notice-error {
    color: var(--danger);
    border-color: #f0bdbd;
    background: var(--danger-soft);
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.panel p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.panel-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.panel-meta::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-size: 0.925rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.button:hover {
    background: var(--primary-hover);
}

.button-secondary {
    border-color: var(--border-strong);
    color: var(--ink);
    background: var(--surface);
}

.button-secondary:hover {
    background: var(--paper);
}

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

@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .brand {
        margin-bottom: 12px;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .sidebar-link {
        padding: 8px 12px;
    }

    .sidebar-logout {
        margin-top: 12px;
    }
}

@media (max-width: 680px) {
    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }
}
