/* ── Shifts: denomination helper + X-report (Slice C) ──────────────
   The denomination helper renders on the admin open/close forms and the
   cashier shift gate, so these tokens must resolve in both bundles
   (admin.css is loaded by the cashier layout too). */

.denom-helper {
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--bg-surface);
}

.denom-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.denom-chevron {
  color: var(--text-tertiary);
  transition: transform 120ms ease;
}
.denom-toggle[aria-expanded="true"] .denom-chevron { transform: rotate(180deg); }

.denom-body {
  padding: 4px 12px 12px;
  border-top: 1px solid var(--border-subtle);
}

/* Container-responsive: columns size to the modal/card width, not the
   viewport — so a narrow modal collapses to a single column and the rows
   never overflow (a viewport media query can't see the modal width). */
.denom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 8px 16px;
  padding-top: 10px;
}

.denom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.denom-face {
  flex: 0 0 58px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.denom-x { flex: 0 0 auto; color: var(--text-tertiary); font-size: 12px; }
/* The qty input grows to fill the row — `flex:1 + min-width:0` is what
   actually makes it stretch (a grid `1fr` column leaves the input at its
   intrinsic width). */
.denom-count {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  text-align: end;
}
.denom-sub {
  flex: 0 0 60px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  text-align: end;
}

.denom-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-default);
}
.denom-total-label {
  margin-inline-end: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.denom-total-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── X-report print view ─────────────────────────────────────────── */
.xreport-sheet {
  max-width: 560px;
  margin: 24px auto;
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
}
.xreport-head {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.xreport-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.xreport-meta {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.xreport-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

@media print {
  .xreport-actions, .topbar, .admin-sidebar, .admin-footer, .license-banner { display: none !important; }
  .xreport-sheet { border: 0; margin: 0 auto; max-width: 100%; }

  /* The admin shell caps height to 100vh and scrolls `.admin-main`; in
     print that renders a scrollbar track and clips the page. Let the
     whole shell flow naturally so the report prints on its own page(s). */
  html, body, .admin-layout, .admin-main, .page {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .admin-layout { display: block !important; }
}
