body.shell-v2 {
    --svs-surface: var(--card-bg);
    --svs-band: var(--sv2-side);
    --svs-amber: var(--color-amber-800);
    --svs-avatar-light: 91%;
    --svs-avatar-ink: 28%;
}
html.os-dark body.shell-v2 {
    --svs-surface: var(--dk-surface);
    --svs-band: var(--dk-surface2);
    --svs-amber: var(--color-amber-300);
    --svs-avatar-light: 22%;
    --svs-avatar-ink: 82%;
}
body.shell-v2 :is(#settingsPanel, #myPageOverlay, .svs-sound, #globalViewContent:is([data-view="team"],[data-view="clients"],[data-view="permissions"])) {
    color: var(--sv2-ink);
    accent-color: var(--sv2-accent);
}
body.shell-v2 #globalViewContent:is([data-view="team"],[data-view="clients"],[data-view="permissions"]) {
    max-width: 1280px; margin-inline: auto; padding: clamp(12px, 2vw, 28px);
}
body.shell-v2 .svs-header {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    border-bottom: 1px solid var(--sv2-line); padding-bottom: 14px; margin-bottom: 18px;
}
body.shell-v2 .svs-header h2 { font-size: var(--fs-metric-title); line-height: 1.3; font-weight: 750; }
body.shell-v2 .svs-header p { color: var(--sv2-sub); font-size: var(--fs-base); margin-top: 4px; }
body.shell-v2 .svs-header button { min-height: 36px; }
body.shell-v2 :is(#settingsPanel, #myPageOverlay, .svs-sound, .svs-dialog, .cl-modal, #globalViewContent:is([data-view="team"],[data-view="clients"]))
    :is(button, select, textarea, input:not([type="checkbox"],[type="radio"],[type="file"],[type="range"])) {
    border-radius: var(--sv2-control-radius) !important;
}
body.shell-v2 :is(#settingsPanel, #myPageOverlay, .svs-sound, .svs-dialog, .cl-modal, #globalViewContent:is([data-view="team"],[data-view="clients"]))
    :is(.btn-primary,.svs-save,button.bg-indigo-600,button.bg-slate-700,#pendingUsersList button.bg-emerald-600) {
    background: var(--sv2-primary) !important; color: var(--sv2-on-primary) !important;
    border-color: var(--sv2-primary) !important; box-shadow: none !important;
}
body.shell-v2 #settingsPanel, body.shell-v2 #settingsPanel .sp-header {
    background: var(--svs-surface); border-bottom: 1px solid var(--sv2-line); color: var(--sv2-ink);
}
body.shell-v2 #settingsPanel .sp-header :is(h2,button) { color: var(--sv2-ink); }
body.shell-v2 #settingsPanel .sp-body { background: var(--sv2-side); }
body.shell-v2 #settingsContent {
    --bg-secondary: var(--svs-surface); --border-color: var(--sv2-line);
    --text-primary: var(--sv2-ink); --text-secondary: var(--sv2-sub);
    gap: 12px;
}
body.shell-v2 #settingsPanel .settings-card { border-radius: 12px; box-shadow: none; padding: 18px; }
body.shell-v2 #settingsPanel :is(.settings-scope,.settings-branding summary,.settings-section-icon) {
    background: var(--svs-band); color: var(--sv2-sub); border-color: var(--sv2-line);
}
body.shell-v2 #settingsPanel :is(.settings-branding,.settings-save-row,.settings-field input,.settings-image-preview) { border-color: var(--sv2-line); }
body.shell-v2 #settingsPanel .settings-image-preview { background: white; }
body.shell-v2 #settingsPanel [for="myEmail"] { grid-column: 1 / -1; }
body.shell-v2 #settingsPanel :is(.svs-original,[aria-labelledby="settingsManageTitle"],[aria-labelledby="settingsNotiTitle"] > .settings-hint) { display: none; }
@layer base {
    body.shell-v2 #settingsPanel .svs-copy, body.shell-v2 #settingsPanel .settings-image-preview[hidden] + .svs-missing { display: inline !important; }
}
body.shell-v2 #settingsPanel .svs-missing { color: var(--sv2-sub); font-size: var(--fs-meta); }
body.shell-v2 #settingsPanel[data-svs-staff] :is(.settings-card:not([aria-labelledby="settingsNotiTitle"]),.sp-header p) { display: none !important; }
body.shell-v2 #settingsPanel [data-svs-blocked] [data-arg="enable"] { display: none; }
body.shell-v2 #settingsPanel [data-svs-blocked] .settings-noti-status, body.shell-v2 .svs-warning {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 6px 10px;
    border-inline-start: 3px solid var(--svs-amber); color: var(--svs-amber);
    background: color-mix(in srgb, var(--svs-amber) 9%, var(--svs-surface)); font-size: var(--fs-meta);
}
body.shell-v2 #globalViewContent[data-view="clients"] .svs-warning :is(span,button) { color: var(--svs-amber) !important; }
body.shell-v2 .svs-warning { margin: 6px 0 12px; }
body.shell-v2 .svs-warning button, body.shell-v2 .svs-link { text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
body.shell-v2 #settingsPanel #settingsPanelTitle:focus,
body.shell-v2 #settingsPanel :focus:not(:focus-visible) { outline: none; box-shadow: none; }
body.shell-v2 #settingsPanel :focus-visible:not(#settingsPanelTitle) { outline: 2px solid var(--sv2-accent); outline-offset: 2px; }
body.shell-v2 :is(.settings-branding,.svs-password,.svs-devices details) > summary { list-style: none; cursor: pointer; }
body.shell-v2 :is(.settings-branding,.svs-password,.svs-devices details,.svs-overflow) > summary::-webkit-details-marker { display: none; }
body.shell-v2 :is(.settings-branding,.svs-password,.svs-devices details) > summary::after,
body.shell-v2 .svs-fold::after, body.shell-v2 .svs-chevron {
    content: ''; display: inline-block; width: 7px; height: 7px; border: solid currentColor;
    border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); margin-inline: 8px;
}
body.shell-v2 details[open] > summary::after, body.shell-v2 .svs-fold[aria-expanded="true"]::after,
body.shell-v2 [aria-expanded="true"] > .svs-chevron { transform: rotate(45deg); }
body.shell-v2 .svs-notice { padding: 10px 12px; border-inline-start: 3px solid var(--sv2-accent); background: var(--sv2-soft); font-size: var(--fs-base); }
body.shell-v2 #globalViewContent .svs-permissions { display: table !important; table-layout: fixed; width: 100%; margin-top: 16px; border-collapse: collapse; font-size: var(--fs-base); color: var(--sv2-ink); }
body.shell-v2 .svs-permissions :is(td,th) { padding: 7px 5px; border-bottom: 1px solid var(--sv2-line); text-align: center; }
body.shell-v2 .svs-permissions th:first-child { text-align: left; }
body.shell-v2 .svs-permissions thead th:first-child { width: 52%; }
body.shell-v2 #globalViewContent .svs-permissions :is(td,th) { white-space: normal !important; overflow-wrap: anywhere; }
body.shell-v2 #globalViewContent .svs-permissions thead { display: table-header-group; }
body.shell-v2 #globalViewContent .svs-permissions tbody { display: table-row-group; }
body.shell-v2 #globalViewContent .svs-permissions tr { display: table-row; }
body.shell-v2 .svs-permissions tbody th[scope="row"] { font-weight: 500; }
body.shell-v2 .svs-permissions :is(thead,.svs-group) { background: var(--svs-band); color: var(--sv2-sub); font-size: var(--fs-meta); }
body.shell-v2 .svs-permissions .svs-group {
    padding-inline: 10px; font-weight: 750; color: var(--sv2-ink) !important;
    background: color-mix(in srgb, var(--sv2-ink) 8%, var(--svs-surface)) !important;
}
html.os-dark body.shell-v2 .svs-permissions th[scope="row"] { background: transparent !important; color: inherit !important; }
body.shell-v2 #teamMembersList .svs-chevron { color: var(--sv2-sub) !important; }
body.shell-v2 #pendingUsersSection :is(h3,#pendingUsersCount) { color: var(--sv2-sub) !important; }
body.shell-v2 #pendingUsersSection[data-svs-pending] :is(h3,#pendingUsersCount) { color: var(--svs-amber) !important; }
html.os-dark body.shell-v2 #teamMembersList .rounded-full.bg-slate-100 {
    background: var(--dk-line2) !important; color: var(--dk-text2) !important;
}
body.shell-v2 #teamMembersList :is([class*="text-[10px]"],[class*="text-[11px]"],.text-xs) { font-size: var(--fs-meta); }
body.shell-v2 :is(#teamMembersList,#pendingUsersSection) .svs-avatar { background: hsl(var(--svs-hue) 50% var(--svs-avatar-light)); color: hsl(var(--svs-hue) 52% var(--svs-avatar-ink)); }
body.shell-v2 #teamMembersList .svs-grants { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px 10px; }
body.shell-v2 #teamMembersList .svs-grants label { margin: 0; min-height: 32px; }
body.shell-v2 #teamMembersList .svs-grants p { grid-column: 1/-1; }
body.shell-v2 #teamMembersList button { min-height: 32px; font-size: var(--fs-meta); }
body.shell-v2 #teamMembersList .svs-save { display: block; margin-inline-start: auto; min-width: 80px; }
body.shell-v2 .svs-delete { border-top: 1px solid var(--sv2-line); padding-top: 12px; }
body.shell-v2 #teamMembersList .tm-del-btn { background: var(--svs-surface); color: var(--sv2-warn); border-color: var(--sv2-line); }
body.shell-v2 .svs-devices details { border-bottom: 1px solid var(--sv2-line); }
body.shell-v2 .svs-devices summary { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: var(--fs-meta); color: var(--sv2-sub); }
body.shell-v2 .svs-devices strong { color: var(--sv2-ink); overflow-wrap: anywhere; }
body.shell-v2 .svs-devices summary span:last-of-type { margin-inline-start: auto; }
body.shell-v2 .svs-devices details button { border: 1px solid var(--sv2-line); color: var(--sv2-sub); border-radius: 6px; padding-inline: 8px; }
body.shell-v2 .svs-empty { padding: 32px 12px; text-align: center; background: var(--sv2-side); }
body.shell-v2 #settingsPanel .sp-header p, body.shell-v2 .svs-empty strong,
body.shell-v2 :is(#pendingUsersList,#teamMembersList,#clientListArea) > .text-slate-400 { color: var(--sv2-sub) !important; }
body.shell-v2 .svs-empty strong { display: block; font-size: var(--fs-body); }
body.shell-v2 .svs-empty button { color: var(--sv2-accent); margin: 6px; font-size: var(--fs-base); }
body.shell-v2 .svs-overflow { position: relative; }
body.shell-v2 .svs-overflow summary, body.shell-v2 .svs-password summary { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; border: 1px solid var(--sv2-line); border-radius: 6px; padding: 3px 10px; cursor: pointer; }
body.shell-v2 .svs-overflow > div { position: absolute; z-index: 2; top: 100%; inset-inline-start: 0; display: grid; min-width: 100px; padding: 4px; border: 1px solid var(--sv2-line); border-radius: 8px; background: var(--svs-surface); }
body.shell-v2 .svs-password[open] > button { display: block; margin-top: 6px; }
body.shell-v2 #myPageOverlay input { min-width: 0; }
body.shell-v2 #myPageOverlay [role="dialog"], body.shell-v2 .svs-sound,
body.shell-v2 .svs-sound :is(.os-modal-header,.os-modal-body,.os-modal-close) { background: var(--svs-surface); color: var(--sv2-ink); border-color: var(--sv2-line); }
body.shell-v2 .svs-sound .os-modal-header h3 { color: var(--sv2-ink); }
body.shell-v2 .mobile-user-menu-item svg { display: none; }
html.os-dark body.shell-v2 #teamMembersList :is([class*="bg-red-"],[class*="bg-blue-"],[class*="bg-emerald-"],[class*="bg-amber-"]):not(.svs-avatar,.svs-save),
html.os-dark body.shell-v2 #globalViewContent[data-view="clients"] :is([class*="bg-blue-50"],[class*="bg-emerald-50"],[class*="bg-amber-50"]),
html.os-dark body.shell-v2 #myPageOverlay .bg-indigo-100 {
    background: var(--sv2-soft); color: var(--sv2-ink); border-color: var(--sv2-line);
}
body.shell-v2 .svs-db-filters { display: contents; }
@media (max-width: 640px) {
    body.shell-v2 .svs-permissions thead th:first-child { width: 46%; }
    body.shell-v2 #globalViewContent .svs-db-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
    body.shell-v2 #globalViewContent[data-view="clients"] .svs-db-toolbar #clientSearch { min-width: 0; width: 100%; }
    body.shell-v2 .svs-db-toolbar .svs-view-toggle { grid-area: 1 / 2; }
    body.shell-v2 .svs-db-toolbar .svs-db-filters { display: flex; gap: 8px; grid-column: 1 / -1; }
    body.shell-v2 #globalViewContent .svs-db-toolbar select { flex: 1 1 0; min-width: 0; width: 0; }
    body.shell-v2 #settingsPanel [aria-labelledby="settingsNotiTitle"] { order: -1; }
    @layer base { body.shell-v2 #settingsPanel .svs-fold { display: grid !important; } }
    body.shell-v2 #settingsPanel .svs-fold { place-items: center; width: 40px; height: 36px; margin-inline-start: auto; }
    body.shell-v2 #settingsPanel .svs-fold + .settings-scope { margin-inline-start: auto; order: 1; }
    body.shell-v2 #settingsPanel .svs-fold { order: 2; margin-inline-start: 0; }
    body.shell-v2 #settingsPanel [aria-labelledby="settingsCompanyTitle"]:not([data-svs-expanded]) > :not(.settings-section-heading) { display: none; }
    body.shell-v2 #teamMembersList .svs-grants { grid-template-columns: repeat(2,minmax(0,1fr)); }
    body.shell-v2 :is(#myPageOverlay,#teamMembersList,#globalViewContent[data-view="clients"]) :is(input:not([type="checkbox"]),select) { font-size: var(--fs-title); }
}
body.shell-v2 #settingsPanel .settings-design-toggle { display: flex; align-items: center; gap: 8px; min-height: 40px; justify-content: flex-start; }
body.shell-v2 #settingsPanel #shellV2Toggle { flex: none; width: 20px; margin: 0; }
body.shell-v2 #settingsPanel [aria-labelledby="settingsShellV2Title"] .settings-description { margin-bottom: 4px; }
body.shell-v2 #settingsPanel .settings-design-toggle select { padding: 5px 8px; border: 1px solid var(--sv2-line); border-radius: 6px; }
body.shell-v2 :is(.cl-modal,.cl-modal-foot,.svs-dialog,.svs-dialog .os-modal-header,.svs-dialog .os-modal-close) {
    background: var(--svs-surface); color: var(--sv2-ink); border-color: var(--sv2-line);
}
body.shell-v2 #globalViewContent[data-view="clients"] [class*="text-["],
body.shell-v2 #pendingUsersSection [class*="text-[1"] { font-size: var(--fs-meta); }
body.shell-v2 #globalViewContent[data-view="clients"] h3 { overflow-wrap: anywhere; }
body.shell-v2 #globalViewContent[data-view="clients"] #clientSearch { min-width: min(100%, 13em); }

html.os-dark body.shell-v2 #globalViewContent .svs-view-toggle button[aria-pressed="true"] {
    border: 1px solid var(--sv2-accent) !important; background: var(--sv2-soft) !important; color: var(--sv2-accent) !important;
}
