/* School information follows the supplied Geist / white school-workspace reference. */
body.school-workspace #main-app :is(#page-school-settings,#page-staff-settings) {
  width:100%;max-width:none;margin-inline:0;
}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-panels {
  display:grid;grid-template-columns:minmax(0,1fr);gap:32px;max-width:none;width:100%;margin-inline:0;
}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-panels>.card {
  min-width:0;max-width:none;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;
}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-panels>.card>.card-header {
  display:block;padding:0 0 18px;border-bottom:1px solid var(--line);background:transparent;
}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .card-header h3 {margin:0;font-size:20px;line-height:1.35;font-weight:600;letter-spacing:-.025em}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .card-header p {margin:6px 0 0;max-width:65ch;color:var(--muted);font-size:14px;line-height:1.6}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-panels>.card>.card-body {padding:24px 0 0}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-group {padding:0 0 28px;margin:0 0 28px;border:0;border-bottom:1px solid var(--line);min-width:0}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-group h4 {margin:0 0 18px;font-size:16px;font-weight:600;line-height:1.5}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-profile-card .form-group {display:grid;align-content:start;gap:8px;min-width:0;margin:0}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-field-wide {grid-column:1/-1}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-profile-card label {margin:0;font-size:14px;line-height:1.5;font-weight:500;color:var(--ink)}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .form-input {box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:11px 12px;border:1px solid #c9ccd2;border-radius:8px;background:#fff;font:400 16px/1.5 Geist,system-ui,sans-serif;color:var(--ink);box-shadow:none}
body.school-workspace :is(#page-school-settings,#page-staff-settings) textarea.form-input {resize:vertical;min-height:104px}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .form-input:disabled {color:var(--muted);background:#f4f4f2}
body.school-workspace :is(#page-school-settings,#page-staff-settings) :is(button,a,input,select,textarea,summary):focus-visible {outline:3px solid var(--brand);outline-offset:3px}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-profile-logo {display:flex;align-items:center;gap:18px;margin-bottom:24px;font-size:13px;line-height:1.6}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-profile-logo strong {font-size:14px;font-weight:500;color:var(--ink)}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-profile-logo p {margin:3px 0;color:var(--muted)}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-profile-logo .logo-upload {box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex:0 0 72px;width:72px;height:72px;margin:0;padding:8px;background:#fff;border:1px dashed #b8bdc7;border-radius:10px;color:var(--muted);font:400 26px/1 Geist,system-ui,sans-serif;cursor:pointer;overflow:hidden}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .logo-upload:hover {border-color:var(--brand);background:var(--brand-light)}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .logo-upload img {width:100%;height:100%;object-fit:contain}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-description {max-width:70ch;margin:-8px 0 16px;color:var(--muted);font-size:14px;line-height:1.6}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-access-code {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:16px 18px;border:1px solid var(--line);border-radius:10px;background:#fff}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-access-code-value {min-width:0;display:grid;gap:5px}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-access-code-value>span {font-size:13px;line-height:1.5;color:var(--muted)}
body.school-workspace :is(#page-school-settings,#page-staff-settings) #setting-school-code-display {font:600 18px/1.5 Geist,system-ui,sans-serif;letter-spacing:.02em;color:var(--brand-dark);overflow-wrap:anywhere}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-access-code .btn-group {display:flex;flex-wrap:wrap;gap:8px}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-access-code .btn {min-height:44px;font-size:14px}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-hint {margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.6;max-width:75ch}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-access>.form-group {margin-top:22px}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-access {margin-bottom:0;border-bottom:0}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-save {display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--line);padding-top:20px}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-save p {margin:0;max-width:48ch;color:var(--muted);font-size:13px;line-height:1.6}
body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-save .btn {min-height:46px;flex-shrink:0}
body.school-workspace :is(#page-school-settings,#page-staff-settings)>.wf-import-disclosure {box-sizing:border-box;width:100%;max-width:none;margin:28px 0 0;padding:0 20px;border-radius:10px}
body.school-workspace :is(#page-school-settings,#page-staff-settings)>.school-setup {margin-bottom:32px;border-radius:10px;font-size:14px}
@media(max-width:700px){
  body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-fields {grid-template-columns:minmax(0,1fr);gap:18px}
  body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-group {padding-bottom:24px;margin-bottom:24px}
  body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-access {padding-bottom:24px;margin-bottom:0}
  body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-settings-save {align-items:stretch;flex-direction:column;gap:12px}
  body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-profile-logo {gap:14px}
  body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-access-code {padding:14px;gap:12px}
  body.school-workspace :is(#page-school-settings,#page-staff-settings) .school-access-code .btn-group {width:100%}
  body.school-workspace :is(#page-school-settings,#page-staff-settings)>.school-setup {padding-inline:16px}
  body.school-workspace :is(#page-school-settings,#page-staff-settings)>.wf-import-disclosure {padding-inline:16px}
}

body.school-workspace #main-app :is(#page-school-settings,#page-staff-settings)>.school-page-heading {justify-content:flex-start;text-align:left}
body.school-workspace #main-app :is(#page-school-settings,#page-staff-settings) .school-heading-copy {flex:1 1 100%;text-align:left}
body.school-workspace #main-app :is(#page-school-settings,#page-staff-settings) .school-heading-copy p {margin-inline:0;text-align:left}

body.school-workspace #page-school-settings .school-identity-top {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:24px;margin-bottom:24px}
body.school-workspace #page-school-settings .school-identity-top .school-profile-logo {margin-bottom:0}
body.school-workspace #page-school-settings .school-identity-code {min-width:0}
body.school-workspace #page-school-settings .school-identity-code .school-settings-hint {margin:8px 0 0}
@media(max-width:700px){body.school-workspace #page-school-settings .school-identity-top {grid-template-columns:minmax(0,1fr);gap:18px}}

/* White title bands; Gestione scuola retains its existing workspace surface. */
body.school-workspace #main-app>.content>.view-page:not(#page-dashboard) {padding-top:0}
body.school-workspace #main-app>.content {--school-heading-inset-x:48px;--school-heading-inset-top:32px}
body.school-workspace #main-app :is(.view-page:not(#page-dashboard) .page-header,#page-dashboard:not([data-portal-page="calendar"])>.school-dashboard-heading) {position:relative;isolation:isolate}
body.school-workspace #main-app :is(.view-page:not(#page-dashboard) .page-header,#page-dashboard:not([data-portal-page="calendar"])>.school-dashboard-heading)::before {content:"";position:absolute;z-index:-1;pointer-events:none;inset:calc(-1 * var(--school-heading-inset-top)) calc(-1 * var(--school-heading-inset-x)) -20px;background:#fff;border-bottom:1px solid var(--line)}
@media(max-width:820px){body.school-workspace #main-app>.content {--school-heading-inset-x:20px;--school-heading-inset-top:24px}}
@media(max-width:360px){body.school-workspace #main-app>.content {--school-heading-inset-x:16px}}

/* The page title already identifies collaborator settings. */
body.school-workspace #page-staff-settings #staff-management>.card-header {display:none}
body.school-workspace #page-staff-settings #staff-management>.card-body {padding-top:0}

body.school-workspace #main-app :is(.view-page:not(#page-dashboard) .page-header,#page-dashboard:not([data-portal-page="calendar"])>.school-dashboard-heading) {margin-bottom:40px}

/* Collaborators follow the student directory and centered student form. */
body.school-workspace #main-app #page-staff-settings .school-heading-copy {flex:1 1 360px}
body.school-workspace #page-staff-settings .staff-toolbar {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px 24px;padding:0 0 20px}
body.school-workspace #page-staff-settings .staff-toolbar h3 {margin:0;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em}
body.school-workspace #page-staff-settings #staff-count {display:inline-block;margin-left:10px;color:var(--muted);font-size:13px;font-weight:400;letter-spacing:0}
body.school-workspace #page-staff-settings .staff-search {width:320px;max-width:100%}
body.school-workspace #page-staff-settings #staff-list {min-width:0;max-width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface);overflow:auto}
body.school-workspace #page-staff-settings .staff-table {width:100%;min-width:880px;margin:0;border-collapse:collapse}
body.school-workspace #page-staff-settings .staff-table th {padding:14px 16px;background:var(--surface-soft);color:var(--muted);font-size:13px;font-weight:500;text-align:left;text-transform:none;letter-spacing:0;white-space:nowrap}
body.school-workspace #page-staff-settings .staff-table td {padding:18px 16px;border-top:1px solid var(--line);font-size:14px;line-height:1.5;vertical-align:middle}
body.school-workspace #page-staff-settings .staff-table tbody tr:last-child td {border-bottom:0}
body.school-workspace #page-staff-settings .staff-person {display:flex;align-items:center;gap:10px;min-width:160px}
body.school-workspace #page-staff-settings .staff-person strong {font-weight:600}
body.school-workspace #page-staff-settings .staff-avatar {display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:var(--brand-light);color:var(--brand-dark);font-size:12px;font-weight:600}
body.school-workspace #page-staff-settings .staff-you {color:var(--muted);font-size:12px;font-weight:400}
body.school-workspace #page-staff-settings .staff-email {min-width:170px;max-width:320px;overflow-wrap:anywhere;color:var(--muted)}
body.school-workspace #page-staff-settings .staff-row-actions {gap:8px;flex-wrap:wrap;min-width:255px}
body.school-workspace #page-staff-settings .staff-row-actions .btn {min-height:40px;white-space:nowrap}
body.school-workspace #page-staff-settings #staff-status {margin:0 0 16px;font-size:13px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
body.school-workspace #page-staff-settings #staff-status:empty {display:none}
body.school-workspace #page-staff-settings .staff-loading {margin:0;padding:32px 20px;font-size:14px;color:var(--muted)}
body.school-workspace #page-staff-settings .staff-empty {display:grid;justify-items:center;gap:10px;padding:40px 20px;text-align:center;font-size:14px;color:var(--muted)}
body.school-workspace #page-staff-settings .staff-empty strong {font-size:16px;color:var(--ink)}
body.school-workspace #page-staff-settings .staff-empty .btn {margin-top:6px}
body.school-workspace #page-staff-settings .staff-directory-footer {margin-top:28px}
body.school-workspace #page-staff-settings .staff-directory-footer details {border-top:1px solid var(--line)}
body.school-workspace #page-staff-settings .staff-directory-footer summary {display:list-item;padding:16px 0;min-height:44px;font-size:14px;font-weight:500;cursor:pointer}
body.school-workspace #page-staff-settings .staff-permissions dl {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:0;padding:4px 0 24px;font-size:13px;line-height:1.7}
body.school-workspace #page-staff-settings .staff-permissions dt {font-weight:600}
body.school-workspace #page-staff-settings .staff-permissions dd {margin:6px 0 0;color:var(--muted)}
body.school-workspace #page-staff-settings #staff-audit {padding-bottom:16px;font-size:13px;line-height:1.7;color:var(--muted);overflow-wrap:anywhere}
body.school-workspace #page-staff-settings .staff-access-link {display:inline-block;margin-top:18px;font-size:13px}
body.school-workspace dialog.staff-editor {position:fixed;inset:0;box-sizing:border-box;width:min(560px,calc(100% - 32px));max-width:560px;max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);font:inherit;box-shadow:var(--shadow-lg);overflow:auto;overscroll-behavior:contain}
body.school-workspace dialog.staff-editor:not([open]) {display:none}
body.school-workspace dialog.staff-editor::backdrop {background:rgb(0 0 0 / .4)}
body.school-workspace .staff-editor form {margin:0}
body.school-workspace .staff-editor .modal-header {gap:16px;padding:18px 20px;background:var(--surface);border-bottom:1px solid var(--line)}
body.school-workspace .staff-editor .modal-header h3 {margin:0;font-family:inherit;font-size:18px;font-weight:600;line-height:1.4;letter-spacing:-.02em}
body.school-workspace .staff-editor .modal-close {flex-shrink:0;width:36px;height:36px;padding:0;border-radius:6px;cursor:pointer}
body.school-workspace .staff-editor .modal-body {display:grid;gap:20px;padding:20px}
body.school-workspace .staff-editor .form-group {display:grid;gap:8px;margin:0;min-width:0}
body.school-workspace .staff-editor label {margin:0;font-size:14px;font-weight:500;line-height:1.5}
body.school-workspace .staff-editor .form-input {box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:11px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:400 16px/1.5 Geist,system-ui,sans-serif;box-shadow:none}
body.school-workspace .staff-editor .form-input:disabled {background:var(--surface-soft);color:var(--muted)}
body.school-workspace .staff-editor .staff-form-intro {margin:0;font-size:14px;line-height:1.6;color:var(--muted)}
body.school-workspace .staff-editor :is(.staff-field-help,.staff-access-note) {margin:0;font-size:13px;line-height:1.65;color:var(--muted)}
body.school-workspace .staff-editor .staff-access-note {padding-top:16px;border-top:1px solid var(--line)}
body.school-workspace .staff-editor .staff-form-feedback {margin:0;font-size:13px;line-height:1.65;color:var(--ink);overflow-wrap:anywhere}
body.school-workspace .staff-editor .staff-form-feedback:empty {display:none}
body.school-workspace .staff-editor .staff-recovery-actions {display:flex;gap:8px;flex-wrap:wrap}
body.school-workspace .staff-editor .staff-edit-identity {display:grid;gap:4px;padding-bottom:18px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
body.school-workspace .staff-editor .staff-edit-identity span {font-size:14px;color:var(--muted)}
body.school-workspace .staff-editor .modal-footer {gap:8px;padding:14px 20px;border-top:1px solid var(--line);background:var(--surface)}
body.school-workspace .staff-editor .modal-footer .btn {min-height:44px}
body.school-workspace :is(.staff-editor,#page-staff-settings) :is(button,input,select,summary,a):focus-visible {outline:3px solid var(--brand);outline-offset:3px}
@media(max-width:700px){
 body.school-workspace #page-staff-settings .staff-search {width:100%}
 body.school-workspace #page-staff-settings .staff-permissions dl {grid-template-columns:minmax(0,1fr);gap:18px}
}
@media(max-width:820px){
 body.school-workspace #main-app #page-staff-settings .school-heading-copy {flex:0 1 auto;width:100%}
 body.school-workspace #page-staff-settings #staff-list .staff-table {display:block;min-width:0;width:100%}
 body.school-workspace #page-staff-settings #staff-list tbody {display:block;width:100%}
 body.school-workspace #page-staff-settings #staff-list tbody tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;min-width:0;padding:0 16px;border:0;border-bottom:1px solid var(--line)}
 body.school-workspace #page-staff-settings #staff-list tbody tr:last-child {border-bottom:0}
 body.school-workspace #page-staff-settings #staff-list .staff-table td {width:auto;min-width:0;max-width:none;padding:14px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
 body.school-workspace #page-staff-settings #staff-list .staff-table td:first-child {grid-column:1/-1;border-top:0}
 body.school-workspace #page-staff-settings #staff-list .staff-table td:nth-child(2),body.school-workspace #page-staff-settings #staff-list .staff-table td:last-child {grid-column:1/-1}
 body.school-workspace #page-staff-settings #staff-list .staff-row-actions {min-width:0}
 body.school-workspace #page-staff-settings #staff-list .staff-person {min-width:0}
}
@media(max-width:520px){
 body.school-workspace #page-staff-settings #staff-heading-actions {width:100%;flex-wrap:nowrap}
 body.school-workspace #page-staff-settings #btn-refresh-staff {flex:0 0 44px;min-width:44px;width:44px;padding:10px}
 body.school-workspace #page-staff-settings #btn-refresh-staff>span {display:none}
 body.school-workspace #page-staff-settings #btn-add-staff {flex:1;min-width:0}
 body.school-workspace .staff-editor .modal-footer {flex-wrap:wrap}
 body.school-workspace .staff-editor .modal-footer .btn-primary {flex:1}
}
