/* MNA Storage Tracker — styles (dark + MNA gold) */
:root {
  --bg: #0e0d0c;
  --side: #121110;
  --panel: #171513;
  --panel-2: #1f1c19;
  --line: #2a2622;
  --line-2: #3a342e;
  --text: #ede8e0;
  --muted: #9b948a;
  --gold: #c8ad74;
  --gold-2: #b39a62;
  --gold-ink: #1a1407;
  --red: #e0796d;
  --amber: #e2b45a;
  --blue: #8fb0ef;
  --green: #8cc49a;
  --radius: 10px;
  --side-w: 196px;
  --aged-bg: rgba(255, 140, 140, 0.11);
  --aged-line: #f2a3a3;
  --age-l: 64%;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  background: var(--side);
  border-right: 1px solid var(--line);
  z-index: 30;
}
.brand { display: flex; gap: 9px; align-items: center; text-decoration: none; padding: 2px 4px 14px; }
.brand img { width: 30px; height: 30px; border-radius: 4px; background: #fff; }
.brand b { display: block; font-size: 12.5px; line-height: 1.2; }
.brand small { display: block; font-size: 11px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.nav a svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.nav a:hover { background: var(--panel-2); }
.nav a.on { background: #26221d; }
.nav a.on svg { color: var(--gold); }
.me {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
}
.me span {
  width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center;
  border: 1px solid var(--line-2); font-size: 12px; color: var(--text);
}
.me small { font-size: 12px; }
.view { margin-left: var(--side-w); padding: 28px clamp(24px, 3vw, 48px) 60px; }
.page { max-width: 1240px; margin: 0 auto; }

/* phones: bottom bar */
@media (max-width: 760px) {
  .side {
    inset: auto 0 0 0;
    width: auto;
    height: auto;
    flex-direction: row;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .brand, .me, .side-foot { display: none; }
  .nav { flex-direction: row; justify-content: space-around; width: 100%; gap: 0; }
  .nav a { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 10.5px; flex: 1; text-align: center; min-width: 0; }
  .nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav a svg { width: 21px; height: 21px; }
  .nav a.on { background: none; color: var(--gold); }
  .view { margin-left: 0; padding: calc(14px + env(safe-area-inset-top)) 14px calc(96px + env(safe-area-inset-bottom)); }
  .mobile-top { display: flex !important; }
}
.mobile-top { display: none; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mobile-top .brand { display: flex; padding: 0; }

/* ---------- text & layout ---------- */
h1 { font-size: 21px; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 14px; font-weight: 650; margin: 0; }
.sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head a { font-size: 12px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.panel-head a:hover { color: var(--gold); }
.empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 26px 10px; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 7px 14px;
  border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text);
  font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--gold-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.gold:hover { background: #d5bb83; }
.btn.danger { color: var(--red); border-color: #5a2e29; }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #1d0b09; }
.btn.block { width: 100%; }
.btn.big { min-height: 48px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 760px) { .btn { min-height: 42px; } }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text); }
input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: #13110f;
  color: var(--text);
  font-size: 16px; /* stops iPhone zooming in */
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b948a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
  padding-right: 32px;
}
select option { background: #13110f; }
input[type="date"] { min-height: 40px; }
input::-webkit-date-and-time-value { text-align: left; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 173, 116, 0.18); }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--gold); -webkit-appearance: checkbox; appearance: auto; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.search input { padding-left: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .hide-s { display: none; } .form-grid { grid-template-columns: 1fr; } .form-grid .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- tabs & filters ---------- */
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 12px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs button { border: 0; background: none; padding: 6px 11px; border-radius: 6px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on { background: #2b2620; color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line-2); }
.filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.filters .search { flex: 1 1 220px; max-width: 320px; }
.filters select { width: auto; min-width: 160px; flex: 0 1 200px; }
@media (max-width: 760px) { .filters .search { max-width: none; flex-basis: 100%; } .filters select { flex: 1; } }
.link-btn { border: 0; background: none; color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; padding: 6px; }

/* ---------- home ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { text-decoration: none; display: block; }
.stat:hover { border-color: var(--line-2); }
.stat .label { font-size: 12.5px; color: var(--muted); }
.stat .num { font-size: 26px; font-weight: 650; margin: 14px 0 6px; }
.stat .hint { font-size: 11.5px; color: var(--muted); }
.bars { display: flex; flex-direction: column; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 9px 6px; border-top: 1px solid var(--line); text-decoration: none; }
.bar:first-child { border-top: 0; }
.bar b { font-size: 13px; font-weight: 600; }
.bar .track { grid-column: 1; height: 5px; border-radius: 99px; background: #26231f; overflow: hidden; }
.bar .fill { height: 100%; background: var(--gold); border-radius: 99px; }
.bar .n { grid-row: 1 / 3; grid-column: 2; font-size: 13px; font-weight: 600; }

/* ---------- item rows ---------- */
.list { display: flex; flex-direction: column; }
.item-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 6px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.item-row:first-child { border-top: 0; }
.item-row:hover { background: #1c1916; }
.thumb { width: 46px; height: 46px; border-radius: 7px; object-fit: cover; background: var(--panel-2); display: grid; place-items: center; color: var(--muted); }
.thumb svg { width: 20px; height: 20px; }
.item-row .t { font-weight: 600; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.item-row .m { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.item-row .right { text-align: right; font-size: 12.5px; color: var(--muted); }
@media (max-width: 520px) { .item-row { grid-template-columns: 46px 1fr; } .item-row .right { grid-column: 2; text-align: left; } }
.pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.pill.type { color: var(--gold); border-color: #5a4c30; }
.pill.aged { color: var(--amber); border-color: #5f4a20; background: rgba(226, 180, 90, 0.08); }
.pill.pending { color: var(--blue); border-color: #2f3e5e; background: rgba(143, 176, 239, 0.08); }
.pill.removed { color: var(--red); border-color: #5a2e29; }
.pill.Moved { color: var(--green); border-color: #2f4a36; }
.pill.Disposed { color: var(--red); border-color: #5a2e29; }
.pill.Added { color: var(--gold); border-color: #5a4c30; }

/* ---------- item page ---------- */
.back { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 10px; }
.item-title { font-size: 22px; font-weight: 650; overflow-wrap: anywhere; }
.where { color: var(--gold); font-weight: 600; margin-top: 6px; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.photo { border-radius: 10px; border: 1px solid var(--line); background: var(--panel); aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center; color: var(--muted); font-size: 13px; padding: 0; cursor: zoom-in; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.none { cursor: default; }
.cap { font-size: 12px; color: var(--muted); text-align: center; margin-top: 5px; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.actions-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.notice { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; border: 1px solid; font-size: 14px; }
.notice.pending { border-color: #2f3e5e; background: rgba(143, 176, 239, 0.07); }
.notice.aged { border-color: #5f4a20; background: rgba(226, 180, 90, 0.07); }
.notice.removed { border-color: #5a2e29; background: rgba(224, 121, 109, 0.07); }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 0; }
.details div:last-child { border-bottom: 0; }
@media (max-width: 520px) { .details { grid-template-columns: 1fr; } }
.details div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.details .wide { grid-column: 1 / -1; display: block; }
.details .wide dd { text-align: left; white-space: pre-wrap; margin-top: 4px; }

/* ---------- log ---------- */
.log-row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 11px 6px; border-top: 1px solid var(--line); font-size: 13.5px; }
.log-row:first-child { border-top: 0; }
.log-row .who { text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; }
.log-row .ft { grid-column: 2 / -1; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 520px) { .log-row { grid-template-columns: auto 1fr; } .log-row .who { grid-column: 2; text-align: left; } }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 9px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #1c1916; }
.table .num { width: 1%; white-space: nowrap; text-align: center; }
.table-wrap { padding: 0; overflow-x: auto; }
@media (max-width: 760px) {
  .table.stackable thead { display: none; }
  .table.stackable tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 8px; border-bottom: 1px solid var(--line); }
  .table.stackable td { border: 0; padding: 2px 0; }
  .table.stackable td.hide-m { display: none; }
}

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.66);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
}
.modal {
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; }
.modal-body { padding: 8px 16px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #141210; border-radius: 0 0 12px 12px; }
.x { border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 8px; }
@media (max-width: 520px) {
  .modal-back { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 92dvh; border-radius: 14px 14px 0 0; }
  .modal-foot { border-radius: 0; }
  .modal-foot .btn { flex: 1; }
}
.modal.zoom { width: min(900px, 100%); }
.modal.zoom img { max-height: 75dvh; width: 100%; object-fit: contain; }
.photo-pick { position: relative; display: block; border: 1px dashed var(--line-2); border-radius: 8px; aspect-ratio: 4 / 3; overflow: hidden; background: #13110f; cursor: pointer; }
.photo-pick span { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12.5px; font-weight: 500; padding: 8px; }
.photo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.photo-pick .clear { position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; border-radius: 99px; border: 0; background: rgba(0, 0, 0, 0.7); color: #fff; cursor: pointer; }

/* ---------- scan ---------- */
.scan-box { max-width: 380px; margin: 0 auto; }
.camera { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; }
.camera video { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera .frame { position: absolute; inset: 18%; border: 2px solid var(--gold); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35); }
.scan-msg { font-size: 13.5px; color: var(--muted); margin: 10px 0; }
.scan-msg.bad { color: var(--red); }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login-card .field { text-align: left; }
.login-logo { width: 72px; height: 72px; margin: 0 auto; border-radius: 6px; background: #fff; }
.error { color: var(--red); min-height: 1.2em; margin: 0; font-size: 13.5px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 80; padding: 10px 16px; border-radius: 9px;
  background: var(--gold); color: var(--gold-ink); font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); max-width: 92vw;
}
.toast.bad { background: var(--red); color: #1d0b09; }
@media (min-width: 761px) { .toast { bottom: 24px; } }

/* ---------- labels (4x6 thermal) ---------- */
.label-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tag {
  /* On screen: a preview. On paper: 3.6in × 5.4in, centred on a 4×6 sticker. */
  background: #fff; color: #000;
  border: 2px solid #000;
  padding: 10px 12px 12px;
  font-family: Arial, Helvetica, sans-serif;
  display: flex; flex-direction: column; align-items: stretch;
}
.tag .kind { border-top: 3px double #000; border-bottom: 3px double #000; text-align: center; font-weight: 800; letter-spacing: 0.14em; font-size: 15px; padding: 3px 0; margin-bottom: 8px; text-transform: uppercase; }
.tag .qr svg { display: block; width: 78%; height: auto; margin: 0 auto; }
.tag .name { text-align: center; font-weight: 700; font-size: 15px; margin: 6px 0 8px; line-height: 1.2; overflow-wrap: anywhere; }
.tag dl { margin: 0; font-size: 12px; }
.tag dl div { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }
.tag dt { margin: 0; }
.tag dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.tag .id { text-align: center; font-size: 10px; margin-top: 6px; letter-spacing: 0.08em; }
.print-area { display: none; }

@media print {
  @page { size: 4in 6in; margin: 0; }
  html, body { background: #fff !important; }
  #app, #login, #modal-root, .toast { display: none !important; }
  .print-area { display: block; }
  .print-area .sheet { width: 4in; height: 6in; display: flex; align-items: center; justify-content: center; page-break-after: always; break-after: page; overflow: hidden; }
  .print-area .sheet:last-child { page-break-after: auto; break-after: auto; }
  .print-area .tag { width: 3.6in; height: 5.4in; padding: 0.14in 0.18in; justify-content: center; }
  .print-area .tag .kind { font-size: 20pt; }
  .print-area .tag .qr svg { width: 2.7in; }
  .print-area .tag .name { font-size: 15pt; }
  .print-area .tag dl { font-size: 11pt; }
  .print-area .tag .id { font-size: 9pt; }
}

.nav a .short { display: none; }
@media (max-width: 760px) { .nav a .long { display: none; } .nav a .short { display: inline; } .nav a:hover { background: none; } }

/* ---------- aged-out highlight & age colour ---------- */
.item-row.aged { background: var(--aged-bg); box-shadow: inset 3px 0 0 var(--aged-line); border-radius: 6px; }
.item-row.aged:hover { background: var(--aged-bg); filter: brightness(1.1); }
.pill.age { color: hsl(var(--h) 70% var(--age-l)); border-color: hsl(var(--h) 55% 40% / 0.7); background: hsl(var(--h) 70% 50% / 0.08); }
.age-val { color: hsl(var(--h) 70% var(--age-l)); font-weight: 700; }
.age-bar { display: inline-block; vertical-align: middle; width: 70px; height: 6px; margin-left: 8px; border-radius: 99px; background: rgba(127, 127, 127, 0.25); overflow: hidden; }
.age-bar span { display: block; height: 100%; background: hsl(var(--h) 70% 55%); border-radius: 99px; }

/* ---------- theme slider ---------- */
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-foot .me { margin-top: 0; }
.theme-switch { width: 172px; padding: 2px 4px; }
.theme-switch input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; min-height: 0; padding: 0; margin: 0; background: transparent; border: 0; box-shadow: none; cursor: pointer; }
.theme-switch input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, #007aff, #ff2d95 20%, #f28c28 40%, #ff3ea5 60%, #2ff3e0 80%, var(--gold)); }
.theme-switch input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, #007aff, #ff2d95 20%, #f28c28 40%, #ff3ea5 60%, #2ff3e0 80%, var(--gold)); }
.theme-switch input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -6px; border-radius: 99px; background: #fff; border: 2px solid #000; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.theme-switch input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 99px; background: #fff; border: 2px solid #000; }
.theme-ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 1px; }
.mobile-top .theme-switch { width: 150px; flex: none; }
.side-foot .me small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =====================================================================
   80s THEME — retrowave. Same layout and buttons, different look.
   ===================================================================== */
html[data-theme="80s"] {
  --bg: #12052a; --side: #0d031f; --panel: rgba(28, 8, 58, 0.82); --panel-2: #2a0f55;
  --line: #4a1f7a; --line-2: #6b2fa8; --text: #fbeaff; --muted: #c6a6ec;
  --gold: #ff3ea5; --gold-2: #2ff3e0; --gold-ink: #12052a;
  --red: #ff5a7a; --amber: #ffd36e; --blue: #2ff3e0; --green: #6dffb0;
  --aged-bg: rgba(255, 90, 140, 0.16); --aged-line: #ff7aa8; --age-l: 66%;
  --font: "Orbitron", "Trebuchet MS", sans-serif;
}
html[data-theme="80s"] body {
  background:
    linear-gradient(180deg, rgba(18,5,42,0) 60%, rgba(18,5,42,0.4)),
    radial-gradient(ellipse at 50% 100%, #5a1678 0%, #12052a 60%) fixed;
  font-size: 13.5px; letter-spacing: 0.02em;
}
html[data-theme="80s"] body::before {
  content: ""; position: fixed; left: -50%; right: -50%; bottom: 0; height: 42vh; z-index: -1; pointer-events: none;
  background:
    linear-gradient(#ff3ea5 2px, transparent 2px) 0 0 / 100% 46px,
    linear-gradient(90deg, #ff3ea5 2px, transparent 2px) 0 0 / 80px 100%;
  opacity: 0.22; transform: perspective(300px) rotateX(62deg); transform-origin: bottom;
  -webkit-mask-image: linear-gradient(transparent, #000 60%); mask-image: linear-gradient(transparent, #000 60%);
}
html[data-theme="80s"] .shell, html[data-theme="80s"] .view { position: relative; }
html[data-theme="80s"] h1, html[data-theme="80s"] .item-title {
  background: linear-gradient(180deg, #ffd36e, #ff3ea5 55%, #b14cff); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-transform: uppercase; letter-spacing: 0.08em; filter: drop-shadow(0 0 10px rgba(255,62,165,.45));
}
html[data-theme="80s"] h2 { color: #2ff3e0; text-transform: uppercase; letter-spacing: 0.1em; text-shadow: 0 0 10px rgba(47,243,224,.5); }
html[data-theme="80s"] .panel { border-color: #6b2fa8; box-shadow: 0 0 22px -8px #ff3ea5, inset 0 0 20px -14px #2ff3e0; backdrop-filter: blur(4px); }
html[data-theme="80s"] .side { background: rgba(13, 3, 31, 0.92); border-color: #ff3ea5; box-shadow: 0 0 24px -8px #ff3ea5; }
html[data-theme="80s"] .brand b { color: #2ff3e0; text-shadow: 0 0 8px #2ff3e0; }
html[data-theme="80s"] .nav a.on { background: rgba(255, 62, 165, 0.18); box-shadow: inset 2px 0 0 #ff3ea5; }
html[data-theme="80s"] .nav a.on svg { color: #2ff3e0; filter: drop-shadow(0 0 4px #2ff3e0); }
html[data-theme="80s"] .btn { border-color: #6b2fa8; background: rgba(42, 15, 85, 0.8); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
html[data-theme="80s"] .btn:hover { border-color: #2ff3e0; box-shadow: 0 0 14px -4px #2ff3e0; }
html[data-theme="80s"] .btn.gold { background: linear-gradient(90deg, #ff3ea5, #b14cff); border-color: transparent; color: #fff; text-shadow: 0 0 6px rgba(0,0,0,.4); box-shadow: 0 0 18px -4px #ff3ea5; }
html[data-theme="80s"] .btn.danger.solid { background: #ff5a7a; color: #12052a; }
html[data-theme="80s"] input, html[data-theme="80s"] select, html[data-theme="80s"] textarea { background-color: rgba(10, 2, 25, 0.8); border-color: #6b2fa8; font-family: "Trebuchet MS", sans-serif; }
html[data-theme="80s"] input:focus, html[data-theme="80s"] select:focus, html[data-theme="80s"] textarea:focus { border-color: #2ff3e0; box-shadow: 0 0 0 3px rgba(47,243,224,.2); }
html[data-theme="80s"] .stat .num { color: #2ff3e0; text-shadow: 0 0 12px #2ff3e0; font-size: 30px; }
html[data-theme="80s"] .bar .fill { background: linear-gradient(90deg, #2ff3e0, #ff3ea5); box-shadow: 0 0 8px #ff3ea5; }
html[data-theme="80s"] .bar .track { background: rgba(255,255,255,.08); }
html[data-theme="80s"] .tabs { background: rgba(13,3,31,.8); border-color: #6b2fa8; }
html[data-theme="80s"] .tabs button.on { background: #ff3ea5; color: #12052a; box-shadow: 0 0 12px -2px #ff3ea5; }
html[data-theme="80s"] .item-row:hover, html[data-theme="80s"] .table tr.click:hover td { background: rgba(47, 243, 224, 0.06); }
html[data-theme="80s"] .where { color: #2ff3e0; text-shadow: 0 0 8px rgba(47,243,224,.5); }
html[data-theme="80s"] .pill.type { color: #ffd36e; border-color: #7a5a20; }
html[data-theme="80s"] .modal { background: #1a0838; border-color: #ff3ea5; box-shadow: 0 0 40px -8px #ff3ea5; }
html[data-theme="80s"] .modal-foot { background: #130530; }
html[data-theme="80s"] .toast { background: #2ff3e0; color: #12052a; box-shadow: 0 0 24px #2ff3e0; }
html[data-theme="80s"] .brand img, html[data-theme="80s"] .login-logo { box-shadow: 0 0 14px #ff3ea5; }
html[data-theme="80s"] .theme-ticks span:first-child { color: #ff3ea5; text-shadow: 0 0 6px #ff3ea5; }

/* =====================================================================
   90s THEME — early-web / GeoCities. Same layout and buttons, different look.
   ===================================================================== */
html[data-theme="90s"] {
  --bg: #000080; --side: #c0c0c0; --panel: #ffffff; --panel-2: #c0c0c0;
  --line: #808080; --line-2: #808080; --text: #000000; --muted: #333366;
  --gold: #ff00ff; --gold-2: #0000ee; --gold-ink: #ffffff;
  --red: #cc0000; --amber: #996600; --blue: #0000cc; --green: #006600;
  --aged-bg: #ffd6d6; --aged-line: #ff6666; --age-l: 36%;
  --radius: 0px;
  --font: "Comic Sans MS", "Comic Neue", "Chalkboard SE", "Trebuchet MS", cursive;
}
html[data-theme="90s"] body {
  background-color: #000080;
  background-image:
    radial-gradient(#ffffff 1px, transparent 1.5px),
    radial-gradient(#ffff66 1px, transparent 1.5px);
  background-size: 60px 60px, 97px 97px;
  background-position: 0 0, 30px 40px;
}
html[data-theme="90s"] a { color: #0000ee; }
html[data-theme="90s"] .page > * { position: relative; }
html[data-theme="90s"] h1, html[data-theme="90s"] .item-title {
  font-family: "Times New Roman", Times, serif; font-size: 30px; font-weight: 700; letter-spacing: 0;
  background: linear-gradient(90deg, #ff0000, #ff9900, #ffff00, #00cc00, #00ccff, #6633ff, #ff00ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 0.5px #000; text-shadow: none;
}
html[data-theme="90s"] .head h1 { padding: 4px 0; }
html[data-theme="90s"] .head { background: #ffff99; border: 3px ridge #c0c0c0; padding: 8px 12px; }
html[data-theme="90s"] .head .sub, html[data-theme="90s"] .head h1 + .sub { color: #000; }
html[data-theme="90s"] h2 { color: #800080; font-family: "Times New Roman", Times, serif; font-size: 17px; text-decoration: underline; }
html[data-theme="90s"] .sub { color: #333366; }
html[data-theme="90s"] .panel { background: #fff; border: 3px outset #c0c0c0; box-shadow: 4px 4px 0 #000; }
html[data-theme="90s"] .side { background: #c0c0c0; border-right: 3px outset #ffffff; }
html[data-theme="90s"] .brand b, html[data-theme="90s"] .brand small { color: #000; }
html[data-theme="90s"] .nav a { color: #0000ee; text-decoration: underline; font-weight: 700; }
html[data-theme="90s"] .nav a svg { color: #000; }
html[data-theme="90s"] .nav a:hover { background: #ffff00; }
html[data-theme="90s"] .nav a.on { background: #000080; color: #ffff00; text-decoration: none; }
html[data-theme="90s"] .nav a.on svg { color: #ffff00; }
html[data-theme="90s"] .btn {
  background: #c0c0c0; color: #000; border: 2px outset #ffffff; border-radius: 0;
  font-family: "MS Sans Serif", Tahoma, Verdana, sans-serif; font-weight: 700; box-shadow: 1px 1px 0 #000;
}
html[data-theme="90s"] .btn:hover { border-color: #ffffff; background: #d4d0c8; }
html[data-theme="90s"] .btn:active { border-style: inset; }
html[data-theme="90s"] .btn.gold { background: #ff00ff; color: #ffff00; border: 3px outset #ff99ff; text-shadow: 1px 1px 0 #000; }
html[data-theme="90s"] .btn.danger { color: #cc0000; }
html[data-theme="90s"] .btn.danger.solid { background: #cc0000; color: #fff; border-color: #ff6666; }
html[data-theme="90s"] input, html[data-theme="90s"] select, html[data-theme="90s"] textarea {
  background-color: #fff; color: #000; border: 2px inset #ffffff; border-radius: 0; box-shadow: inset 1px 1px 0 #808080;
  font-family: "Courier New", Courier, monospace;
}
html[data-theme="90s"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M6 9h12l-6 7z'/%3E%3C/svg%3E"); }
html[data-theme="90s"] input:focus, html[data-theme="90s"] select:focus, html[data-theme="90s"] textarea:focus { border-color: #ffffff; box-shadow: 0 0 0 2px #ff00ff; }
html[data-theme="90s"] .search svg { color: #000; }
html[data-theme="90s"] .tabs { background: #c0c0c0; border: 2px outset #fff; border-radius: 0; }
html[data-theme="90s"] .tabs button { color: #000; border-radius: 0; font-weight: 700; }
html[data-theme="90s"] .tabs button.on { background: #fff; border: 2px inset #fff; box-shadow: none; color: #000080; }
html[data-theme="90s"] .stat .num { font-family: "Courier New", monospace; color: #00ff00; background: #000; display: inline-block; padding: 2px 10px; border: 2px inset #808080; letter-spacing: 0.1em; }
html[data-theme="90s"] .stat .label { color: #800080; font-weight: 700; }
html[data-theme="90s"] .bar .track { background: #c0c0c0; border: 1px inset #fff; border-radius: 0; height: 10px; }
html[data-theme="90s"] .bar .fill { border-radius: 0; background: repeating-linear-gradient(90deg, #000080 0 8px, #c0c0c0 8px 10px); }
html[data-theme="90s"] .item-row:hover, html[data-theme="90s"] .table tr.click:hover td { background: #ffff99; }
html[data-theme="90s"] .item-row.aged { box-shadow: inset 4px 0 0 #ff0000; border-radius: 0; }
html[data-theme="90s"] .thumb { background: #c0c0c0; border: 2px inset #fff; border-radius: 0; color: #000; }
html[data-theme="90s"] .where { color: #008000; font-family: "Courier New", monospace; }
html[data-theme="90s"] .pill { border-radius: 0; border: 1px solid #000; color: #000; background: #c0c0c0; }
html[data-theme="90s"] .pill.type { background: #00ffff; }
html[data-theme="90s"] .pill.aged { background: #ff9999; color: #000; }
html[data-theme="90s"] .pill.pending { background: #99ccff; color: #000; }
html[data-theme="90s"] .pill.age { color: hsl(var(--h) 90% 25%); background: hsl(var(--h) 80% 85%); border-color: #000; }
html[data-theme="90s"] .pill.Moved { background: #99ff99; } html[data-theme="90s"] .pill.Disposed { background: #ff9999; } html[data-theme="90s"] .pill.Added { background: #ffff66; }
html[data-theme="90s"] .notice { border-radius: 0; border: 3px double #000; color: #000; }
html[data-theme="90s"] .notice.pending { background: #ccffff; } html[data-theme="90s"] .notice.aged { background: #ffcccc; } html[data-theme="90s"] .notice.removed { background: #ffcccc; }
html[data-theme="90s"] .photo, html[data-theme="90s"] .photo-pick { border: 2px inset #fff; border-radius: 0; background: #c0c0c0; color: #000; }
html[data-theme="90s"] .cap, html[data-theme="90s"] .details dt { color: #000080; }
html[data-theme="90s"] .details div, html[data-theme="90s"] .table td, html[data-theme="90s"] .table th, html[data-theme="90s"] .bar, html[data-theme="90s"] .item-row, html[data-theme="90s"] .log-row { border-color: #c0c0c0; }
html[data-theme="90s"] .table th { background: #000080; color: #fff; }
html[data-theme="90s"] .modal { background: #c0c0c0; border: 3px outset #fff; border-radius: 0; box-shadow: 6px 6px 0 #000; }
html[data-theme="90s"] .modal-head { background: linear-gradient(90deg, #000080, #1084d0); padding: 6px 10px; }
html[data-theme="90s"] .modal-head h2 { color: #fff; text-decoration: none; font-family: Tahoma, sans-serif; font-size: 14px; }
html[data-theme="90s"] .modal-head .x { background: #c0c0c0; border: 2px outset #fff; color: #000; font-weight: 700; line-height: 1; padding: 0 6px; }
html[data-theme="90s"] .modal-foot { background: #c0c0c0; border-top: 2px groove #fff; border-radius: 0; }
html[data-theme="90s"] .modal-back { background: rgba(0, 128, 128, 0.7); }
html[data-theme="90s"] .field { color: #000; }
html[data-theme="90s"] .toast { background: #ffff00; color: #000; border: 3px outset #fff; border-radius: 0; }
html[data-theme="90s"] .login { background: transparent; }
html[data-theme="90s"] .login-card { background: #c0c0c0; border: 3px outset #fff; padding: 20px; box-shadow: 6px 6px 0 #000; }
html[data-theme="90s"] .login-card h1 { font-size: 24px; }
html[data-theme="90s"] .empty { color: #000; }
html[data-theme="90s"] .empty b { color: #ff0000; font-family: "Times New Roman", serif; font-size: 16px; }
html[data-theme="90s"] .me span { border: 2px outset #fff; background: #c0c0c0; color: #000; border-radius: 0; }
html[data-theme="90s"] .me small, html[data-theme="90s"] .theme-ticks { color: #000; font-weight: 700; }
html[data-theme="90s"] .theme-switch input[type="range"]::-webkit-slider-runnable-track { background: #fff; border: 2px inset #fff; border-radius: 0; }
html[data-theme="90s"] .theme-switch input[type="range"]::-webkit-slider-thumb { border-radius: 0; background: #c0c0c0; border: 2px outset #fff; }
html[data-theme="90s"] .back { color: #0000ee; text-decoration: underline; }
html[data-theme="90s"] .page::after {
  content: "★ Best viewed in Netscape Navigator 4.0 at 800×600 ★  You are visitor #000427 ★";
  display: block; text-align: center; color: #ffff00; font-family: "Times New Roman", serif; font-size: 13px; margin-top: 24px;
}
@media (max-width: 760px) {
  html[data-theme="90s"] .side { border-right: 0; border-top: 3px outset #fff; }
  html[data-theme="90s"] .nav a { text-decoration: none; color: #000; }
  html[data-theme="90s"] .nav a.on { color: #ffff00; }
  html[data-theme="90s"] .mobile-top { background: #c0c0c0; border: 3px outset #fff; padding: 6px 8px; }
  html[data-theme="90s"] .mobile-top .brand b, html[data-theme="90s"] .mobile-top .brand small { color: #000; }
  html[data-theme="80s"] .side { border-top: 1px solid #ff3ea5; }
  html[data-theme="80s"] .nav a.on { box-shadow: none; }
}
@media print { html[data-theme] body::before, .page::after { display: none !important; } html[data-theme] body { background: #fff !important; } }

html[data-theme="90s"] #list > .sub { color: #ffff00; }
@media (max-width: 760px) { .side .side-foot { display: none; } }

/* ---------- ··· menu ---------- */
.menu { position: absolute; z-index: 70; min-width: 170px; padding: 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.menu button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 7px; font-size: 14px; cursor: pointer; color: var(--text); }
.menu button:hover:not(:disabled) { background: var(--panel-2); }
.menu button.danger { color: var(--red); }
.menu button:disabled { color: var(--muted); opacity: .55; cursor: not-allowed; }
.menu button small { display: block; font-size: 11px; color: var(--muted); }
.theme-ticks { font-size: 9.5px; }

/* =====================================================================
   60s THEME — mod / psychedelic pop art.
   ===================================================================== */
html[data-theme="60s"] {
  --bg: #fdf6e3; --side: #111111; --panel: #ffffff; --panel-2: #ffe8f3;
  --line: #111111; --line-2: #111111; --text: #111111; --muted: #5a4a6a;
  --gold: #ff2d95; --gold-2: #ff8a00; --gold-ink: #ffffff;
  --red: #d61f3c; --amber: #c77700; --blue: #1f5fd6; --green: #138a3b;
  --aged-bg: #ffd3d9; --aged-line: #ff5c7a; --age-l: 36%;
  --radius: 22px;
  --font: "Futura", "Century Gothic", "Avenir Next", "Trebuchet MS", sans-serif;
}
html[data-theme="60s"] body {
  background-color: #fdf6e3;
  background-image:
    radial-gradient(circle at 0 0, transparent 38px, #ff2d95 39px 52px, transparent 53px 70px, #ff8a00 71px 84px, transparent 85px 102px, #ffd400 103px 116px, transparent 117px),
    radial-gradient(circle at 100% 100%, transparent 38px, #00b3a6 39px 52px, transparent 53px 70px, #7b2ff7 71px 84px, transparent 85px 102px, #ff2d95 103px 116px, transparent 117px);
  background-size: 240px 240px;
  background-attachment: fixed;
}
html[data-theme="60s"] .view::before { content: ""; position: fixed; inset: 0; background: rgba(253, 246, 227, 0.82); z-index: -1; }
html[data-theme="60s"] .view { position: relative; z-index: 0; }
html[data-theme="60s"] h1, html[data-theme="60s"] .item-title {
  font-family: "Monoton", "Shrikhand", "Futura", sans-serif; font-weight: 400; font-size: 30px; letter-spacing: 0.04em;
  color: #ff2d95; text-shadow: 3px 3px 0 #ffd400, 6px 6px 0 #00b3a6;
}
html[data-theme="60s"] h2 { font-family: "Righteous", "Futura", sans-serif; font-weight: 400; color: #7b2ff7; letter-spacing: 0.04em; font-size: 16px; }
html[data-theme="60s"] .panel { border: 3px solid #111; box-shadow: 6px 6px 0 #ff8a00; }
html[data-theme="60s"] .side { background: #111; border-right: 6px solid; border-image: linear-gradient(#ff2d95, #ff8a00, #ffd400, #00b3a6, #7b2ff7) 1; }
html[data-theme="60s"] .brand b { color: #ffd400; } html[data-theme="60s"] .brand small, html[data-theme="60s"] .me small { color: #ddd; }
html[data-theme="60s"] .nav a { color: #fff; font-family: "Righteous", "Futura", sans-serif; font-weight: 400; letter-spacing: 0.03em; border-radius: 99px; }
html[data-theme="60s"] .nav a svg { color: #ffd400; }
html[data-theme="60s"] .nav a:hover { background: #333; }
html[data-theme="60s"] .nav a.on { background: #ff2d95; color: #fff; }
html[data-theme="60s"] .nav a.on svg { color: #fff; }
html[data-theme="60s"] .btn { border: 3px solid #111; border-radius: 99px; background: #fff; color: #111; font-family: "Righteous", "Futura", sans-serif; font-weight: 400; letter-spacing: 0.03em; box-shadow: 3px 3px 0 #111; }
html[data-theme="60s"] .btn:hover { border-color: #111; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #111; }
html[data-theme="60s"] .btn.gold { background: #ff2d95; color: #fff; }
html[data-theme="60s"] .btn.danger { color: #d61f3c; } html[data-theme="60s"] .btn.danger.solid { background: #d61f3c; color: #fff; }
html[data-theme="60s"] input, html[data-theme="60s"] select, html[data-theme="60s"] textarea { background-color: #fff; color: #111; border: 3px solid #111; border-radius: 14px; }
html[data-theme="60s"] input:focus, html[data-theme="60s"] select:focus, html[data-theme="60s"] textarea:focus { border-color: #ff2d95; box-shadow: 0 0 0 4px #ffd400; }
html[data-theme="60s"] .tabs { background: #fff; border: 3px solid #111; border-radius: 99px; }
html[data-theme="60s"] .tabs button { border-radius: 99px; color: #111; font-family: "Righteous", sans-serif; }
html[data-theme="60s"] .tabs button.on { background: #00b3a6; color: #fff; box-shadow: none; }
html[data-theme="60s"] .stat:nth-child(1) { background: #ffd400; } html[data-theme="60s"] .stat:nth-child(2) { background: #ff8a00; }
html[data-theme="60s"] .stat:nth-child(3) { background: #00b3a6; } html[data-theme="60s"] .stat:nth-child(4) { background: #ff2d95; }
html[data-theme="60s"] .stat .label, html[data-theme="60s"] .stat .hint { color: #111; }
html[data-theme="60s"] .stat .num { font-family: "Shrikhand", "Cooper Black", serif; font-size: 34px; color: #fff; -webkit-text-stroke: 2px #111; }
html[data-theme="60s"] .bar .track { background: #eee; border: 2px solid #111; height: 10px; }
html[data-theme="60s"] .bar .fill { background: repeating-linear-gradient(90deg, #ff2d95 0 12px, #ff8a00 12px 24px, #ffd400 24px 36px, #00b3a6 36px 48px); }
html[data-theme="60s"] .item-row:hover, html[data-theme="60s"] .table tr.click:hover td { background: #fff3c4; }
html[data-theme="60s"] .item-row.aged { border-radius: 16px; }
html[data-theme="60s"] .thumb { background: #ffd400; color: #111; border: 2px solid #111; border-radius: 50%; }
html[data-theme="60s"] .where { color: #7b2ff7; }
html[data-theme="60s"] .pill { border: 2px solid #111; color: #111; background: #fff; }
html[data-theme="60s"] .pill.type { background: #ffd400; } html[data-theme="60s"] .pill.aged { background: #ff8fa3; color: #111; } html[data-theme="60s"] .pill.pending { background: #9fd8ff; color: #111; }
html[data-theme="60s"] .pill.age { color: hsl(var(--h) 90% 25%); background: hsl(var(--h) 80% 85%); border-color: #111; }
html[data-theme="60s"] .table th { color: #7b2ff7; font-family: "Righteous", sans-serif; font-weight: 400; }
html[data-theme="60s"] .modal { background: #fff; border: 4px solid #111; border-radius: 26px; box-shadow: 10px 10px 0 #ff2d95; }
html[data-theme="60s"] .modal-foot { background: #fff3c4; border-radius: 0 0 22px 22px; border-top: 3px solid #111; }
html[data-theme="60s"] .toast { background: #ffd400; color: #111; border: 3px solid #111; }
html[data-theme="60s"] .notice { border-width: 3px; color: #111; }
html[data-theme="60s"] .theme-ticks span:nth-child(1) { color: #ff2d95; font-weight: 700; }
html[data-theme="60s"] .theme-ticks { color: #ddd; }
html[data-theme="60s"] .menu { border: 3px solid #111; }

/* =====================================================================
   70s THEME — earthy, groovy, rainbow stripes.
   ===================================================================== */
html[data-theme="70s"] {
  --bg: #f3e3c3; --side: #4a2c17; --panel: #fbf1dc; --panel-2: #f0dcb4;
  --line: #c9a26b; --line-2: #a87a45; --text: #3b2314; --muted: #7a5a3a;
  --gold: #e2621b; --gold-2: #c98a1a; --gold-ink: #fff8e8;
  --red: #b3341c; --amber: #a86a00; --blue: #2f6f7a; --green: #5b7a1e;
  --aged-bg: #f6c7b4; --aged-line: #d9603b; --age-l: 34%;
  --radius: 16px;
  --font: "Cooper Black", "Cooper Std", "Georgia", serif;
}
html[data-theme="70s"] body {
  background:
    linear-gradient(180deg, #f3e3c3 0 70%, transparent 70%) ,
    repeating-linear-gradient(180deg, #f3e3c3 0 0);
  background-color: #f3e3c3;
}
html[data-theme="70s"] body::after {
  content: ""; position: fixed; right: -120px; bottom: -120px; width: 420px; height: 420px; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, transparent 0 34%, #e2621b 34% 44%, #f2a33a 44% 54%, #e8c35a 54% 64%, #6e8b3d 64% 74%, #8a4b2a 74% 84%, transparent 84%);
  opacity: 0.55;
}
html[data-theme="70s"] h1, html[data-theme="70s"] .item-title { font-family: "Shrikhand", "Cooper Black", Georgia, serif; font-weight: 400; color: #e2621b; text-shadow: 2px 2px 0 #f2a33a, 4px 4px 0 #8a4b2a; font-size: 28px; }
html[data-theme="70s"] h2 { color: #8a4b2a; font-size: 16px; }
html[data-theme="70s"] .panel { border: 2px solid #c9a26b; box-shadow: 0 4px 0 #c9a26b; }
html[data-theme="70s"] .side { background: #4a2c17; border-right: 0; box-shadow: inset -12px 0 0 #8a4b2a, inset -24px 0 0 #e2621b, inset -36px 0 0 #f2a33a, inset -48px 0 0 #e8c35a; padding-right: 56px; }
html[data-theme="70s"] { --side-w: 236px; }
html[data-theme="70s"] .brand b { color: #e8c35a; } html[data-theme="70s"] .brand small, html[data-theme="70s"] .me small { color: #e6cfa8; }
html[data-theme="70s"] .nav a { color: #fbe9c8; }
html[data-theme="70s"] .nav a svg { color: #f2a33a; }
html[data-theme="70s"] .nav a:hover { background: #5e3a20; }
html[data-theme="70s"] .nav a.on { background: #e2621b; color: #fff8e8; border-radius: 99px; }
html[data-theme="70s"] .nav a.on svg { color: #fff8e8; }
html[data-theme="70s"] .btn { border: 2px solid #a87a45; background: #fbf1dc; color: #3b2314; border-radius: 99px; font-family: "Cooper Black", Georgia, serif; font-weight: 400; }
html[data-theme="70s"] .btn:hover { border-color: #e2621b; }
html[data-theme="70s"] .btn.gold { background: linear-gradient(180deg, #f2a33a, #e2621b); border-color: #b04a12; color: #fff8e8; }
html[data-theme="70s"] .btn.danger.solid { background: #b3341c; color: #fff8e8; }
html[data-theme="70s"] input, html[data-theme="70s"] select, html[data-theme="70s"] textarea { background-color: #fffaf0; color: #3b2314; border: 2px solid #c9a26b; border-radius: 12px; font-family: Georgia, serif; }
html[data-theme="70s"] input:focus, html[data-theme="70s"] select:focus, html[data-theme="70s"] textarea:focus { border-color: #e2621b; box-shadow: 0 0 0 3px rgba(226,98,27,.2); }
html[data-theme="70s"] .tabs { background: #f0dcb4; border: 2px solid #c9a26b; border-radius: 99px; }
html[data-theme="70s"] .tabs button { color: #6b4526; border-radius: 99px; }
html[data-theme="70s"] .tabs button.on { background: #6e8b3d; color: #fff8e8; box-shadow: none; }
html[data-theme="70s"] .stat { border-top: 10px solid; border-image: linear-gradient(90deg, #8a4b2a 0 20%, #e2621b 20% 40%, #f2a33a 40% 60%, #e8c35a 60% 80%, #6e8b3d 80%) 1; }
html[data-theme="70s"] .stat .num { color: #e2621b; font-family: "Shrikhand", "Cooper Black", serif; font-weight: 400; font-size: 32px; }
html[data-theme="70s"] .bar .track { background: #ead6ae; }
html[data-theme="70s"] .bar .fill { background: linear-gradient(90deg, #6e8b3d, #e8c35a, #f2a33a, #e2621b); }
html[data-theme="70s"] .item-row:hover, html[data-theme="70s"] .table tr.click:hover td { background: #f5e4c0; }
html[data-theme="70s"] .thumb { background: #e8c35a; color: #4a2c17; border-radius: 50%; }
html[data-theme="70s"] .where { color: #6e8b3d; }
html[data-theme="70s"] .pill { border: 1.5px solid #a87a45; color: #4a2c17; background: #fbf1dc; }
html[data-theme="70s"] .pill.type { background: #e8c35a; } html[data-theme="70s"] .pill.aged { background: #f2a58a; color: #4a2c17; } html[data-theme="70s"] .pill.pending { background: #bfd7c9; color: #23413f; }
html[data-theme="70s"] .pill.age { color: hsl(var(--h) 85% 24%); background: hsl(var(--h) 60% 82%); border-color: #a87a45; }
html[data-theme="70s"] .table th { color: #8a4b2a; }
html[data-theme="70s"] .modal { background: #fbf1dc; border: 3px solid #a87a45; border-radius: 22px; }
html[data-theme="70s"] .modal-foot { background: #f0dcb4; border-radius: 0 0 19px 19px; }
html[data-theme="70s"] .toast { background: #e2621b; color: #fff8e8; }
html[data-theme="70s"] .theme-ticks { color: #e6cfa8; } html[data-theme="70s"] .theme-ticks span:nth-child(2) { color: #f2a33a; font-weight: 700; }
@media (max-width: 760px) {
  html[data-theme="70s"] .side { box-shadow: inset 0 6px 0 #8a4b2a, inset 0 12px 0 #e2621b, inset 0 18px 0 #f2a33a; padding-top: 22px; padding-right: 4px; }
  html[data-theme="60s"] .side { border-right: 0; border-top: 6px solid; }
  html[data-theme="60s"] .mobile-top, html[data-theme="70s"] .mobile-top { background: var(--side); border-radius: 18px; padding: 8px 10px; }
  html[data-theme="60s"] .mobile-top .brand b, html[data-theme="70s"] .mobile-top .brand b { color: #ffd400; }
  html[data-theme="60s"] .mobile-top .brand small, html[data-theme="70s"] .mobile-top .brand small { color: #ddd; }
}
@media (max-width: 760px) { html[data-theme="70s"] { --side-w: 0px; } }
@media print { html[data-theme] body::after { display: none !important; } }
html[data-theme="60s"] .me span, html[data-theme="70s"] .me span { color: #fff; border-color: #fff8; }
html[data-theme="60s"] h1, html[data-theme="60s"] .item-title { text-shadow: 3px 3px 0 #ffd400; }
html[data-theme="70s"] h1, html[data-theme="70s"] .item-title { text-shadow: 2px 2px 0 #f2a33a; }

/* =====================================================================
   iOS THEME — feels like a modern iPhone. Light, or dark when the phone is.
   ===================================================================== */
html[data-theme="ios"] {
  --bg: #f2f2f7; --side: #f2f2f7; --panel: #ffffff; --panel-2: #e9e9ee;
  --line: #e5e5ea; --line-2: #d1d1d6; --text: #000000; --muted: #8a8a8e;
  --gold: #007aff; --gold-2: #0a84ff; --gold-ink: #ffffff;
  --red: #ff3b30; --amber: #ff9500; --blue: #007aff; --green: #34c759;
  --aged-bg: #ffe5e3; --aged-line: #ff3b30; --age-l: 40%;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --ios-fill: rgba(118, 118, 128, 0.12);
  --ios-sep: rgba(60, 60, 67, 0.18);
  --ios-bar: rgba(249, 249, 249, 0.82);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="ios"] {
    --bg: #000000; --side: #000000; --panel: #1c1c1e; --panel-2: #2c2c2e;
    --line: #38383a; --line-2: #48484a; --text: #ffffff; --muted: #98989f;
    --gold: #0a84ff; --gold-2: #409cff; --red: #ff453a; --amber: #ff9f0a; --blue: #0a84ff; --green: #30d158;
    --aged-bg: rgba(255, 69, 58, 0.18); --aged-line: #ff453a; --age-l: 62%;
    --ios-fill: rgba(118, 118, 128, 0.24); --ios-sep: rgba(84, 84, 88, 0.65); --ios-bar: rgba(22, 22, 24, 0.8);
  }
}
html[data-theme="ios"] body { font-size: 17px; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
html[data-theme="ios"] h1, html[data-theme="ios"] .item-title { font-size: 34px; font-weight: 700; letter-spacing: 0.01em; line-height: 1.15; }
html[data-theme="ios"] h2 { font-size: 20px; font-weight: 700; letter-spacing: 0.01em; }
html[data-theme="ios"] .sub { font-size: 13px; }
html[data-theme="ios"] .panel { border: 0; border-radius: 14px; box-shadow: none; }
html[data-theme="ios"] .stat .label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
html[data-theme="ios"] .stat .num { font-size: 34px; font-weight: 700; color: var(--text); }
html[data-theme="ios"] .stats .stat:nth-child(2) .num { color: var(--red); }
html[data-theme="ios"] .stats .stat:nth-child(3) .num { color: var(--amber); }
/* sidebar like iPad */
html[data-theme="ios"] .side { background: var(--side); border-right: 0.5px solid var(--ios-sep); }
html[data-theme="ios"] .brand img, html[data-theme="ios"] .login-logo { border-radius: 22%; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
html[data-theme="ios"] .nav a { font-size: 16px; font-weight: 500; border-radius: 10px; padding: 9px 10px; }
html[data-theme="ios"] .nav a svg { color: var(--blue); }
html[data-theme="ios"] .nav a:hover { background: var(--ios-fill); }
html[data-theme="ios"] .nav a.on { background: var(--blue); color: #fff; }
html[data-theme="ios"] .nav a.on svg { color: #fff; }
/* buttons */
html[data-theme="ios"] .btn { border: 0; border-radius: 12px; background: var(--ios-fill); color: var(--blue); font-weight: 600; font-size: 16px; min-height: 40px; }
html[data-theme="ios"] .btn:hover { border: 0; filter: brightness(0.96); }
html[data-theme="ios"] .btn:active { opacity: 0.6; }
html[data-theme="ios"] .btn.gold { background: var(--blue); color: #fff; }
html[data-theme="ios"] .btn.danger { color: var(--red); background: var(--ios-fill); }
html[data-theme="ios"] .btn.danger.solid { background: var(--red); color: #fff; }
html[data-theme="ios"] .btn.big { min-height: 50px; border-radius: 14px; font-size: 17px; }
html[data-theme="ios"] .link-btn, html[data-theme="ios"] .back, html[data-theme="ios"] .panel-head a { color: var(--blue); font-weight: 400; }
html[data-theme="ios"] .back { font-size: 17px; }
/* fields */
html[data-theme="ios"] input, html[data-theme="ios"] select, html[data-theme="ios"] textarea { background-color: var(--ios-fill); border: 0; border-radius: 10px; color: var(--text); font-size: 17px; }
html[data-theme="ios"] input:focus, html[data-theme="ios"] select:focus, html[data-theme="ios"] textarea:focus { box-shadow: 0 0 0 2px var(--blue); }
html[data-theme="ios"] .field { font-size: 13px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
html[data-theme="ios"] .search svg { color: var(--muted); }
/* segmented control */
html[data-theme="ios"] .tabs { background: var(--ios-fill); border: 0; border-radius: 9px; padding: 2px; }
html[data-theme="ios"] .tabs button { border-radius: 7px; color: var(--text); font-size: 13px; font-weight: 500; }
html[data-theme="ios"] .tabs button.on { background: var(--panel); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); color: var(--text); }
@media (prefers-color-scheme: dark) { html[data-theme="ios"] .tabs button.on { background: #636366; } }
/* lists */
html[data-theme="ios"] .item-row, html[data-theme="ios"] .log-row, html[data-theme="ios"] .bar, html[data-theme="ios"] .details div, html[data-theme="ios"] .table td, html[data-theme="ios"] .table th { border-color: var(--ios-sep); border-width: 0.5px; }
html[data-theme="ios"] .item-row:hover, html[data-theme="ios"] .table tr.click:hover td { background: var(--ios-fill); }
html[data-theme="ios"] .item-row.aged { box-shadow: none; border-radius: 10px; }
html[data-theme="ios"] .thumb { border-radius: 10px; background: var(--ios-fill); color: var(--muted); }
html[data-theme="ios"] .item-row .t { font-size: 17px; }
html[data-theme="ios"] .item-row .m, html[data-theme="ios"] .item-row .right { font-size: 15px; }
html[data-theme="ios"] .where { color: var(--blue); font-weight: 500; }
html[data-theme="ios"] .bar .track { background: var(--ios-fill); height: 6px; }
html[data-theme="ios"] .bar .fill { background: var(--blue); }
html[data-theme="ios"] .pill { border: 0; border-radius: 6px; padding: 2px 8px; font-size: 12px; background: var(--ios-fill); color: var(--muted); }
html[data-theme="ios"] .pill.type { background: rgba(0, 122, 255, 0.12); color: var(--blue); }
html[data-theme="ios"] .pill.aged { background: rgba(255, 59, 48, 0.14); color: var(--red); }
html[data-theme="ios"] .pill.pending { background: rgba(255, 149, 0, 0.15); color: var(--amber); }
html[data-theme="ios"] .pill.age { background: hsl(var(--h) 70% 50% / 0.15); color: hsl(var(--h) 75% var(--age-l)); }
html[data-theme="ios"] .pill.Moved { background: rgba(52,199,89,.15); color: var(--green); } html[data-theme="ios"] .pill.Disposed { background: rgba(255,59,48,.14); color: var(--red); } html[data-theme="ios"] .pill.Added { background: rgba(0,122,255,.12); color: var(--blue); }
html[data-theme="ios"] .notice { border: 0; border-radius: 14px; }
html[data-theme="ios"] .notice.pending { background: rgba(255, 149, 0, 0.13); } html[data-theme="ios"] .notice.aged, html[data-theme="ios"] .notice.removed { background: rgba(255, 59, 48, 0.11); }
html[data-theme="ios"] .photo, html[data-theme="ios"] .photo-pick { border: 0; border-radius: 14px; background: var(--ios-fill); }
html[data-theme="ios"] .table th { font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--muted); }
html[data-theme="ios"] .menu { border: 0; border-radius: 14px; background: var(--ios-bar); backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 10px 40px rgba(0,0,0,.2); padding: 0; overflow: hidden; }
html[data-theme="ios"] .menu button { border-radius: 0; padding: 12px 16px; font-size: 17px; border-bottom: 0.5px solid var(--ios-sep); }
html[data-theme="ios"] .menu button:last-child { border-bottom: 0; }
/* sheets & alerts */
html[data-theme="ios"] .modal-back { background: rgba(0, 0, 0, 0.35); }
html[data-theme="ios"] .modal { border: 0; border-radius: 14px; background: var(--bg); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
html[data-theme="ios"] .modal-head { position: relative; padding-top: 18px; }
html[data-theme="ios"] .modal-head h2 { font-size: 17px; font-weight: 600; width: 100%; text-align: center; }
html[data-theme="ios"] .modal-head .x { position: absolute; right: 10px; top: 12px; width: 30px; height: 30px; border-radius: 99px; background: var(--ios-fill); color: var(--muted); font-size: 18px; padding: 0; }
html[data-theme="ios"] .modal-foot { background: var(--bg); border-top: 0.5px solid var(--ios-sep); border-radius: 0 0 14px 14px; }
@media (max-width: 520px) {
  html[data-theme="ios"] .modal { border-radius: 12px 12px 0 0; }
  html[data-theme="ios"] .modal::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 6px auto 0; }
  html[data-theme="ios"] .modal-foot { border-radius: 0; }
}
html[data-theme="ios"] .toast { background: rgba(30, 30, 30, 0.88); color: #fff; border-radius: 99px; font-weight: 600; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
html[data-theme="ios"] .toast.bad { background: var(--red); }
html[data-theme="ios"] .login-card .btn { min-height: 50px; border-radius: 14px; font-size: 17px; }
html[data-theme="ios"] .camera { border-radius: 14px; } html[data-theme="ios"] .camera .frame { border-color: #fff; border-radius: 18px; }
html[data-theme="ios"] .theme-ticks span:first-child { color: var(--blue); font-weight: 700; }
html[data-theme="ios"] .me span { border: 0; background: linear-gradient(180deg, #a5a5aa, #85858a); color: #fff; font-weight: 600; }
html[data-theme="ios"] .head { margin-bottom: 14px; }
/* phone: frosted tab bar + large title header */
@media (max-width: 760px) {
  html[data-theme="ios"] .side { background: var(--ios-bar); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); border-top: 0.5px solid var(--ios-sep); border-right: 0; }
  html[data-theme="ios"] .nav a { font-size: 10px; font-weight: 500; color: var(--muted); padding: 4px 2px; }
  html[data-theme="ios"] .nav a svg { color: var(--muted); width: 25px; height: 25px; }
  html[data-theme="ios"] .nav a.on { background: none; color: var(--blue); }
  html[data-theme="ios"] .nav a.on svg { color: var(--blue); }
  html[data-theme="ios"] .view { padding-left: 16px; padding-right: 16px; }
  html[data-theme="ios"] .mobile-top .brand b { font-size: 15px; }
}

/* ---------- Items tab columns ---------- */
.itable { padding: 0; overflow: hidden; }
.ihead, .irow { display: grid; grid-template-columns: 64px minmax(220px, 1fr) 150px 170px minmax(170px, 0.6fr); gap: 14px; align-items: center; padding: 10px 14px; }
.ihead { border-bottom: 1px solid var(--line); padding-top: 9px; padding-bottom: 9px; }
.ih { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; background: none; border: 0; padding: 0; font-family: inherit; white-space: nowrap; }
button.ih { cursor: pointer; }
button.ih:hover, .ih.on { color: var(--text); }
.irow { text-decoration: none; border-top: 1px solid var(--line); }
.ihead + .irow { border-top: 0; }
.irow:hover { background: #1c1916; }
.irow.aged { background: var(--aged-bg); box-shadow: inset 3px 0 0 var(--aged-line); }
.ic { min-width: 0; }
.ic .thumb { width: 50px; height: 50px; }
.ic-description .t { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.ic-description .m { display: block; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ic-age { display: flex; gap: 5px; flex-wrap: wrap; }
.ic-location { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ic-location .pend { display: block; color: var(--blue); font-weight: 600; }
@media (max-width: 760px) {
  .ihead { display: flex; flex-wrap: wrap; gap: 6px 14px; }
  .ihead .ih-photo { display: none; }
  .irow { grid-template-columns: 50px auto 1fr; gap: 6px 8px; }
  .irow .ic-photo { grid-row: 1 / 4; align-self: start; margin-right: 4px; }
  .irow .ic-description, .irow .ic-location { grid-column: 2 / 4; }
  .irow .ic-type { grid-column: 2; grid-row: 2; }
  .irow .ic-age { grid-column: 3; grid-row: 2; }
  .irow .ic-type:has(.muted) + .ic-age { grid-column: 2 / 4; }
  .irow .ic-type .muted { display: none; }
  .irow .ic-type:has(.muted) { display: none; }
}
html[data-theme="80s"] .irow:hover { background: rgba(47, 243, 224, 0.06); }
html[data-theme="90s"] .irow:hover { background: #ffff99; } html[data-theme="90s"] .ihead { background: #000080; } html[data-theme="90s"] .ih { color: #fff; } html[data-theme="90s"] .irow.aged { box-shadow: inset 4px 0 0 #ff0000; }
html[data-theme="60s"] .irow:hover { background: #fff3c4; } html[data-theme="60s"] .ih { color: #7b2ff7; font-family: "Righteous", sans-serif; font-weight: 400; } html[data-theme="60s"] .ihead { border-bottom: 3px solid #111; } html[data-theme="60s"] .irow { border-color: #111; }
html[data-theme="70s"] .irow:hover { background: #f5e4c0; } html[data-theme="70s"] .ih { color: #8a4b2a; } html[data-theme="70s"] .irow { border-color: #c9a26b; }
html[data-theme="ios"] .irow { border-top: 0.5px solid var(--ios-sep); } html[data-theme="ios"] .irow:hover { background: var(--ios-fill); } html[data-theme="ios"] .irow.aged { box-shadow: none; }
html[data-theme="ios"] .ih { text-transform: uppercase; font-weight: 400; font-size: 12px; } html[data-theme="ios"] .ic-description .t { font-size: 17px; }
