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

:root {
    --bg: #f4efe6;
    --paper: #fffdf8;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e7dccb;
    --accent: #ba6a28;
    --accent-dark: #8a4e1d;
    --good: #1f7a4d;
    --bad: #b42318;
    --shadow: 0 18px 40px rgba(78, 53, 30, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(186, 106, 40, 0.12), transparent 28%),
        linear-gradient(180deg, #f9f5ee 0%, var(--bg) 100%);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    padding: 32px 24px;
    background: #2d241d;
    color: #f8f3eb;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    position: sticky;
    top: 0;
    min-height: 100vh;
}

.sidebar-top {
    display: grid;
    gap: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #d3b89e;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
}

.sidebar h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.nav {
    display: grid;
    gap: 10px;
    margin: 32px 0;
}

.nav a {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.nav a.is-active {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
}

.user-box {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.user-box span {
    display: block;
    margin-top: 6px;
    color: #d9c7b4;
}

.content {
    padding: 32px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input,
select,
button,
textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #d7cab9;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}

button {
    background: var(--accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    font-weight: 700;
}

button:hover {
    background: var(--accent-dark);
}

.actions {
    display: flex;
    gap: 12px;
    align-items: end;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.alert-success {
    background: #e9f7ef;
    color: var(--good);
}

.alert-error {
    background: #fef0f0;
    color: var(--bad);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
    border-radius: 20px;
    overflow: hidden;
}

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

th {
    background: #f8f1e7;
}

.metric {
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fffdf8 0%, #f9f1e6 100%);
    border: 1px solid var(--line);
}

.metric strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(480px, 100%);
}

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

h1,
h2,
h3 {
    letter-spacing: -0.03em;
}

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

    .sidebar {
        position: static;
        min-height: auto;
    }

    .grid.cols-4,
    .grid.cols-3,
    .grid.cols-2 {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 20px;
    }
}
