/* ════════════════════════════════════════════════════════════════════════
   bo-session.css — "Sesión en vivo" (mirrors iOS SessionView).
   Full-screen modal launched from a booking: timer, material consumption,
   notes, follow-up toggles, final payment, close (decrements stock). Tokens
   only (DESIGN.md). Non-destructive layer.
   ════════════════════════════════════════════════════════════════════════ */

.bo-sess-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: flex-start; justify-content: center;
  background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(4px);
  padding: 24px 16px; overflow-y: auto;
}
.bo-sess-overlay.open { display: flex; }

.bo-sess-card {
  width: 100%; max-width: 560px; margin: auto;
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 24px); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

/* Sticky header */
.bo-sess-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; background: var(--bg-secondary); z-index: 2;
}
.bo-sess-top .live { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase; }
.bo-sess-top .live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.bo-sess-top .min { font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-secondary); background: none; border: none; cursor: pointer; }
.bo-sess-top .min:hover { color: var(--text-primary); }

.bo-sess-body { padding: 20px; display: grid; gap: 16px; }

.bo-sess-clienthead h3 { font-size: 22px; font-weight: 900; letter-spacing: -0.01em; }
.bo-sess-clienthead p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* Cards (material surfaces) */
.bo-sess-sec { background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; }
.bo-sess-sec.accent { border-color: rgba(var(--crimson-rgb), 0.35); }
.bo-sess-sec.green { border-color: rgba(122, 157, 118, 0.4); }
.bo-sess-label { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.bo-sess-sublabel { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

/* Timer */
.bo-sess-timer { display: flex; align-items: center; gap: 12px; }
.bo-sess-timer i { font-size: 20px; color: var(--crimson); }
.bo-sess-timer .t { font-family: 'Space Mono', monospace; font-size: 30px; font-weight: 700; color: var(--text-primary); }
.bo-sess-timer .reset { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-card); border: none; color: var(--text-muted); cursor: pointer; }
.bo-sess-timer .reset:hover { color: var(--text-primary); }

.bo-sess-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; font-family: inherit; font-weight: 700; font-size: 15px;
  border: none; border-radius: 12px; padding: 14px; cursor: pointer;
  color: #fff; background: var(--crimson);
}
.bo-sess-btn:hover { background: #b53333; }
.bo-sess-btn.green { background: var(--accent); }
.bo-sess-btn.green:hover { background: #6b8e67; }

/* Add material row */
.bo-sess-addrow { display: flex; gap: 10px; margin-top: 10px; }
.bo-sess-addrow input, .bo-sess-sec select, .bo-sess-sec input[type="text"], .bo-sess-sec input[type="number"] {
  font-family: inherit; font-size: 15px; color: var(--text-primary);
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 11px; padding: 12px 13px; outline: none; width: 100%;
}
.bo-sess-sec select { width: 100%; margin-top: 8px; }
.bo-sess-addrow input { flex: 1; }
.bo-sess-addrow .add { flex: 0 0 auto; width: auto; padding: 12px 20px; }
.bo-sess-sec select:focus, .bo-sess-sec input:focus { border-color: var(--crimson); }

/* Consumed material list */
.bo-sess-lines { display: grid; gap: 0; margin-top: 6px; }
.bo-sess-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-color); }
.bo-sess-line:last-child { border-bottom: none; }
.bo-sess-line .nm { font-size: 14px; font-weight: 500; }
.bo-sess-line .mut { font-size: 12px; color: var(--text-muted); }
.bo-sess-line .lc { margin-left: auto; font-family: 'Space Mono', monospace; font-size: 14px; color: var(--text-secondary); }
.bo-sess-line .rm { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 17px; }
.bo-sess-total { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--crimson); font-size: 16px; }
.bo-sess-empty { font-size: 13px; color: var(--text-muted); padding: 6px 0; }

textarea.bo-sess-notes {
  width: 100%; min-height: 90px; resize: vertical; margin-top: 8px;
  font-family: inherit; font-size: 14px; color: var(--text-primary);
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 11px; padding: 12px; outline: none;
}
textarea.bo-sess-notes:focus { border-color: var(--crimson); }

/* Toggle grid (Realizada / Cobrado / 2ª sesión) */
.bo-sess-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.bo-sess-toggle {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 11px; border-radius: 11px; border: 1px solid var(--border-color);
  background: var(--bg-card); color: var(--text-secondary);
}
.bo-sess-toggle.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Final payment */
.bo-sess-pay-note { font-size: 12px; color: var(--text-secondary); margin: 6px 0 10px; }
.bo-sess-methods { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.bo-sess-methods label { flex: 1; min-width: 70px; }
.bo-sess-methods input { position: absolute; opacity: 0; pointer-events: none; }
.bo-sess-methods span {
  display: block; text-align: center; font-size: 13px; font-weight: 600;
  padding: 10px 6px; border-radius: 10px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary);
}
.bo-sess-methods input:checked + span { background: rgba(var(--crimson-rgb), 0.14); border-color: var(--crimson); color: var(--text-primary); }
.bo-sess-paid { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 14px; }
.bo-sess-paid .undo { margin-left: auto; background: none; border: none; color: var(--text-muted); font-size: 12px; cursor: pointer; }

.bo-sess-foot { font-size: 11px; color: var(--text-muted); text-align: center; }
.bo-sess-defer { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
