/* public/styles.css */
:root{
  --bg:#070B14;
  --panel:#0E1630;
  --card:#0C1329;
  --border:rgba(255,255,255,.08);
  --text:#EAF0FF;
  --muted:rgba(234,240,255,.65);
  --primary:#3B82F6;
  --primary2:#2563EB;
  --good:#22C55E;
  --warn:#F59E0B;
  --bad:#EF4444;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(900px 600px at 20% 10%, rgba(59,130,246,.25), transparent 55%),
              radial-gradient(900px 600px at 80% 0%, rgba(34,197,94,.18), transparent 55%),
              var(--bg);
  color:var(--text);
}

a{color:inherit;text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:18px}
.row{display:flex;gap:14px;flex-wrap:wrap}
.grid{display:grid;gap:14px}
.grid.cards{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
}
.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  font-size:12px;color:var(--muted);
}
.badge.good{border-color: rgba(34,197,94,.35); color: rgba(34,197,94,.95)}
.badge.warn{border-color: rgba(245,158,11,.35); color: rgba(245,158,11,.95)}
.badge.live{border-color: rgba(239,68,68,.35); color: rgba(239,68,68,.95)}

h1,h2,h3{margin:0 0 12px}
h1{font-size:26px}
h2{font-size:20px}
h3{font-size:16px}
p{margin:0;color:var(--muted);line-height:1.5}

.nav{
  position:sticky;top:0;z-index:50;
  background: rgba(7,11,20,.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .inner{
  max-width:1100px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 18px;gap:12px;
}
.brand{display:flex;align-items:center;gap:10px}
.logo{
  width:38px;height:38px;border-radius:12px;
  background: radial-gradient(circle at 30% 30%, rgba(59,130,246,.8), rgba(37,99,235,.2));
  border:1px solid var(--border);
  box-shadow: var(--shadow);
}
.brand b{font-size:14px;letter-spacing:.4px}
.navlinks{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.navlinks a, .navlinks button{
  padding:10px 12px;border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  font-weight:600;
}
.navlinks a:hover, .navlinks button:hover{background: rgba(255,255,255,.06)}
.navlinks .primary{
  border:none;
  background: linear-gradient(180deg, var(--primary), var(--primary2));
}
.navlinks .primary:hover{opacity:.92}
.navlinks .ghost{background:transparent}

input,select,textarea{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:var(--text);
  outline:none;
}
input::placeholder,textarea::placeholder{color: rgba(234,240,255,.45)}
label{font-size:12px;color:var(--muted);display:block;margin:10px 0 6px}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 14px;border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  font-weight:800;
}
.btn:hover{background: rgba(255,255,255,.06)}
.btn.primary{border:none;background: linear-gradient(180deg, var(--primary), var(--primary2))}
.btn.primary:hover{opacity:.92}
.btn.danger{border:none;background: linear-gradient(180deg, var(--bad), #b91c1c)}
.btn.small{padding:8px 10px;border-radius:10px;font-weight:700;font-size:12px}

.kv{display:flex;justify-content:space-between;gap:10px;margin-top:10px;color:var(--muted);font-size:13px}
.kv b{color:var(--text);font-weight:800}

.hr{height:1px;background: var(--border);margin:14px 0}

.hero{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;
}
.hero .left{min-width:260px;flex:1}
.hero .right{min-width:260px;flex:1}
.heroTitle{font-size:28px;font-weight:900;margin-bottom:8px}
.sub{color:var(--muted);max-width:700px}

.footerHint{margin-top:10px;color:var(--muted);font-size:12px}

/* Toast / Modal */
.toastWrap{
  position:fixed;right:16px;bottom:16px;z-index:9999;
  display:flex;flex-direction:column;gap:10px;max-width:min(420px, 90vw);
}
.toast{
  border:1px solid var(--border);
  background: rgba(10,16,34,.9);
  backdrop-filter: blur(10px);
  color:var(--text);
  border-radius:14px;
  padding:12px 12px;
  box-shadow: var(--shadow);
}
.toast .t{font-weight:900;margin-bottom:4px}
.toast .m{color:var(--muted);font-size:13px;line-height:1.35}
.toast.good{border-color: rgba(34,197,94,.35)}
.toast.warn{border-color: rgba(245,158,11,.35)}
.toast.bad{border-color: rgba(239,68,68,.35)}

.modalBack{
  position:fixed;inset:0;z-index:9998;
  background: rgba(0,0,0,.55);
  display:none;align-items:center;justify-content:center;
  padding:18px;
}
.modal{
  width:min(620px, 96vw);
  border-radius:18px;
  border:1px solid var(--border);
  background: rgba(10,16,34,.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding:16px;
}
.modalHeader{display:flex;justify-content:space-between;align-items:center;gap:12px}
.modalHeader h3{margin:0}
.modal .content{margin-top:10px;color:var(--muted);font-size:13px;line-height:1.55}
.modalActions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}

/* Responsive tweaks */
@media (max-width:520px){
  .nav .inner{padding:10px 12px}
  .heroTitle{font-size:24px}
  .container{padding:14px}
}

/* ===== Mobile Drawer Nav (Hamburger) ===== */
.nav .inner{
  position: relative;
}

.hamburger{
  display:none;
  width:44px;height:44px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  gap:5px;
  flex-direction:column;
}
.hamburger span{
  display:block;
  width:18px;height:2px;
  background: rgba(234,240,255,.85);
  border-radius:4px;
}

.drawerBack{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  z-index:9997;
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease;
}
.drawer{
  position:fixed;
  top:0;left:0;
  height:100vh;
  width:min(320px, 88vw);
  z-index:9998;
  transform: translateX(-105%);
  transition: transform .22s ease;
  background: rgba(10,16,34,.96);
  backdrop-filter: blur means(12px);
  border-right:1px solid var(--border);
  box-shadow: var(--shadow);
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.drawerHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.drawerHeader .brandLine{
  display:flex;
  align-items:center;
  gap:10px;
}
.drawerLinks{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.drawerLinks a, .drawerLinks button{
  width:100%;
  text-align:left;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor:pointer;
  font-weight:900;
}
.drawerLinks a.primary, .drawerLinks button.primary{
  border:none;
  background: linear-gradient(180deg, var(--primary), var(--primary2));
}
.drawerFooter{
  margin-top:auto;
  color: var(--muted);
  font-size:12px;
  border-top:1px solid var(--border);
  padding-top:12px;
}

body.drawerOpen .drawerBack{
  opacity:1;
  pointer-events:auto;
}
body.drawerOpen .drawer{
  transform: translateX(0);
}

/* Hide desktop navlinks on small screens, show hamburger */
@media (max-width: 860px){
  .navlinks{display:none !important;}
  .hamburger{display:flex;}
}
