:root {
    --bg: #f6f8f9;
    --panel: #ffffff;
    --text: #132026;
    --muted: #5d6b73;
    --line: #dfe7eb;
    --primary: #006c67;
    --primary-dark: #004c49;
    --accent: #ffb000;
    --danger: #a52828;
    --success: #247a3d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding: 0 5vw;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-dark);
    font-size: 1.18rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
}

.site-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-menu a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.site-menu a:hover,
.site-menu a.active,
.site-menu .login-link {
    background: #e9f3f2;
    color: var(--primary-dark);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.menu-toggle span:not(.sr-only) {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero {
    display: grid;
    align-items: center;
    min-height: 520px;
    padding: 72px 5vw;
    background:
        linear-gradient(90deg, rgba(0, 45, 43, 0.86), rgba(0, 76, 73, 0.52)),
        url('/assets/img/hero.svg') center/cover;
    color: #fff;
}

.hero-content {
    max-width: 720px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1.15;
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(2.3rem, 5vw, 4.6rem);
}

h2 {
    margin-top: 0;
    font-size: 2rem;
}

.hero p {
    max-width: 580px;
    font-size: 1.15rem;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button.small {
    min-height: 36px;
    padding: 7px 12px;
}

.button.danger {
    background: var(--danger);
}

.button.secondary {
    background: #fff;
    color: var(--primary-dark);
}

.section {
    width: min(1120px, 90vw);
    margin: 0 auto;
    padding: 64px 0;
}

.page-title {
    padding: 58px 5vw;
    background: #eaf3f2;
}

.page-title-inner {
    width: min(1120px, 90vw);
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card,
.form-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.card {
    padding: 24px;
}

.card h3 {
    margin-top: 0;
}

.user-list-card {
    grid-column: span 2;
}

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

.form-panel {
    width: min(520px, 90vw);
    margin: 48px auto;
    padding: 28px;
}

.form-row {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

label {
    font-weight: 800;
}

input,
select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #b9c7cd;
    border-radius: 8px;
    font: inherit;
}

.message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #eef6ee;
    color: var(--success);
    font-weight: 700;
}

.message.error {
    background: #fbebeb;
    color: var(--danger);
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

.inline-form {
    display: contents;
}

.compact-form {
    display: inline-flex;
    margin-left: 6px;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    background: #f0f5f6;
}

.site-footer {
    padding: 28px 5vw;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    .site-menu {
        position: absolute;
        top: 72px;
        right: 5vw;
        left: 5vw;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 18px 40px rgba(19, 32, 38, 0.14);
    }

    .site-menu.open {
        display: flex;
    }

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

    .user-list-card {
        grid-column: auto;
    }

    .hero {
        min-height: 460px;
    }
}
