/* Mobile-only presentation. Desktop layout remains owned by layout.css/workspace.css. */
.mobile-menu-toggle,.mobile-menu-close,.mobile-menu-backdrop,.mobile-event-agenda{display:none!important}
@media(max-width:767px){
 body.portal-session{font-size:16px;line-height:1.5;overflow-wrap:break-word}
 body.portal-session.mobile-navigation-open{overflow:hidden}
 body.portal-session .workspace{margin-left:0!important;width:100%;min-width:0}
 body.portal-session .portal-page{padding:22px 16px 36px!important;width:100%;max-width:none;min-width:0}
 body.portal-session .sidebar{position:fixed!important;inset:0 auto 0 0!important;width:min(340px,90vw)!important;height:100dvh!important;max-height:100dvh;padding:18px 20px!important;display:flex!important;flex-direction:column;overflow-y:auto;z-index:1002;transform:translateX(-105%);visibility:hidden;background:#10171b;box-shadow:16px 0 50px #0008}
 body.portal-session .mobile-menu-open .sidebar{transform:translateX(0);visibility:visible}
 body.portal-session .sidebar .brand{margin:8px 0 18px}
 body.portal-session .sidebar nav{display:grid!important;overflow-y:auto;overflow-x:hidden;min-height:120px;flex:1;max-height:none!important}
 body.portal-session .sidebar nav a{min-height:48px;padding:12px;font-size:16px;border-radius:6px}
 body.portal-session .sidebar .side-label{margin:16px 8px 10px}
 body.portal-session .sidebar .side-bottom{margin-top:20px;flex-shrink:0}
 body.portal-session .sidebar .identity{margin-top:16px;padding-top:16px;flex-wrap:wrap}
 body.portal-session .mobile-menu-toggle,body.portal-session .mobile-menu-close{display:inline-flex!important;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:10px 14px;border:1px solid #425159;border-radius:10px;background:#202c33;color:#fff;flex-shrink:0}
 body.portal-session .mobile-menu-close{align-self:flex-end}
 body.portal-session .mobile-menu-backdrop{position:fixed;inset:0;width:100%;height:100dvh;background:#0009;z-index:1001;border:0;border-radius:0}
 body.portal-session .mobile-menu-open .mobile-menu-backdrop{display:block!important}
 body.portal-session .topbar{position:sticky;top:0;z-index:30;min-height:64px;padding:10px 12px!important;gap:12px;background:#10171bf5;letter-spacing:0}
 body.portal-session .topbar>span{flex:1;min-width:0;font-size:0;line-height:1.3}
 body.portal-session .topbar>span .slash{display:none}
 body.portal-session .topbar>span b{display:block;font-size:17px;overflow-wrap:anywhere}
 body.portal-session .topbar .actions{gap:8px;flex-shrink:0}.topbar .actions>.btn{font-size:12px}
 body.portal-session :is(h1,h2,h3,p){overflow-wrap:anywhere}
 body.portal-session h1{font-size:30px!important;line-height:1.15;margin-bottom:12px}
 body.portal-session h2{font-size:23px;line-height:1.25}
 body.portal-session :is(.heading,.profile-header,.section-heading,.role-summary,.operator-calendar-head){display:flex;flex-direction:column;align-items:stretch;gap:14px}
 body.portal-session :is(.subtitle,.subtle){font-size:14px;line-height:1.5}
 body.portal-session :is(.panel,.record-card,.candidate-card,.home-card,.admin-menu-card){padding:18px;border-radius:12px;min-width:0;max-width:100%}
 body.portal-session :is(.home-card-grid,.admin-menu,.exam-grid,.personnel-grid,.draft-candidate-grid,.candidate-session-grid,.candidate-qualification-grid,.peer-candidate-grid,.profile-record-grid,.profile-detail-grid,.supply-window-grid,.career-credential-grid,.gt-muster-grid){display:grid;grid-template-columns:minmax(0,1fr)!important;gap:14px}
 body.portal-session :is(.toolbar,.directory-toolbar,.kb-toolbar,.filters,.record-fields,.form-grid,.profile-form,.record-form,.green-team-form,.career-path-form,.candidate-peer-form,.candidate-dream-form,.gt-review-board-form,.evaluation-attendance-controls,.evaluation-absence-controls,.peer-rating-grid){grid-template-columns:minmax(0,1fr)!important;gap:16px;min-width:0}
 body.portal-session :is(.record-fields,.form-grid,.profile-form,.record-form,.green-team-form,.evaluation-attendance-controls,.evaluation-absence-controls)>*{min-width:0;grid-column:auto!important}
 body.portal-session :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){box-sizing:border-box;min-width:0;max-width:100%;width:100%;font-size:16px!important;line-height:1.4;padding:12px;min-height:46px;border-radius:8px}
 body.portal-session textarea{min-height:140px;resize:vertical}
 body.portal-session label{min-width:0;font-size:15px;line-height:1.4}
 body.portal-session input:is([type=checkbox],[type=radio]){width:20px;height:20px;flex-shrink:0;vertical-align:middle}
 body.portal-session input[type=range]{width:100%;min-height:44px;touch-action:pan-y}
 body.portal-session :is(.btn,button.secondary,button.primary,button[type=submit],.event-actions button){min-height:44px;padding:11px 16px;border-radius:9px;white-space:normal;line-height:1.3;font-size:15px}
 body.portal-session :is(.actions,.event-actions,.peer-release-controls,.dialog-actions){display:flex;flex-wrap:wrap;gap:10px;min-width:0}
 body.portal-session :is(.actions,.event-actions)>:is(button,a.btn){flex:1 1 auto}
 body.portal-session :is(.supply-tabs,.green-team-tabs,.recruitment-tabs,.recruitment-service-tabs,.candidate-exam-tabs){display:flex!important;flex-wrap:nowrap!important;gap:20px!important;overflow-x:auto;max-width:100%;padding:0 2px;scrollbar-width:thin;overscroll-behavior-x:contain}
 body.portal-session :is(.supply-tabs,.green-team-tabs,.recruitment-tabs,.recruitment-service-tabs)>button{flex:0 0 auto;white-space:nowrap;min-height:48px;font-size:16px!important}
 body.portal-session :is(.gt-class-card,.gt-candidate-evaluation){min-width:0;max-width:100%}
 body.portal-session :is(.gt-class-card>summary,.gt-candidate-evaluation>summary){padding:16px;gap:10px;flex-wrap:wrap}
 body.portal-session :is(.gt-score-grid,.evaluation-rating-grid,.draft-criterion-grid){display:grid;grid-template-columns:minmax(0,1fr)!important;gap:12px}
 body.portal-session :is(.gt-candidate-evaluation-body,.evaluation-card-form,.gt-scoring-form){padding:14px;min-width:0}
 body.portal-session :is(.table-wrap,.peer-score-scroll){max-width:100%;overflow:auto;overscroll-behavior-x:contain}
 body.portal-session table{display:block;max-width:100%;overflow-x:auto;min-width:0!important;overscroll-behavior-x:contain}
 body.portal-session :is(th,td){padding:12px;font-size:14px}
 body.portal-session :is(.profile-header>div,.member-award>div){min-width:0!important}
 body.portal-session :is(.home-orbat,.orbat-canvas,.orbat-viewport){max-width:100%;min-width:0;overflow:auto;overscroll-behavior:contain}
 body.portal-session dialog[open]{position:fixed;inset:0!important;margin:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;box-sizing:border-box;border-radius:0!important;padding:0;overflow:auto;overscroll-behavior:contain}
 body.portal-session dialog::backdrop{backdrop-filter:none!important;background:#000b}
 body.portal-session dialog :is(.dialog-heading,.dialog-head,.candidate-dialog-header,.green-team-session-dialog-head){position:sticky;top:0;z-index:2;padding:16px!important;margin:0!important;width:100%;background:#202c33;display:flex;align-items:center;justify-content:space-between;gap:14px}
 body.portal-session dialog :is(.dialog-heading,.dialog-head,.candidate-dialog-header) h2{font-size:22px;margin:0}
 body.portal-session dialog :is(.dialog-body,.dialog-content,.peer-preview-body,.peer-rating-grid,.record-fields){padding:18px!important}
 body.portal-session dialog :is(.dialog-actions,.dream-form-footer){position:sticky;bottom:0;z-index:2;padding:14px 16px calc(14px + env(safe-area-inset-bottom))!important;margin:0!important;background:#202c33;border-top:1px solid #405058}
 body.portal-session dialog :is(.dialog-actions,.dream-form-footer)>:is(button,a.btn){min-height:48px;flex:1 1 120px}
 body.portal-session .operator-event-calendar{padding:16px;border-radius:12px}
 body.portal-session .operator-calendar-grid{display:none!important}
 body.portal-session .mobile-event-agenda{display:grid!important;gap:18px}
 body.portal-session .operator-calendar-head .event-actions{display:flex;align-items:center;gap:8px}
 body.portal-session .operator-calendar-head .event-actions strong{flex:1;text-align:center}
 body.portal-session .operator-calendar-legend{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
 body.portal-session .mobile-agenda-create{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding-bottom:16px;border-bottom:1px solid #39464e}
 body.portal-session .mobile-agenda-create label{display:grid;gap:8px}
 body.portal-session .mobile-agenda-day{display:grid;gap:10px}
 body.portal-session .mobile-agenda-day h3{font-size:17px;margin:0;color:#bac8d0}
 body.portal-session button.mobile-agenda-event{display:grid;gap:7px;text-align:left;width:100%;padding:16px;border:1px solid #42535e;border-left:4px solid #5a9dbc;border-radius:10px;min-height:76px;background:#192c36;color:#eef4f7}
 body.portal-session .mobile-agenda-event.calendar-event-mandatory{background:#30232a;border-left-color:#ce7e89}.mobile-agenda-event.calendar-event-cancelled{opacity:.6;text-decoration:line-through}
 body.portal-session .mobile-agenda-event strong{font-size:17px;font-weight:500}.mobile-agenda-event span{font-size:14px;color:#bdc7cd}
 body.portal-session .recruitment-calendar-grid{min-width:520px}.recruitment-calendar{overflow-x:auto;max-width:100%}
 body.portal-session #permission-preview-banner{left:12px;right:12px;bottom:8px;max-width:calc(100vw - 24px);width:auto;transform:none;font-size:12px;gap:8px;flex-wrap:wrap;padding:10px}
 body.portal-session:has(#permission-preview-banner) .portal-page{padding-bottom:110px!important}
 body.portal-session :is(.notification-panel,.notifications-popover){position:fixed;left:12px;right:12px;top:72px;width:auto;max-width:calc(100vw - 24px);max-height:70dvh;overflow:auto}
 body:not(.portal-session) .access-shell{width:auto;max-width:100%;margin:0;padding:20px 16px}
 body:not(.portal-session) .panel{padding:20px;min-width:0}
 body:not(.portal-session) :is(input,select,textarea){font-size:16px;max-width:100%;box-sizing:border-box}
}
@media(prefers-reduced-motion:no-preference) and (max-width:767px){body.portal-session .sidebar{transition:transform .18s ease,visibility .18s}}
@media(max-width:767px){
 body.portal-session .heading{margin:0 0 20px}
 body.portal-session #main.stage-view .portal-page:has(>.heading:not([hidden])) .candidate-body>h2:first-child{display:none}
 body.portal-session .candidate-bottom-five.peer-results .peer-result-card{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;padding:16px}
 body.portal-session .peer-results .peer-bottom-rated{grid-column:2;justify-self:start;margin:0;font-size:13px}
 body.portal-session .peer-result-caption{white-space:nowrap}
 body.portal-session dialog.record-dialog>.record-form{display:flex;flex-direction:column;min-height:100%;padding:0;margin:0}
 body.portal-session dialog.record-dialog>.record-form>.dialog-actions{margin-top:auto!important}
}
