:root{
  --bg:#07090f;
  --card:#0d1020;
  --card2:#0b0e1a;
  --text:#e7eaff;
  --muted:#a8b0d6;
  --line:rgba(255,255,255,.08);
  --glow:rgba(120,160,255,.18);
  --accent:#9bb0ff;
  --accent2:#66e3ff;
  --danger:#ff6b7a;
  --ok:#68f0b1;

  --radius:18px;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --shadow2: 0 10px 30px rgba(0,0,0,.40);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1000px 700px at 10% 0%, rgba(155,176,255,.18), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(102,227,255,.10), transparent 50%),
    radial-gradient(800px 500px at 50% 100%, rgba(104,240,177,.08), transparent 55%),
    var(--bg);
  color:var(--text);
}

.topbar{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(7,9,15,.92), rgba(7,9,15,.70));
  border-bottom:1px solid var(--line);
  padding:16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.brand{display:flex; align-items:center; gap:12px}
.logo{
  width:44px; height:44px; border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(155,176,255,.30), rgba(102,227,255,.18));
  box-shadow: 0 0 0 1px var(--line), 0 20px 50px rgba(0,0,0,.45);
  font-weight:800;
}
.title{font-weight:800; letter-spacing:.3px}
.subtitle{color:var(--muted); font-size:12px; margin-top:2px}

.topbar-actions{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.search-wrap{min-width:220px; max-width:380px; width:min(40vw,420px)}
.container{max-width:1180px; margin:0 auto; padding:22px 16px 40px}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:16px;
}

.card{
  grid-column: span 6;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13,16,32,.92), rgba(11,14,26,.92));
  box-shadow: var(--shadow2);
  border: 1px solid var(--line);
  overflow:hidden;
  position:relative;
}
.card:before{
  content:"";
  position:absolute; inset:-1px;
  background: radial-gradient(420px 220px at 15% 0%, var(--glow), transparent 50%);
  pointer-events:none;
}

.card-head{
  width:100%;
  text-align:left;
  padding:16px 16px;
  background:transparent;
  color:var(--text);
  border:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
}
.card-head h2{margin:0 0 2px 0; font-size:16px}
.card-head p{margin:0; color:var(--muted); font-size:12px; line-height:1.4}
.chev{
  opacity:.8;
  transition: transform .18s ease;
  font-size:18px;
}
.card.open .chev{transform: rotate(180deg)}
.card-body{
  padding: 0 16px 16px 16px;
  display:none;
}
.card.open .card-body{display:block}

.form-grid{
  margin-top:6px;
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:12px;
}
label{font-size:12px; color:var(--muted); display:flex; flex-direction:column; gap:6px}
.input{
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  color:var(--text);
  padding:10px 10px;
  border-radius: 12px;
  outline:none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
}
.input:focus{
  border-color: rgba(155,176,255,.45);
  box-shadow: 0 0 0 4px rgba(155,176,255,.10);
}
select.input{appearance:none}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}
.btn{
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(155,176,255,.35);
  background: linear-gradient(135deg, rgba(155,176,255,.22), rgba(102,227,255,.14));
  color:var(--text);
  cursor:pointer;
  font-weight:700;
  letter-spacing:.1px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.btn:hover{filter:brightness(1.08)}
.btn:active{transform: translateY(1px)}
.btn-ghost{
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  font-weight:600;
}

.results{
  margin-top:14px;
  border-top:1px dashed var(--line);
  padding-top:12px;
}
.result-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  padding:8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.result-row:last-child{border-bottom:none}
.result-label{color:var(--muted); font-size:12px}
.result-value{font-weight:700}
.result-value.emph{font-size:18px}
.details{
  margin-top:10px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius: 14px;
  padding:10px 12px;
}
.details summary{cursor:pointer; color:var(--text); font-weight:700}
.mini-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:10px;
  margin-top:10px;
}
.chip{
  background: rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.chip span{color:var(--muted); font-size:11px}
.chip strong{font-size:14px}

.table-wrap{overflow:auto; margin-top:10px}
.table{
  width:100%;
  border-collapse:collapse;
  min-width:560px;
}
.table th,.table td{
  padding:9px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size:12px;
  text-align:right;
}
.table th:first-child,.table td:first-child{text-align:left}
.table th{color:var(--muted); font-weight:700}

.toggle-row{
  display:flex;
  gap:8px;
  margin-top:6px;
}
.seg{
  padding:8px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  cursor:pointer;
  font-weight:700;
  font-size:12px;
}
.seg.active{
  color: var(--text);
  border-color: rgba(155,176,255,.45);
  background: rgba(155,176,255,.12);
}

.hidden{display:none !important}
.note{margin-top:10px; color:var(--muted); font-size:12px}

.footer{
  margin-top:22px;
  padding-top:14px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:var(--muted);
  font-size:12px;
}

@media (max-width: 980px){
  .card{grid-column: span 12}
  .mini-grid{grid-template-columns: repeat(2, 1fr)}
  .search-wrap{width:min(80vw,520px)}
}
@media (max-width: 560px){
  .form-grid{grid-template-columns: 1fr}
  .mini-grid{grid-template-columns: 1fr}
}
