/* Portal TIC 2026-27 — redesign visual. Toda a lógica e permissões mantêm-se nos scripts originais. */
:root{--nav:#062b3d;--nav2:#041f2f;--aqua:#14d5cd;--aqua2:#00a99b;--dash-ink:#0b2334;--dash-soft:#49667a;--dash-edge:#d8e8ee;--dash-shadow:0 4px 18px rgba(12,51,68,.07)}
body.portal-home-page,body[class*="course-10"]{font-family:'Segoe UI',Inter,Arial,sans-serif;min-height:100vh;background:#f0f8fa url('branding/dashboard-lines.svg') repeat!important;background-size:850px 550px!important;color:var(--dash-ink);padding-left:260px;overflow-x:hidden}
.dashboard-sidebar{position:fixed!important;left:0;top:0;bottom:0;width:260px;z-index:70!important;background:linear-gradient(165deg,#053348,#042839 48%,#021e31);background-image:url('branding/sidebar-lines.svg'),linear-gradient(165deg,#053348,#042839 48%,#021e31);background-size:300px 680px,cover;color:#ecfeff;display:flex;flex-direction:column;padding:20px 14px 15px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#176070 transparent}
.sidebar-brand{display:flex;align-items:center;gap:13px;color:#fff;text-decoration:none;padding:10px 6px 22px;border-bottom:1px solid #1d5360}
.chip-mark{height:66px;width:66px;min-width:66px;display:grid;place-items:center;font-size:1.35rem;font-weight:900;border:2px solid #15d8d7;border-radius:15px;background:#083e55;box-shadow:0 0 0 5px #0d3f52}
.brandwords small{font-weight:800;font-size:.68rem;letter-spacing:.12em;color:#51dfdb;display:block;margin:0 0 5px}.brandwords strong{font-size:.91rem;line-height:1.2;display:block}
.sidebar-section-label{font-size:.65rem;letter-spacing:.16em;color:#8db2be;font-weight:800;margin:22px 10px 12px}
.sidebar-courses,.sidebar-navigation{display:flex;flex-direction:column;gap:5px}
.sidebar-course,.sidebar-link{display:flex;align-items:center;gap:12px;min-height:42px;line-height:1.15;text-decoration:none;color:#deedf3;font-weight:580;font-size:.91rem;border:1px solid transparent;border-radius:10px;background:transparent;padding:10px 12px;width:100%;justify-content:flex-start;text-align:left;white-space:normal}
.sidebar-course{border-color:#174960;padding:10px 11px;font-size:.9rem}.sidebar-course:hover,.sidebar-link:hover{background:#11475a;color:#fff}
.sidebar-course.selected{border-color:#00c9ba;background:linear-gradient(90deg,#12625d,#074356);color:#fff}
.course-dot{flex:none;width:11px;height:11px;background:#245e75;border:1px solid #4a899c;border-radius:50%}
.selected .course-dot{background:#2ce8c2;box-shadow:0 0 0 4px #165e62}
.sidebar-separator{height:1px;background:#1b5361;margin:17px 4px 11px}
.sidebar-navigation .sidebar-link{font:inherit;font-size:.90rem;font-weight:650;min-height:40px;padding:8px 12px;cursor:pointer;flex:none}
.sidebar-navigation .sidebar-link.primary{background:linear-gradient(90deg,#07545c,#0e4c60);border-color:#18bfb8;color:#fff}
.di{display:inline-block;width:19px;height:19px;flex:none;vertical-align:middle}
.sidebar-navigation .di{color:#29d9d1;width:20px;height:20px}
.sidebar-account{display:flex;align-items:center;gap:9px;border-top:1px solid #1b5161;padding:16px 7px 2px;margin-top:auto;color:#e7f5f7}
.user-avatar{width:39px;height:39px;border-radius:50%;background:#114861;display:grid;place-items:center;font-size:.74rem;font-weight:800;letter-spacing:.05em;flex:none}
.sidebar-account div{display:flex;flex-direction:column;gap:1px}.sidebar-account strong{font-size:.86rem}.sidebar-account small{color:#a9c8d4;font-size:.75rem}.sidebar-account-admin{color:#d8e9ef;margin-left:auto;text-decoration:none;font-size:1.25rem}
.dashboard-top-header{position:relative!important;top:auto!important;z-index:15!important;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 27px 9px 32px;min-height:81px;background:rgba(255,255,255,.90);box-shadow:0 1px 5px rgba(11,51,65,.06);border-bottom:1px solid #d9e9ee}
.dash-head-school{min-width:0}.school-eyebrow{display:flex;align-items:center;gap:9px;letter-spacing:.14em;color:#007e7e;font-size:.65rem;font-weight:850;white-space:normal}.live-dot{width:7px;height:7px;background:#119f94;border-radius:50%;box-shadow:0 0 0 4px #e0f4f3;flex:none}
.dash-head-school h1{font-size:1.35rem;font-weight:850;letter-spacing:-.03em;margin:5px 0 0;line-height:1.17;color:#0a2536}
.dash-head-right{display:flex;align-items:center;gap:13px;flex:none}.dash-head-right img{height:47px;width:76px;object-fit:contain;background:#fff;border:1px solid #dce9ea;border-radius:11px;padding:3px;box-shadow:0 3px 8px rgba(12,41,47,.07)}
.dash-head-right div{display:flex;flex-direction:column;gap:2px;border-left:1px solid #d1e2e7;padding-left:12px}.dash-head-right strong{font-size:.87rem}.dash-head-right span{font-size:.85rem}
body[class*="course-10"] main.course-main,body.portal-home-page main.dash-main{max-width:none;width:auto;margin:0;min-height:0;padding:17px 28px 8px;position:relative;z-index:1}
body[class*="course-10"] .section.content-section{max-width:1450px;margin:0 auto;padding:12px 3px 24px}
.dashboard-overview{max-width:1550px;margin:0 auto}.dash-hero{position:relative;min-height:228px;overflow:hidden;border:1px solid #0e5262;border-radius:17px;background:radial-gradient(circle at 75% 30%,#075966,#083e54 33%,#062d42 70%,#03293a);box-shadow:var(--dash-shadow);display:flex;align-items:center}
.dash-hero::before{content:'';position:absolute;inset:0;background:linear-gradient(125deg,transparent 33%,rgba(15,190,198,.08)),url('branding/sidebar-lines.svg');background-size:cover,300px 680px;opacity:.8}
.dash-hero-art{position:absolute;right:16px;top:12px;bottom:12px;width:48%;background-image:url('branding/portal-hero-art.webp');background-size:contain;background-repeat:no-repeat;background-position:right center;mask-image:linear-gradient(to right,transparent 0%,black 20%,black 100%);pointer-events:none}
.dash-hero-copy{position:relative;z-index:1;padding:26px 34px;width:63%;min-width:0;color:#fff}
.dash-hero-kicker{font-size:.65rem;font-weight:850;letter-spacing:.20em;color:#61eae4}.dash-hero h2{font-size:clamp(2.55rem,5vw,4.25rem);line-height:1.03;letter-spacing:-.065em;margin:10px 0 8px;font-weight:850;white-space:nowrap;color:#fff}.dash-hero h2 em{color:#2de6d2;font-style:normal}
.dash-hero-copy>p{font-size:.93rem;margin:4px 0 0;color:#e2f2f7;font-weight:400;line-height:1.55}.dash-hero-perks{display:none}.dash-hero-perks span{display:flex;align-items:center;gap:8px;min-width:0}.dash-hero-perks .di{height:33px;width:33px;flex:none;padding:7px;border:1px solid #107c8b;border-radius:9px;color:#55eced;background:rgba(2,104,125,.28)}.dash-hero-perks small{line-height:1.3;font-size:.75rem;color:#d7f0f3}
.dash-tabs{display:flex;align-items:center;gap:2px;width:max-content;max-width:100%;background:#fff;border:1px solid #e2ebee;border-radius:12px;box-shadow:var(--dash-shadow);padding:4px;margin:12px 0;overflow-x:auto;scrollbar-width:thin}
.dash-tab{display:inline-flex;align-items:center;justify-content:center;min-height:37px;flex:none;font-size:.87rem;font-weight:700;color:#20394e;background:transparent;border:0;border-radius:9px;padding:6px 18px;text-decoration:none;cursor:pointer}
.dash-tab:hover{background:#eff7f8}.dash-tab.primary{background:#052f43;border-color:#052f43;color:white!important;box-shadow:0 3px 0 #04bdb5}
.dash-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin-bottom:13px}
.dash-stat{position:relative;display:flex;align-items:center;gap:15px;min-width:0;min-height:96px;background:#fff;border:1px solid #dce9ee;border-radius:13px;padding:14px 16px;box-shadow:var(--dash-shadow);border-top:3px solid var(--stat-border,#16be9c);overflow:hidden}
.dash-stat::after{content:'';position:absolute;right:9px;bottom:5px;width:68px;height:52px;opacity:.12;background:currentColor;mask-image:url('branding/dashboard-lines.svg');mask-size:cover;pointer-events:none}
.dash-stat .stat-icon{height:43px;width:43px;flex:none;display:grid;place-items:center;border-radius:10px;background:var(--stat-bg,#e0faf3);color:var(--stat-text,#0b9d84)}
.stat-icon .di{width:23px;height:23px}.dash-stat>div{min-width:0;display:flex;flex-direction:column;line-height:1.2}.dash-stat .stat-count{font-size:1.95rem;font-weight:850;line-height:1.08;letter-spacing:-.04em;color:#0a2538}.dash-stat div>span{font-size:.83rem;font-weight:740;margin:3px 0}.dash-stat div>small{font-size:.71rem;color:#52718b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.stat-blue{--stat-border:#138ee1;--stat-bg:#e9f5ff;--stat-text:#0786da}.stat-amber{--stat-border:#e39823;--stat-bg:#fff5e6;--stat-text:#dc8816}.stat-violet{--stat-border:#6447d7;--stat-bg:#f0edff;--stat-text:#5a3bd2}
.dash-preview-grid{display:grid;grid-template-columns:1.1fr 1.1fr 1fr;gap:12px;align-items:stretch}.dash-preview{background:#fff;border:1px solid #dce8ee;border-radius:14px;box-shadow:var(--dash-shadow);min-width:0;min-height:225px;overflow:hidden;padding:11px 14px}
.preview-heading{display:flex;gap:8px;align-items:center;padding-bottom:9px;border-bottom:1px solid #e8f0f2}.preview-heading h3{font-size:.91rem;letter-spacing:-.01em;line-height:1.2;margin:0;font-weight:800;flex:1;min-width:0}.preview-heading button{display:flex;align-items:center;gap:3px;background:transparent;border:0;padding:4px;font-size:.67rem;color:#205073;font-weight:700;white-space:nowrap}.preview-heading button .di{width:13px;height:13px}
.preview-symbol{height:29px;width:29px;border-radius:8px;display:grid;place-items:center;flex:none}.preview-symbol .di{width:18px;height:18px}.preview-symbol.green{background:#e0faf1;color:#0d9d7e}.preview-symbol.amber{background:#fff1df;color:#e18b0a}.preview-symbol.coral{background:#ffebed;color:#dd3746}
.preview-list{display:flex;flex-direction:column}.preview-item{display:flex;align-items:center;gap:8px;width:100%;border:0;border-bottom:1px solid #edf2f5;text-align:left;background:transparent;padding:8px 1px;min-height:52px;cursor:pointer;border-radius:0;color:#132b40}.preview-item:last-child{border-bottom:0}.preview-item:hover{background:#f1fbfb}.preview-item-icon{display:grid;place-items:center;flex:none;width:31px;height:31px;border-radius:9px;font-size:1.05rem;font-weight:850}.ico-file{color:#087fd6;background:#e7f2ff}.ico-folder{color:#db8b11;background:#fff2e2}.ico-bell{color:#ed4d4e;background:#ffeeef}.preview-item-copy{display:flex;flex-direction:column;min-width:0;gap:2px;flex:1}.preview-item-copy strong{font-size:.73rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-item-copy small{font-size:.68rem;color:#587790;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-date{flex:none;min-width:46px;max-width:58px;padding:5px 6px;border-radius:7px;background:#e8f5ff;font-size:.67rem;text-align:center;color:#286394}.preview-empty{padding:30px 8px;text-align:center;color:#6e8794;font-size:.83rem}
/* Só a visão geral é optimizada para caber no ecrã; restantes conteúdos podem fazer scroll, para não ocultar dados */
body[class*="course-10"] .dash-footer,body[class*="course-10"] .course-footer,body.portal-home-page .dash-footer{margin:0 auto;padding:2px 28px 12px!important;max-width:none!important;border:0!important;background:transparent!important}
body[class*="course-10"] .course-footer .footer-inner,body.portal-home-page .dash-footer .footer-inner{max-width:1530px;display:flex;align-items:center;justify-content:space-between;flex-direction:row;padding:6px 12px;min-height:40px;border-radius:10px;gap:12px;background:rgba(255,255,255,.72);border:1px solid #e1eff0;box-shadow:none}
body[class*="course-10"] .course-footer .footer-meta,body.portal-home-page .dash-footer .footer-meta{display:flex;flex-direction:row;gap:12px;text-align:left;justify-content:flex-start}
body[class*="course-10"] .course-footer .footer-school,body.portal-home-page .dash-footer .footer-school{display:flex;flex-direction:row;align-items:center;gap:12px}
body[class*="course-10"] .course-footer .footer-school strong,body.portal-home-page .dash-footer strong{font-size:.7rem!important}
body[class*="course-10"] .course-footer .footer-school span,body.portal-home-page .dash-footer span,body[class*="course-10"] .course-footer .footer-meta p,body.portal-home-page .dash-footer p{font-size:.65rem!important;margin:0!important;white-space:nowrap}
body[class*="course-10"] .course-footer .footer-logos img,body.portal-home-page .dash-footer img{height:29px;width:auto;max-width:220px;object-fit:contain}
/* Restantes ecrãs mantêm o conteúdo original e recebem as cores/forma do novo portal. */
body[class*="course-10"] .content-section .card,body[class*="course-10"] .private-area,body[class*="course-10"] .student-login{box-shadow:var(--dash-shadow);border:1px solid var(--dash-edge);border-radius:14px}
body[class*="course-10"] .section-heading{border-color:#d8e9ef}body[class*="course-10"] .section-heading h2{color:#082b3b}
body[class*="course-10"] button.primary,body[class*="course-10"] .btn.primary{background:#006f73;border-color:#006f73}body[class*="course-10"] button.primary:hover,body[class*="course-10"] .btn.primary:hover{background:#064b57}
body[class*="course-10"] .sidebar-navigation button.primary{background:linear-gradient(90deg,#07545c,#0e4c60);border-color:#18bfb8}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(min-width:1200px) and (min-height:720px){body.portal-home-page,body[class*="course-10"]{min-height:100vh}body.portal-home-page main.dash-main,body[class*="course-10"] main.course-main{padding-top:15px}body.portal-home-page .dashboard-overview,body[class*="course-10"] .dashboard-overview{min-height:0}}
@media(min-width:1450px) and (max-height:950px){.dashboard-top-header{min-height:71px;padding-top:6px;padding-bottom:6px}.dash-hero{min-height:218px}.dash-stat{min-height:89px;padding-top:10px;padding-bottom:10px}.dash-preview{min-height:215px}.dash-preview .preview-item{min-height:48px;padding:7px 1px}}
@media(max-width:1350px){body.portal-home-page,body[class*="course-10"]{padding-left:232px}.dashboard-sidebar{width:232px}.brandwords strong{font-size:.82rem}.chip-mark{width:56px;height:56px;min-width:56px}.dash-hero-copy{padding:22px 24px}.dash-hero-perks{gap:14px}.dash-hero-perks small{font-size:.67rem}.dash-stat{gap:9px;padding:11px}.dash-stat .stat-icon{width:36px;height:36px}.dash-stat .stat-count{font-size:1.75rem}}
@media(max-width:1090px){body.portal-home-page,body[class*="course-10"]{padding-left:205px}.dashboard-sidebar{width:205px;padding:12px 9px}.sidebar-course,.sidebar-link{font-size:.82rem}.dashboard-top-header{padding-left:18px;padding-right:18px}body[class*="course-10"] main.course-main,body.portal-home-page main.dash-main{padding:14px 16px 8px}.dash-hero{min-height:210px}.dash-hero-copy{width:72%}.dash-hero-art{width:46%}.dash-hero h2{font-size:2.8rem}.dash-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-preview:nth-child(3){grid-column:1/-1}.dash-preview{min-height:190px}}
@media(max-width:750px){body.portal-home-page,body[class*="course-10"]{padding-left:0!important}.dashboard-sidebar{position:relative!important;width:100%;height:auto;bottom:auto;top:auto;padding:10px 13px;overflow:visible}.sidebar-brand{padding:3px 0 10px}.chip-mark{height:39px;width:39px;min-width:39px;border-radius:9px;font-size:.95rem;box-shadow:none}.brandwords strong{font-size:.75rem}.brandwords strong br{display:none}.sidebar-section-label,.sidebar-separator,.sidebar-account{display:none}.sidebar-courses{display:flex;flex-direction:row;gap:6px;padding-top:8px}.sidebar-course{min-width:0;flex:1;padding:9px 6px;justify-content:center;font-size:.68rem}.course-dot{width:7px;height:7px;box-shadow:none}.sidebar-navigation{flex-direction:row;overflow-x:auto;gap:5px;padding:8px 0 2px}.sidebar-navigation .sidebar-link{min-width:max-content;width:auto;font-size:.72rem;min-height:35px;padding:7px}.sidebar-navigation .sidebar-link .di{width:15px;height:15px}.dashboard-top-header{min-height:59px;padding:9px 13px}.school-eyebrow{font-size:.50rem;letter-spacing:.08em}.dash-head-school h1{font-size:1.1rem}.dash-head-right img{height:38px;width:48px}.dash-head-right strong,.dash-head-right span{font-size:.69rem}.dash-head-right div{padding-left:7px}.dash-hero{min-height:188px}.dash-hero-copy{padding:22px 18px;width:100%}.dash-hero-kicker{font-size:.55rem}.dash-hero h2{font-size:2.65rem}.dash-hero-copy>p{font-size:.79rem}.dash-hero-perks{display:none}.dash-hero-art{opacity:.35;width:73%}.dash-summary-grid{gap:8px}.dash-stat{min-height:80px}.dash-stat .stat-count{font-size:1.45rem}.dash-stat div>span{font-size:.70rem}.dash-stat div>small{font-size:.61rem}.dash-preview-grid{grid-template-columns:1fr}.dash-preview:nth-child(3){grid-column:auto}.dash-preview{min-height:185px}.dash-tabs{width:100%;margin:9px 0}.dash-tab{flex:1;padding:7px 10px;font-size:.77rem}.dash-footer .footer-inner,.course-footer .footer-inner{flex-direction:column!important}.dash-footer .footer-logos img,.course-footer .footer-logos img{max-width:100%}}
@media(max-width:420px){.dash-head-right div{display:none}.dash-hero h2{font-size:2.45rem}.dashboard-top-header{gap:8px}.dash-stat .stat-icon{height:31px;width:31px}.dash-stat{gap:6px;padding:8px}.stat-count{font-size:1.3rem}}

/* Ecrãs desktop de 1366 × 768: visão geral integral sem scroll. */
@media (min-width:1100px) and (max-height:820px){
  .dashboard-top-header{min-height:58px;padding:5px 24px}
  .dash-head-right img{height:37px}
  .dash-head-school h1{font-size:1.18rem;margin-top:2px}
  body[class*="course-10"] main.course-main,body.portal-home-page main.dash-main{padding-top:10px;padding-bottom:4px}
  .dash-hero{min-height:182px}
  .dash-hero-copy{padding:12px 30px}
  .dash-hero h2{font-size:3.5rem;margin:7px 0 3px}
  .dash-hero-copy>p{font-size:.83rem;line-height:1.35}
  .dash-hero-perks{margin-top:11px}.dash-hero-perks .di{height:28px;width:28px;padding:6px}
  .dash-tabs{margin:8px 0;padding:3px}.dash-tab{min-height:31px;padding:5px 13px}
  .dash-summary-grid{margin-bottom:9px}.dash-stat{min-height:74px;padding:8px 11px}.dash-stat .stat-count{font-size:1.6rem}.dash-stat div>span{font-size:.77rem}
  .dash-preview{min-height:164px;padding:7px 12px}.preview-heading{padding-bottom:5px}.preview-item{min-height:38px;padding:4px 1px}
  body[class*="course-10"] .course-footer,body.portal-home-page .dash-footer{padding-bottom:6px!important}
}
@media(max-width:750px){
 .brandwords strong br{display:inline}.sidebar-brand{gap:10px}
 .dash-footer .footer-inner,.course-footer .footer-inner{max-width:100%;min-width:0;overflow:hidden}
 body[class*="course-10"] .course-footer .footer-school,body.portal-home-page .dash-footer .footer-school{flex-direction:column;align-items:flex-start;gap:2px}
 body[class*="course-10"] .course-footer .footer-meta,body.portal-home-page .dash-footer .footer-meta{flex-direction:column;align-items:flex-start;gap:2px;min-width:0;width:100%}
 body[class*="course-10"] .course-footer .footer-school span,body.portal-home-page .dash-footer .footer-school span,
 body[class*="course-10"] .course-footer .footer-meta p,body.portal-home-page .dash-footer .footer-meta p{white-space:normal;overflow-wrap:anywhere}
 .dash-tabs{flex-wrap:nowrap;overflow-x:auto}.dash-tab{flex:0 0 auto;white-space:nowrap}
}
/* Proporções mais próximas da maquete nas resoluções de secretária. */
@media(min-width:1450px) and (min-height:850px){
  .dash-summary-grid{margin-bottom:14px}
  .dash-stat{min-height:105px}
  .dash-preview{min-height:266px}
}
@media(min-width:1100px) and (max-height:820px){
  .dash-preview{min-height:clamp(180px,calc(100vh - 515px),245px)}
}

/* Banner contextual das turmas: mantém a apresentação geral do portal, identifica claramente o curso. */
.dash-head-class{font-weight:650;color:#217b80}
.dash-hero-individual .dash-hero-copy{width:62%;padding-top:18px;padding-bottom:18px}
.dash-hero-individual .dash-hero-title-course{white-space:normal;max-width:100%;line-height:1.02;margin:9px 0 10px}
.dash-hero-individual .dash-hero-course-title{display:block;font-size:.44em;letter-spacing:-.022em;line-height:1.13;margin-top:7px;font-weight:750;color:#b6f7f1;overflow-wrap:break-word}
.dash-hero-individual .dash-hero-copy>p{font-size:.87rem;max-width:720px}
.dash-hero-individual .dash-hero-perks{margin-top:14px}
@media(min-width:1100px) and (max-height:820px){
 .dash-hero-individual .dash-hero-copy{padding-top:10px;padding-bottom:10px}
 .dash-hero-individual .dash-hero-title-course{font-size:3.2rem;margin:4px 0 5px}
 .dash-hero-individual .dash-hero-course-title{margin-top:4px}
 .dash-hero-individual .dash-hero-perks{margin-top:9px}
}
@media(max-width:1090px){
 .dash-hero-individual .dash-hero-copy{width:73%}
 .dash-hero-individual .dash-hero-title-course{font-size:clamp(2rem,4.4vw,3rem)}
 .dash-hero-individual .dash-hero-course-title{font-size:.48em}
}
@media(max-width:750px){
 .dash-hero-individual .dash-hero-copy{width:100%;padding:18px 18px}
 .dash-hero-individual .dash-hero-title-course{font-size:clamp(1.85rem,7vw,2.65rem);margin:7px 0}
 .dash-hero-individual .dash-hero-course-title{font-size:.57em;line-height:1.2}
 .dash-hero-individual .dash-hero-copy>p{font-size:.8rem}
 .dash-hero-individual .dash-hero-art{opacity:.23}
}
