/* Restless Cloud portal — same look as the device UI (dark, amber). */
:root { --bg: #0e1013; --panel: #171a1f; --panel-2: #1f232a; --line: #2b3039; --text: #e8eaed; --muted: #9aa3ae;
  --accent: #f2b33d; --accent-ink: #1a1405; --ok: #3ccf7a; --warn: #f2b33d; --bad: #ff5a52; --info: #5aa7ff;
  --radius: 10px; --gap: 14px; color-scheme: dark; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
@media (prefers-color-scheme: light) { :root { --bg: #f4f5f7; --panel: #fff; --panel-2: #eef0f3; --line: #d8dce2; --text: #15181c; --muted: #5d6673;
  --accent: #b87700; --accent-ink: #fff; color-scheme: light; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; } h1 { font-size: 1.45rem; } h2 { font-size: 1.1rem; } h3 { font-size: .95rem; color: var(--muted); }
p { margin: .4em 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; } .num { font-variant-numeric: tabular-nums; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--gap); padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.logo { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); }
nav { display: flex; gap: 2px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
nav a[aria-current=page] { color: var(--text); background: var(--panel-2); }
.spacer { flex: 1; }
main { padding: 16px; max-width: 1200px; margin: 0 auto; outline: none; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .spread { justify-content: space-between; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; min-height: 38px; text-decoration: none; display: inline-flex; align-items: center; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 650; }
button.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
button.ghost { background: transparent; } button.small, .btn.small { min-height: 30px; padding: 4px 10px; font-size: .85rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 38px; max-width: 100%; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
label.inline { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .8rem; border: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.pill.warn { color: var(--warn); border-color: var(--warn); } .pill.bad { color: var(--bad); border-color: var(--bad); }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: 8px; padding: 10px 12px; background: var(--panel-2); }
.callout.bad { border-left-color: var(--bad); } .callout.warn { border-left-color: var(--warn); }
table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.tablewrap { overflow-x: auto; }
.dev { display: flex; flex-direction: column; gap: 8px; }
.dev h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; } .dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: .9rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.center { min-height: 80vh; display: grid; place-items: center; }
.card { width: min(420px, 100%); }
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.toast.bad { border-color: var(--bad); } .toast.ok { border-color: var(--ok); }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; width: min(520px, 94vw); }
dialog::backdrop { background: rgba(0,0,0,.55); }
dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
dialog form { display: flex; flex-direction: column; gap: 10px; }
.progress { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; display: flex; }
.progress i { display: block; height: 100%; }
.st-done { background: var(--ok); } .st-failed, .st-rolled_back { background: var(--bad); } .st-active { background: var(--info); } .st-wait { background: var(--warn); }
@media (max-width: 600px) { main { padding: 12px; } .top { padding: 8px 12px; } }
