:root{
  --bg:#000;
  --panel:rgba(255,255,255,0.07);
  --panel2:rgba(255,255,255,0.10);
  --text:#f2f2f2;
  --muted:rgba(255,255,255,0.65);
  --gold1:#f6d365;
  --gold2:#fda085;
  --green:#1fe07a;
  --danger:#ff5c5c;
  --radius:18px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background: radial-gradient(1200px 800px at 50% -10%, rgba(246,211,101,0.18), transparent 55%),
              radial-gradient(900px 600px at 30% 30%, rgba(253,160,133,0.08), transparent 60%),
              #000;
  color:var(--text);
  min-height:100vh;
}
.wrap{max-width:980px;margin:0 auto;padding:24px 16px 40px;}

.hero{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px 16px 8px;text-align:center;}
.logo{
  width:92px;height:92px;border-radius:22px;background:rgba(255,255,255,0.06);
  display:grid;place-items:center;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,0.45);
}
.logo img{width:100%;height:100%;object-fit:cover;}
h1{margin:6px 0 0;font-size:26px;font-weight:750;letter-spacing:0.2px;}
.subtitle{margin:0;color:var(--muted);font-size:13px;}

.tabs{display:flex;gap:10px;justify-content:center;margin:18px 0 18px;}
.tab{
  border:1px solid rgba(255,255,255,0.14);color:var(--text);background:rgba(255,255,255,0.05);
  padding:10px 14px;border-radius:999px;font-weight:800;cursor:pointer;user-select:none;
  min-width:110px;text-align:center;
}
.tab.active{
  border-color:rgba(246,211,101,0.55);
  box-shadow:0 0 0 3px rgba(246,211,101,0.12);
  background:rgba(255,255,255,0.08);
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.05));
  border:1px solid rgba(255,255,255,0.12);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:0 16px 45px rgba(0,0,0,0.45);
}

.total{
  font-size:52px;font-weight:900;letter-spacing:0.3px;color:var(--green);
  line-height:1;margin:0;text-align:center;
}
.total-sub{text-align:center;margin:8px 0 0;color:var(--muted);font-weight:650;}

.section{margin-top:14px;}

.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px;}
.field{display:flex;flex-direction:column;gap:6px;}
label{font-size:12px;color:var(--muted);font-weight:800;letter-spacing:0.3px;}
input, select{
  width:100%;padding:14px 12px;border-radius:14px;border:1px solid rgba(255,255,255,0.14);
  background:rgba(0,0,0,0.35);color:var(--text);outline:none;font-size:16px;
}
input::placeholder{color:rgba(255,255,255,0.35)}
input:focus, select:focus{
  border-color:rgba(246,211,101,0.6);
  box-shadow:0 0 0 3px rgba(246,211,101,0.14);
}
.full{grid-column:1/-1;}

.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.small-note{color:rgba(255,255,255,0.55);font-size:12px;font-weight:650;margin-top:6px;}
.status{color:rgba(255,255,255,0.55);font-size:12px;font-weight:700}

.actions{display:flex;gap:12px;margin-top:14px;flex-wrap:wrap;}
.btn{
  border:none;border-radius:16px;padding:14px 16px;font-weight:900;letter-spacing:0.2px;cursor:pointer;
  flex:1;min-width:160px;
}
.btn.primary{
  background:linear-gradient(90deg, var(--gold1), var(--gold2));
  color:#1a1300;box-shadow:0 14px 30px rgba(246,211,101,0.18);
}
.btn.secondary{
  background:rgba(255,255,255,0.08);color:var(--text);
  border:1px solid rgba(255,255,255,0.14);
}
.btn.danger{
  background:rgba(255,92,92,0.12);color:#ffd7d7;border:1px solid rgba(255,92,92,0.25);
}
.btn.ghost{
  background:transparent;color:rgba(255,255,255,0.8);
  border:1px solid rgba(255,255,255,0.14);
  padding:10px 12px;border-radius:14px;min-width:auto;flex:0;
}
.btn:disabled{opacity:0.5;cursor:not-allowed;}

.seg{
  display:inline-flex;gap:6px;padding:6px;border-radius:999px;
  background:rgba(0,0,0,0.35);border:1px solid rgba(255,255,255,0.12);
}
.seg-mini{padding:4px}
.seg-btn{
  border:none;background:transparent;color:rgba(255,255,255,0.75);
  font-weight:900;padding:10px 14px;border-radius:999px;cursor:pointer;
}
.seg-mini .seg-btn{padding:9px 12px}
.seg-btn.active{
  background:rgba(255,255,255,0.10);
  color:var(--text);
  box-shadow:0 0 0 3px rgba(246,211,101,0.10);
}

.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.chip{
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.85);
  padding:10px 12px;border-radius:999px;font-weight:900;cursor:pointer;
}
.chip.active{
  border-color:rgba(246,211,101,0.55);
  box-shadow:0 0 0 3px rgba(246,211,101,0.12);
  background:rgba(255,255,255,0.09);
  color:var(--text);
}
.chip-btn{
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.85);
  padding:10px 12px;border-radius:999px;font-weight:900;cursor:pointer;
}
.pill{
  display:inline-block;padding:8px 10px;border-radius:999px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  font-weight:850;font-size:12px;
}

.items{margin-top:18px;}
.items-head{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px;}
.items-head h2{margin:0;font-size:16px;letter-spacing:0.2px;}
.hint{color:var(--muted);font-size:12px;font-weight:650;}

.table-wrap{
  overflow:auto;border-radius:14px;border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.28);
}
table{width:100%;border-collapse:collapse;min-width:900px;}
th, td{
  padding:12px 12px;border-bottom:1px solid rgba(255,255,255,0.08);
  text-align:left;white-space:nowrap;font-size:13px;
}
th{
  color:rgba(255,255,255,0.75);
  font-size:12px;letter-spacing:0.35px;text-transform:uppercase;font-weight:900;
  background:rgba(255,255,255,0.04);position:sticky;top:0;z-index:1;
}
td:last-child, th:last-child{text-align:right;}
.remove{
  border:none;background:transparent;color:rgba(255,255,255,0.75);
  font-weight:900;cursor:pointer;padding:6px 8px;border-radius:10px;
}
.remove:hover{background:rgba(255,92,92,0.12);color:#ffd7d7;}

.footer{margin-top:16px;color:rgba(255,255,255,0.55);font-size:12px;text-align:center;font-weight:650;}

@media (max-width:720px){
  .total{font-size:42px;}
  .grid{grid-template-columns:1fr;}
  .btn{min-width:140px;}
  .logo{width:84px;height:84px;}
  table{min-width:860px;}
}

/* Icon inputs */
.icon-input{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width:210px;
}
.icon-input .icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.15);
  font-size:16px;
  flex-shrink:0;
}
.icon-input input,
.icon-input select{
  flex:1;
}

/* ID preview */
.dl-preview-wrap{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:8px;
}
#idPreview{
  display:none;
  width:240px;
  max-width:100%;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.25);
}
