.settings-workspace { background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 12px; overflow: hidden; }
.settings-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--border, #e2e8f0); padding-inline: 20px; gap: 24px; }
.settings-tab { flex: 0 0 auto; padding: 18px 4px 14px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--muted, #64748b); font: inherit; font-weight: 600; cursor: pointer; }
.settings-tab[aria-selected="true"] { border-bottom-color: var(--primary, #0d9488); color: var(--primary, #0d9488); }
.settings-tab:hover, .settings-section:hover { background: var(--surface-sunken, #f8fafc); }
.settings-tab:focus-visible, .settings-section:focus-visible { outline: 2px solid var(--primary, #0d9488); outline-offset: -3px; }
.settings-workspace__body { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 520px; }
.settings-sections { border-inline-end: 1px solid var(--border, #e2e8f0); padding: 18px 12px; min-width: 0; }
.settings-sections__search { width: 100%; min-width: 0; margin-bottom: 16px; }
.settings-sections__list { display: flex; flex-direction: column; gap: 4px; }
.settings-section { width: 100%; border: 0; border-radius: 6px; padding: 12px; text-align: start; background: transparent; color: var(--text, #0f172a); font: inherit; font-size: 13px; cursor: pointer; }
.settings-section.is-active { background: var(--surface-sunken, #f1f5f9); color: var(--primary, #0d9488); font-weight: 700; }
.settings-panel { min-width: 0; padding: 24px; }
.settings-panel .settings-grid { display: block; }
.settings-panel .settings-grid > .card { margin: 0; border: 0; box-shadow: none; padding: 0; border-radius: 0; background: transparent; }
.settings-panel .settings-grid > .card[hidden] { display: none !important; }
section[data-tab="settings"].settings-tabbed-page.active { display: block; columns: auto; max-width: 1440px; }
.settings-tabbed-page > #setNav[hidden], .settings-tabbed-page > .settings-group[hidden] { display: none !important; }
.settings-tabbed-page .settings-panel .card > h2 { cursor: default; margin: 0 0 18px; background: transparent; border: 0; }
.settings-tabbed-page .settings-panel .card > h2::after { content: none; }
.settings-tabbed-page .settings-panel input:not([type=checkbox]):not([type=radio]):not([type=color]), .settings-tabbed-page .settings-panel select { max-width: 100%; box-sizing: border-box; }
@media (max-width: 720px) {
  .settings-tabs { padding-inline: 12px; gap: 18px; }
  .settings-workspace__body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .settings-sections { border-inline-end: 0; border-bottom: 1px solid var(--border, #e2e8f0); padding: 12px; }
  .settings-sections__search { margin-bottom: 10px; }
  .settings-sections__list { flex-direction: row; overflow-x: auto; }
  .settings-section { flex: 0 0 auto; width: auto; max-width: 260px; }
  .settings-panel { padding: 18px 12px; }
}

/* Internal menus use consistent rows, matching the customer dossier navigation. */
.settings-workspace__body { grid-template-columns: 270px minmax(0, 1fr); }
.settings-sections { padding: 0; background: #fff; }
.settings-workspace .settings-sections__search { box-sizing: border-box; display: block; width: calc(100% - 32px)!important; max-width: calc(100% - 32px)!important; margin: 16px; height: 38px; font-size: 13px; }
.settings-sections__list { gap: 0; border-top: 1px solid #e2e8f0; }
.settings-workspace .settings-section { display: block; box-sizing: border-box; height: 52px; min-height: 52px; margin: 0; padding: 0 18px; border: 0; border-bottom: 1px solid #e2e8f0; border-inline-start: 3px solid transparent; border-radius: 0; background: #fff; font-size: 13px; font-weight: 400; line-height: 52px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; box-shadow: none; }
.settings-workspace .settings-section:hover { background: #fafcfd; }
.settings-workspace .settings-section.is-active { background: #f4f8f9; border-inline-start-color: #0d9488; color: #0f766e; font-weight: 600; }
@media (max-width: 720px) { .settings-workspace__body { grid-template-columns: minmax(0, 1fr); } .settings-sections__search { margin: 12px 16px; } .settings-sections__list { gap: 0; } .settings-workspace .settings-section { width: auto; height: 48px; min-height: 48px; line-height: 48px; border-inline-start: 0; border-inline-end: 1px solid #e2e8f0; border-bottom: 2px solid transparent; } .settings-workspace .settings-section.is-active { border-bottom-color: #0d9488; } }
html[data-theme="dark"] .settings-sections, html[data-theme="dark"] .settings-workspace .settings-section { background: #15202b; color: #dbe5ef; border-bottom-color: #334155; }
html[data-theme="dark"] .settings-workspace .settings-section.is-active { background: #153b37; color: #8be1d1; }

/* Creation actions belong to the section header, above all lists. */
.settings-section-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px;padding:0 0 14px;border-bottom:1px solid #e2e8f0}.settings-section-header h2{margin:0!important}.settings-create-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.settings-create-toolbar .btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 17px;border-radius:11px;font:inherit;font-size:13px;font-weight:700;line-height:1.4;cursor:pointer;transition:background .15s ease,box-shadow .15s ease,transform .15s ease}.settings-create-toolbar .settings-create-primary{background:linear-gradient(135deg,#0d9488,#0f766e)!important;color:#fff!important;border:1px solid #0f766e!important;box-shadow:0 3px 8px #0f766e20}.settings-create-toolbar .settings-create-secondary{background:#f4f8f9!important;color:#0f766e!important;border:1px solid #b9dcd8!important}.settings-create-toolbar .btn svg{width:18px;height:18px;flex-shrink:0}.settings-create-toolbar .btn:hover{transform:translateY(-1px);box-shadow:0 4px 10px #0f766e26}.settings-create-toolbar .btn:focus-visible{outline:3px solid #99f6e4;outline-offset:3px}.settings-create-toolbar .btn:disabled{opacity:.6;cursor:wait;transform:none}
html[data-theme="dark"] .settings-section-header{border-color:#334155}html[data-theme="dark"] .settings-create-toolbar .settings-create-secondary{background:#172d31!important;color:#99f6e4!important;border-color:#285a59!important}
@media(max-width:720px){.settings-section-header{align-items:flex-start;gap:12px}.settings-create-toolbar{width:100%;gap:8px}.settings-create-toolbar .btn{flex:1;padding:10px 12px}}
@media(prefers-reduced-motion:reduce){.settings-create-toolbar .btn{transition:none}.settings-create-toolbar .btn:hover{transform:none}}
