
:root{
  --bg:#0f1115;
  --bg-soft:#151922;
  --panel:#171b22;
  --panel-2:#1c212b;
  --panel-3:#202733;
  --stroke:#2a303c;
  --text:#f1f5fb;
  --muted:#9aa5b5;
  --blue:#2476ff;
  --blue-2:#14b4ff;
  --green:#28c76f;
  --orange:#ffab4b;
  --red:#ff6e7a;
  --shadow:0 16px 40px rgba(0,0,0,.28);
  --radius:22px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:linear-gradient(180deg,#0d1016,#10141b);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}
body{min-height:100vh}
button,input,select,textarea{font:inherit}
button:disabled,input:disabled,textarea:disabled{cursor:not-allowed;opacity:.5}
a{color:inherit}
.app-shell{display:grid;grid-template-columns:260px minmax(0,1fr) 330px;gap:20px;min-height:100vh;padding:18px}
.leftbar,.workspace,.rightbar{min-width:0}
.leftbar{background:rgba(21,25,34,.86);border:1px solid var(--stroke);border-radius:30px;padding:20px;display:flex;flex-direction:column;gap:18px;box-shadow:var(--shadow)}
.brand{display:flex;align-items:center;gap:14px;padding:6px 4px}
.brand-mark{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,var(--blue),#0e4ac0);font-size:22px;font-weight:800;box-shadow:0 10px 20px rgba(36,118,255,.35)}
.brand strong{display:block;font-size:1.15rem}
.brand small{display:block;color:var(--muted);margin-top:3px}
.student-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:20px;background:var(--panel-2);border:1px solid var(--stroke)}
.avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#2b3443,#3d4c62);font-weight:700}
.student-card strong{display:block}
.student-card small{display:block;color:var(--muted);margin-top:4px}
.nav-stack{display:flex;flex-direction:column;gap:10px}
.nav-btn{width:100%;border:1px solid transparent;background:transparent;color:var(--text);padding:13px 14px;border-radius:16px;display:flex;align-items:center;gap:12px;cursor:pointer;transition:.18s}
.nav-btn span{font-weight:600}
.nav-btn:hover,.nav-btn.active{background:linear-gradient(145deg,#226cff,#165ae1);box-shadow:0 10px 24px rgba(36,118,255,.25)}
.left-info,.left-actions{margin-top:auto}
.left-info{padding:14px;border-radius:18px;background:rgba(255,255,255,.03);border:1px solid var(--stroke)}
.left-info h4{margin:0 0 8px}
.left-info p{margin:0;color:var(--muted);font-size:.92rem;line-height:1.5}
.ghost-btn{width:100%;border:none;background:#232a36;color:var(--text);padding:12px 14px;border-radius:16px;cursor:pointer}
.workspace{display:flex;flex-direction:column;gap:16px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;background:rgba(21,25,34,.82);border:1px solid var(--stroke);border-radius:26px;padding:12px 16px;box-shadow:var(--shadow)}
.search-box{display:flex;align-items:center;gap:10px;background:#141821;border:1px solid var(--stroke);border-radius:18px;padding:8px 10px;flex:1;max-width:420px}
.search-box input{background:transparent;border:none;outline:none;color:var(--text);flex:1}
.search-box button{border:none;background:#262d39;color:var(--text);padding:8px 12px;border-radius:12px;cursor:pointer}
.top-summary{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:12px;flex:1;max-width:560px}
.top-chip{background:#151922;border:1px solid var(--stroke);border-radius:18px;padding:10px 12px}
.top-chip strong{display:block;font-size:1.1rem}
.top-chip small{display:block;color:var(--muted);margin-top:4px}
.view{background:rgba(21,25,34,.82);border:1px solid var(--stroke);border-radius:30px;padding:24px;min-height:calc(100vh - 126px);box-shadow:var(--shadow)}
.app-footer{padding:0 10px 6px;color:var(--muted);font-size:.82rem}
.rightbar{display:flex;flex-direction:column;gap:16px}
.rail-card{background:rgba(21,25,34,.86);border:1px solid var(--stroke);border-radius:26px;padding:18px;box-shadow:var(--shadow)}
.rail-card h3,.rail-card h4,.rail-card p{margin-top:0}
.rail-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.mini-controls{display:flex;gap:8px}
.mini-controls button{width:28px;height:28px;border-radius:50%;border:none;background:#232a36;color:var(--text);cursor:pointer}
.mini-weekdays,.mini-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.mini-weekdays span{font-size:.75rem;color:var(--muted);text-align:center}
.mini-grid button{aspect-ratio:1/1;border:none;border-radius:12px;background:#151922;color:#d6dfec;position:relative;cursor:pointer}
.mini-grid button:hover{outline:1px solid #3a4a64}
.mini-grid button.has-study::after,.mini-grid button.has-essay::before{content:'';position:absolute;bottom:7px;width:6px;height:6px;border-radius:50%}
.mini-grid button.has-study::after{left:calc(50% - 8px);background:var(--blue)}
.mini-grid button.has-essay::before{left:calc(50% + 2px);background:var(--orange)}
.mini-grid button.selected{background:linear-gradient(145deg,#236efe,#1759de);font-weight:700}
.mini-grid button.today{outline:1px solid rgba(255,255,255,.25)}
.mini-grid button.future,.day-card.future{color:var(--muted)}
.mini-grid button.complete,.day-card.complete{background:#17372b;border:1px solid #28c76f;color:#b8f3d2}
.mini-grid button.partial,.day-card.partial{box-shadow:inset 0 -3px 0 var(--green)}
.mini-grid button.complete.selected{outline:2px solid var(--blue-2)}
.day-check{position:absolute;top:1px;right:3px;font-size:.65rem;color:#b8f3d2}
.completion-text{color:#b8f3d2}
.tasks-rail{display:flex;flex-direction:column;gap:10px;max-height:420px;overflow:auto;padding-right:4px}
.task-rail{display:flex;gap:10px;padding:12px;border-radius:18px;background:#151922;border:1px solid var(--stroke)}
.task-rail input{margin-top:2px}
.task-rail h4{font-size:.96rem;margin:0 0 5px}
.task-rail p{color:var(--muted);margin:0 0 8px;font-size:.85rem}
.task-rail button{border:none;background:transparent;color:#7fb6ff;padding:0;cursor:pointer}
.compact-note p{margin-bottom:0;color:var(--muted);line-height:1.5}
.muted{color:var(--muted)}
.small{font-size:.82rem}
.tiny{font-size:.76rem}
.hero{padding:24px;border-radius:28px;background:radial-gradient(circle at top left,rgba(36,118,255,.28),transparent 35%),linear-gradient(145deg,#151b25,#171c24);border:1px solid var(--stroke)}
.eyebrow{display:inline-flex;align-items:center;gap:8px;color:#8fb9ff;font-weight:700;letter-spacing:.08em;text-transform:uppercase;font-size:.74rem;margin-bottom:10px}
.hero h1, .page-head h1{margin:0 0 10px;font-size:2rem;line-height:1.15}
.hero p, .page-head p{max-width:780px;color:#cad2df;line-height:1.6}
.hero-actions,.inline-actions,.filter-row,.meta-row{display:flex;flex-wrap:wrap;gap:12px}
.hero-actions{margin-top:18px}
.primary,.outline,.soft,.chip-btn{border:none;padding:12px 16px;border-radius:15px;cursor:pointer}
.primary{background:linear-gradient(145deg,var(--blue),#165be2);color:white;box-shadow:0 12px 22px rgba(36,118,255,.28)}
.outline{background:transparent;border:1px solid #36517c;color:#d8e6ff}
.soft{background:#232a36;color:var(--text)}
.chip-btn{background:#1f2531;color:#d7e2f5;padding:8px 12px;font-size:.9rem}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px;margin-top:18px}
.card{padding:18px;border-radius:24px;background:#151922;border:1px solid var(--stroke)}
.card h3,.card h4{margin:0 0 8px}
.metric{font-size:2rem;font-weight:800;display:block}
.label{color:var(--muted);font-size:.9rem}
.progress{height:10px;background:#232a36;border-radius:999px;overflow:hidden}
.progress span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--blue),var(--blue-2))}
.grid-2{display:grid;grid-template-columns:2fr 1fr;gap:18px;margin-top:18px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.panel{padding:18px;border-radius:24px;background:#151922;border:1px solid var(--stroke)}
.panel h2{margin-top:0}
.panel ul{padding-left:18px}
.timetable{display:flex;flex-direction:column;gap:10px}
.slot{display:grid;grid-template-columns:84px 1fr auto;gap:12px;align-items:center;padding:12px 14px;border-radius:18px;background:#1a202a;border:1px solid var(--stroke)}
.slot .time{color:#8db7ff;font-weight:700}
.slot .tag{padding:6px 10px;border-radius:999px;background:#23324b;color:#c9e1ff;font-size:.78rem}
.slot.complete,.task-rail.complete{border-color:rgba(40,199,111,.5)}
.slot.complete .tag,.pill.complete{background:#17372b;color:#b8f3d2}
.page-head{margin-bottom:16px}
.filters{display:flex;flex-wrap:wrap;gap:14px;margin-bottom:18px}
.field{display:flex;flex-direction:column;gap:8px;min-width:180px}
.field label{font-size:.82rem;color:#aeb8c9}
.field select,.field input,.field textarea{border:none;outline:none;background:#1b2029;color:var(--text);padding:12px 14px;border-radius:14px;border:1px solid var(--stroke)}
.field textarea{min-height:240px;resize:vertical;line-height:1.6}
.lesson-list{display:flex;flex-direction:column;gap:10px}
.lesson-item{width:100%;display:grid;grid-template-columns:54px 1fr auto;gap:14px;align-items:center;padding:14px;border-radius:18px;border:1px solid var(--stroke);background:#171d27;color:var(--text);cursor:pointer;text-align:left}
.lesson-item.done{background:linear-gradient(145deg,rgba(40,199,111,.16),rgba(19,83,60,.24));border-color:rgba(40,199,111,.34)}
.lesson-n{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:#202733;font-weight:800}
.lesson-item small{display:block;color:var(--muted);margin-top:4px}
.lesson-item .arrow{font-size:1.4rem;color:#7ea8ff}
.two-cols{display:grid;grid-template-columns:2fr 1fr;gap:18px}
.chapter{padding:14px 0;border-bottom:1px solid rgba(255,255,255,.06)}
.chapter:last-child{border-bottom:none}
.callout{padding:14px 16px;border-radius:18px;background:#1d2430;border:1px solid var(--stroke);margin-top:14px}
.callout.good{background:rgba(40,199,111,.12);border-color:rgba(40,199,111,.28)}
.callout.warm{background:rgba(255,171,75,.12);border-color:rgba(255,171,75,.28)}
.resource{display:block;padding:12px 14px;border-radius:16px;background:#1b2028;border:1px solid var(--stroke);text-decoration:none;margin-bottom:10px}
.separator{border:none;border-top:1px solid rgba(255,255,255,.07);margin:16px 0}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.kpi{padding:16px;border-radius:20px;background:#151922;border:1px solid var(--stroke)}
.kpi strong{display:block;font-size:1.4rem}
.kpi span{color:var(--muted);font-size:.9rem}
.month-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}
.weekday{color:var(--muted);font-size:.8rem;text-align:center;padding-bottom:4px}
.day-card{min-height:84px;padding:10px;border:none;border-radius:18px;background:#171d27;color:var(--text);text-align:left;cursor:pointer;border:1px solid var(--stroke)}
.day-card strong{display:block}
.day-card .pills{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.pill{display:inline-flex;padding:4px 8px;border-radius:999px;background:#22324b;color:#cde3ff;font-size:.72rem}
.pill.essay{background:#4a3320;color:#ffd8ac}
.day-card.selected{outline:1px solid #4d7dff;background:#1c2430}
.question{padding:16px;border-radius:18px;background:#1a202a;border:1px solid var(--stroke);margin-bottom:14px}
.question legend{padding:0 6px;font-weight:700;margin-bottom:10px}
.option{display:flex;gap:10px;align-items:flex-start;padding:8px 0}
.review-item{padding:14px;border-radius:18px;background:#1a202a;border:1px solid var(--stroke);margin-top:10px}
.review-item.correct{border-color:rgba(40,199,111,.35);background:rgba(40,199,111,.09)}
.score-box{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;border-radius:20px;background:#18202b;border:1px solid var(--stroke);margin-bottom:16px}
.essay-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:16px}
.essay-card{padding:16px;border-radius:20px;background:#151922;border:1px solid var(--stroke)}
.essay-card.active{border-color:#4f7dff;box-shadow:0 0 0 1px rgba(79,125,255,.3) inset}
.essay-card p{color:var(--muted);min-height:48px}
.badge{display:inline-flex;padding:6px 10px;border-radius:999px;background:#22324b;color:#d8e7ff;font-size:.74rem}
.badge.orange{background:#4a3320;color:#ffd8ac}
.report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:14px 0}
.report-card{padding:14px;border-radius:18px;background:#1a202a;border:1px solid var(--stroke)}
.report-card strong{display:block;font-size:1.3rem}
.report-card span{color:var(--muted);font-size:.85rem}
.checklist li{margin:8px 0}
.history-list{display:flex;flex-direction:column;gap:10px}
.history-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border-radius:18px;background:#171d27;border:1px solid var(--stroke)}
.empty{color:var(--muted)}
.history-row p{margin:6px 0 0}
.history-row button{flex-shrink:0}
#storageStatus[data-state="saved"]{color:#b8f3d2}
#storageStatus[data-state="error"],#storageStatus[data-state="unreadable"],#storageStatus[data-state="recovered"]{color:#ffd8ac}
.app-footer #retrySave{margin-top:10px}
@media (max-width:1200px){
  .app-shell{grid-template-columns:230px 1fr}
  .rightbar{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr)}
}
@media (max-width:920px){
  .app-shell{grid-template-columns:1fr;}
  .leftbar,.topbar,.view,.rail-card{border-radius:22px}
  .rightbar{grid-template-columns:1fr}
  .topbar{flex-direction:column;align-items:stretch}
  .top-summary{max-width:none}
  .grid-2,.two-cols,.kpis,.grid-3,.essay-grid{grid-template-columns:1fr}
  .month-grid{grid-template-columns:repeat(2,1fr)}
}

/* Dias sem atividades: festas de fim de ano. */
.mini-grid button.holiday, .day-card.holiday {
  background:#28212c;
  color:#efb9c0;
  border:1px solid #794652;
}
.mini-grid button.holiday::after,.mini-grid button.holiday::before{display:none}
.day-card.holiday{cursor:pointer}
.pill.holiday-pill{background:#49303b;color:#ffd4dc}
.mini-grid button.before-start,.day-card.before-start{opacity:.32}

#studyApp[hidden],#studyLoginScreen[hidden],#studyLoginForm[hidden],#studyMigrationNotice[hidden],#studyImportLegacy[hidden],#studyAuthLoading[hidden]{display:none!important}
.study-login-screen{max-width:1160px;min-height:100vh;margin:auto;padding:50px 35px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);align-items:center;gap:75px}
.study-login-intro h1{font-size:44px;line-height:1.2;letter-spacing:-1.2px;margin:20px 0 25px;max-width:650px}.study-login-intro>p{font-size:16px;line-height:1.9;color:#a9b9d0;max-width:520px}.study-login-tags{display:flex;gap:10px;flex-wrap:wrap;margin-top:28px}.study-login-tags span{font-size:12px;padding:9px 12px;background:#182333;border:1px solid #334662;border-radius:20px;color:#bed2ef}
.study-login-card{border:1px solid #34435a;border-radius:22px;padding:32px;background:linear-gradient(155deg,#1c2533,#121925);box-shadow:0 30px 100px #0005}.study-login-card h2{font-size:24px;margin:22px 0}.study-login-card form{display:grid;gap:18px}.study-login-card label{display:flex;flex-direction:column;gap:9px;font-size:12px;color:#c1cee1}.study-login-card input{width:100%;min-width:0;border:1px solid #40516c;border-radius:10px;padding:13px 14px;background:#0e1520;color:#f1f5fb;font-size:14px}.study-login-card input:focus-visible{outline:3px solid #77acff;outline-offset:3px}.study-login-card button{width:100%;font-size:14px}.study-login-card small{font-size:11px;color:#9eb0c9;line-height:1.8}.study-login-card #studyLoginError{color:#ffb6bc;font-size:12px;line-height:1.8;margin:0;min-height:8px}.study-login-card #studyAuthLoading{font-size:13px;color:#b2c5e0}
.study-account-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 18px;background:#172131;border:1px solid #34435a;border-radius:18px}.study-account-bar>div{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.study-account-bar span{font-size:9px;letter-spacing:.8px;color:#8ebaff}.study-account-bar strong{font-size:14px}.study-account-bar small{font-size:11px;color:#b1c1d8}.study-account-bar button{font-size:12px;flex:none}
.study-migration-notice{border:1px solid #4a6181;border-radius:14px;background:#1c2c43;padding:15px 18px}.study-migration-notice p{font-size:12px;line-height:1.8;color:#c5d8f3;margin:0}.study-migration-notice button{margin-top:12px;font-size:11px}
@media(max-width:800px){.study-login-screen{grid-template-columns:1fr;gap:30px;max-width:530px;padding:35px 20px}.study-login-intro h1{font-size:30px;letter-spacing:-.5px}.study-login-intro>p{font-size:13px}.study-login-intro .study-login-tags{display:none}.study-login-card{padding:26px 22px}.study-account-bar>div{gap:7px 10px}.study-account-bar span{width:100%;font-size:8px}.study-account-bar{padding:13px 15px}.study-account-bar small{font-size:10px}}

/* Compartilhamento privado do progresso entre navegadores. */
.left-actions #openSync{margin-bottom:10px}
.sync-mini-status{font-size:11px;line-height:1.7;margin:0 3px 12px;color:#a5c8ff}.sync-mini-status[data-state=saved]{color:#73deb2}.sync-mini-status[data-state=pending],.sync-mini-status[data-state=conflict]{color:#ffc97c}
#syncStatus{font-size:12px;line-height:1.7;color:#a5c8ff;margin:8px 0}
.content-watermark{padding:12px;border:1px dashed #526780;border-radius:8px;color:#a9bed8;font-size:11px;line-height:1.7;overflow-wrap:anywhere}
.assessment-rules{padding:16px;margin:14px 0 20px;border:1px solid #506788;border-radius:12px;background:#19283a;color:#d3e4fc;font-size:13px;line-height:1.7}
.assessment-rules p{margin:8px 0 0}
.integrity-note{display:block;font-size:11px;color:#a9bed8;line-height:1.5;margin-top:5px}
@media print{.content-watermark{color:#333;border-color:#666} .assessment-rules{color:#222;background:#fff}}
#syncStatus[data-state=saved]{color:#73deb2}
#syncStatus[data-state=pending],#syncStatus[data-state=conflict]{color:#ffc97c}
.study-sync-dialog{width:680px;max-width:calc(100vw - 28px);max-height:90vh;overflow:auto;border:1px solid #39485e;border-radius:18px;padding:26px;background:#151b25;color:#e9eff8;box-shadow:0 30px 100px #0009}
.study-sync-dialog::backdrop{background:#050a13b8;backdrop-filter:blur(4px)}
.study-sync-dialog [hidden]{display:none!important}
.study-sync-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.study-sync-dialog h2{font-size:23px;line-height:1.35;margin:8px 0 0}
.study-sync-dialog h3{font-size:16px;margin:0 0 10px}
.study-sync-dialog p{font-size:13px;line-height:1.9;color:#b3c0d3}
.study-sync-dialog section{border-top:1px solid #334052;padding-top:20px;margin-top:22px}
.study-sync-dialog label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#c8d6e9;margin:14px 0}
.study-sync-dialog input:not([type=checkbox]){box-sizing:border-box;width:100%;min-width:0;padding:12px;border:1px solid #465774;border-radius:9px;background:#0e1420;color:#eff5ff;font:13px monospace;letter-spacing:.3px}
.study-sync-dialog .sync-merge{display:flex;flex-direction:row;align-items:flex-start;gap:10px;font-size:11px;line-height:1.8}
.study-sync-dialog input[type=checkbox]{flex:none;margin-top:4px;accent-color:#297bff}
.study-sync-dialog button{font:inherit;font-size:12px;line-height:1.7;cursor:pointer}
.study-sync-dialog button:disabled{opacity:.5;cursor:wait}
.study-sync-dialog button:focus-visible,.study-sync-dialog input:focus-visible{outline:3px solid #77acff;outline-offset:3px}
.study-sync-dialog #syncError{color:#ffb6bc;white-space:pre-wrap}
.study-sync-dialog #syncDialogStatus{color:#9fc6ff}
.study-sync-dialog #syncConflict{border:1px solid #8c6836;background:#392d20;padding:18px;border-radius:12px}
@media(max-width:700px){.study-sync-dialog{padding:20px 16px}.study-sync-dialog h2{font-size:20px}.study-sync-dialog .inline-actions{align-items:stretch}.study-sync-dialog #syncPrivateCode{font-size:11px;letter-spacing:0}.study-sync-dialog header>.outline{padding:5px 10px}}
