:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #25372f;
    background: #f5f7f6;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    --accent: #246f55;
    --muted: #718078;
    --border: #e2e9e5;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #45896e; outline-offset: 4px; }
svg { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; padding: 12px 18px; border-radius: 6px; background: #fff; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.workspace { display: flex; min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; width: 230px; flex-shrink: 0; padding: 35px 20px 25px; border-right: 1px solid var(--border); background: #fff; }
.brand { display: flex; flex-direction: column; padding: 0 15px; text-decoration: none; }
.brand-name { font-size: 35px; line-height: 1; font-weight: 800; letter-spacing: -1.8px; }
.brand-dot { color: var(--accent); }
.brand-description { margin-top: 10px; color: var(--muted); font-size: 11px; letter-spacing: .2px; }
.navigation-label { margin: 46px 15px 14px; color: #97a19b; font-size: 9px; font-weight: 650; letter-spacing: 1.3px; }
.navigation { display: grid; gap: 6px; }
.navigation-link { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 8px; color: #69776f; font-size: 13px; font-weight: 550; text-decoration: none; }
.navigation-link:hover { background: #f6f8f7; color: #324b3f; }
.navigation-link[aria-current="page"] { color: var(--accent); background: #eaf3ee; font-weight: 650; }
.navigation-link svg { width: 18px; height: 18px; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 32px 15px 0; color: #85928a; font-size: 11px; }
.sidebar-dot { width: 6px; height: 6px; border-radius: 100%; background: #8daa9b; }
.main-column { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; padding: 18px 42px; border-bottom: 1px solid var(--border); background: #fff; }
.topbar-title { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.account { display: flex; align-items: center; justify-content: flex-end; gap: 24px; min-width: 0; }
.account-info { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.account-name { max-width: 220px; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.account-role { color: var(--muted); font-size: 10px; }
.logout-link { flex-shrink: 0; padding: 9px 0 9px 23px; border-left: 1px solid var(--border); color: #738078; font-size: 12px; text-decoration: none; }
.logout-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
main { max-width: 1320px; margin: 0 auto; padding: 40px 42px 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 30px; }
.eyebrow { display: block; margin-bottom: 10px; color: #7c8b81; font-size: 9px; line-height: 1.4; font-weight: 700; letter-spacing: 1.6px; }
h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -.8px; overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 650; letter-spacing: -.3px; overflow-wrap: anywhere; }
p { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.count-chip { flex-shrink: 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: #758178; font-size: 11px; }
.panel { margin-bottom: 22px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.feature-card { display: flex; flex-direction: column; min-height: 265px; padding: 30px; border: 1px solid var(--border); border-radius: 12px; background: #fff; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.feature-card:hover { border-color: #a8c6b7; box-shadow: 0 3px 12px #24433206; }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 23px; border: 1px solid #e1ece5; border-radius: 12px; background: #f0f6f2; color: var(--accent); }
.feature-icon svg { width: 23px; height: 23px; }
.feature-card p { max-width: 340px; margin-bottom: 26px; }
.feature-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: auto; padding-top: 20px; border-top: 1px solid #edf1ee; color: var(--accent); font-size: 12px; font-weight: 600; }
.feature-link svg { width: 17px; height: 17px; }
.scope-panel { display: flex; align-items: center; gap: 18px; margin-top: 25px; padding: 25px; border: 1px solid var(--border); border-radius: 12px; background: #f0f4f1; }
.scope-icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: #e2ece5; color: #587665; }
.scope-panel h2 { font-size: 13px; letter-spacing: 0; }
.scope-panel p { max-width: 580px; margin-top: 5px; font-size: 12px; }
.role-chip { flex-shrink: 0; margin-left: auto; padding: 7px 11px; border: 1px solid #dae5dd; border-radius: 5px; color: #65806e; font-size: 10px; }
.notice { padding: 15px 19px; margin-bottom: 22px; border: 1px solid; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.notice-success { border-color: #c6e0d1; background: #edf7f0; color: #276541; }
.notice-error { border-color: #edd1ce; background: #fdf1ef; color: #a14336; }
.credential-panel { margin-bottom: 25px; padding: 25px; border: 1px solid #b8d9c6; border-radius: 12px; background: #eff8f2; }
.credential-values { display: flex; flex-wrap: wrap; gap: 22px 40px; margin-bottom: 0; }
.credential-values dt, .detail-grid dt { margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.credential-values dd { margin: 0; }
.credential-values code { display: inline-block; padding: 10px 13px; border: 1px solid #d4e5d9; border-radius: 6px; background: #fff; color: #224d36; font-size: 16px; user-select: all; overflow-wrap: anywhere; }
.create-panel > summary, .reset-panel > summary { display: flex; align-items: center; gap: 11px; padding: 20px 24px; color: var(--accent); font-size: 13px; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
.create-panel > summary::after, .reset-panel > summary::after { content: "+"; margin-left: auto; color: #849c8c; font-size: 19px; font-weight: 400; }
.create-panel[open] > summary::after, .reset-panel[open] > summary::after { content: "−"; }
.summary-hint { margin-left: 4px; color: #8a988f; font-size: 11px; font-weight: 400; }
.details-content { padding: 3px 24px 24px; }
.editor, .detail-panel { padding: 25px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.section-heading .text-link { flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.field { display: flex; flex-direction: column; align-items: stretch; min-width: 0; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field label, .field-label, legend { display: block; color: #475c4e; font-size: 12px; font-weight: 600; }
.optional { margin-left: 7px; color: #93a097; font-size: 10px; font-weight: 400; }
input:not([type="checkbox"]):not([type="hidden"]), select, textarea { width: 100%; min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid #dce4df; border-radius: 6px; background: #fff; color: #2c4134; font-size: 13px; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
input:not([type="checkbox"]):not([type="hidden"]):focus, select:focus, textarea:focus { outline: 0; border-color: #78a88e; box-shadow: 0 0 0 3px #deeee4; }
input::placeholder { color: #9ca89f; }
textarea { resize: vertical; }
select { padding-right: 28px; }
.field-hint { margin: 0; color: #8a978e; font-size: 11px; line-height: 1.55; }
.readonly-value { min-height: 42px; padding: 11px 12px; border: 1px solid #e2e9e4; border-radius: 6px; background: #f6f8f6; color: #718076; font-size: 13px; overflow-wrap: anywhere; }
fieldset { min-width: 0; margin: 0; padding: 17px 18px; border: 1px solid var(--border); border-radius: 8px; }
legend { padding: 0 5px; }
.company-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; max-height: 250px; overflow-y: auto; margin-top: 16px; }
.checkbox-option { display: flex; align-items: flex-start; gap: 10px; color: #526b5b; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
.checkbox-option input { flex-shrink: 0; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--accent); }
.checkbox-option small { display: block; color: #93a095; font-size: 10px; }
.checkbox-option:has(input:disabled) { opacity: .55; cursor: default; }
@supports selector(:has(*)) {
    .management-form:has(select[name="role_code"] option:checked:is([value="superadmin"], [value="operator"])) .company-choice { display: none; }
    .management-form:has(select[name="role_code"] option:checked:not([value="operator"])) .operator-choice { display: none; }
}
.form-note { display: flex; align-items: center; gap: 9px; margin-top: 23px; color: #7c8b80; font-size: 11px; }
.form-note svg { width: 16px; height: 16px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 25px; padding-top: 24px; border-top: 1px solid var(--border); }
.totp-field { max-width: 290px; }
.totp-field input { max-width: 155px; font-size: 17px !important; letter-spacing: 7px; font-variant-numeric: tabular-nums; }
.button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 41px; padding: 10px 18px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; line-height: 1.4; font-weight: 600; text-decoration: none; }
.button-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button-primary:hover { background: #1e5c47; border-color: #1e5c47; }
.button-secondary { background: #fff; color: #5e7465; border-color: #dce5df; }
.button-secondary:hover { background: #f1f6f3; }
.button-small { min-height: 32px; padding: 6px 12px; font-size: 11px; }
.text-link { color: var(--accent); font-size: 12px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.search-form { display: flex; align-items: center; gap: 10px; margin: 26px 0 18px; }
.search-input { position: relative; width: 360px; max-width: 100%; }
.search-input svg { position: absolute; top: 12px; left: 12px; width: 17px; height: 17px; color: #99a69d; }
.search-input input { padding-left: 38px !important; font-size: 12px !important; }
.table-panel { overflow: hidden; }
.table-scroll { overflow: auto; }
.table-scroll:focus-visible { outline: 3px solid #45896e; outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th { padding: 15px 22px; background: #f9fbf9; border-bottom: 1px solid var(--border); color: #809085; font-size: 10px; font-weight: 600; white-space: nowrap; }
td { min-width: 110px; padding: 19px 22px; border-bottom: 1px solid #edf1ee; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdfc; }
.cell-title { display: block; max-width: 260px; color: #344d3e; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.cell-secondary { display: block; max-width: 270px; margin-top: 6px; color: #8e9a92; font-size: 10px; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .4px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 5px; font-size: 10px; line-height: 1; white-space: nowrap; }
.status-badge > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.is-active { color: #3d865c; background: #edf7ef; }
.status-badge.is-passive { color: #8c8573; background: #f5f3ed; }
.security-state { color: #a28d5f; font-size: 10px; white-space: nowrap; }
.security-state.is-enabled { color: #61876d; }
.table-action { width: 1%; text-align: right; white-space: nowrap; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 22px; border-top: 1px solid var(--border); color: #8a978e; font-size: 10px; }
.pagination nav { display: flex; align-items: center; gap: 13px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 290px; padding: 40px 25px; text-align: center; }
.empty-state .feature-icon { margin-bottom: 20px; }
.empty-state h2 { font-size: 17px; }
.empty-state p { max-width: 380px; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 23px 0 6px; border-top: 1px solid var(--border); }
.detail-grid dd { margin: 0; color: #4e6656; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-panel > .text-link { display: inline-block; margin-top: 28px; }
.muted { color: #8a978e; font-size: 12px; }
.content-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: #a0aaa3; font-size: 10px; }
@media (max-width: 1100px) {
    .sidebar { width: 208px; padding-left: 15px; padding-right: 15px; }
    .topbar { padding-left: 28px; padding-right: 28px; }
    main { padding-left: 28px; padding-right: 28px; }
    .scope-panel .role-chip { display: none; }
    td, th { padding-left: 17px; padding-right: 17px; }
}
@media (max-width: 800px) {
    .workspace { flex-direction: column; }
    .sidebar { width: 100%; padding: 22px 24px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
    .brand { flex-direction: row; align-items: baseline; gap: 15px; padding: 0; }
    .brand-name { font-size: 29px; }
    .brand-description { margin-top: 0; }
    .navigation-label, .sidebar-footer { display: none; }
    .navigation { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 23px; }
    .navigation-link { padding: 11px 13px; font-size: 12px; }
    .navigation-link svg { width: 16px; height: 16px; }
    .topbar { min-height: 70px; padding: 14px 24px; }
    main { padding: 30px 24px 22px; }
    .home-grid { gap: 16px; }
    .feature-card { padding: 25px; }
}
@media (max-width: 560px) {
    .sidebar { padding: 20px 18px 14px; }
    .brand-description { font-size: 10px; }
    .navigation { gap: 4px; margin-top: 20px; }
    .navigation-link { gap: 7px; padding: 10px 9px; font-size: 11px; }
    .navigation-link svg { width: 15px; height: 15px; }
    .topbar { padding: 14px 19px; gap: 15px; }
    .topbar-title { font-size: 11px; }
    .account { gap: 15px; }
    .account-name { max-width: 120px; font-size: 12px; }
    .logout-link { padding-left: 15px; font-size: 11px; }
    main { padding: 28px 18px 22px; }
    h1 { font-size: 24px; }
    .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 23px; }
    .page-heading p { font-size: 12px; }
    .count-chip { padding: 7px 8px; font-size: 10px; }
    .home-grid, .form-grid, .company-checklist, .detail-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: 240px; padding: 25px; }
    .scope-panel { align-items: flex-start; gap: 13px; padding: 20px; }
    .scope-icon { width: 32px; height: 32px; }
    .scope-icon svg { width: 18px; height: 18px; }
    .editor, .detail-panel, .credential-panel { padding: 21px 19px; }
    .create-panel > summary, .reset-panel > summary { padding: 18px 19px; }
    .summary-hint { display: none; }
    .details-content { padding: 2px 19px 20px; }
    .form-grid { gap: 20px; }
    .form-footer { align-items: stretch; flex-direction: column; gap: 22px; }
    .form-footer .button { width: 100%; }
    .form-note { align-items: flex-start; }
    .form-note svg { margin-top: 2px; }
    .search-form { flex-wrap: wrap; }
    .search-input { width: auto; flex: 1; min-width: 180px; }
    .search-form > .text-link { flex-basis: 100%; padding: 5px 0; }
    td, th { padding-left: 15px; padding-right: 15px; }
    .pagination { align-items: flex-start; flex-direction: column; gap: 14px; padding: 15px; }
    .pagination nav { width: 100%; justify-content: flex-end; }
    .content-footer { margin-top: 30px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

/* Dark palettes share component rules; charcoal stays neutral. */
:root { --theme-bg: #0d1422; --theme-surface: #141f32; --theme-raised: #1b2940; --theme-hover: #243753; --theme-input: #101a2b; --theme-text: #e0e8f5; --theme-muted: #a9b7cd; --theme-border: #33445f; --theme-accent: #9ebeff; --theme-accent-hover: #c1d5ff; --theme-focus: #9ebeff26; }
:root[data-palette="charcoal"] { --theme-bg: #121315; --theme-surface: #1c1e21; --theme-raised: #25282c; --theme-hover: #33373d; --theme-input: #16181b; --theme-text: #e8e9eb; --theme-muted: #b0b4bc; --theme-border: #41464f; --theme-accent: #d0d5df; --theme-accent-hover: #f0f2f6; --theme-focus: #d0d5df26; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--accent); cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: #eaf3ee; }
:root[data-theme="dark"] { color-scheme: dark; color: var(--theme-text); background: var(--theme-bg); --accent: var(--theme-accent); --muted: var(--theme-muted); --border: var(--theme-border); }


:root[data-theme="dark"] :is(.sidebar, .topbar, .panel, .feature-card, .count-chip, .skip-link) { background: var(--theme-surface); }
:root[data-theme="dark"] :is(.navigation-link:hover, .theme-toggle:hover, .button-secondary:hover) { background: var(--theme-hover); color: var(--theme-text); }
:root[data-theme="dark"] .navigation-link[aria-current="page"] { background: var(--theme-hover); color: var(--accent); }
:root[data-theme="dark"] :is(.navigation-link, .logout-link, .count-chip, .field label, .field-label, legend, .cell-title, .detail-grid dd, .checkbox-option) { color: var(--theme-text); }
:root[data-theme="dark"] :is(.navigation-label, .sidebar-footer, .eyebrow, .summary-hint, .optional, .field-hint, .form-note, .cell-secondary, .checkbox-option small, .pagination, .muted, .content-footer) { color: var(--theme-muted); }
:root[data-theme="dark"] :is(.feature-icon, .scope-panel, .readonly-value, th) { background: var(--theme-raised); border-color: var(--border); }
:root[data-theme="dark"] :is(.scope-icon, .role-chip) { background: var(--theme-hover); color: var(--theme-text); border-color: var(--border); }
:root[data-theme="dark"] :is(.feature-link, td) { border-color: var(--border); }
:root[data-theme="dark"] .feature-card:hover { border-color: var(--theme-accent); }
:root[data-theme="dark"] tbody tr:hover { background: var(--theme-raised); }
:root[data-theme="dark"] :is(th, .readonly-value) { color: var(--theme-muted); }
:root[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea, .credential-values code) { background: var(--theme-input); color: var(--theme-text); border-color: var(--theme-border); }
:root[data-theme="dark"] input::placeholder { color: var(--theme-muted); }
:root[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="hidden"]):focus, select:focus, textarea:focus) { border-color: var(--theme-accent); box-shadow: 0 0 0 3px var(--theme-focus); }
:root[data-theme="dark"] .button-primary { background: var(--theme-accent); border-color: var(--theme-accent); color: var(--theme-bg); }
:root[data-theme="dark"] .button-primary:hover { background: var(--theme-accent-hover); border-color: var(--theme-accent-hover); }
:root[data-theme="dark"] .button-secondary { background: var(--theme-raised); color: var(--theme-text); border-color: var(--border); }
:root[data-theme="dark"] :is(.notice-success, .credential-panel, .status-badge.is-active) { background: #203c2b; color: #b0e5c2; border-color: #436c50; }
:root[data-theme="dark"] .notice-error { background: #402726; color: #ffc1b8; border-color: #87534b; }
:root[data-theme="dark"] .status-badge.is-passive { background: #393326; color: #e5d4a6; }
:root[data-theme="dark"] .security-state { color: #e5d4a6; }
:root[data-theme="dark"] .security-state.is-enabled { color: #a9deb9; }
:root[data-theme="dark"] :is(a, button, summary):focus-visible { outline-color: var(--theme-accent-hover); }
@media (max-width: 560px) {
    .topbar { flex-wrap: wrap; }
    .topbar-title { flex-basis: 100%; }
    .account { width: 100%; }
    .account > .theme-toggle { margin-right: auto; }
}

.preferences-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 26px; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: #25372f; box-shadow: 0 24px 80px #0005; }
.invitation-main { max-width: 600px; padding: 40px 20px; }
.invitation-card { padding: 32px; }
.invitation-card .brand { padding: 0; margin-bottom: 32px; }
.invitation-card h1 { font-size: 25px; margin-bottom: 18px; }
.invitation-registration { display: grid; gap: 22px; margin-top: 26px; }
.invitation-registration output { overflow-wrap: anywhere; }
.invitation-login { text-align: center; margin-top: 25px; }
.invitation-link { width: 100%; margin-top: 16px; }
.invitation-link input { font-family: ui-monospace, monospace; }
.button[hidden] { display: none; }
.module-company-selector { display: flex; align-items: end; gap: 16px; padding: 20px; }
.module-company-selector .field { flex: 1; max-width: 440px; }
.module-scope { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.module-scope > span:first-child { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.module-state { flex-shrink: 0; border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; font-size: 11px; }
.module-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 45px 16px; text-align: center; }
.module-empty p { max-width: 500px; }
.module-sections { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.module-section { padding: 24px; }
.module-section h2 { font-size: 16px; }
.integration-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; border: 0; padding: 0; margin-top: 24px; }
.integration-choices legend { padding: 0 0 14px; }
.integration-choice { display: flex; align-items: flex-start; gap: 12px; padding: 22px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.integration-choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.integration-choice input[type="radio"] { width: 17px; height: 17px; min-height: 0; padding: 0; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--accent); }
.integration-choice strong { display: block; font-size: 14px; line-height: 1.5; }
.integration-choice small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.integration-steps { display: grid; gap: 15px; padding-left: 22px; margin: 24px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.integration-steps li::marker { color: var(--accent); font-weight: 700; }
.integration-availability { color: var(--muted); border-color: var(--border); }
@media (max-width: 800px) { .integration-choices { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .module-sections { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 560px) { .module-company-selector { flex-direction: column; align-items: stretch; } .module-company-selector .field { max-width: none; } .module-scope { flex-wrap: wrap; } }
@media (max-width: 560px) { .invitation-main { padding: 20px 14px; } .invitation-card { padding: 24px 20px; } }
.preferences-dialog::backdrop { background: #05091499; }
.preferences-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.preferences-heading .eyebrow { margin-bottom: 6px; }
.theme-options { display: grid; gap: 10px; padding: 0; border: 0; }
.theme-options legend { padding: 0 0 12px; }
.theme-option { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.theme-option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-option input[type="radio"] { flex-shrink: 0; width: 16px; height: 16px; min-height: 0 !important; margin: 0; padding: 0 !important; accent-color: var(--accent); }
.theme-option strong { display: block; font-size: 13px; font-weight: 600; }
.theme-option small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.theme-swatch { width: 30px; height: 30px; flex-shrink: 0; border: 1px solid #8390a5; border-radius: 8px; }
.swatch-navy { background: #141f32; }.swatch-charcoal { background: #1c1e21; }.swatch-light { background: #f5f7f6; }.swatch-system { background: linear-gradient(135deg, #f5f7f6 50%, #141f32 50%); }
:root[data-theme="dark"] .preferences-dialog { background: var(--theme-surface); color: var(--theme-text); }
:root[data-theme="dark"] .sidebar-dot { background: var(--accent); }
@media (max-width: 560px) { .preferences-dialog { padding: 20px; } }

.editor code { overflow-wrap: anywhere; }
