:root{
  --bg:#0b0f17;
  --panel:#101826;
  --panel2:#0e1522;
  --text:#e6eefc;
  --muted:#9fb0c8;
  --border:rgba(255,255,255,0.08);
  --accent:#6aa6ff;
  --accent2:#9b7bff;
  --good:#2dd4bf;
  --warn:#fbbf24;
  --bad:#f87171;
  --shadow: 0 20px 60px rgba(0,0,0,0.55);
}

html[data-theme='light']{
  --bg:#f6f8fc;
  --panel:#ffffff;
  --panel2:#ffffff;
  --text:#0b1220;
  --muted:#4b5563;
  --border:rgba(0,0,0,0.10);
  --accent:#2563eb;
  --accent2:#7c3aed;
  --good:#0f766e;
  --warn:#b45309;
  --bad:#b91c1c;
  --shadow: 0 18px 50px rgba(0,0,0,0.12);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background: var(--bg);
  min-height:100vh;
}

/* =========================
   FULL PAGE BACKGROUND
========================= */
.bg{
  position: fixed;
  inset: 0;
  z-index: -1;

  background-image: url("/static/img/bg.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  opacity: 0.25;
  pointer-events: none;
}

/* optional dark overlay */
.bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.55);
}

/* ========================= */

a{color:inherit; text-decoration:none}

.container{width:min(1100px, 92vw); margin:0 auto}

.topbar{
  position: sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
  border-bottom: 1px solid var(--border);
}
html[data-theme='light'] .topbar{
  background: linear-gradient(to bottom, rgba(255,255,255,0.85), rgba(255,255,255,0.6));
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand img{width:34px; height:34px}
.brand .title{font-weight:800; letter-spacing:0.3px}
.brand .sub{font-size:12px; color:var(--muted); margin-top:2px}

.navlinks{display:flex; gap:8px; align-items:center; flex-wrap:wrap}

.pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(16,24,38,0.55);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  color:var(--text);
}
html[data-theme='light'] .pill{background: rgba(255,255,255,0.7)}

.pill.active{outline:2px solid rgba(106,166,255,0.35)}

.btn{
  cursor:pointer;
  border:none;
  padding:10px 12px;
  border-radius:14px;
  color:var(--text);
  background: linear-gradient(135deg, rgba(106,166,255,0.9), rgba(155,123,255,0.85));
  box-shadow: var(--shadow);
}
.btn.secondary{
  background: rgba(16,24,38,0.55);
  border:1px solid var(--border);
  box-shadow:none;
}
html[data-theme='light'] .btn.secondary{background: rgba(255,255,255,0.7)}

.grid{
  display:grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap:18px;
  margin: 26px 0 60px;
}
@media(max-width: 900px){
  .grid{grid-template-columns:1fr}
}

.card{
  border:1px solid var(--border);
  background: rgba(16,24,38,0.62);
  border-radius: 20px;
  padding:18px;
  box-shadow: var(--shadow);
}
html[data-theme='light'] .card{background: rgba(255,255,255,0.78)}

.h1{font-size:40px; line-height:1.05; margin:0}
.muted{color:var(--muted)}

.hero{
  padding:40px 0 14px;
}

.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}

.form{
  display:grid;
  gap:10px;
  margin-top: 12px;
}

.input{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(14,21,34,0.55);
  color:var(--text);
}
html[data-theme='light'] .input{background: rgba(255,255,255,0.9)}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.table th,
.table td{
  padding:12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  font-size:14px
}
.table th{
  color:var(--muted);
  font-weight:700;
  background: rgba(0,0,0,0.15)
}
html[data-theme='light'] .table th{
  background: rgba(0,0,0,0.04)
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:12px;
  color:var(--muted)
}
.badge.good{color:var(--good)}
.badge.bad{color:var(--bad)}
.badge.warn{color:var(--warn)}

.flash{
  margin: 16px 0;
  display:grid;
  gap:10px
}

.alert{
  border:1px solid var(--border);
  border-left: 5px solid var(--accent);
  padding:12px 14px;
  border-radius:16px;
  background: rgba(16,24,38,0.55)
}
.alert.danger{border-left-color: var(--bad)}
.alert.warning{border-left-color: var(--warn)}
.alert.success{border-left-color: var(--good)}

.kbd{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
  padding:3px 7px;
  border-radius:9px;
  border:1px solid var(--border);
  color:var(--muted)
}

.footer{
  padding: 22px 0 40px;
  color:var(--muted);
  border-top:1px solid var(--border);
  margin-top: 40px
}
