:root {
    color-scheme: light;
    --bg: #f5f1e8;
    --surface: #fffaf0;
    --surface-strong: #ffffff;
    --ink: #1f2933;
    --muted: #687586;
    --line: #ded6c7;
    --accent: #117c6f;
    --accent-dark: #0c5f56;
    --danger: #b42318;
    --warning: #996500;
    --ok: #157f3b;
    --shadow: 0 18px 50px rgba(28, 35, 42, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-dark);
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(18px, 4vw, 44px);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 250, 240, 0.92);
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: #263238;
    font-weight: 900;
}

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.container {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 28px;
}

.hero-copy {
    padding: clamp(24px, 4vw, 44px);
    background: #24312f;
    color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-copy h1,
.page-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.05;
    letter-spacing: 0;
}

.hero-copy p,
.page-title p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 18px;
}

.page-title {
    margin-bottom: 24px;
}

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

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

.metric,
.card,
.form-panel,
.table-panel {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.metric {
    padding: 18px;
}

.metric strong {
    display: block;
    font-size: 26px;
}

.metric span,
.muted {
    color: var(--muted);
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.button,
button {
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    min-height: 42px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.button:hover,
button:hover {
    background: var(--accent-dark);
    color: #fff;
}

.button.secondary {
    color: var(--ink);
    background: #ece4d3;
}

.button.secondary:hover {
    color: var(--ink);
    background: #e1d5bf;
}

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

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

.card {
    padding: 20px;
}

.card h3 {
    margin: 0 0 8px;
}

.form-panel {
    padding: 24px;
    max-width: 760px;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-weight: 750;
    margin-bottom: 7px;
}

input,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    min-height: 44px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

.hint {
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted);
}

.error {
    margin-top: 6px;
    color: var(--danger);
    font-size: 14px;
}

.notice {
    padding: 14px 16px;
    margin-bottom: 18px;
    background: #e9f7ef;
    color: var(--ok);
    border: 1px solid #bfe7ce;
    border-radius: 8px;
}

.table-panel {
    overflow: hidden;
    margin-bottom: 22px;
}

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

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

th {
    background: #f3ead8;
    font-size: 13px;
    text-transform: uppercase;
    color: #53606f;
}

tr:last-child td {
    border-bottom: 0;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 750;
    background: #edf2f7;
}

.status.pending {
    background: #fff2cc;
    color: var(--warning);
}

.status.active {
    background: #dff5e7;
    color: var(--ok);
}

.status.draft {
    background: #e8edf2;
    color: #526170;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 22px;
}

.inline-form {
    display: inline;
}

@media (max-width: 860px) {
    .hero,
    .split,
    .grid {
        grid-template-columns: 1fr;
    }

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

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

    table {
        min-width: 720px;
    }

    .table-panel {
        overflow-x: auto;
    }
}
