/* Admin navigation: existing design tokens, compact groups and contextual detail. */
.nav-principal, .nav-group-links { display: grid; gap: 3px; min-width: 0; }
.nav-principal > .nav-label { margin: 10px 12px 6px; }
.nav-group { border-top: 1px solid #38313f; margin-top: 10px; padding-top: 7px; }
.nav-group > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; color: #d5cedf; font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; border-radius: 10px; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: #292331; color: #fff; }
.nav-group > summary svg { flex: none; }
.nav-group[open] > summary svg { transform: rotate(90deg); }
.nav-group-links { padding-top: 3px; }
.side-nav .side-link { min-height: 44px; }
.side-nav .side-link span { min-width: 0; overflow-wrap: anywhere; }
.sidebar-bottom { padding-top: 16px; }
.topbar { gap: 16px; flex-wrap: wrap; }
.topbar-left { flex: 1 1 240px; }
.topbar-left > div { min-width: 0; }
.topbar h1 { overflow-wrap: anywhere; }
.topbar-user { color: inherit; text-decoration: none; flex: 0 0 auto; }
.topbar-user > span:first-child { max-width: 150px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.header-search { display: flex; align-items: center; gap: 4px; flex: 0 1 290px; min-width: 0; margin: 0; background: #fff; border: 1px solid #e1dce9; border-radius: 14px; padding: 2px; }
.header-search:focus-within { outline: 2px solid #7a3cff; outline-offset: 2px; }
.header-search input { min-width: 0; width: 100%; border: 0; background: transparent; box-shadow: none; margin: 0; padding: 10px; }
.header-search input:focus { outline: none; box-shadow: none; }
.header-search button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 11px; background: #f3edff; color: #6231ca; border: 0; }
.client-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: -4px 0 20px; }
.client-overview { border-top: 3px solid #7a3cff; }
.client-overview-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.client-overview-heading > div { min-width: 0; }
.client-overview-heading h2 { margin: 4px 0; overflow-wrap: anywhere; }
.client-overview-heading p { margin: 0; }
.overview-eyebrow, .setup-eyebrow { font-size: 12px; font-weight: 700; color: #635b72; }
.client-overview-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.client-overview-facts dt { margin: 0 0 6px; font-size: 12px; color: #6d6579; }
.client-overview-facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.client-next-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px; border-radius: 12px; background: #f5f0ff; }
.client-next-action > div { min-width: 0; flex: 1 1 220px; }
.client-next-action strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.setup-progress { border-left: 4px solid #7a3cff; }
.setup-eyebrow { margin: 0 0 12px; }
.client-tabs { flex-wrap: wrap; overflow: visible; padding-bottom: 0; gap: 6px; }
.client-tabs a { text-align: center; font-size: 13px; padding: 12px 14px; }
.wizard-step, .setup-wizard { scroll-margin-top: 24px; }
.client-activity > summary { cursor: pointer; font-weight: 700; min-height: 44px; }
.client-activity > summary > span { font-size: 12px; font-weight: 400; margin-left: 8px; }
.client-activity[open] > summary { margin-bottom: 20px; }
.legal-admin { min-width: 0; }
.legal-admin > p { margin-bottom: 20px; }
.legal-version > summary { cursor: pointer; min-height: 44px; overflow-wrap: anywhere; font-weight: 700; }
.legal-version[open] > summary { margin-bottom: 20px; }
.legal-admin .legal-edit-form { display: block; min-width: 0; margin: 20px 0; }
.legal-admin .legal-edit-form > button { margin-top: 16px; }
.legal-admin .legal-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; padding-top: 20px; margin-top: 24px; border-top: 1px solid #e6e1eb; }
.legal-admin .legal-actions form { display: flex; flex: 0 1 auto; min-width: 0; margin: 0; }
.legal-admin button, .legal-admin .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.legal-admin input, .legal-admin textarea, .legal-admin select { min-width: 0; max-width: 100%; }
@media (max-width: 1100px) {
    .topbar-user > span:first-child { display: none; }
    .client-overview-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .topbar-left { flex-basis: 100%; }
    .header-search { flex-basis: 100%; max-width: 100%; }
    .nav-group > summary { min-height: 48px; }
    .client-tabs a { flex: 1 1 110px; }
}
@media (max-width: 600px) {
    .client-next-action > .btn { width: 100%; }
    .client-tabs a { flex-basis: calc(50% - 6px); }
    .client-tools > a { flex: 1 1 140px; }
    .legal-admin .legal-actions { flex-direction: column; }
    .legal-admin .legal-actions form, .legal-admin .legal-actions button, .legal-admin .legal-edit-form > button { width: 100%; }
}
.company-sections{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.company-sections a{padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;text-decoration:none;font-size:13px}
.company-sections a:hover{background:#f3edff}
.company-list{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.company-list>section{display:grid;grid-template-columns:175px minmax(0,1fr);gap:20px;padding:18px 22px;scroll-margin-top:20px}
.company-list>section+section{border-top:1px solid var(--line)}
.company-list>section:target{background:#faf7ff}
.company-list h2{font-size:15px;margin:0}.company-list p{font-size:13px;margin:0 0 10px;color:var(--muted);max-width:820px}
.company-list a{font-size:13px;font-weight:650}
.company-links{display:flex;gap:12px 24px;flex-wrap:wrap}
.company-channels{display:flex;flex-wrap:wrap;gap:12px 32px;margin:0 0 12px;font-size:13px}
.company-channels dt{font-weight:650}.company-channels dd{margin:3px 0 0;color:var(--muted)}
.company-return{margin-bottom:16px;font-size:13px}
@media(max-width:650px){.company-list>section{grid-template-columns:1fr;gap:8px;padding:16px}}
.admin-build-marker{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.admin-build-dot{display:inline-block;width:8px;height:8px;border:1px solid #ffffff80;border-radius:2px}

/* Profile context stays in the header on desktop and mobile. */
.profile-menu { position: relative; flex: 0 1 auto; min-width: 0; margin-left: auto; }
.profile-menu > .topbar-user { display: flex; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; border-radius: 10px; padding: 4px; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary:focus-visible { outline: 2px solid #7a3cff; outline-offset: 3px; }
.profile-menu > .topbar-user > .profile-context { display: grid; gap: 1px; max-width: 300px; min-width: 0; text-align: right; line-height: 1.3; overflow: visible; text-overflow: clip; white-space: normal; }
.profile-context > * { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.profile-context .profile-name, .profile-context small { font-size: 11px; color: var(--muted); }
.profile-context strong { font-size: 13px; }
.profile-menu .user-avatar { flex: none; }
.profile-chevron { flex: none; }
.profile-menu[open] .profile-chevron { transform: rotate(180deg); }
.profile-menu-content { width: 240px; }
.profile-menu-content button[type=submit] { width: 100%; justify-content: flex-start; min-height: 44px; background: transparent; color: #343745; border: 0; box-shadow: none; padding: 10px 12px; font-weight: 550; }
.profile-menu-content button[type=submit]:hover { background: #f3edff; transform: none; }
@media (max-width: 800px) {
    .topbar-left { flex: 1 1 120px; }
    .profile-menu { flex: 0 1 240px; max-width: 100%; }
    .profile-menu > .topbar-user > .profile-context { display: grid; max-width: 180px; }
    .profile-menu .profile-name { display: none; }
    .header-search { order: 3; }
}
@media (max-width: 420px) {
    .topbar { gap: 8px; }
    .topbar-left { gap: 8px; flex-basis: 100px; }
    .profile-menu { flex-basis: auto; max-width: 100%; }
    .profile-menu > .topbar-user > .profile-context { max-width: 180px; }
    .profile-menu .profile-chevron { display: none; }
}
