/* Calm, readable operational tables. Loaded after the main MIS theme layers. */
.app-shell { --mis-table-line:#dee7e1; --mis-table-muted:#52665b; }
.app-shell .table-panel { border-radius:14px; }
.app-shell .table-scroll { position:relative; isolation:isolate; max-width:100%; max-height: min(65vh,680px); overflow:auto; scrollbar-gutter:stable; overscroll-behavior-inline:contain; }
.app-shell .table-scroll:focus-visible { outline:2px solid #286620; outline-offset:-2px; }
.app-shell .table-scroll.has-horizontal-scroll { border-bottom:2px solid #c5d5ca; }
.app-shell .data-table { font-variant-numeric:tabular-nums; }
.app-shell .data-table thead th { position:sticky; top:0; z-index:2; background:#f0f5f1; color:#52665b; padding:12px 16px; font-size:11px; line-height:1.5; letter-spacing:.025em; text-transform:none; border-color:var(--mis-table-line); }
.app-shell .data-table td,.app-shell .data-table tbody th { padding:14px 16px; font-size:13px; line-height:1.55; border-color:var(--mis-table-line); overflow-wrap:anywhere; }
.app-shell .data-table td strong { font-size:13px; font-weight:600; }
.app-shell .data-table .table-sub,.app-shell .table-student-link small,.app-shell .student-cell small { font-size:11px; line-height:1.5; color:var(--mis-table-muted); }
.app-shell .data-table tbody tr:nth-child(even) { background:#f8faf8; }
.app-shell .data-table tbody tr:focus-within,.app-shell .data-table tbody tr:hover { background:#edf4ee; }
.app-shell .data-table tbody tr:hover td { background:inherit; }
.app-shell .data-table.mis-pin-identity>:is(thead,tbody)>tr>:first-child { position:sticky; left:0; z-index:1; background:#fff; min-width:160px; max-width:280px; border-right:1px solid var(--mis-table-line); }
.app-shell .data-table.mis-pin-identity>thead>tr>:first-child { z-index:3; background:#f0f5f1; }
.app-shell .data-table.mis-pin-identity>tbody>tr:nth-child(even)>:first-child { background:#f8faf8; }
.app-shell .data-table.mis-pin-identity>tbody>tr:focus-within>:first-child,.app-shell .data-table.mis-pin-identity>tbody>tr:hover>:first-child { background:#edf4ee; }
.app-shell .table-student-link { min-height:44px; max-width:100%; white-space:normal; }
.app-shell .student-avatar { width:34px; height:34px; flex-shrink:0; font-size:11px; }
.app-shell .table-sort { display:flex; gap:12px; align-items:center; width:100%; min-height:32px; padding:0; background:none; border:0; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.app-shell .table-sort span { margin-left:auto; color:#55765d; }
.app-shell th[aria-sort=ascending],.app-shell th[aria-sort=descending] { color:#24562f; }
.app-shell .student-mobile-sort { display:none; }
.app-shell .table-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-top:1px solid var(--mis-table-line); font-size:12px; color:var(--mis-table-muted); background:#fff; }
.app-shell .table-pagination>div { display:flex; gap:8px; }
.app-shell .table-pagination label { display:flex; align-items:center; gap:8px; }
.app-shell .table-pagination select { min-height:40px; border:1px solid var(--mis-table-line); border-radius:7px; padding:4px 9px; background:#fff; color:inherit; font:inherit; }
.app-shell .table-pagination .button { min-height:40px; font-size:12px; }
.app-shell .filter-search input { min-height:36px; font-size:13px; }
.app-shell .select-filter span { font-size:11px; text-transform:none; letter-spacing:0; }
.app-shell .select-filter select { min-height:42px; font-size:13px; font-weight:500; }
.app-shell .filter-result { font-size:12px; }
.app-shell .filter-bar { gap:12px; }
.app-shell :is(.data-table,.table-pagination,.filter-bar) :is(button,input,select):focus-visible { outline:2px solid #286620; outline-offset:2px; }
@media(max-width:1100px) {
  .app-shell .data-table :is(button,select,input) { min-height:44px; }
  .app-shell .data-table td,.app-shell .data-table thead th { padding:12px; }
}
@media(max-width:600px) {
  .app-shell .student-mobile-sort { display:flex; grid-column:1 / -1; }
  .app-shell .table-scroll:has(.student-table) { max-height:none; overflow:visible; border-bottom:0; }
  .app-shell .student-table { min-width:0; width:100%; }
  .app-shell .student-table thead { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); }
  .app-shell .student-table tbody { display:block; }
  .app-shell .student-table tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:16px; gap:14px 18px; border-bottom:1px solid var(--mis-table-line); background:#fff; }
  .app-shell .student-table tbody tr:last-child { border-bottom:0; }
  .app-shell .student-table tbody td { padding:0; border:0; min-width:0; font-size:13px; }
  .app-shell .student-table.mis-pin-identity>tbody>tr>:first-child { position:static; min-width:0; max-width:none; border:0; background:transparent; grid-column:1 / -1; }
  .app-shell .student-table tbody td[data-label]::before { content:attr(data-label); display:block; color:var(--mis-table-muted); font-size:11px; font-weight:500; margin-bottom:4px; }
  .app-shell .student-table td[data-label=Signals] { grid-column:1 / -1; }
  .app-shell .student-table .row-chevron { display:none; }
  .app-shell .student-table .table-student-link { width:100%; }
  .app-shell .student-table .table-student-link strong { font-size:14px; }
  .app-shell .table-pagination { padding:14px; gap:14px; }
  .app-shell .table-pagination>div { width:100%; }
  .app-shell .table-pagination .button { flex:1; }
  .app-shell .filter-search input,.app-shell .select-filter select { font-size:16px; }
}
@media print {
  .app-shell .table-scroll { max-height:none; overflow:visible; }
  .app-shell .data-table :is(th,td) { position:static!important; }
  .app-shell .table-pagination { display:none; }
}
.app-shell .table-scroll.md-cohort-scroll { max-height:360px; }
.completion-controls input[type=date],.attendance-completion>.select-filter input[type=date] { min-height:44px; max-width:100%; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font:inherit; font-size:14px; }
@media(max-width:600px) { .completion-controls input[type=date] { width:100%; min-width:0; font-size:16px; } }
.completion-kind-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:22px 0; }
.completion-kind-summary>div { border:1px solid var(--line); border-radius:12px; padding:18px; background:#f7faf7; }
.completion-kind-summary h2 { margin:0 0 12px; font-size:14px; }
.completion-kind-summary strong { font-size:22px; font-variant-numeric:tabular-nums; }
.completion-kind-summary p { margin:8px 0 0; font-size:12px; color:var(--muted); }
@media(max-width:600px) { .completion-kind-summary { grid-template-columns:minmax(0,1fr); } }

/* Native operational shell: keep real controls visible after the legacy visual theme. */
html { scrollbar-width:auto; }
html::-webkit-scrollbar { width:10px; height:10px; }
.app-shell .sidebar { display:flex; flex-direction:column; padding:28px 18px 18px; overflow-y:auto; }
.app-shell .side-nav { flex:1; }
.app-shell .sidebar-bottom { display:grid; gap:4px; margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }
.app-shell .sidebar-status { font-size:10px; }
.app-shell .topbar { gap:16px; border-bottom:1px solid var(--line); min-height:76px; }
.app-shell .topbar-title { display:flex!important; flex-direction:column; gap:4px; min-width:90px; }
.app-shell .topbar-title span { font-size:10px; }
.app-shell .topbar-title strong { font-size:15px; }
.app-shell .global-search { display:flex!important; min-width:0; width:min(440px,45%); margin-left:auto; }
.app-shell .global-search input { min-height:40px; font-size:13px; }
.app-shell .top-actions { margin-left:0; flex-shrink:0; }
.app-shell .context-bar { display:flex; flex-wrap:wrap; gap:12px; margin:0; padding:14px 0; border-bottom:1px solid var(--line); }
.app-shell .context-control select,.app-shell .context-control input { font-size:12px; max-width:180px; min-height:36px; }
.app-shell .context-count { margin-left:auto; }
.app-shell .profile-menu { z-index:30; width:280px; max-width:calc(100vw - 24px); }
.app-shell .profile-menu .menu-note { overflow-wrap:anywhere; }
.app-shell .menu-link { min-height:44px; }
.ms-preferences,.ms-account,.ms-admin { max-width:900px; }
.ms-intro h2,.ms-account h2,.ms-admin h2 { margin:0 0 9px; font-size:20px; }
.ms-intro p,.ms-account>p { margin:0 0 24px; color:#53665b; font-size:13px; line-height:1.7; }
.ms-preferences fieldset { margin:24px 0; padding:22px 0 0; border:0; border-top:1px solid var(--line); min-width:0; }
.ms-preferences legend { padding:0 16px 0 0; font-weight:650; font-size:15px; }
.ms-preferences fieldset>p { color:#53665b; font-size:13px; line-height:1.7; margin:0 0 16px; }
.ms-field-grid,.ms-check-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 26px; }
.ms-field { display:flex; flex-direction:column; gap:8px; font-size:13px; font-weight:600; min-width:0; }
.ms-field select { width:100%; min-width:0; min-height:46px; font:inherit; font-weight:400; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:8px; padding:10px 12px; }
.ms-check { display:flex; align-items:center; gap:12px; min-height:44px; font-size:13px; cursor:pointer; }
.ms-field-grid+.ms-check { margin-top:20px; }
.ms-check input { width:19px; height:19px; flex-shrink:0; accent-color:#286620; }
.ms-save { display:flex; flex-wrap:wrap; gap:12px; align-items:center; border-top:1px solid var(--line); padding:22px 0; }
.ms-save .button { min-height:44px; font-size:13px; }
.ms-save [role=status] { font-size:13px; color:#286620; }
.ms-error { color:#a33825; font-size:13px; line-height:1.6; }
.ms-account dl { margin:24px 0; }
.ms-account dl>div { display:grid; grid-template-columns:130px minmax(0,1fr); gap:16px; padding:16px 0; border-bottom:1px solid var(--line); font-size:14px; }
.ms-account dt { color:#53665b; }
.ms-account dd { margin:0; overflow-wrap:anywhere; }
.ms-admin-links { display:grid; margin:20px 0; }
.ms-admin-links>a,.ms-admin-links>button { display:flex; flex-direction:column; gap:7px; background:none; text-align:left; padding:22px 0; border:0; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; cursor:pointer; font:inherit; }
.ms-admin-links strong { font-size:15px; }
.ms-admin-links span { color:#53665b; font-size:13px; line-height:1.6; }
.ms-load { font-size:14px; padding:24px 0; display:flex; flex-wrap:wrap; gap:16px; align-items:center; }
html[data-mis-density=compact] .app-shell .data-table :is(td,tbody th) { padding-top:7px; padding-bottom:7px; }
@media(max-width:1100px) {
  .app-shell .topbar-title { display:none!important; }
  .app-shell .global-search { width:min(400px,50%); }
}
@media(max-width:750px) {
  .app-shell .global-search:not(.is-open) { display:none!important; }
  .app-shell .global-search.is-open { display:flex!important; width:auto; margin:0; z-index:5; background:#fff; }
  .app-shell .mobile-search-button { display:inline-grid; }
  .app-shell .top-actions { margin-left:auto; }
  .app-shell .context-controls { width:100%; }
  .app-shell .context-count { display:none; }
  .app-shell .context-control select,.app-shell .context-control input { max-width:100%; min-width:0; }
  .app-shell .context-bar { padding:10px 0; }
  .app-shell .top-brand { display:flex!important; }
  .app-shell .topbar { padding:0 14px; }
  .ms-field-grid,.ms-check-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
  .ms-field select { font-size:16px; }
  .ms-account dl>div { grid-template-columns:80px minmax(0,1fr); }
}
.app-shell .sidebar-bottom a.nav-item { text-decoration:none; justify-content:flex-start; }
@media(max-width:1060px) { .app-shell:not(.nav-open)>.sidebar { display:none; } .app-shell.nav-open>.sidebar { display:flex; } }
@media(max-width:600px) {
  .app-shell .topbar { gap:8px; }
  .app-shell .view-switcher { display:none; }
  .app-shell .topbar .icon-button,.app-shell .profile-trigger { min-width:44px; min-height:44px; }
  .app-shell .top-actions { gap:4px; }
}
html,body { min-width:0; }
.app-shell .profile-copy { max-width:160px; }
.app-shell .profile-copy strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
