/* Hub: shared look for every page on the server (login, shell, home, apps). */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0a0c11;
  --bg-2: #0e1118;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --surface-solid: #12151d;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eceef3;
  --muted: #8d94a6;
  --faint: #5d6476;
  --accent: #8b7bff;
  --accent-2: #4fd1c5;
  --accent-soft: rgba(139, 123, 255, .14);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .6);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }

/* soft glow behind content pages */
.glow {
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(139, 123, 255, .10), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(79, 209, 197, .06), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

/* brand mark */
.mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px rgba(139, 123, 255, .6);
}
.mark svg { width: 18px; height: 18px; color: #0a0c11; }

/* layout helpers */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 48px; }
.title { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin: 0; }
.subtitle { color: var(--muted); margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.section { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); margin: 30px 0 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
a.card { text-decoration: none; display: block; transition: border-color .15s, background .15s, transform .15s; }
a.card:hover, .card.click:hover { border-color: var(--line-2); background: var(--surface-2); }
.grid { display: grid; gap: 12px; }

/* app icon tile with status dot */
.icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none; position: relative;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center;
}
.icon img { width: 26px; height: 26px; object-fit: contain; }
.icon b { color: var(--muted); font-weight: 600; }
.dot {
  position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bad); border: 2px solid var(--bg);
}
.up .dot { background: var(--ok); }
.up .dot::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--ok); opacity: 0; animation: ping 2.6s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.8); opacity: .7; } 80%, 100% { transform: scale(2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .up .dot::after { animation: none; } }

/* meters */
.meter { height: 6px; background: rgba(255, 255, 255, .06); border-radius: 99px; overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s ease; }
.meter > i.hot { background: var(--warn); }
.meter > i.crit { background: var(--bad); }

/* buttons */
.btn {
  appearance: none; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); font: 500 13px/1 var(--font); padding: 9px 14px; border-radius: var(--radius-sm);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: rgba(255, 255, 255, .2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #6f63f0); border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px -10px rgba(139, 123, 255, .8); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), #6f63f0); }
.btn.danger { color: var(--bad); }
.btn.go { color: var(--ok); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; }

/* inputs */
.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.input {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line-2); color: var(--text);
  font: 15px var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* pills / badges */
.badge { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }

/* toggle switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: var(--muted); font-size: 13px; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 99px; background: rgba(255, 255, 255, .12);
  position: relative; cursor: pointer; transition: background .2s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transition: transform .2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(14px); }
.switch:hover { color: var(--text); }

.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
code, pre { font-family: var(--mono); }

/* a profile picture over the initial (each page sizes .avatar and sets background-image) */
.avatar.photo { background-color: transparent; background-size: cover; background-position: center; color: transparent; }
