/* Scoped Consulting workspace. Does not restyle hearing sheets or progress pages. */
.cw-workspace { --cw-ink:#142437; --cw-muted:#55667a; --cw-border:#dbe4ee; --cw-accent:#115e59; color:var(--cw-ink); font-family:-apple-system,BlinkMacSystemFont,"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif; font-size:14px; line-height:1.65; }
.cw-workspace *, .cw-admin-shell * { box-sizing:border-box; min-width:0; }
.cw-workspace [hidden], .cw-admin-shell [data-cw-panel][hidden] { display:none !important; }
.cw-workspace :is(h1,h2,h3,p) { margin:0; }
body .cw-workspace :is(h2,h3,strong) { color:var(--cw-ink) !important; }
.cw-workspace :is(button,input,select,textarea,a):focus-visible { outline:3px solid #0f766e; outline-offset:3px; }
.cw-workspace :is(input,select,textarea) { width:100%; border:1px solid var(--cw-border); border-radius:10px; padding:10px 12px; background:#fff; color:var(--cw-ink); font:inherit; }
.cw-workspace input[type=checkbox] { width:19px; height:19px; accent-color:#0f766e; margin:0; flex:0 0 19px; }
.cw-workspace textarea { min-height:84px; resize:vertical; }
.cw-workspace button { font:inherit; }
.cw-admin-shell { width:min(1460px,100%); margin:0 auto; display:grid; grid-template-columns:238px minmax(0,1fr); gap:24px; padding:24px; align-items:start; }
.cw-sidebar { position:sticky; top:18px; border-radius:18px; border:1px solid var(--cw-border); background:#fff; padding:18px; }
.cw-brand { margin-bottom:22px; }
.cw-brand small { display:block; letter-spacing:.12em; color:var(--cw-muted); font-size:11px; }
.cw-brand strong { display:block; font-size:20px; }
.cw-sidebar .cw-field { margin-bottom:18px; }
.cw-sidebar nav { display:grid; gap:6px; margin:18px -7px; }
.cw-sidebar .cw-tab { text-align:left; }
.cw-sidebar-note { border-top:1px solid var(--cw-border); padding-top:14px; font-size:12px; color:var(--cw-muted); }
.cw-content { display:grid; gap:20px; min-width:0; }
.cw-content > section { min-width:0; }
.cw-panel { border:1px solid var(--cw-border); border-radius:20px; padding:24px; background:#fff; box-shadow:0 8px 30px rgba(20,36,55,.04); }
.cw-panel-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:20px; }
.cw-panel-head h2 { font-size:22px; font-weight:800; letter-spacing:-.025em; }
.cw-panel-head p { margin-top:5px; color:var(--cw-muted); max-width:70ch; }
.cw-eyebrow { display:block; font-size:11px; font-weight:800; letter-spacing:.05em; color:var(--cw-muted); }
.cw-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:10px; margin-bottom:16px; }
.cw-toolbar > .cw-field { flex:1 1 220px; }
.cw-toolbar > .cw-field-small { flex:0 1 155px; }
.cw-field { display:grid; gap:6px; min-width:0; }
.cw-field-label { font-size:12px; font-weight:800; color:var(--cw-muted); }
.cw-button { display:inline-flex; gap:7px; align-items:center; justify-content:center; min-height:44px; border:1px solid var(--cw-border); border-radius:10px; padding:9px 14px; background:#fff; color:var(--cw-ink) !important; text-decoration:none; cursor:pointer; font-weight:700 !important; font-size:13px !important; line-height:1.55; }
.cw-button:hover:not(:disabled) { background:#f0f6f8; border-color:#90b3bb; }
.cw-button-primary { background:#115e59; color:#fff !important; border-color:#115e59; }
.cw-button-primary:hover:not(:disabled) { background:#0d4b47; color:#fff !important; }
.cw-button-quiet { background:transparent; }
.cw-button-danger { color:#a32336 !important; border-color:#eec7cd; }
.cw-button:disabled { opacity:.45; cursor:not-allowed; }
.cw-tab { display:flex; align-items:center; min-height:44px; padding:10px 12px; border:0; border-radius:10px; background:transparent; color:var(--cw-muted) !important; font-weight:750 !important; cursor:pointer; white-space:nowrap; }
.cw-tab[aria-selected=true] { background:#e7f3f0; color:#0c554f !important; }
.cw-tab:hover { background:#eff4f7; }
.cw-crumbs { display:flex; flex-wrap:wrap; gap:5px; align-items:center; padding:12px 0 16px; }
.cw-crumbs button { border:0; background:transparent; padding:5px; color:#0f5e72; font-size:12px; cursor:pointer; max-width:100%; overflow-wrap:anywhere; }
.cw-crumbs button[aria-current=page] { color:var(--cw-ink); font-weight:800; }
.cw-crumbs span { color:#8a99a9; }
.cw-notice { border:1px solid var(--cw-border); border-radius:12px; padding:13px 15px; margin:12px 0 !important; font-size:13px; white-space:pre-line; overflow-wrap:anywhere; color:var(--cw-ink) !important; background:#f4f8fc; }
.cw-notice-warning { border-color:#e5cf99; background:#fff8e8; color:#704d0f !important; }
.cw-notice-error { border-color:#efc3cb; background:#fff0f3; color:#922239 !important; }
.cw-notice-success { border-color:#acd9ca; background:#ecf8f1; color:#15593f !important; }
.cw-empty { display:grid; justify-items:center; gap:8px; text-align:center; padding:44px 18px; border:1px dashed var(--cw-border); border-radius:14px; background:#f8fafc; }
.cw-empty strong { font-size:15px; }
.cw-empty p { max-width:52ch; color:var(--cw-muted) !important; font-size:13px; }
.cw-list { display:grid; gap:10px; }
.cw-drive-list { border:1px solid var(--cw-border); border-radius:14px; overflow:hidden; }
.cw-drive-row { display:grid; grid-template-columns:24px 42px minmax(0,1fr) auto; gap:12px; align-items:center; padding:14px; background:#fff; border-top:1px solid var(--cw-border); }
.cw-drive-row:first-child { border-top:0; }
.cw-drive-row:has(input:checked) { background:#eff8f5; }
.cw-drive-name { border:0; padding:0; text-align:left; background:transparent; cursor:pointer; color:var(--cw-ink); font-weight:750 !important; font-size:14px !important; overflow-wrap:anywhere; }
.cw-drive-name:hover { text-decoration:underline; }
.cw-file-icon { display:inline-flex; align-items:center; justify-content:center; height:42px; width:42px; border-radius:11px; background:#edf2f8; color:#526a87; font-size:10px; font-weight:850; flex:none; }
.cw-icon-meeting_memo { color:#4a4099; background:#f0edff; }
.cw-icon-meeting_recording { color:#9a4154; background:#fceff3; }
.cw-icon-folder { color:#967121; background:#fff5d9; }
.cw-icon-link { color:#136778; background:#e7f5f7; }
.cw-muted { color:var(--cw-muted) !important; font-size:12px; }
.cw-selection-bar { position:sticky; bottom:12px; display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; background:#f0f7f5; border:1px solid #adcfc5; border-radius:14px; padding:13px 16px; margin-top:16px; box-shadow:0 8px 25px rgba(15,36,42,.08); z-index:10; }
.cw-badge { display:inline-flex; align-items:center; width:max-content; max-width:100%; gap:5px; padding:4px 8px; border-radius:7px; background:#eff4f7; color:#526779; font-size:11px; font-weight:750; }
.cw-badge-warning { background:#fff4d9; color:#876314; }
.cw-recipient-list { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.cw-resource { display:flex; gap:13px; align-items:flex-start; background:#fff; border:1px solid var(--cw-border); border-radius:14px; padding:18px; }
.cw-resource-content { flex:1; min-width:0; }
.cw-resource-title { font-size:15px; font-weight:800; line-height:1.65; overflow-wrap:anywhere; margin:3px 0 !important; }
.cw-description { color:#465c70 !important; font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.85; margin:7px 0 !important; }
.cw-meeting { border:1px solid var(--cw-border); background:#fff; border-radius:16px; overflow:hidden; }
.cw-meeting-summary { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:19px 20px; cursor:pointer; list-style:none; }
.cw-meeting-summary::-webkit-details-marker { display:none; }
.cw-meeting-summary::after { content:"＋"; color:#688394; font-size:18px; }
.cw-meeting[open] > .cw-meeting-summary::after { content:"−"; }
.cw-meeting-summary > div { flex:1; }
.cw-meeting-summary h3 { margin-top:4px !important; font-weight:850; font-size:17px; }
.cw-meeting-files { padding:0 15px 15px; display:grid; gap:9px; }
.cw-meeting-files .cw-resource { background:#f8fafc; }
.cw-dialog { width:min(900px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); border:1px solid var(--cw-border); border-radius:20px; padding:0; background:#fff; margin:auto; box-shadow:0 24px 100px #00142844; color:var(--cw-ink); }
.cw-dialog::backdrop { background:#081a32a6; }
.cw-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:18px 22px; border-bottom:1px solid var(--cw-border); }
.cw-dialog-head h2 { font-size:18px; line-height:1.6; overflow-wrap:anywhere; }
.cw-dialog-body { padding:20px 22px; display:grid; gap:13px; }
.cw-dialog-actions { position:sticky; bottom:0; background:#fff; display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; padding:16px 22px; border-top:1px solid var(--cw-border); }
.cw-dialog-actions:empty { display:none; }
.cw-preview { width:100%; height:min(65vh,640px); min-height:280px; border:1px solid var(--cw-border); border-radius:12px; background:#f1f5f8; }
.cw-confirm-list { margin:0; padding:12px 12px 12px 32px; border:1px solid var(--cw-border); border-radius:10px; background:#f8fafc; max-height:240px; overflow:auto; }
.cw-confirm-list li { overflow-wrap:anywhere; margin:4px 0; font-size:13px; }
.cw-dialog .cw-check-label { display:flex; gap:10px; align-items:flex-start; cursor:pointer; }
.cw-student-space { --cw-ink:#142437; background:#f4f7fa; border:1px solid #d7e2ed; border-radius:22px; padding:24px; margin-bottom:24px; }
.cw-student-space .cw-tabs { display:flex; gap:6px; margin:18px 0; padding:5px; background:#e6edf3; border-radius:12px; flex-wrap:wrap; }
.cw-student-space .cw-tab[aria-selected=true] { background:#fff; color:#155f58 !important; box-shadow:0 1px 5px #1424370c; }
.cw-student-space .cw-panel-head { margin-bottom:5px; }
.cw-student-tools { display:flex; gap:10px; align-items:end; margin-bottom:18px; }
.cw-student-tools .cw-field { flex:1; }
.cw-link-warning { margin-top:12px; color:var(--cw-muted); font-size:12px; }
@media (max-width:1023px) {
  .cw-admin-shell { grid-template-columns:1fr; padding:16px; gap:16px; }
  .cw-sidebar { position:static; padding:16px; }
  .cw-brand { margin-bottom:12px; }
  .cw-brand strong { font-size:18px; }
  .cw-sidebar .cw-field { margin-bottom:6px; }
  .cw-sidebar nav { display:flex; gap:4px; margin:12px -4px 0; flex-wrap:wrap; }
  .cw-sidebar-note { display:none; }
}
@media (max-width:600px) {
  .cw-admin-shell { padding:12px; }
  .cw-panel { padding:18px 14px; border-radius:16px; }
  .cw-panel-head h2 { font-size:19px; }
  .cw-toolbar { align-items:stretch; }
  .cw-toolbar > .cw-field { flex-basis:100%; }
  .cw-toolbar > .cw-field-small { flex:1 1 130px; }
  .cw-toolbar > .cw-button { flex:1 1 130px; }
  .cw-drive-row { grid-template-columns:22px 35px minmax(0,1fr); padding:12px 10px; gap:9px; }
  .cw-drive-row > .cw-row-actions { grid-column:2 / -1; display:flex; justify-content:flex-end; }
  .cw-file-icon { width:35px; height:35px; border-radius:9px; }
  .cw-selection-bar { bottom:6px; padding:10px; }
  .cw-selection-bar .cw-button { flex:1; }
  .cw-resource { flex-wrap:wrap; gap:10px; padding:14px; }
  .cw-resource > .cw-button { margin-left:45px; }
  .cw-resource-content { flex-basis:calc(100% - 45px); }
  .cw-student-space { padding:18px 12px; margin-left:0; margin-right:0; border-radius:16px; }
  .cw-student-space .cw-tabs { gap:2px; }
  .cw-tab { padding:9px 10px; font-size:12px !important; }
  .cw-meeting-summary { padding:15px; }
  .cw-meeting-files { padding:0 10px 10px; }
  .cw-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:15px; }
  .cw-dialog-head,.cw-dialog-body,.cw-dialog-actions { padding:15px; }
  .cw-dialog-head h2 { font-size:16px; }
  .cw-dialog-actions .cw-button { flex:1; }
  .cw-student-tools { flex-wrap:wrap; }
}
@media (max-width:600px) {
  #cw-section-hearing table { display:block; width:100%; min-width:0; }
  #cw-section-hearing table thead { display:none; }
  #cw-section-hearing table tbody { display:block; }
  #cw-section-hearing table tr { display:grid; grid-template-columns:minmax(0,1fr) auto; padding:10px 0; }
  #cw-section-hearing table td { display:block; padding:6px 12px; }
  #cw-section-hearing table td:first-child { grid-column:1 / -1; }
  #cw-section-hearing table td:nth-child(4) { grid-column:1; }
  #cw-section-hearing table td:last-child { grid-column:2; }
  #cw-section-hearing table td button { min-height:40px; }
}
/* Beat the existing page theme's !important paragraph colours without touching
   the hearing/progress pages or flattening category and warning colours. */
body .cw-workspace .cw-panel-head p,
body .cw-workspace .cw-muted,
body .cw-workspace .cw-sidebar-note,
body .cw-workspace .cw-empty p { color:#55667a !important; }
body .cw-workspace .cw-description { color:#465c70 !important; }
body .cw-workspace .cw-eyebrow,
body .cw-workspace .cw-field-label { color:#55667a !important; }
.cw-toolbar > .cw-button { align-self:end; }
.cw-selection-bar .cw-button { white-space:nowrap; min-width:132px; }
@media (max-width:600px) {
  .cw-sidebar nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cw-selection-bar > span { flex:1 1 100%; }
  .cw-selection-bar .cw-button { flex:1 1 100%; }
  .cw-dialog-actions .cw-button { flex:0 0 auto; white-space:nowrap; }
  .cw-dialog-actions .cw-button-primary { flex:1 1 auto; }
  body.cw-admin-page > header > div { flex-wrap:wrap; }
  body.cw-admin-page > header > div > div:last-child { flex-wrap:wrap; }
}
@media (prefers-reduced-motion:reduce) { .cw-workspace * { scroll-behavior:auto !important; transition:none !important; } }

/* Hosted Admin panels use the shell's viewport and scroll containers. These
   overrides deliberately do not apply to the student workspace. */
.consulting-admin-shell .cas-workspace-host .cw-panel { border:0; padding:0; box-shadow:none; border-radius:0; }
.consulting-admin-shell .cas-workspace-host .cw-panel-head { gap:12px; }
.consulting-admin-shell .cas-workspace-host .cw-panel-head h2 { font-size:18px; }
.consulting-admin-shell .cas-workspace-host .cw-selection-bar { bottom:0; }
.consulting-admin-shell .cw-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.consulting-admin-shell .cw-dialog-head,.consulting-admin-shell .cw-dialog-actions { flex-shrink:0; }
.consulting-admin-shell .cw-dialog-body { overflow:auto; min-height:0; overscroll-behavior:contain; }
.consulting-admin-shell .cw-dialog-actions { position:static; }
@media (max-width:767px) {
  .consulting-admin-shell .cas-workspace-host .cw-panel-head .cw-toolbar { width:100%; margin-bottom:0; }
  .consulting-admin-shell .cas-workspace-host .cw-panel-head .cw-toolbar .cw-button { flex:1 1 130px; }
}
@media (max-height:600px) {
  .consulting-admin-shell .cw-dialog { max-height:calc(100dvh - 16px); }
  .consulting-admin-shell .cw-dialog-head,.consulting-admin-shell .cw-dialog-actions { padding:10px 15px; }
}
/* Scoped MTG routing controls. Never affect the hearing edit forms. */
.cw-permission-plan { border:1px solid var(--cw-border,#d4dce6); border-radius:12px; padding:14px; background:#f4f8fc; display:grid; gap:10px; }
.cw-permission-plan h3 { font-size:14px; font-weight:800; }
.cw-permission-plan .cw-check-label { align-items:start; line-height:1.6; }
.cw-permission-plan .cw-check-label input { width:18px; height:18px; flex:none; margin-top:3px; }
.cw-auto-settings { display:grid; gap:12px; margin-top:20px; padding:16px; border:1px solid var(--cw-border); border-radius:14px; background:#f7fafc; }
.cw-auto-settings .cw-panel-head { margin:0; }
.cw-auto-settings h3 { font-size:17px; font-weight:800; }
.cw-auto-inputs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.cw-auto-settings .cw-check-label { display:flex; align-items:center; gap:10px; }
.cw-auto-settings .cw-toolbar { margin:0; }
.cw-auto-results { display:grid; gap:8px; }
.cw-auto-result { background:#fff; border:1px solid var(--cw-border); border-radius:10px; padding:12px; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; }
.cw-auto-result p { flex:1 1 100%; }
.cw-auto-settings #cw-auto-notice[data-tone=error] { color:#9f1239; }
.cw-auto-settings #cw-auto-notice[data-tone=success] { color:#065f46; }
@media(max-width:620px) { .cw-auto-inputs { grid-template-columns:minmax(0,1fr); } .cw-auto-settings { padding:12px; } .cw-auto-settings .cw-toolbar>.cw-button { flex:1 1 100%; } }
