/* =============================================================
   REVIEW — Karigar Uploads (review.js). The phone's Review tab:
   slip cards in a responsive grid, the Slips / Designers switch,
   and the sidebar's red count. Uses the tokens in style.css :root.
============================================================= */

/* Sidebar count — a small red pill, gone when there is nothing waiting. */
.nav-count {
  display: inline-grid; place-items: center; margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.nav-count:empty { display: none; }

.rv-page { padding-bottom: 40px; }
.rv-title { font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin: 0 0 12px; color: var(--ink); }

/* Slips / Designers — a segmented pill. */
.rv-tabs {
  display: flex; gap: 4px; width: max-content; max-width: 100%;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px;
}
.rv-tabs button {
  border: 0; background: none; border-radius: var(--radius-pill); padding: 7px 16px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-600); cursor: pointer;
}
.rv-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.rv-intro { font-size: 12.5px; color: var(--ink-600); max-width: 65ch; margin: 12px 0; }
.rv-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
  gap: 12px; align-items: start; margin-top: 12px;
}
.rv-intro + .rv-grid { margin-top: 0; }
.rv-empty { grid-column: 1 / -1; text-align: center; padding: 50px 10px; color: var(--ink-500); font-size: 14px; }
.rv-empty span { display: block; font-size: 44px; margin-bottom: 6px; }

/* ---------- Card ---------- */
.rv-card {
  background: var(--surface); border-radius: var(--radius); padding: 16px; min-width: 0;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
}
.rv-head { display: flex; align-items: center; gap: 10px; }
.rv-badge {
  min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center;
  background: var(--link-blue); color: #fff; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rv-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: var(--name-ink); overflow-wrap: anywhere; }
.rv-name small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-500); }
.rv-pill { padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.rv-pill.d { background: var(--c-worker-l); color: var(--c-worker); }
.rv-pill.n { background: var(--c-super-l); color: var(--c-super); }
.rv-pill.w { background: #fbf3d8; color: var(--warn-gold); }

.rv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.rv-stat { font-size: 12.5px; color: var(--ink-600); min-width: 0; overflow-wrap: anywhere; }
.rv-stat b { font-size: 13px; color: var(--ink); font-weight: 600; }
.rv-tag { font-size: 12px; font-weight: 600; color: var(--link-blue); }
.rv-tag-muted { font-size: 11px; font-weight: 400; color: var(--ink-500); }
.rv-tag-amber { color: var(--amber); }

.rv-cap { font-size: 12.5px; color: var(--ink-600); margin-bottom: 6px; }
.rv-photo {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); overflow: hidden; cursor: zoom-in;
}
.rv-photo img { display: block; width: 100%; max-height: 280px; object-fit: contain; }

.rv-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-thumb { margin: 0; width: 72px; }
.rv-thumb button, .rv-thumb > span {
  width: 72px; height: 72px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: var(--primary-l); display: grid; place-items: center; cursor: zoom-in; font-size: 20px;
}
.rv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-thumb figcaption { font-size: 10px; color: var(--ink-500); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-voice { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-600); }
.rv-voice audio { width: 100%; height: 36px; }

/* Fields on the card — tighter than the app's standard form box. */
.rv-field { display: flex; flex-direction: column; gap: 4px; }
.rv-field label { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-600); }
.rv-field select, .rv-field input { height: 38px; padding: 0 10px; min-width: 0; }
.rv-hint { font-size: 11.5px; color: var(--ink-600); }
.rv-hint-red { font-size: 12px; font-weight: 600; color: var(--danger-red); }
.rv-hint-gold { color: var(--warn-gold); margin-top: -4px; }
.rv-err { font-size: 11.5px; color: var(--danger-red); }
.rv-warn {
  background: #fbf3d8; border: 1px solid var(--warn-gold); border-radius: 10px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--ink-600);
}
.rv-warn b { font-size: 12.5px; color: var(--warn-gold); }
.rv-block {
  background: #fbe9e7; border: 1px solid var(--danger-red); border-radius: 10px; padding: 8px 10px;
  font-size: 12.5px; font-weight: 600; color: var(--danger-red);
}

.rv-ticks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.rv-tick { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.rv-tick input { width: auto; margin: 0; accent-color: var(--link-blue); }

.rv-saveto {
  background: var(--primary-l); border-radius: 10px; padding: 8px 10px;
  font-size: 11.5px; color: var(--ink-600);
}
.rv-saveto b { display: block; margin-top: 2px; font-size: 13.5px; color: var(--link-blue); }
.rv-btns { display: flex; gap: 8px; }
.rv-btns .btn { flex: 1; padding: 10px 14px; }
.rv-ok { background: var(--band-green); border-color: var(--band-green); color: #fff; }
.rv-ok:hover { background: #0e9f5c; }
.rv-ok:disabled { background: var(--band-green); }
.rv-rm {
  align-self: center; background: none; border: 0; padding: 4px 8px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--danger-red);
}
.rv-rm:disabled { opacity: .5; cursor: default; }

/* ---------- Designer session card ---------- */
.rv-timeline { display: flex; gap: 10px; }
.rv-timeline > div {
  flex: 1; min-width: 0; background: var(--surface-2); border-radius: 10px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 1px; font-size: 11.5px; color: var(--ink-500);
}
.rv-timeline b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rv-timeline i { font-style: normal; font-size: 11px; color: var(--ink-500); }
.rv-timeline i.ok { color: var(--ok-green); }
.rv-timeline i.warn { color: var(--warn-gold); }
.rv-clocks { display: flex; gap: 8px; }
.rv-clock {
  flex: 1; min-width: 0; min-height: 96px; max-height: 160px; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: var(--primary-l);
  display: grid; place-items: center; font-size: 11px; color: var(--ink-500);
}
button.rv-clock { cursor: zoom-in; }
.rv-clock img { width: 100%; height: 100%; max-height: 160px; object-fit: cover; display: block; }
.rv-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }
.rv-total > div { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-500); }
.rv-total b { font-size: 22px; color: var(--ink); }
.rv-total .warn { text-align: right; color: var(--warn-gold); }
.rv-total .warn b { color: var(--warn-gold); }

/* ---------- Dialogs (in the app's #modal) ---------- */
.rv-dlg-body { margin: 0 0 4px; font-size: 14px; line-height: 1.5; color: var(--ink-600); white-space: pre-line; }
.rv-ed-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rv-ed-top .rv-cap { margin-bottom: 2px; }
.rv-seg { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px; }
.rv-seg button {
  border: 0; background: none; border-radius: var(--radius-pill); padding: 6px 12px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-600); cursor: pointer;
}
.rv-seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.rv-ed-kid { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rv-ed-kid select { flex: 1; min-width: 0; }
.rv-ed-kid .rv-tick { white-space: nowrap; }
.rv-req { color: var(--danger-red); }
.rv-et-total { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
#modal-body .rv-photo img { max-height: 220px; }

@media (max-width: 480px) {
  .rv-stats { grid-template-columns: 1fr; }
  .rv-tabs { width: 100%; }
  .rv-tabs button { flex: 1; }
}
