/* Seat Capacity 025: shared by Overview and Seat Management only. */
:where(.seat-detail, .seat-dialog, .seat-meter-card, .seat-meter-legend) { --si-ink:#243a36; --si-muted:#62746c; --si-line:#dfe7e1; --si-booking:#227864; --si-revenue:#7c5fc6; }
.seat.seat-meter-card { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:94px; padding:10px 5px 8px; border-radius:11px; border:1px solid #d8e5d8; color:var(--si-ink); background:#fff; text-decoration:none; transition:box-shadow .16s, border-color .16s; }
.seat.seat-meter-card::after { display:none; }
.seat.seat-meter-card.aisle { margin-top:0; }
.seat.seat-meter-card:hover { transform:none; border-color:#8ab5a1; box-shadow:0 4px 12px #153d2910; }
.seat.seat-meter-card:focus-visible { outline:3px solid #227864; outline-offset:3px; }
.seats-page .seat.seat-meter-card.occupied, #overview-root .seat.seat-meter-card.occupied { background:#edf7f2; border-color:#8cbbab; color:#1f5948; }
.seats-page .seat.seat-meter-card.reserved, #overview-root .seat.seat-meter-card.reserved { background:#fffaf0; border-color:#e7d7ad; color:#735625; }
.seats-page .seat.seat-meter-card.maintenance, #overview-root .seat.seat-meter-card.maintenance { background:#f3f5f4; border-color:#d8dfdb; color:#68746d; }
.seat-meter { position:relative; display:block; width:60px; max-width:100%; aspect-ratio:1; }
.seat-meter svg, .seat-metric-ring svg { display:block; width:100%; height:100%; fill:none; stroke-width:3.8; }
.seat-ring-track { stroke:#e2e9e4; }
.seat-ring-track.is-unknown { stroke-dasharray:2 4; }
.seat-ring-booking { stroke:#227864; stroke-linecap:round; }
.seat-ring-revenue { stroke:#7c5fc6; stroke-linecap:round; }
.seat-capacity-mix { list-style:none; margin:10px 0; padding:0; border:1px solid #e7dfef; border-radius:9px; overflow:hidden; }
.seat-capacity-mix li { display:flex; justify-content:space-between; gap:14px; padding:10px 12px; border-bottom:1px solid #ece6f2; }
.seat-capacity-mix li:last-child { border-bottom:0; }
.seat-capacity-mix li > span { min-width:0; overflow-wrap:anywhere; }
.seat-capacity-mix small { display:block; color:#687669; font-size:11px; }
.seat-capacity-mix b { flex:none; white-space:nowrap; font-size:12px; }
.seat-capacity-note { font-size:12px; color:#687669; line-height:1.7; }
.seat-money-comparison { grid-column:1/-1; }
.seat-money-comparison > summary { cursor:pointer; font-size:12px; color:#687669; padding:8px 0; }
.seat-meter-label { position:absolute; inset:0; margin:auto; display:flex; align-items:center; justify-content:center; width:48%; max-width:48%; height:1.3em; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:10px; font-weight:700; letter-spacing:-.25px; }
.seat-meter-values { display:flex; align-items:center; justify-content:center; gap:7px; width:100%; font-size:10px; font-weight:650; line-height:1.4; }
.seat-booking-value { color:#216853; }
.seat-revenue-value { color:#7551b3; }
.seat-revenue-value::before { content:"/"; padding-right:7px; color:#a0aaa2; font-weight:400; }
.seat-state-dot { position:absolute; top:8px; right:8px; width:5px; height:5px; border-radius:50%; background:#a9c6aa; }
.occupied .seat-state-dot { background:#227864; }
.reserved .seat-state-dot { background:#b38429; }
.maintenance .seat-state-dot { background:#84958a; }
.seat-meter-legend { display:flex; flex-wrap:wrap; align-items:center; gap:9px 18px; margin:18px 0 2px; color:#5c7064; font-size:10px; line-height:1.6; }
.seat-meter-legend > span { display:inline-flex; align-items:center; gap:6px; }
.seat-meter-legend i { width:8px; height:8px; border-radius:50%; flex:none; }
.seat-meter-legend i.booking { background:#227864; }
.seat-meter-legend i.revenue { background:#7c5fc6; }
.seat-meter-legend .seat-meter-hint { flex-basis:100%; font-size:10px; color:#6e7c72; }
/* Limit scrolling to the content; the seat title and close control stay visible. */
.connected-app dialog.seat-dialog, #seats-detail.seat-dialog { width:640px; max-width:calc(100vw - 32px); max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px); border:1px solid #dfe7e1; border-radius:18px; padding:0; background:#fff; color:#243a36; box-shadow:0 25px 90px #172f2b32; overflow:hidden; }
.connected-app dialog.seat-dialog[open] { display:flex; flex-direction:column; }
.connected-app dialog.seat-dialog:not([open]) { display:none; }
dialog.seat-dialog::backdrop { background:#263b376b; backdrop-filter:blur(4px); }
.seat-dialog > .modal-header { position:relative; flex:none; padding:24px 26px 20px; align-items:flex-start; background:#fff; border-bottom:1px solid #e8eee8; }
.seat-dialog > .modal-header > div { min-width:0; }
.seat-dialog .modal-header h2 { font-size:21px; line-height:1.35; letter-spacing:-.4px; overflow-wrap:anywhere; }
.seat-dialog .modal-header .icon-btn { width:36px; height:36px; min-width:36px; border-color:#dfe7e1; border-radius:9px; color:#56736a; }
.seat-dialog > .modal-content { padding:20px 26px 24px; overflow:auto; min-height:0; overscroll-behavior:contain; }
.seat-detail { min-width:0; color:var(--si-ink); font-size:13px; line-height:1.6; }
.seat-detail-overall { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-bottom:18px; color:var(--si-muted); font-size:12px; }
.seat-detail-overall > .pill { font-size:11px; padding:5px 10px; border-radius:20px; }
.seat-detail-location { margin-left:auto; max-width:55%; overflow-wrap:anywhere; font-size:11px; }
.seat-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.seat-metric { display:flex; align-items:center; gap:11px; min-width:0; padding:13px 12px; border:1px solid #dfe9e0; border-radius:12px; background:#f8fbf7; }
.seat-metric.revenue { background:#faf8fe; border-color:#e9e1f2; }
.seat-metric > div { min-width:0; }
.seat-metric h3 { font-size:12px; font-weight:650; line-height:1.5; letter-spacing:0; margin:0 0 4px; }
.seat-metric p { color:var(--si-muted); font-size:11px; line-height:1.5; margin:0; overflow-wrap:anywhere; }
.seat-metric-ring { position:relative; display:block; width:54px; height:54px; flex:none; }
.seat-metric-ring strong { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:var(--si-booking); }
.revenue .seat-metric-ring strong { color:var(--si-revenue); }
.seat-insights-note { font-size:11px; color:var(--si-muted); line-height:1.6; margin:10px 0 20px; }
.seat-availability > h3 { display:flex; justify-content:space-between; flex-wrap:wrap; gap:7px; margin:0 0 10px; color:#64796e; font-size:11px; letter-spacing:.055em; text-transform:uppercase; font-weight:650; }
.seat-availability > h3 span { font-weight:400; letter-spacing:0; text-transform:none; color:var(--si-muted); }
.seat-slot-list { list-style:none; padding:0; margin:0; border:1px solid var(--si-line); border-radius:12px; max-height:265px; overflow-y:auto; overscroll-behavior:contain; }
.seat-slot-list li { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 16px; border-bottom:1px solid #edf1ed; }
.seat-slot-list li:last-child { border-bottom:0; }
.seat-slot-list li > div { min-width:0; }
.seat-slot-list strong { display:block; font-size:13px; line-height:1.45; font-weight:550; overflow-wrap:anywhere; }
.seat-slot-list small { display:block; color:var(--si-muted); font-size:11px; margin-top:3px; }
.seat-slot-state { flex:none; padding:4px 10px; border-radius:18px; font-size:11px; font-weight:550; white-space:nowrap; }
.seat-slot-state.available { background:#eaf5eb; color:#356c39; }
.seat-slot-state.occupied { background:#dcefe6; color:#1e6550; }
.seat-slot-state.reserved { background:#fff2d9; color:#88621c; }
.seat-slot-state.unknown { background:#eef1ed; color:#596c60; }
.seat-detail summary { cursor:pointer; }
.seat-detail summary:focus-visible, .seat-detail a:focus-visible, .seat-detail button:focus-visible { outline:2px solid var(--si-booking); outline-offset:3px; }
.seat-revenue-explainer { margin:14px 0; font-size:11px; color:var(--si-muted); }
.seat-revenue-explainer > summary { font-weight:550; color:#6b5894; min-height:30px; padding:5px 0; }
.seat-revenue-explainer p { margin:8px 0; line-height:1.65; }
.seat-detail-links { display:flex; flex-wrap:wrap; gap:12px; margin:10px 0; }
.seat-detail-links a { color:#316b59; text-decoration:underline; text-underline-offset:3px; }
.seat-detail-links svg { width:13px; height:13px; }
.seat-bookings { border:1px solid var(--si-line); border-radius:11px; margin:16px 0; }
.seat-bookings > summary { padding:12px 14px; font-weight:600; font-size:12px; color:#35594a; }
.seat-bookings > summary span { display:inline-block; margin-left:7px; padding:1px 7px; border-radius:5px; background:#eef4ed; font-size:11px; }
.seat-bookings-body { padding:0 14px 14px; }
.seat-detail .seats-allocation { border-top:1px solid var(--si-line); margin:0; padding:15px 0; }
.seat-detail .seats-allocation:last-child { padding-bottom:0; }
.seat-booking-card > header { display:flex; align-items:flex-start; gap:12px; justify-content:space-between; margin-bottom:13px; }
.seat-booking-card > header strong { font-size:13px; overflow-wrap:anywhere; }
.seat-booking-card > header .pill { flex:none; }
.seat-detail .seat-booking-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 20px; width:auto; margin:0; padding:0; }
.seat-detail .seat-booking-row dt { color:var(--si-muted); font-size:10px; margin:0 0 3px; }
.seat-detail .seat-booking-row dd { white-space:normal; margin:0; font-size:12px; font-weight:500; color:var(--si-ink); overflow-wrap:anywhere; }
.seat-other-label { font-size:11px; color:var(--si-muted); margin:16px 0 10px; }
.seat-detail-hint { color:var(--si-muted); font-size:11px; margin:16px 0; line-height:1.65; }
.seat-detail-actions { display:flex; align-items:flex-start; flex-wrap:wrap; gap:12px; padding-top:18px; border-top:1px solid var(--si-line); }
.seat-booking-actions { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px; margin-top:15px; }
.seat-inline-action { min-width:0; }
.seat-inline-action > summary { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:8px 14px; border:1px solid var(--si-line); border-radius:8px; color:#345b4c; background:#fff; font-size:12px; font-weight:600; list-style:none; }
.seat-inline-action > summary::-webkit-details-marker { display:none; }
.seat-inline-action > summary::marker { content:""; }
.seat-inline-action > summary:hover { background:#f0f7f1; border-color:#b9cfbf; }
.seat-inline-action.primary > summary { color:#fff; background:#1d6b59; border-color:#1d6b59; }
.seat-inline-action.primary > summary:hover { background:#175645; }
.seat-inline-action.danger > summary { color:#9a4b3a; background:#fff8f5; border-color:#ecd9d0; }
.seat-inline-action[open] { flex:1 1 100%; width:100%; }
.seat-inline-action[open] > summary { box-shadow:0 0 0 2px #e6efe7; }
.seat-inline-body { padding:18px 0 2px; }
.seat-detail .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.seat-detail .form-grid > label { min-width:0; font-size:11px; line-height:1.5; }
.seat-detail .form-grid > label:has(select[name="student_id"]), .seat-detail .form-grid > label:has(select[name="id"]) { grid-column:1/-1; }
.connected-app .seat-detail .form-grid input.input, .connected-app .seat-detail .form-grid select.input { width:100%; min-width:0; max-width:100%; min-height:42px; padding:10px 12px; font-size:12px; color:var(--si-ink); background:#fff; border:1px solid #d6e2d9; border-radius:8px; }
.connected-app .seat-detail .form-grid select.input { text-overflow:ellipsis; }
.seat-detail .btn { font-size:12px; border-radius:8px; min-height:40px; }
.seat-assignment-help { background:#f3f7ef; padding:13px 14px; border-radius:9px; color:var(--si-muted); font-size:11px; }
.seat-assignment-help p { margin:0; line-height:1.65; }
.seat-assignment-help summary { margin:8px 0; font-weight:600; color:#4c6d4b; }
.seat-detail-empty, .seat-detail-footnote { margin:0; font-size:11px; color:var(--si-muted); line-height:1.7; }
.seat-detail-footnote { flex-basis:100%; }
.seat-detail .seats-scope-note { margin:12px 0; }
@media(max-width:1250px) { #overview-root .seat-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:760px) {
  .seat.seat-meter-card { min-height:90px; padding:9px 4px 7px; }
  .seats-page .seat.seat-meter-card:nth-child(n) { margin-top:0; }
  .seat-meter-values { font-size:9px; gap:5px; }
  .seat-revenue-value::before { padding-right:5px; }
  .seat-meter-legend { gap:7px 14px; }
  .seat-dialog .modal-header .icon-btn { min-width:44px; width:44px; height:44px; }
}
@media(max-width:560px) {
  .connected-app dialog.seat-dialog, #seats-detail.seat-dialog { max-width:calc(100vw - 20px); max-height:calc(100dvh - 20px); border-radius:15px; }
  .seat-dialog > .modal-header { padding:18px; }
  .seat-dialog > .modal-content { padding:16px 18px 20px; }
  .seat-dialog .modal-header h2 { font-size:20px; }
  .seat-metrics { gap:8px; }
  .seat-metric { flex-direction:column; text-align:center; padding:12px 8px; gap:6px; }
  .seat-metric p { font-size:10px; }
  .seat-slot-list li { padding:12px; gap:9px; }
  .seat-slot-list strong { font-size:12px; }
  .seat-slot-state { font-size:10px; padding:4px 8px; }
  .seat-detail .form-grid { grid-template-columns:minmax(0,1fr); }
  .connected-app .seat-detail .form-grid input.input, .connected-app .seat-detail .form-grid select.input { font-size:16px; min-height:44px; }
  .seat-inline-action > summary, .seat-detail .btn { min-height:44px; }
  .seat-detail .seat-booking-row { gap:12px; }
}
.seat-forecast { margin:16px 0 22px; padding:18px; border:1px solid #dce7e3; border-radius:15px; background:linear-gradient(135deg,#f3faf7,#fcfdfb); }
.seat-forecast-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.seat-forecast-head h3 { margin:0 0 8px; font-size:12px; color:#47695e; }
.seat-forecast-head strong { display:block; font-size:28px; line-height:1.2; letter-spacing:-.6px; color:#174c40; overflow-wrap:anywhere; }
.seat-forecast-head p { font-size:11px; color:#6a7c74; margin:7px 0 0; }
.seat-forecast-tag { border:1px solid #cfe0d7; border-radius:20px; padding:4px 9px; color:#456d5d; background:#fff; font-size:10px; white-space:nowrap; }
.seat-forecast-values { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:16px 0 0; padding-top:13px; border-top:1px solid #dce7e3; }
.seat-forecast dt { color:#60786d; font-size:11px; }
.seat-forecast dd { margin:5px 0 0; font-size:15px; font-weight:650; color:#203e34; overflow-wrap:anywhere; }
.seat-forecast-message,.seat-forecast-basis p { font-size:11px; line-height:1.65; color:#63756d; }
.seat-forecast-basis { margin-top:13px; }
.seat-forecast-basis > summary { cursor:pointer; font-size:11px; font-weight:650; color:#386454; padding:7px 0; }
.seat-forecast-basis dl { margin:9px 0; }
.seat-forecast-basis dl > div { display:flex; justify-content:space-between; gap:18px; padding:6px 0; }
.seat-forecast-basis dd { margin:0; font-size:12px; text-align:right; }
@media(max-width:560px) { .seat-forecast { padding:15px; } .seat-forecast-head strong { font-size:25px; } .seat-forecast-basis > summary { min-height:40px; display:flex; align-items:center; } }
@media(prefers-reduced-motion:reduce) { .seat.seat-meter-card { transition:none; } }
