.portal-body{min-height:100vh;background:#f4f7f9}.portal-shell{min-height:100vh}.portal-auth-panel{max-width:560px}.portal-auth-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0}.portal-auth-switch button{border:1px solid #cbd9df;background:#f6fafb;border-radius:10px;padding:11px;font:inherit;font-weight:700;color:#355568;cursor:pointer}.portal-auth-switch button.is-active{background:#0b5867;color:#fff;border-color:#0b5867}.portal-register{margin-top:18px;padding-top:18px;border-top:1px solid #dde8ec}.portal-actor-card{margin:14px 4px;padding:12px 14px;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:rgba(255,255,255,.06);display:flex;flex-direction:column;gap:3px}.portal-actor-card b{color:#fff}.portal-actor-card span{color:#bad0d6;font-size:.85rem}.portal-module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin-top:18px}.portal-module-card{border:1px solid #d8e4e8;background:#fff;border-radius:16px;padding:20px;box-shadow:0 7px 24px rgba(33,56,79,.06);display:flex;flex-direction:column;gap:9px;min-height:170px}.portal-module-card h3{margin:0;color:#18384a;font-size:1.05rem}.portal-module-card p{margin:0;color:#627884;line-height:1.8}.portal-module-card .module-icon{width:42px;height:42px;border-radius:12px;background:#e8f4f3;color:#0b5867;display:grid;place-items:center;font-size:1.2rem}.portal-module-card.is-disabled{opacity:.72;background:#f8fafb}.portal-module-card .module-action{margin-top:auto}.portal-ticket-card{min-height:170px;border:1px dashed #bdd2d9;border-radius:14px;padding:16px;background:#fbfdfd}.portal-ticket-number{font-size:3rem;font-weight:800;color:#0b5867;line-height:1}.portal-ticket-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-top:14px}.portal-ticket-meta div{background:#eef6f7;border-radius:10px;padding:10px}.portal-ticket-meta b{display:block;color:#173f52}.portal-ticket-meta span{font-size:.82rem;color:#657a86}.portal-reception-controls{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.portal-requests-layout{grid-template-columns:minmax(320px,.9fr) minmax(360px,1.1fr)}.portal-course-list{max-height:320px;overflow:auto;border:1px solid #dbe6e9;border-radius:12px;margin:12px 0}.portal-course-row{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:start;padding:11px 12px;border-bottom:1px solid #edf2f4}.portal-course-row:last-child{border-bottom:0}.portal-course-row.eligible{background:#f5fbf9}.portal-course-row.blocked{background:#fff8f2}.portal-course-row b{display:block;color:#21384f}.portal-course-row small{display:block;color:#7a6a62;margin-top:3px}.portal-course-row .course-tag{font-size:.72rem;border-radius:999px;padding:3px 8px;background:#e3f2ee;color:#1c6b5c}.portal-course-row.blocked .course-tag{background:#f9e2cf;color:#9a4d12}.portal-legend{font-size:.82rem;color:#637681;display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:12px}.legend-dot{width:12px;height:12px;border-radius:50%;display:inline-block}.legend-dot.eligible{background:#5ca68f}.legend-dot.blocked{background:#d98d4e}.portal-text-label{display:flex;flex-direction:column;gap:7px;color:#334f5e;font-weight:700}.portal-text-label textarea,.portal-message-compose textarea{width:100%;resize:vertical;border:1px solid #cddce1;border-radius:10px;padding:11px;font:inherit;background:#fff}.portal-thread{height:470px;overflow:auto;padding:10px;border:1px solid #dbe6e9;border-radius:12px;background:#f8fbfc}.portal-thread-empty{display:grid;place-items:center;height:100%;color:#80909a}.portal-message{max-width:86%;margin:7px 0;padding:10px 12px;border-radius:13px;background:#fff;border:1px solid #e2eaed}.portal-message.student{margin-right:auto;background:#eef8f6;border-color:#cce4de}.portal-message.staff{margin-left:auto;background:#eef3f9;border-color:#d4deeb}.portal-message time{display:block;color:#87959d;font-size:.72rem;margin-top:5px}.portal-request-card{margin:10px 0;border:1px solid #cbdde2;border-radius:12px;padding:12px;background:#fff}.portal-request-card header{display:flex;justify-content:space-between;gap:8px;align-items:center}.portal-request-card h4{margin:0;color:#203f50}.portal-request-card .status{border-radius:999px;padding:3px 8px;background:#edf3f6;color:#496271;font-size:.75rem}.portal-request-card ul{margin:7px 0;padding-right:20px;color:#566d79}.portal-request-card .revision{font-size:.75rem;color:#8b5f35;background:#fff4e9;border-radius:8px;padding:5px 7px;margin-top:8px}.portal-message-compose{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:10px}.portal-staff-request-toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:12px}.portal-staff-request-toolbar label{display:flex;flex-direction:column;gap:5px;color:#526977;font-size:.84rem}.portal-staff-request-toolbar input,.portal-staff-request-toolbar select{border:1px solid #cfdde2;border-radius:9px;padding:8px;background:#fff}.portal-request-list{max-height:590px;overflow:auto}.portal-request-list-item{border:1px solid #dce7ea;border-radius:11px;padding:10px;margin-bottom:8px;cursor:pointer;background:#fff}.portal-request-list-item:hover,.portal-request-list-item.is-active{border-color:#0b7b83;background:#f0f9f8}.portal-request-list-item b{display:flex;justify-content:space-between;gap:8px;color:#254557}.portal-request-list-item small{display:block;color:#748691;margin-top:5px}.portal-request-actions{padding:10px 0;display:flex;gap:8px;flex-wrap:wrap}.portal-table-wrap{overflow:auto}.portal-table{width:100%;border-collapse:collapse;min-width:760px}.portal-table th,.portal-table td{padding:9px 10px;border-bottom:1px solid #e5ecef;text-align:right;vertical-align:top}.portal-table th{font-size:.78rem;color:#607683;background:#f7fafb;position:sticky;top:0}.portal-table td{font-size:.84rem;color:#2e4a5a}.portal-table .row-actions{display:flex;gap:5px;flex-wrap:wrap}.portal-table button{font:inherit;border:1px solid #c8d9df;border-radius:7px;padding:5px 7px;background:#fff;cursor:pointer}.portal-table button:hover{border-color:#0b7b83}.portal-service-settings{display:flex;flex-direction:column;gap:10px}.portal-service-row{border:1px solid #dae6e9;border-radius:12px;padding:12px;background:#fff}.portal-service-row header{display:flex;justify-content:space-between;align-items:center;gap:10px}.portal-service-row textarea{width:100%;margin-top:8px;border:1px solid #d2e0e4;border-radius:9px;padding:8px;font:inherit}.portal-check{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important}.portal-admin-panel{margin-top:16px}.portal-admin-panel .card{margin-bottom:16px}.portal-countdown{font-size:1.7rem;font-weight:800;color:#a25f12;margin-top:8px}.portal-alert-turn{animation:portalPulse 1.1s infinite}.portal-ticket-card.near{border-color:#d99a3e;background:#fff9ef}.portal-ticket-card.turn{border-color:#b72c2c;background:#fff0f0}.portal-ticket-card.turn .portal-ticket-number{color:#a22121}@keyframes portalPulse{50%{box-shadow:0 0 0 7px rgba(183,44,44,.08)}}@media(max-width:980px){.portal-requests-layout{grid-template-columns:1fr}.portal-thread{height:390px}}@media(max-width:820px){.portal-module-grid{grid-template-columns:1fr}.portal-message-compose{grid-template-columns:1fr}.portal-ticket-number{font-size:2.4rem}}
.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;margin-top:12px}.permission-grid .portal-check{padding:10px 12px;border:1px solid var(--line,#dfe5ec);border-radius:10px;background:var(--surface,#fff)}.portal-dialog{width:min(520px,calc(100vw - 28px));border:0;border-radius:18px;padding:22px;box-shadow:0 24px 70px rgba(15,23,42,.28);direction:rtl}.portal-dialog::backdrop{background:rgba(15,23,42,.55);backdrop-filter:blur(3px)}.portal-dialog form{display:grid;gap:14px}.portal-dialog label{display:grid;gap:6px;font-weight:700}.portal-dialog input{width:100%}.muted{color:var(--muted,#64748b);margin:0}.portal-service-row textarea{width:100%}

.portal-assign-row{display:flex;gap:8px;align-items:center;flex:1 1 100%;padding:8px 0}.portal-assign-row select{min-width:230px;max-width:100%;border:1px solid #cfdde2;border-radius:9px;padding:8px;background:#fff;font:inherit}
.sa-phone-input{display:flex;align-items:stretch;border:1px solid #cbd9df;border-radius:10px;background:#fff;overflow:hidden;direction:ltr}.sa-phone-input span{display:flex;align-items:center;padding:0 12px;background:#eef5f6;border-right:1px solid #d7e3e7;color:#345968;font-weight:800;letter-spacing:.02em}.sa-phone-input input{border:0!important;border-radius:0!important;box-shadow:none!important;direction:ltr;text-align:left;min-width:0;flex:1}.field-help{display:block;margin-top:5px;color:#71848e;font-size:.78rem;font-weight:500}.term-setup-hero{display:flex;justify-content:space-between;gap:22px;align-items:center;padding:22px 24px;margin-bottom:16px;border:1px solid #cfe0e4;border-radius:18px;background:linear-gradient(135deg,#f8fcfc,#eef7f5)}.term-setup-hero h2{margin:4px 0 6px;color:#173e50}.term-setup-hero p{margin:0;max-width:760px;color:#607783;line-height:1.85}.term-live-badge{min-width:210px;background:#fff;border:1px solid #cfe0e4;border-radius:14px;padding:14px 16px}.term-live-badge small{display:block;color:#768b95;margin-bottom:4px}.term-live-badge b{display:block;color:#0b5867}.term-setup-grid{align-items:stretch}.term-step-card{position:relative;padding-top:28px}.step-number{position:absolute;top:-11px;right:18px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#0b5867;color:#fff;font-weight:800;box-shadow:0 5px 13px rgba(11,88,103,.18)}.file-contract{display:flex;flex-direction:column;gap:4px;margin:12px 0;padding:11px 12px;border-radius:10px;background:#f3f8f9;color:#55707d;font-size:.84rem}.file-contract b{color:#1c4e60}.term-setup-result{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;min-height:88px}.term-result-stat{padding:13px;border:1px solid #dbe7ea;border-radius:12px;background:#fbfdfd}.term-result-stat b{display:block;font-size:1.35rem;color:#173f52}.term-result-stat span{display:block;color:#70858f;font-size:.8rem;margin-top:2px}.term-result-stat.good{background:#f2faf7;border-color:#c9e3d9}.term-result-stat.bad{background:#fff6f2;border-color:#edd3c6}.term-issue-list{grid-column:1/-1;border:1px solid #ecd2c5;border-radius:11px;background:#fff8f4;padding:10px 12px}.term-issue-list b{color:#93461b}.term-issue-list ul{margin:8px 0 0;padding-right:20px;color:#765b4b}.portal-term-list{display:grid;gap:10px}.portal-term-card{display:grid;grid-template-columns:minmax(200px,1fr) auto;gap:14px;align-items:center;border:1px solid #dce7ea;border-radius:13px;padding:13px 15px;background:#fff}.portal-term-card.is-open{border-color:#87c7ba;background:#f2fbf8}.portal-term-card.is-ready{border-color:#bdd8df;background:#f8fcfd}.portal-term-card.is-attention{border-color:#edc8b4;background:#fff8f4}.portal-term-card h3{margin:0 0 4px;color:#244757}.portal-term-card small{color:#71858f}.term-status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;background:#edf3f5;color:#546b78;font-size:.76rem;font-weight:800}.portal-term-card.is-open .term-status-pill{background:#dcefe9;color:#176451}.portal-term-card.is-attention .term-status-pill{background:#f8e5d8;color:#984b1a}.brand-uploaded-logo{width:100%;height:100%;object-fit:contain}.branding-logo-preview{width:82px;height:82px;border-radius:16px;border:1px solid #d6e4e8;background:#f8fbfc;display:grid;place-items:center;overflow:hidden;font-size:2rem}.branding-logo-preview img{max-width:100%;max-height:100%;object-fit:contain}.brand-admin-row{display:flex;gap:16px;align-items:center;margin:14px 0}.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;margin-top:10px}.compact-subnav.wrap{flex-wrap:wrap}.eyebrow{font-size:.75rem;font-weight:800;color:#0b7b83;letter-spacing:.02em}@media(max-width:720px){.term-setup-hero{align-items:stretch;flex-direction:column}.term-live-badge{min-width:0}.portal-term-card{grid-template-columns:1fr}.brand-admin-row{align-items:flex-start;flex-direction:column}}

/* V13.1 refinement: transparent logos always sit on a neutral white canvas. */
.launch-mark,.brand-logo{background:#fff!important}
.launch-mark .brand-uploaded-logo,.brand-logo .brand-uploaded-logo{background:#fff;padding:6px;box-sizing:border-box;border-radius:inherit}
.branding-logo-preview{background:#fff!important}
.branding-logo-preview img{background:#fff;padding:6px;box-sizing:border-box}
.student-login-mode{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:3px 0 8px}.student-login-mode button{border:1px solid #cbd9df;background:#f7fafb;color:#46606e;border-radius:9px;padding:8px 10px;font:inherit;font-weight:750;cursor:pointer}.student-login-mode button.is-active{background:#e6f3f1;border-color:#83beb6;color:#0b5867}.active-asset-card{min-height:82px;border:1px solid #d5e3e7;border-radius:12px;background:#fbfdfd;padding:13px;display:flex;align-items:center}.active-asset-card .asset-ready,.active-asset-card .asset-missing{display:flex;flex-direction:column;gap:4px;width:100%}.active-asset-card .asset-ready b{color:#176451}.active-asset-card .asset-missing b{color:#93461b}.active-asset-card span,.active-asset-card small{color:#6b808b}.button-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.term-result-stat.attention{background:#fff9eb;border-color:#ead59b}.term-status-pill.fallback-login{background:#fff1cf;color:#7c5910}.term-issue-list.success{border-color:#c9e3d9;background:#f2faf7}.term-issue-list.success b{color:#176451}.term-issue-list p{margin:8px 0;color:#765b4b}
@media(max-width:620px){.student-login-mode{grid-template-columns:1fr}.active-asset-card{min-height:0}}

/* V13.2 product UX hardening */
.portal-boot-gate{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;background:#f4f7f9;direction:rtl}.portal-boot-gate.is-hidden{display:none}.portal-boot-card{min-width:230px;padding:22px 26px;border:1px solid #d7e4e8;border-radius:18px;background:#fff;box-shadow:0 18px 50px rgba(25,61,78,.10);display:grid;justify-items:center;gap:7px;color:#496472}.portal-boot-card b{color:#173f52;font-size:1.05rem}.portal-boot-card span{font-size:.84rem}.portal-boot-mark{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#e8f4f3;color:#0b5867;font-size:1.25rem}.portal-boot-card i{width:100%;height:3px;border-radius:999px;overflow:hidden;background:#e4ecef;position:relative}.portal-boot-card i:after{content:"";position:absolute;inset-block:0;width:42%;border-radius:inherit;background:#0b7b83;animation:portalBootProgress 1s ease-in-out infinite}@keyframes portalBootProgress{0%{right:-40%}50%{right:35%}100%{right:100%}}
.portal-body.portal-booting>.environment-ribbon,.portal-body.portal-booting>.portal-shell,.portal-body.portal-booting>.auth-gate{visibility:hidden}.portal-body:not(.portal-booting)>.portal-boot-gate{display:none}
.staff-student-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 10px}.staff-student-summary>div{padding:10px 12px;border:1px solid #d7e5e8;border-radius:11px;background:#f7fbfb;min-width:0}.staff-student-summary span{display:block;color:#748892;font-size:.75rem;margin-bottom:3px}.staff-student-summary b{display:block;color:#173f52;overflow-wrap:anywhere}.staff-student-summary>div:nth-child(2){background:#eef8f6;border-color:#c8e1dc}.staff-student-summary>div:nth-child(2) b{font-size:1.08rem;color:#0b5867;letter-spacing:.03em}.compact-empty{height:auto!important;min-height:58px;grid-column:1/-1}
.message-request-link{display:block;width:max-content;max-width:100%;margin:5px 0 7px;padding:3px 7px;border-radius:7px;background:rgba(11,88,103,.08);color:#4f6e7c;font-size:.72rem;font-weight:700}
.portal-request-actions{display:grid;gap:10px;border-top:1px solid #e4ecef;margin-top:10px}.request-action-state{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 11px;border-radius:10px;background:#f4f8f9}.request-action-state span{color:#6c808a;font-size:.78rem}.request-action-state b{color:#17495a}.request-primary-actions{display:flex;gap:8px;flex-wrap:wrap}.request-more-actions{border:1px solid #e2e9eb;border-radius:10px;padding:8px 10px;background:#fafcfc}.request-more-actions summary{cursor:pointer;color:#617783;font-weight:700}.request-more-actions>div{display:flex;gap:8px;flex-wrap:wrap;padding-top:9px}.portal-assign-row{padding:0}.portal-assign-row select{flex:1}
.portal-service-settings{gap:14px}.portal-service-row{padding:15px;border-width:1px;transition:border-color .15s,box-shadow .15s}.portal-service-row.is-enabled{border-color:#b9dcd3;box-shadow:inset 3px 0 #4f9b88}.portal-service-row.is-disabled{border-color:#ead7cc;box-shadow:inset 3px 0 #c77843}.portal-service-row header>div{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.service-state-pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;font-size:.73rem;font-weight:800}.service-state-pill.is-on{background:#e4f3ee;color:#176451}.service-state-pill.is-off{background:#faeadd;color:#914719}.service-toggle{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;font-size:.8rem;color:#526b77;cursor:pointer}.service-toggle input{position:absolute;opacity:0;pointer-events:none}.service-toggle>span{width:42px;height:23px;border-radius:999px;background:#c8d4d9;position:relative;transition:.18s}.service-toggle>span:after{content:"";position:absolute;width:17px;height:17px;top:3px;right:3px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.18);transition:.18s}.service-toggle input:checked+span{background:#27816e}.service-toggle input:checked+span:after{right:22px}.service-toggle em{font-style:normal;font-weight:800}.service-disabled-message{margin-top:12px;padding:10px;border-radius:10px;background:#fff8f3;border:1px solid #efded2}.service-disabled-message label{display:grid;gap:6px;color:#6f5547;font-size:.82rem;font-weight:700}.inline-validation{margin-top:9px;padding:8px 10px;border-radius:9px;font-size:.8rem}.inline-validation.error{background:#fff1ed;border:1px solid #efcabe;color:#984523}.inline-validation.warning{background:#fff8e7;border:1px solid #ead69d;color:#775c16}
.queue-state-card{display:grid;gap:4px;padding:12px 13px;border-radius:11px;border:1px solid #d9e5e8;background:#f7fafb}.queue-state-card b{font-size:.95rem}.queue-state-card span{color:#657b86;font-size:.8rem;line-height:1.6}.queue-state-card.state-open{background:#eff9f5;border-color:#bfe0d4}.queue-state-card.state-open b{color:#176451}.queue-state-card.state-scheduled{background:#f2f7fb;border-color:#cddce8}.queue-state-card.state-scheduled b{color:#315e7e}.queue-state-card.state-paused,.queue-state-card.state-ended,.queue-state-card.state-full{background:#fff7ee;border-color:#ead7bd}.queue-state-card.state-paused b,.queue-state-card.state-ended b,.queue-state-card.state-full b{color:#865116}.queue-state-card.state-invalid,.queue-state-card.state-not_configured,.queue-state-card.state-no_open_term{background:#fff2ee;border-color:#eccdc1}.queue-state-card.state-invalid b,.queue-state-card.state-not_configured b,.queue-state-card.state-no_open_term b{color:#924529}
.account-status{display:inline-flex;border-radius:999px;padding:4px 8px;font-size:.74rem;font-weight:800}.account-status.is-active{background:#e3f3ed;color:#176451}.account-status.is-disabled{background:#fae8df;color:#8b421e}.login-ready{display:block;margin-top:4px;color:#4b7f6f}.danger-soft,.success-soft{font-weight:750}.danger-soft{color:#9a4325!important;border-color:#e5c5b8!important;background:#fff8f4!important}.success-soft{color:#176451!important;border-color:#badccc!important;background:#f3fbf8!important}.row-actions button:disabled,.primary-button:disabled,.secondary-button:disabled,.quiet-button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:820px){.context-bar{align-items:center;gap:7px;padding-block:7px}.context-chips{order:3;flex-basis:100%;display:flex;gap:5px;overflow-x:auto;white-space:nowrap;padding-bottom:2px}.context-chips span{font-size:.68rem}.header-actions{gap:5px;margin-inline-start:auto;flex-wrap:nowrap!important}.header-actions button,.header-actions a{padding:7px 8px;font-size:.76rem}.portal-actor-card{margin-top:8px}.staff-student-summary{grid-template-columns:1fr 1fr}.staff-student-summary>div:last-child{grid-column:1/-1}.portal-request-actions{position:sticky;bottom:0;background:#fff;padding:10px 0;z-index:2}.portal-staff-request-toolbar{display:grid;grid-template-columns:1fr 1fr}.portal-staff-request-toolbar label{min-width:0}.portal-staff-request-toolbar button{align-self:end}}
@media(max-width:560px){.environment-ribbon{font-size:.66rem}.context-bar{min-height:56px}.header-actions #refreshPortal{display:none}.header-actions #schedulerShortcut{display:none}.header-actions .quiet-button{white-space:nowrap}.staff-student-summary{grid-template-columns:1fr}.staff-student-summary>div:last-child{grid-column:auto}.portal-staff-request-toolbar{grid-template-columns:1fr}.portal-table .row-actions{min-width:180px}.portal-service-row header{align-items:flex-start}.portal-service-row header>div{align-items:flex-start;flex-direction:column}.request-primary-actions>*{flex:1 1 45%}.portal-assign-row{display:grid;grid-template-columns:1fr auto}.portal-assign-row select{min-width:0}}
.login-not-ready{display:block;margin-top:4px;color:#94502c;font-size:.72rem}

/* V13.3 Admin & Student UX Refinement */
:root{--portal-border:#c7d8df;--portal-border-strong:#9fc2c8;--portal-soft:#f5f9fa;--portal-text-muted:#607885;--portal-focus:rgba(12,124,132,.15)}
.portal-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.portal-body select,.portal-body textarea{border:1px solid var(--portal-border)!important;background:#fff;border-radius:10px;min-height:42px;padding:9px 11px;color:#173f52;box-shadow:none;transition:border-color .15s,box-shadow .15s,background .15s}
.portal-body textarea{min-height:82px;line-height:1.65;resize:vertical}
.portal-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.portal-body select:focus,.portal-body textarea:focus{outline:0;border-color:#53a8a4!important;box-shadow:0 0 0 3px var(--portal-focus);background:#fff}
.portal-body input:disabled,.portal-body select:disabled,.portal-body textarea:disabled{background:#f1f5f6;color:#7d9098;cursor:not-allowed}
.portal-body label{gap:6px}.field-help{display:block;color:#6d818c;font-size:.75rem;line-height:1.55;font-weight:500}.field-help b{color:#315c6d}.portal-auth-panel .auth-form label{font-weight:750;color:#193e50}.portal-auth-panel .auth-form input{min-height:48px;font-size:1rem}.sa-phone-input{border:1px solid var(--portal-border);border-radius:10px;overflow:hidden;background:#fff;display:flex;align-items:stretch}.sa-phone-input:focus-within{border-color:#53a8a4;box-shadow:0 0 0 3px var(--portal-focus)}.sa-phone-input span{display:grid;place-items:center;padding:0 13px;background:#f1f7f8;color:#315b6b;font-weight:800;border-inline-end:1px solid var(--portal-border)}.sa-phone-input input{border:0!important;border-radius:0!important;box-shadow:none!important;flex:1;min-width:0}
.primary-button,.secondary-button,.quiet-button,.danger-button{min-height:38px;padding:8px 14px;font-size:.86rem;line-height:1.2;border-radius:10px}.primary-button{font-weight:800}.compact-primary{min-height:36px;padding:7px 13px;font-size:.82rem}.action-row{gap:8px}.card .action-row{margin-top:12px}.row-actions{gap:5px}.row-actions button{min-height:32px;padding:6px 9px;font-size:.76rem;border-radius:8px}
.global-action-status{position:fixed;top:14px;left:50%;transform:translateX(-50%);z-index:2900;display:flex;align-items:center;gap:9px;padding:9px 14px;border:1px solid #c1ddd9;border-radius:999px;background:#f2faf8;color:#185f58;box-shadow:0 8px 26px rgba(31,77,89,.14);font-size:.78rem}.global-action-status.is-error{background:#fff2ee;border-color:#edc9bd;color:#91411f}.mini-spinner{width:15px;height:15px;border-radius:50%;border:2px solid #b9d8d3;border-top-color:#167a72;animation:portalSpin .7s linear infinite}@keyframes portalSpin{to{transform:rotate(360deg)}}
.operation-status{margin-top:10px;padding:9px 11px;border-radius:9px;font-size:.78rem;line-height:1.6}.operation-status.is-success{background:#eff9f5;border:1px solid #c2dfd5;color:#176451}.operation-status.is-error{background:#fff1ed;border:1px solid #ebc9bd;color:#93451f}.inline-validation.success{background:#eff9f5;border:1px solid #c2dfd5;color:#176451}
.portal-dialog{width:min(540px,calc(100vw - 28px));max-height:min(84vh,760px);border:0;border-radius:18px;padding:0;box-shadow:0 24px 80px rgba(18,48,61,.24);background:#fff;color:#173f52}.portal-dialog::backdrop{background:rgba(11,36,48,.44);backdrop-filter:blur(2px)}.portal-dialog form{padding:22px;display:grid;gap:13px;overflow:auto;max-height:inherit}.portal-dialog.wide-dialog{width:min(820px,calc(100vw - 28px))}.portal-dialog .card-title{margin-bottom:0}.portal-dialog .dialog-message{margin:0;padding:12px;border-radius:10px;background:#f5f9fa;color:#405f6e;line-height:1.7}.portal-dialog .permission-grid{max-height:48vh;overflow:auto;padding:4px}.portal-dialog input,.portal-dialog select,.portal-dialog textarea{width:100%}
.maintenance-gate{position:fixed;inset:0;z-index:3100;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 72% 15%,#d9f0ef 0,transparent 30%),linear-gradient(145deg,#f7fbfc,#edf4f6)}.maintenance-card{width:min(580px,100%);padding:34px;border:1px solid #d0e1e5;border-radius:24px;background:#fff;box-shadow:0 24px 70px rgba(24,61,77,.15);display:grid;justify-items:center;text-align:center;gap:12px}.maintenance-logo{width:82px;height:82px;border-radius:22px;background:#fff;border:1px solid #d9e7e9;display:grid;place-items:center;overflow:hidden;box-shadow:0 8px 25px rgba(31,75,88,.08);font-size:2rem}.maintenance-logo img{width:100%;height:100%;object-fit:contain;padding:8px;box-sizing:border-box;background:#fff}.maintenance-kicker{padding:5px 10px;border-radius:999px;background:#fff3db;color:#7d5a13;font-size:.75rem;font-weight:800}.maintenance-card h1{margin:2px 0 0;color:#173f52;font-size:1.75rem}.maintenance-card p{margin:0;max-width:46ch;color:#5d7581;line-height:1.8}.maintenance-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:center;margin-top:5px}.maintenance-card>small{color:#82949d}
.portal-service-row{display:grid;gap:11px}.portal-service-row header{display:flex;align-items:center;justify-content:space-between;gap:12px}.service-description{margin:0;color:#536f7c;line-height:1.75;font-size:.86rem}.service-runtime-note{padding:8px 10px;border-radius:9px;background:#f5f9fa;color:#607985;font-size:.78rem;line-height:1.6}.service-state-pill.is-waiting{background:#eef3fa;color:#4c6884}.service-availability{display:grid;gap:10px;border:1px solid #d8e5e8;border-radius:11px;padding:11px;background:#fbfdfd}.availability-choice{display:flex;gap:8px;flex-wrap:wrap}.availability-choice label{display:flex;align-items:center;gap:6px;padding:8px 11px;border:1px solid #d0dfe3;border-radius:9px;background:#fff;cursor:pointer;font-size:.8rem;font-weight:750}.availability-choice input{accent-color:#177d78}.service-schedule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.service-schedule-grid label{font-size:.78rem;color:#536d79}.service-subsettings{margin-top:16px;padding-top:15px;border-top:1px solid #e0e9eb}.service-subsettings h3{margin:0 0 4px}.queue-config-card{margin-top:14px}.queue-config-card .form-grid,.service-subsettings .form-grid{align-items:start}
.page-section-intro{display:flex;justify-content:space-between;gap:12px;margin:2px 0 14px;padding:13px 15px;border:1px solid #dbe7ea;border-radius:12px;background:#f9fbfc}.page-section-intro h2{margin:0 0 4px}.page-section-intro p{margin:0;color:#607885;line-height:1.65}.admin-employee-intro,.student-directory-summary{margin-bottom:12px}
.settings-groups{display:grid;gap:14px}.settings-group{border:1px solid #d7e4e8;border-radius:14px;background:#fbfdfd;padding:15px}.settings-group-head{margin-bottom:12px}.settings-group-head h3{margin:0 0 4px;font-size:1rem}.settings-group-head p{margin:0;color:#6a808b;font-size:.8rem;line-height:1.65}.settings-group .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.setting-check{align-self:end;min-height:42px;padding:10px 11px;border:1px solid #d8e5e8;border-radius:10px;background:#fff}.setting-check span{display:grid;gap:2px}.setting-check small{font-weight:500;color:#71858f}.danger-zone-card{border-color:#edcbbf;background:#fffafa}
.student-directory-top{display:grid;grid-template-columns:minmax(160px,230px) 1fr;gap:12px;margin-bottom:14px}.student-total-card{padding:16px;border:1px solid #cbe0dd;border-radius:13px;background:#f0f8f6;display:grid;gap:3px}.student-total-card span{font-size:.78rem;color:#638078}.student-total-card b{font-size:1.7rem;color:#155e58}.manual-student-card{border:1px solid #d8e5e8;border-radius:14px;background:#fbfdfd;padding:15px}.manual-student-card h3{margin:0 0 4px}.manual-student-card>p{margin:0 0 12px;color:#667e89;font-size:.8rem}.manual-student-card .form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.manual-student-card .wide-field{grid-column:span 2}
.message-guidance{display:grid;gap:3px;margin:8px 0;padding:10px 11px;border:1px solid #d8e4e8;border-radius:10px;background:#f7fafb;color:#526f7c;font-size:.79rem;line-height:1.6}.message-guidance b{color:#31596a}.message-guidance.warning{background:#fff8e9;border-color:#ead7a0;color:#725c21}.message-guidance.warning b{color:#705617}.module-card-top{display:flex;align-items:center;justify-content:space-between;gap:9px}.module-runtime{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:.7rem;font-weight:800}.module-runtime.is-open{background:#e5f4ef;color:#176451}.module-runtime.is-scheduled{background:#eef3fa;color:#416381}.module-runtime.is-off{background:#f8e9df;color:#8c471f}.module-description{color:#4f6e7c!important;line-height:1.65!important}.portal-module-card.is-scheduled{border-color:#cfdce7;background:#f9fbfd}
.permission-grid label{border:1px solid #d8e5e8;border-radius:10px;background:#fafcfc;padding:10px;display:flex;align-items:flex-start;gap:8px;line-height:1.45}.permission-grid input{margin-top:3px;accent-color:#147d75}.permission-action{font-weight:800;color:#175d69!important;border-color:#b8d7db!important;background:#f3fafb!important}
.portal-table-wrap{overflow:auto}.staff-accounts-table{min-width:980px}.staff-accounts-table th,.staff-accounts-table td{vertical-align:middle}.portal-table input,.portal-table select{min-height:34px}.portal-table code{white-space:normal;overflow-wrap:anywhere}
.portal-admin-panel>.dashboard-grid{align-items:start}.portal-admin-panel .card{min-width:0}.portal-admin-panel .form-grid{align-items:start}
.auth-gate .launch-panel{overflow:visible}.portal-auth-switch button{min-height:42px}.portal-auth-section .action-row{margin-top:6px}
@media(max-width:900px){.settings-group .form-grid,.manual-student-card .form-grid{grid-template-columns:1fr 1fr}.student-directory-top{grid-template-columns:1fr}.manual-student-card .wide-field{grid-column:span 2}.service-schedule-grid{grid-template-columns:1fr}}
@media(max-width:620px){.maintenance-card{padding:25px 18px;border-radius:19px}.maintenance-card h1{font-size:1.4rem}.maintenance-actions>*{width:100%}.settings-group .form-grid,.manual-student-card .form-grid{grid-template-columns:1fr}.manual-student-card .wide-field{grid-column:auto}.global-action-status{top:8px;width:calc(100vw - 24px);justify-content:center;box-sizing:border-box}.portal-dialog form{padding:17px}.portal-service-row header{align-items:flex-start}.availability-choice{display:grid;grid-template-columns:1fr 1fr}.availability-choice label{justify-content:center}.portal-auth-panel .auth-form input{font-size:16px}.student-login-mode{grid-template-columns:1fr 1fr}}
/* Clickable-disabled action: communicates why the student cannot send yet. */
button.is-action-disabled{opacity:.58;cursor:not-allowed;filter:saturate(.55)}
button.is-action-disabled:hover{transform:none;box-shadow:none}

/* V13.4 — shared typography, bilingual layout and operational clarity */
@font-face{font-family:'DIN Next LT Arabic';src:url('fonts/DINNextLTArabic-Light.ttf') format('truetype');font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:'DIN Next LT Arabic';src:url('fonts/DINNextLTArabic-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'DIN Next LT Arabic';src:url('fonts/DINNextLTArabic-Medium.ttf') format('truetype');font-weight:600 900;font-style:normal;font-display:swap}
.portal-body,.portal-body input,.portal-body select,.portal-body textarea,.portal-body button,.portal-dialog{font-family:'DIN Next LT Arabic','Cairo','Tahoma','Arial',sans-serif!important}
.portal-dialog{direction:inherit}
.language-bar{display:flex;justify-content:flex-start;margin:0 0 8px}.language-toggle{min-height:34px;padding:6px 12px;border:1px solid #bfd6dc;border-radius:999px;background:#fff;color:#155e68;font:inherit;font-size:.78rem;font-weight:800;cursor:pointer}.language-toggle:hover{border-color:#5ba8a4;background:#f2faf9}.header-language{margin-inline-end:2px}
.portal-body input:not([type=checkbox]):not([type=radio]),.portal-body select,.portal-body textarea{outline:none;border:1px solid #bfd2d8!important;background:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
.portal-body label:focus-within{color:#155e68}.portal-body input:focus,.portal-body select:focus,.portal-body textarea:focus{border-color:#298f89!important;box-shadow:0 0 0 3px rgba(41,143,137,.13)!important}
.availability-period{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:4px}.availability-period>span{display:flex;align-items:center;gap:5px;padding:9px 10px;border-radius:10px;font-size:.8rem;line-height:1.45}.availability-start{background:#eaf8f3;color:#176451;border:1px solid #c4e5d8}.availability-end{background:#fff4e8;color:#8a4f18;border:1px solid #efd2ae}.availability-period b{font-weight:850}
.service-destination{display:grid;gap:4px;margin:0 0 12px;padding:12px 14px;border-radius:12px;background:#e8f7f4;border:1px solid #b9ded6;color:#175e58}.service-destination b{font-size:1.05rem}.service-destination span{font-size:.88rem;color:#416c69}
.active-request-lock{margin-bottom:12px;padding:14px 16px;border:1px solid #bcd9d8;border-radius:13px;background:#eef8f7;display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center;color:#284f5c}.active-request-lock b{color:#145f5a;font-size:1rem}.active-request-lock span{font-size:.84rem}.active-request-lock button{grid-column:2;grid-row:1/span 2}
.request-staff-meta,.request-completed-by{margin-top:8px;padding:7px 9px;border-radius:8px;font-size:.78rem}.request-staff-meta{background:#f4f8fa;color:#506b78}.request-completed-by{background:#eaf8f2;color:#176451;font-weight:800}
.service-queue-controls{display:grid;grid-template-columns:minmax(180px,280px) minmax(260px,1fr);gap:10px;align-items:end;padding:11px;border:1px solid #d8e5e8;border-radius:11px;background:#fbfdfd}.service-queue-controls>label:first-child{display:grid;gap:6px;font-size:.8rem;color:#536d79}.service-queue-controls .portal-check{min-height:42px;padding:9px 11px;border:1px solid #d8e5e8;border-radius:10px;background:#fff}
.employee-performance-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}.employee-performance-item{border:1px solid #d6e4e7;border-radius:13px;background:#fbfdfd;padding:13px}.employee-performance-item header{display:flex;justify-content:space-between;gap:8px;align-items:start;margin-bottom:10px}.employee-performance-item header b{color:#183f50}.employee-performance-item header span{font-size:.74rem;color:#67808b}.employee-performance-item>div{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.employee-performance-item>div span{display:grid;gap:2px;text-align:center;padding:8px 5px;border-radius:9px;background:#f0f6f7;color:#657b85;font-size:.7rem}.employee-performance-item strong{font-size:1.08rem;color:#165e67}
.queue-ticket-actions .is-hidden{display:none!important}.manager-only-card.is-hidden{display:none!important}
.portal-service-row .service-runtime-note:empty{display:none}.portal-admin-panel .page-section-intro:has(p:empty){padding-block:9px}
html[dir=ltr] .portal-table th,html[dir=ltr] .portal-table td{text-align:left}html[dir=ltr] .portal-message.student{margin-left:auto;margin-right:0}html[dir=ltr] .portal-message.staff{margin-right:auto;margin-left:0}html[dir=ltr] .portal-request-card ul{padding-left:20px;padding-right:0}html[dir=ltr] .step-number{left:18px;right:auto}html[dir=ltr] .sa-phone-input span{border-left:0;border-right:1px solid var(--portal-border)}
html[dir=ltr] .portal-body{direction:ltr}html[dir=rtl] .portal-body{direction:rtl}
@media(max-width:700px){.availability-period,.service-queue-controls{grid-template-columns:1fr}.active-request-lock{grid-template-columns:1fr}.active-request-lock button{grid-column:auto;grid-row:auto;width:100%}.employee-performance-item>div{grid-template-columns:repeat(2,1fr)}}


/* V13.4R6 — requests, queue context, and safe chat attachments */
.student-context-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 15px;margin:0 0 14px;border:1px solid #cfe5e4;border-radius:15px;background:#f2fbfa;color:#244b50}
.student-context-summary span{display:flex;gap:7px;align-items:baseline;font-weight:700}.student-context-summary b{font-size:20px;color:#087f7b}.student-context-summary small{color:var(--ink-muted,#61738a)}
.message-guidance.info{border-color:#bfdbfe;background:#eff6ff;color:#1e4f8b}.message-guidance.info b{display:block;margin-bottom:4px}
.message-attachment-tools{display:grid;gap:7px;min-width:230px;align-content:start}.attachment-picker{display:inline-flex!important;align-items:center;justify-content:center;cursor:pointer;width:max-content}.message-attachment-tools>small{color:var(--ink-muted,#61738a);font-size:11px}
.attachment-selection{display:flex;gap:6px;flex-wrap:wrap}.attachment-empty{font-size:11px;color:var(--ink-muted,#61738a)}.selected-attachment{display:grid;grid-template-columns:1fr auto;gap:2px 8px;align-items:center;max-width:280px;padding:7px 9px;border:1px solid #dce6ef;background:#f8fafc;border-radius:10px}.selected-attachment b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}.selected-attachment small{font-size:10px;color:var(--ink-muted,#61738a)}.selected-attachment button{grid-row:1/3;grid-column:2;border:0;background:transparent;color:#a92b45;font:inherit;font-size:11px;cursor:pointer}
.message-attachments{margin-top:9px;padding-top:8px;border-top:1px solid rgba(100,120,140,.18);display:grid;gap:7px}.message-attachments>b{font-size:11px;color:var(--ink-muted,#61738a)}.message-attachments>div{display:flex;flex-wrap:wrap;gap:8px}.message-attachment{color:inherit;text-decoration:none;border:1px solid #dbe6ee;border-radius:12px;background:#fff;overflow:hidden;max-width:260px}.message-attachment.image{display:grid}.message-attachment.image img{display:block;width:180px;height:120px;object-fit:cover;background:#eef3f6}.message-attachment.image span{font-size:10px;padding:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-attachment.file{display:flex;align-items:center;gap:7px;padding:9px}.message-attachment.file b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.request-queue-position{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 9px;background:#edf8ff;color:#205b7a;border:1px solid #cce5f4;font-size:11px}.request-queue-position b{font-size:inherit}
.service-request-controls{margin-top:12px;padding:12px;border:1px solid #dce8ef;border-radius:13px;background:#f8fbfd}.service-request-controls .portal-check span{display:grid;gap:3px}.service-request-controls small{color:var(--ink-muted,#61738a)}
@media(max-width:720px){.student-context-summary{align-items:flex-start;flex-direction:column}.portal-message-compose{grid-template-columns:1fr!important}.message-attachment-tools{min-width:0}.message-attachment.image img{width:150px;height:100px}}


/* V13.4R7 — unified request workspace, administration feedback and dialog polish */
.student-request-workspace{display:grid;gap:18px;min-height:0}.request-workspace-title{align-items:flex-start}.request-workspace-title>div{display:grid;gap:3px}.request-workspace-editor,.request-workspace-conversation{display:grid;gap:14px}.request-workspace-divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-weight:800;font-size:.88rem}.request-workspace-divider:before,.request-workspace-divider:after{content:"";height:1px;background:var(--line);flex:1}.request-attachment-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;align-items:center;padding:12px 14px;border:1px dashed #b9d4d7;border-radius:14px;background:#f8fcfc}.request-attachment-panel>div:first-child{display:grid;gap:3px}.request-attachment-panel>div:first-child small{color:var(--muted)}.request-attachment-panel .attachment-selection{grid-column:1/-1}.active-request-lock{align-items:center;justify-content:space-between;gap:14px}.active-request-lock>div{display:grid;gap:4px}.unified-compose{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}.unified-compose textarea{width:100%;min-height:92px}.compose-footer{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.compose-footer .message-attachment-tools{flex:1;min-width:0}.compose-send{min-width:112px}.selected-attachment{display:flex;align-items:center;justify-content:space-between;gap:10px}.selected-attachment>span{display:grid;min-width:0}.selected-attachment b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.operation-status{border-radius:12px;padding:10px 12px;border:1px solid #bcdeda;background:#f2fbf9;color:#155e63;font-weight:700}.operation-status.error{background:#fff3ef;border-color:#f1c6b9;color:#9b3425}.portal-dialog input[type="checkbox"],.portal-dialog input[type="radio"]{width:auto!important;min-height:0!important;inline-size:auto!important;block-size:auto!important}.portal-dialog .portal-check{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:start;gap:10px}.staff-accounts-table .row-actions{display:flex;flex-wrap:wrap;gap:6px}.staff-accounts-table td{vertical-align:top}.danger-zone-card .action-row{justify-content:flex-start}.portal-dialog .warning-box{line-height:1.7}.admin-loading-note{padding:12px;border-radius:12px;background:#f7fbfc;color:var(--muted)}
@media(max-width:760px){.request-attachment-panel{grid-template-columns:1fr}.request-attachment-panel .attachment-selection{grid-column:auto}.compose-footer{align-items:stretch;flex-direction:column}.compose-send{width:100%}.active-request-lock{align-items:stretch;flex-direction:column}}

/* V13.4R7 — denser administration forms and native-file-control cleanup */
.employee-create-card .form-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}.employee-create-card .form-grid>label:nth-child(5){grid-column:span 2}.employee-create-card .action-row{margin-top:4px}.branding-upload-tools{display:grid;gap:8px;align-content:start}.branding-upload-tools .attachment-picker{justify-self:start}.branding-upload-tools .hint{margin:0}.brand-admin-row{align-items:center}
@media(max-width:1050px){.employee-create-card .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.employee-create-card .form-grid>label:nth-child(5){grid-column:auto}}@media(max-width:700px){.employee-create-card .form-grid{grid-template-columns:1fr}}

/* R7 UI acceptance closure */
.portal-requests-layout{grid-template-columns:minmax(260px,330px) minmax(560px,1fr)!important;align-items:start}
.portal-requests-layout>article:last-child{min-width:0}.portal-request-list{max-height:720px}.portal-thread{height:min(60vh,640px);min-height:430px;padding:16px;background:linear-gradient(180deg,#fbfdfd,#f5f9fa)}
.portal-message{max-width:76%;padding:12px 14px;border-radius:16px;box-shadow:0 4px 15px rgba(31,72,88,.045)}
.message-sender{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:7px}.message-sender>b{font-size:.88rem;color:#1e4859}.message-sender>span{font-size:.68rem;padding:3px 7px;border-radius:999px;background:rgba(11,123,131,.09);color:#0b6a72;font-weight:800}.message-sender>small{margin-inline-start:auto;color:#80919a;font-size:.7rem}.message-body{line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.portal-message.student{margin-inline-start:auto!important;margin-inline-end:0!important;background:#eef9f6}.portal-message.staff{margin-inline-end:auto!important;margin-inline-start:0!important;background:#eef4fb}
.edit-conversation-paused{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #c8dcdf;border-radius:13px;background:#f5fafb}.edit-conversation-paused>div{display:grid;gap:3px}.edit-conversation-paused span{font-size:.78rem;color:#6b808b}.student-request-workspace.is-editing-request .request-workspace-divider{display:none}.student-request-workspace.is-editing-request .request-workspace-conversation{display:none}.student-request-workspace.is-editing-request.show-conversation-peek .request-workspace-divider{display:flex}.student-request-workspace.is-editing-request.show-conversation-peek .request-workspace-conversation{display:grid;animation:conversationReveal .18s ease-out}@keyframes conversationReveal{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.request-ownership-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:12px;margin:8px 0 12px}.request-ownership-banner>div{display:grid;gap:3px}.request-ownership-banner span{font-size:.77rem}.request-ownership-banner.warning{background:#fff7e8;border:1px solid #ead49c;color:#735814}.request-ownership-banner.success{background:#eef9f5;border:1px solid #bfe0d3;color:#176350}.request-ownership-banner.neutral{background:#f5f8fa;border:1px solid #d7e1e6;color:#536c79}.portal-message-compose.is-readonly{opacity:.62}.request-owner-chip{display:inline-flex;width:max-content;max-width:100%;margin:6px 0 1px;padding:3px 7px;border-radius:999px;font-size:.68rem;font-weight:800}.request-owner-chip.mine{background:#e4f5ef;color:#17624f}.request-owner-chip.other{background:#fff2d9;color:#7b5b12}.request-owner-chip.open{background:#edf2f5;color:#657782}
.admin-account-grid{align-items:stretch!important}.admin-account-grid>.card{display:flex;flex-direction:column;height:100%}.admin-account-grid>.card>.action-row{margin-top:auto;padding-top:14px}.inline-validation.success{display:block;background:#eef9f5;border:1px solid #bfe0d3;color:#176350;padding:10px 12px;border-radius:10px;margin-top:10px}
.sidebar .brand-card .badges{flex-wrap:wrap;align-items:flex-start}.sidebar .brand-card .badges b,.sidebar .brand-card .badges small{max-width:none!important;overflow:visible!important;text-overflow:clip!important;white-space:normal!important;line-height:1.35;text-align:center}.sidebar .brand-card .badges b{min-width:94px}.sidebar .brand-card .badges small:not(#sideVersion){min-width:74px}
@media(max-width:1100px){.portal-requests-layout{grid-template-columns:minmax(235px,300px) minmax(0,1fr)!important}.portal-message{max-width:84%}}
@media(max-width:820px){.portal-requests-layout{grid-template-columns:1fr!important}.portal-thread{height:430px;min-height:360px}.portal-message{max-width:92%}.edit-conversation-paused{align-items:stretch;flex-direction:column}}

/* V13.4R7 UI2 — request and conversation templates only. The surrounding portal layout is intentionally unchanged. */
.portal-conversation-thread{height:560px;min-height:420px;padding:16px;border:1px solid #d7e5e8;border-radius:16px;background:linear-gradient(180deg,#fbfdfd 0%,#f5f9fa 100%);scrollbar-gutter:stable;overscroll-behavior:contain}
.portal-conversation-thread>.chat-event{animation:chatEventIn .16s ease-out}
@keyframes chatEventIn{from{opacity:.4;transform:translateY(4px)}to{opacity:1;transform:none}}
.portal-message{max-width:min(78%,760px);margin:10px 0;padding:12px 14px;border-radius:17px;box-shadow:0 5px 18px rgba(27,67,82,.055);position:relative}
.portal-message.student{margin-inline-start:auto!important;margin-inline-end:0!important;background:#eaf8f4;border:1px solid #b8ded2;border-inline-end:4px solid #2c8e79}
.portal-message.staff{margin-inline-end:auto!important;margin-inline-start:0!important;background:#edf4fc;border:1px solid #bfd3e7;border-inline-start:4px solid #4d7fae}
.portal-message.mine{box-shadow:0 6px 20px rgba(22,105,91,.07)}
.portal-message.other{box-shadow:0 6px 20px rgba(57,93,127,.065)}
.chat-message-head{display:flex;align-items:center;gap:9px;margin-bottom:8px;min-width:0}
.chat-avatar{inline-size:32px;block-size:32px;flex:0 0 32px;border-radius:50%;display:grid;place-items:center;font-size:.78rem;font-weight:900;background:#dce9ed;color:#315e6c;border:1px solid rgba(31,87,99,.12)}
.portal-message.student .chat-avatar,.request-avatar{background:#d7f0e8;color:#176b5a;border-color:#b8ded2}
.portal-message.staff .chat-avatar{background:#dce9f8;color:#315f8a;border-color:#bfd3e7}
.chat-actor-copy{display:grid;gap:1px;min-width:0;line-height:1.2}
.chat-actor-copy b{font-size:.86rem;color:#173f52;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-actor-copy span{font-size:.68rem;color:#758892;font-weight:700}
.chat-message-head time{margin-inline-start:auto!important;margin-top:0!important;color:#8799a2;font-size:.67rem;white-space:nowrap}
.portal-message .message-body{font-size:.92rem;line-height:1.9;color:#263f4d;white-space:pre-wrap;overflow-wrap:anywhere}
.portal-message .message-request-link{display:inline-flex;margin:0 0 7px;padding:3px 8px;border-radius:999px;background:rgba(255,255,255,.74);color:#607681;font-size:.68rem;font-weight:800}
.chat-term{display:block;margin-top:7px;color:#8a9aa2;font-size:.65rem}

.portal-request-card.request-turn{max-width:min(94%,900px);margin:14px auto;padding:14px 15px 13px;border:1px solid #bcd9dc;border-radius:17px;background:#fff;box-shadow:0 7px 24px rgba(30,79,91,.07);position:relative;overflow:hidden}
.portal-request-card.request-turn:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:4px;background:#138279}
.portal-request-card.request-turn.mine:before{background:#16846f}
.portal-request-card.request-turn.other:before{background:#3c779f}
.request-author-head{margin-bottom:10px;padding-bottom:9px;border-bottom:1px solid #edf2f3}
.request-turn-topline{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:8px}
.request-kind{font-weight:900;color:#173f52;font-size:.95rem}
.request-turn-tag{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;background:#e8f4f3;color:#17685f;font-size:.67rem;font-weight:900}
.request-turn .status{margin-inline-start:auto;background:#edf3f6;border-radius:999px;padding:4px 9px;color:#4b6572;font-size:.69rem;font-weight:800}
.request-turn .portal-legend{margin:0 0 9px;padding:0;gap:5px}
.request-turn-body{padding:11px 12px;border:1px solid #e2ebed;border-radius:12px;background:#fbfdfd}
.request-turn-body>p{margin:0;color:#263f4d;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere}
.request-course-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;padding-top:9px;border-top:1px dashed #dbe6e8}
.request-course-label{font-size:.68rem;color:#748892;font-weight:800;align-self:center}
.request-course-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border:1px solid #c9dfdc;border-radius:9px;background:#eff8f6;color:#315e59;font-size:.72rem}
.request-course-chip b{font-weight:800}
.request-turn .message-attachments{margin-top:10px}
.request-turn-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
.request-turn-footer>small{color:#82929a}
.request-edit-button{border-color:#9fc9c8!important;background:#f4fbfa!important;color:#17685f!important;font-weight:800!important}
.request-turn.is-latest{border-color:#8fc8c5}
.request-turn.is-edit-target{border-color:#0b7b83;box-shadow:0 0 0 3px rgba(11,123,131,.09),0 9px 26px rgba(30,79,91,.08)}
.request-turn.is-edit-target:after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:linear-gradient(135deg,rgba(16,139,128,.025),transparent 45%)}

.active-request-lock{border:1px solid #c5dfe0!important;background:#f2faf9!important;border-radius:14px!important;padding:13px 14px!important}
.active-request-lock .active-request-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-inline-start:auto}
.active-request-lock .active-request-actions .secondary-button{background:#fff;border-color:#9fc9c8;color:#17685f}
.student-request-workspace.conversation-collapsed .request-workspace-divider,.student-request-workspace.conversation-collapsed .request-workspace-conversation{display:none}
.student-request-workspace.is-inline-editing .request-workspace-divider,.student-request-workspace.is-inline-editing .request-workspace-conversation{display:grid!important}
.student-request-workspace.is-inline-editing .request-workspace-divider{display:flex!important}
.student-request-workspace.is-inline-editing:not(.show-conversation-peek) #studentThread>.chat-event:not(.is-edit-target){display:none}
.student-request-workspace.is-inline-editing:not(.show-conversation-peek) #studentThread{height:auto;min-height:0;max-height:310px;background:#f8fbfb}
.student-request-workspace.is-inline-editing .portal-message-compose,.student-request-workspace.is-inline-editing #studentMessageGuidance{display:none!important}
.request-inline-edit-mount{margin-top:10px;padding:14px;border:1px solid #9fcfca;border-radius:16px;background:#f6fbfa;box-shadow:0 7px 24px rgba(26,97,88,.06)}
.request-inline-edit-mount.is-hidden{display:none!important}
.request-inline-edit-mount .request-workspace-editor{display:grid;gap:12px}
.request-inline-edit-mount .compact-subnav{opacity:.78}
.request-inline-edit-mount .compact-subnav button:disabled{cursor:default;opacity:.55}
.request-inline-edit-mount .portal-course-list{max-height:250px;background:#fff}
.request-inline-edit-mount .portal-text-label textarea{min-height:112px;background:#fff}
.edit-conversation-paused{border-color:#b8d8d5;background:#f4faf9;color:#2f5f5c}
.edit-conversation-paused b{color:#174f4b}
.edit-conversation-paused .quiet-button{background:#fff}

.staff-conversation-thread{height:590px}
.staff-unified-compose{margin-top:12px;padding-top:12px;border-top:1px solid #e3ecee}
.staff-unified-compose textarea{min-height:90px}

.portal-dialog [data-dialog-close-mode="close"]{border-color:#9fc9c8;background:#f4fbfa;color:#17685f;font-weight:800}

@media(max-width:1100px){.portal-message{max-width:84%}.portal-request-card.request-turn{max-width:97%}.portal-conversation-thread{height:520px}.staff-conversation-thread{height:540px}}
@media(max-width:820px){.portal-conversation-thread,.staff-conversation-thread{height:440px;min-height:340px;padding:10px}.portal-message{max-width:92%;padding:11px 12px}.portal-request-card.request-turn{max-width:100%;padding:12px}.active-request-lock{align-items:stretch!important}.active-request-lock .active-request-actions{margin-inline-start:0;width:100%}.active-request-lock .active-request-actions>*{flex:1 1 auto}.request-turn-footer{align-items:stretch;flex-direction:column}.request-turn-footer .request-edit-button{width:100%}.request-inline-edit-mount{padding:10px}.chat-message-head time{font-size:.62rem}}
@media(max-width:560px){.portal-message{max-width:96%}.chat-avatar{inline-size:28px;block-size:28px;flex-basis:28px}.request-turn-topline .status{margin-inline-start:0}.request-course-chip{max-width:100%;overflow:hidden}.request-course-chip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.request-inline-edit-mount .portal-course-list{max-height:220px}}
.student-request-editor-home:empty{display:none}.student-request-editor-home>.request-workspace-editor.is-hidden{display:none!important}
/* UI2 refinement — C conversation direction inside existing request cards only. */
.portal-conversation-thread .portal-message.mine{margin-left:auto!important;margin-right:0!important}
.portal-conversation-thread .portal-message.other{margin-left:0!important;margin-right:auto!important}
.portal-conversation-thread .request-turn.mine{margin-left:auto!important;margin-right:0!important}
.portal-conversation-thread .request-turn.other{margin-left:0!important;margin-right:auto!important}
.portal-conversation-thread .request-turn{width:min(92%,900px)}
.portal-conversation-thread .request-turn.is-current-revision{background:#fff;border-width:1px}
.portal-conversation-thread .request-turn.is-history-revision{background:#fbfcfc;border-style:dashed;border-color:#d7e3e6;box-shadow:none;opacity:.94}
.portal-conversation-thread .request-turn.is-history-revision:before{background:#a7bdc5}
.request-history-state{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;background:#f1f4f5;color:#71838c;font-size:.67rem;font-weight:800}
.portal-conversation-thread .request-turn.is-latest{border-color:#74bab4;box-shadow:0 7px 24px rgba(22,116,102,.09)}
.portal-conversation-thread .request-turn.is-edit-target{background:#f9fdfc}
.portal-conversation-thread .request-turn.is-edit-target .request-turn-body{border-color:#acd7d0;background:#fff}
.portal-conversation-thread .portal-message.student{background:#e6f6f0;border-color:#a8d6c8;border-inline-end-color:#218871}
.portal-conversation-thread .portal-message.staff{background:#eaf2fb;border-color:#b6cde5;border-inline-start-color:#467cad}
.portal-conversation-thread .portal-message.mine .chat-actor-copy b{color:#0c675c}
.portal-conversation-thread .portal-message.staff.mine .chat-actor-copy b{color:#285f8f}
.portal-request-list-item{transition:border-color .14s ease,background .14s ease,box-shadow .14s ease}
.portal-request-list-item.is-active{box-shadow:0 4px 14px rgba(19,120,112,.08)}
.portal-request-list-item b>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:820px){.portal-conversation-thread .request-turn{width:100%}}


/* V13.4R7 Request/Chat UX R2 — compact C template only; surrounding portal layout remains unchanged. */
.portal-conversation-thread,.staff-conversation-thread{height:clamp(300px,36vh,380px)!important;min-height:300px!important;max-height:380px!important;padding:12px!important;overflow-y:auto!important;overflow-x:hidden!important}
.portal-conversation-thread .chat-event{margin-block:7px!important}
.portal-conversation-thread .portal-message{max-width:min(68%,560px)!important;padding:9px 11px!important;border-radius:14px!important;box-shadow:0 3px 12px rgba(27,67,82,.045)!important}
.portal-conversation-thread .chat-message-head{gap:7px!important;margin-bottom:5px!important}
.portal-conversation-thread .chat-avatar{inline-size:27px!important;block-size:27px!important;flex-basis:27px!important;font-size:.7rem!important}
.portal-conversation-thread .chat-actor-copy b{font-size:.81rem!important}
.portal-conversation-thread .chat-actor-copy span,.portal-conversation-thread .chat-message-head time{font-size:.62rem!important}
.portal-conversation-thread .portal-message .message-body{font-size:.86rem!important;line-height:1.65!important}
.portal-conversation-thread .portal-message .message-request-link{margin-bottom:5px!important;padding:2px 7px!important;font-size:.62rem!important}
.portal-conversation-thread .chat-term{margin-top:4px!important;font-size:.6rem!important}
.portal-conversation-thread .request-turn{width:min(76%,680px)!important;max-width:680px!important;margin-block:8px!important;padding:10px 11px!important;border-radius:14px!important;box-shadow:0 4px 15px rgba(30,79,91,.055)!important}
.portal-conversation-thread .request-author-head{margin-bottom:6px!important;padding-bottom:6px!important}
.portal-conversation-thread .request-turn-topline{gap:5px!important;margin-bottom:6px!important}
.portal-conversation-thread .request-kind{font-size:.86rem!important}
.portal-conversation-thread .request-turn-tag,.portal-conversation-thread .request-turn .status,.portal-conversation-thread .request-history-state{padding:2px 7px!important;font-size:.61rem!important}
.portal-conversation-thread .request-turn .portal-legend{margin-bottom:6px!important;gap:4px!important}
.portal-conversation-thread .request-turn .portal-legend>*{font-size:.63rem!important;padding-block:3px!important}
.portal-conversation-thread .request-turn-body{padding:8px 9px!important;border-radius:10px!important}
.portal-conversation-thread .request-turn-body>p{font-size:.85rem!important;line-height:1.6!important}
.portal-conversation-thread .request-course-chips{gap:5px!important;margin-top:7px!important;padding-top:6px!important}
.portal-conversation-thread .request-course-label{font-size:.62rem!important}
.portal-conversation-thread .request-course-chip{padding:3px 6px!important;font-size:.65rem!important;border-radius:8px!important}
.portal-conversation-thread .request-staff-meta,.portal-conversation-thread .request-completed-by{font-size:.66rem!important;padding:5px 7px!important;margin-top:6px!important}
.portal-conversation-thread .request-turn-footer{margin-top:6px!important}
.portal-conversation-thread .request-turn-footer>small{font-size:.61rem!important}
.portal-conversation-thread .request-edit-button{padding:6px 9px!important;font-size:.72rem!important}
.staff-unified-compose{margin-top:8px!important;padding-top:8px!important}
.staff-unified-compose textarea,.student-request-workspace .portal-message-compose textarea{min-height:72px!important;max-height:110px!important}
.portal-dialog [data-dialog-close-mode="close"]{background:#0f8a83!important;color:#fff!important;border-color:#0f8a83!important}
.portal-dialog [data-dialog-close-mode="close"]:before{content:"✓";margin-inline-end:5px}
@media(max-width:1100px){.portal-conversation-thread .portal-message{max-width:76%!important}.portal-conversation-thread .request-turn{width:min(84%,660px)!important}.portal-conversation-thread,.staff-conversation-thread{height:340px!important;min-height:290px!important;max-height:340px!important}}
@media(max-width:820px){.portal-conversation-thread,.staff-conversation-thread{height:360px!important;min-height:300px!important;max-height:360px!important;padding:9px!important}.portal-conversation-thread .portal-message{max-width:88%!important}.portal-conversation-thread .request-turn{width:94%!important;max-width:94%!important}.staff-unified-compose textarea,.student-request-workspace .portal-message-compose textarea{min-height:68px!important}}
@media(max-width:560px){.portal-conversation-thread,.staff-conversation-thread{height:320px!important;min-height:270px!important;max-height:320px!important}.portal-conversation-thread .portal-message{max-width:94%!important}.portal-conversation-thread .request-turn{width:98%!important;max-width:98%!important}}


/* V13.4R7 Request/Chat UX R3 — readable compact conversation workspace.
   Scope: request/chat templates only. Portal shell, navigation and page identity stay unchanged. */
/* Student: opening the chat adds one bounded workspace, not a thread plus a tall composer. */
.student-request-workspace:not(.conversation-collapsed):not(.is-inline-editing) .request-workspace-conversation{
  height:clamp(330px,36vh,390px)!important;
  max-height:390px!important;
  min-height:330px!important;
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto auto!important;
  gap:7px!important;
  overflow:hidden!important;
}
.student-request-workspace:not(.conversation-collapsed):not(.is-inline-editing) #studentThread{
  height:auto!important;min-height:0!important;max-height:none!important;
}
/* Staff: both request columns stay inside the visible work area; list and conversation scroll internally. */
#staffRequestsView .portal-requests-layout{align-items:stretch!important}
#staffRequestsView .portal-requests-layout>article.card{
  height:clamp(520px,calc(100dvh - 300px),690px)!important;
  max-height:690px!important;
  min-height:520px!important;
  overflow:hidden!important;
}
#staffRequestsView .portal-requests-layout>article.card:first-child{display:flex!important;flex-direction:column!important}
#staffRequestsView .portal-request-list{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:auto!important}
#staffRequestsView .portal-requests-layout>article.card:last-child{display:flex!important;flex-direction:column!important}
#staffRequestsView #staffStudentSummary{flex:0 0 auto}
#staffRequestsView #staffThread{
  flex:1 1 auto!important;height:auto!important;min-height:190px!important;max-height:none!important;
}
#staffRequestsView #staffRequestActions{flex:0 0 auto!important;margin-top:5px!important;padding-block:5px!important}
#staffRequestsView #staffMessageCompose{flex:0 0 auto!important}

/* Readability restored: compact cards, normal reading size. */
.portal-conversation-thread,.staff-conversation-thread{
  padding:10px!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:stable!important;
}
.portal-conversation-thread .chat-event{margin-block:6px!important}
.portal-conversation-thread .portal-message{
  width:max-content!important;min-width:min(210px,70%)!important;max-width:min(64%,540px)!important;
  padding:9px 12px!important;border-radius:14px!important;
  box-shadow:0 3px 11px rgba(27,67,82,.05)!important;
}
.portal-conversation-thread .chat-message-head{gap:8px!important;margin-bottom:6px!important}
.portal-conversation-thread .chat-avatar{inline-size:30px!important;block-size:30px!important;flex-basis:30px!important;font-size:.76rem!important}
.portal-conversation-thread .chat-actor-copy b{font-size:.88rem!important;line-height:1.25!important}
.portal-conversation-thread .chat-actor-copy span{font-size:.7rem!important}
.portal-conversation-thread .chat-message-head time{font-size:.68rem!important}
.portal-conversation-thread .portal-message .message-body{font-size:.94rem!important;line-height:1.65!important}
.portal-conversation-thread .portal-message .message-request-link{font-size:.69rem!important;padding:3px 7px!important;margin-bottom:5px!important}
.portal-conversation-thread .chat-term{font-size:.67rem!important;margin-top:5px!important}

.portal-conversation-thread .request-turn{
  width:min(72%,640px)!important;max-width:640px!important;
  margin-block:7px!important;padding:10px 12px!important;border-radius:14px!important;
  box-shadow:0 4px 14px rgba(30,79,91,.055)!important;
}
.portal-conversation-thread .request-author-head{margin-bottom:6px!important;padding-bottom:6px!important}
.portal-conversation-thread .request-turn-topline{gap:6px!important;margin-bottom:6px!important}
.portal-conversation-thread .request-kind{font-size:.91rem!important}
.portal-conversation-thread .request-turn-tag,.portal-conversation-thread .request-turn .status,.portal-conversation-thread .request-history-state{
  padding:3px 7px!important;font-size:.68rem!important
}
.portal-conversation-thread .request-turn .portal-legend{margin-bottom:6px!important;gap:5px!important}
.portal-conversation-thread .request-turn .portal-legend>*{font-size:.69rem!important;padding-block:3px!important}
.portal-conversation-thread .request-turn-body{padding:8px 10px!important;border-radius:10px!important}
.portal-conversation-thread .request-turn-body>p{font-size:.92rem!important;line-height:1.65!important}
.portal-conversation-thread .request-course-chips{gap:5px!important;margin-top:7px!important;padding-top:7px!important}
.portal-conversation-thread .request-course-label{font-size:.69rem!important}
.portal-conversation-thread .request-course-chip{padding:4px 7px!important;font-size:.71rem!important;border-radius:8px!important}
.portal-conversation-thread .request-staff-meta,.portal-conversation-thread .request-completed-by{
  font-size:.72rem!important;padding:5px 7px!important;margin-top:6px!important
}
.portal-conversation-thread .request-turn-footer{margin-top:6px!important}
.portal-conversation-thread .request-turn-footer>small{font-size:.68rem!important}
.portal-conversation-thread .request-edit-button{padding:6px 10px!important;font-size:.78rem!important}
/* Historical request versions stay legible but deliberately flatter than the active request. */
.portal-conversation-thread .request-turn.is-history-revision{padding-block:8px!important;opacity:.9!important}
.portal-conversation-thread .request-turn.is-history-revision .request-author-head{margin-bottom:4px!important;padding-bottom:4px!important}

/* Composer is a compact footer, so it no longer adds a second large block below the chat. */
.student-request-workspace .unified-compose,.staff-unified-compose{
  gap:6px!important;margin-top:0!important;padding-top:6px!important;border-top:1px solid #e5edef!important
}
.student-request-workspace .unified-compose textarea,.staff-unified-compose textarea{
  min-height:54px!important;height:54px!important;max-height:82px!important;padding:9px 11px!important;
  font-size:.9rem!important;line-height:1.5!important;resize:vertical!important
}
.student-request-workspace .compose-footer{align-items:center!important;gap:8px!important}
.student-request-workspace .message-attachment-tools,.staff-unified-compose .message-attachment-tools{
  display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;min-width:0!important
}
.student-request-workspace .message-attachment-tools>small,.staff-unified-compose .message-attachment-tools>small{
  font-size:.7rem!important;line-height:1.35!important;max-width:360px!important
}
.student-request-workspace .attachment-picker,.staff-unified-compose .attachment-picker{padding:6px 10px!important;font-size:.78rem!important}
.student-request-workspace .compose-send,.staff-unified-compose>button{min-height:36px!important;padding:7px 16px!important;font-size:.82rem!important}
.student-request-workspace .attachment-selection,.staff-unified-compose .attachment-selection{flex-basis:100%!important}

/* Slightly tighten the student request header only while chat is open; the surrounding page remains intact. */
.student-request-workspace:not(.conversation-collapsed):not(.is-inline-editing){gap:11px!important}
.student-request-workspace:not(.conversation-collapsed):not(.is-inline-editing) .active-request-lock{padding:10px 12px!important}
.student-request-workspace:not(.conversation-collapsed):not(.is-inline-editing) .request-workspace-divider{font-size:.82rem!important}

@media(max-width:1100px){
  #staffRequestsView .portal-requests-layout>article.card{height:clamp(500px,calc(100dvh - 275px),650px)!important;min-height:500px!important;max-height:650px!important}
  .portal-conversation-thread .portal-message{max-width:min(72%,520px)!important}
  .portal-conversation-thread .request-turn{width:min(80%,620px)!important}
}
@media(max-width:820px){
  #staffRequestsView .portal-requests-layout>article.card{height:auto!important;max-height:none!important;min-height:0!important}
  #staffRequestsView .portal-request-list{max-height:300px!important;flex:none!important}
  #staffRequestsView #staffThread{height:300px!important;min-height:260px!important;max-height:300px!important;flex:none!important}
  .student-request-workspace:not(.conversation-collapsed):not(.is-inline-editing) .request-workspace-conversation{height:340px!important;min-height:310px!important;max-height:340px!important}
  .portal-conversation-thread .portal-message{max-width:86%!important;min-width:180px!important}
  .portal-conversation-thread .request-turn{width:94%!important;max-width:94%!important}
  .student-request-workspace .message-attachment-tools>small,.staff-unified-compose .message-attachment-tools>small{display:none!important}
}
@media(max-width:560px){
  .student-request-workspace:not(.conversation-collapsed):not(.is-inline-editing) .request-workspace-conversation{height:320px!important;min-height:290px!important;max-height:320px!important}
  #staffRequestsView #staffThread{height:280px!important;min-height:250px!important;max-height:280px!important}
  .portal-conversation-thread .portal-message{max-width:92%!important;min-width:0!important}
  .portal-conversation-thread .request-turn{width:98%!important;max-width:98%!important}
  .portal-conversation-thread .chat-actor-copy b{font-size:.84rem!important}
  .portal-conversation-thread .portal-message .message-body{font-size:.9rem!important}
  .portal-conversation-thread .request-turn-body>p{font-size:.89rem!important}
}
/* R3 composer refinement: use the available width before consuming vertical space. */
.unified-compose .attachment-empty{display:none!important}
#staffMessageCompose{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:auto auto!important;
  gap:6px 8px!important;
  align-items:stretch!important
}
#staffMessageCompose>textarea{grid-column:1;grid-row:1}
#staffMessageCompose>button{grid-column:2;grid-row:1;align-self:stretch!important;min-width:92px!important}
#staffMessageCompose>.message-attachment-tools{grid-column:1/-1;grid-row:2}
@media(max-width:720px){
  #staffMessageCompose{grid-template-columns:1fr!important;grid-template-rows:auto auto auto!important}
  #staffMessageCompose>textarea,#staffMessageCompose>button,#staffMessageCompose>.message-attachment-tools{grid-column:1!important}
  #staffMessageCompose>textarea{grid-row:1!important}#staffMessageCompose>.message-attachment-tools{grid-row:2!important}#staffMessageCompose>button{grid-row:3!important;width:100%!important}
}
/* Staff detail density: preserve all actions, reclaim vertical room for the conversation. */
@media(min-width:821px){
  #staffRequestsView .staff-student-summary{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;margin-bottom:6px!important}
  #staffRequestsView .staff-student-summary>div{padding:7px 9px!important;border-radius:9px!important}
  #staffRequestsView .staff-student-summary span{font-size:.68rem!important;margin-bottom:2px!important}
  #staffRequestsView .staff-student-summary b{font-size:.84rem!important;line-height:1.35!important}
  #staffRequestsView .staff-student-summary>div:nth-child(2) b{font-size:.94rem!important}
  #staffRequestsView .portal-request-actions{grid-template-columns:minmax(125px,.65fr) minmax(0,1.35fr)!important;gap:6px 8px!important;border-top:1px solid #e4ecef!important;margin-top:5px!important;padding:6px 0!important;align-items:center!important}
  #staffRequestsView .request-action-state{padding:6px 8px!important;border-radius:8px!important}
  #staffRequestsView .request-action-state span{font-size:.7rem!important}
  #staffRequestsView .request-action-state b{font-size:.79rem!important}
  #staffRequestsView .request-primary-actions{gap:6px!important;flex-wrap:nowrap!important;min-width:0!important}
  #staffRequestsView .request-primary-actions button{min-height:32px!important;padding:6px 9px!important;font-size:.74rem!important;white-space:nowrap!important}
  #staffRequestsView .request-more-actions{grid-column:1/-1!important;padding:5px 8px!important;border-radius:8px!important}
  #staffRequestsView .request-more-actions summary{font-size:.73rem!important}
  #staffRequestsView .request-more-actions>div{padding-top:5px!important;gap:6px!important}
  #staffRequestsView .request-more-actions button{min-height:30px!important;padding:5px 8px!important;font-size:.72rem!important}
}

/* V13.4R7 Request/Chat UX R4 — taller scrollable conversation viewport only.
   User-requested scope: enlarge the shaded message-scroll area so the existing
   composer/attachment/send controls sit near the bottom of the visible portal.
   The composer controls themselves are intentionally unchanged. */
@media(min-width:821px){
  .student-request-workspace:not(.conversation-collapsed):not(.is-inline-editing) .request-workspace-conversation{
    height:clamp(390px,calc(100dvh - 500px),525px)!important;
    min-height:390px!important;
    max-height:525px!important;
  }
  /* Keep the input/footer fixed in size; all added room belongs to the scrolling thread row. */
  .student-request-workspace:not(.conversation-collapsed):not(.is-inline-editing) #studentThread{
    min-height:0!important;
  }
}

/* V13.4R7 Request/Chat UX R5 — brand-aligned staff reply color.
   Keep the existing request/chat geometry unchanged; only replace the blue staff
   bubble treatment with the platform green/teal identity while retaining a
   distinct shade from trainee messages. */
.portal-conversation-thread .portal-message.staff{
  background:#e3f3eb!important;
  border-color:#a8d2bf!important;
  border-inline-start-color:var(--green,#16845b)!important;
}
.portal-conversation-thread .portal-message.staff .chat-avatar{
  background:#d4ecdf!important;
  color:#0b6657!important;
  border-color:#a8d2bf!important;
}
.portal-conversation-thread .portal-message.staff.mine .chat-actor-copy b,
.portal-conversation-thread .portal-message.staff.other .chat-actor-copy b{
  color:#0b6657!important;
}
