/* Copyright (C) 2026 FubukiHanasaki. AGPL-3.0-or-later.
 * Visual tokens and components come from Hydro's active theme.
 * Only panel layout, responsive sizing and native dialog mechanics live here.
 */
.sms-shell [hidden] {
  display: none !important;
}
.sms-shell .sms-main,
.sms-shell .sms-sidebar {
  min-width: 0;
}
.sms-toolbar {
  display: grid;
  grid-template-columns: minmax(110px, 140px) minmax(78px, .75fr) minmax(82px, .8fr) minmax(100px, 1fr) minmax(100px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.sms-shell .sms-toolbar > .textbox,
.sms-shell .sms-toolbar > .select,
.sms-shell .sms-toolbar > .button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
}
.sms-shell .sms-toolbar .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
  line-height: normal;
}
.sms-table-scroll {
  position: relative;
  overflow-x: auto;
}
.sms-table {
  min-width: 680px;
}
.sms-shell .sms-table td {
  padding-top: 12px;
  padding-bottom: 12px;
}
.sms-shell .sms-audit-table {
  min-width: 760px;
}
.sms-student-name {
  font-weight: bold;
}
.sms-secondary {
  opacity: .65;
  font-size: .85em;
}
.sms-pagination,
.sms-dialog-footer,
.sms-grant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sms-pagination .help-text {
  margin: 0;
}
.sms-pagination > div,
.sms-dialog-footer > div {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.sms-shell .sms-pagination .button,
.sms-shell .sms-dialog-footer .button {
  margin: 0;
}
.sms-empty {
  text-align: center;
  padding: 40px 20px;
}
.sms-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 20px;
}
.sms-form-grid > label {
  min-width: 0;
}
.sms-form-grid .textbox,
.sms-form-grid .select,
.sms-field .textbox,
.sms-field .select {
  display: block;
  width: 100%;
}
.sms-field {
  display: block;
  max-width: 400px;
}
.sms-checks {
  padding: 0;
  margin: 15px 0;
}
.sms-checks legend {
  margin-bottom: 10px;
}
.sms-checks .checkbox {
  display: block;
  margin: 8px 0;
}
.sms-scope-options {
  max-height: 180px;
  overflow-y: auto;
  padding: 0 0 12px;
}
.sms-scope-options label {
  display: block;
  margin: 8px 0;
}
.sms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.sms-shell .sms-chips .button {
  margin: 0;
}
.sms-grant-item {
  padding: 12px 0;
  align-items: flex-start;
}
.sms-grant-item p {
  margin: 5px 0;
}
.sms-grant-item > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sms-shell .sms-dialog {
  position: fixed;
  margin: auto;
  padding: 0;
  border: 0;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  color: inherit;
  transform: none;
  opacity: 1;
}
.sms-dialog::backdrop {
  background: rgba(0, 0, 0, .5);
}
.sms-dialog > form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
}
.sms-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding-bottom: 12px;
}
.sms-close {
  font-size: 18px;
}
.sms-dialog-body {
  overflow-y: auto;
  min-height: 0;
}
.sms-dialog-body .section__title {
  margin-top: 10px;
}
.sms-dialog-body textarea.textbox {
  height: 100px;
}
.sms-dialog-footer {
  flex-shrink: 0;
}
.sms-read-value {
  min-height: 32px;
  padding: 6px 0 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 767px) {
  .sms-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sms-dialog-footer {
    flex-wrap: wrap;
  }
  .sms-shell .sms-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
  .sms-dialog > form {
    max-height: calc(100dvh - 20px);
  }
}
.sms-grant-item > div:last-child {
  display: flex;
  flex-shrink: 0;
  gap: 12px;
}
.sms-scope-options .checkbox {
  width: 100%;
}
.sms-account-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.sms-account-results .help-text {
  margin: 0;
}
.sms-shell .sms-account-results .button {
  margin: 0;
  max-width: 100%;
  white-space: normal;
}
.sms-shell button:disabled {
  opacity: .5;
  cursor: default;
}
@media (min-width: 768px) and (max-width: 1023px) {
  .sms-toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .sms-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sms-toolbar > .textbox {
    grid-column: 1 / -1;
  }
}
.sms-org-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.sms-org-toolbar > .textbox { flex: 1 1 140px; min-width: 0; }
.sms-org-toolbar > .select { width: auto; max-width: 100%; flex: 1 1 120px; }
.sms-org-toolbar > .textbox, .sms-org-toolbar > .select, .sms-org-toolbar > .button { height: 36px; box-sizing: border-box; margin: 0; }
.sms-org-card { padding: 16px 0; border-bottom: 1px solid rgba(128,128,128,.2); overflow-wrap: anywhere; }
.sms-org-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sms-org-actions .button { margin: 0; }
.sms-org-results { max-height: 240px; overflow: auto; margin-bottom: 12px; }
.sms-org-results > .checkbox-container { display: block; padding: 4px 0; }
.sms-shell .sms-org-results .checkbox { margin-bottom: 0 !important; }
.sms-org-value { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 12px; }
@media (max-width: 767px) { .sms-org-toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .sms-org-toolbar > .textbox { grid-column: 1 / -1; } }
/* Organization dialogs keep navigation outside the scrolling body. */
.sms-shell .sms-org-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.sms-shell .sms-org-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0; }
.sms-shell .sms-org-pagination .help-text { margin: 0; white-space: nowrap; }
.sms-shell .sms-org-pagination .button { margin: 0; }
.sms-shell .sms-org-footer > .sms-org-pagination { margin-left: 0; }
.sms-shell .sms-org-footer > .sms-org-footer-actions { margin-left: auto; }
.sms-shell .sms-members-dialog { height: min(720px, calc(100dvh - 40px)); }
.sms-members-dialog > form { height: 100%; }
.sms-members-dialog .sms-dialog-body { flex: 1; }
.sms-member-toolbar { display: flex; align-items: end; gap: 12px; }
.sms-member-toolbar > label { flex: 1; min-width: 0; }
.sms-member-toolbar > .button { margin-bottom: 16px; }
.sms-member-add { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 0 16px; margin-bottom: 12px; }
.sms-member-add .sms-account-results { grid-column: 1 / -1; margin-bottom: 0; }
.sms-member-list { min-width: 0; }
.sms-member-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(128,128,128,.2); }
.sms-member-person { min-width: 0; overflow-wrap: anywhere; }
.sms-member-kind { font-size: .85em; opacity: .75; }
.sms-member-actions { text-align: right; }
.sms-member-actions .button { margin: 0; min-width: 72px; padding-left: 16px; padding-right: 16px; }
.sms-member-actions .help-text { margin: 0; }
.sms-shell #sms-org-fields .sms-field > .textbox, .sms-shell #sms-org-fields .sms-field > .select { width: 100% !important; max-width: 100%; }
@media (max-width: 767px) {
  .sms-shell .sms-org-footer { flex-wrap: wrap; gap: 12px; }
  .sms-shell .sms-org-footer > .sms-org-pagination { width: 100%; justify-content: space-between; }
  .sms-shell .sms-members-dialog { height: calc(100dvh - 20px); }
  .sms-member-add { grid-template-columns: minmax(0,1fr); }
  .sms-member-row { grid-template-columns: minmax(0,1fr) 68px 68px; gap: 8px; }
  .sms-member-actions .button { min-width: 60px; padding-left: 12px; padding-right: 12px; }
}
.sms-shell #sms-org-fields .sms-field { min-width: 0; max-width: none; }
.sms-shell #sms-org-fields .sms-field > .textbox,
.sms-shell #sms-org-fields .sms-field > .select { box-sizing: border-box; height: 36px; }
.sms-shell #sms-org-fields .sms-field > textarea.textbox { height: 110px; }
.sms-member-person .sms-student-name { line-height: 1.5; }
.sms-member-person .sms-secondary { line-height: 1.4; margin-top: 2px; }
.sms-member-add-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sms-member-add-actions .button, .sms-member-add-actions .help-text { margin: 0; }
.sms-main-member-hint { grid-column: 1 / -1; }
.sms-member-editable { grid-template-columns: minmax(0, 1fr) 130px 190px; }
.sms-member-editable .sms-member-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; }
.sms-shell .sms-member-role-select { width: 100%; margin: 0; box-sizing: border-box; height: 36px; }
.sms-shell #sms-account-fields .sms-field { max-width: none; min-width: 0; }
.sms-shell #sms-account-fields .textbox { width: 100%; box-sizing: border-box; height: 36px; }
@media (max-width: 767px) {
  .sms-member-editable { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sms-member-editable .sms-member-person { grid-column: 1 / -1; }
  .sms-member-editable .sms-member-actions .button { padding-left: 10px; padding-right: 10px; }
  .sms-member-add-actions { align-items: flex-start; flex-wrap: wrap; }
}
/* Every management tab shares one grid; table/form content cannot resize it. */
.sms-shell.row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  align-items: start;
  width: 100%;
}
.sms-shell.row::before,
.sms-shell.row::after {
  display: none;
}
.sms-shell > .sms-main,
.sms-shell > .sms-sidebar {
  float: none;
  width: 100%;
  min-width: 0;
}
.sms-main > section,
.sms-main > #sms-permissions-section,
#sms-permissions-section > section {
  min-width: 0;
  max-width: none;
}
@media (max-width: 767px) {
  .sms-shell.row { grid-template-columns: minmax(0, 1fr); }
}
/* Batch previews retain a fixed footer while large result tables scroll. */
.sms-bulk-dialog{width:min(960px,calc(100vw - 24px));max-width:960px}.sms-bulk-dialog[open]{display:flex;flex-direction:column}.sms-bulk-dialog>form{display:flex;flex-direction:column;min-height:0;max-height:88vh}.sms-bulk-dialog .sms-dialog-body{min-height:0;overflow:auto}.sms-bulk-dialog .sms-dialog-footer{flex-shrink:0;justify-content:space-between}.sms-bulk-table{width:100%;border-collapse:collapse;font-size:14px}.sms-bulk-table th,.sms-bulk-table td{padding:11px 12px;text-align:left;border-bottom:1px solid rgba(128,128,128,.18);vertical-align:middle}.sms-bulk-table th{color:#8593a3;white-space:nowrap}.sms-bulk-summary{font-weight:600;margin-bottom:16px}.sms-bulk-error{color:#d43845;white-space:pre-wrap}.sms-bulk-error:empty{display:none}.sms-bulk-resume{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:16px;padding:12px;border:1px solid #ddd}.sms-bulk-resume label,.sms-bulk-warning{display:flex;align-items:center;gap:8px}.sms-bulk-warning{padding:12px;background:rgba(230,160,40,.12);margin-bottom:16px}.sms-bulk-skipped{margin-top:16px}.sms-bulk-selection{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.sms-bulk-selection p{margin-right:auto}.sms-bulk-admin[hidden]{display:none!important}#sms-accounts-section th:first-child,#sms-accounts-section td:first-child{width:36px}#sms-accounts-section input[type=checkbox]{cursor:pointer}@media(max-width:767px){.sms-bulk-dialog{width:calc(100vw - 16px)}.sms-bulk-table th,.sms-bulk-table td{padding:9px 8px}.sms-main .section__tools{display:flex;flex-wrap:wrap;gap:6px}}
/* Student import uses the same Hydro dialog, controls and compact table rhythm. */
#sms-import-students[hidden]{display:none!important}.sms-import-nav{display:flex;gap:8px;margin-bottom:18px}.sms-import-file-meta{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:16px}.sms-import-caption{font-size:16px;margin:20px 0 10px}.sms-import-counts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:16px}.sms-import-count{padding:12px;background:rgba(100,145,180,.07);border:1px solid rgba(128,128,128,.18);border-radius:4px}.sms-import-count strong{display:block;font-size:23px;color:#34495e}.sms-import-count span{font-size:12px;color:#8593a3}.sms-import-table{min-width:740px}.sms-import-table td{max-width:250px;overflow-wrap:anywhere}.sms-import-table td:first-child{width:36px}.sms-import-badge{display:inline-block;font-size:12px;font-weight:600;padding:2px 6px;border-radius:3px;background:#edf4fa;color:#3576a8}.sms-import-badge.is-duplicate{background:#f0f1f3;color:#77808a}.sms-import-badge.is-suspect{background:#fff2db;color:#a66a13}.sms-import-badge.is-error{background:#fff0f0;color:#c43b45}.sms-import-dialog .sms-dialog-body>.sms-bulk-error:empty{display:none}@media(max-width:767px){.sms-import-counts{gap:5px}.sms-import-count{padding:8px 6px}.sms-import-count strong{font-size:20px}.sms-import-nav .button{margin:0}}
.sms-shell .sms-import-dialog{width:min(1120px,calc(100vw - 32px));max-width:1120px}.sms-import-dialog .section__title{min-width:0;overflow-wrap:anywhere;line-height:1.35}.sms-import-table{min-width:1020px;line-height:1.5}.sms-import-table td:nth-child(2){white-space:nowrap}.sms-import-table td:nth-child(3){min-width:135px}.sms-import-table td:nth-child(4){min-width:65px;white-space:nowrap}.sms-import-table td:nth-child(5){min-width:180px}.sms-import-table td:nth-child(6){min-width:170px}.sms-import-table td:last-child{min-width:190px}.sms-import-dialog .sms-secondary{line-height:1.45;margin-top:3px}@media(max-width:767px){.sms-shell .sms-import-dialog{width:calc(100vw - 16px)}.sms-import-counts{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Export menus stay beside the specific list or detail they export. */
.sms-export-control{display:inline-flex;align-items:center;line-height:1;max-width:100%;position:relative;vertical-align:middle;flex-shrink:0}.sms-export-control>.sms-export-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;height:36px;line-height:1;padding:0 16px;font-size:14px;white-space:nowrap}.sms-export-menu{position:absolute;right:0;top:calc(100% + 5px);z-index:1100;display:flex;flex-direction:column;gap:3px;min-width:165px;max-width:min(300px,80vw);padding:10px;background:var(--section-bg,#fff);color:inherit;border:1px solid rgba(128,128,128,.25);border-radius:4px;box-shadow:0 5px 20px rgba(0,0,0,.12);text-align:left}.sms-export-menu[hidden],.sms-export-control[hidden]{display:none!important}.sms-export-menu>button{padding:9px;text-align:left;white-space:nowrap;border:0}.sms-export-menu label{display:flex;gap:7px;align-items:center;padding:6px;font-size:12px;line-height:1.5}.sms-export-error{color:#d43845;font-size:12px;line-height:1.5;white-space:normal}.sms-export-error:empty{display:none}.sms-export-menu label input{flex-shrink:0}.sms-card-tools .sms-export-toggle{height:32px;font-size:12px;padding:0 12px}.sms-shell .section__tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.sms-export-control .button{margin:0!important}.sms-rating-range{flex-wrap:wrap}@media(prefers-color-scheme:dark){.theme--dark .sms-export-menu{background:#20252b}}@media(max-width:767px){.sms-export-toggle{padding-left:12px;padding-right:12px}}
.sms-export-menu[popover]{position:fixed;inset:auto;margin:0}.sms-export-menu[popover]:not(:popover-open){display:none!important}.sms-export-menu[popover]::backdrop{background:transparent;pointer-events:none}
[data-sms-native-rating]>.section__header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}@media(max-width:767px){.sms-shell .sms-main>.section>.section__header{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.sms-shell .sms-main>.section>.section__header>.section__title{flex-basis:100%;margin:0}.sms-shell .sms-main>.section>.section__header>.section__tools{position:static;float:none;display:flex;width:100%;flex-wrap:wrap;justify-content:flex-start;transform:none;margin:0}.sms-shell .sms-main>.section>.section__header>.sms-export-control{margin:0}}
.sms-batch-plan-table{min-width:1000px;line-height:1.5}.sms-batch-plan-table td{white-space:pre-line;max-width:260px;overflow-wrap:anywhere}.sms-batch-plan-table td:nth-child(5),.sms-batch-plan-table td:nth-child(6){min-width:150px}.sms-schedule-batch-dialog textarea.textbox{min-height:125px}.sms-schedule-batch-dialog .sms-form-grid{margin-bottom:16px}@media(max-width:767px){#sms-schedules-workspace .sms-workspace-tools{display:flex;flex-wrap:wrap;align-items:flex-end}#sms-schedules-workspace .sms-workspace-tools>label{flex:1 1 40%}#sms-schedules-workspace .sms-workspace-tools>label:first-child{flex-basis:100%}#sms-schedules-workspace .sms-workspace-tools>.button{margin:0!important}#sms-schedules-workspace .sms-workspace-tools .sms-workspace-create{margin-left:auto!important}}

@media(min-width:768px){#sms-schedules-workspace .sms-workspace-tools{display:grid;grid-template-columns:minmax(120px,1fr) repeat(2,minmax(125px,.8fr)) auto auto auto;gap:10px}#sms-schedules-workspace .sms-workspace-tools>.sms-field{width:auto}#sms-schedules-workspace .sms-workspace-tools>.button{margin:0;padding-left:14px;padding-right:14px;white-space:nowrap}}

/* Keep native section titles and their actions in the same layout flow. */
.sms-main>.section>.section__header,.sms-main>#sms-permissions-section>.section>.section__header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.sms-main>.section>.section__header>.section__title,.sms-main>#sms-permissions-section>.section>.section__header>.section__title{margin:0;flex:1 1 auto}.sms-shell .section__header>.section__tools{position:static;float:none;transform:none;max-width:100%;margin:0}.sms-shell .section__tools>.button,.sms-shell .section__tools>.sms-rating-admin>.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;height:36px;line-height:1;padding:0 16px;margin:0}.sms-shell .sms-rating-admin{align-items:center;flex-wrap:wrap}
@media(max-width:767px){.sms-main>#sms-permissions-section>.section>.section__header>.section__title{flex-basis:100%}.sms-shell .section__header>.section__tools{width:100%;justify-content:flex-start}.sms-main>#sms-permissions-section>.section>.section__header>.section__tools{width:100%}}

/* Exports are secondary text actions, alongside the controls they belong to. */
.sms-export-control>.sms-export-toggle,.sms-card-tools .sms-export-control>.sms-export-toggle{height:32px;padding:0 6px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--teach-muted,#7c899a);font-size:12px;font-weight:400;cursor:pointer;margin:0}
.sms-export-control>.sms-export-toggle:hover{color:var(--teach-blue,#3498db);background:transparent}
.sms-export-control>.sms-export-toggle:focus-visible{outline:2px solid var(--teach-blue,#3498db);outline-offset:2px}
.sms-dialog-export-actions,.sms-dialog-main-actions,.sms-dialog-footer-context,.sms-member-toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.sms-dialog-main-actions{margin-left:auto}.sms-dialog-footer-context>.sms-dialog-main-actions{margin-left:0}
.sms-dialog-footer .button{margin:0}.sms-dialog-footer:has(.sms-dialog-export-actions){gap:12px;flex-wrap:wrap}
.sms-member-toolbar-actions{margin-bottom:16px;flex-shrink:0}.sms-member-toolbar-actions>.button{margin:0}
.sms-shell .sms-main .section__header.sms-header-export-only>.section__title{flex-basis:auto;min-width:0}
.sms-shell .sms-main .section__header.sms-header-export-only>.sms-export-only{width:auto;flex-shrink:0}
@media(max-width:767px){.sms-member-toolbar{gap:8px}.sms-member-toolbar-actions{gap:4px}.sms-member-toolbar-actions>.button{padding-left:12px;padding-right:12px}}
.sms-dialog-footer>.sms-dialog-export-actions,.sms-dialog-footer>.sms-dialog-footer-context,.sms-import-dialog .sms-dialog-footer>.sms-org-actions{margin:0;align-items:center}

.sms-import-counts{grid-template-columns:repeat(6,minmax(0,1fr))}.sms-import-table{min-width:1200px}.sms-import-table td:nth-child(7){min-width:160px}.sms-import-table td:nth-child(8){min-width:190px}.sms-import-badge.is-skip{background:#f0f1f3;color:#77808a}@media(max-width:767px){.sms-import-counts{grid-template-columns:repeat(3,minmax(0,1fr))}}

.sms-plugin-info{display:flex;flex-direction:column;gap:8px;font-size:12px;line-height:1.6;color:#8593a3}
.sms-plugin-version{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sms-plugin-version strong{font-weight:500;color:inherit}
.sms-plugin-info a{font-size:11px;color:inherit;overflow-wrap:anywhere}
.sms-plugin-info a:hover{color:#358ecc;text-decoration:underline}
.sms-plugin-info .icon{margin-left:5px}

/* Member import stays in the roster dialog, with independently scrolling preview. */
.sms-member-import { border: 1px solid #dce5ec; border-radius: 6px; padding: 16px; margin: 0 0 20px; background: #f8fafc; }
.sms-member-import[hidden] { display: none; }
.sms-member-import-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.sms-member-import-heading .help-text { margin: 0; }
.sms-member-import-table { overflow: auto; max-height: 280px; margin-bottom: 12px; }
.sms-member-import-table table { width: 100%; min-width: 580px; background: white; }
.sms-member-import-table th, .sms-member-import-table td { padding: 8px 10px; vertical-align: middle; overflow-wrap: anywhere; }
.sms-member-add-actions > .sms-org-actions { margin-top: 0; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

#sms-organization-section > .section__header { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 12px 24px; }
#sms-organization-section > .section__header .section__title { margin: 0; flex: 0 0 auto; }
#sms-organization-section > .section__header .section__tools { margin-left: auto; }
#sms-org-class-tools[hidden], #sms-org-class-panel[hidden], #sms-org-domain-panel[hidden] { display: none !important; }
.sms-organization-tabs { display: flex; align-items: center; gap: 20px; }
.sms-organization-tabs button { border: 0; background: transparent; padding: 8px 0; color: #8593a3; cursor: pointer; border-bottom: 2px solid transparent; font: inherit; }
.sms-organization-tabs button[aria-selected="true"] { color: #3498db; font-weight: 600; border-bottom-color: #3498db; }
.sms-organization-tabs button:focus-visible { outline: 2px solid #3498db; outline-offset: 3px; }
#sms-org-domain-panel .star-form { margin-right: 8px; }
#sms-org-domain-panel .sms-domain-star { cursor: pointer; border: 0; background: transparent; padding: 4px; color: #8593a3; }
#sms-org-domain-panel .sms-domain-star.activated { color: #f3b52c; }

.sms-exam-dialog { width: min(1060px,calc(100vw - 32px)); max-width: 1060px; max-height: 90vh; border: 0; border-radius: 5px; padding: 0; color: #34495e; }
.sms-exam-dialog::backdrop { background: rgba(30,40,50,.48); }
.sms-exam-dialog > form { display: flex; flex-direction: column; max-height: 90vh; margin: 0; }
.sms-exam-dialog .section__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; flex-shrink: 0; }
.sms-exam-dialog .section__title { margin: 0; }
.sms-exam-dialog-body { overflow: auto; min-height: 0; padding: 20px 22px; }
.sms-exam-dialog .sms-dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 0; flex-shrink: 0; border-top: 1px solid #e4e9ef; }
.sms-exam-dialog .sms-field { max-width: none; min-width: 0; }
.sms-exam-dialog .textbox,.sms-exam-dialog .select { width: 100%; box-sizing: border-box; margin: 5px 0 16px; }
.sms-exam-dialog select[multiple] { min-height: 130px; }
.sms-exam-preview { max-height: 340px; overflow: auto; margin: 14px 0; border: 1px solid #e4e9ef; border-radius: 4px; }
.sms-exam-preview table { min-width: 640px; width: 100%; }
.sms-exam-preview th { position: sticky; top: 0; background: #f6f8fa; z-index: 1; }
.sms-exam-consent { display: flex; align-items: flex-start; gap: 8px; line-height: 1.6; margin-top: 16px; }
.sms-exam-consent input { margin-top: 5px; flex-shrink: 0; }
.sms-exam-facts { display: flex; gap: 10px 26px; flex-wrap: wrap; line-height: 1.8; }
.sms-exam-remark { white-space: pre-wrap; overflow-wrap: anywhere; margin: 16px 0 0; }
.sms-exam-native { padding-top: 8px; padding-bottom: 4px; color: #657687; font-size: .875rem; }
.sms-exam-native-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.sms-exam-native .sms-exam-facts { gap: 6px 16px; min-width: 0; overflow-wrap: anywhere; }
.sms-exam-native-actions { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-left: auto; }
.sms-exam-native-actions .tool-button { appearance: none; border: 0; background: transparent; padding: 3px 0; margin: 0; color: #5f8cab; font: inherit; line-height: 1.8; text-decoration: none; cursor: pointer; }
.sms-exam-native-actions .tool-button:hover { color: #3498db; }
.sms-exam-native-actions .tool-button:focus-visible { outline: 2px solid #3498db; outline-offset: 3px; }
.sms-exam-native-actions .tool-button:disabled { opacity: .5; cursor: wait; }
.sms-exam-native .sms-exam-remark { margin: 8px 0 0; line-height: 1.6; }
#sms-exam-native-error:empty { display: none; }
#sms-exam-native-error:not(:empty) { margin-top: 8px; line-height: 1.6; color: #c0392b; }
.sms-exam-table { min-width: 760px; }
.sms-exam-rating { margin-top: 3px; }
.sms-exam-rated-badge { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 1px 6px; border: 1px solid transparent; border-radius: 3px; font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; vertical-align: middle; }
.sms-exam-rated-badge.is-rated { color: #fff; background: #16834a; border-color: #16834a; }
.sms-exam-rated-badge.is-unrated { color: #333; background: #f5f6f7; border-color: #dce1e5; font-weight: 400; }

@media (max-width:767px) { .sms-exam-dialog { width: calc(100vw - 16px); } .sms-exam-dialog .sms-form-grid { grid-template-columns: minmax(0,1fr); } .sms-exam-dialog .sms-dialog-footer { flex-wrap: wrap; } }

.sms-exam-filters { display: grid; grid-template-columns: minmax(160px,1.4fr) repeat(4,minmax(110px,1fr)); align-items: end; gap: 10px; }
.sms-exam-filters > .textbox,.sms-exam-filters > .select { width: 100%; }
.sms-exam-date { display: flex; align-items: center; gap: 8px; white-space: nowrap; grid-column: span 2; margin: 0; }
.sms-exam-date .textbox { min-width: 0; width: 100%; height: 36px; box-sizing: border-box; margin: 0; }
.sms-exam-filter-actions { display: flex; gap: 8px; justify-content: flex-end; }
.sms-exam-filter-actions .button { margin: 0; height: 36px; white-space: nowrap; }
.sms-rating-preview { min-width: 880px; }
.sms-rating-preview-delta { font-weight: 700; white-space: nowrap; }
.sms-rating-preview-delta.is-up { color: #16834a; }
.sms-rating-preview-delta.is-down { color: #c0392b; }
@media(max-width:767px) { .sms-exam-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } .sms-exam-date { grid-column: auto; flex-direction: column; align-items: stretch; gap: 4px; } .sms-exam-filter-actions { grid-column: 1 / -1; } }
