* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; background: #f3f6fb; color: #172033; }
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar { background: linear-gradient(180deg, #0f172a 0%, #172554 100%); color: #fff; padding: 28px 20px; }
.brand { display:block; margin-bottom:28px; color:#fff; text-decoration:none; font-size:24px; font-weight:800; }
.admin-sidebar nav { display:grid; gap:10px; }
.admin-sidebar nav a { color:#dbeafe; text-decoration:none; padding:12px 14px; border-radius:10px; background:rgba(255,255,255,0.06); }
.admin-sidebar nav a:hover { background:rgba(255,255,255,0.14); }
.admin-main { padding:28px; }
.admin-topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; }
.admin-topbar h1 { margin:0 0 6px; }
.admin-topbar p { margin:0 0 20px; color:#64748b; }
.admin-user { padding:10px 14px; border-radius:999px; background:#fff; box-shadow:0 8px 24px rgba(15,23,42,.08); font-weight:700; }
.grid-3 { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:18px; }
.card, .form-card, .login-card { background:#fff; border-radius:18px; padding:22px; box-shadow:0 12px 35px rgba(15, 23, 42, 0.08); }
.stat-number { font-size:36px; font-weight:800; margin:8px 0 0; }
.panel-grid { display:grid; grid-template-columns:minmax(320px, 420px) 1fr; gap:20px; align-items:start; }
.form-card form, .login-card form { display:grid; gap:14px; }
label { display:grid; gap:8px; font-weight:600; }
input, select, textarea, .editor-surface { width:100%; border:1px solid #d7deea; border-radius:12px; padding:12px 14px; font:inherit; background:#fff; }
textarea { min-height:110px; resize:vertical; }
.editor-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.editor-toolbar button { border:0; border-radius:10px; background:#e2e8f0; padding:10px 12px; cursor:pointer; }
.editor-surface { min-height:320px; overflow:auto; text-align:left; }
.editor-surface p { margin:0 0 14px; line-height:1.7; }
.editor-surface h2,
.editor-surface h3,
.editor-surface h4 { margin:18px 0 10px; line-height:1.3; font-weight:800; color:#172033; }
.editor-surface h2 { font-size:30px; }
.editor-surface h3 { font-size:24px; }
.editor-surface h4 { font-size:19px; }
.editor-surface ul,
.editor-surface ol { margin:0 0 14px 24px; }
.editor-surface ul { list-style:disc; }
.editor-surface ol { list-style:decimal; }
.editor-source { min-height:320px; display:none; }
.button-row { display:flex; gap:12px; flex-wrap:wrap; }
.btn, .btn-secondary, .btn-danger { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:12px 18px; border-radius:12px; border:0; text-decoration:none; font-weight:700; cursor:pointer; }
.btn { background:#dc2626; color:#fff; }
.btn-secondary { background:#e2e8f0; color:#172033; }
.btn-danger { background:#fee2e2; color:#b91c1c; }
table { width:100%; border-collapse:collapse; }
th, td { padding:14px 12px; border-bottom:1px solid #e5eaf2; text-align:left; vertical-align:top; }
th { color:#64748b; font-size:14px; }
.table-actions { display:flex; gap:10px; flex-wrap:wrap; }
.flash { margin-bottom:18px; padding:14px 18px; border-radius:12px; font-weight:600; }
.flash-success { background:#dcfce7; color:#166534; }
.flash-error { background:#fee2e2; color:#991b1b; }
.muted { color:#64748b; }
.thumb-preview { width:88px; height:60px; border-radius:10px; object-fit:cover; }
.login-shell { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { width:min(460px, 100%); }
@media (max-width: 1024px) { .admin-shell, .panel-grid, .grid-3 { grid-template-columns: 1fr; } .admin-topbar { flex-direction:column; } }
