:root{--burgundy:#681F36;--graphite:#19191D;--ivory:#F5F0E8;--copper:#B98C76;--white:#fff;--line:#e6dcd4;--muted:#69666a}*{box-sizing:border-box}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--graphite);background:var(--ivory)}body{margin:0;min-height:100vh}a{color:var(--burgundy)}.auth-layout{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.art{background:linear-gradient(145deg,#451526 0%,var(--burgundy) 75%);color:var(--ivory);padding:clamp(24px,5vw,72px);display:flex;flex-direction:column;justify-content:space-between;gap:40px}.art img{display:block;width:min(260px,80%);height:auto}.art h1{font-weight:500;letter-spacing:-.04em;font-size:clamp(36px,5vw,70px);line-height:1.08;max-width:560px;margin:0}.art p{line-height:1.6;max-width:440px;color:#f4e5e8}.form-side{display:flex;flex-direction:column;justify-content:center;padding:clamp(24px,5vw,88px);min-width:0}.auth-card{width:100%;max-width:450px;margin-inline:auto}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:50px}.topbar a{font-size:14px;text-decoration:none}.lang-buttons{display:flex;gap:6px}.lang-buttons button{border:1px solid var(--line);border-radius:24px;background:transparent;padding:6px 12px;cursor:pointer;color:var(--graphite)}.lang-buttons button[aria-pressed=true]{background:var(--burgundy);color:#fff;border-color:var(--burgundy)}h2{font-weight:600;letter-spacing:-.025em;font-size:clamp(26px,3vw,38px);line-height:1.2;margin:0 0 10px}.subhead{font-size:15px;line-height:1.6;color:var(--muted);margin:0 0 32px}.field{margin-bottom:20px}.field label{display:block;font-size:14px;font-weight:600;margin-bottom:9px}.field input{font:inherit;width:100%;padding:15px 14px;border:1px solid #c8bfc0;background:var(--white);border-radius:9px;color:var(--graphite);outline-offset:3px}.field input:focus-visible{outline:2px solid var(--burgundy)}.primary{border:0;background:var(--burgundy);color:white;display:inline-flex;justify-content:center;align-items:center;min-height:50px;padding:12px 22px;font:inherit;font-weight:600;border-radius:9px;cursor:pointer;width:100%;transition:background .15s}.primary:hover{background:#4e1528}.primary:disabled{opacity:.6;cursor:wait}.secondary{background:transparent;border:1px solid var(--line);color:var(--burgundy);border-radius:9px;padding:11px 18px;cursor:pointer;font:inherit}.fine{margin-top:25px;font-size:14px;color:var(--muted);text-align:center;line-height:1.6}.status{border-radius:8px;background:#f0e7e2;padding:13px 15px;color:var(--graphite);font-size:14px;line-height:1.5;margin:15px 0}.status[data-type=error]{background:#f9dce3;color:#7d1934}.status[data-type=success]{background:#e1efe4;color:#215c36}.status[hidden],.view[hidden]{display:none!important}.dashboard{min-height:100vh;max-width:960px;margin:0 auto;padding:30px clamp(20px,4vw,55px)}.dashboard-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-bottom:25px;border-bottom:1px solid var(--line)}.dashboard-header img{width:160px;max-width:50vw;height:auto}.dashboard main{padding:50px 0}.pill{display:inline-flex;background:#ead9dc;color:var(--burgundy);padding:8px 12px;font-size:13px;border-radius:50px;margin:4px 6px 4px 0}.info-card{background:#fff;border-radius:14px;padding:25px;margin:26px 0;box-shadow:0 8px 32px #19191d0c}.info-card h3{margin:0 0 10px}.info-card p{line-height:1.6;margin:0;color:var(--muted)}.info-card ul{padding-left:20px;line-height:1.8}.dashboard .secondary{white-space:nowrap}@media(max-width:760px){.auth-layout{grid-template-columns:1fr}.art{min-height:200px;padding:24px;gap:20px}.art img{width:160px}.art h1{font-size:30px}.art p{display:none}.form-side{padding:32px 24px 65px}.topbar{margin-bottom:35px}.dashboard-header{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Ginga V1.2 — gestão de alunos */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;clip-path:inset(50%)}
.admin-area{margin:28px 0 38px}.admin-hero{background:#681f36;border-radius:16px;color:#fff;padding:clamp(22px,4vw,38px);position:relative;overflow:hidden}.admin-hero:after{content:"";position:absolute;width:240px;height:240px;border:1px solid #ffffff2a;border-radius:50%;right:-90px;top:-90px;pointer-events:none}.admin-eyebrow{font-size:11px;font-weight:700;letter-spacing:.17em;color:#b98c76}.admin-hero-row{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap}.admin-hero h2{margin:9px 0 7px;font-size:clamp(27px,3.5vw,39px);font-weight:600;letter-spacing:-.035em}.admin-hero p{margin:0;color:#eedbde;line-height:1.6;font-size:14px}.admin-new{background:#f5f0e8;color:#681f36;width:auto;min-height:44px;position:relative;z-index:1}.admin-new:hover{background:#e7d6d8;color:#681f36}.admin-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:17px 0 23px}.admin-stat{background:#fff;border:1px solid #ece2dc;border-radius:14px;padding:19px 21px;display:flex;flex-direction:column;gap:8px}.admin-stat span{font-size:13px;color:#71656b}.admin-stat strong{font-size:31px;font-weight:650;letter-spacing:-.04em}.admin-roster{background:#fff;border:1px solid #e9dfdc;border-radius:16px;padding:22px}.admin-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:19px}.admin-toolbar h3{margin:0 0 6px;font-size:20px;letter-spacing:-.02em}.admin-toolbar p{color:#766b70;font-size:13px;margin:0}.admin-filters{display:flex;gap:9px;flex-wrap:wrap}.admin-filters input,.admin-filters select,.admin-form .field select{font:inherit;border:1px solid #d9cfd0;color:#19191d;background:#fff;border-radius:9px;min-height:42px;padding:9px 12px}.admin-filters input{min-width:210px;max-width:100%}.admin-filters select{min-width:120px}.admin-table-scroll{overflow-x:auto}.admin-table{border-collapse:collapse;width:100%;min-width:590px;font-size:14px}.admin-table thead{background:#f8f4f0}.admin-table th{text-align:left;font-weight:650;font-size:12px;color:#6d6167;padding:13px 12px}.admin-table td{border-top:1px solid #f0e9e6;padding:15px 12px;vertical-align:middle}.admin-name{font-weight:650;color:#19191d;display:block}.admin-email{font-size:12px;color:#7e7476;display:block;margin-top:4px;word-break:break-word}.admin-subtle{font-size:13px;color:#766b70}.admin-status-pill{display:inline-block;border-radius:20px;background:#f2ebde;color:#7a5626;padding:6px 10px;font-size:12px;white-space:nowrap}.admin-status-pill.active{background:#e2f0e6;color:#235b3b}.admin-status-pill.inactive{background:#f4e3e7;color:#85334b}.admin-edit{font:inherit;font-weight:650;color:#681f36;background:transparent;border:1px solid #e9dce0;border-radius:8px;padding:8px 11px;cursor:pointer}.admin-edit:hover{background:#f9f2f4}.admin-empty{padding:27px 12px;text-align:center;color:#746a6b;font-size:14px}.admin-dialog{border:1px solid #e4d9d6;border-radius:18px;background:#fff;color:#19191d;padding:0;width:min(760px,calc(100% - 24px));max-height:min(90vh,950px);box-shadow:0 30px 80px #0004}.admin-dialog::backdrop{background:#1f1019a9}.admin-form{padding:clamp(18px,3vw,32px)}.admin-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:18px;margin-bottom:18px;border-bottom:1px solid #eee4e1}.admin-dialog-header h2{font-size:26px;margin:5px 0}.admin-close{background:none;border:0;font-size:30px;line-height:1;cursor:pointer;color:#7a6870;padding:0 6px}.admin-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px}.admin-form .field{margin-bottom:16px}.admin-form .field label{margin-bottom:6px;font-size:13px}.admin-form .field input,.admin-form .field select{width:100%;min-height:44px;padding:10px 12px}.admin-form .field input:focus-visible,.admin-form .field select:focus-visible,.admin-filters input:focus-visible,.admin-filters select:focus-visible{outline:2px solid #681f36;outline-offset:2px}.admin-form-note{font-size:12px;color:#71676b;line-height:1.6;margin:4px 0 18px}.admin-dialog-actions{display:flex;justify-content:flex-end;gap:10px}.admin-dialog-actions .primary{width:auto;min-height:44px}.admin-dialog-actions .secondary{min-height:44px}.admin-area[hidden],.admin-dialog[hidden]{display:none!important}
@media(max-width:760px){.admin-roster{padding:16px}.admin-stats{gap:8px}.admin-stat{padding:14px}.admin-stat strong{font-size:25px}.admin-stat span{font-size:11px}.admin-new{width:100%}.admin-hero-row{align-items:stretch}.admin-filters{width:100%}.admin-filters input{flex:1;min-width:160px}.admin-filters select{flex:1;min-width:110px}.admin-form-grid{grid-template-columns:1fr}.admin-dialog{max-height:95vh}.admin-form{padding:20px}.admin-dialog-actions .primary{flex:1}}

/* GINGA V1.3 — temas no portal, idioma nos painéis e cadastro docente */
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark;background:#19191d;color:#f5f0e8}
html[data-theme="dark"] body{background:#19191d;color:#f5f0e8}
.dashboard{max-width:1240px}
.dashboard-header-controls{display:flex;align-items:center;justify-content:flex-end;gap:13px;flex-wrap:wrap}
.app-languages,.portal-controls{display:flex;gap:9px;align-items:center}
.app-languages button{border:0;background:transparent;color:var(--muted);font:600 12px/1.3 inherit;padding:8px 4px;cursor:pointer}
.app-languages button[aria-pressed="true"]{color:var(--burgundy);border-bottom:2px solid var(--copper)}
.theme-toggle{background:transparent;color:var(--burgundy);border:1px solid var(--line);border-radius:9px;padding:10px 13px;min-height:42px;cursor:pointer;font:600 13px/1.2 system-ui}
.theme-toggle:hover,.admin-tab:hover{border-color:var(--copper)}
.portal-controls{gap:13px;flex-wrap:wrap;justify-content:flex-end}
.portal-controls .lang-buttons{padding-left:11px;border-left:1px solid var(--line)}
.admin-navigation{display:flex;align-items:center;gap:6px;margin-top:38px;border-bottom:1px solid var(--line)}
.admin-navigation[hidden]{display:none!important}
.admin-tab{color:var(--muted);background:transparent;border:0;border-bottom:3px solid transparent;padding:13px 23px;font:600 15px system-ui;cursor:pointer}
.admin-tab.is-active{color:var(--burgundy);border-bottom-color:var(--burgundy)}
.teacher-actions{display:flex;gap:7px;flex-wrap:wrap}
.teacher-actions .admin-edit{white-space:nowrap}
.field-wide{grid-column:1/-1}
.admin-form .field textarea{border:1px solid #d9cfd0;background:#fff;border-radius:9px;color:#19191d;font:inherit;width:100%;padding:10px 12px;resize:vertical}
#admin-teachers[hidden],#admin-students[hidden]{display:none!important}
html[data-theme="dark"] .subhead,html[data-theme="dark"] .fine{color:#c5b8bb}
html[data-theme="dark"] .dashboard-header{border-color:#4d3c45}
html[data-theme="dark"] .dashboard-header img{filter:brightness(0) invert(1)}
html[data-theme="dark"] .secondary,html[data-theme="dark"] .theme-toggle{color:#f5f0e8;border-color:#6b525c;background:#29272c}
html[data-theme="dark"] .theme-toggle:hover,html[data-theme="dark"] .secondary:hover{background:#403039}
html[data-theme="dark"] a{color:#d9afbf}
html[data-theme="dark"] .info-card,html[data-theme="dark"] .admin-stat,html[data-theme="dark"] .admin-roster{background:#252429;border-color:#493d44;box-shadow:0 8px 28px #00000018}
html[data-theme="dark"] .info-card p,html[data-theme="dark"] .admin-stat span,html[data-theme="dark"] .admin-toolbar p,html[data-theme="dark"] .admin-empty{color:#c0afb6}
html[data-theme="dark"] .pill{background:#422b36;color:#f5dee7}
html[data-theme="dark"] .admin-tab{color:#baafb3}
html[data-theme="dark"] .admin-tab.is-active{color:#f0c0d0;border-bottom-color:#b98c76}
html[data-theme="dark"] .app-languages button{color:#bbb0b5}
html[data-theme="dark"] .app-languages button[aria-pressed="true"]{color:#f5f0e8}
html[data-theme="dark"] .admin-table thead{background:#302d33}
html[data-theme="dark"] .admin-table th,html[data-theme="dark"] .admin-subtle{color:#c2adb5}
html[data-theme="dark"] .admin-table td{border-color:#413941}
html[data-theme="dark"] .admin-name{color:#f5f0e8}
html[data-theme="dark"] .admin-email{color:#baadb2}
html[data-theme="dark"] .admin-filters input,html[data-theme="dark"] .admin-filters select,
html[data-theme="dark"] .admin-form .field input,html[data-theme="dark"] .admin-form .field select,
html[data-theme="dark"] .admin-form .field textarea,
html[data-theme="dark"] .field input{background:#222127;border-color:#65525c;color:#f5f0e8}
html[data-theme="dark"] .admin-dialog{background:#252429;color:#f5f0e8;border-color:#5c4953}
html[data-theme="dark"] .admin-dialog-header{border-color:#50434b}
html[data-theme="dark"] .admin-close,html[data-theme="dark"] .admin-form-note{color:#c1acb5}
html[data-theme="dark"] .admin-edit{color:#f2cbd8;border-color:#73505f}
html[data-theme="dark"] .admin-edit:hover{background:#382831}
html[data-theme="dark"] .admin-status-pill{background:#443923;color:#efdab0}
html[data-theme="dark"] .admin-status-pill.active{background:#244435;color:#c2ead1}
html[data-theme="dark"] .admin-status-pill.inactive{background:#4a2733;color:#f2b9cd}
html[data-theme="dark"] .status{background:#393038;color:#f4e4e8}
html[data-theme="dark"] .status[data-type="error"]{background:#4c2932;color:#ffd7e2}
html[data-theme="dark"] .status[data-type="success"]{background:#254137;color:#c8efdd}
html[data-theme="dark"] .form-side .lang-buttons button{color:#d5c8cd;border-color:#5f4a54}
html[data-theme="dark"] .form-side .lang-buttons button[aria-pressed="true"]{background:#681f36;color:#fff}
html[data-theme="dark"] .form-side .portal-controls .lang-buttons{border-color:#56434d}
html[data-theme="dark"] .form-side .field label{color:#e3d5d9}
html[data-theme="dark"] .form-side .field input:focus-visible{outline-color:#b98c76}
@media(max-width:850px){.dashboard{padding:24px 18px}.dashboard main{padding:32px 0}.dashboard-header-controls{gap:7px}.dashboard-header img{width:135px}.theme-toggle{padding:9px 10px}.admin-tab{flex:1}}
@media(max-width:520px){.dashboard-header{align-items:center}.dashboard-header-controls{width:100%;justify-content:space-between}.teacher-actions{flex-direction:column}.portal-controls{justify-content:space-between;width:100%}}

/* Ginga V1.4 — menu lateral do portal admin e formulário de segurança */
.admin-workspace{display:grid;grid-template-columns:215px minmax(0,1fr);gap:26px;align-items:start;margin-top:30px}
.admin-workspace[hidden]{display:none!important}
.admin-workspace-body{min-width:0}
.admin-sidebar{display:flex;flex-direction:column;gap:5px;margin:0;border:1px solid #e9dfdc;border-radius:14px;padding:16px 10px;background:#fff;position:sticky;top:20px}
.admin-sidebar-title{margin:5px 12px 14px;font-size:11px;letter-spacing:.11em;font-weight:700;color:#796b72}
.admin-sidebar .admin-tab{display:block;text-align:left;border:0;border-left:3px solid transparent;border-radius:7px;padding:12px 12px;width:100%;font:600 14px system-ui;transition:background .15s}
.admin-sidebar .admin-tab.is-active{border-left-color:#681f36;background:#f6e9ed;color:#681f36}
.admin-sidebar .admin-tab:hover{background:#f7f0f1}
.admin-workspace .admin-area{margin:0 0 38px}
.security-panel{max-width:760px;margin-top:18px}
.security-panel h3{margin:0 0 10px;font-size:21px}
.security-description{font-size:14px;color:#6a5f65;line-height:1.7;margin:0 0 15px}
.security-notice{font-size:13px;line-height:1.6;border-left:3px solid #b98c76;padding:10px 14px;background:#f7f1ed;color:#62374b;margin:15px 0 24px}
.security-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}
.security-form-grid .field{margin-bottom:20px}
.security-form-grid label{font-size:13px}
.security-form-grid input,.security-form-grid select{width:100%;min-height:45px;padding:10px 12px;font:inherit;border:1px solid #d9cfd0;color:#19191d;background:#fff;border-radius:9px}
.security-actions{display:flex;justify-content:flex-end}
.security-actions .primary{width:auto;min-height:44px}
.security-footnote{font-size:12px;line-height:1.6;color:#71676b;margin:24px 0 0}
html[data-theme="dark"] .admin-sidebar{background:#252429;border-color:#493d44}
html[data-theme="dark"] .admin-sidebar-title{color:#c1afb7}
html[data-theme="dark"] .admin-sidebar .admin-tab.is-active{background:#402833;border-left-color:#b98c76;color:#f5f0e8}
html[data-theme="dark"] .admin-sidebar .admin-tab:hover{background:#382c33}
html[data-theme="dark"] .security-description,html[data-theme="dark"] .security-footnote{color:#c1b2b9}
html[data-theme="dark"] .security-notice{background:#392d31;color:#f0d3dc}
html[data-theme="dark"] .security-form-grid input,html[data-theme="dark"] .security-form-grid select{background:#222127;border-color:#65525c;color:#f5f0e8}
@media(max-width:860px){.admin-workspace{grid-template-columns:1fr;gap:17px}.admin-sidebar{position:static;flex-direction:row;flex-wrap:wrap;padding:10px}.admin-sidebar-title{width:100%;margin:3px 8px}.admin-sidebar .admin-tab{width:auto;flex:1;text-align:center;border:0;border-bottom:3px solid transparent;padding:12px 6px}.admin-sidebar .admin-tab.is-active{border:0;border-bottom:3px solid #b98c76}.admin-sidebar .admin-tab{min-width:95px}}
@media(max-width:560px){.security-form-grid{grid-template-columns:1fr}.security-actions .primary{width:100%}.admin-sidebar-title{font-size:10px}}

/* Ginga V1.4 — confirmação de PIN por operação administrativa. */
.admin-pin-confirm-dialog{width:min(440px,calc(100% - 28px))}
.admin-pin-confirm-dialog .admin-form-note{margin:12px 0 22px}
.admin-pin-confirm-dialog .field{margin:0 0 18px}
.admin-pin-confirm-dialog input{width:100%;min-height:46px;letter-spacing:.24em}
.admin-pin-confirm-dialog .status{margin:0 0 16px}
@media(max-width:520px){.admin-pin-confirm-dialog .admin-dialog-actions{flex-wrap:wrap}.admin-pin-confirm-dialog .admin-dialog-actions button{flex:1}}

/* V1.4.2: excluir/arquivar e restaurar aluno sem apagar historico */
.admin-dialog-actions .admin-danger{margin-right:auto;background:transparent;color:#a22235;border:1px solid #a22235;border-radius:9px;padding:10px 14px;font:inherit;font-weight:650;cursor:pointer;min-height:44px}
.admin-dialog-actions .admin-danger:hover{background:#fff0f1}
html[data-theme="dark"] .admin-dialog-actions .admin-danger{color:#ffb3c0;border-color:#bd7283}
html[data-theme="dark"] .admin-dialog-actions .admin-danger:hover{background:#482735}
.admin-dialog-actions button[hidden]{display:none!important}
@media(max-width:600px){.admin-dialog-actions{flex-wrap:wrap}.admin-dialog-actions .admin-danger{flex-basis:100%;margin-right:0}}

/* GINGA V1.4.3 — solicitações de pré-cadastro */
#admin-applications[hidden],#application-dialog[hidden]{display:none!important}
.application-detail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 18px;margin:12px 0 23px}.application-detail div{min-width:0}.application-detail dt{font-size:12px;color:#766b70;font-weight:650;margin-bottom:5px}.application-detail dd{margin:0;font-size:14px;line-height:1.5;word-break:break-word;white-space:pre-wrap}.application-detail div:nth-child(7){grid-column:1/-1}.application-detail div:nth-child(7) dd{white-space:pre-wrap}html[data-theme="dark"] .application-detail dt{color:#c0afb6}@media(max-width:560px){.application-detail{grid-template-columns:1fr}}

/* GINGA V1.4.4 — indicador discreto de solicitacoes pendentes */
.admin-sidebar .admin-tab{display:flex;align-items:center;justify-content:space-between;gap:8px}
.application-new-dot{display:inline-flex;width:10px;height:10px;min-width:10px;border-radius:50%;background:#db334b;box-shadow:0 0 0 2px rgba(219,51,75,.12);margin-left:8px;flex-shrink:0}
.application-new-dot[hidden]{display:none!important}
.application-review-panel{border-top:1px solid rgba(124,95,108,.18);margin:8px 0 0;padding-top:18px}
.application-review-panel[hidden]{display:none!important}
.application-review-panel .field{margin-bottom:14px}
.application-review-panel select{width:100%}
.application-review-actions{gap:10px;flex-wrap:wrap}
@media(max-width:860px){.admin-sidebar .admin-tab{justify-content:center}}
@media(max-width:560px){.application-review-actions button{width:100%}}

/* GINGA V1.4.5: PIN visualmente oculto, sem ser identificado como nova senha pelo Chrome.
   Fallback JS usa type=password para browsers sem -webkit-text-security. */
.ginga-pin-secret{-webkit-text-security:disc;font-variant-numeric:tabular-nums}

/* GINGA V1.4.5 - estado do convite dentro de Editar aluno */
.ginga-access-section{padding:1rem 1.1rem;border:1px solid var(--border,#8c8c8c55);border-radius:12px;margin:.35rem 0 .85rem}
.ginga-access-section h3{font-size:1rem;margin:0 0 .5rem}
.ginga-access-actions{display:flex;flex-wrap:wrap;gap:.55rem;margin-top:.85rem}
.ginga-access-actions button{min-height:2.5rem}
