/* Scoped student member dashboard. No changes to Tutor's or the active theme's CSS. */
.tgi-student-portal{--tgi-navy:#122653;--tgi-blue:#274a9b;--tgi-line:#e2e8f3;--tgi-muted:#64748b;--tgi-surface:#fff;--tgi-bg:#f5f8fc;color:#17243e;font-family:inherit;max-width:1160px;margin:32px auto 70px;padding:0 18px;font-size:15px;line-height:1.55;box-sizing:border-box}
.tgi-student-portal *{box-sizing:border-box}
.tgi-student-portal .tgi-portal-hero{background:linear-gradient(125deg,#111e43 0%,#183876 65%,#3155a6 100%);color:#fff;border-radius:22px;padding:34px;overflow:hidden;box-shadow:0 12px 36px rgba(22,45,98,.13)}
.tgi-student-portal .tgi-portal-topline,.tgi-student-portal .tgi-portal-heading,.tgi-student-portal .tgi-section-header,.tgi-student-portal .tgi-card-top,.tgi-student-portal .tgi-card-seats,.tgi-student-portal .tgi-card-mini-stats{display:flex;align-items:center;justify-content:space-between;gap:16px}
.tgi-student-portal .tgi-portal-kicker{letter-spacing:1.4px;font-size:11px;font-weight:750;color:#c2d5ff}
.tgi-student-portal .tgi-portal-phase{font-size:11px;background:rgba(255,255,255,.11);border:1px solid rgba(255,255,255,.2);border-radius:30px;padding:6px 12px;color:#e2ecff}
.tgi-student-portal .tgi-portal-heading{margin:17px 0 28px;align-items:flex-start}
.tgi-student-portal .tgi-portal-heading h1{font-family:inherit;font-size:clamp(26px,4vw,37px);margin:0 0 7px;color:#fff;line-height:1.2;font-weight:760}
.tgi-student-portal .tgi-portal-heading p{color:#d4e0ff;max-width:600px;margin:0;font-size:14px}
.tgi-student-portal .tgi-back-button{display:inline-flex;white-space:nowrap;padding:9px 13px;border:1px solid rgba(255,255,255,.24);border-radius:10px;color:#fff!important;text-decoration:none!important;font-size:13px;font-weight:650;background:rgba(255,255,255,.09)}
.tgi-student-portal .tgi-back-button:hover{background:rgba(255,255,255,.18)}
.tgi-student-portal .tgi-portal-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.tgi-student-portal .tgi-summary-stat{border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.09);padding:15px 18px;border-radius:13px;display:flex;flex-direction:column;gap:5px}
.tgi-student-portal .tgi-summary-stat span{font-size:12px;color:#dbe6ff}.tgi-student-portal .tgi-summary-stat strong{font-size:27px;color:#fff;line-height:1.2}
.tgi-student-portal .tgi-portal-note{display:flex;gap:13px;align-items:flex-start;padding:14px 18px;background:#edf4ff;border:1px solid #cadcfb;color:#264271;border-radius:13px;margin-top:22px}
.tgi-student-portal .tgi-portal-note>span{font-size:19px;line-height:1.2}.tgi-student-portal .tgi-portal-note p{margin:0;font-size:13px}
.tgi-student-portal .tgi-groups-section{margin-top:30px}.tgi-student-portal .tgi-section-header{margin-bottom:17px}
.tgi-student-portal .tgi-section-header h2{font-family:inherit;font-size:22px;line-height:1.3;margin:0 0 4px;font-weight:750;color:var(--tgi-navy)}
.tgi-student-portal .tgi-section-header p{color:var(--tgi-muted);font-size:13px;margin:0}.tgi-student-portal .tgi-group-total{font-size:12px;color:var(--tgi-muted);white-space:nowrap}
.tgi-student-portal .tgi-groups-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.tgi-student-portal .tgi-group-card{border:1px solid var(--tgi-line);border-radius:17px;background:#fff;padding:22px;box-shadow:0 7px 23px rgba(20,43,87,.05);min-width:0}
.tgi-student-portal .tgi-course-label{font-size:10px;letter-spacing:1px;font-weight:800;color:#5675b0}
.tgi-student-portal .tgi-enabled-badge{background:#eaf9f1;color:#14724a;border:1px solid #bfead1;padding:4px 9px;border-radius:24px;font-size:11px;font-weight:700}
.tgi-student-portal .tgi-group-card h3{font-family:inherit;font-weight:750;line-height:1.4;color:var(--tgi-navy);font-size:19px;min-height:52px;margin:15px 0 4px}
.tgi-student-portal .tgi-view-course{font-size:12px;color:var(--tgi-blue)!important;text-decoration:none!important;font-weight:650}.tgi-student-portal .tgi-view-course:hover{text-decoration:underline!important}
.tgi-student-portal .tgi-card-seats{margin:22px 0 12px;align-items:end}.tgi-student-portal .tgi-card-seats-main{display:flex;flex-direction:column;gap:1px}
.tgi-student-portal .tgi-card-seats-main strong{font-size:29px;color:#112b60;line-height:1.1}.tgi-student-portal .tgi-card-seats-main strong span{font-size:17px;color:#8090ad;font-weight:600}
.tgi-student-portal .tgi-card-seats-main>span{font-size:11px;color:var(--tgi-muted)}.tgi-student-portal .tgi-available-caption{font-weight:700;font-size:12px;color:#176f4e}
.tgi-student-portal .tgi-progress-track{width:100%;height:8px;border-radius:12px;background:#eaf0f8;overflow:hidden}.tgi-student-portal .tgi-progress-track>span{display:block;height:100%;background:linear-gradient(90deg,#2869bf,#16a586);border-radius:12px}
.tgi-student-portal .tgi-card-mini-stats{justify-content:flex-start;gap:19px;font-size:12px;color:var(--tgi-muted);margin:12px 0 16px}
.tgi-student-portal .tgi-card-mini-stats strong{color:var(--tgi-navy)}
.tgi-student-portal .tgi-member-details{border-top:1px solid var(--tgi-line);border-bottom:1px solid var(--tgi-line)}
.tgi-student-portal .tgi-member-details summary{cursor:pointer;padding:13px 0;color:#284773;font-weight:700;font-size:13px;list-style:none;display:flex;justify-content:space-between}
.tgi-student-portal .tgi-member-details summary::-webkit-details-marker{display:none}
.tgi-student-portal .tgi-member-details-body{padding:0 0 15px}
.tgi-student-portal .tgi-no-members{font-size:12px;color:var(--tgi-muted);padding:12px;background:var(--tgi-bg);border-radius:9px;margin:0}
.tgi-student-portal .tgi-member-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--tgi-line)}
.tgi-student-portal .tgi-member-row:last-child{border-bottom:0}
.tgi-student-portal .tgi-member-avatar{background:#e4f6ec;color:#166a45;width:27px;height:27px;border-radius:50%;display:flex;justify-content:center;align-items:center;flex-shrink:0}
.tgi-student-portal .tgi-member-pending{background:#fff6dc;color:#996800}
.tgi-student-portal .tgi-member-row>span:nth-child(2){min-width:0;flex:1}.tgi-student-portal .tgi-member-row strong,.tgi-student-portal .tgi-member-row small{display:block;overflow-wrap:anywhere}
.tgi-student-portal .tgi-member-row strong{font-size:12px;color:#183365}.tgi-student-portal .tgi-member-row small{font-size:11px;color:var(--tgi-muted)}
.tgi-student-portal .tgi-member-row em{font-size:10px;color:var(--tgi-muted);font-style:normal}
.tgi-student-portal .tgi-invite-placeholder{margin-top:16px}
.tgi-student-portal .tgi-invite-placeholder label{display:block;color:#243d6e;font-size:13px;font-weight:750;margin-bottom:8px}
.tgi-student-portal .tgi-invite-fields{display:flex;gap:8px}
.tgi-student-portal .tgi-invite-fields input{min-width:0;flex:1;max-width:100%;font-family:inherit;font-size:13px;padding:11px 12px;border-radius:9px;background:#f5f7fb;border:1px solid #e1e7f0;color:#8390a9;cursor:text}
.tgi-student-portal .tgi-invite-fields button{border:0;border-radius:9px;background:#274a9b;color:#fff;font-size:12px;padding:10px 15px;font-family:inherit;font-weight:700;cursor:pointer}
.tgi-student-portal .tgi-invite-placeholder small{font-size:11px;color:var(--tgi-muted);margin-top:8px;display:block}
.tgi-student-portal .tgi-empty-state,.tgi-student-portal.tgi-portal-message{background:#fff;border-radius:17px;border:1px solid var(--tgi-line);padding:48px 24px;text-align:center;margin-top:20px}
.tgi-student-portal .tgi-empty-state h2,.tgi-student-portal.tgi-portal-message h2{font-size:22px;color:var(--tgi-navy);margin:10px 0 8px}
.tgi-student-portal .tgi-empty-state p,.tgi-student-portal.tgi-portal-message p{max-width:490px;margin:0 auto 20px;color:var(--tgi-muted);font-size:14px}
.tgi-student-portal .tgi-empty-icon{font-size:42px;color:#779acb}.tgi-student-portal .tgi-primary-link{display:inline-block;text-decoration:none!important;background:var(--tgi-blue);color:#fff!important;border-radius:9px;padding:10px 16px;font-size:13px;font-weight:700}
@media(max-width:780px){.tgi-student-portal{margin:22px auto 45px;padding:0 12px}.tgi-student-portal .tgi-portal-hero{padding:22px}.tgi-student-portal .tgi-portal-heading{flex-direction:column;gap:16px}.tgi-student-portal .tgi-groups-grid{grid-template-columns:1fr}.tgi-student-portal .tgi-portal-phase{display:none}}
@media(max-width:480px){.tgi-student-portal .tgi-portal-summary{gap:7px}.tgi-student-portal .tgi-summary-stat{padding:12px 8px}.tgi-student-portal .tgi-summary-stat span{font-size:10px}.tgi-student-portal .tgi-summary-stat strong{font-size:23px}.tgi-student-portal .tgi-card-top{gap:8px}.tgi-student-portal .tgi-enabled-badge{white-space:nowrap}.tgi-student-portal .tgi-invite-fields{flex-direction:column}.tgi-student-portal .tgi-group-card{padding:18px}}

/* Phase 3: one invitation for multiple approved courses. */
.tgi-student-portal .tgi-bundle-section{margin-top:24px;border:1px solid #cfdcf0;background:#fff;border-radius:19px;overflow:hidden;box-shadow:0 9px 23px rgba(17,35,71,.05)}
.tgi-student-portal .tgi-bundle-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:25px 26px 17px}
.tgi-student-portal .tgi-bundle-kicker{display:block;font-size:10px;font-weight:850;letter-spacing:1.3px;color:#3865ae;margin-bottom:7px}
.tgi-student-portal .tgi-bundle-head h2{font-size:22px;line-height:1.25;margin:0 0 9px;color:#122653;font-weight:770}
.tgi-student-portal .tgi-bundle-head p{font-size:13px;color:#64748b;line-height:1.6;max-width:670px;margin:0}
.tgi-student-portal .tgi-bundle-step{white-space:nowrap;border-radius:99px;padding:7px 11px;background:#f0f5ff;color:#315990;font-size:11px;font-weight:700}
.tgi-student-portal .tgi-bundle-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid #eef2f8;border-bottom:1px solid #eef2f8;padding:13px 26px;background:#fafcff}
.tgi-student-portal .tgi-bundle-action{padding:7px 12px;font-size:12px;font-family:inherit;border:1px solid #d7e3f4;border-radius:8px;cursor:pointer;background:#fff;color:#1b4483;font-weight:700}
.tgi-student-portal .tgi-bundle-action:hover{background:#eff6ff}
.tgi-student-portal .tgi-bundle-count{margin-left:auto;color:#526782;font-size:12px;font-weight:700}
.tgi-student-portal .tgi-bundle-courses{padding:8px 26px 4px;max-height:300px;overflow-y:auto}
.tgi-student-portal .tgi-bundle-choice{display:flex;align-items:center;gap:12px;padding:12px 2px;border-bottom:1px solid #eff2f7;cursor:pointer;color:#19345e}
.tgi-student-portal .tgi-bundle-choice:last-child{border-bottom:0}
.tgi-student-portal .tgi-bundle-checkbox{width:17px;height:17px;flex:0 0 auto;accent-color:#2565b5;cursor:pointer}
.tgi-student-portal .tgi-bundle-course-title{flex:1;font-weight:650;font-size:13px;overflow-wrap:anywhere}
.tgi-student-portal .tgi-bundle-seat-tag{font-size:11px;font-weight:700;color:#25734e;white-space:nowrap}
.tgi-student-portal .tgi-bundle-full{opacity:.55;cursor:not-allowed}
.tgi-student-portal .tgi-bundle-full .tgi-bundle-seat-tag{color:#a45e42}
.tgi-student-portal .tgi-bundle-preview{background:#f4f8ff;padding:15px 26px;color:#2f4c79;font-size:12px;border-top:1px solid #e6eef9}
.tgi-student-portal .tgi-bundle-preview strong{display:block;font-size:12px}
.tgi-student-portal .tgi-bundle-preview ul{margin:7px 0 0;padding-left:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 20px}
.tgi-student-portal .tgi-bundle-preview li{overflow-wrap:anywhere}
.tgi-student-portal .tgi-bundle-invite{padding:20px 26px 24px}
.tgi-student-portal .tgi-bundle-invite label{display:block;margin-bottom:9px;font-weight:750;font-size:13px;color:#243d6e}
.tgi-student-portal .tgi-bundle-invite small{display:block;margin-top:9px;color:#64748b;font-size:11px}
.tgi-student-portal .tgi-bundle-invite .tgi-invite-fields input{cursor:text;background:#fff;color:#19345e}
.tgi-student-portal .tgi-card-note{font-size:11px;line-height:1.5;color:#61728e;margin-top:15px;background:#f7f9fe;border:1px solid #e8eef8;padding:12px;border-radius:9px}
@media(max-width:780px){.tgi-student-portal .tgi-bundle-head{flex-direction:column;gap:10px}.tgi-student-portal .tgi-bundle-preview ul{grid-template-columns:1fr}}
@media(max-width:480px){.tgi-student-portal .tgi-bundle-head,.tgi-student-portal .tgi-bundle-invite{padding:18px}.tgi-student-portal .tgi-bundle-courses{padding:8px 18px}.tgi-student-portal .tgi-bundle-toolbar{padding:13px 18px}.tgi-student-portal .tgi-bundle-preview{padding:14px 18px}.tgi-student-portal .tgi-bundle-step{white-space:normal}.tgi-student-portal .tgi-bundle-seat-tag{white-space:normal;text-align:right}.tgi-student-portal .tgi-bundle-count{margin-left:0}}

/* Phase 3: active invitations and acceptance UI. */
.tgi-student-portal .tgi-notice{border-radius:12px;padding:14px 18px;margin-top:18px;font-size:13px;font-weight:650}
.tgi-student-portal .tgi-notice-success{background:#eaf9f1;border:1px solid #a9ddbd;color:#116b43}
.tgi-student-portal .tgi-notice-error{background:#fff2f0;border:1px solid #efc4bf;color:#9c2d2d}
.tgi-student-portal .tgi-invite-fields input{cursor:text;background:#fff;color:#19345e}
.tgi-student-portal .tgi-invite-fields button{cursor:pointer;background:#274a9b;color:#fff}
.tgi-student-portal .tgi-invite-fields button:hover{background:#153c83}
.tgi-student-portal .tgi-invite-fields button:disabled{opacity:.5;cursor:not-allowed}
.tgi-student-portal .tgi-cancel-form{margin:0;flex:0 0 auto}
.tgi-student-portal .tgi-cancel-invite{background:#fff3f1;color:#a13b34;border:1px solid #ecc5c0;padding:5px 9px;border-radius:7px;font-size:11px;cursor:pointer}
.tgi-student-portal .tgi-accept-card{background:#fff;border:1px solid #e2e8f3;box-shadow:0 10px 35px rgba(20,43,87,.08);border-radius:20px;max-width:690px;margin:40px auto;padding:34px}
.tgi-student-portal .tgi-accept-card h1{font-size:28px;color:#122653;line-height:1.3;margin:12px 0 18px}
.tgi-student-portal .tgi-accept-card p{color:#526782;font-size:14px}
.tgi-student-portal .tgi-accept-courses{padding-left:23px;margin:15px 0;background:#f5f8fc;border-radius:12px;padding-top:17px;padding-bottom:17px}
.tgi-student-portal .tgi-accept-courses li{margin:5px 0;color:#1b4483;font-size:14px;font-weight:650}
.tgi-student-portal .tgi-accept-expiry{font-size:12px!important;color:#7f8da4!important}
.tgi-student-portal .tgi-accept-register{display:flex;flex-direction:column;gap:9px;margin-top:18px}
.tgi-student-portal .tgi-accept-register label{font-size:13px;color:#243d6e;font-weight:700}
.tgi-student-portal .tgi-accept-register input{font-size:15px;border:1px solid #dbe5f2;border-radius:9px;padding:12px;color:#19345e;background:#fff}
.tgi-student-portal .tgi-invite-submit{margin-top:14px;background:#274a9b;color:#fff;border:0;border-radius:9px;padding:13px 18px;font-size:14px;font-weight:700;cursor:pointer}
.tgi-student-portal .tgi-accept-notice{padding:12px 15px;border-radius:9px;background:#edf4ff;border:1px solid #caddf8;color:#224b86;font-size:13px;margin:12px 0}
@media(max-width:480px){.tgi-student-portal .tgi-accept-card{padding:22px}}
