:root{
 --primary:#0B5CFF;--primary2:#09A9FF;--navy:#0c1f44;--bg:#f5f8fd;--card:#fff;--text:#13233f;--muted:#6c7a92;--border:#e2e9f3;--success:#16a34a;--danger:#dc2626;--warning:#d97706;--shadow:0 14px 40px rgba(20,50,100,.08);--radius:18px
}
*{box-sizing:border-box}html,body{margin:0;padding:0;min-height:100%;width:100%;max-width:100%;overflow-x:hidden;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-text-size-adjust:100%}img,svg,video,canvas,iframe{max-width:100%}main,section,article,aside,header,footer,nav,div,form,fieldset{min-width:0}.card,.field,.row,.grid>*{min-width:0}p,h1,h2,h3,h4,h5,h6,td,th,a,span,strong,label{overflow-wrap:anywhere;word-break:normal}.no-copy,.no-copy *{-webkit-user-select:none;user-select:none}.no-copy input,.no-copy textarea,.no-copy select{-webkit-user-select:text;user-select:text}
a{color:var(--primary);text-decoration:none}button,input,select,textarea{font:inherit}.hidden{display:none!important}.muted{color:var(--muted)}.small{font-size:12px}.text-right{text-align:right}.text-center{text-align:center}.w100{width:100%}.mt{margin-top:18px}.mb{margin-bottom:18px}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.grow{flex:1}.brand{display:flex;align-items:center;gap:12px}.brand img{height:54px;width:auto;display:block}.brand.small img{height:42px}
.auth-page{min-height:100vh;display:grid;grid-template-columns:minmax(320px,470px) 1fr}.auth-panel{padding:42px;display:flex;flex-direction:column;justify-content:center;background:#fff}.auth-visual{background:radial-gradient(circle at 25% 20%,#25b8ff 0,#0b5cff 35%,#071b42 100%);position:relative;overflow:hidden;padding:52px;color:#fff;display:flex;align-items:flex-end}.auth-visual:before,.auth-visual:after{content:"";position:absolute;border-radius:999px;background:rgba(255,255,255,.08)}.auth-visual:before{width:440px;height:440px;right:-120px;top:-120px}.auth-visual:after{width:260px;height:260px;left:12%;top:18%}.auth-copy{position:relative;z-index:1;max-width:650px}.auth-copy h2{font-size:42px;line-height:1.05;margin:0 0 16px}.auth-copy p{font-size:18px;line-height:1.6;color:#dceaff}.auth-card{max-width:430px;width:100%;margin:32px auto 0}.auth-card h1{margin:0 0 7px;font-size:30px}.field{margin-bottom:14px}.field label{display:block;font-size:13px;font-weight:800;margin:0 0 6px;color:#34445f}.field input,.field select,.field textarea{width:100%;border:1px solid var(--border);border-radius:13px;padding:12px 14px;background:#fff;color:var(--text);outline:none;transition:.2s}.field textarea{min-height:110px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(11,92,255,.09)}.field-help{font-size:12px;color:var(--muted);margin-top:5px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:12px;padding:11px 15px;font-weight:800;cursor:pointer;transition:.18s;background:#eef3fb;color:#223352}.btn:hover{transform:translateY(-1px)}.btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;box-shadow:0 8px 24px rgba(11,92,255,.22)}.btn-danger{background:#fff0f0;color:#b91c1c}.btn-success{background:#ecfdf3;color:#166534}.btn-warning{background:#fff7ed;color:#9a3412}.btn-sm{padding:8px 10px;border-radius:10px;font-size:12px}.btn-block{width:100%}.icon-btn{width:42px;height:42px;padding:0;border-radius:12px}
.alert{padding:12px 14px;border-radius:12px;margin:12px 0;font-weight:650;font-size:14px}.alert-success{background:#ecfdf3;color:#166534;border:1px solid #bbf7d0}.alert-error{background:#fff1f2;color:#9f1239;border:1px solid #fecdd3}.alert-warning{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.alert-info{background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe}
.app-shell{display:grid;grid-template-columns:270px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:#081a3a;color:#e7efff;padding:20px 14px;overflow:auto}.sidebar .brand{padding:0 10px 20px;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:14px}.sidebar .brand img{height:52px;filter:brightness(0) invert(1)}.nav-section{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#7690bd;padding:13px 12px 6px;font-weight:800}.nav-link{display:flex;align-items:center;gap:11px;padding:11px 12px;margin:3px 0;color:#cbd9f2;border-radius:12px;font-weight:700}.nav-link:hover,.nav-link.active{background:linear-gradient(90deg,rgba(11,92,255,.32),rgba(9,169,255,.09));color:#fff}.nav-ico{width:22px;text-align:center}.main{min-width:0}.topbar{height:76px;background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 28px;position:sticky;top:0;z-index:20}.topbar .hamb{display:none}.top-title{font-size:19px;font-weight:900}.top-user{margin-left:auto;display:flex;align-items:center;gap:10px}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#e8f0ff;color:var(--primary);font-weight:900}.content{padding:28px;max-width:1500px;margin:0 auto}.page-title{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;margin-bottom:22px}.page-title h1{margin:0 0 6px;font-size:28px}.page-title p{margin:0;color:var(--muted)}
.grid{display:grid;gap:16px}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.stat{padding:18px;display:flex;gap:14px;align-items:center}.stat-ico{width:50px;height:50px;border-radius:15px;display:grid;place-items:center;background:#eef4ff;font-size:23px}.stat b{font-size:27px;display:block}.stat span{color:var(--muted);font-size:13px}.card h2,.card h3{margin-top:0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.section-head h2{font-size:18px;margin:0}
.table-wrap{overflow:visible;max-width:100%;border:1px solid var(--border);border-radius:14px;background:#fff}.table{border-collapse:collapse;width:100%;max-width:100%;min-width:0;table-layout:fixed}.table th,.table td{padding:12px 13px;border-bottom:1px solid #edf1f7;text-align:left;vertical-align:middle;white-space:normal;overflow-wrap:anywhere}.table th{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#718096;background:#f8faff}.table tr:last-child td{border-bottom:0}.table td>*{max-width:100%}.actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.actions form{margin:0;min-width:0}.actions .btn{white-space:normal;line-height:1.2}.badge{display:inline-flex;align-items:center;max-width:100%;white-space:normal;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:850}.badge-on{background:#ecfdf3;color:#166534}.badge-off{background:#f1f5f9;color:#64748b}.badge-easy{background:#ecfdf3;color:#166534}.badge-hard{background:#fff1f2;color:#b91c1c}.badge-blue{background:#eff6ff;color:#1d4ed8}.badge-warn{background:#fff7ed;color:#9a3412}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid .span-2{grid-column:span 2}.check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.check{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--border);border-radius:11px;background:#fafcff}.check input{accent-color:var(--primary)}.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:end;margin-bottom:14px;max-width:100%}.toolbar .field{margin:0;min-width:min(180px,100%);max-width:100%;flex:1 1 180px}.toolbar .btn{max-width:100%;white-space:normal}.empty{padding:32px;text-align:center;color:var(--muted)}
.student-hero{background:linear-gradient(135deg,#071e47,#0b5cff 62%,#09a9ff);color:#fff;border-radius:24px;padding:28px;box-shadow:0 18px 48px rgba(11,92,255,.22);position:relative;overflow:hidden}.student-hero:after{content:"";width:280px;height:280px;border-radius:50%;background:rgba(255,255,255,.08);position:absolute;right:-70px;top:-130px}.student-hero h1{margin:0 0 7px;font-size:30px}.student-hero p{margin:0;color:#d9e7ff}.subject-card{display:flex;gap:14px;align-items:center}.subject-icon{width:48px;height:48px;border-radius:14px;background:#eff6ff;color:#1d4ed8;display:grid;place-items:center;font-size:22px;flex:0 0 auto}.material-card{display:flex;flex-direction:column;gap:10px}.material-meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:12px}.sim-card{border-left:4px solid var(--primary)}.progress{height:8px;border-radius:999px;background:#edf2fa;overflow:hidden}.progress>i{display:block;height:100%;background:linear-gradient(90deg,var(--primary),var(--primary2));border-radius:inherit}.attempt-row{display:grid;grid-template-columns:1.3fr repeat(4,.7fr) auto;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid var(--border)}.attempt-row:last-child{border-bottom:0}.score-big{font-size:38px;font-weight:950}.question{font-size:18px;line-height:1.6;margin:0 0 18px;white-space:pre-wrap}.option{display:flex;gap:11px;align-items:flex-start;padding:13px 14px;border:1px solid var(--border);border-radius:13px;margin:8px 0;background:#fff;cursor:pointer}.option:hover{border-color:#b6c8e8}.option input{margin-top:4px;accent-color:var(--primary)}.option.correct{background:#ecfdf3;border-color:#86efac}.option.wrong{background:#fff1f2;border-color:#fda4af}.feedback{padding:16px;border-radius:14px;line-height:1.6}.feedback.good{background:#ecfdf3;color:#14532d}.feedback.bad{background:#fff1f2;color:#881337}.feedback h3{margin:0 0 7px}.timer{font-variant-numeric:tabular-nums;font-weight:900;background:#0c1f44;color:#fff;padding:8px 12px;border-radius:10px}.install-banner{display:flex;align-items:center;gap:12px;background:#eef5ff;border:1px solid #d7e6ff;border-radius:15px;padding:13px 15px}.push-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff9ed;border:1px solid #fde7b1;border-radius:15px;padding:13px 15px}.mobile-overlay{display:none}
@media(max-width:1000px){.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;left:-285px;z-index:50;width:270px;transition:.23s}.sidebar.open{left:0}.topbar .hamb{display:inline-flex;margin-right:12px}.mobile-overlay.show{display:block;position:fixed;inset:0;background:rgba(3,12,30,.52);z-index:40}.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(2,1fr)}.content{padding:20px}}
@media(max-width:900px){
.table-wrap{border:0;border-radius:0;background:transparent}
.table,.table tbody,.table tr,.table td{display:block;width:100%;max-width:100%}
.table{table-layout:auto}
.table thead{display:none}
.table tbody{display:grid;gap:12px}
.table tr{background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 8px 24px rgba(20,50,100,.05);overflow:hidden}
.table td{display:grid;grid-template-columns:minmax(92px,32%) minmax(0,1fr);gap:12px;align-items:start;padding:10px 12px;border-bottom:1px solid #edf1f7;text-align:right}
.table td::before{content:attr(data-label);font-size:10px;line-height:1.4;text-transform:uppercase;letter-spacing:.05em;color:#718096;font-weight:900;text-align:left}
.table td:last-child{border-bottom:0}
.table td .actions{justify-content:flex-end}
.table td .actions .btn{min-height:34px}
.table td>div,.table td>span,.table td>strong,.table td>a{min-width:0;max-width:100%}
}
@media(max-width:720px){.auth-page{display:block}.auth-panel{min-height:100vh;padding:24px 18px}.auth-visual{display:none}.brand img{height:46px}.content{padding:15px}.topbar{padding:0 15px;height:68px}.top-user .who{display:none}.page-title{align-items:stretch;flex-direction:column}.page-title h1{font-size:24px}.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}.check-grid{grid-template-columns:1fr}.card{padding:16px;border-radius:16px;max-width:100%}.student-hero{padding:22px}.student-hero h1{font-size:24px}.attempt-row{grid-template-columns:1fr 1fr;gap:8px}.attempt-row>*{min-width:0}.attempt-row .attempt-action{grid-column:1/-1}.push-banner,.install-banner{align-items:flex-start;flex-direction:column}.toolbar{align-items:stretch}.toolbar .field{min-width:100%;width:100%;flex-basis:100%}.toolbar .btn{width:100%}.section-head{align-items:flex-start;flex-wrap:wrap}.row>.btn,.row>form{max-width:100%}.row>form .btn{max-width:100%;white-space:normal}}

@media(max-width:480px){
.content{padding:12px}
.card{padding:14px}
.table td{grid-template-columns:1fr;gap:4px;text-align:left}
.table td::before{margin-bottom:1px}
.table td .actions{justify-content:flex-start}
.table td .actions form,.table td .actions .btn{flex:1 1 auto}
.table td .actions form .btn{width:100%}
.attempt-row{grid-template-columns:1fr 1fr}
.page-title .btn{width:100%}
.student-hero{border-radius:18px}
}


/* Modo de prova: ocupa toda a área útil e remove distrações do painel. */
body.exam-mode{overflow-x:hidden;background:#f3f6fb}
.exam-shell{min-height:100vh;min-height:100dvh;width:100%;display:flex;flex-direction:column;background:#f3f6fb}
.exam-topbar{min-height:72px;width:100%;max-width:100%;display:flex;align-items:center;gap:16px;padding:10px 24px;background:#fff;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:30;box-shadow:0 5px 18px rgba(20,50,100,.05)}
.exam-brand img{height:44px;width:auto;display:block}.exam-student{margin-left:auto;display:flex;flex-direction:column;text-align:right}.exam-fullscreen-btn{white-space:nowrap}
.exam-content{width:100%;max-width:100%;min-width:0;flex:1;padding:28px clamp(16px,4vw,64px);display:flex;flex-direction:column}
.exam-header{display:flex;align-items:center;gap:16px;justify-content:space-between;flex-wrap:wrap;min-width:0;margin-bottom:18px}.exam-header h1{margin:0 0 5px;font-size:clamp(22px,3vw,32px)}.exam-header p{margin:0;color:var(--muted)}
.exam-progress{margin-bottom:22px}.exam-question-card{width:100%;max-width:100%;min-width:0;flex:1;display:flex;flex-direction:column;justify-content:flex-start;min-height:calc(100dvh - 190px);padding:clamp(20px,3vw,38px)}
.exam-question-card .question{font-size:clamp(18px,2vw,24px);line-height:1.6}.exam-question-card .option{padding:clamp(14px,1.6vw,20px);font-size:clamp(15px,1.4vw,18px)}
.exam-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:auto;padding-top:20px}.exam-actions .btn-primary{min-width:170px}
@media(max-width:720px){.exam-topbar{min-height:62px;padding:8px 12px}.exam-brand img{height:36px}.exam-student{display:none}.exam-fullscreen-btn{margin-left:auto;padding:8px 10px}.exam-content{padding:14px}.exam-header{align-items:flex-start}.exam-question-card{min-height:calc(100dvh - 155px);padding:16px}.exam-actions{align-items:stretch;flex-direction:column-reverse}.exam-actions .btn{width:100%}}
