/* TrustPositif Monitor UI (dark neon) */
:root{
  --bg0:#060b14;
  --bg1:#071425;
  --card:#0b1730;
  --line:rgba(255,255,255,.08);
  --txt:rgba(255,255,255,.92);
  --mut:rgba(255,255,255,.62);
  --mut2:rgba(255,255,255,.42);
  --pri:#14c6d3;
  --pri2:#2ae1b9;
  --ok:#29d58c;
  --bad:#ff4b6e;
  --warn:#ffb020;
  --shadow: 0 22px 60px rgba(0,0,0,.45);
  --r:18px;
  --r2:22px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Noto Sans",Arial,sans-serif;
  color:var(--txt);
  background:
    radial-gradient(1000px 700px at 30% 10%, rgba(20,198,211,.18), transparent 60%),
    radial-gradient(1000px 700px at 70% 0%, rgba(42,225,185,.11), transparent 60%),
    radial-gradient(1200px 800px at 50% 120%, rgba(100,70,255,.10), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 70%);
  overflow-x:hidden;
}

.bg-glow{
  position:fixed; inset:-20vmax;
  background:
    radial-gradient(circle at 20% 30%, rgba(20,198,211,.12), transparent 45%),
    radial-gradient(circle at 80% 40%, rgba(42,225,185,.10), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(255,75,110,.07), transparent 45%);
  filter: blur(30px);
  pointer-events:none;
  z-index:-1;
}

.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  backdrop-filter: blur(14px);
  background: rgba(6,11,20,.55);
}

.brand{display:flex; align-items:center; gap:10px; font-weight:700; letter-spacing:.3px}
.logo{display:grid; place-items:center; color:var(--pri)}
.topbar-actions{display:flex; gap:10px; align-items:center}

.wrap{max-width:1060px; margin:0 auto; padding:22px 18px 60px}

.hero{padding:10px 2px 18px}
.hero h1{font-size:44px; margin:0; letter-spacing:-1px}
.subtitle{margin:10px 0 6px; color:var(--pri); font-weight:600}
.hint{margin:0; color:var(--mut); max-width:820px}

.cards{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:14px;
  margin:14px 0 18px;
}
@media (max-width:920px){ .cards{grid-template-columns:repeat(2,1fr)} }
@media (max-width:520px){ .hero h1{font-size:34px} .cards{grid-template-columns:1fr} }

.card{
  background: linear-gradient(180deg, rgba(12,25,50,.8), rgba(7,13,26,.65));
  border:1px solid var(--line);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  padding:14px 14px;
  display:flex; align-items:center; gap:12px;
}
.card-icon{
  width:44px; height:44px; border-radius:14px;
  display:grid; place-items:center;
  background: rgba(20,198,211,.10);
  border:1px solid rgba(20,198,211,.18);
  color: var(--pri);
}
.card-icon svg{width:22px; height:22px; fill: currentColor}
.card-icon.ok{background: rgba(41,213,140,.10); border-color: rgba(41,213,140,.18); color: var(--ok)}
.card-icon.bad{background: rgba(255,75,110,.10); border-color: rgba(255,75,110,.18); color: var(--bad)}
.card-icon.warn{background: rgba(255,176,32,.10); border-color: rgba(255,176,32,.18); color: var(--warn)}
.card-meta{display:flex; flex-direction:column; gap:4px}
.card-value{font-size:26px; font-weight:800}
.card-label{font-size:12px; letter-spacing:1.2px; color:var(--mut2); font-weight:700}

.panel{
  background: linear-gradient(180deg, rgba(12,25,50,.75), rgba(7,13,26,.55));
  border:1px solid var(--line);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  padding:16px;
  margin:14px 0;
}
.panel-slim{padding:14px}

.panel-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px}
.panel-title{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.panel-actions{display:flex; align-items:center; gap:10px; flex-wrap:wrap}

.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(20,198,211,.18);
  background: rgba(20,198,211,.08);
  color: var(--pri);
  font-weight:700; font-size:12px;
}
.pill-soft{
  border-color: rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: var(--mut);
  font-weight:600;
}
.muted{color:var(--mut)}
.small{font-size:12px}

.field-label{display:block; margin:6px 0 10px; color:var(--mut); font-weight:600}
.textarea{
  width:100%;
  background: rgba(5,10,22,.75);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding:12px 12px;
  color:var(--txt);
  outline:none;
  resize:vertical;
  min-height:130px;
}
.textarea:focus, .input:focus{
  border-color: rgba(20,198,211,.35);
  box-shadow: 0 0 0 4px rgba(20,198,211,.08);
}

.panel-foot{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-top:12px;
}
.counter{color:var(--mut2); font-weight:700; font-size:12px}
.btnrow{display:flex; gap:10px; align-items:center}

.btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: var(--txt);
  padding:11px 14px;
  cursor:pointer;
  font-weight:700;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.16)}
.btn:active{transform: translateY(1px)}
.btn-primary{
  background: linear-gradient(90deg, rgba(20,198,211,.95), rgba(42,225,185,.92));
  border-color: rgba(20,198,211,.30);
  color:#06101a;
}
.btn-primary:hover{filter: brightness(1.03)}
.btn-danger{
  background: rgba(255,75,110,.10);
  border-color: rgba(255,75,110,.22);
  color: rgba(255,255,255,.9);
}
.btn-danger:hover{background: rgba(255,75,110,.16)}
.btn-ghost{background: rgba(255,255,255,.03)}
.spinner{
  width:16px; height:16px; border-radius:50%;
  border:2px solid rgba(6,16,26,.25);
  border-top-color: rgba(6,16,26,.80);
  display:none;
  margin-right:8px;
  animation: spin .9s linear infinite;
}
.loading .spinner{display:inline-block}
.loading .btnText{opacity:.92}

@keyframes spin { to { transform: rotate(360deg);} }

.progress{margin-top:12px; padding-top:12px; border-top:1px solid rgba(255,255,255,.08)}
.progress-top{display:flex; justify-content:space-between; align-items:center}
.progress-label{color:var(--mut)}
.progress-perc{color:var(--pri); font-weight:800}
.bar{height:10px; border-radius:999px; background: rgba(255,255,255,.06); overflow:hidden; margin-top:10px}
.bar-fill{height:100%; width:0%; background: linear-gradient(90deg, rgba(20,198,211,.95), rgba(42,225,185,.92)); border-radius:999px}

.addsite{display:flex; gap:10px; align-items:center}
.input{
  flex:1;
  background: rgba(5,10,22,.75);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding:11px 12px;
  color:var(--txt);
  outline:none;
}
.sites{margin-top:12px; display:flex; flex-direction:column; gap:8px}
.site-item{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(5,10,22,.55);
}
.site-item .domain{font-weight:700}
.site-item .actions{display:flex; gap:8px}
.badge{
  font-size:11px; font-weight:800; letter-spacing:.4px;
  padding:5px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: var(--mut);
}
.badge.ok{border-color: rgba(41,213,140,.18); background: rgba(41,213,140,.10); color: var(--ok)}
.badge.bad{border-color: rgba(255,75,110,.22); background: rgba(255,75,110,.12); color: var(--bad)}
.badge.warn{border-color: rgba(255,176,32,.22); background: rgba(255,176,32,.10); color: var(--warn)}
.badge.unk{border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: var(--mut)}

.table-wrap{overflow:auto; border-radius:16px; border:1px solid rgba(255,255,255,.08)}
.table{width:100%; border-collapse:collapse; min-width:860px; background: rgba(5,10,22,.45)}
.table th,.table td{
  text-align:left; padding:12px 12px; border-bottom:1px solid rgba(255,255,255,.08);
  vertical-align:top;
}
.table th{font-size:12px; letter-spacing:1px; color:var(--mut2)}
.table td{font-size:13px}
.row-empty td{color:var(--mut); padding:18px 12px}
.detail{font-family: var(--mono); font-size:12px; color:rgba(255,255,255,.70); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:420px}

.footer{
  margin-top:18px;
  padding:18px 6px 0;
  border-top:1px solid rgba(255,255,255,.08);
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  color:var(--mut);
}

.dialog{
  border:none;
  background: transparent;
  padding:0;
}
.dialog::backdrop{background: rgba(0,0,0,.55); backdrop-filter: blur(4px)}
.dialog-card{
  width:min(680px, calc(100vw - 30px));
  border-radius: var(--r2);
  background: linear-gradient(180deg, rgba(12,25,50,.95), rgba(7,13,26,.88));
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.dialog-head{display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid rgba(255,255,255,.08)}
.dialog-title{font-weight:900; letter-spacing:.2px}
.dialog-body{padding:16px}
.code{background: rgba(5,10,22,.70); border:1px solid rgba(255,255,255,.10); border-radius: 16px; padding:12px}
.sep{border:none; height:1px; background: rgba(255,255,255,.08); margin:14px 0}
code{font-family: var(--mono); font-size:12px}
