:root{
  --bg:#0b1220;
  --panel:#111827;
  --panel2:#162033;
  --text:#f9fafb;
  --muted:#9ca3af;
  --line:rgba(255,255,255,.09);
  --green:#22c55e;
  --yellow:#f59e0b;
  --red:#ef4444;
  --blue:#60a5fa;
  --violet:#a78bfa;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:radial-gradient(circle at top left,#1f2937 0,#0b1220 42%,#050816 100%);
  color:var(--text);
}

.app-shell{
  width:min(1400px,100%);
  margin:0 auto;
  padding:18px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  padding:22px;
  border:1px solid var(--line);
  border-radius:24px;
  background:linear-gradient(135deg,rgba(255,255,255,.08),rgba(255,255,255,.03));
  box-shadow:0 20px 70px rgba(0,0,0,.25);
}

.eyebrow{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(96,165,250,.15);
  color:#bfdbfe;
  font-weight:700;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

h1,h2,p{margin-top:0}
h1{font-size:32px;margin-bottom:8px}
h2{font-size:19px;margin-bottom:12px}
p{color:var(--muted);line-height:1.55}

.top-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

main{display:grid;gap:16px;margin-top:16px}

.panel{
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(17,24,39,.86);
  padding:18px;
  box-shadow:0 14px 50px rgba(0,0,0,.18);
}

.grid.two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.steps{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}
.steps div{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--line);
  border-radius:18px;
}
.steps strong{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#2563eb;
}

.cards{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:12px;
}
.card{
  padding:16px;
  border-radius:20px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.055);
}
.card .label{color:var(--muted);font-size:13px}
.card .value{font-size:24px;font-weight:800;margin-top:7px}
.card.red{border-color:rgba(239,68,68,.4)}
.card.yellow{border-color:rgba(245,158,11,.45)}
.card.green{border-color:rgba(34,197,94,.4)}
.card.blue{border-color:rgba(96,165,250,.4)}

.btn{
  border:0;
  border-radius:14px;
  padding:11px 14px;
  color:white;
  background:#374151;
  cursor:pointer;
  font-weight:800;
}
.btn:hover{filter:brightness(1.08)}
.btn.primary{background:#2563eb}
.btn.secondary{background:#4b5563}
.btn.danger{background:#991b1b}
.btn.ai{background:#7c3aed}
.btn.small{padding:8px 10px;font-size:12px}
.btn.wide{width:100%;margin-top:14px}

input[type="file"],input{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#0b1220;
  color:var(--text);
  margin:6px 0 12px;
}

label{display:block;color:#d1d5db;font-size:13px;font-weight:800;margin-top:8px}
.hint,.muted{color:var(--muted);font-size:14px}
.hint{
  background:rgba(255,255,255,.04);
  border:1px dashed var(--line);
  padding:12px;
  border-radius:16px;
}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
}
.section-head input{max-width:420px;margin:0}

.table-wrap{overflow:auto}
table{
  width:100%;
  border-collapse:collapse;
  min-width:720px;
}
th,td{
  text-align:left;
  padding:12px 10px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}
th{
  color:#d1d5db;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
td{font-size:14px}
.money{font-weight:900}
.badge{
  display:inline-flex;
  align-items:center;
  padding:6px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
}
.badge.green{background:rgba(34,197,94,.16);color:#86efac}
.badge.yellow{background:rgba(245,158,11,.16);color:#fcd34d}
.badge.red{background:rgba(239,68,68,.16);color:#fca5a5}
.badge.black{background:rgba(255,255,255,.14);color:#e5e7eb}

pre{
  white-space:pre-wrap;
  background:#050816;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  min-height:180px;
  line-height:1.55;
  color:#e5e7eb;
}

@media(max-width:950px){
  .topbar,.grid.two{grid-template-columns:1fr;display:grid}
  .cards{grid-template-columns:repeat(2,1fr)}
  .steps{grid-template-columns:1fr 1fr}
}
@media(max-width:520px){
  .cards,.steps{grid-template-columns:1fr}
  h1{font-size:25px}
  .app-shell{padding:12px}
}
