:root{
  --bg:#0b1220;
  --bg2:#111a2d;
  --card:#111827;
  --card2:#182235;
  --text:#f8fafc;
  --muted:#9fb0cf;
  --line:rgba(255,255,255,.10);
  --primary:#2563eb;
  --primary2:#1d4ed8;
  --danger:#dc2626;
  --success:#16a34a;
  --warning:#b45309;
  --radius:18px;
}
*{box-sizing:border-box}
html{font-size:16px}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,var(--bg) 0%,var(--bg2) 100%);
}
a{color:inherit}
.container{
  width:min(1180px,calc(100% - 24px));
  margin:0 auto;
  padding:16px 0 32px;
}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.brand{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap}
.logo{
  width:52px;height:52px;border-radius:16px;
  background:linear-gradient(135deg,#2563eb,#60a5fa);
  box-shadow:0 10px 30px rgba(37,99,235,.25);
  flex:0 0 auto;
}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(1.2rem,3vw,1.9rem);margin-bottom:4px}
h2{font-size:clamp(1.05rem,2.2vw,1.35rem)}
.kbd,.hint,.help-tip{color:var(--muted);font-size:.93rem;line-height:1.45}
.nav,.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.card{
  background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 12px 34px rgba(0,0,0,.22);
}
.card>header{
  padding:18px 18px 0;
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.card>.content{padding:18px}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:#fff;
  text-decoration:none;
  cursor:pointer;
  white-space:nowrap;
}
button.btn{font:inherit}
.btn:hover{background:rgba(255,255,255,.08)}
.btn.primary{background:var(--primary);border-color:var(--primary2)}
.btn.primary:hover{background:var(--primary2)}
.btn.danger{background:rgba(220,38,38,.18);border-color:rgba(220,38,38,.45)}
.notice{
  border-radius:14px;
  border:1px solid var(--line);
  padding:14px 16px;
  background:rgba(255,255,255,.04);
  margin-bottom:16px;
}
.notice.good{background:rgba(22,163,74,.14);border-color:rgba(22,163,74,.45)}
.notice.bad{background:rgba(220,38,38,.14);border-color:rgba(220,38,38,.45)}
.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:16px}
.table-wrap{width:100%;overflow:auto;border-radius:14px}
.table,.manual-table,.summary-table{
  width:100%;
  min-width:720px;
  border-collapse:collapse;
}
.table th,.table td,.manual-table th,.manual-table td,.summary-table th,.summary-table td{
  padding:12px 10px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
}
.table th,.manual-table th,.summary-table th{font-size:.9rem;color:#dbe6ff;background:rgba(255,255,255,.03)}
.badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  font-size:.85rem;
}
.badge.good{background:rgba(22,163,74,.18);border-color:rgba(22,163,74,.35)}
.footer{color:var(--muted);text-align:center;margin-top:22px;font-size:.9rem}
input,select,textarea{
  width:100%;
  min-width:0;
  background:#0d1526;
  color:#fff;
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  padding:11px 12px;
  outline:none;
}
input::placeholder,textarea::placeholder{color:#91a3c7}
input:focus,select:focus,textarea:focus{border-color:#5b8dff;box-shadow:0 0 0 3px rgba(91,141,255,.16)}
hr{border:none;border-top:1px solid var(--line);margin:16px 0}
.stack-mobile{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.quick-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.quick-stats .item{border:1px solid var(--line);border-radius:14px;padding:14px;background:rgba(255,255,255,.02)}
.quick-stats .num{font-size:1.7rem;font-weight:700;margin-top:6px}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
  margin:18px 0 22px;
}
.stat-card{
  position:relative;
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow:0 12px 28px rgba(0,0,0,.25);
  overflow:hidden;
}
.stat-card::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:.18;
  pointer-events:none;
}
.stat-blue::before{background:linear-gradient(135deg, #3b82f6, transparent 65%)}
.stat-green::before{background:linear-gradient(135deg, #10b981, transparent 65%)}
.stat-gold::before{background:linear-gradient(135deg, #f59e0b, transparent 65%)}
.stat-orange::before{background:linear-gradient(135deg, #f97316, transparent 65%)}
.stat-icon{
  width:52px;
  height:52px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  flex-shrink:0;
}
.stat-info{display:flex;flex-direction:column;min-width:0}
.stat-label{font-size:13px;color:#b9c6db;margin-bottom:6px}
.stat-value{font-size:30px;line-height:1;font-weight:800;color:#ffffff;letter-spacing:-0.5px}

@media (max-width:900px){
  .container{width:min(100%,calc(100% - 18px));padding-top:12px}
  .card>header,.card>.content{padding:14px}
  .btn{width:auto;max-width:100%}
}
@media (max-width:680px){
  html{font-size:15px}
  .topbar{align-items:stretch}
  .nav,.toolbar,.stack-mobile{width:100%}
  .nav .btn,.toolbar .btn,.stack-mobile .btn{flex:1 1 auto}
  .table,.manual-table,.summary-table{min-width:620px}
  .stat-card{padding:15px;border-radius:16px}
  .stat-icon{width:46px;height:46px;font-size:21px}
  .stat-value{font-size:24px}
}
