:root{--gmai-blue:#1e73be;--gmai-blue-strong:#155f9f;--gmai-navy:#102436;--gmai-navy-2:#17364f;--gmai-bg:#f4f7fa;--gmai-surface:#fff;--gmai-border:#dce4ec;--gmai-text:#16202c;--gmai-muted:#687789;--gmai-green:#18794e;--gmai-red:#b42318;--gmai-amber:#a15c00;--gmai-radius:14px;--gmai-shadow:0 6px 22px rgba(18,38,58,.055)}
*{box-sizing:border-box}.gmai-shell{min-height:100vh;display:grid;grid-template-columns:272px minmax(0,1fr);background:var(--gmai-bg);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--gmai-text)}.gmai-shell svg{width:19px;height:19px;fill:currentColor;display:block}.gmai-sidebar{position:sticky;top:0;height:100vh;height:100dvh;min-height:100vh;min-height:100dvh;align-self:start;overflow:hidden;background:linear-gradient(180deg,var(--gmai-navy),#0d1f2f);color:#fff;padding:18px 14px 16px;display:flex;flex-direction:column;z-index:50}.gmai-brand-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.gmai-brand{display:flex;align-items:center;gap:11px;padding:6px 8px 18px;min-width:0}.gmai-brand .custom-logo{max-width:42px;max-height:42px;width:auto;height:auto}.gmai-brand-copy{min-width:0}.gmai-brand strong,.gmai-brand small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gmai-brand strong{font-size:15px}.gmai-brand small{font-size:11px;opacity:.66;margin-top:2px}.gmai-sidebar-close{display:none;border:0;background:transparent;color:#fff;font-size:28px;line-height:1;padding:4px 8px;cursor:pointer}.gmai-nav{display:block;overflow-y:auto;overflow-x:hidden;padding:2px 2px 18px;flex:1 1 auto;min-height:0}.gmai-nav-group{margin-top:18px}.gmai-nav-heading{padding:0 10px 6px;font-size:10px;font-weight:800;letter-spacing:.11em;text-transform:uppercase;color:#8fa8bc}.gmai-nav-item{display:flex;align-items:center;gap:11px;min-height:43px;padding:10px 11px;border-radius:10px;color:#cbd9e5;text-decoration:none;font-size:14px;font-weight:650;margin:2px 0;transition:background .15s,color .15s,transform .15s}.gmai-nav-item:hover{background:rgba(255,255,255,.075);color:#fff}.gmai-nav-item.active{background:#fff;color:var(--gmai-navy);box-shadow:0 3px 12px rgba(0,0,0,.08)}.gmai-nav-item em{margin-left:auto;font-style:normal;font-size:10px;padding:3px 6px;border-radius:999px;background:rgba(255,255,255,.12)}.gmai-nav-item.active em{background:#e8f2fb;color:var(--gmai-blue)}.gmai-sidebar-footer{margin-top:auto;padding:14px 9px 0;border-top:1px solid rgba(255,255,255,.11);display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px}.gmai-sidebar-footer>div{display:flex;align-items:center;gap:7px;min-width:0}.gmai-sidebar-footer span:not(.gmai-user-dot){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gmai-user-dot{width:8px;height:8px;border-radius:50%;background:#5bd28b;box-shadow:0 0 0 3px rgba(91,210,139,.13)}.gmai-sidebar-footer a{color:#fff;text-decoration:none;opacity:.8}.gmai-workspace{min-width:0}.gmai-topbar{height:64px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--gmai-border);display:flex;align-items:center;padding:0 30px;position:sticky;top:0;z-index:30;backdrop-filter:blur(10px)}.gmai-topbar-title{font-weight:750;font-size:14px}.gmai-topbar-meta{margin-left:auto}.gmai-plan-chip{display:inline-flex;align-items:center;border:1px solid #cdd9e5;background:#f8fbfd;color:#34495e;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:750}.gmai-menu-toggle{display:none;border:0;background:transparent;color:var(--gmai-text);padding:8px;margin-right:6px}.gmai-main{padding:30px;max-width:1520px;width:100%;margin:0 auto}.gmai-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px}.gmai-page-head h1{font-size:30px;line-height:1.15;margin:4px 0 7px;letter-spacing:-.02em}.gmai-page-head p{color:var(--gmai-muted);margin:0;max-width:760px;line-height:1.55}.gmai-eyebrow,.gmai-card-kicker{color:var(--gmai-blue);font-weight:850;font-size:10px;letter-spacing:.1em}.gmai-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin:0 0 18px}.gmai-kpi,.gmai-card{background:var(--gmai-surface);border:1px solid var(--gmai-border);border-radius:var(--gmai-radius);box-shadow:var(--gmai-shadow)}.gmai-kpi{padding:18px;text-decoration:none;color:inherit;transition:transform .15s,border-color .15s,box-shadow .15s}.gmai-kpi:hover{transform:translateY(-1px);border-color:#bfd1e1;box-shadow:0 8px 24px rgba(18,38,58,.075)}.gmai-kpi span{color:var(--gmai-muted);font-size:12px;font-weight:700}.gmai-kpi strong{display:block;font-size:28px;margin:5px 0 2px;line-height:1.05}.gmai-kpi small{color:#91a0ae;font-size:11px}.gmai-card{padding:22px;margin-bottom:18px}.gmai-card h2{margin:2px 0 16px;font-size:18px}.gmai-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.gmai-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,.65fr);gap:18px}.gmai-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.gmai-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gmai-module-card{display:grid;grid-template-columns:38px minmax(0,1fr) 16px;align-items:center;gap:12px;padding:13px;border:1px solid var(--gmai-border);border-radius:11px;text-decoration:none;color:inherit;background:#fff;transition:border-color .15s,background .15s}.gmai-module-card:hover{border-color:#b9cde0;background:#fbfdff}.gmai-module-icon{width:38px;height:38px;border-radius:10px;background:#eaf3fb;color:var(--gmai-blue);display:grid;place-items:center}.gmai-module-card strong,.gmai-module-card small{display:block}.gmai-module-card strong{font-size:13px}.gmai-module-card small{font-size:11px;color:var(--gmai-muted);margin-top:3px;line-height:1.35}.gmai-module-arrow{font-size:23px;color:#9badbc}.gmai-flow-card ol{list-style:none;padding:0;margin:18px 0 0;display:grid;gap:13px}.gmai-flow-card li{display:flex;gap:10px;align-items:flex-start}.gmai-flow-card li>span{width:24px;height:24px;flex:0 0 24px;border-radius:50%;background:#eaf3fb;color:var(--gmai-blue);display:grid;place-items:center;font-size:11px;font-weight:800}.gmai-flow-card strong,.gmai-flow-card small{display:block}.gmai-flow-card strong{font-size:12px}.gmai-flow-card small{font-size:11px;color:var(--gmai-muted);margin-top:2px;line-height:1.35}.gmai-field{margin-bottom:15px}.gmai-field label{font-weight:750;display:block;margin-bottom:6px;font-size:12px}.gmai-field input,.gmai-field select,.gmai-field textarea{width:100%;padding:10px 11px;border:1px solid #c7d2de;border-radius:9px;background:#fff;color:var(--gmai-text);font:inherit;font-size:13px;outline:none}.gmai-field input:focus,.gmai-field select:focus,.gmai-field textarea:focus{border-color:var(--gmai-blue);box-shadow:0 0 0 3px rgba(30,115,190,.11)}.gmai-btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:9px;padding:10px 15px;background:var(--gmai-blue);color:#fff;font-weight:750;font-size:13px;cursor:pointer;text-decoration:none;transition:background .15s,transform .15s}.gmai-btn:hover{background:var(--gmai-blue-strong);color:#fff}.gmai-btn:active{transform:translateY(1px)}.gmai-btn.secondary{background:#edf2f6;color:#2f4153}.gmai-btn.secondary:hover{background:#e2e9ef;color:#243647}.gmai-btn.danger{background:var(--gmai-red)}.gmai-table{width:100%;border-collapse:collapse;font-size:12px}.gmai-table th,.gmai-table td{text-align:left;padding:11px 10px;border-bottom:1px solid var(--gmai-border);vertical-align:top}.gmai-table th{color:#5f7081;font-size:10px;letter-spacing:.04em;text-transform:uppercase}.gmai-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#e8eef4;color:#415467;font-size:10px;font-weight:800}.gmai-badge.approved,.gmai-badge.indexed,.gmai-badge.validated{background:#e6f4ec;color:var(--gmai-green)}.gmai-badge.failed,.gmai-badge.rejected{background:#fdecea;color:var(--gmai-red)}.gmai-badge.needs_review,.gmai-badge.needs_revision,.gmai-badge.processing{background:#fff3dc;color:var(--gmai-amber)}.gmai-alert,.gmai-success{padding:12px 14px;border-radius:9px;margin:14px 0;font-size:12px}.gmai-alert{background:#fff0ef;color:#8a1c13;border:1px solid #f7d2ce}.gmai-success{background:#eaf7ef;color:#16663c;border:1px solid #cde9d8}.gmai-help{color:var(--gmai-muted);font-size:11px;margin-top:5px;line-height:1.45}.gmai-question-options{margin:12px 0 18px;padding-left:28px}.gmai-question-options li{padding:4px 0}.gmai-source{background:#f8fbfd;border:1px solid #dbe8f2;border-left:3px solid var(--gmai-blue);padding:12px 14px;border-radius:8px;font-size:12px;line-height:1.6}.gmai-login-required{max-width:480px;margin:70px auto;padding:30px;background:white}.gmai-overlay{display:none}.gmai-empty{padding:28px;text-align:center;color:var(--gmai-muted)}
@media(max-width:1120px){.gmai-shell{grid-template-columns:232px minmax(0,1fr)}.gmai-kpis{grid-template-columns:repeat(2,1fr)}.gmai-dashboard-grid{grid-template-columns:1fr}.gmai-module-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.gmai-shell{display:block}.gmai-sidebar{position:fixed;left:0;top:0;width:280px;height:100vh;height:100dvh;min-height:100vh;min-height:100dvh;overflow:hidden;transform:translateX(-102%);transition:transform .2s ease;box-shadow:12px 0 35px rgba(0,0,0,.18)}.gmai-nav{overflow:auto;flex:1 1 auto;min-height:0}.gmai-shell.menu-open .gmai-sidebar{transform:translateX(0)}.gmai-shell.menu-open .gmai-overlay{display:block;position:fixed;inset:0;background:rgba(13,31,47,.42);border:0;z-index:40}.gmai-sidebar-close,.gmai-menu-toggle{display:block}.gmai-topbar{padding:0 14px}.gmai-main{padding:22px 14px}.gmai-page-head{align-items:flex-start;flex-direction:column}.gmai-grid-2,.gmai-module-grid{grid-template-columns:1fr}}
@media(max-width:520px){.gmai-kpis{grid-template-columns:1fr 1fr;gap:9px}.gmai-kpi{padding:14px}.gmai-kpi strong{font-size:23px}.gmai-card{padding:16px}.gmai-main{padding:18px 10px}.gmai-page-head h1{font-size:25px}}
.gmai-topbar-meta{display:flex;align-items:center;gap:10px}.gmai-tech-btn{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid #cdd9e5;border-radius:9px;color:#294158;background:#fff;text-decoration:none;font-size:11px;font-weight:750}.gmai-tech-btn:hover{border-color:#aebfd0;background:#f8fbfd;color:#102436}.gmai-tech-btn svg{width:16px;height:16px}.gmai-user-menu{position:relative}.gmai-user-menu>summary{list-style:none;display:flex;align-items:center;gap:8px;cursor:pointer;padding:5px 7px;border-radius:10px;border:1px solid transparent;user-select:none}.gmai-user-menu>summary::-webkit-details-marker{display:none}.gmai-user-menu[open]>summary,.gmai-user-menu>summary:hover{background:#f5f8fb;border-color:#dce4ec}.gmai-user-menu>summary svg{width:15px;height:15px;color:#728398}.gmai-avatar{width:30px;height:30px;border-radius:9px;background:#e6f1fa;color:var(--gmai-blue);display:grid;place-items:center;font-size:10px;font-weight:850;letter-spacing:.03em}.gmai-user-name{font-size:12px;font-weight:750;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gmai-user-popover{position:absolute;right:0;top:calc(100% + 9px);width:230px;background:#fff;border:1px solid var(--gmai-border);border-radius:12px;box-shadow:0 14px 34px rgba(16,36,54,.14);padding:7px;z-index:80}.gmai-user-popover-head{padding:9px 10px 11px;border-bottom:1px solid var(--gmai-border);margin-bottom:5px}.gmai-user-popover-head strong,.gmai-user-popover-head small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gmai-user-popover-head strong{font-size:12px}.gmai-user-popover-head small{font-size:10px;color:var(--gmai-muted);margin-top:3px}.gmai-user-popover>a{display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:8px;text-decoration:none;color:#2d4053;font-size:12px;font-weight:650}.gmai-user-popover>a:hover{background:#f2f6f9;color:#102436}.gmai-user-popover>a svg{width:16px;height:16px;color:#708295}
@media(max-width:820px){.gmai-tech-btn span,.gmai-user-name{display:none}.gmai-tech-btn{padding:8px}.gmai-plan-chip{display:none}.gmai-topbar-meta{gap:5px}}
.gmai-notification-menu{position:relative}.gmai-notification-menu>summary{list-style:none;position:relative;width:38px;height:38px;border-radius:10px;border:1px solid transparent;display:grid;place-items:center;cursor:pointer;color:#5c7084}.gmai-notification-menu>summary::-webkit-details-marker{display:none}.gmai-notification-menu>summary:hover,.gmai-notification-menu[open]>summary{background:#f5f8fb;border-color:#dce4ec}.gmai-notification-menu>summary svg{width:19px;height:19px}.gmai-notification-badge{display:none;position:absolute;right:1px;top:0;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--gmai-red);color:#fff;font-size:9px;font-weight:850;align-items:center;justify-content:center;box-shadow:0 0 0 2px #fff}.gmai-notification-badge.is-visible{display:flex}.gmai-notification-popover{position:absolute;right:0;top:calc(100% + 9px);width:min(360px,90vw);background:#fff;border:1px solid var(--gmai-border);border-radius:12px;box-shadow:0 14px 34px rgba(16,36,54,.14);padding:7px;z-index:85}.gmai-notification-head{display:flex;align-items:center;justify-content:space-between;padding:9px 10px;border-bottom:1px solid var(--gmai-border)}.gmai-notification-head strong{font-size:12px}.gmai-notification-head button{border:0;background:transparent;color:var(--gmai-blue);font-size:10px;font-weight:750;cursor:pointer}.gmai-notification-item{display:block;padding:10px;border-radius:8px;text-decoration:none;color:#2d4053;border-left:3px solid transparent}.gmai-notification-item:hover{background:#f5f8fb}.gmai-notification-item.unread{background:#f2f8fd;border-left-color:var(--gmai-blue)}.gmai-notification-item strong,.gmai-notification-item span,.gmai-notification-item small{display:block}.gmai-notification-item strong{font-size:12px}.gmai-notification-item span{font-size:11px;color:#5f7081;margin-top:3px;line-height:1.35}.gmai-notification-item small{font-size:9px;color:#94a3b1;margin-top:5px}.gmai-notification-empty{padding:22px 10px;text-align:center;color:var(--gmai-muted);font-size:11px}.gmai-notification-all{display:block;padding:9px 10px;text-align:center;border-top:1px solid var(--gmai-border);text-decoration:none;color:var(--gmai-blue);font-size:11px;font-weight:750}.gmai-notification-page-list{display:grid}.gmai-notification-page-item{display:flex;justify-content:space-between;gap:20px;padding:14px 4px;border-bottom:1px solid var(--gmai-border);text-decoration:none;color:inherit}.gmai-notification-page-item:last-child{border-bottom:0}.gmai-notification-page-item strong{font-size:13px}.gmai-notification-page-item p{font-size:12px;color:var(--gmai-muted);margin:4px 0 0}.gmai-notification-page-item small{white-space:nowrap;color:#93a2b0;font-size:10px}.gmai-job-progress{height:7px;background:#edf2f6;border-radius:999px;overflow:hidden;min-width:120px}.gmai-job-progress>span{display:block;height:100%;background:var(--gmai-blue);border-radius:inherit}.gmai-badge.queued{background:#eaf3fb;color:var(--gmai-blue)}.gmai-badge.running{background:#fff3dc;color:var(--gmai-amber)}.gmai-badge.completed{background:#e6f4ec;color:var(--gmai-green)}.gmai-badge.incomplete,.gmai-badge.partial{background:#fff3dc;color:var(--gmai-amber)}.gmai-badge.deleted{background:#eef1f4;color:#687887}

/* 0.3.4 - richiamo visivo non invasivo per notifiche non lette. */
.gmai-notification-menu.has-unread-attention:not([open])>summary svg{transform-origin:50% 8%;animation:gmai-bell-attention 10s ease-in-out infinite}
@keyframes gmai-bell-attention{0%,7%,100%{transform:rotate(0)}1%{transform:rotate(14deg)}2%{transform:rotate(-12deg)}3%{transform:rotate(10deg)}4%{transform:rotate(-8deg)}5%{transform:rotate(5deg)}6%{transform:rotate(0)}}
@media(prefers-reduced-motion:reduce){.gmai-notification-menu.has-unread-attention:not([open])>summary svg{animation:none}}

/* 0.4.0 - Student Experience */
.gmai-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.gmai-shell-student .gmai-sidebar{background:linear-gradient(180deg,#0f3152 0%,#102b46 100%)}
.gmai-shell-student .gmai-brand-copy small{color:#a9c5dd}
.gmai-shell-student .gmai-nav-heading{color:#7fa7c7}
.gmai-shell-student .gmai-nav-item{color:#d8e7f3}
.gmai-shell-student .gmai-nav-item:hover,.gmai-shell-student .gmai-nav-item.active{background:rgba(255,255,255,.1);color:#fff}
.gmai-shell-student .gmai-sidebar-footer{border-top-color:rgba(255,255,255,.12)}
.gmai-shell-student .gmai-sidebar-footer,.gmai-shell-student .gmai-sidebar-footer a{color:#d8e7f3}
.gmai-student-hero{background:linear-gradient(135deg,#f3f8fc 0%,#fff 72%);border:1px solid #dce8f2;border-radius:16px;padding:24px;margin-bottom:18px}
.gmai-student-hero h1{max-width:760px}
.gmai-student-kpis{margin-top:0}
.gmai-student-recent{display:grid;gap:10px;margin-top:12px}.gmai-student-recent>div{display:grid;grid-template-columns:1fr auto;gap:3px 14px;padding:11px 0;border-bottom:1px solid var(--gmai-border)}.gmai-student-recent>div:last-child{border-bottom:0}.gmai-student-recent strong{font-size:12px}.gmai-student-recent span{font-size:10px;color:var(--gmai-muted)}.gmai-student-recent em{grid-column:2;grid-row:1/3;font-style:normal;font-size:11px;font-weight:750;color:var(--gmai-blue);align-self:center}
.gmai-student-statline{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--gmai-border)}.gmai-student-statline span{font-size:12px;color:var(--gmai-muted)}.gmai-student-statline strong{font-size:20px;color:#173a5a}
.gmai-student-quiz-form{display:grid;gap:14px}.gmai-student-question{padding:22px}.gmai-student-question h2{font-size:18px;line-height:1.45;margin:10px 0 16px}.gmai-question-number{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--gmai-blue)}
.gmai-student-options{display:grid;gap:9px}.gmai-student-options label{display:block;cursor:pointer}.gmai-student-options input{position:absolute;opacity:0;pointer-events:none}.gmai-student-options span{display:block;border:1px solid #d9e2ea;border-radius:11px;padding:12px 14px;background:#fff;font-size:13px;line-height:1.4;transition:.15s ease}.gmai-student-options label:hover span{border-color:#9cbdd7;background:#f8fbfd}.gmai-student-options input:checked+span{border-color:var(--gmai-blue);background:#edf6fd;box-shadow:0 0 0 2px rgba(30,115,190,.08)}.gmai-student-options b{color:#31536f;margin-right:4px}
.gmai-student-submit{position:sticky;bottom:10px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 12px 30px rgba(15,58,102,.14)}.gmai-student-submit p{margin:0;font-size:12px;color:var(--gmai-muted)}
.gmai-student-result{border-left:4px solid #cfd8e1}.gmai-student-result.correct{border-left-color:var(--gmai-green)}.gmai-student-result.wrong{border-left-color:var(--gmai-red)}.gmai-student-result.omitted{border-left-color:#97a6b3}.gmai-option-correct{background:#edf8f1;border-radius:8px;padding:7px 9px}.gmai-option-user-wrong{background:#fff0f0;border-radius:8px;padding:7px 9px}.gmai-option-user-wrong em{font-size:10px;color:var(--gmai-red);font-style:normal}.gmai-option-correct strong{font-size:10px;color:var(--gmai-green)}
.gmai-exam-head{align-items:center}.gmai-exam-timer{min-width:130px;text-align:center;border-radius:12px;background:#102f4c;color:#fff;font-weight:850;font-size:24px;letter-spacing:.04em;padding:12px 16px;font-variant-numeric:tabular-nums}.gmai-exam-timer.expired{background:#8f1d1d}.gmai-exam-save-state{position:sticky;top:64px;z-index:20;margin-bottom:12px;padding:8px 12px;border-radius:8px;background:#eef7f1;color:#2e6c45;font-size:11px;font-weight:700;border:1px solid #d8ebdf}.gmai-exam-save-state.is-error{background:#fff0f0;color:#922;border-color:#f0d2d2}
@media(max-width:820px){.gmai-grid-3{grid-template-columns:1fr}.gmai-student-submit{position:static;display:block}.gmai-student-submit .gmai-btn{margin-top:12px;width:100%}.gmai-exam-head{display:block}.gmai-exam-timer{margin-top:14px;display:inline-block}.gmai-exam-save-state{top:54px}}

/* 0.4.3 - UX split Admin / Student + mobile-first */
.gmai-shell-admin{--gmai-blue:#1e73be;--gmai-blue-strong:#155f9f;--gmai-navy:#102436;--gmai-bg:#f4f7fa}
.gmai-shell-student{--gmai-blue:#0b8f89;--gmai-blue-strong:#08716d;--gmai-navy:#123d48;--gmai-bg:#f3f8f8;--gmai-border:#d8e6e6;--gmai-shadow:0 7px 24px rgba(13,68,77,.055)}
.gmai-shell-student .gmai-sidebar{background:linear-gradient(180deg,#0d5361 0%,#103a47 58%,#102d3c 100%)}
.gmai-shell-student .gmai-nav-heading{color:#8cc9c7}.gmai-shell-student .gmai-brand-copy small{color:#b8d9d8}
.gmai-shell-student .gmai-nav-item:hover,.gmai-shell-student .gmai-nav-item.active{background:rgba(255,255,255,.11);color:#fff}
.gmai-shell-student .gmai-avatar,.gmai-shell-student .gmai-module-icon{background:#e7f7f5;color:#087b76}
.gmai-shell-student .gmai-plan-chip{border-color:#cce6e4;background:#f2fbfa;color:#17655f}
.gmai-shell-admin .gmai-sidebar{background:linear-gradient(180deg,#102436 0%,#0c1d2c 100%)}
.gmai-student-hero{background:linear-gradient(135deg,#eaf8f7 0%,#f8fbfb 45%,#fff 100%);border-color:#d4e9e7}
.gmai-student-recent>a{display:grid;grid-template-columns:1fr auto;gap:3px 14px;padding:12px 7px;border-bottom:1px solid var(--gmai-border);border-radius:9px;text-decoration:none;color:inherit;transition:.15s ease}.gmai-student-recent>a:hover{background:#f4fbfa}.gmai-student-recent>a:last-child{border-bottom:0}.gmai-student-recent>a strong{font-size:12px}.gmai-student-recent>a span{font-size:10px;color:var(--gmai-muted)}.gmai-student-recent>a em{grid-column:2;grid-row:1/3;font-style:normal;font-size:11px;font-weight:800;color:var(--gmai-blue);align-self:center}
.gmai-source-action{margin-top:14px}.gmai-source-action .gmai-btn{font-size:11px;padding:8px 11px}
.gmai-activity-card{padding:8px 22px}.gmai-activity-list{display:grid}.gmai-activity-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:16px 4px;border-bottom:1px solid var(--gmai-border);text-decoration:none;color:inherit}.gmai-activity-row:last-child{border-bottom:0}.gmai-activity-row:hover strong{color:var(--gmai-blue)}.gmai-activity-row strong,.gmai-activity-row small{display:block}.gmai-activity-row strong{font-size:14px;margin:6px 0 3px}.gmai-activity-row small{font-size:11px;color:var(--gmai-muted)}.gmai-activity-type{display:flex;align-items:center;gap:7px;color:var(--gmai-blue);font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.gmai-activity-type svg{width:15px;height:15px}.gmai-activity-result{text-align:right;display:grid;justify-items:end;gap:7px}.gmai-activity-result b{font-size:13px}.gmai-access-expired{max-width:620px;margin:80px auto;padding:28px;background:#fff;border:1px solid #ecd5a9;border-radius:14px;box-shadow:var(--gmai-shadow)}
@media(max-width:820px){
 .gmai-topbar{height:58px;padding:0 10px}.gmai-main{padding:16px 11px 96px}.gmai-page-head{gap:12px;margin-bottom:16px}.gmai-page-head h1{font-size:25px}.gmai-page-head p{font-size:13px;line-height:1.45}.gmai-card{padding:17px;border-radius:13px;margin-bottom:12px}.gmai-kpis{gap:9px;margin-bottom:12px}.gmai-kpi{padding:14px}.gmai-kpi strong{font-size:24px}.gmai-student-hero{padding:18px}.gmai-student-hero .gmai-btn{width:100%}.gmai-student-question{padding:17px}.gmai-student-question h2{font-size:17px;line-height:1.42}.gmai-student-options{gap:8px}.gmai-student-options span{min-height:50px;padding:13px 13px;font-size:14px;display:flex;align-items:center}.gmai-student-submit{position:sticky;bottom:calc(8px + env(safe-area-inset-bottom));z-index:18;padding:13px 14px;display:block;border:1px solid #cfe1df;box-shadow:0 12px 30px rgba(13,68,77,.18)}.gmai-student-submit p{font-size:11px}.gmai-student-submit .gmai-btn{width:100%;margin-top:10px;min-height:46px}.gmai-source{font-size:11px}.gmai-activity-card{padding:4px 14px}.gmai-activity-row{grid-template-columns:1fr;padding:14px 2px}.gmai-activity-result{justify-items:start;text-align:left;display:flex;align-items:center;gap:8px}.gmai-notification-popover{position:fixed;left:10px;right:10px;top:62px;width:auto}.gmai-user-popover{position:fixed;left:10px;right:10px;top:62px;width:auto}
}
@media(max-width:520px){.gmai-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.gmai-kpi span{font-size:10px}.gmai-kpi strong{font-size:22px}.gmai-kpi small{font-size:9px}.gmai-grid-2{gap:10px}.gmai-exam-timer{width:100%;font-size:22px}.gmai-question-options{padding-left:22px}.gmai-question-options li{font-size:13px;line-height:1.45}.gmai-card h2{font-size:17px}}

/* 0.4.3 - logo privato responsive e indipendente dal logo pubblico */
.gmai-brand-logo{width:52px;height:44px;display:flex;align-items:center;justify-content:flex-start;flex:0 0 52px;overflow:hidden}.gmai-brand-logo .gmai-brand-image{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain;object-position:left center;margin:0!important}.gmai-brand.logo-only .gmai-brand-logo{width:184px;flex-basis:184px;height:48px}.gmai-brand.logo-only{width:100%;padding-right:0}.gmai-brand .custom-logo-link{display:flex;align-items:center;height:44px}.gmai-brand .custom-logo{display:block;max-width:100%;max-height:44px;width:auto;height:auto;object-fit:contain}
@media(max-width:820px){.gmai-brand.logo-only .gmai-brand-logo{width:190px;flex-basis:190px}.gmai-brand-row{min-height:58px}}

/* 0.5.1 — Student license management */
.gmai-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.gmai-license-toolbar{display:flex;gap:10px;align-items:end;justify-content:space-between;flex-wrap:wrap;margin-bottom:14px}.gmai-license-toolbar form{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.gmai-license-toolbar input{min-width:260px;padding:9px 11px;border:1px solid #c7d2de;border-radius:9px}.gmai-license-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.gmai-license-actions select{min-width:118px;padding:8px 9px;border:1px solid #c7d2de;border-radius:8px;background:#fff}.gmai-license-actions .gmai-btn{padding:8px 10px;font-size:11px}.gmai-license-status{display:inline-flex;align-items:center;gap:6px;font-weight:750;font-size:11px}.gmai-license-status:before{content:"";width:7px;height:7px;border-radius:50%;background:#9aa8b6}.gmai-license-status.active:before{background:#2ca66f}.gmai-license-status.expired:before,.gmai-license-status.revoked:before{background:#d84b3f}.gmai-license-status.pending:before{background:#e3a12c}.gmai-student-meta{display:block;color:var(--gmai-muted);font-size:10px;margin-top:3px}.gmai-pagination{display:flex;gap:6px;flex-wrap:wrap;margin-top:16px}.gmai-pagination a,.gmai-pagination span{min-width:34px;height:34px;display:grid;place-items:center;padding:0 9px;border:1px solid var(--gmai-border);border-radius:8px;text-decoration:none;background:#fff;color:inherit;font-size:12px}.gmai-pagination .current{background:var(--gmai-blue);color:#fff;border-color:var(--gmai-blue)}@media(max-width:720px){.gmai-license-toolbar{display:block}.gmai-license-toolbar form{display:grid;grid-template-columns:1fr auto;margin-top:10px}.gmai-license-toolbar input{min-width:0;width:100%}.gmai-license-actions{min-width:250px}.gmai-main{overflow-x:hidden}}

/* 0.5.6 — Multimodal question media */
.gmai-question-media{margin:16px 0 20px;max-width:820px}.gmai-question-media img{display:block;max-width:100%;width:auto;height:auto;max-height:620px;object-fit:contain;border:1px solid var(--gmai-border);border-radius:11px;background:#fff}.gmai-question-media figcaption{margin-top:7px;color:var(--gmai-muted);font-size:11px;line-height:1.4}
@media(max-width:820px){.gmai-question-media{margin:13px 0 16px}.gmai-question-media img{max-height:480px;width:100%}}



/* 0.5.7.1 — desktop sidebar follows the full document height.
   No viewport-locking and no JS height measurement. The grid row stretches the
   sidebar to the taller of sidebar/workspace; the account footer is pushed to
   the physical bottom of that row. */
@media(min-width:821px){
 .gmai-shell{align-items:stretch!important;min-height:100vh!important;min-height:100dvh!important}
 .gmai-sidebar{position:relative!important;top:auto!important;height:auto!important;min-height:100vh!important;min-height:100dvh!important;max-height:none!important;align-self:stretch!important;overflow:visible!important}
 .gmai-nav{display:block!important;flex:0 0 auto!important;min-height:initial!important;overflow:visible!important;overscroll-behavior:auto!important;padding-bottom:18px}
 .gmai-sidebar-footer{margin-top:auto!important;flex:0 0 auto!important}
 body.admin-bar .gmai-sidebar{top:auto!important;height:auto!important;min-height:100vh!important;min-height:100dvh!important;max-height:none!important}
}


/* 0.5.7.5 — sidebar/full-document sync for floating document menus.
   Desktop action popovers are intentionally absolute overlays. Their height is
   therefore not part of normal document flow, so an open menu near the bottom
   could visually extend below the shell while the sidebar correctly stretched
   only to the shell's natural height. Reserve only the required bottom space;
   portal.js computes the exact overflow and this :has() rule is a no-JS safety
   fallback for modern browsers. */
@media(min-width:821px){
 .gmai-main{--gmai-floating-menu-space:0px;padding-bottom:calc(30px + var(--gmai-floating-menu-space))}
 @supports selector(.gmai-main:has(.gmai-doc-more[open])){
  .gmai-main:has(.gmai-doc-more[open]){--gmai-floating-menu-space:320px}
 }
}
