:root {
    --accent: #2D6CDF;
    --bg: #F5F6FA;
    --surface: #FFFFFF;
    --text: #1E2230;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --danger: #DC2626;
    --success: #16A34A;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.layout { display: flex; min-height: 100vh; }

/* --- Sidebar --- */
.sidebar {
    width: 230px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 2rem;
    padding: 0 0.4rem;
}

.brand-logo { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }

.nav-links { list-style: none; padding: 0; margin: 0; flex: 1; }
.nav-links li { margin-bottom: 0.2rem; }
.nav-links a {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
}
.nav-links a:hover { background: var(--bg); }

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.sidebar-footer a { color: var(--accent); text-decoration: none; }

/* --- Content --- */
.content { flex: 1; padding: 2rem 2.5rem; max-width: 1100px; }

h1 { font-size: 1.5rem; margin-bottom: 1.4rem; }
h2 { font-size: 1.15rem; margin-top: 0; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.4rem;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-draft { background: #E5E7EB; color: #374151; }
.badge-review { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #DBEAFE; color: #1D4ED8; }
.badge-published { background: #DCFCE7; color: #166534; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }

label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0.8rem 0 0.3rem; }
input[type=text], input[type=email], input[type=password], input[type=color],
input[type=datetime-local], textarea, select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
}
textarea { min-height: 120px; resize: vertical; }

.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { filter: brightness(0.92); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }

.alert { padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #FEE2E2; color: #991B1B; }
.alert-success { background: #DCFCE7; color: #166534; }

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}
.login-box {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 380px;
}
.login-box h1 { text-align: center; margin-bottom: 1.5rem; }
