:root{--bg:#0b0f14;--card:#121821;--muted:#2a3442;--text:#e8eef7;--accent:#4da3ff;--ok:#6BFF95;--warn:#ffd166;--danger:#ff6b6b;--radius:16px;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Helvetica,Arial}
*{box-sizing:border-box} body{margin:0;background:#0b0f14;color:var(--text)} a{color:var(--accent)}
.container{max-width:1100px;margin:32px auto;padding:0 20px}
header{display:flex;justify-content:space-between;align-items:center}
.card{background:linear-gradient(180deg,#141b25,#101620);border:1px solid #1f2a37;border-radius:var(--radius);padding:18px;box-shadow:0 8px 24px rgba(0,0,0,.25);margin:16px 0}
.btn{background:#1a2230;border:1px solid #293343;color:var(--text);padding:10px 14px;border-radius:12px;cursor:pointer}
.btn.primary{background:linear-gradient(135deg,var(--accent),#8ab6ff);color:#06101a;border:none}
.btn.ok{background:linear-gradient(135deg,#74ffb5,#4be18f);color:#062;border:none}
.btn.bad{background:linear-gradient(135deg,#ff7b7b,#ff5252);color:#300;border:none}
.form{display:grid;gap:12px}
label{display:grid;gap:6px}
input,textarea,select{background:#0f141b;border:1px solid var(--muted);color:var(--text);padding:12px;border-radius:12px;outline:none}
input:focus,textarea:focus,select:focus{border-color:var(--accent)}
.grid{display:grid;gap:16px}
.two{grid-template-columns:1.2fr .8fr}
.list{display:grid;gap:12px}
.item{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:14px;border:1px solid #1f2a37;border-radius:12px;background:#0f151e}
.meta{font-size:12px;color:#9fb3c8}
.auth{max-width:440px;margin:10vh auto;padding:24px}
.alert{padding:10px 12px;border-radius:10px;margin:10px 0}
.alert.danger{background:#261414;border:1px solid #5c2a2a;color:#ffb0b0}
.muted{color:#9fb3c8}

/* --- A dashboard UI polish + analytics --- */
.sticky{position:sticky;top:0;z-index:10;background:linear-gradient(180deg,#0b0f14,rgba(11,15,20,.7));backdrop-filter:saturate(1.2) blur(6px);border-bottom:1px solid #1f2a37}
.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.tile{background:#0f151e;border:1px solid #1f2a37;border-radius:14px;padding:14px}
.tile .k{font-size:28px;font-weight:700;line-height:1}
.tile .l{font-size:12px;color:#9fb3c8}
@media (max-width:900px){.tiles{grid-template-columns:repeat(2,1fr)}}
.badge{display:inline-block;padding:2px 8px;border-radius:999px;border:1px solid #2a3442;background:#101722;font-size:11px}
.table{width:100%;border-collapse:collapse}
.table td,.table th{border-bottom:1px solid #1f2a37;padding:8px;text-align:left;font-size:14px}

/* add to your CSS */
.row2 { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.row2 form { display:inline-block; margin:0; }

.rte-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:#0f141b;border:1px solid #2a3442;border-radius:10px;padding:8px;margin:6px 0 8px}
.rte-toolbar button,.rte-toolbar select{
  background:#1a2230;border:1px solid #293343;color:#e8eef7;padding:6px 10px;border-radius:8px;cursor:pointer
}
.rte-toolbar button:hover{background:#222c3a}
.rte-toolbar .sep{width:1px;height:20px;background:#2a3442;margin:0 2px}
.rte-editor{
  min-height:220px;background:#0f141b;border:1px solid #2a3442;border-radius:10px;padding:12px;color:#e8eef7;
}
.rte-editor:empty:before{content:attr(placeholder);color:#8aa0b7}
.rte-editor a{color:#7bb0ff;text-decoration:underline}

.rte-toolbar select{min-width:80px}
.rte-editor font[size="1"]{font-size:10px}
.rte-editor font[size="2"]{font-size:12px}
.rte-editor font[size="3"]{font-size:14px}
.rte-editor font[size="4"]{font-size:18px}
.rte-editor font[size="5"]{font-size:22px}
.rte-editor font[size="6"]{font-size:26px}
.rte-editor font[size="7"]{font-size:32px}

.rte-card{background:#0f141b;border:1px solid #2a3442;border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.25)}
.rte-toolbar{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:10px;border-bottom:1px solid #2a3442;border-top-left-radius:14px;border-top-right-radius:14px;background:linear-gradient(180deg,#121a25,#0f141b)}
.rte-group{display:flex;gap:8px;align-items:center;background:#0c1219;border:1px solid #223043;border-radius:10px;padding:6px}
.rte-btn{display:inline-grid;place-items:center;width:34px;height:34px;border:1px solid #293343;border-radius:8px;background:#162131;color:#e8eef7;cursor:pointer}
.rte-btn:hover{background:#1e2a3a}
.rte-btn.active{background:#243247;border-color:#4a89ff;box-shadow:0 0 0 1px #4a89ff inset}
.rte-btn svg{width:18px;height:18px;fill:currentColor}
.rte-select{background:#162131;border:1px solid #293343;color:#e8eef7;border-radius:8px;padding:6px 8px}
.rte-editor{min-height:360px;padding:14px;border-bottom-left-radius:14px;border-bottom-right-radius:14px}
.rte-editor:empty:before{content:attr(placeholder);color:#8aa0b7}
.rte-editor a{color:#7bb0ff;text-decoration:underline}
.rte-editor blockquote{border-left:3px solid #4a89ff;margin:10px 0;padding:6px 10px;color:#bcd0e7;background:#0d1520;border-radius:6px}
.rte-editor font[size="1"]{font-size:10px}
.rte-editor font[size="2"]{font-size:12px}
.rte-editor font[size="3"]{font-size:14px}
.rte-editor font[size="4"]{font-size:18px}
.rte-editor font[size="5"]{font-size:22px}
.rte-editor font[size="6"]{font-size:26px}
.rte-editor font[size="7"]{font-size:32px}
