/* SHARED COMPONENTS. Shared by the application shell and standalone forms. */
:is(.preview-shell,.preview-standalone) :is(button,input,select,textarea) { font:inherit; }
:is(.preview-shell,.preview-standalone) :where(button,.pv-button,.button,.action,.role-toggle,.save-button,.primary-review) { border:1px solid var(--pv-line); background:var(--pv-panel2); color:var(--pv-text); padding:8px 11px; border-radius:7px; cursor:pointer; text-decoration:none; line-height:normal; }
:is(.preview-shell,.preview-standalone) :is(button,.pv-button,.button):hover { border-color:#46617e; }
:is(.preview-shell,.preview-standalone) :is(button,.pv-button,.button,.primary-review):is(.primary,.primary-review) { background:var(--pv-gold); border-color:var(--pv-gold); color:var(--pv-primary-text); font-weight:800; }
:is(.preview-shell,.preview-standalone) :is(.danger-button,.destructive,button.danger) { border-color:var(--pv-red); color:var(--pv-red); background:var(--pv-danger-bg); }
:is(.preview-shell,.preview-standalone) :is(.compact,.action-small) { padding:5px 9px; font-size:12px; }
:is(.preview-shell,.preview-standalone) :is(button,input,select,textarea,a):focus-visible { outline:2px solid var(--pv-focus); outline-offset:2px; }
:is(.preview-shell,.preview-standalone) :is(button,input,select,textarea):disabled { opacity:.55; cursor:not-allowed; }
:is(.preview-shell,.preview-standalone) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) { min-width:0; max-width:100%; padding:9px; border:1px solid var(--pv-line); border-radius:7px; background:var(--pv-control); color:var(--pv-text); color-scheme:inherit; }
:is(.preview-shell,.preview-standalone) :is(input[type=checkbox],input[type=radio]) { accent-color:var(--pv-gold); }
:is(.preview-shell,.preview-standalone) option { background:var(--pv-panel); color:var(--pv-text); }
:is(.preview-shell,.preview-standalone) textarea { width:100%; resize:vertical; }
/* Long-form notes and conversation entry share a readable 12pt text size. */
:is(.preview-shell,.preview-standalone) textarea:is([name=notes],[name=student_notes],[name=note_text],[name=coach_response],[name=student_question]) { font-size:16px; }
:is(.preview-shell,.preview-standalone) :is([aria-invalid=true],.invalid) { border-color:var(--pv-red); }
:is(.preview-shell,.preview-standalone) .form-error { color:var(--pv-red); font-weight:700; margin:8px 0; }
:is(.preview-shell,.preview-standalone) :where(.pv-card,.pv-flow-card,.flow-card,.pv-stat) { background:var(--pv-panel); color:var(--pv-text); border:1px solid var(--pv-line); border-radius:11px; padding:16px; min-width:0; }
:is(.preview-shell,.preview-standalone) :is(.pv-card,.flow-card) h3 { margin:4px 0 12px; }
:is(.preview-shell,.preview-standalone) .pv-stat { text-decoration:none; }
:is(.preview-shell,.preview-standalone) .pv-stat b { display:block; font-size:22px; margin-top:5px; }
:is(.preview-shell,.preview-standalone) :is(.pv-stat,.student-stat):hover { border-color:var(--pv-gold); }
:is(.preview-shell,.preview-standalone) :is(.empty,.pv-muted,.muted) { color:var(--pv-muted); }
:is(.preview-shell,.preview-standalone) :is(.table-head,.match-head,.pv-match-head,.pv-login-head) { color:var(--pv-muted); font-size:10px; font-weight:800; letter-spacing:.08em; }
:is(.preview-shell,.preview-standalone) :is(.table-row,.match-row,.pv-match-row,.flow-row,.account-row,.ticket-row) { border-color:var(--pv-line); color:var(--pv-text); }
:is(.preview-shell,.preview-standalone) :is(.table-row,.match-row,.pv-match-row,.flow-row):hover { background:var(--pv-hover); }
:is(.preview-shell,.preview-standalone) :is(.table-row,.match-row,.pv-match-row,.flow-row).selected { background:var(--pv-panel2); }
:is(.preview-shell,.preview-standalone) :is(.badge,.status-badge,.severity-badge,.error-badge,.blunder-badge) { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--pv-line); border-radius:99px; padding:4px 7px; font-size:12px; }
:is(.preview-shell,.preview-standalone) :is(.badge,.status-badge,.severity-badge).error { color:var(--pv-red); background:var(--pv-danger-bg); }
:is(.preview-shell,.preview-standalone) :is(.badge,.status-badge,.severity-badge).blunder { color:var(--pv-blunder); background:var(--pv-danger-bg); }
:is(.preview-shell,.preview-standalone) :is(.success,.answered,.ready,.completed).status-badge { color:var(--pv-green); background:var(--pv-success-bg); }
:is(.preview-shell,.preview-standalone) :is(.pv-question-dot,.qa-dot) { display:inline-block; width:8px; height:8px; border-radius:50%; vertical-align:1px; }
:is(.preview-shell,.preview-standalone) :is(.pv-question-dot.unanswered,.qa-dot.qa-open) { background:var(--pv-red); }
:is(.preview-shell,.preview-standalone) :is(.pv-question-dot.answered,.qa-dot.qa-answered) { background:var(--pv-green); }
:is(.preview-shell,.preview-standalone) :is(dialog,.filter-panel) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { background:var(--pv-panel); }
/* Native <dialog> and Preview-style hidden overlay share the same panel. */
:is(.preview-shell,.preview-standalone) dialog, :is(.preview-shell,.preview-standalone) .filter-panel { --dialog-width:620px; width:min(var(--dialog-width),calc(100vw - 32px)); max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); overflow:auto; margin:auto; background:var(--pv-panel); color:var(--pv-text); border:1px solid var(--pv-line); border-radius:12px; padding:20px; box-shadow:0 24px 70px #000a; }
:is(.preview-shell,.preview-standalone) .dialog-wide { --dialog-width:720px; }
:is(.preview-shell,.preview-standalone) dialog::backdrop { background:#050a10cc; }
:is(.preview-shell,.preview-standalone) .modal { position:fixed; inset:0; z-index:70; background:#050a10cc; display:grid; place-items:center; padding:16px; }
:is(.preview-shell,.preview-standalone) .modal[hidden] { display:none; }
:is(.preview-shell,.preview-standalone) dialog form { display:grid; gap:12px; margin:0; }
:is(.preview-shell,.preview-standalone) :is(dialog,.filter-panel) label { display:grid; gap:6px; color:var(--pv-secondary); font-size:12px; font-weight:700; }
:is(.preview-shell,.preview-standalone) :is(dialog,.filter-panel) :is(h2,h3) { margin:0; }
:is(.preview-shell,.preview-standalone) :is(.dialog-head,.dialog-title) { display:flex; align-items:center; justify-content:space-between; gap:12px; }
:is(.preview-shell,.preview-standalone) :is(.filter-actions,.dialog-actions) { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; flex-wrap:wrap; }
:is(.preview-shell,.preview-standalone) .filter-help { color:var(--pv-muted); margin:8px 0 18px; }
:is(.preview-shell,.preview-standalone) .filter-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
:is(.preview-shell,.preview-standalone) .filter-grid label { display:grid; gap:6px; }
:is(.preview-shell,.preview-standalone) .ba-announcement { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:16px 0 0; padding:12px 16px; background:var(--pv-panel); border:1px solid var(--pv-gold); border-radius:10px; color:var(--pv-text); }
:is(.preview-shell,.preview-standalone) .ba-announcement>span { min-width:0; overflow-wrap:anywhere; line-height:1.45; }
:is(.preview-shell,.preview-standalone) .ba-announcement strong { color:var(--pv-gold); }
:is(.preview-shell,.preview-standalone) .ba-announcement button { flex:none; }
@media(max-width:480px) { :is(.preview-shell,.preview-standalone) .filter-grid { grid-template-columns:1fr; } :is(.preview-shell,.preview-standalone) .ba-announcement { align-items:flex-start; flex-direction:column; gap:8px; } }

:is(.preview-shell,.preview-standalone) :is(dialog,.filter-panel) textarea { min-height:150px; }
:is(.preview-shell,.preview-standalone) .dialog-head h3 { font-size:20px; margin:4px 0; }
