/* Team and management pages: layout only, preserving original Django/JS actions. */
.app-page main.dashboard-shell.team-shell{width:100%;max-width:1720px;margin:0 auto;gap:21px;min-width:0}
.team-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.team-flow>div{display:flex;align-items:center;gap:10px;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-line);border-radius:14px;padding:14px;font-size:12px;font-weight:750}
.team-flow b{width:32px;height:32px;display:grid;place-items:center;background:var(--ui-brand-soft);color:var(--ui-brand);border-radius:10px}
.app-page .team-shell .team-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.app-page .team-shell .team-stat-card{background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:17px;padding:20px;min-height:104px;gap:13px}
.app-page .team-shell .team-stat-icon{width:42px;height:42px;border-radius:13px;background:var(--ui-brand-soft);color:var(--ui-brand)}
.app-page .team-shell .team-stat-card strong{font-size:17px;color:var(--ui-text);font-weight:850}
.app-page .team-shell .team-stat-card span{color:var(--ui-muted);font-size:11px}
.app-page .team-shell .team-management-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.app-page .team-shell .team-card,.app-page .team-shell .team-members-panel{border:1px solid var(--ui-line);border-radius:19px;background:var(--ui-surface);padding:clamp(19px,2.2vw,29px);gap:16px;min-width:0}
.app-page .team-shell .team-card-heading,.app-page .team-shell .team-members-heading{padding-bottom:15px;border-bottom:1px solid var(--ui-line)}
.app-page .team-shell .team-card-heading h2,.app-page .team-shell .team-members-heading h2{color:var(--ui-text);font-size:17px}
.app-page .team-shell .team-card-icon{color:var(--ui-brand);width:21px;height:21px}
.app-page .team-shell .team-card-hint{color:var(--ui-muted);font-size:11px}
.app-page .team-shell .team-workspace-summary{background:var(--ui-soft);border:1px solid var(--ui-line);border-radius:14px;min-height:74px;padding:16px}
.app-page .team-shell .team-workspace-summary span{color:var(--ui-muted);font-size:11px}
.app-page .team-shell .team-workspace-summary strong{color:var(--ui-text);font-size:16px}
.app-page .team-shell .team-field>span{color:var(--ui-text);font-size:12px}
.app-page .team-shell .team-field input,.app-page .team-shell .team-field select{min-height:48px;background:var(--ui-soft);color:var(--ui-text);border:1px solid var(--ui-line);border-radius:11px}
.app-page .team-shell .team-inline-form .button,.app-page .team-shell .team-stack-form .button{min-height:48px;border-radius:11px}
.app-page .team-shell .team-invite-result{background:var(--ui-brand-soft);border-color:var(--ui-brand);border-radius:13px;padding:14px}
.app-page .team-shell .team-invite-result strong{color:var(--ui-brand)}
.app-page .team-shell .team-members-table-wrap{border:1px solid var(--ui-line);border-radius:14px;overflow-x:auto}
.app-page .team-shell .team-members-table-head{background:var(--ui-soft);color:var(--ui-muted);border-radius:0;min-height:44px}
.app-page .team-shell .team-members-list>article{min-height:68px;border-color:var(--ui-line);padding:13px}
.app-page .team-shell .team-member-avatar{background:var(--ui-brand-soft);color:var(--ui-brand);border-radius:12px;width:39px;height:39px}
.app-page .team-shell .team-member-copy strong{color:var(--ui-text);font-size:12px}
.app-page .team-shell .team-member-copy small,.app-page .team-shell .team-member-username{color:var(--ui-muted);font-size:11px}
.app-page .team-shell .team-role-chip{background:var(--ui-brand-soft);color:var(--ui-brand);border-radius:10px;font-size:11px;padding:7px 12px}
.app-page .team-shell .team-role-select{background:var(--ui-soft);color:var(--ui-text);border:1px solid var(--ui-line);min-height:37px;border-radius:10px}
.app-page .billing-shell .management-hero,.app-page .automation-shell .management-hero{grid-template-columns:1fr;min-height:210px}
.app-page .billing-shell .management-hero-actions{margin-top:18px;justify-content:flex-start}
.app-page .billing-shell .management-hero-actions .button{min-height:44px;border-radius:11px}
.app-page .billing-shell .management-hero-actions .button-primary{background:#77e6df;color:#091321;border:1px solid #77e6df}
.app-page .billing-shell .management-hero-actions .button-secondary{background:#111f30;color:#edf4fc;border:1px solid #42586a}
.app-page .billing-shell .management-list-card{gap:17px}
.app-page .billing-shell .management-list-card h2{font-size:19px;color:var(--ui-text)}
.app-page .billing-shell .management-list-intro{font-size:12px;color:var(--ui-muted)}
.app-page .billing-shell .billing-search{background:var(--ui-soft);border-radius:14px;padding:15px;grid-template-columns:minmax(130px,.8fr) minmax(0,2fr) auto}
.app-page .billing-shell .billing-search label,.app-page .billing-shell .billing-price-form label{font-size:12px;color:var(--ui-text)}
.app-page .billing-shell .billing-search input,.app-page .billing-shell .billing-price-form input,.app-page .billing-shell .billing-form input:not([type=checkbox]),.app-page .billing-shell .billing-form select{border:1px solid var(--ui-line);border-radius:11px;background:var(--ui-surface);color:var(--ui-text);min-height:46px}
.app-page .billing-shell .billing-table th,.app-page .billing-shell .billing-table td{padding:15px;border-color:var(--ui-line);font-size:12px}
.app-page .billing-shell .billing-table a{color:var(--ui-brand);font-weight:750}
.app-page .billing-shell .billing-price-form{padding:17px 0;border-bottom:1px solid var(--ui-line)}
.app-page .billing-shell .billing-form .helptext,.app-page .billing-shell .billing-hint{color:var(--ui-muted);font-size:11px;line-height:2}
@media(max-width:1050px){.app-page .team-shell .team-management-grid,.app-page .billing-shell .billing-columns{grid-template-columns:1fr}}
@media(max-width:760px){.team-flow{grid-template-columns:1fr;gap:8px}.team-flow>div{padding:11px}
 /* Give the workspace name enough room on narrow phones, keeping role/count paired below. */
 .app-page .team-shell .team-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .app-page .team-shell .team-stats>.team-stat-card:first-child{grid-column:1/-1;min-height:79px;display:flex}
 .app-page .team-shell .team-stats>.team-stat-card:first-child strong{font-size:16px;white-space:normal;overflow-wrap:anywhere}
 .app-page .team-shell .team-stat-card{min-height:103px;display:grid;padding:12px;gap:8px}
 .app-page .team-shell .team-stat-icon{width:30px;height:30px}
 .app-page .team-shell .team-stat-card strong{font-size:14px}
 .app-page .team-shell .team-stat-card span{font-size:10px}
 .app-page .team-shell .team-card,.app-page .team-shell .team-members-panel{padding:18px;border-radius:16px}
 .app-page .billing-shell .management-hero-actions{flex-direction:column;align-items:stretch}
 .app-page .billing-shell .management-hero-actions .button{width:100%}
 .app-page .billing-shell .billing-search,.app-page .billing-shell .billing-price-form{grid-template-columns:1fr}
}