/* Local presentation layer. Business handlers, permission gates and competitionDraft stay unchanged. */
#studentArchivePage .student-management {
  --sm-ink:#2d4058;
  --sm-muted:#65758b;
  --sm-line:#e4eaf1;
  --sm-accent:#205da9;
  --sm-wash:#f2f6fc;
  margin-top:8px;
}
#studentArchivePage .cw-mode-switch { margin-bottom:12px; border-color:var(--sm-line,#e4eaf1); background:#f4f6f9; box-shadow:none; }
#studentArchivePage .cw-mode-switch button { min-height:38px; font-size:13px; font-weight:500; }
#studentArchivePage .cw-mode-switch button[aria-selected="true"] { color:#205da9; box-shadow:0 1px 3px #23364d0c; }
#studentArchivePage .student-management .sm-breadcrumb { margin-bottom:16px; font-size:13px; }
#studentArchivePage .student-management .sm-student-header { padding-bottom:18px; margin-bottom:16px; border-color:var(--sm-line); }
#studentArchivePage .student-management .sm-student-header h3 { font-size:20px; font-weight:600; color:var(--sm-ink); }
#studentArchivePage .student-management .sm-student-title .sm-neutral { background:#f2f5f8; color:#718095; font-size:11px; font-weight:400; }
#studentArchivePage .student-management .sm-student-header p { color:var(--sm-muted); font-size:12px; }
#studentArchivePage .student-management .sm-student-header .sm-student-id { font-size:11px; }
#studentArchivePage .student-management .sm-avatar-large { width:46px; height:46px; font-size:20px; background:#eef4fd; }
#studentArchivePage .student-management .sm-header-actions button { min-height:38px; font-size:13px; font-weight:500; border-radius:6px; }
#studentArchivePage .student-management .student-archive-control-card { align-items:center; gap:12px; padding:0 0 14px; margin:0; }
#studentArchivePage .student-management .student-archive-control-card label { margin:0 0 6px; font-size:12px; color:var(--sm-muted); font-weight:500; }
#studentArchivePage .student-management .student-archive-control-card input { min-height:38px!important; padding:7px 10px; margin:0; border:1px solid #d8e1ed; border-radius:6px; font-size:13px; background:#fff; box-shadow:none; }
#studentArchivePage .student-management .student-archive-quick-actions { gap:8px; }
#studentArchivePage .student-management .student-archive-quick-actions .small-btn { margin:0; min-height:36px!important; padding:7px 11px!important; border:1px solid #d8e1ed!important; border-radius:6px!important; background:#fff!important; color:#42536b!important; box-shadow:none!important; font-size:12px!important; font-weight:500; }

/* The accepted More menu is not restyled here; only its sibling primary tabs change. */
#studentArchivePage .student-management .student-archive-tab-shell { align-items:center; flex-wrap:nowrap; gap:12px; padding-bottom:12px; border-color:var(--sm-line); }
#studentArchivePage .student-management .student-archive-tabs { flex:1 1 0; flex-wrap:nowrap; overflow-x:auto; min-width:0; gap:3px; margin-top:0; border:0; scrollbar-width:thin; }
#studentArchivePage .student-management .student-archive-tabs > .student-archive-tab:not([data-student-archive-tab="competitionDraft"]) { flex-shrink:0; min-height:38px; padding:8px 11px; border:1px solid transparent; border-radius:5px; color:#65758b; background:transparent; font-size:13px; font-weight:500; line-height:20px; white-space:nowrap; }
#studentArchivePage .student-management .student-archive-tabs > .student-archive-tab.active:not([data-student-archive-tab="competitionDraft"]) { border-color:#d9e6f7; background:#edf4fe; color:var(--sm-accent); box-shadow:none; }
#studentArchivePage .student-management .student-archive-tabs > .student-archive-tab:not([data-student-archive-tab="competitionDraft"])::after { display:none; content:none; }

/* Flatten section wrappers, retain borders only for repeated records and framed tools. */
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) { padding-top:20px; min-width:0; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) :is(.student-archive-card,.student-profile-card) { background:transparent!important; border:0; border-bottom:1px solid var(--sm-line); border-radius:0; box-shadow:none!important; padding:0 0 20px; margin:0 0 20px; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) .student-archive-card:last-child { margin-bottom:0; }
#studentArchivePage .student-management .student-archive-two-col { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; align-items:start; margin-bottom:0; }
#studentArchivePage .student-management .student-archive-section-head { margin-bottom:20px; align-items:start; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) h3 { margin-top:0; margin-bottom:14px; color:var(--sm-ink); font-size:16px!important; font-weight:600; line-height:1.6; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) > .student-archive-section-head h3 { font-size:18px!important; margin-bottom:5px; }
#studentArchivePage .student-management .student-archive-section-head p { margin:0; color:var(--sm-muted); font-size:12px; line-height:1.8; }
#studentArchivePage .student-management .student-archive-muted-pill { padding:4px 7px; border-radius:4px; font-size:11px; color:#708095; background:#f2f5f9; box-shadow:none; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) :is(.student-archive-loop-card,.student-archive-overview-card,.student-archive-workbench-card,.student-archive-board-row,.student-archive-script-card) { border-radius:7px; border:1px solid var(--sm-line); background:#fff; box-shadow:none; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) :is(.student-archive-loop-card,.student-archive-overview-card,.student-archive-workbench-card,.student-archive-script-card) { padding:16px; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) :is(.student-archive-parent-card-text,.student-profile-summary) { border:1px solid var(--sm-line); border-radius:6px; background:#f8fafc; box-shadow:none; padding:14px; color:#52657e; font-size:13px; line-height:1.85; overflow-wrap:anywhere; }
#studentArchivePage .student-management .student-archive-list-row { padding:10px 0; gap:14px; font-size:13px; border-color:#edf0f4; }
#studentArchivePage .student-management .student-archive-board-row { padding:12px 14px; font-size:13px; text-align:left; min-width:0; }
#studentArchivePage .student-management .student-archive-empty { border-radius:6px; border:1px dashed #dde5ef; background:#fafbfd; padding:24px 16px; color:var(--sm-muted); font-size:13px; line-height:1.8; }

/* Command styles are isolated from competition controls and data-list row buttons. */
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) button:where(.small-btn,.gray-btn,.danger-btn,.btn,.sm-primary,.sm-secondary):not([hidden]) { display:inline-flex!important; flex:0 1 auto!important; align-items:center; justify-content:center; gap:6px; width:auto!important; max-width:100%; min-height:38px!important; padding:8px 12px!important; margin:0 6px 6px 0; border:1px solid #d8e1ed!important; border-radius:6px!important; background:#fff!important; background-image:none!important; color:#42536b!important; box-shadow:none!important; font-size:13px!important; font-weight:500!important; line-height:20px; white-space:normal; text-align:center; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) button:is(.generate-btn,.sm-primary) { background:#f1f6fd!important; color:#205da9!important; border-color:#c6d8f0!important; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) button.danger-btn { background:#fff!important; color:#a93a47!important; border-color:#ebd3d7!important; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) button:disabled { opacity:.5; cursor:not-allowed; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) [hidden] { display:none!important; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) .actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:16px 0; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) .actions button { margin:0; }
#studentArchivePage .student-management :is(.sm-section-heading h3,.cw-section h3) { font-size:16px!important; font-weight:600; }
#studentArchivePage .student-management :is(.sm-text-button,.sm-section-heading button,.sm-record-counts button) { font-size:13px; color:#2c66af; }

/* Keep checkbox/radio/file/hidden controls out of the legacy minimum-height overrides. */
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),select,textarea) { min-width:0; max-width:100%; min-height:40px!important; padding:9px 11px; margin:0; border:1px solid #d8e1ed!important; border-radius:6px!important; background:#fff; color:#3b506b; font-size:14px!important; font-weight:400; line-height:1.7; box-shadow:none!important; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) textarea { width:100%; min-height:100px!important; resize:vertical; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) textarea[readonly] { background:#f8fafc; min-height:76px!important; }
#studentArchivePage .student-management #counselorDraftOutput { min-height:180px!important; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) .input-icon-wrap :is(input,select) { padding-left:38px; }
#studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) label { color:var(--sm-muted); font-size:12px; font-weight:500; }
#studentArchivePage .student-management .student-profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 22px; }
#studentArchivePage .student-management .student-profile-grid > div { min-width:0; }
#studentArchivePage .student-management .student-profile-grid label { display:block; margin:0 0 7px; }
#studentArchivePage .student-management .student-profile-avatar-row { padding:16px 0; margin:0 0 20px; border:0; border-bottom:1px solid var(--sm-line); border-radius:0; background:transparent; }
#studentArchivePage .student-management .student-profile-avatar-controls strong { font-size:14px; }
#studentArchivePage .student-management .student-profile-avatar-controls span { font-size:12px; color:var(--sm-muted); line-height:1.7; }
#studentArchivePage .student-management .student-import-panel { padding:18px 0 0; border:0; border-top:1px solid var(--sm-line); border-radius:0; background:transparent; box-shadow:none; }

/* List and factual workspace: identical typography and border rhythm. */
#studentArchivePage .student-management > .student-archive-master-panel { border-color:var(--sm-line); border-radius:7px; background:#fff; }
#studentArchivePage .student-management .student-archive-master-head { padding:18px 18px 10px; }
#studentArchivePage .student-management .student-archive-master-head h3 { font-size:18px; font-weight:600; color:var(--sm-ink); }
#studentArchivePage .student-management .student-archive-master-search { margin:0 18px 12px; }
#studentArchivePage .student-management .student-archive-master-filters { padding:0 18px 16px; gap:8px; }
#studentArchivePage .student-management .student-archive-master-filters select { height:38px; border-color:#d8e1ed; color:#52657e; font-size:13px; }
#studentArchivePage .student-management :is(.sm-table,.cw-table) { font-size:13px; }
#studentArchivePage .student-management :is(.sm-table,.cw-table) th { background:#f6f8fb; color:#66768a; font-size:12px; font-weight:500; border-color:var(--sm-line); }
#studentArchivePage .student-management :is(.sm-table,.cw-table) td { border-color:#edf1f5; color:#52657e; }
#studentArchivePage .student-management .sm-table td { padding:14px 18px; }
#studentArchivePage .student-management .sm-student-link { font-size:14px; font-weight:500; }
#studentArchivePage .student-management :is(.sm-facts,.cw-student-facts) { padding:0 0 20px; border-color:var(--sm-line); }
#studentArchivePage .student-management .sm-facts strong { font-size:23px; font-weight:600; }
#studentArchivePage .student-management :is(.sm-facts,.cw-student-facts) span { color:var(--sm-muted); font-size:12px; }
#studentArchivePage .student-management :is(.sm-workspace-grid,.cw-card-columns) { gap:24px; padding-top:20px; }
#studentArchivePage .student-management :is(.sm-workspace-aside,.cw-plan-column) { padding-left:24px; border-color:var(--sm-line); }
#studentArchivePage .student-management .sm-activity-item { padding-bottom:20px; }
#studentArchivePage .student-management .sm-activity-meta { font-size:11px; }
#studentArchivePage .student-management :is(.sm-activity-meta,.sm-activity-meta time,.sm-table small,.cw-table small),
#studentArchivePage .student-management #managementSummary .sm-muted,
#studentArchivePage .student-management #counselorStudentPanel .cw-muted,
#studentArchivePage .student-management .cw-workbench .cw-muted { color:var(--sm-muted); }
#studentArchivePage .student-management .sm-activity-body h4 { font-size:14px; font-weight:500; }
#studentArchivePage .student-management .sm-activity-body p { color:#5c6e85; font-size:13px; }
#studentArchivePage .student-management .cw-workbench-heading h3 { font-size:18px; font-weight:600; }
#studentArchivePage .student-management .cw-task-tabs button { border-radius:5px; font-weight:400; }
#studentArchivePage .student-management .cw-task-tabs button.active { color:#205da9; background:#edf4fe; border-color:#d9e6f7; }

/* Legacy facts, record lists and secondary boards keep their original content and rules. */
#studentArchivePage .student-management .stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; border-block:1px solid var(--sm-line); padding:16px 0; margin:0 0 22px; }
#studentArchivePage .student-management .stats-grid .stat-card { border:0; border-radius:0; background:transparent!important; box-shadow:none!important; padding:0 18px; }
#studentArchivePage .student-management .stats-grid .stat-card + .stat-card { border-left:1px solid var(--sm-line); }
#studentArchivePage .student-management .stats-grid .stat-num { color:#334b66; font-size:24px; font-weight:600; line-height:1.5; }
#studentArchivePage .student-management .stats-grid .stat-label { margin-top:5px; color:var(--sm-muted); font-size:12px; }
#studentArchivePage .student-management #archiveHistoryList .card { border:1px solid var(--sm-line); border-radius:7px; padding:16px; margin:0 0 12px; background:#fff!important; box-shadow:none!important; }
#studentArchivePage .student-management #archiveHistoryList .card-title { color:var(--sm-ink); font-size:14px; font-weight:500; }
#studentArchivePage .student-management #archiveHistoryList .card-meta { color:var(--sm-muted); font-size:12px; line-height:1.8; }
#studentArchivePage .student-management .archive-feedback-fulltext summary { color:#2d6bb5; font-size:12px; }
#studentArchivePage .student-management .student-archive-filter-row { gap:6px; margin-bottom:18px; }
#studentArchivePage .student-management .student-archive-filter-chip { min-height:34px; border:1px solid transparent; border-radius:5px; padding:6px 10px; font-size:12px; color:#718095; background:#f5f7fa; }
#studentArchivePage .student-management .student-archive-filter-chip.active { color:#205da9; border-color:#d9e6f7; background:#edf4fe; }
#studentArchivePage .student-management .student-crm-hero { padding:18px 0; border:0; border-block:1px solid var(--sm-line); border-radius:0; background:transparent; box-shadow:none; }
#studentArchivePage .student-management .student-crm-hero h3 { font-size:18px!important; }
#studentArchivePage .student-management :is(.student-crm-score-card,.student-crm-metric-card,.student-crm-script-card,.student-crm-course-card) { border-radius:7px; box-shadow:none; border-color:var(--sm-line); background:#fff; }

/* Evidence controls share the visual language, not new conclusions or authorization. */
#studentArchivePage .student-management #growthEvidenceWorkspace { padding:0; color:#42536b; }
#studentArchivePage .student-management #growthEvidenceWorkspace .ge-modes { width:fit-content; max-width:100%; gap:4px; padding:4px; margin:16px 0; border:1px solid var(--sm-line); border-radius:6px; background:#f4f6f9; }
#studentArchivePage .student-management #growthEvidenceWorkspace .ge-modes button { border:1px solid transparent; background:transparent; color:#6b7b91; border-radius:4px; font-size:13px; font-weight:500; }
#studentArchivePage .student-management #growthEvidenceWorkspace .ge-modes button[aria-pressed="true"] { background:#fff; border-color:#dce6f3; color:#205da9; box-shadow:0 1px 3px #23364d0c; }
#studentArchivePage .student-management #growthEvidenceWorkspace button { border-color:#d8e1ed; color:#42536b; background:#fff; border-radius:6px; min-height:38px; font-size:13px; }
#studentArchivePage .student-management #growthEvidenceWorkspace :is(.ge-record,.ge-summary,.ge-quote,.ge-report) { border-color:var(--sm-line); }
#studentArchivePage .student-management #growthEvidenceWorkspace :is(summary,.ge-meta) { color:#6e8198; font-size:12px; }
#studentArchivePage .student-management #growthEvidenceWorkspace .ge-empty { border:1px dashed #dde5ef; border-radius:6px; background:#fafbfd; color:var(--sm-muted); font-size:13px; }

@media(hover:hover) and (pointer:fine) {
  #studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) button:is(.small-btn,.gray-btn,.btn,.sm-secondary):not(:disabled):hover { background:#f4f7fb!important; border-color:#bccde3!important; }
  #studentArchivePage .student-management .student-archive-tabs > .student-archive-tab:not(.active):not([data-student-archive-tab="competitionDraft"]):hover { background:#f4f6f9; color:#3e5572; }
}
@media(max-width:760px) {
  #studentArchivePage .cw-mode-switch { margin-bottom:8px; }
  #studentArchivePage .student-management .sm-breadcrumb { margin-bottom:14px; font-size:12px; }
  #studentArchivePage .student-management .sm-student-header { gap:10px; padding-bottom:14px; margin-bottom:12px; }
  #studentArchivePage .student-management .sm-student-header h3 { font-size:18px; }
  #studentArchivePage .student-management .sm-header-actions { gap:6px; }
  #studentArchivePage .student-management .sm-header-actions button { min-height:42px; }
  #studentArchivePage .student-management .student-archive-tab-shell { gap:6px; padding-bottom:10px; }
  #studentArchivePage .student-management .student-archive-tabs > .student-archive-tab:not([data-student-archive-tab="competitionDraft"]) { min-height:42px; padding:9px 8px; font-size:12px; }
  #studentArchivePage .student-management .student-archive-two-col { grid-template-columns:minmax(0,1fr); gap:0; }
  #studentArchivePage .student-management .student-profile-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
  #studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) { padding-top:18px; }
  #studentArchivePage .student-management .student-archive-section-head { margin-bottom:18px; gap:8px; }
  #studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) > .student-archive-section-head h3 { font-size:17px!important; }
  #studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) button:is(.small-btn,.gray-btn,.danger-btn,.btn,.sm-primary,.sm-secondary) { min-height:42px!important; }
  #studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),select) { min-height:42px!important; font-size:16px!important; }
  #studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),select,textarea) { font-size:16px!important; }
  #studentArchivePage .student-management :is(.sm-workspace-aside,.cw-plan-column) { padding-left:0; }
  #studentArchivePage .student-management .sm-table td { padding:13px 12px; }
  #studentArchivePage .student-management .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:18px; }
  #studentArchivePage .student-management .stats-grid .stat-card:nth-child(3) { border-left:0; }
  #studentArchivePage .student-management .student-archive-tab-panel:not([data-student-archive-panel="competitionDraft"]) :is(.student-archive-loop-card,.student-archive-overview-card,.student-archive-workbench-card,.student-archive-script-card) { padding:14px; }
}
