:root {
    --bg: #f4f1ea;
    --panel: #fffdfa;
    --ink: #1f2a2e;
    --muted: #68757d;
    --primary: #0b6e4f;
    --primary-soft: #dff4ea;
    --border: #d9d0c4;
    --danger: #9f2d2d;
    --danger-soft: #fde9e7;
    --warning-soft: #fff3d6;
    --shadow: 0 10px 30px rgba(31, 42, 46, 0.08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(11, 110, 79, 0.08), transparent 28%),
        linear-gradient(160deg, #f5efe5 0%, #f8f6f1 45%, #eef4ef 100%);
    color: var(--ink);
}
a { color: var(--primary); text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #16352f 0%, #0e241f 100%);
    color: #f2f7f4;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.brand { font-size: 30px; font-weight: 700; letter-spacing: 1px; }
.brand-subtitle { color: #b8d5ca; margin-top: 6px; }
.menu { display: grid; gap: 10px; margin-top: 34px; }
.menu a {
    color: #d6e4de;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}
.menu a.active, .menu a:hover {
    background: rgba(223, 244, 234, 0.14);
    color: #ffffff;
}
.sidebar-footer { font-size: 14px; color: #c7d7d1; display: grid; gap: 6px; }
.content { flex: 1; padding: 30px; }
.content.full { max-width: 520px; margin: 0 auto; width: 100%; padding-top: 60px; }
.topbar { margin-bottom: 22px; }
h1 { margin: 0 0 8px; font-size: 32px; }
.muted { color: var(--muted); }
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 20px;
}
.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.stat {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f7fbf8);
    border: 1px solid #dce9e1;
}
.stat .label { color: var(--muted); font-size: 14px; }
.stat .value { font-size: 30px; font-weight: 700; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td {
    padding: 11px 12px;
    border-bottom: 1px solid #ece5db;
    text-align: left;
    vertical-align: top;
}
th { background: #f6efe4; font-size: 14px; }
form.grid-form { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: grid; gap: 8px; }
label { font-weight: 600; font-size: 14px; }
input, select, textarea, button { font: inherit; border-radius: 12px; }
input, select, textarea { border: 1px solid var(--border); padding: 12px 14px; background: #fff; }
textarea { min-height: 100px; resize: vertical; }
button, .btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 11px 16px;
    cursor: pointer;
    display: inline-block;
}
.btn-secondary { background: #ebe4d9; color: var(--ink); }
.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; }
.alert-success { background: var(--primary-soft); color: #15553e; }
.alert-error { background: var(--danger-soft); color: #7d1f1f; }
.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge-success { background: var(--primary-soft); color: #15553e; }
.badge-warning { background: var(--warning-soft); color: #7a5c13; }
.search-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search-bar input, .search-bar select { min-width: 200px; }
.helper {
    padding: 14px 16px;
    background: #f6f0e6;
    border: 1px dashed #d4c2a8;
    border-radius: 14px;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page-actions { margin-bottom: 22px; }
@media (max-width: 900px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; }
    .content { padding: 18px; }
}
