:root { --bg:#0d1117; --card:#161b22; --line:#2a313c; --text:#e6edf3; --muted:#8b949e; --accent:#2f81f7; --green:#3fb950; --red:#f85149; --amber:#d29922; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.5 "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif; }
.hidden { display:none !important; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:18px; margin-bottom:16px; }
h3 { margin:0 0 12px; font-size:16px; }
.muted { color:var(--muted); } .small { font-size:12px; } .error { color:var(--red); min-height:1em; } .warn { color:var(--amber); }
.brand { font-weight:700; font-size:17px; display:flex; align-items:center; gap:8px; direction:ltr; }
.dot { width:10px; height:10px; border-radius:50%; background:var(--green); box-shadow:0 0 8px var(--green); }
.login { min-height:100vh; display:flex; align-items:center; justify-content:center; }
.login-card { width:360px; display:flex; flex-direction:column; gap:12px; }
label { display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:13px; }
input, textarea { background:#0d1117; color:var(--text); border:1px solid var(--line); border-radius:6px; padding:9px 10px; font:inherit; }
textarea { width:100%; direction:ltr; font-family:ui-monospace, monospace; margin-bottom:10px; }
input:focus, textarea:focus { outline:none; border-color:var(--accent); }
.btn { background:#21262d; color:var(--text); border:1px solid var(--line); border-radius:6px; padding:8px 14px; cursor:pointer; font:inherit; font-size:13px; }
.btn:hover { border-color:var(--muted); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.danger { color:var(--red); }
.btn.ghost { background:transparent; }
.top { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 24px; border-bottom:1px solid var(--line); background:var(--card); position:sticky; top:0; }
nav { display:flex; gap:4px; }
.tab { background:none; border:none; color:var(--muted); padding:8px 14px; border-radius:6px; cursor:pointer; font:inherit; }
.tab.active { color:var(--text); background:#21262d; }
main { padding:24px; max-width:1200px; margin:auto; }
.stats { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }
.stat .label { color:var(--muted); font-size:13px; } .stat .value { font-size:26px; font-weight:700; margin-top:4px; }
table.grid { width:100%; border-collapse:collapse; }
.grid th, .grid td { padding:9px 10px; border-bottom:1px solid var(--line); text-align:right; }
.grid th { color:var(--muted); font-weight:500; font-size:13px; }
.num { direction:ltr; text-align:right; font-family:ui-monospace, monospace; }
.up { color:var(--green); } .down { color:var(--red); }
.badge { display:inline-block; padding:2px 8px; border-radius:20px; font-size:12px; }
.badge.on { background:#1f3d2a; color:var(--green); } .badge.off { background:#3d1f1f; color:var(--red); } .badge.wait { background:#3d321f; color:var(--amber); }
.row { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; } .row label { flex:1; min-width:180px; } .row label.narrow { flex:0 0 120px; min-width:0; }
.col { display:flex; flex-direction:column; gap:12px; max-width:420px; }
.actions { display:flex; gap:6px; flex-wrap:wrap; }
.code { background:#0d1117; border:1px solid var(--line); border-radius:6px; padding:12px; direction:ltr; text-align:left; white-space:pre-wrap; font-size:12.5px; overflow:auto; }
.modal { position:fixed; inset:0; background:#000a; display:flex; align-items:center; justify-content:center; }
.modal-card { width:640px; max-width:95vw; }
.token-box { display:flex; gap:8px; align-items:center; background:#0d1117; border:1px solid var(--accent); border-radius:6px; padding:10px; direction:ltr; margin-bottom:12px; }
.token-box code { flex:1; word-break:break-all; font-size:14px; }
select { background:#0d1117; color:var(--text); border:1px solid var(--line); border-radius:6px; padding:9px 10px; font:inherit; }
.grid-form { display:grid; grid-template-columns:1fr 1fr; gap:12px; } .grid-form .wide { grid-column:1 / -1; }
.grid-form textarea { margin:0; }
.col-wide { display:flex; flex-direction:column; gap:12px; } #editFields { display:flex; flex-direction:column; gap:12px; }
h3 .btn { margin-inline-start:10px; font-weight:400; }
.badge.def { background:#1f2d3d; color:var(--accent); }
