:root { --bg:#0f1216; --card:#181d24; --line:#283038; --txt:#e6e9ee; --muted:#8b95a3; --accent:#4f8cff; --ok:#3ecf8e; --warn:#e7b94f; --err:#ff6b6b; }
* { box-sizing:border-box; }
body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; background:var(--bg); color:var(--txt); }
a { color:var(--accent); text-decoration:none; }
.muted { color:var(--muted); font-weight:normal; }
.container { max-width:1200px; margin:0 auto; padding:24px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px; }
.error { background:rgba(255,107,107,.12); color:var(--err); border:1px solid var(--err); padding:8px 12px; border-radius:8px; margin:8px 0; }
button, .btn { background:var(--accent); color:#fff; border:0; padding:9px 16px; border-radius:8px; cursor:pointer; font-size:14px; display:inline-block; }
button:hover, .btn:hover { filter:brightness(1.1); }

/* Login */
.login-page { display:flex; min-height:100vh; align-items:center; justify-content:center; }
.login-card { width:340px; display:flex; flex-direction:column; gap:10px; }
.login-card h1 { margin:0; }
.login-card label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); }
.login-card input { padding:9px; border-radius:8px; border:1px solid var(--line); background:#0f1318; color:var(--txt); }

/* Nav */
.topnav { display:flex; align-items:center; gap:18px; padding:12px 24px; background:var(--card); border-bottom:1px solid var(--line); }
.topnav .brand { font-weight:700; }
.topnav .spacer { flex:1; }

/* Dashboard */
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin:16px 0; }
.stat .num { display:block; font-size:28px; font-weight:700; }

/* Konsol */
.console-grid { display:grid; grid-template-columns:2fr 1fr; gap:16px; }
@media (max-width:900px){ .console-grid { grid-template-columns:1fr; } }
#sql { width:100%; height:180px; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:13px; background:#0f1318; color:var(--txt); border:1px solid var(--line); border-radius:8px; padding:12px; resize:vertical; }
.row { display:flex; align-items:center; gap:12px; margin:10px 0; }
.tablewrap { overflow:auto; max-height:50vh; border:1px solid var(--line); border-radius:8px; }
table { border-collapse:collapse; width:100%; font-size:13px; }
th, td { border-bottom:1px solid var(--line); padding:6px 10px; text-align:left; white-space:nowrap; }
th { position:sticky; top:0; background:#0f1318; }

/* Live-log */
.live h2 { margin-top:0; }
#log { display:flex; flex-direction:column; gap:8px; max-height:65vh; overflow:auto; }
.logitem { border:1px solid var(--line); border-left:3px solid var(--line); border-radius:6px; padding:8px; font-size:12px; }
.logitem.ok { border-left-color:var(--ok); }
.logitem.warn { border-left-color:var(--warn); }
.logitem.err { border-left-color:var(--err); }
.logitem code { display:block; margin:4px 0; color:#cdd6e0; white-space:pre-wrap; word-break:break-word; }
.loghead { display:flex; justify-content:space-between; gap:8px; }
