/* Mobile-first, app-like, no horizontal scroll */
:root{
  --bg:#0b0f16;
  --card:#111827;
  --card2:#0f172a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --line:rgba(255,255,255,.08);
  --gold:rgba(255,200,60,.22);
  --gold2:rgba(255,200,60,.45);
}

*{ 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(1000px 800px at 20% 0%, rgba(255,200,60,.06), transparent 55%),
              radial-gradient(900px 700px at 80% 20%, rgba(120,200,255,.05), transparent 60%),
              var(--bg);
  color:var(--text);
  overflow-x:hidden;
}

.app{
  width:100%;
  max-width:720px;
  margin:0 auto;
  padding: 14px 12px 26px;
}

.topbar{
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px 10px 14px;
}

.logo{
  width:44px;height:44px;
  border-radius:12px;
  background: linear-gradient(180deg, rgba(255,200,60,.28), rgba(255,200,60,.12));
  border: 1px solid rgba(255,200,60,.20);
  display:grid;
  place-items:center;
  font-weight:800;
  letter-spacing:.5px;
}

.title{ font-weight:800; font-size:18px; line-height:1.1; }
.subtitle{ color:var(--muted); font-size:13px; margin-top:2px; }

.content{ display:flex; flex-direction:column; gap:12px; }

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 90%), var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow: 0 12px 35px rgba(0,0,0,.35);
}

.card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

.card__title{ font-weight:800; font-size:16px; }

.pill{
  font-size:12px;
  color:rgba(255,200,60,.9);
  background: rgba(255,200,60,.14);
  border:1px solid rgba(255,200,60,.18);
  padding:6px 10px;
  border-radius:999px;
  white-space:nowrap;
}

.grid2{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  margin-bottom:12px;
}

.kv{
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  border-radius:14px;
  padding:12px;
}
.kv__label{ color:var(--muted); font-size:12px; margin-bottom:6px;}
.kv__value{ font-size:16px; font-weight:800; }

.actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.spotGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}

.spotBox{
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  border-radius:14px;
  padding:12px;
}
.spotBox__label{ color:var(--muted); font-size:12px; margin-bottom:8px; }
.spotBox__price{ font-size:18px; font-weight:900; }
.spotBox__sub{ color:var(--muted); margin-top:4px; font-size:13px; }

.formGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}

.itemGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  align-items:end;
}

.field{ display:flex; flex-direction:column; gap:6px; }
.field > span{ color:var(--muted); font-size:12px; }
.input{
  width:100%;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color:var(--text);
  padding:12px 12px;
  outline:none;
}
textarea.input{ resize:vertical; min-height:84px; }

.file{
  width:100%;
  border-radius:12px;
  border:1px solid var(--line);
  padding:10px;
  background: rgba(0,0,0,.25);
  color:var(--text);
}

.uploadBlock{
  border:1px dashed rgba(255,255,255,.14);
  border-radius:14px;
  padding:12px;
  background: rgba(0,0,0,.12);
}
.uploadBlock__head{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px;}
.uploadBlock__title{ font-weight:800; font-size:13px; color:rgba(255,255,255,.9); }
.uploadRow{ display:grid; grid-template-columns: 1fr; gap:10px; align-items:start; }
.preview{
  min-height:84px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  display:grid;
  place-items:center;
  color:var(--muted);
  overflow:hidden;
}
.preview img{ width:100%; height:100%; object-fit:cover; display:block; }

.btn{
  border-radius:12px;
  border:1px solid var(--line);
  padding:12px 12px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight:800;
  cursor:pointer;
  width:100%;
}
.btn:active{ transform: translateY(1px); }

.btn--primary{
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  border:1px solid rgba(255,200,60,.22);
  color: rgba(0,0,0,.9);
}
.btn--ghost{
  background: rgba(255,255,255,.03);
}

.hint{ color:var(--muted); font-size:12px; margin-top:10px; }

.tableWrap{
  margin-top:12px;
  overflow:auto;
  border-radius:14px;
  border:1px solid var(--line);
}
.table{
  width:100%;
  border-collapse:collapse;
  min-width:720px; /* scroll on small screens instead of breaking layout */
  background: rgba(0,0,0,.10);
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  text-align:left;
  font-size:13px;
}
.table th{ color:rgba(255,255,255,.85); font-weight:800; }
.table td{ color:rgba(255,255,255,.9); }
.table .miniBtn{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
}

.totalRow{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:12px;
  align-items:stretch;
}
.total{ font-size:22px; font-weight:900; }
.footerActions{ display:flex; flex-direction:column; gap:10px; }

.footer{
  text-align:center;
  color: rgba(255,255,255,.55);
  font-size:12px;
  padding: 10px 0 4px;
}

/* Larger screens: 2 columns where it makes sense */
@media (min-width: 640px){
  .grid2{ grid-template-columns: 1fr 1fr; }
  .spotGrid{ grid-template-columns: 1fr 1fr; }
  .formGrid{ grid-template-columns: 1fr 1fr; }
  .itemGrid{ grid-template-columns: 1fr 1fr; }
  .actions .btn{ width:auto; }
  .actions .input{ width:auto; }
  .btn{ width:auto; }
  .uploadRow{ grid-template-columns: 1fr 1fr; }
  .totalRow{ flex-direction:row; justify-content:space-between; align-items:center; }
  .footerActions{ flex-direction:row; }
}
