/* Team identity, navigation and filters share one quiet workspace surface. */
.teams-layout{display:block;min-width:0}
.team-workspace{min-width:0;container-type:inline-size;container-name:team-workspace}
.team-header{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 14px;padding:0 0 10px;border:0;border-radius:0;background:transparent}
.team-workspace-identity{flex:1;min-width:0}
.team-header h1{margin:0;font-size:24px;line-height:1.4;color:var(--text)}
.team-workspace-title{display:flex;align-items:center;gap:14px;min-width:0}
.teams-page #portal .team-workspace-title>h2{flex:0 1 auto;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:24px;font-weight:650;line-height:1.4;color:var(--text)}
.team-workspace-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.team-selector-metadata{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;min-width:0;margin-top:9px;color:var(--muted);font-size:12px;line-height:1.5}
.team-selector-metadata>span+span::before{content:'';display:inline-block;width:3px;height:3px;margin:0 10px 3px 0;border-radius:50%;background:#6f7b81}
.team-role{font-size:12px;white-space:nowrap}
.team-selector{position:relative;flex:none;min-width:0;margin:0}
.teams-page #portal .team-selector-summary{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:0;min-height:30px;margin:0;padding:5px 9px;border:1px solid var(--line);border-radius:6px;background:transparent;color:var(--muted);font-size:12px;line-height:1.5;cursor:pointer;list-style:none;white-space:nowrap}
.team-selector-summary::-webkit-details-marker{display:none}
.team-selector-summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.teams-page #portal .team-selector-summary:hover{color:var(--text);border-color:#626b73;background:#ffffff04}
.team-selector-chevron{flex:none;width:6px;height:6px;margin:0 1px 3px 0;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
.team-selector[open] .team-selector-chevron{transform:rotate(225deg);margin-bottom:0}
.team-selector .teams-list{position:absolute;z-index:20;top:calc(100% + 9px);left:0;display:flex;flex-direction:column;gap:4px;width:min(300px,calc(100vw - 40px));max-height:min(320px,55dvh);overflow:auto;padding:6px;border:1px solid var(--line);border-radius:8px;background:#1c2226;box-shadow:0 12px 32px #0006;overscroll-behavior:contain}
.team-selector .teams-list>p{margin:0;padding:12px;color:var(--muted);font-size:13px}
.team-switch{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;padding:11px;color:var(--text);text-align:left;border:1px solid transparent;border-radius:5px;background:transparent}
.team-switch>span:first-child{flex:1;min-width:0}
.team-switch strong,.team-switch small{display:block}
.team-switch strong{color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-switch small{color:var(--muted);font-size:12px;margin-top:4px}
body:not(.native-controls):not(.unstyled-controls) .team-selector .teams-list .team-switch{background:transparent;border:1px solid transparent;color:var(--text);text-align:left;justify-content:space-between}
body:not(.native-controls):not(.unstyled-controls) .team-selector .teams-list .team-switch:hover{background:#ffffff08}
body:not(.native-controls):not(.unstyled-controls) .team-selector .teams-list .team-switch[aria-current=page]{background:#eab7830d;border-color:#eab78350}
.team-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.team-workspace-actions{flex:none;flex-wrap:nowrap}
body:not(.native-controls):not(.unstyled-controls).teams-page #portal .team-workspace-actions>:is(button,a){display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:38px;height:38px;margin:0;padding:8px 14px;font-size:13px;line-height:1.4;white-space:nowrap}
.team-section-navigation{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;border-bottom:1px solid var(--line)}
.teams-page #portal .team-tabs{flex:0 1 auto;gap:22px;margin:0;padding:0;overflow:visible}
body:not(.native-controls):not(.unstyled-controls).teams-page #portal .team-tabs[role=tablist]>button[role=tab]{flex:none;min-width:0;min-height:44px;margin:0 0 -1px;padding:9px 4px 11px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;box-shadow:none;color:var(--muted);font-size:14px;line-height:1.5;font-weight:500;white-space:nowrap}
body:not(.native-controls):not(.unstyled-controls).teams-page #portal .team-tabs[role=tablist]>button[role=tab]:hover{color:var(--text);background:transparent}
body:not(.native-controls):not(.unstyled-controls).teams-page #portal .team-tabs[role=tablist]>button[role=tab][aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent);background:transparent;font-weight:600}
.team-workspace-utilities{display:flex;align-items:center;gap:16px;flex:none}
body:not(.native-controls):not(.unstyled-controls).teams-page #portal .team-workspace-utilities>:is(button,a){display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:32px;margin:0;padding:5px 0;border:0;border-radius:4px;background:transparent;color:var(--muted);font-size:12px;line-height:1.5;white-space:nowrap}
body:not(.native-controls):not(.unstyled-controls).teams-page #portal .team-workspace-utilities>:is(button,a):hover{color:var(--text);background:transparent}
.team-action-icon{display:flex;align-items:center;justify-content:center;flex:none}
.team-action-icon>.hh-icon{width:15px;height:15px}
.team-panel{min-width:0;padding:0;border:0;border-radius:0;background:transparent}
.team-panel>.portal-notice:empty{display:none}
.team-panel:has(>.team-member-list,>.team-settings-block){padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--panel,#181c1d)}

/* Labels remain available to assistive technology without visible captions. */
.team-filter{display:flex;align-items:center;gap:10px;min-width:0;margin:0 0 16px}
.team-filter input{flex:1;min-width:0}
.team-filter select{max-width:200px}
.team-filter>input{width:auto}
.team-filter>button{flex-shrink:0;white-space:nowrap}
.teams-page .team-panel>.team-plugin-filter{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:8px;margin:0 0 12px;min-width:0}
.teams-page .team-search-row{display:grid;grid-template-columns:minmax(160px,1fr) repeat(3,auto);gap:8px;align-items:center;min-width:0}
.teams-page .team-search-row>.team-search-field{display:block;position:relative;min-width:0;margin:0}
.teams-page .team-filter-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;min-width:0}
.teams-page .team-filter-field{display:block;min-width:0;margin:0}
.teams-page .team-search-field>.team-search-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.teams-page .team-search-field>.team-search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:17px;height:17px;color:var(--muted);z-index:1;pointer-events:none}
.teams-page .team-search-icon>.hh-icon{display:block;width:17px;height:17px}
body:not(.native-controls):not(.unstyled-controls).teams-page .team-panel .team-plugin-filter .team-search-field input[type=search]{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:38px;height:38px;margin:0;padding:8px 12px 8px 38px;font-size:13px;line-height:1.4}
body:not(.native-controls):not(.unstyled-controls).teams-page .team-panel .team-plugin-filter .team-filter-field select{box-sizing:border-box;width:100%;min-width:0;max-width:none;min-height:38px;height:38px;margin:0;padding-block:7px;font-size:13px;line-height:1.4}
body:not(.native-controls):not(.unstyled-controls).teams-page .team-panel .team-search-row>button{align-self:stretch;min-width:0;min-height:38px;height:38px;margin:0;padding:7px 14px;font-size:13px;white-space:nowrap}
.teams-page .team-filter-feedback{margin:0;font-size:13px}
.teams-page [hidden]{display:none!important}
.teams-page .hh-pagination{margin-block:14px}
.teams-grid .catalog-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
.team-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);padding:0;text-align:left}
.team-card-meta button{background:transparent;border:0;color:var(--muted);font-size:12px;min-height:30px;padding:0 4px}
body:not(.native-controls):not(.unstyled-controls) .portal-main .team-card-meta>button{background:transparent;border-color:transparent;box-shadow:none;transition:color .16s ease}
body:not(.native-controls):not(.unstyled-controls) .portal-main .team-card-meta>button:is(:hover,:focus-visible,:active){background:transparent;border-color:transparent;box-shadow:none;color:var(--accent)}
.team-empty{padding:32px 22px;border:1px dashed var(--line);border-radius:12px;text-align:center;color:var(--muted);line-height:1.8}
.team-empty:only-child{grid-column:1/-1}
.team-empty h3{color:var(--text);margin:0 0 8px}
.team-empty p{margin:0}

/* Member, settings and invitation surfaces retain their established grouping. */
.team-member-list{display:flex;flex-direction:column;gap:10px}
.team-member{display:flex;align-items:center;gap:14px;padding:16px 18px;border:1px solid var(--line);border-radius:10px;min-width:0}
.team-member .team-member-copy{flex:1;min-width:0}
.team-member strong{display:block;overflow-wrap:anywhere}
.team-member small{display:block;color:var(--muted);font-size:12px;margin-top:5px}
.team-member .team-actions{flex-shrink:0}
.team-invitations{margin:0 0 20px;padding:0 0 20px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
.team-invitations h3{margin:0 0 16px}
.team-invitations .team-member{background:#171b1c;margin-top:10px}
.team-invitations .team-invitation-target{border-color:var(--accent,#eab783);box-shadow:inset 0 0 0 1px #eab78355;scroll-margin-block:110px;outline:none}
.team-settings-block{padding:0 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;margin:0 0 24px}
.team-settings-block:last-child{padding-bottom:0;margin-bottom:0;border-bottom:0}
.team-settings-block h3{margin:0 0 10px}
.team-settings-block p{color:var(--muted);line-height:1.8}
.team-settings-block.danger{border-color:#c4756545}
.team-danger-button{color:#ec9e92!important;border-color:#c4756570!important}
.team-notice{scroll-margin-top:110px}
.team-help-link{font-size:13px;color:var(--accent)}
.team-private-notice{color:var(--muted);font-size:13px;line-height:1.8;margin:14px 0 0}
.team-plugin-banner{padding:14px 18px;border:1px solid #eab78340;border-radius:10px;margin-bottom:20px;color:var(--muted);line-height:1.8}
.team-plugin-banner a{color:var(--accent)}

/* Team dialogs preserve their independent scrolling and form ownership. */
.team-dialog{width:min(720px,calc(100vw - 28px));max-height:90dvh;padding:0}
.team-dialog header{padding:14px 20px}
.team-dialog header h2{margin:0;font-size:21px}
.team-dialog-body{padding:20px;overflow:auto;min-height:0;text-align:left}
.team-dialog footer{display:flex;justify-content:flex-end;gap:10px;padding:12px 20px;border-top:1px solid var(--line)}
.team-dialog p{color:var(--muted);line-height:1.8}
.team-dialog .portal-field{margin-bottom:18px}
.team-dialog .team-filter select{flex:0 0 150px;min-width:140px}
.team-share-results{display:flex;flex-direction:column;gap:10px;margin-top:18px;min-height:100px}
.team-share-result{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid var(--line);border-radius:10px}
.team-share-result img{width:42px;height:42px;border-radius:8px;object-fit:contain}
.team-share-result>div{flex:1;min-width:0}
.team-share-result strong{display:block;overflow-wrap:anywhere}
.team-share-result small{display:block;color:var(--muted);margin-top:5px}
.team-share-result button{flex-shrink:0;min-width:74px}
@container team-workspace (max-width:720px){
 .team-header{gap:18px}
 .team-workspace-title{flex-wrap:wrap;gap:8px 12px}
 .team-selector .teams-list{left:auto;right:0}
 .team-section-navigation{gap:12px}
 .teams-page #portal .team-tabs{gap:18px}
 .team-workspace-utilities{gap:12px}
}
@media(max-width:800px){.team-member{padding:14px;flex-wrap:wrap}.team-member .team-actions{margin-left:auto}.team-filter{flex-wrap:wrap}.team-filter input{flex-basis:100%}.team-filter select{flex:1;max-width:none}}
@media(max-width:600px){
 .team-header{flex-wrap:wrap;gap:14px;margin-bottom:8px;padding-bottom:8px}
 .team-workspace-identity{flex-basis:100%}
 .teams-page #portal .team-workspace-title>h2{font-size:22px;max-width:calc(100% - 110px)}
 .team-workspace-title{flex-wrap:nowrap;gap:12px}
 .team-workspace-description{font-size:12px}
 .team-selector-metadata{gap:4px 10px;font-size:11px;margin-top:8px}
 .team-role{font-size:11px}
 .team-selector-metadata>span+span::before{margin-right:8px}
 .team-workspace-actions{width:100%;gap:8px}
 body:not(.native-controls):not(.unstyled-controls).teams-page #portal .team-workspace-actions>button{flex:1}
 .team-section-navigation{gap:10px}
 .teams-page #portal .team-tabs{gap:17px}
 body:not(.native-controls):not(.unstyled-controls).teams-page #portal .team-tabs[role=tablist]>button[role=tab]{padding-inline:0;font-size:13px}
 .team-workspace-utilities{gap:10px}
 body:not(.native-controls):not(.unstyled-controls).teams-page #portal .team-workspace-utilities>:is(button,a){font-size:11px}
 .team-workspace-help .team-action-label{display:none}
 .team-workspace-help .team-action-icon>.hh-icon{width:17px;height:17px}
 .team-panel:has(>.team-member-list,>.team-settings-block){padding:16px}
 .teams-page .team-search-row{grid-template-columns:repeat(3,minmax(0,1fr))}
 .teams-page .team-search-row>.team-search-field{grid-column:1/-1}
 .teams-page .team-filter-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 .team-invitations{padding:0 0 18px}
 .team-invitations .team-member{gap:10px}
 .team-settings-block{padding:0 0 20px}
 .team-settings-block:last-child{padding-bottom:0}
 .team-dialog footer{flex-wrap:wrap}
 .team-share-result{gap:10px}
 .team-share-result button{min-width:64px;padding-inline:10px}
}
@media(max-width:360px){.team-section-navigation{flex-wrap:wrap;gap:0}.team-workspace-utilities{margin-left:auto;padding-bottom:5px}.teams-page #portal .team-tabs{flex:1;justify-content:space-between}}
