:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --border: #e3e6ea;
    --text: #1b2330;
    --muted: #6b7686;
    --primary: #4f46e5;
    --primary-d: #4338ca;
    --ok: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
    --radius: 10px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .75rem; }
.muted { color: var(--muted); }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px; background: var(--panel); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 1rem;
}
.sidebar .logo { font-weight: 700; font-size: 1.05rem; margin-bottom: 1.5rem; }
.sidebar nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.sidebar nav a {
    padding: .55rem .75rem; border-radius: 8px; color: var(--text);
}
.sidebar nav a:hover { background: var(--bg); text-decoration: none; }
.sidebar nav a.active { background: var(--primary); color: #fff; }
.sidebar .bottom a { color: var(--muted); font-size: .85rem; }
.main { flex: 1; padding: 1.75rem 2.25rem; max-width: 1100px; }

.page-header { margin-bottom: 1.25rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }

/* Cards / stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.1rem; color: var(--text);
}
.stat-card:hover { border-color: var(--primary); text-decoration: none; }
.stat-num { font-size: 1.9rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: .85rem; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }

/* Tables */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: var(--bg); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }

/* Forms */
label { display: block; margin-bottom: .85rem; font-size: .9rem; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
    width: 100%; padding: .55rem .65rem; border: 1px solid var(--border); border-radius: 8px;
    font: inherit; margin-top: .25rem; background: #fff; color: var(--text);
}
textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 0 1rem; }

/* Buttons */
.btn {
    display: inline-block; padding: .55rem .95rem; border-radius: 8px; border: 1px solid var(--border);
    background: var(--panel); color: var(--text); cursor: pointer; font: inherit; text-decoration: none;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-d); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { padding: .3rem .6rem; font-size: .85rem; }

.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* Badges */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; background: #eef0f4; color: var(--muted); }
.badge-draft { background: #eef0f4; color: #4b5563; }
.badge-in_review { background: #ede9fe; color: #6d28d9; }
.badge-approved { background: #d1fae5; color: #047857; }
.badge-sent { background: #dbeafe; color: #1d4ed8; }
.badge-published { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }

/* Alerts */
.alert { padding: .7rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert.error { background: #fee2e2; color: #b91c1c; }
.alert.ok { background: #d1fae5; color: #065f46; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; width: 340px; }
.login-card h1 { text-align: center; margin-bottom: 1.25rem; }
.login-card .btn { width: 100%; margin-top: .5rem; }

/* SEO checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: .35rem 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.check-pass { color: var(--ok); }
.check-fail { color: var(--danger); }
