
:root{
  color-scheme:dark;
  --bg:#040d25;
  --bg-top:#0b1d4a;
  --panel:#101c34;
  --panel-soft:#0f1a30;
  --line:#2a3d63;
  --ink:#f4f7ff;
  --muted:#9cb0cf;
  --accent:#9fd2f3;
  --accent-strong:#6db7ec;
  --danger:#c79cab;
  --danger-ink:#1b2235;
  --visible-rows:45;
  --row-height:38px;
  --thead-height:42px;
}

*{box-sizing:border-box}

html,body{min-height:100%}

body{
  margin:0;
  background:radial-gradient(circle at top,#0c1f4e 0,#071431 38%,#030a1e 100%);
  color:var(--ink);
  font:14px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

[hidden]{display:none!important}

.wrap{
  max-width:980px;
  margin:0 auto;
  padding:24px 24px 56px;
}

.panel-toolbar{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin:0 0 16px;
}

.toolbar-form{
  margin:0;
}

.toolbar-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:124px;
  height:36px;
  padding:0 16px;
  border-radius:8px;
  border:1px solid transparent;
  text-decoration:none;
  font:600 13px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease,opacity .15s ease;
}

.toolbar-button-theme{
  border-color:#4d8fd7;
  background:linear-gradient(135deg,#79c2ee,#4d8fd7);
  color:#071226;
}

.toolbar-button-theme:hover{
  background:linear-gradient(135deg,#8bcef3,#5a9ee3);
}

.card{
  background:linear-gradient(180deg,#131f39 0,#101a31 100%);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 10px 30px rgba(2,7,22,.25);
}

.brand{
  font-size:18px;
  font-weight:750;
  letter-spacing:-.4px;
  color:var(--ink);
}

.brand b{
  display:inline-grid;
  place-items:center;
  width:34px;
  height:34px;
  margin-right:8px;
  border-radius:11px;
  background:linear-gradient(135deg,#79c2ee,#4d8fd7);
  color:#071226;
  font-size:15px;
}

.login-wrap{
  max-width:430px;
  margin:10vh auto 0;
}

.login-wrap .brand{
  margin-bottom:26px;
  text-align:center;
}

.login-wrap .card{
  padding:28px;
}

.login-wrap h1{
  margin:0 0 8px;
  font-size:27px;
  line-height:1.2;
}

.lead{
  margin:0 0 22px;
  color:var(--muted);
  font-size:13px;
}

.login-error{
  margin-bottom:18px;
  padding:11px 13px;
  border:1px solid #704654;
  border-radius:9px;
  background:#38202a;
  color:#ffd5d8;
  font-size:13px;
}

.field{
  margin-bottom:14px;
}

label{
  display:block;
  margin:0 0 7px;
  color:#d9e7fb;
  font-size:13px;
  font-weight:650;
}

input,
select{
  width:100%;
  min-width:0;
  height:36px;
  padding:8px 13px;
  border:1px solid #2d4268;
  border-radius:7px;
  background:#0f1a30;
  color:var(--ink);
  font:inherit;
  outline:none;
}

input:focus,
select:focus{
  border-color:var(--accent-strong);
  box-shadow:0 0 0 3px rgba(109,183,236,.14);
}

input:disabled,
select:disabled{
  opacity:.75;
  background:#0d172b;
}

.view-password{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:9px;
  color:var(--muted);
  font-size:12px;
  font-weight:400;
}

.view-password input{
  width:auto;
  height:auto;
  accent-color:var(--accent-strong);
}

.submit{
  width:100%;
  height:36px;
  border:0;
  border-radius:7px;
  background:var(--accent);
  color:#091629;
  font:650 14px/1 system-ui;
  cursor:pointer;
}

.submit:hover:not(:disabled){background:#b3dcf6}
.submit:disabled{opacity:.55;cursor:not-allowed}

.caption{
  margin:18px 0 0;
  text-align:center;
  color:var(--muted);
  font-size:11px;
}

.notice{
  margin-top:10px;
  padding:11px 13px;
  border:1px solid #70552a;
  border-radius:11px;
  background:#332818;
  color:#ffd892;
  font-size:13px;
}

.error{
  margin:10px 0 0;
  color:#ffb8c0;
  font-size:13px;
}

.attack-layout{
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:18px;
  align-items:start;
}

.attack-card,
.tracking-card{
  min-height:374px;
}

.attack-card{
  padding:18px 24px 18px;
}

.panel-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:18px;
}

.panel-title h2,
.progress-head h2{
  margin:0;
  font-size:17px;
  font-weight:650;
  letter-spacing:-.2px;
}

.panel-icon,
.tracking-gear{
  color:var(--accent-strong);
  font-size:16px;
  line-height:1;
}

.layer-switch{
  margin:0 0 16px;
}

.layer-on{
  display:inline-flex;
  align-items:center;
  height:34px;
  padding:0 16px;
  border-radius:999px;
  background:#c2e4f7;
  color:#10213b;
  font-size:13px;
  font-weight:600;
}

#demo-form{
  display:flex;
  flex-direction:column;
  min-height:286px;
}

.compact-field{
  margin-bottom:10px;
}

.slider-field{
  margin:6px 0 0;
}

.range-top{
  display:flex;
  justify-content:flex-start;
  margin-bottom:6px;
}

.range-number{
  display:inline-grid;
  place-items:center;
  min-width:34px;
  height:20px;
  padding:0 8px;
  background:#5ba9e7;
  color:#fff;
  font-size:12px;
  font-weight:700;
}

.range-input{
  height:auto;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  accent-color:#8ec9ef;
  cursor:pointer;
}

.range-ends{
  display:flex;
  justify-content:space-between;
  margin-top:1px;
  color:var(--muted);
  font-size:11px;
}

.help{
  display:block;
  margin-top:8px;
  color:#b4c3da;
  font-size:11px;
}

.start-button{
  margin-top:auto;
}

.tracking-card{
  display:flex;
  flex-direction:column;
  padding:18px;
}

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

.progress-head h2{
  display:flex;
  align-items:center;
  gap:10px;
}

.stop{
  height:36px;
  padding:0 18px;
  border:0;
  border-radius:7px;
  background:var(--danger);
  color:var(--danger-ink);
  font:600 14px/1 system-ui;
  cursor:pointer;
}

.stop:hover:not(:disabled){background:#d8aeba}
.stop:disabled{opacity:.5;cursor:not-allowed}
.stop.stop-used{background:#687182;color:#fff;opacity:1;cursor:not-allowed}

.tracking-progress,
.tracking-card progress,
.stop-feedback{
  display:none;
}

.table-wrap{
  flex:1;
  min-height:0;
  max-height:min(calc(var(--visible-rows) * var(--row-height) + var(--thead-height)), 70vh);
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.table-wrap::-webkit-scrollbar{
  width:0;
  height:0;
}

.tracking-card table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:12px;
}

.track-host{width:31%}
.track-port{width:9%}
.track-time{width:13%}
.track-method{width:20%}
.track-status{width:27%}

.tracking-card th,
.tracking-card td{
  padding:12px 10px;
  border-bottom:1px solid #283a5e;
  text-align:left;
  white-space:nowrap;
}

.tracking-card th{
  color:#a9c1e2;
  font-size:12px;
  font-weight:700;
}

.tracking-card td{
  color:#e8eef8;
  overflow:hidden;
  text-overflow:ellipsis;
}

.target-cell{
  max-width:100%;
}

.status-cell{
  color:#eff4fb;
}

.time-cell{
  font-variant-numeric:tabular-nums;
}

.empty{
  display:grid;
  place-items:center;
  flex:1;
  min-height:180px;
  color:#9aaecb;
  font-size:13px;
  text-align:center;
}

@media(max-width:900px){
  .wrap{padding:20px 16px 36px}
  .attack-layout{grid-template-columns:1fr}
  .attack-card,.tracking-card{min-height:auto}
}

@media(max-width:500px){
  .attack-card,.tracking-card{padding:18px}
  .panel-toolbar{flex-direction:column;align-items:stretch}
  .toolbar-button,.toolbar-form{width:100%}
  .progress-head{align-items:flex-start;flex-direction:column}
  .stop{width:100%}
  .tracking-card th,.tracking-card td{padding-left:8px;padding-right:8px}
}
