:root{
  --bg:#070a0d;
  --panel:#0b1117;
  --text:#e7f6ff;
  --muted:#a7c6d4;
  --teal:#40e0d0;
  --line:rgba(64,224,208,.18);
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--sans);
  background:
    radial-gradient(1200px 800px at 30% -10%, rgba(64,224,208,.18), transparent 55%),
    radial-gradient(900px 600px at 120% 20%, rgba(64,224,208,.10), transparent 55%),
    var(--bg);
  color:var(--text);
}
.wrap{max-width:1200px;margin:22px auto;padding:16px}
header{
  display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;justify-content:space-between;
  padding:12px 12px 6px;
}
h1{margin:0;font-size:20px;letter-spacing:.2px}
.sub{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.35;max-width:95ch}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%), var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.controls{
  display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;
  padding:10px 12px;border-top:1px solid rgba(255,255,255,.06);
  background:rgba(0,0,0,.10);
}
.left, .right{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
label{
  display:flex;gap:10px;align-items:center;
  color:var(--muted);font-size:12px;user-select:none;cursor:pointer;
}
input[type="checkbox"]{width:auto;accent-color:var(--teal)}
button{
  appearance:none;
  border:1px solid rgba(64,224,208,.28);
  background:rgba(64,224,208,.10);
  color:var(--text);
  padding:9px 11px;
  border-radius:12px;
  cursor:pointer;
  font-weight:750;
  font-size:13px;
  transition:transform .05s ease, background .15s ease, border-color .15s ease;
  user-select:none;
}
button:hover{background:rgba(64,224,208,.16);border-color:rgba(64,224,208,.45)}
button:active{transform:translateY(1px)}
button.ghost{background:transparent;border-color:rgba(255,255,255,.12);color:var(--muted)}
button.danger{
  border-color:rgba(255,107,107,.35);
  background:rgba(255,107,107,.10);
}
button.danger:hover{background:rgba(255,107,107,.16);border-color:rgba(255,107,107,.55)}

input, select{
  width:100%;
  background:rgba(0,0,0,.20);
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  padding:8px 9px;
  border-radius:10px;
  outline:none;
  font-size:13px;
}
input:focus, select:focus{border-color:rgba(64,224,208,.55)}
.num{font-family:var(--mono)}

.section{
  padding:12px;
  border-top:1px solid rgba(255,255,255,.06);
}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.rowTitle{font-weight:850;font-size:13px}
.rowInputs{display:grid;grid-template-columns:1fr 110px;gap:10px;min-width:280px}
.mini{font-size:12px;color:var(--muted);line-height:1.35}

.targetGrid{
  margin-top:10px;
  display:grid;
  grid-template-columns:repeat(4, minmax(160px, 1fr));
  gap:10px;
}
@media (max-width:1000px){
  .targetGrid{grid-template-columns:repeat(2, minmax(160px, 1fr));}
}
.targetCell{
  background:rgba(0,0,0,.14);
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:10px;
}
.tLbl{color:var(--muted);font-size:12px;margin-bottom:6px}

.tablewrap{
  overflow:auto;
  border-top:1px solid rgba(255,255,255,.06);
}
table{width:100%;border-collapse:collapse;font-size:13px}
thead th{
  text-align:left;padding:10px 8px;color:var(--muted);
  font-weight:800;border-bottom:1px solid rgba(64,224,208,.16);
  background:rgba(0,0,0,.08);
  position:sticky; top:0; z-index:2;
  white-space:nowrap;
}
tbody td{padding:10px 8px;border-bottom:1px solid rgba(255,255,255,.06);vertical-align:top}
tbody tr:hover td{background:rgba(64,224,208,.04)}

.solvebar{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:flex-start;
  padding:12px;
  border-top:1px solid rgba(255,255,255,.06);
}
.statusPill{
  font-size:12px;
  font-weight:800;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  color:var(--muted);
  background:rgba(0,0,0,.18);
}
.pillGood{
  border-color:rgba(152,245,166,.35);
  background:rgba(152,245,166,.10);
  color:#98f5a6;
}
.pillOk{
  border-color:rgba(255,214,102,.35);
  background:rgba(255,214,102,.10);
  color:#ffd666;
}
.pillBad{
  border-color:rgba(255,107,107,.35);
  background:rgba(255,107,107,.10);
  color:#ff6b6b;
}

.results{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:12px;
  border-top:1px solid rgba(255,255,255,.06);
}
@media (max-width:900px){.results{grid-template-columns:1fr}}
.box{
  background:rgba(0,0,0,.14);
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:10px 12px;
}
.lbl{color:var(--muted);font-size:12px;margin-bottom:6px}
.out{
  font-family:var(--mono);
  font-size:13px;
  line-height:1.6;
  white-space:pre-wrap;
  word-break:break-word;
}

.status{padding:0 12px 12px;color:var(--muted);font-size:12px}
.good{color:#98f5a6}
.bad{color:#ff6b6b}
