:root{
  --bg:#eef2f8;
  --card:#f4f6fb;
  --stroke:rgba(20,30,50,.10);
  --text:#0f172a;
  --muted:#6b7280;
  --shadow: 0 18px 60px rgba(17,24,39,.12);
  --shadow2: 0 10px 30px rgba(17,24,39,.10);
  --radius:18px;

  --ok:#2dd4bf;
  --warn:#fb923c;
  --bad:#ef4444;
}

*{ 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(1200px 500px at 50% 140px, rgba(120,140,255,.18), transparent 60%),
              var(--bg);
  color:var(--text);
}

.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  background: rgba(238,242,248,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(20,30,50,.08);
}

.brand .title{ font-weight:800; letter-spacing:.2px; }
.brand .subtitle{ color:var(--muted); font-size:12.5px; margin-top:2px; }

.right{ display:flex; align-items:center; gap:12px; }
.search input{
  width:min(720px, 52vw);
  height:40px;
  border-radius: 999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.55);
  outline:none;
  padding:0 14px;
  box-shadow: 0 10px 30px rgba(17,24,39,.06);
}
.search input:focus{ border-color: rgba(120,140,255,.35); }

.btn{
  height:40px;
  padding:0 14px;
  border-radius: 999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.55);
  box-shadow: 0 12px 30px rgba(17,24,39,.08);
  font-weight:700;
  cursor:pointer;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

.page{
  padding: 22px 18px 46px;
  max-width: 1280px;
  margin: 0 auto;
}

.card{
  background: rgba(255,255,255,.42);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero{
  padding: 18px;
}
.heroRow{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-end;
}
.hTitle{ font-size:18px; font-weight:900; }
.hSub{ font-size:13px; color:var(--muted); margin-top:2px; }

.field{ min-width: 260px; }
.field label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin: 0 0 6px 8px;
}
.field select{
  width: 260px;
  height: 40px;
  border-radius: 14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.58);
  outline:none;
  padding: 0 10px;
  box-shadow: 0 10px 24px rgba(17,24,39,.06);
}

.navcards{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
}
.navcard{
  border-radius: 16px;
  padding: 12px 12px 10px;
  border:1px solid rgba(20,30,50,.10);
  background: rgba(255,255,255,.55);
  box-shadow: var(--shadow2);
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.navcard:hover{ transform: translateY(-2px); }
.navcard.active{
  border-color: rgba(120,140,255,.35);
  background: rgba(120,140,255,.12);
}
.navcard .t{ font-weight:800; font-size:13px; }
.navcard .n{ font-size:22px; font-weight:950; margin-top:6px; }
.navcard .s{ font-size:12px; color:var(--muted); margin-top:2px; }

.contentCard{
  margin-top: 14px;
  padding: 12px;
}
.content{ min-height: 260px; }

.tablewrap{
  width:100%;
  overflow:auto;
  border-radius: 14px;
  border:1px solid rgba(20,30,50,.10);
  background: rgba(255,255,255,.58);
}
table{ width:100%; border-collapse:collapse; min-width: 980px; }
thead th{
  position:sticky; top:0;
  background: rgba(245,247,255,.92);
  backdrop-filter: blur(10px);
  text-align:left;
  padding: 10px 10px;
  font-size:12px;
  border-bottom: 1px solid rgba(20,30,50,.10);
  white-space:nowrap;
}
tbody td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(20,30,50,.08);
  font-size: 13px;
  vertical-align: top;
}
tbody tr:nth-child(odd){ background: rgba(255,255,255,.50); }
tbody tr:hover{ background: rgba(120,140,255,.08); }

.muted{ color:var(--muted); font-size:12.5px; }

.badges{ display:flex; gap:6px; flex-wrap:wrap; }
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border:1px solid rgba(20,30,50,.10);
  background: rgba(255,255,255,.6);
}
.badge.ok{ border-color: rgba(45,212,191,.35); background: rgba(45,212,191,.14); }
.badge.warn{ border-color: rgba(251,146,60,.35); background: rgba(251,146,60,.14); }
.badge.bad{ border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.14); }

.toasts{
  position: fixed;
  right: 14px;
  bottom: 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index: 50;
}
.toast{
  width: 420px;
  max-width: calc(100vw - 28px);
  border-radius: 18px;
  padding: 12px 12px;
  display:flex;
  gap:10px;
  align-items:flex-start;
  border:1px solid rgba(20,30,50,.12);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow2);
}
.toast .dot{
  width:10px; height:10px; border-radius:999px;
  background: var(--warn);
  margin-top: 6px;
}
.toast.ok .dot{ background: var(--ok); }
.toast.bad .dot{ background: var(--bad); }
.toast .title{ font-weight: 900; font-size: 13px; }
.toast .msg{ color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.toast .close{
  margin-left:auto;
  border:none;
  background: rgba(240,244,255,.9);
  border:1px solid rgba(20,30,50,.10);
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 800;
  cursor:pointer;
}

.loadingOverlay{
  position: fixed;
  inset: 0;
  background: rgba(238,242,248,.70);
  backdrop-filter: blur(10px);
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top: 120px;
  z-index: 100;
}
.loadingBox{
  width: min(1180px, calc(100vw - 36px));
  border-radius: 18px;
  border:1px solid rgba(20,30,50,.10);
  background: rgba(255,255,255,.50);
  box-shadow: var(--shadow);
  padding: 22px 22px;
  display:flex;
  align-items:center;
  gap:14px;
}
.spinner{
  width: 20px; height: 20px;
  border-radius: 999px;
  border: 3px solid rgba(20,30,50,.14);
  border-top-color: rgba(120,140,255,.75);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loadingTitle{ font-weight: 950; }
.loadingSub{ color: var(--muted); margin-top: 2px; font-size: 12.5px; }
