:root {
  --bg: #0b1020;
  --panel: #141a2e;
  --panel-2: #1b2340;
  --line: #2a3358;
  --text: #e8ecf7;
  --muted: #9aa6c7;
  --accent: #5b8cff;
  --accent-2: #7c5cff;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #1a2350 0%, var(--bg) 55%);
  color: var(--text); min-height: 100vh;
}
a { color: var(--accent); }
header.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(11,16,32,.8); backdrop-filter: blur(8px); z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .3px; }
.brand .orbit {
  width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 0 18px rgba(91,140,255,.6); position: relative;
}
.brand .orbit::after {
  content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg);
}
.userchip { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.btn {
  background: linear-gradient(180deg, var(--accent), #4577ef); color: #fff; border: 0;
  padding: 10px 16px; border-radius: 10px; font-weight: 600; cursor: pointer;
}
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.small { padding: 6px 10px; font-size: 13px; }
main { padding: 28px; max-width: 1100px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 24px; }

/* Launchpad grid */
.asbanner { display:flex; align-items:center; justify-content:space-between; gap:12px; background:#fff7e6; border:1px solid #f0c674; color:#8a5a00; padding:10px 14px; border-radius:10px; margin-bottom:16px; }
.asbanner .btn, .asbanner .btn.ghost { background:#8a5a00; color:#fff; border:1px solid #6e4700; }
.asbanner .btn:hover, .asbanner .btn.ghost:hover { background:#6e4700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.appcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: var(--text); display: block;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.appcard:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.appcard .icon { font-size: 30px; }
.appcard .name { font-weight: 700; margin-top: 12px; }
.appcard .desc { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Login card */
.login-wrap { display: grid; place-items: center; min-height: 70vh; }
.login-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 40px; width: 380px; text-align: center; box-shadow: var(--shadow);
}

/* Admin */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; color: var(--muted); }
.tab.active { background: var(--panel-2); color: var(--text); border-color: var(--accent); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
input, select {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 9px 10px; border-radius: 9px; font-size: 14px; width: 100%;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 12px; }
.gradechips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--muted); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.badge.good { color: var(--good); } .badge.warn { color: var(--warn); } .badge.bad { color: var(--bad); }
.hidden { display: none !important; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.flex { display: flex; gap: 10px; align-items: center; }
.spacer { flex: 1; }

/* Sync result chips */
.resultchips { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip { display: inline-flex; align-items: baseline; gap: 5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; font-size: 12px; white-space: nowrap; }
.rchip .rk { color: var(--muted); }
.rchip .rv { font-weight: 700; color: var(--text); }
.rchip.zero { opacity: .5; }
.rchip.zero .rv { font-weight: 600; color: var(--muted); }
.errtext { color: var(--bad); font-size: 13px; }
.subtle { color: var(--muted); font-size: 12px; }
