/* FutureUP settings: scoped to the three role views, including dark mode. */
.settings-brand {
  --paper:#fafaf9; --paper-raised:#fff; --paper-dim:#f1f1ee;
  --ink:#14152a; --ink-soft:#5b5c6e; --ink-faint:#6d6e7c;
  --line:#e6e5e1; --line-soft:#efeeea;
  --green:#0ea99b; --green-deep:#0b5f58; --green-pale:#dcf1ee;
  --settings-loan:#1e3a9e; --settings-loan-wash:#edf1fb;
  --settings-credit:#855208; --settings-credit-wash:#f7f1e6;
  background:var(--paper); color:var(--ink);
}
#schoolAdminScreen.settings-mode,:root[data-theme="dark"] #schoolAdminScreen.settings-mode{background:var(--sa-bg);}
#schoolAdminScreen.settings-mode .admin-workspace-hero,
#schoolAdminScreen.settings-mode #schoolAdminOnboardingHost{display:none;}
.settings-brand #schOrgNameForm{grid-template-columns:1fr;}
:root[data-theme="dark"] .settings-brand {
  --paper:#141521; --paper-raised:#1d1e2f; --paper-dim:#252638;
  --ink:#f7f8ff; --ink-soft:#b7b9ce; --ink-faint:#a2a5bb;
  --line:#383b50; --line-soft:#303347;
  --green:#4ed6c7; --green-deep:#77e1d4; --green-pale:#153d39;
  --settings-loan:#afbcff; --settings-loan-wash:#232e54;
  --settings-credit:#f3c57a; --settings-credit-wash:#3d3021;
}
.settings-brand>.section{padding-top:38px;}
.settings-brand>.section>.wrap{max-width:none;padding-inline:clamp(24px,3vw,64px);}
#schoolAdminScreen.settings-mode .page>.section{padding-inline:clamp(24px,3vw,64px);}
#schoolAdminScreen.settings-mode .page .wrap{max-width:none;}
.settings-brand .section-head,.settings-brand .admin-page-title {
  position:relative; display:flex; flex-wrap:wrap; align-items:center;
  gap:10px 24px; isolation:isolate; padding:12px 0 30px; margin:0 0 12px;
  max-width:none;
}
.settings-brand .admin-page-title>div{flex:1;min-width:0;}
.settings-brand .section-head>.section-eyebrow{display:none;}
.settings-brand .section-head h2,.settings-brand .admin-page-title h3 {
  width:100%; margin:0; color:var(--ink); font-size:clamp(1.8rem,2.8vw,2.6rem);
  line-height:1.2; letter-spacing:-.04em;
}
.settings-brand .section-head p,.settings-brand .admin-page-title p {
  margin:0; color:var(--ink-soft); font-size:.98rem; line-height:1.6;
}
.settings-heading-arrow{position:absolute;right:140px;bottom:8px;width:44%;height:100px;z-index:-1;color:var(--green);opacity:.09;pointer-events:none;}
.settings-role-chip{display:inline-flex;align-items:center;gap:9px;padding:9px 14px;background:var(--green-pale);color:var(--green-deep);border-radius:99px;font-size:.78rem;font-weight:650;line-height:1.4;margin-left:auto;}
.settings-role-chip svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.settings-brand .student-settings-shell,.settings-brand .settings-subtab-shell {
  display:grid; grid-template-columns:clamp(220px,15vw,280px) minmax(0,1fr) clamp(280px,21vw,380px);
  gap:clamp(22px,2vw,36px); overflow:visible; background:none; border:0; box-shadow:none; align-items:start;
}
.settings-brand .student-settings-tabs,.settings-brand .settings-subtab-tabs {
  display:flex; flex-direction:column; gap:8px; padding:12px;
  background:var(--paper-raised); border:1px solid var(--line);
  border-radius:18px; min-width:0; box-shadow:0 1px 2px rgba(20,21,42,.035);
}
.settings-brand .student-settings-tab,.settings-brand .settings-subtab {
  position:relative; justify-content:flex-start; text-align:left;
  gap:9px; padding:12px 9px; min-height:50px; border:0;
  color:var(--ink-soft); font-size:.8rem; line-height:1.4; border-radius:10px;
}
.settings-brand .student-settings-tab:hover,.settings-brand .settings-subtab:hover{background:var(--paper-dim);color:var(--ink);}
.settings-brand [role="tab"][aria-selected="true"]{background:var(--green-pale);color:var(--green-deep);box-shadow:none;}
.settings-brand [role="tab"][aria-selected="true"]::before{content:'';position:absolute;left:0;top:10px;bottom:10px;width:3px;background:var(--green-deep);border-radius:4px;}
.settings-brand .settings-subtab-icon,.settings-brand .student-settings-tab-icon{background:none!important;width:24px;height:24px;flex-basis:24px;}
.settings-brand .settings-subtab-content,.settings-brand .student-settings-content{min-width:0;}
.settings-mobile-category{display:none;}
.settings-brand .settings-subtab-panel,.settings-brand .student-settings-panel {
  padding:clamp(28px,2.2vw,42px); background:var(--paper-raised); border:1px solid var(--line);
  border-radius:18px; box-shadow:0 1px 2px rgba(20,21,42,.035); min-width:0;
}
.settings-brand [role="tabpanel"][hidden]{display:none!important;}
.settings-brand .settings-card-head{padding-bottom:0;border:0;margin-bottom:32px;gap:14px;}
.settings-brand .settings-card-head h3{font-size:1.45rem;letter-spacing:-.025em;line-height:1.3;margin-bottom:7px;}
.settings-brand .settings-card-head p{font-size:.94rem;line-height:1.6;}
.settings-brand .settings-card-head .settings-icon{width:34px;height:34px;flex-basis:34px;border-radius:10px;}
.settings-brand .settings-panel-body,.settings-brand .settings-form-grid{max-width:none;}
.settings-brand .settings-subtab-panel>*{max-width:none;}
.settings-brand .preference-row{padding:28px 0;gap:20px;border-color:var(--line);}
.settings-brand .preference-copy{min-width:0;}
.settings-brand .preference-copy strong{font-size:.96rem;line-height:1.5;}
.settings-brand .preference-copy span{font-size:.85rem;line-height:1.6;margin-top:6px;}
.settings-brand .switch{flex-shrink:0;}
.settings-brand fieldset{min-width:0;}
.settings-brand fieldset legend{font-size:.9rem!important;text-transform:none!important;letter-spacing:0!important;color:var(--ink)!important;margin-bottom:13px!important;font-weight:650;}
.settings-brand .theme-choice>span{color:var(--ink);background:var(--paper-raised);border-color:var(--line);border-radius:12px;box-shadow:none;min-height:56px;}
.settings-brand .theme-choice input:checked+span{background:var(--green-pale);color:var(--green-deep);border-color:var(--green-deep);box-shadow:none;}
.settings-brand .settings-choice-card>span{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:9px;padding:20px 14px;min-height:150px;}
.settings-choice-card>span::after{content:'';position:absolute;top:16px;right:14px;width:17px;height:17px;border:1.5px solid var(--line);border-radius:50%;background:var(--paper-raised);}
.settings-choice-card input:checked+span::after{border:5px solid var(--green-deep);}
.settings-choice-card .settings-choice-icon{width:27px;height:27px;margin-bottom:7px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.settings-choice-card strong{font-size:.85rem;line-height:1.4;}
.settings-choice-card small{color:var(--ink-soft);font-size:.77rem;font-weight:400;line-height:1.5;}
.settings-brand .settings-theme-preview{position:relative;display:flex;flex-direction:column;gap:8px;align-items:stretch;padding:12px;}
.settings-theme-mini{height:66px;width:100%;padding:8px;border:1px solid #e6e5e1;border-radius:7px;background:#fafaf9;display:grid;grid-template-columns:14px 1fr;gap:7px;}
.settings-theme-mini::before{content:'';border-radius:3px;background:#dcf1ee;}
.settings-theme-mini::after{content:'';border-radius:3px;background:repeating-linear-gradient(to bottom,#e6e5e1 0 5px,transparent 5px 12px);}
.settings-theme-mini[data-preview="dark"]{background:#141521;border-color:#383b50;}
.settings-theme-mini[data-preview="dark"]::before{background:#153d39;}
.settings-theme-mini[data-preview="dark"]::after{background:repeating-linear-gradient(to bottom,#383b50 0 5px,transparent 5px 12px);}
.settings-theme-mini[data-preview="system"]{background:linear-gradient(90deg,#fafaf9 50%,#141521 50%);}
.settings-brand .settings-field label{font-size:.8rem;text-transform:none;letter-spacing:0;color:var(--ink);}
.settings-brand .settings-field input{background:var(--paper-raised);color:var(--ink);border-radius:10px;min-height:48px;border-color:var(--line);}
.settings-brand .settings-field input[readonly]{background:var(--paper);opacity:1;color:var(--ink-soft);cursor:text;}
.settings-brand .settings-actions{gap:12px;margin-top:20px;}
.settings-brand .btn-primary{background:var(--green-deep);color:#fff;border-color:var(--green-deep);border-radius:10px;}
:root[data-theme="dark"] .settings-brand .btn-primary{color:#102c28;}
.settings-brand .btn-ghost{background:var(--paper-raised);color:var(--green-deep);border-color:var(--line);border-radius:10px;}
.settings-brand .settings-status,.settings-save-feedback{font-size:.78rem;line-height:1.5;}
.settings-save-feedback{color:var(--green-deep);margin-top:16px;min-height:1.5em;}
.settings-save-feedback.error{color:var(--coral-deep);}
.settings-context{padding:clamp(26px,2vw,36px);border:1px solid var(--line);border-radius:18px;background:var(--paper-raised);color:var(--ink);min-width:0;}
.settings-context-brand{display:flex;align-items:center;gap:10px;padding-bottom:18px;margin-bottom:20px;border-bottom:1px solid var(--line);}
.settings-context-brand img{width:36px;height:36px;object-fit:contain;}
.settings-context-brand strong{font-size:.98rem;line-height:1.4;}
.settings-context h4{font-size:1.1rem;line-height:1.4;letter-spacing:-.015em;margin-bottom:8px;}
.settings-context p{font-size:.87rem;line-height:1.7;color:var(--ink-soft);margin-bottom:18px;}
.settings-preview-question{margin:18px 0 12px auto;padding:12px;border-radius:12px 12px 3px 12px;max-width:85%;background:var(--settings-loan-wash);color:var(--ink);font-size:.82rem;}
.settings-preview-answer{padding:14px;border:1px solid var(--line);border-radius:12px 12px 12px 3px;font-size:.82rem;line-height:1.7;white-space:pre-line;}
.settings-preview-caption{font-size:.72rem!important;margin-top:9px;}
.settings-subjects{display:flex;gap:6px;flex-wrap:wrap;padding-top:18px;margin-top:20px;border-top:1px solid var(--line);}
.settings-subjects span{padding:7px 9px;border-radius:8px;background:var(--green-pale);color:var(--green-deep);font-size:.71rem;font-weight:600;}
.settings-subjects span:nth-child(2){background:var(--settings-loan-wash);color:var(--settings-loan);}
.settings-subjects span:nth-child(3){background:var(--settings-credit-wash);color:var(--settings-credit);}
.settings-guide{list-style:none;padding:0;display:grid;gap:18px;margin:20px 0 0;counter-reset:steps;}
.settings-guide li{position:relative;padding-left:38px;counter-increment:steps;}
.settings-guide li::before{content:counter(steps);position:absolute;left:0;top:0;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:var(--green-pale);color:var(--green-deep);font-size:.76rem;font-weight:700;}
.settings-guide strong{display:block;font-size:.83rem;margin-bottom:4px;line-height:1.5;}
.settings-guide p{margin:0;font-size:.77rem;}
.settings-scope-note{padding:12px 14px;margin:16px 0;border-radius:10px;background:var(--green-pale);color:var(--green-deep);font-size:.79rem;line-height:1.6;}
.settings-context-link{display:flex;justify-content:space-between;gap:12px;width:100%;padding:15px 0;border:0;border-bottom:1px solid var(--line);background:none;color:var(--green-deep);font:600 .79rem/1.5 'Inter',sans-serif;cursor:pointer;text-align:left;}
.settings-rail-label{padding:12px 10px 4px;font-size:.67rem;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);}
.settings-rail-label.personal{margin-top:12px;padding-top:18px;border-top:1px solid var(--line);}
.settings-rail-footer{margin-top:30px;padding:18px 7px 6px;border-top:1px solid var(--line);display:flex;gap:10px;align-items:center;}
.settings-rail-footer img{width:29px;height:29px;}
.settings-rail-footer strong,.settings-rail-footer small{display:block;line-height:1.5;overflow-wrap:anywhere;}
.settings-rail-footer strong{font-size:.78rem;color:var(--ink);}
.settings-rail-footer small{font-size:.7rem;color:var(--ink-soft);}
.settings-brand .settings-school-facts{display:block;margin-top:8px!important;}
.settings-school-facts .settings-field{display:flex;justify-content:space-between;gap:16px;padding:15px 0;border-bottom:1px solid var(--line);}
.settings-school-facts .settings-field label{margin:0;color:var(--ink-soft);font-weight:500;}
.settings-school-facts output{font-size:.86rem;line-height:1.5;font-weight:600;text-align:right;}
.settings-brand #teacherDefaultDueTime{background:var(--paper-raised)!important;color:var(--ink)!important;border-color:var(--line)!important;max-width:150px;min-height:44px!important;}
.settings-brand :is(button,input,select):focus-visible{outline:2px solid var(--green-deep);outline-offset:3px;}
@media(min-width:1500px){
  .settings-brand #stuSettingsPanelPreferences .settings-panel-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;}
  .settings-brand #stuSettingsPanelPreferences .settings-panel-body>fieldset,
  .settings-brand #stuSettingsPanelPreferences .preference-row:last-child{grid-column:1/-1;}
  .settings-brand #stuSettingsPanelPreferences .preference-row{border-top:1px solid var(--line);}
  .settings-brand .settings-choice-card>span{min-height:174px;padding:24px 22px;}
  .settings-brand .settings-theme-preview{padding:18px;gap:12px;}
  .settings-theme-mini{height:96px;}
  .settings-brand .settings-school-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;}
}
@media(max-width:1150px){
  .settings-brand .student-settings-shell,.settings-brand .settings-subtab-shell{grid-template-columns:200px minmax(0,1fr);}
  .settings-context{grid-column:2;}
}
@media(max-width:760px){
  .settings-brand>.section>.wrap{padding-inline:18px;}
  #schoolAdminScreen.settings-mode .page>.section{padding-inline:18px;}
  .settings-brand .student-settings-shell,.settings-brand .settings-subtab-shell{grid-template-columns:minmax(0,1fr);gap:14px;}
  .settings-brand .student-settings-tabs,.settings-brand .settings-subtab-tabs{display:none;}
  .settings-mobile-category{display:block;min-width:0;}
  .settings-mobile-category label{display:block;margin-bottom:7px;color:var(--ink-soft);font-size:.76rem;font-weight:600;}
  .settings-mobile-category select{width:100%;min-height:48px;padding:12px 40px 12px 14px;border:1px solid var(--line);border-radius:12px;background-color:var(--paper-raised);color:var(--ink);font:600 .85rem 'Inter',sans-serif;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--ink-soft) 50%),linear-gradient(135deg,var(--ink-soft) 50%,transparent 50%);background-position:calc(100% - 20px) 22px,calc(100% - 15px) 22px;background-size:5px 5px,5px 5px;background-repeat:no-repeat;}
  .settings-context{grid-column:1;}
  .settings-rail-footer{display:none;}
  .settings-rail-label{grid-column:1/-1;padding-top:5px;}
  .settings-rail-label.personal{margin-top:0;padding-top:12px;}
  .settings-brand .section-head,.settings-brand .admin-page-title{padding-bottom:20px;gap:9px;}
  .settings-brand .admin-page-title>div{flex-basis:100%;}
  .settings-role-chip{margin-left:0;margin-top:4px;}
  .settings-heading-arrow{right:0;width:75%;}
  .settings-brand .settings-subtab-panel,.settings-brand .student-settings-panel{padding:22px 18px;}
  .settings-brand .settings-card-head h3{font-size:1.25rem;}
  .settings-brand .settings-card-head p{font-size:.87rem;}
  .settings-brand .preference-copy strong{font-size:.88rem;}
  .settings-brand .preference-copy span{font-size:.79rem;}
  .settings-brand .preference-row{padding:22px 0;gap:16px;}
  .settings-context{padding:22px;}
  .settings-brand .settings-subtab-panel .settings-form-grid,.settings-brand .student-settings-panel .settings-form-grid{grid-template-columns:1fr;}
  .settings-brand .theme-options.settings-three-col{grid-template-columns:1fr;}
  .settings-brand .settings-choice-card>span{min-height:130px;}
  .settings-brand .preference-row{flex-wrap:wrap;}
  .settings-brand .preference-row:has(.switch){flex-wrap:nowrap;}
}
@media(max-width:420px){
  .settings-brand .theme-options.settings-two-col{grid-template-columns:1fr;}
  .settings-brand .student-settings-tab,.settings-brand .settings-subtab{font-size:.74rem;padding:10px 7px;}
  .settings-brand .settings-theme-preview{padding:7px;}
  .settings-theme-mini{height:50px;padding:6px;}
}
