/* Shared Premium palette for management, school, teacher and family portals.
   Loaded after module styles. Layout and data remain owned by each module. */
.family-theme-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:10px 24px}
.family-theme-controls>span{font-size:12px;color:var(--muted);font-weight:600}
.family-theme-controls .theme-switcher{position:static;height:38px;box-shadow:none}
.family-theme-controls .theme-switcher button{width:auto;padding:0 12px}
.family-theme-controls .theme-switcher button span{display:inline}
html[data-theme="premium"]{
 --ink:#edf4ff;--muted:#a6bad6;--primary:#a58aff;--primary-dark:#7953ed;
 --line:#204c78;--surface:#08294c;--panel:#08294c;--canvas:#031a34;
 --premium-raised:#0d335a;--premium-deep:#041e3a;--premium-text:#edf4ff;
 --premium-muted:#a6bad6;--premium-border:#204c78;
 --shadow:0 10px 26px #000c241f;
}
html[data-theme="premium"] body{
 --teacher-ink:var(--ink);--teacher-muted:var(--muted);--teacher-line:var(--line);--teacher-purple:#a58aff;
 --school-ink:var(--ink);--school-muted:var(--muted);--school-line:var(--line);
 background:radial-gradient(ellipse at 95% 0,#12366955,transparent 45%),var(--canvas);color:var(--ink);
}
html[data-theme="premium"] :is(.app-shell,.app-shell>main,.content,.family-view,.ref-family){background:var(--canvas)!important;color:var(--ink)}
html[data-theme="premium"] :is(.ref-family,.family-home-shell){--rf-ink:var(--ink);--rf-muted:var(--muted);--rf-line:var(--line);--rf-blue:#65b5ff;--rf-green:#43dcc5;--home-navy:var(--ink);--home-blue:#83c2ff;--home-violet:#a58aff;--home-muted:var(--muted)}
html[data-theme="premium"] :is(.sidebar,.topbar,.family-topbar,.family-bottom-nav){background:var(--premium-deep)!important;border-color:var(--line)!important;color:var(--ink)!important}
html[data-theme="premium"] .sidebar .nav-item{color:#c2d3ea}
html[data-theme="premium"] body .sidebar nav a.active{background:linear-gradient(105deg,#6e43f5,#386fff)!important;color:#fff!important;box-shadow:0 4px 18px #5540ec35}
html[data-theme="premium"] .tenant-sidebar-identity{background:#102c50!important;border-color:var(--line)!important}
html[data-theme="premium"] .family-theme-controls{background:var(--premium-deep);border-bottom:1px solid var(--line)}
html[data-theme="premium"] .theme-switcher{background:#061e3c;border-color:var(--line)}
html[data-theme="premium"] .theme-switcher button{color:#c2d3ea!important}
html[data-theme="premium"] .theme-switcher button[aria-pressed="true"]{background:linear-gradient(110deg,#7147fa,#5064ff)!important;color:white!important}

/* Panels, summaries and detail cards share one surface across every module. */
/* Important declarations in this layer take precedence over legacy module skins. */
@layer munieduPremium {
html[data-theme="premium"] :is(.app-view,.family-view) :is(
 .panel,[class$="-panel"],[class*="-panel "],
 [class$="-card"],[class*="-card "],
 [class$="-summary"]>article,[class$="-metrics"]>article,[class$="-kpis"]>article,[class$="-stats"]>article,
 .metric-card,.impact-metric-card,.academic-kpis article,.student-overview article,.professional-overview article,
 .family-app-shell,.family-home-shell,.assessment-config,.teacher-journal-head,
 .calendar-day,.school-calendar-day,.agenda-calendar,.mini-calendar,
 .conversation-list,.conversation-panel,.family-profile-card,.family-home-student,
 .stock-balance>div,.drawer-stats,.system-security article,.census-log,
 .entry-task,.entry-exam,.activity-stats article,.album-grid>button,
 .family-notification-list>button,.school-portal-welcome,.teacher-welcome
){background:linear-gradient(135deg,#0a2e54,#072340)!important;border-color:var(--line)!important;color:var(--ink)!important;box-shadow:var(--shadow)}
html[data-theme="premium"] :is(.app-view,.family-view) :is(h1,h2,h3,h4,strong,dd){color:var(--ink)!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(p,small,dt,label){color:var(--muted)!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.page-heading,.agenda-heading){background:transparent!important;border-color:var(--line)!important}
html[data-theme="premium"] body[data-access-role] :is(#avaliacoes-professor,#mensagens-escola,#calendario-escola,#mural-escola,#comunicados-escola,#documentos-escola)>.page-heading{
 background:linear-gradient(110deg,#0b2b50,#102e59)!important;border-color:var(--line)!important;
}
html[data-theme="premium"] body[data-access-role] :is(#avaliacoes-professor,#mensagens-escola,#calendario-escola,#mural-escola,#comunicados-escola,#documentos-escola)>.page-heading h1{color:var(--ink)!important}
html[data-theme="premium"] body[data-access-role] :is(#avaliacoes-professor,#mensagens-escola,#calendario-escola,#mural-escola,#comunicados-escola,#documentos-escola)>.page-heading :is(p,.eyebrow,h1 span){color:#b8caff!important}

/* Tables and lists: subdued headers, distinct selected rows, visible separators. */
html[data-theme="premium"] :is(.app-view,.family-view) :is(
 table,tbody,tr,td,[class$="-row"],[class*="-row "],.class-record,.school-record,
 .agenda-entry,.activity-card,.school-message-item,.conversation-list>button,
 .stage-card-row>button,.family-contact-row,.family-document-row
){background-color:#082747!important;border-color:#204667!important;color:#d2e0f2!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(
 thead,th,[class$="-head"],[class*="-head "],[class$="-toolbar"],[class*="-toolbar "],
 .table-head,.network-head,.class-head,.gradebook-head,.report-table-head,.family-card-heading
){background-color:#051e3a!important;border-color:var(--line)!important;color:#a5c8f0!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(button[class$="-row"],.network-row,.student-row,.professional-row,.class-row,.stock-row,.agenda-entry,.conversation-list>button):hover{background:#10385f!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is([class$="-row"],[class*="-row "],.conversation-list>button).active{background:#143760!important;border-color:#6668e8!important;box-shadow:inset 3px 0 #9376ff}
html[data-theme="premium"] :is(.app-view,.family-view) :is([class$="-tabs"],[class*="-tabs "],.agenda-filter-chips) {border-color:var(--line)!important;background:transparent!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is([class$="-tabs"],.agenda-filter-chips)>button{background:#08294c!important;color:#b9cce5!important;border-color:var(--line)!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is([class$="-tabs"],.agenda-filter-chips)>button.active{background:#513aba!important;color:white!important;border-color:#9376ff!important}

/* Modal dialogs are appended to body, outside the main application shell. */
html[data-theme="premium"] :is(
 .family-access-modal,.indicator-modal,.report-modal,.utility-modal,.account-panel,
 [role="dialog"],.school-drawer,.student-drawer,.family-album-viewer,
 [class$="-modal"],[class*="-modal "],[class$="-drawer"],[class*="-drawer "]
){background:#082747!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="premium"] :is([role="dialog"],[class$="-modal"],[class*="-modal "],[class$="-drawer"],.family-album-viewer) :is(header,footer,section,article,form,fieldset){background:#082747!important;border-color:var(--line)!important;color:var(--ink)}
html[data-theme="premium"] :is([role="dialog"],[class$="-modal"],[class*="-modal "],[class$="-drawer"],.family-album-viewer) :is(h1,h2,h3,strong,dd){color:var(--ink)!important}
html[data-theme="premium"] :is([role="dialog"],[class$="-modal"],[class*="-modal "],[class$="-drawer"],.family-album-viewer) :is(p,small,label,dt){color:var(--muted)!important}
html[data-theme="premium"] :is(.family-access-overlay,.indicator-overlay,.utility-overlay,.report-overlay){background:#000c24b3!important;backdrop-filter:blur(5px)}

/* Comunicados: a prévia e as ações de gerenciamento mantêm o contraste do tema Premium. */
html[data-theme="premium"] #comunicados-escola .communication-preview{background:#0a2c4f!important;border:1px solid #204c78!important;color:#d9e7f8!important}
html[data-theme="premium"] #comunicados-escola .communication-preview :is(h3){color:#edf4ff!important}
html[data-theme="premium"] #comunicados-escola .communication-preview :is(span,p,small){color:#b7cbe4!important}
html[data-theme="premium"] #comunicados-escola .communication-preview button{color:#b69bff!important}
html[data-theme="premium"] .indicator-manage-modal .communication-option-list button{background:#0a2c4f!important;border-color:#32618b!important;color:#d9e7f8!important}
html[data-theme="premium"] .indicator-manage-modal .communication-option-list button:hover{background:#123b65!important;border-color:#5c82ad!important}
html[data-theme="premium"] .indicator-manage-modal .communication-option-list i{background:#243b6c!important;color:#c5b4ff!important}
html[data-theme="premium"] .indicator-manage-modal .communication-option-list strong{color:#edf4ff!important}
html[data-theme="premium"] .indicator-manage-modal .communication-option-list small{color:#b7cbe4!important}
html[data-theme="premium"] .indicator-manage-modal .communication-option-list b{color:#c5b4ff!important}
html[data-theme="premium"] .indicator-manage-modal .communication-full-text{background:#0a2c4f!important;border-color:#32618b!important;color:#c2d3ea!important}
html[data-theme="premium"] .indicator-manage-modal .communication-full-text strong{color:#edf4ff!important}
html[data-theme="premium"] .indicator-manage-modal .communication-analysis-summary :is(span,small){color:#b7cbe4!important}
html[data-theme="premium"] .indicator-manage-modal .pending-family-list article{border-color:#32618b!important}
html[data-theme="premium"] #comunicados-escola .reach-ring:before{background:#061e39!important;box-shadow:0 0 0 1px #32618b}
html[data-theme="premium"] #comunicados-escola .reach-ring strong{color:#edf4ff!important}
html[data-theme="premium"] #comunicados-escola .reach-ring small,
html[data-theme="premium"] #comunicados-escola .communication-reach p span{color:#b7cbe4!important}
html[data-theme="premium"] #comunicados-escola .communication-reach p strong{color:#edf4ff!important}
html[data-theme="premium"] #comunicados-escola .communication-reach strong.attention{color:#ffd28b!important}
html[data-theme="premium"] #comunicados-escola .communication-admin-summary article :is(span,small){color:#b7cbe4!important}
html[data-theme="premium"] #comunicados-escola #adminCommunicationList>button>b{border:1px solid #715626!important;background:#49371c!important;color:#ffd28b!important}
html[data-theme="premium"] #comunicados-escola #adminCommunicationList>button>b.complete{border-color:#226052!important;background:#16463e!important;color:#90f2d7!important}
html[data-theme="premium"] #comunicados-escola :is(#adminCommunicationList button>i.orange,.communication-admin-detail header>i.orange){background:#49371c!important;color:#ffd28b!important}
html[data-theme="premium"] .app-view .live-record-pager{border-color:#204c78!important;background:#08294c!important;color:#b7cbe4!important}
html[data-theme="premium"] .app-view .live-record-pager button{border-color:#32618b!important;background:#0a2c4f!important;color:#c5b4ff!important;opacity:1}
html[data-theme="premium"] .app-view .live-record-pager button.current{border-color:#9873ff!important;background:#513aba!important;color:#fff!important}
html[data-theme="premium"] .app-view .live-record-pager button:disabled:not(.current){color:#90a6c2!important;opacity:.72}

/* Seleção de destinatários: superfície Premium legível em toda a janela. */
html[data-theme="premium"] .recipient-modal{border:1px solid #32618b!important;background:#08294c!important;color:#edf4ff!important;box-shadow:0 26px 80px rgba(0,10,28,.64)!important}
html[data-theme="premium"] .recipient-modal-head{border-color:#204c78!important;background:#0a2c4f!important}
html[data-theme="premium"] .recipient-modal-head>i{background:#e9e2ff!important;color:#513aba!important}
html[data-theme="premium"] .recipient-modal-head span{color:#c5b4ff!important}
html[data-theme="premium"] .recipient-modal-head h2{color:#edf4ff!important}
html[data-theme="premium"] .recipient-modal-head p{color:#b7cbe4!important}
html[data-theme="premium"] .recipient-modal .drawer-close{border-color:#32618b!important;background:#0d355d!important;color:#edf4ff!important}
html[data-theme="premium"] .recipient-search{border-color:#32618b!important;background:#061e39!important;color:#b7cbe4!important}
html[data-theme="premium"] .recipient-search input{background:transparent!important;color:#edf4ff!important}
html[data-theme="premium"] .recipient-search input::placeholder{color:#90a6c2!important;opacity:1!important}
html[data-theme="premium"] .recipient-search button{color:#c5b4ff!important}
html[data-theme="premium"] .recipient-list{background:#08294c!important;scrollbar-color:#7390ad #061e39!important}
html[data-theme="premium"] .recipient-list>p{color:#b7cbe4!important}
html[data-theme="premium"] .recipient-item{border-color:#204c78!important;background:#0a2c4f!important;color:#edf4ff!important}
html[data-theme="premium"] .recipient-item:hover{background:#0d355d!important}
html[data-theme="premium"] .recipient-item>i{background:#e9e2ff!important;color:#513aba!important}
html[data-theme="premium"] .recipient-item strong{color:#edf4ff!important}
html[data-theme="premium"] .recipient-item small{color:#b7cbe4!important}
html[data-theme="premium"] .recipient-item input{accent-color:#9873ff!important}
html[data-theme="premium"] .recipient-modal-footer{border-color:#204c78!important;background:#061e39!important}
html[data-theme="premium"] .recipient-modal-footer>span{color:#b7cbe4!important}
html[data-theme="premium"] .recipient-modal-footer .button.secondary{border-color:#32618b!important;background:#0a2c4f!important;color:#edf4ff!important}

/* Nova matrícula: etapas sem linha sobre os títulos no tema Premium. */
html[data-theme="premium"] .enrollment-wizard-progress{border-color:#32618b!important;background:#08294c!important}
html[data-theme="premium"] .enrollment-wizard-progress button{background:transparent!important;color:#9fb5d1!important}
html[data-theme="premium"] .enrollment-wizard-progress button:not(:last-child):after{display:none!important}
html[data-theme="premium"] .enrollment-wizard-progress i{background:#123b64!important;color:#afc3dc!important}
html[data-theme="premium"] .enrollment-wizard-progress span{background:transparent!important;color:inherit!important;text-decoration:none!important}
html[data-theme="premium"] .enrollment-wizard-progress button.active,
html[data-theme="premium"] .enrollment-wizard-progress button.active span{color:#fff!important}
html[data-theme="premium"] .enrollment-wizard-progress .active i{background:#6f4fe8!important;color:#fff!important;box-shadow:0 5px 15px #6245e566!important}
html[data-theme="premium"] .enrollment-wizard-progress button.done,
html[data-theme="premium"] .enrollment-wizard-progress button.done span{color:#91e8cb!important}
html[data-theme="premium"] .enrollment-wizard-progress .done i{background:#16463e!important;color:#91e8cb!important}

/* Central documental: contadores das abas permanecem legíveis em todos os estados. */
html[data-theme="premium"] #documentos-escola .document-admin-tabs b{display:inline-grid!important;min-width:21px;height:21px;padding:0 6px!important;place-items:center;border:1px solid #5d77b7!important;border-radius:7px!important;background:#243b6c!important;color:#edf4ff!important;font-size:11px!important;line-height:1!important}
html[data-theme="premium"] #documentos-escola .document-admin-tabs button.active b{border-color:#d8ccff!important;background:#f1edff!important;color:#4931a7!important}
html[data-theme="premium"] :is(input,select,textarea,[contenteditable="true"]){background:#061e39!important;border:1px solid #32618b!important;color:#edf4ff!important;caret-color:#c6b2ff;accent-color:#9873ff}
html[data-theme="premium"] :is(input,textarea)::placeholder{color:#91a8c6!important;opacity:1}
html[data-theme="premium"] :is(input,select,textarea,button,a,[tabindex]):focus-visible{outline:2px solid #9ea5ff;outline-offset:3px}
html[data-theme="premium"] :is(input,select,textarea):disabled{background:#112a43!important;color:#8b9fb8!important;opacity:.8}
html[data-theme="premium"] :is(.table-search,.search,[class$="-search"],.filter-button,.button.secondary,[class$="-pager"] button){background:#09294c!important;border-color:#2a567e!important;color:#cddff5!important}
html[data-theme="premium"] .button.primary{background:linear-gradient(110deg,#7249fb,#5159eb)!important;border-color:#8c75ff!important;color:#fff!important;box-shadow:0 5px 16px #6142ea30}
html[data-theme="premium"] .button.primary :is(strong,span,small){color:inherit!important}
html[data-theme="premium"] :is(.family-modal-avatar,.metric-icon,.school-stat-icon,.teacher-hero-note>i){background:linear-gradient(140deg,#7148ee,#405de4)!important;color:#fff!important;border:1px solid #ffffff20;box-shadow:0 4px 16px #674cff26}
html[data-theme="premium"] :is(.metric-icon,.school-stat-icon).blue{background:linear-gradient(140deg,#329dff,#2360d8)!important}
html[data-theme="premium"] :is(.metric-icon,.school-stat-icon).green{background:linear-gradient(140deg,#13baa4,#078979)!important}
html[data-theme="premium"] :is(.metric-icon,.school-stat-icon).orange{background:linear-gradient(140deg,#f1ae43,#c77524)!important}

/* Preserve the meaning of state colors on a dark background. */
html[data-theme="premium"] :is(.status,.stock-row>u,.stock-detail header>b,.student-status,.badge-status).good,
html[data-theme="premium"] :is(.status,.stock-row>u,.stock-detail header>b,.student-status,.badge-status).regular{background:#123e3d!important;color:#73eed2!important}
html[data-theme="premium"] :is(.status,.stock-row>u,.stock-detail header>b,.student-status,.badge-status).attention,
html[data-theme="premium"] :is(.status,.stock-row>u,.stock-detail header>b,.student-status,.badge-status).low{background:#46351f!important;color:#ffd38c!important}
html[data-theme="premium"] :is(.status,.stock-row>u,.stock-detail header>b,.student-status,.badge-status).critical,
html[data-theme="premium"] :is(.status,.stock-row>u,.stock-detail header>b,.student-status,.badge-status).danger{background:#502c43!important;color:#ffabc3!important}
html[data-theme="premium"] :is(.empty-filter,.agenda-empty,[class$="-empty"],.dashboard-agenda-empty){background:#072441!important;border-color:#2e537e!important;color:var(--muted)!important}

/* Family home, timeline, messages, calendar, documents and student record. */
html[data-theme="premium"] #familia-aluno.family-view,
html[data-theme="premium"] .ref-family{background:var(--canvas)!important}
html[data-theme="premium"] #familia-aluno .family-home-shell,
html[data-theme="premium"] .ref-family .family-app-shell{background:#051f3b!important;border-color:var(--line)!important}
html[data-theme="premium"] :is(#familia-aluno,.ref-family) :is(.family-topbar,.family-bottom-nav,.family-theme-controls){background:#041a34!important;border-color:var(--line)!important}
html[data-theme="premium"] :is(#familia-aluno,.ref-family) :is(.child-selector,.family-guardian-selector,.family-notification-button,.ref-notifications){background:#0a2c50!important;border-color:var(--line)!important;color:var(--ink)!important}
html[data-theme="premium"] :is(#familia-aluno,.ref-family) :is(h1,h2,h3,strong){color:var(--ink)!important}
html[data-theme="premium"] :is(#familia-aluno,.ref-family) :is(p,small,label){color:var(--muted)!important}
html[data-theme="premium"] :is(#familia-aluno,.ref-family,.family-unified-chrome) .family-bottom-nav button{color:#adc4e3!important;background:transparent!important}
html[data-theme="premium"] :is(#familia-aluno,.ref-family,.family-unified-chrome) .family-bottom-nav button.active{background:#3a3294!important;color:#fff!important}
html[data-theme="premium"] .family-view :is(.family-content,.family-home-content,.message-thread){background:transparent!important}
html[data-theme="premium"] .family-view :is(.received,.message-bubble){background:#113658!important;color:#e4edfa!important}
html[data-theme="premium"] .family-view .sent{background:#443793!important;color:#fff!important}
html[data-theme="premium"] .ref-illustration{opacity:.2;mix-blend-mode:luminosity}
html[data-theme="premium"] .family-view :is(.agenda-calendar>div,.calendar-grid>div){border-color:var(--line)!important;color:#c7d7ea!important}
html[data-theme="premium"] .family-view :is(.agenda-calendar>div,.calendar-grid>div).selected{background:#5742c9!important;color:#fff!important}
html[data-theme="premium"] .family-brand>img{filter:brightness(0) invert(1)}
html[data-theme="premium"] :is(.app-view,.family-view) :is(hr,footer){border-color:var(--line)!important}

html[data-theme="premium"] :is(.app-view,.family-view){--sv-ink:var(--ink)!important;--sv-text:#c2d3ea!important;--sv-muted:var(--muted)!important;--sv-line:var(--line)!important;--sv-soft:#0b3056!important;--sv-purple:#a58aff!important;--sv-purple-2:#704de8!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(
 .saved-local-note,.attendance-date-bar,.alert-filter,.attachment-widget,.permission-check,
 .communication-reach,.document-preview-box,.invite-security,.enrollment-family,.enrollment-capacity,
 .finance-balance,.purchase-value,.indicator-filters,.report-template,.reports-history-link,.schedule-new,
 .publisher-context,.sp-inbox,.sp-columns>aside,.sp-type,.school-inbox,.school-inbox-list,.school-reply,.conversation-student,
 .journal-status,.journal-steps,.journal-footer,.journal-draft-button,.journal-toolbar>label,.attendance-choice button,
 .school-inbox-tools>label,.school-inbox-list button,.school-chat>div>button,.reply-shortcuts button,.conversation-student button,
 .family-day,.family-next,.family-important,.family-shortcuts>button,.family-important>button,
 .calendar-main,.teacher-note,.school-card-open,.profile-menu-item,.family-logout,
 .meal-alert,.meal-plan,.nutrition-total,.media-consent,.messages-layout,.family-service-notice,
 .child-selector,.family-guardian-selector,.conversation-list>label,.conversation-panel>header,.conversation-panel>form,
 .student-filter-bar>button,.training-real-actions>button,.training-real-heading>button,
 .school-calendar-grid>*,.month-grid>*,.meal-admin-days>button,.meal-days>button,.meal-editor>article,
 .meal-editor-head>button,.publisher-panel-heading>button,.dietary-alerts>p,.admin-album-grid>article,
 .health-change-comparison>div,#adminCommunicationList>button,#documentList>button,
 .enrollment-documents>button,.census-checks>button,.funnel-row>button,
 .asset-toolbar>label,.purchase-toolbar>label,.stock-toolbar>label,.system-user-toolbar>label,
 .health-summary>div,.profile-support>button,.substitution-card>button,.health-wide dl>div
){background:#0a2c4f!important;border-color:var(--line)!important;color:#d9e7f8!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.school-calendar-grid,.month-grid)>b{background:#051e39!important;color:#b7cdee!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.school-calendar-grid,.month-grid)>button:hover{background:#143e6b!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.school-calendar-grid,.month-grid) :is(.today,.selected),
html[data-theme="premium"] :is(.app-view,.family-view) :is(.meal-admin-days,.meal-days)>button.active{background:#493995!important;color:white!important;border-color:#a68cff!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.family-home-welcome,.school-portal-heading){background:radial-gradient(ellipse at 90% 20%,#43449c66,transparent 45%),linear-gradient(110deg,#0a2b4c,#0b2550)!important;border-color:var(--line)!important}
html[data-theme="premium"] .portal-school-impact .school-portal-heading{background-color:#08294c!important;background-image:linear-gradient(90deg,#08294c 0%,rgba(8,41,76,.96) 36%,rgba(8,41,76,.48) 67%,rgba(8,41,76,.14) 100%),url('assets/portal-escola-hero.png')!important;background-size:cover!important;background-position:center 53%!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.page-heading,.teacher-journal-head,.family-home-welcome,.agenda-heading) :is(span,p,.back-link){color:#b6c9e8!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.teacher-hero-note,.teacher-hero-note p,.teacher-journal-head h1 span,.journal-meta,.journal-meta span,.journal-meta b,.back-link){color:#b6c9e8!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.teacher-journal-illustration,.teacher-hero-note)>i{background:#253f78!important;color:#b6a3ff!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.publisher-metrics,.indicator-summary,.activity-stats,.report-stats)>article,
html[data-theme="premium"] :is(.app-view,.family-view) :is(.sp-quick-actions,.publication-types)>button{background:#0b3056!important;border-color:var(--line)!important;color:var(--ink)!important}
html[data-theme="premium"] .family-view :is(.activity-stats,.report-stats)>article>i,
html[data-theme="premium"] .family-view :is(.communication-icon,.subject,.meal-icon){background:#243b6c!important;color:#b5ceff!important}
html[data-theme="premium"] .family-view :is(.complete-activity,.approved,.health-hero>b){background:#16463e!important;color:#90f2d7!important;border-color:#226052!important}
html[data-theme="premium"] .app-view .attendance-choice button.active.present,
html[data-theme="premium"] .attendance-summary>b:not(.absent):not(.late){background:#123f39!important;color:#73eed2!important}
html[data-theme="premium"] .app-view .attendance-choice button.active.absent,
html[data-theme="premium"] .attendance-summary>b.absent{background:#502c43!important;color:#ffadc4!important}
html[data-theme="premium"] .app-view .attendance-choice button.active.late,
html[data-theme="premium"] .attendance-summary>b.late{background:#49371c!important;color:#ffd28b!important}
html[data-theme="premium"] #visao-geral :is(.metric-card,.impact-metric-card)>strong{font-size:28px!important;line-height:1.15;letter-spacing:-.04em}
html[data-theme="premium"] #visao-geral .metric-icon{width:46px;height:46px;border-radius:12px;font-size:23px}
html[data-theme="premium"] #visao-geral .metric-card.blue .metric-icon{background:linear-gradient(135deg,#2b9bff,#3564e8)!important}
html[data-theme="premium"] #visao-geral .metric-card.teal .metric-icon{background:linear-gradient(135deg,#18c8b1,#079d91)!important}
html[data-theme="premium"] #visao-geral .impact-metric-card .metric-icon{background:linear-gradient(135deg,#ff728f,#e74470)!important}
html[data-theme="premium"] .search input{border:0!important;background:transparent!important}
html[data-theme="premium"] .app-view :is(.indicator-scorecards,.sp-statistics)>article{background:linear-gradient(135deg,#0b3157,#082442)!important;border-color:var(--line)!important}
html[data-theme="premium"] .app-view :is(.publication-types button>span,.school-chat-body .incoming,.school-chat>div>button),
html[data-theme="premium"] .family-view :is(.calendar-upcoming,.calendar-school-note){background:#103355!important;color:#d9e7f8!important;border-color:var(--line)!important}
html[data-theme="premium"] .app-view .school-calendar-grid small.assessment{background:#3b3069!important;color:#ded0ff!important}
html[data-theme="premium"] .app-view .school-calendar-grid small.meeting{background:#16463e!important;color:#90f2d7!important}
html[data-theme="premium"] #familia-boletim .report-summary i{background:#233e6b!important;color:#b6d2ff!important}
html[data-theme="premium"] #portal-escola .publication-types :is(button,label)>span{background:#253b6c!important;color:#c7bcff!important}
html[data-theme="premium"] #portal-escola .publication-types label input:checked+span{background:#5541bb!important;color:#fff!important;border-color:#ac94ff!important}
html[data-theme="premium"] #mensagens-escola .school-chat button{background:#12463e!important;color:#90f2d7!important}
html[data-theme="premium"] :is(.app-view,.family-view) :is(.text-link,.panel-link,.family-section-heading button,.family-side-title button,.family-next>header button,.family-important>header button,.journal-panel-heading>div>span,.journal-toolbar>button){color:#c1b3ff!important}
html[data-theme="premium"] .app-view .journal-footer>span{color:#b6c9e8!important}
html[data-theme="premium"] #stockMovementOverlay .stock-new-product{background:#103355!important;border-color:#32618b!important}
html[data-theme="premium"] #stockMovementOverlay .stock-new-product-heading span{color:#b6c9e8!important}
html[data-theme="premium"] .journal-panel-heading span{color:#c1b3ff!important}

/* Active search has nested detail tiles and legacy gradients outside the shared cards. */
html[data-theme="premium"] #busca-ativa .active-search-banner{background:linear-gradient(110deg,#30304b,#192d4a)!important;border-color:#796446!important}
html[data-theme="premium"] #busca-ativa .active-search-banner :is(span,button){color:#ffda9e!important}
html[data-theme="premium"] #busca-ativa .active-search-icon{background:#49371c!important;color:#ffd28b!important}
html[data-theme="premium"] #busca-ativa .return-ring:before{background:#082747!important}
html[data-theme="premium"] #busca-ativa .return-ring span{color:var(--ink)!important}
html[data-theme="premium"] #busca-ativa .funnel-row button.active{background:#323064!important;border-color:#a68cff!important;box-shadow:inset 0 -3px #a68cff}
html[data-theme="premium"] :is(#databaseCaseViewer,.case-analysis-grid) :is(.case-viewer-details>div,.case-viewer-action-intro,.case-analysis-card),
html[data-theme="premium"] :is(.case-summary,.case-motive,.case-row-menu button){background:#103355!important;border-color:#32618b!important;color:var(--ink)!important}
html[data-theme="premium"] #databaseCaseViewer :is(.case-viewer-action-intro,.case-viewer-form-heading,.family-access-modal>header) span,
html[data-theme="premium"] .family-access-modal:has(#databaseCaseForm)>header span{color:#c1b3ff!important}
html[data-theme="premium"] #databaseCaseViewer .case-viewer-form{background:#103355!important;border-color:#32618b!important}
html[data-theme="premium"] #databaseCaseViewer .case-viewer-timeline article{background:transparent!important;border-color:#a68cff!important}
html[data-theme="premium"] #databaseCaseViewer .case-viewer-timeline article:before{background:#a68cff!important}
html[data-theme="premium"] #databaseCaseViewer .case-viewer-stage{background:#3b3069!important;color:#ded0ff!important}
html[data-theme="premium"] :is(#databaseCaseViewer .case-viewer-priority.high,#busca-ativa .priority.high){background:#502c43!important;color:#ffabc3!important}
html[data-theme="premium"] :is(#databaseCaseViewer .case-viewer-priority.medium,#busca-ativa .priority.medium,#busca-ativa .reason-tag){background:#46351f!important;color:#ffd38c!important}
html[data-theme="premium"] #databaseCaseViewer .case-viewer-priority.regular{background:#123e3d!important;color:#73eed2!important}
html[data-theme="premium"] #databaseCaseViewer .case-viewer-form-error{background:#502c43!important;color:#ffabc3!important}
html[data-theme="premium"] #databaseCaseError{color:#ffabc3!important}
html[data-theme="premium"] .case-analysis-bar{background:#284866!important}
html[data-theme="premium"] .case-analysis-bar i{background:#a68cff!important}

/* Caixa de mensagens da escola: conversa e resposta seguem a superfície Premium. */
html[data-theme="premium"] #mensagens-escola .school-chat-body{background:#061f3b!important;color:#edf4ff!important}
html[data-theme="premium"] #mensagens-escola .chat-day{border-bottom-color:#315d87!important}
html[data-theme="premium"] #mensagens-escola .chat-day span{background:#061f3b!important;color:#b8cbe5!important}
html[data-theme="premium"] #mensagens-escola .school-chat-body>p.incoming{background:#10385d!important;border-color:#315d87!important;color:#edf4ff!important}
html[data-theme="premium"] #mensagens-escola .school-chat-body>p.outgoing{background:#353584!important;border-color:#665bc5!important;color:#fff!important}
html[data-theme="premium"] #mensagens-escola .school-chat-body :is(time,.message-sender,small){color:#c5d7ec!important}
html[data-theme="premium"] #mensagens-escola .school-reply{background:#08294c!important;border-color:#315d87!important}
html[data-theme="premium"] #mensagens-escola .school-reply textarea{background:#061f3b!important;border-color:#315d87!important;color:#edf4ff!important}
html[data-theme="premium"] #mensagens-escola .school-reply textarea::placeholder{color:#b0c4de!important}
html[data-theme="premium"] #mensagens-escola .reply-shortcuts button{background:#103e3c!important;border-color:#2b786b!important;color:#a6f2df!important}

/* Prontuário do aluno: cartões e textos mantêm contraste no tema Premium. */
html[data-theme="premium"] #aluno-detalhe .student-highlight-cards>article,
html[data-theme="premium"] #aluno-detalhe .student-profile-records>article{background:#0b3056!important;border-color:#315d87!important;color:#edf4ff!important}
html[data-theme="premium"] #aluno-detalhe .student-highlight-cards :is(span,p),
html[data-theme="premium"] #aluno-detalhe .student-profile-records span,
html[data-theme="premium"] #aluno-detalhe .grade-list>div>span,
html[data-theme="premium"] #aluno-detalhe .grade-footer,
html[data-theme="premium"] #aluno-detalhe .timeline-item :is(small,time),
html[data-theme="premium"] #aluno-detalhe .student-info-panel dt,
html[data-theme="premium"] #aluno-detalhe .guardian-profile :is(small,span),
html[data-theme="premium"] #aluno-detalhe .enrollment-card>p>span,
html[data-theme="premium"] #aluno-detalhe .student-profile-note{color:#b8cbe5!important}
html[data-theme="premium"] #aluno-detalhe .student-highlight-cards strong,
html[data-theme="premium"] #aluno-detalhe .student-highlight-cards strong em,
html[data-theme="premium"] #aluno-detalhe .student-profile-records strong,
html[data-theme="premium"] #aluno-detalhe .grade-list>div>strong,
html[data-theme="premium"] #aluno-detalhe .grade-footer b,
html[data-theme="premium"] #aluno-detalhe .timeline-item strong,
html[data-theme="premium"] #aluno-detalhe .student-info-panel dd,
html[data-theme="premium"] #aluno-detalhe .guardian-profile strong,
html[data-theme="premium"] #aluno-detalhe .enrollment-card>p>strong{color:#edf4ff!important}
html[data-theme="premium"] #aluno-detalhe .student-highlight-cards .up-text{color:#76ebc8!important}
html[data-theme="premium"] #aluno-detalhe .grade-list>div>em{background:#274968!important}
html[data-theme="premium"] #aluno-detalhe .grade-list>div>em i{background:linear-gradient(90deg,#8068ff,#b198ff)!important}
html[data-theme="premium"] #aluno-detalhe :is(.grade-footer,.timeline-item,.student-info-panel dl>div,.guardian-profile,.enrollment-card>p){border-color:#315d87!important}

/* Cadastro do responsável: remove superfícies claras residuais do modal. */
html[data-theme="premium"] .family-access-modal .family-modal-status{background:#061f3b!important;border-bottom:1px solid #315d87!important;color:#edf4ff!important}
html[data-theme="premium"] .family-access-modal .family-modal-status small{color:#b8cbe5!important}
html[data-theme="premium"] .family-access-modal .family-access-security-card{background:#10385d!important;border-color:#315d87!important;color:#edf4ff!important}
html[data-theme="premium"] .family-access-modal .family-access-security-card>i{background:#263f78!important;color:#c9d8ff!important}
html[data-theme="premium"] .family-access-modal .family-access-security-card strong{color:#edf4ff!important}
html[data-theme="premium"] .family-access-modal .family-access-security-card small,
html[data-theme="premium"] .family-access-modal .family-modal-permissions label{color:#b8cbe5!important}
html[data-theme="premium"] .family-access-modal .family-modal-permissions>span,
html[data-theme="premium"] .family-access-modal>header span{color:#c1b3ff!important}
html[data-theme="premium"] .family-access-modal>header p{color:#b8cbe5!important}
html[data-theme="premium"] .family-access-modal dl>div,
html[data-theme="premium"] .family-access-modal footer{border-color:#315d87!important}
}

@media(max-width:690px){
 .topbar .theme-switcher{position:static;box-shadow:none}
 .topbar .theme-switcher button{width:32px;padding:0;justify-content:center}
 .topbar .theme-switcher button span{display:none}
 .family-theme-controls{padding:8px 14px}
 .family-theme-controls .theme-switcher button{min-height:36px}
}
