* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, system-ui, sans-serif;
  background: #fff;
  color: #222;
}
a { color: inherit; }
h1 { font-weight: 650; letter-spacing: -0.01em; }
.muted { color: #888; font-size: 14px; }
.error { color: #c00; margin: 0; font-size: 14px; }
.ok { color: #18794e; margin: 0; font-size: 14px; }

/* ---- forms & buttons ---- */
.center { min-height: 100vh; display: grid; place-items: center; }
.card { width: min(340px, 90vw); display: flex; flex-direction: column; gap: 14px; }
.card.wide { width: 100%; }
.card h1 { margin: 0 0 8px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
input, textarea {
  padding: 10px 12px; border: 1px solid #ccc; border-radius: 8px;
  font: inherit; font-size: 16px;
}
input:disabled { background: #f5f5f5; color: #555; }
button {
  padding: 11px 18px; border: 0; border-radius: 8px;
  background: #222; color: #fff; font-size: 15px; cursor: pointer;
}
button:disabled { opacity: 0.35; cursor: default; }
button.secondary { background: #eee; color: #222; }
button.link { background: none; color: #222; padding: 0; text-decoration: underline; font-size: 14px; }
.switch { margin: 0; font-size: 14px; text-align: center; color: #666; }
.actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---- header ---- */
header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 14px 24px; border-bottom: 1px solid #eee;
}
.brand { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.user { display: flex; align-items: center; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.pill { background: #222; color: #fff; text-decoration: none; padding: 7px 14px; border-radius: 999px; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }
main.narrow { max-width: 560px; }
.section { margin-top: 40px; font-size: 20px; }

/* ---- boxes ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.box { border: 1px solid #eee; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.box-art {
  aspect-ratio: 4 / 3; border-radius: 8px; background: #f4f4f4;
  display: grid; place-items: center; font-size: 56px; margin-bottom: 12px;
}
.box h3 { margin: 0 0 6px; font-size: 18px; }
.box p { margin: 0 0 14px; font-size: 14px; color: #666; flex: 1; }
.box-foot { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }

dialog { border: 0; border-radius: 14px; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog h2 { margin: 0; }
dialog p { margin: 0; }
#viewer { padding: 0; max-width: 90vw; cursor: zoom-out; }
#viewer img { display: block; max-width: 90vw; max-height: 90vh; }

/* ---- add funds ---- */
.steps { padding-left: 20px; line-height: 1.6; margin-bottom: 28px; }
.steps li { margin-bottom: 10px; }
.address {
  display: flex; gap: 8px; align-items: center;
  background: #f5f5f5; border-radius: 10px; padding: 12px; margin-top: 8px;
}
.address code { flex: 1; word-break: break-all; font-size: 15px; }
.address button { padding: 8px 16px; font-size: 14px; }

/* ---- lists ---- */
.table { display: flex; flex-direction: column; }
.tr {
  display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #f0f0f0; font-size: 15px;
}
.tr.order { grid-template-columns: 1.2fr 1fr 2fr auto; align-items: start; }
.addr { margin: 0; font: inherit; font-size: 14px; white-space: pre-wrap; }
.tag {
  display: inline-block; width: fit-content; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; background: #eee;
}
.tag.pending, .tag.new { background: #fff4d6; color: #8a5a00; }
.tag.approved, .tag.shipped { background: #e3f6ec; color: #18794e; }
.tag.rejected { background: #fde8e8; color: #b42318; }

/* ---- admin deposits ---- */
.cards { display: flex; flex-direction: column; gap: 14px; }
.dep { display: flex; gap: 18px; border: 1px solid #eee; border-radius: 12px; padding: 14px; }
.dep.pending { border-color: #f0d48a; }
.shot { width: 140px; height: 140px; object-fit: cover; border-radius: 8px; cursor: zoom-in; background: #f4f4f4; }
.dep-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dep-info h3, .dep-info p { margin: 0; }
.approve { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 6px; }
.approve label { flex-direction: row; align-items: center; gap: 4px; }
.approve input { width: 110px; padding: 8px; }

@media (max-width: 600px) {
  .tr, .tr.order { grid-template-columns: 1fr 1fr; }
  .dep { flex-direction: column; }
  .shot { width: 100%; height: 200px; }
}
