/* Functional layout for the portal shell. Original vendor CSS is unchanged. */
[hidden] { display: none !important; }
.portal #wrapper { min-height: 100vh; overflow: clip; }
.portal-header { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; min-height:96px; padding:18px 32px; }
.portal-brand-row,.portal-header-tools,#account-nav { display:flex; align-items:center; gap:22px; }
.portal-logo { display:block; flex-shrink:0; padding:8px 0; }
.portal-logo img { display:block; width:180px; height:auto; }
.portal-product { white-space:nowrap; }
.portal-header-tools { gap:22px; }
#account-nav { gap:18px; flex-wrap:wrap; }
#account-nav a { display:flex; align-items:center; gap:7px; }
#account-nav svg { width:18px; height:18px; }
.portal-workspace { display:grid; grid-template-columns:254px minmax(0,1fr); min-height:calc(100vh - 96px); }
.portal-sidebar { position:sticky; top:0; align-self:start; height:calc(100vh - 96px); height:calc(100dvh - 96px); display:flex; flex-direction:column; padding:26px 16px 20px; overflow-y:auto; }
.portal-sidebar-top { display:flex; align-items:center; justify-content:space-between; padding:0 14px 16px; }
.portal-nav { display:flex; flex-direction:column; gap:5px; }
.portal-nav-link { display:flex; align-items:center; gap:13px; padding:12px 14px; min-height:46px; }
.portal-nav-link svg { flex:0 0 20px; width:20px; height:20px; }
.portal-nav-marker { margin-left:auto; width:6px; height:6px; flex-shrink:0; }
.portal-nav-caption { margin:24px 14px 8px; }
.portal-sidebar-bottom { margin-top:auto; padding:32px 14px 0; }
.portal-page { min-width:0; display:flex; flex-direction:column; padding:28px clamp(24px,3.5vw,64px) 26px; }
.portal-context { display:flex; align-items:center; gap:12px; margin-bottom:32px; }
.portal #main { width:100%; max-width:1400px; min-width:0; margin:0; padding:0; flex:1; }
.portal #notice:empty { display:none; }
.portal #app { min-width:0; }
.portal-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; }
.portal-form { max-width:38rem; }
.portal-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,20rem),1fr)); gap:24px; }
.portal-board { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr)); gap:24px; align-items:start; }
.portal-table { overflow-x:auto; max-width:100%; }
.portal table { width:100%; }
.portal .portal-table table { min-width:600px; }
.portal .portal-table td,.portal .portal-table th { overflow-wrap:anywhere; }
.portal-content { white-space:pre-wrap; overflow-wrap:anywhere; }
.portal fieldset { min-width:0; }
.portal-checkboxes label { display:block; }
.portal-checkboxes input[type=checkbox] { width:auto; }
.portal .widget select { max-width:100%; }
.portal .portal-small-field { max-width:12rem; }
.portal details > summary { cursor:pointer; }
.portal [aria-busy=true] { cursor:progress; }
.portal pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.portal-icon-button,.portal-theme-button { display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:10px 12px; min-height:42px; flex-shrink:0; cursor:pointer; }
.portal-icon-button svg,.portal-theme-button svg { width:20px; height:20px; flex-shrink:0; }
.portal-theme-track { display:block; width:30px; height:18px; padding:3px; }
.portal-theme-track span { display:block; width:12px; height:12px; }
[data-theme=dark] .portal-theme-track span { transform:translateX(12px); }
.portal-sun { display:none; }
[data-theme=dark] .portal-sun { display:block; }
[data-theme=dark] .portal-moon { display:none; }
#menu-toggle,#menu-close { display:none; }
.portal-skip { position:fixed; top:12px; left:12px; transform:translateY(-160%); z-index:100; padding:12px; }
.portal-skip:focus { transform:none; }
.portal-footer { margin-top:48px; max-width:1400px; width:100%; }
.portal-footer-image { aspect-ratio:48 / 19; overflow:hidden; }
.portal-footer-image img { width:100%; height:100%; display:block; object-fit:cover; object-position:center; }
.portal-footer-caption { display:flex; justify-content:space-between; gap:18px; align-items:center; padding-top:14px; }
@media(min-width:1600px) { .portal-workspace { grid-template-columns:280px minmax(0,1fr); } }
@media(max-width:1200px) { .portal-product { display:none; } #account-nav a span { display:none; } }
@media(max-width:860px) {
 .portal-header { min-height:78px; padding:14px 20px; gap:12px; }
 .portal-brand-row,.portal-header-tools { gap:12px; }
 .portal-logo img { width:150px; }
 .portal-workspace { display:block; min-height:calc(100dvh - 78px); }
 .portal-sidebar { position:fixed; top:0; left:0; bottom:0; height:100dvh; width:min(290px,calc(100vw - 40px)); z-index:50; transform:translateX(-100%); visibility:hidden; }
 .portal-menu-open .portal-sidebar { transform:none; visibility:visible; }
 .portal-menu-open { overflow:hidden; }
 #menu-toggle,#menu-close { display:inline-flex; }
 #menu-backdrop { position:fixed; inset:0; z-index:40; width:100%; height:100%; border:0; padding:0; }
 .portal-page { min-height:calc(100dvh - 78px); padding:24px 22px; }
 .portal-context { margin-bottom:26px; }
 .portal-account-name { display:none; }
 #account-nav { gap:12px; }
}
@media(max-width:540px) {
 .portal-header { flex-wrap:wrap; padding:12px 16px; }
 .portal-header-tools { margin-left:auto; gap:12px; }
 #theme-label,.portal-theme-track { display:none; }
 .portal-theme-button { width:42px; padding:10px; }
 .portal-logo img { width:135px; }
 .portal-brand-row { gap:8px; }
 .portal-icon-button { padding:8px; }
 #account-nav { gap:10px; }
 .portal-page { padding:22px 18px; }
 .portal-footer-caption { align-items:flex-start; }
 .portal-footer-caption>a { text-align:right; }
}
