@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
    --bg: #f4f1ea;
    --card: #fffdf8;
    --ink: #1b1b1b;
    --muted: #716c63;
    --line: #d7d1c6;
    --accent: #174f4a;
    --danger: #8d2e2e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
}

a { color: inherit; }

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

.sidebar {
    background: var(--ink);
    color: white;
    padding: 28px 20px;
}

.sidebar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    margin-bottom: 34px;
}

.sidebar nav {
    display: grid;
    gap: 8px;
}

.sidebar nav a {
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    color: #d7d7d7;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: var(--accent);
    color: white;
}

.admin-main {
    padding: 34px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 26px;
}

.admin-header h1 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 2.3rem;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 12px;
    background: white;
    font: inherit;
}

textarea { min-height: 160px; resize: vertical; }

.form-row { margin-bottom: 18px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 6px;
    padding: 11px 16px;
    background: var(--accent);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.button.secondary {
    background: white;
    color: var(--ink);
    border: 1px solid var(--line);
}

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

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.notice {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 18px;
    background: #e7f2ee;
    color: #185b4d;
}

.error {
    background: #f4dddd;
    color: #7b2020;
}

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

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

th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

.small { font-size: .84rem; color: var(--muted); }

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

.login-card {
    width: min(420px, 100%);
    background: var(--card);
    border: 1px solid var(--line);
    padding: 30px;
    border-radius: 12px;
}

.login-card h1 {
    font-family: 'Playfair Display', serif;
    margin-top: 0;
}

@media (max-width: 850px) {
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { padding: 18px; }
    .sidebar-brand { margin-bottom: 14px; }
    .sidebar nav { grid-template-columns: repeat(4, auto); overflow-x: auto; }
    .admin-main { padding: 22px 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    table { display: block; overflow-x: auto; }
}
