:root {
    --bg: #f3f6fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --border: #e5e7eb;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: 270px;
    background: #0f172a;
    color: #fff;
    padding: 28px 20px;
    position: fixed;
    top: 0; bottom: 0; left: 0;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 35px; }
.brand-icon {
    width: 44px; height: 44px; border-radius: 14px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    display: grid; place-items: center; font-weight: 800;
}
.brand span { display: block; color: #94a3b8; font-size: 13px; margin-top: 3px; }
.nav { display: grid; gap: 8px; }
.nav a {
    color: #cbd5e1; text-decoration: none; padding: 13px 14px;
    border-radius: 12px; font-weight: 600;
}
.nav a:hover, .nav a.active { background: #1e293b; color: #fff; }
.main { margin-left: 270px; width: calc(100% - 270px); padding: 34px; }
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 20px; margin-bottom: 28px;
}
.topbar h1 { margin: 0 0 6px; font-size: 30px; }
.topbar p { margin: 0; color: var(--muted); }
.primary-link, button {
    display: inline-block; background: var(--primary); color: #fff;
    border: 0; border-radius: 12px; padding: 12px 16px;
    font-weight: 700; text-decoration: none; cursor: pointer;
}
.primary-link:hover, button:hover { background: var(--primary-dark); }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.card, .panel {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 18px; padding: 22px; box-shadow: var(--shadow);
}
.card small { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.card strong { display: block; font-size: 30px; margin-top: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel h2 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-row { margin-bottom: 16px; }
label { display: block; font-weight: 700; margin-bottom: 7px; }
input, select, textarea {
    width: 100%; border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 13px; font-size: 15px; background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 700; font-size: 13px; }
.success { color: var(--success); font-weight: 700; }
.danger { color: var(--danger); font-weight: 700; }
.notice { background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; }
.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end; }
.actions { display: flex; gap: 10px; align-items: center; }
.reset { color: var(--muted); font-weight: 700; text-decoration: none; }
.progress { height: 9px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); }
@media (max-width: 950px) {
    .sidebar { position: static; width: 100%; }
    .app { display: block; }
    .main { margin-left: 0; width: 100%; padding: 20px; }
    .cards, .grid-2, .form-grid, .filters { grid-template-columns: 1fr; }
    .topbar { display: block; }
    .primary-link { margin-top: 15px; }
}

.table-action { display: inline-block; padding: 7px 11px; border-radius: 10px; background: #eff6ff; color: var(--primary); font-weight: 700; text-decoration: none; }
.table-action:hover { background: #dbeafe; }
