:root{
  --bg:#0b0e14;
  --card:#121826;
  --muted:#7c879a;
  --text:#e8ecf4;
  --line:#1f2a3a;
  --good:#2dd4bf;
  --warn:#fbbf24;
  --bad:#fb7185;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:18px;
  --pad:16px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: radial-gradient(1200px 600px at 30% -10%, rgba(59,130,246,.25), transparent),
              radial-gradient(1000px 600px at 90% 10%, rgba(45,212,191,.20), transparent),
              var(--bg);
  color:var(--text);
}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px;
  border-bottom:1px solid var(--line);
  backdrop-filter: blur(8px);
  position: sticky; top:0; z-index:5;
  background: rgba(11,14,20,.75);
}
.brand-title{font-size:20px; font-weight:800; letter-spacing:.2px}
.brand-sub{font-size:12px; color:var(--muted); margin-top:2px}
.status{
  font-size:12px; color:var(--muted);
  padding:8px 12px; border:1px solid var(--line); border-radius:999px;
}
.tabs{
  display:flex; gap:8px; padding:10px 14px;
  border-bottom:1px solid var(--line);
  position: sticky; top:68px; z-index:4;
  background: rgba(11,14,20,.75);
  backdrop-filter: blur(8px);
}
.tab{
  cursor:pointer;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-weight:700;
  opacity:.75;
}
.tab.active{background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.35); opacity:1}
.main{padding:18px; max-width:1200px; margin:0 auto;}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:16px}
@media (max-width: 980px){ .grid2{grid-template-columns:1fr}}
.card{
  background: rgba(18,24,38,.88);
  border: 1px solid rgba(31,42,58,.9);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow);
}
h2{margin:0 0 8px 0; font-size:18px}
h3{margin:0 0 10px 0; font-size:14px; color: var(--muted); letter-spacing:.2px; text-transform:uppercase}
.hint{margin:0 0 12px 0; color: var(--muted); font-size:13px; line-height:1.35}
.scanrow{display:flex; gap:10px; align-items:center}
.scan{
  flex:1;
  padding:14px 14px;
  font-size:18px;
  border-radius:14px;
  border:1px solid rgba(31,42,58,.9);
  outline:none;
  background: rgba(7,10,16,.7);
  color: var(--text);
}
.scan:disabled{opacity:.45}
.row{display:flex; gap:10px; margin-top:12px; flex-wrap:wrap}
button{
  cursor:pointer;
  border-radius:14px;
  border:1px solid rgba(31,42,58,.9);
  padding:12px 14px;
  font-weight:800;
  color: var(--text);
  background: rgba(51,65,85,.45);
}
button:disabled{opacity:.45; cursor:not-allowed}
.primary{background: rgba(59,130,246,.22); border-color: rgba(59,130,246,.35)}
.secondary{background: rgba(51,65,85,.35)}
.danger{background: rgba(251,113,133,.16); border-color: rgba(251,113,133,.3)}
.divider{height:1px; background: var(--line); margin:14px 0}
.list{
  display:flex; flex-direction:column; gap:8px;
  max-height: 420px;
  overflow:auto;
  padding-right:6px;
}
.item{
  border:1px solid rgba(31,42,58,.9);
  border-radius:14px;
  padding:12px 12px;
  background: rgba(7,10,16,.55);
  display:flex; justify-content:space-between; gap:10px; align-items:flex-start;
}
.item .left{display:flex; flex-direction:column; gap:4px}
.item .title{font-weight:900; word-break:break-all}
.item .sub{font-size:12px; color:var(--muted)}
.badge{font-size:12px; padding:5px 10px; border-radius:999px; border:1px solid rgba(31,42,58,.9)}
.badge.good{border-color: rgba(45,212,191,.35); background: rgba(45,212,191,.12)}
.badge.warn{border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.12)}
.badge.bad{border-color: rgba(251,113,133,.35); background: rgba(251,113,133,.12)}
.muted{color:var(--muted); font-size:13px}
.rentalBox{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:10px;
  margin-top: 10px;
}
.kpi{
  border:1px solid rgba(31,42,58,.9);
  border-radius:14px;
  padding:10px;
  background: rgba(7,10,16,.55);
}
.kpi-label{font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.25px}
.kpi-value{font-size:16px; font-weight:900; margin-top:6px; word-break:break-all}
.footer{
  padding:18px 22px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:10px;
  color: var(--muted);
  font-size:12px;
}
.panel{display:none}
.panel.active{display:block}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.55);
  z-index: 50;
  padding: 16px;
}
.modal.show{display:flex}
.modal-card{
  width: min(520px, 95vw);
  background: rgba(18,24,38,.98);
  border:1px solid rgba(31,42,58,.9);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.modal-title{font-weight:900; font-size:16px}
.modal-body{margin-top:10px; color: var(--text); font-size:13px; line-height:1.35}
.modal-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:14px}
.fileRow{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
