:root {
    color-scheme: light;

    /* Segaltec semantic tokens, aligned with Fluent 2 roles. */
    --sg-color-brand-fill: #242521;
    --sg-color-on-brand: #fff;
    --sg-color-canvas: #f2f0e9;
    --sg-color-surface: #fbfaf7;
    --sg-color-surface-subtle: #e9e6de;
    --sg-color-foreground: #1f1f1c;
    --sg-color-foreground-muted: #67665f;
    --sg-color-foreground-disabled: #85837c;
    --sg-color-stroke: #d5d1c7;
    --sg-color-stroke-strong: #aaa69c;
    --sg-color-link: #315f7d;
    --sg-color-link-hover: #274f69;
    --sg-color-link-visited: #5f496d;
    --sg-color-focus: #6a8ca3;
    --sg-color-interactive-fill: #242521;
    --sg-color-interactive-fill-hover: #3a3b35;
    --sg-color-interactive-fill-pressed: #171815;
    --sg-color-interactive-fill-selected: #242521;
    --sg-color-interactive-fill-disabled: #dedbd3;
    --sg-color-interactive-neutral-pressed: #cbc7bd;
    --sg-color-interactive-foreground-disabled: #5f5e58;
    --sg-color-danger: #9f2d2d;
    --sg-color-danger-hover: #8f2828;
    --sg-color-danger-pressed: #7d2222;
    --sg-color-danger-subtle: #f4e1e1;
    --sg-color-warning: #a46212;
    --sg-color-warning-subtle: #f5ead9;
    --sg-color-positive: #45634f;
    --sg-color-positive-subtle: #e4ede6;
    --sg-space-1: .25rem;
    --sg-space-2: .5rem;
    --sg-space-3: .75rem;
    --sg-space-4: 1rem;
    --sg-space-6: 1.5rem;
    --sg-space-8: 2rem;
    --sg-space-12: 3rem;
    --sg-radius-small: .375rem;
    --sg-radius-medium: .625rem;
    --sg-radius-large: .875rem;
    --sg-target-size-min: 2.75rem;

    /* Compatibility aliases for presentation that predates SG-0011. */
    --color-background: var(--sg-color-canvas);
    --color-surface: var(--sg-color-surface);
    --color-surface-muted: var(--sg-color-surface-subtle);
    --color-text: var(--sg-color-foreground);
    --color-text-muted: var(--sg-color-foreground-muted);
    --color-border: var(--sg-color-stroke);
    --color-primary: var(--sg-color-interactive-fill);
    --color-primary-hover: var(--sg-color-interactive-fill-hover);
    --color-danger: var(--sg-color-danger);
    --color-warning: var(--sg-color-warning);
    --color-info: var(--sg-color-link);
    --color-success: var(--sg-color-positive);
    --radius-sm: var(--sg-radius-small);
    --radius-md: var(--sg-radius-medium);
    --radius-lg: var(--sg-radius-large);
    --space-1: var(--sg-space-1);
    --space-2: var(--sg-space-2);
    --space-3: var(--sg-space-3);
    --space-4: var(--sg-space-4);
    --space-6: var(--sg-space-6);
    --space-8: var(--sg-space-8);
    --space-12: var(--sg-space-12);
}

[data-ui-scope="internal"] {
    --sg-density-block-padding: var(--sg-space-2);
    --sg-density-inline-padding: var(--sg-space-3);
    --sg-density-control-gap: var(--sg-space-2);
    --sg-density-section-gap: var(--sg-space-6);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--color-background); color: var(--color-text); }
body { margin: 0; overflow-x: hidden; background: var(--color-background); color: var(--color-text); line-height: 1.55; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.35rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.055em; font-weight: 570; }
h2 { font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -.025em; }
h3 { font-size: 1.12rem; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--sg-color-focus); outline-offset: 3px; }
main[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }

.environment-banner { position: relative; min-height: 28px; padding: 4px 16px; background: #92400E; color: #fff; text-align: center; font-size: .74rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: .75rem; min-height: 44px; width: 100%; padding: .6rem .75rem; color: var(--color-text-muted); text-decoration: none; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; text-align: left; }
.nav-link:hover { background: var(--color-surface-muted); color: var(--color-text); }.nav-link.active { background: var(--color-primary); color: white; }

.page-header { max-width: 820px; margin-bottom: clamp(3rem, 8vw, 6rem); }.page-header .lead { max-width: 700px; }
.eyebrow { display: block; margin-bottom: var(--space-4); color: var(--color-text-muted); font-size: .72rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.lead { color: var(--color-text-muted); font-size: clamp(1.08rem, 2vw, 1.3rem); }

.button-row, .badge-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .68rem 1rem; border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 650; text-decoration: none; cursor: pointer; }
.button-primary, .btn-primary { background: var(--color-primary); color: #fff; }.button-primary:hover, .btn-primary:hover { background: var(--color-primary-hover); }.button-secondary, .btn-secondary { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); }.button-danger, .btn-danger { background: var(--color-danger); color: #fff; }.button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; }

.showcase-section { padding: var(--space-12) 0; border-top: 1px solid var(--color-border); }.section-intro { display: grid; grid-template-columns: 2rem 1fr; gap: 1rem; margin-bottom: var(--space-6); }.section-intro > span { color: var(--color-text-muted); font: italic 1rem Georgia, serif; }.section-intro h2, .section-intro p { margin-bottom: .35rem; }.section-intro p { color: var(--color-text-muted); }
.card { padding: clamp(1.25rem, 3vw, 2rem); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }.type-specimen > * { margin-bottom: 1.35rem; }.type-specimen h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
.spacing-demo > div { display: flex; align-items: center; gap: var(--space-4); min-height: 35px; }.spacing-demo span { width: 52px; color: var(--color-text-muted); font-size: .78rem; }.spacing-demo i { display: block; height: 10px; max-width: calc(100% - 70px); background: var(--color-info); border-radius: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin-top: var(--space-8); }.field { display: flex; flex-direction: column; gap: .4rem; }.field-wide { grid-column: 1 / -1; }.field label, .form-label { font-size: .86rem; font-weight: 700; }.field small, .form-text { color: var(--color-text-muted); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea, .form-control { width: 100%; min-height: 46px; padding: .65rem .75rem; background: #fff; border: 1px solid #aaa69c; border-radius: var(--radius-sm); color: var(--color-text); }.field-error input, .input-validation-error { border-color: var(--color-danger) !important; }.field-error > span, .validation-message, .text-danger { color: var(--color-danger); font-size: .82rem; }
.form-floating { display: flex; flex-direction: column; gap: .4rem; }.form-floating > label { order: -1; }.form-floating > .validation-message { margin-top: -.15rem; }.form-floating.input-group { display: grid; grid-template-columns: 1fr auto; gap: 0; }.form-floating.input-group > input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }.form-floating.input-group > .input-group-append { display: flex; }.input-group-text { display: inline-flex; align-items: center; padding: 0 .75rem; border: 1px solid #aaa69c; border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--color-surface-muted); }
.choice-group { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin: var(--space-8) 0; padding: 0; border: 0; }.choice-group legend { width: 100%; font-weight: 700; }.choice-group label { display: flex; align-items: center; gap: .5rem; min-height: 44px; }.choice-group input { width: 20px; height: 20px; accent-color: var(--color-primary); }
.upload-zone { display: flex; flex-direction: column; align-items: center; padding: var(--space-8); border: 1.5px dashed #99958c; border-radius: var(--radius-md); background: var(--color-surface-muted); text-align: center; cursor: pointer; }.upload-zone span { color: var(--color-text-muted); font-size: .82rem; }.upload-zone input { margin-top: 1rem; max-width: 100%; }
.table-card { padding: 0; overflow: hidden; }.table-responsive { overflow-x: auto; }table { width: 100%; border-collapse: collapse; }th, td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border); text-align: left; white-space: nowrap; }th { background: var(--color-surface-muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }tbody tr:last-child td { border-bottom: 0; }
.establishment-name-link { display: inline-flex; min-block-size: 44px; align-items: center; }
.client-name-link { display: inline-flex; min-block-size: 44px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 750; }.badge-danger { background: #f5dddd; color: #7d2020; }.badge-warning { background: #f4e4cc; color: #754209; }.badge-info { background: #dce9f0; color: #274f69; }.badge-success { background: #dce9df; color: #334d3b; }.badge-neutral { background: #e7e4dc; color: #4e4c46; }
.stack { display: grid; gap: var(--space-3); margin-bottom: var(--space-6); }.alert { display: flex; flex-direction: column; padding: 1rem 1.25rem; border-left: 4px solid; border-radius: var(--radius-sm); }.alert-success { background: #e4ede6; border-color: var(--color-success); }.alert-warning { background: #f5ead9; border-color: var(--color-warning); }.alert-danger { background: #f4e1e1; border-color: var(--color-danger); }
.dialog-backdrop { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 1rem; background: rgb(31 31 28 / 60%); }.dialog-card { width: min(520px, 100%); padding: 2rem; background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: 0 30px 80px rgb(0 0 0 / 25%); }
.state-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }.empty-state { display: flex; min-height: 260px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }.empty-state > span:first-child { font: 2.5rem Georgia, serif; color: var(--color-text-muted); }.error-state > span:first-child { color: var(--color-danger); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }.spinner-large { width: 38px !important; height: 38px; margin-bottom: 1rem; border-width: 3px; }@keyframes spin { to { transform: rotate(360deg); } }
.navigation-preview { display: grid; gap: var(--space-4); }.preview-desktop, .preview-mobile { display: flex; justify-content: space-between; padding: 1.1rem 1.25rem; background: var(--color-primary); color: white; border-radius: var(--radius-md); }.preview-mobile { display: none; }

.row { display: flex; flex-wrap: wrap; gap: 1rem; }.col-md-4, .col-md-6, .col-lg-6, .col-xl-6 { flex: 1 1 36rem; width: 100%; max-width: 42rem; min-width: 0; }.mb-3 { margin-bottom: 1rem; }.w-100 { width: 100%; }.d-grid { display: grid; }.gap-2 { gap: .5rem; }.form-check { display: flex; align-items: center; gap: .5rem; margin: .6rem 0; }.form-check-input { width: 20px; height: 20px; }.alert-danger { color: #6f1f1f; }.nav { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }.nav-pills .nav-link { display: block; padding: .75rem 1rem; color: var(--color-text); border-radius: var(--radius-sm); text-decoration: none; }.nav-pills .nav-link:hover { background: var(--color-surface-muted); }.nav-pills .nav-link.active { background: var(--color-primary); color: white; }
.account-manage-header { max-width: 52rem; margin-bottom: var(--space-8); }.account-manage-header h1 { margin: .35rem 0 .65rem; font-size: clamp(2.25rem, 5vw, 4rem); }.account-manage-header p { color: var(--color-text-muted); }.account-settings-layout { display: grid; grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; padding-top: var(--space-6); border-top: 1px solid var(--color-border); }.account-settings-navigation { min-width: 0; }.account-settings-content { width: 100%; max-width: 42rem; min-width: 0; }.account-settings-content h3 { margin-bottom: var(--space-6); font-size: clamp(1.4rem, 2.5vw, 1.8rem); }.account-settings-content .row { display: block; }.account-readonly-field { display: grid; gap: .35rem; padding: 1rem 1.1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-muted); }.account-readonly-label { color: var(--color-text-muted); font-size: .78rem; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }.account-readonly-value { overflow-wrap: anywhere; font-size: 1rem; }.account-readonly-help { color: var(--color-text-muted); font-size: .82rem; }.account-readonly-with-status { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; }.account-readonly-with-status > div { display: grid; gap: .35rem; }

/* SG-0003 audience-specific shells */
.shell-brand { display: inline-flex; align-items: center; gap: .75rem; min-height: 44px; color: var(--color-text); text-decoration: none; }
.shell-brand-symbol { display: block; width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; }
.shell-brand-copy strong, .shell-brand-copy small { display: block; line-height: 1.05; }
.shell-brand-copy strong { letter-spacing: -.025em; }
.shell-brand-copy small { margin-top: .2rem; color: var(--color-text-muted); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.auth-shell { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 100svh; isolation: isolate; }
.auth-shell > .environment-banner { z-index: 1; }
.auth-background { position: absolute; inset: 0; z-index: 0; display: block; overflow: hidden; pointer-events: none; user-select: none; }
.auth-background > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.auth-main { position: relative; z-index: 1; display: grid; min-height: 0; align-items: center; justify-items: start; padding: clamp(2rem, 7vw, 5rem) clamp(2rem, 8vw, 9rem); }
.auth-frame { width: min(26rem, 100%); }
.auth-frame > .shell-brand { margin: 0 0 var(--space-6) var(--space-2); }
.auth-card { width: 100%; padding: clamp(1.5rem, 6vw, 2.25rem); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: 0 18px 55px rgb(31 31 28 / 9%); overflow-wrap: anywhere; }
.auth-card h1 { margin-bottom: var(--space-3); font-size: clamp(2rem, 8vw, 2.65rem); line-height: 1.02; }
.auth-form form { display: grid; gap: var(--space-4); }
.auth-form .mb-3 { margin-bottom: 0; }
.auth-form .checkbox label { display: flex; align-items: center; gap: .65rem; min-height: 44px; cursor: pointer; }
.auth-form .validation-summary-valid { display: none; }
.auth-form .validation-summary-errors ul { margin: 0; padding-left: 1.25rem; }
.password-field { display: grid; gap: var(--space-2); }
.password-visibility-toggle { justify-self: start; min-height: 44px; padding: .45rem .2rem; border: 0; background: transparent; color: var(--color-primary); font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.password-visibility-toggle:hover { color: var(--color-primary-hover); }
.account-recovery-guidance { margin-top: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.account-recovery-guidance strong { display: block; margin-bottom: var(--space-1); font-size: .9rem; }
.account-recovery-guidance p, .auth-secondary-action { margin: 0; color: var(--color-text-muted); font-size: .88rem; }
.auth-secondary-action { margin-top: var(--space-6); }
.auth-state { text-align: left; }

.internal-shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); min-height: calc(100svh - 28px); }
.internal-sidebar { position: sticky; top: 0; display: flex; height: calc(100svh - 28px); min-height: 34rem; flex-direction: column; padding: var(--space-6); border-right: 1px solid var(--color-border); background: var(--color-surface); }
.internal-sidebar > .shell-brand { margin-bottom: var(--space-8); }
.shell-business-navigation { display: grid; gap: var(--space-2); }
.shell-navigation-label { margin: 0 .75rem var(--space-2); color: var(--color-text-muted); font-size: .68rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.shell-navigation-link { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .65rem .75rem; border-radius: var(--radius-sm); color: var(--color-text-muted); text-decoration: none; }
.shell-navigation-link:hover { background: var(--color-surface-muted); color: var(--color-text); }
.shell-navigation-link.active { background: var(--color-primary); color: #fff; }
.shell-navigation-icon { width: 1.2rem; text-align: center; }
.shell-sidebar-note { margin: auto 0 0; padding-top: var(--space-4); border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: .78rem; }
.shell-workspace { min-width: 0; }
.shell-topbar, .client-topbar { position: sticky; top: 0; z-index: 100; display: flex; min-height: 76px; align-items: center; gap: var(--space-4); padding: .75rem clamp(1rem, 4vw, 2.5rem); border-bottom: 1px solid var(--color-border); background: rgb(242 240 233 / 94%); backdrop-filter: blur(12px); }
.shell-context { display: grid; margin-right: auto; }
.shell-context span { color: var(--color-text-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.shell-context strong { font-size: .98rem; }
.shell-mobile-brand, .shell-mobile-menu, .client-mobile-menu { display: none; }
.shell-main { min-width: 0; }
.shell-content { width: min(72rem, 100%); margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 5vw, 3.5rem); overflow-wrap: anywhere; }
.shell-page-header { max-width: 46rem; margin-bottom: var(--space-12); }
.shell-page-header h1, .access-state h1 { font-size: clamp(2.2rem, 6vw, 3.75rem); }

.client-shell { min-height: calc(100svh - 28px); background: var(--color-surface); }
.client-topbar { position: sticky; justify-content: space-between; min-height: 84px; background: rgb(251 250 247 / 94%); }
.client-desktop-navigation { margin-left: auto; }
.client-business-navigation { display: flex; align-items: center; }
.client-business-navigation .shell-navigation-link { padding-inline: 1rem; }
.client-main { min-width: 0; }
.client-content { width: min(64rem, 100%); margin: 0 auto; padding: clamp(3rem, 9vw, 7rem) clamp(1rem, 6vw, 4rem); overflow-wrap: anywhere; }
.client-welcome { max-width: 38rem; }

.account-menu { position: relative; flex: 0 0 auto; }
.account-menu > summary, .shell-mobile-menu > summary { list-style: none; }
.account-menu > summary::-webkit-details-marker, .shell-mobile-menu > summary::-webkit-details-marker { display: none; }
.account-menu-trigger { display: flex; min-height: 48px; max-width: min(22rem, 42vw); align-items: center; gap: .65rem; padding: .35rem .55rem; border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer; }
.account-menu-trigger:hover, .account-menu[open] .account-menu-trigger { border-color: var(--color-border); background: var(--color-surface); }
.account-menu-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--color-primary); color: #fff; font-weight: 750; }
.account-menu-trigger-copy { min-width: 0; }
.account-menu-trigger-copy strong, .account-menu-trigger-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-trigger-copy strong { font-size: .82rem; }
.account-menu-trigger-copy small { color: var(--color-text-muted); font-size: .72rem; }
.account-menu-chevron { color: var(--color-text-muted); }
.account-menu-panel { position: absolute; top: calc(100% + .5rem); right: 0; z-index: 300; width: min(19rem, calc(100vw - 2rem)); padding: .55rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 18px 48px rgb(31 31 28 / 16%); }
.account-menu-identity { display: grid; gap: .15rem; padding: .7rem .75rem .85rem; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.account-menu-identity strong { font-size: .86rem; }
.account-menu-identity span { color: var(--color-text-muted); font-size: .76rem; }
.account-menu-action { display: flex; width: 100%; min-height: 44px; align-items: center; padding: .65rem .75rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-text); font: inherit; font-size: .88rem; text-align: left; text-decoration: none; cursor: pointer; }
.account-menu-action:hover { background: var(--color-surface-muted); }
.account-menu-logout { color: var(--color-danger); }
.access-state { max-width: 40rem; }
.access-state p { color: var(--color-text-muted); }
.client-details-list { display: grid; gap: var(--space-4); margin: 0; }
.client-details-list > div { display: grid; gap: .35rem; padding: 1rem 1.1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-muted); }
.client-details-list dt { color: var(--color-text-muted); font-size: .78rem; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.client-details-list dd { margin: 0; overflow-wrap: anywhere; font-size: 1rem; }

/* SG-0010 client and establishment state management */
.state-filter { margin-bottom: var(--space-6); padding: 1rem 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.state-filter > span { color: var(--color-text-muted); font-size: .78rem; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.state-filter .button-row { margin-top: var(--space-3); }
.state-table-cell { min-width: 14rem; white-space: normal; }
.state-table-cell, .record-state-date { overflow-wrap: anywhere; }
.record-state-date { display: block; margin-top: .45rem; color: var(--color-text-muted); font-size: .84rem; }
.availability-copy { display: block; max-width: 24rem; line-height: 1.45; }
.state-context-alert { margin-bottom: var(--space-6); }
.state-confirmation { max-width: 48rem; }
.state-confirmation-warning { margin-top: var(--space-6); }

/* SG-0011 internal collection foundations */
[data-ui-scope="internal"] .sg-collection { min-width: 0; border: 1px solid var(--sg-color-stroke); border-radius: var(--sg-radius-medium); background: var(--sg-color-surface); }
[data-ui-scope="internal"] .sg-collection-desktop { display: block; min-width: 0; }
[data-ui-scope="internal"] .sg-collection-mobile { display: none; }
[data-ui-scope="internal"] .sg-collection-table { width: 100%; border-collapse: collapse; }
[data-ui-scope="internal"] .sg-collection-column-header,
[data-ui-scope="internal"] .sg-collection-cell { padding: var(--sg-density-block-padding) var(--sg-density-inline-padding); border-block-end: 1px solid var(--sg-color-stroke); text-align: left; vertical-align: middle; white-space: normal; }
[data-ui-scope="internal"] .sg-collection-column-header { background: var(--sg-color-surface-subtle); color: var(--sg-color-foreground-muted); font-size: .75rem; font-weight: 700; }
[data-ui-scope="internal"] .sg-collection-row:last-child .sg-collection-cell { border-block-end: 0; }
[data-ui-scope="internal"] .sg-collection-actions-column { width: var(--sg-target-size-min); }
[data-ui-scope="internal"] .sg-record-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--sg-density-control-gap); }
[data-ui-scope="internal"] .sg-record-primary-link { display: inline-flex; min-width: 0; max-width: 100%; min-height: var(--sg-target-size-min); align-items: center; white-space: normal; overflow-wrap: anywhere; color: var(--sg-color-link); font-weight: 700; text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .18em; }
[data-ui-scope="internal"] .sg-record-primary-link:visited { color: var(--sg-color-link-visited); }
[data-ui-scope="internal"] .sg-record-primary-link:hover { color: var(--sg-color-link-hover); text-decoration-thickness: .12em; }
[data-ui-scope="internal"] .sg-record-primary-link:active { color: var(--sg-color-interactive-fill-pressed); }
[data-ui-scope="internal"] .sg-collection-address { min-width: 0; overflow-wrap: anywhere; }
[data-ui-scope="internal"] .sg-mobile-record { display: grid; min-width: 0; gap: var(--sg-space-2); padding: var(--sg-space-3); border-block-end: 1px solid var(--sg-color-stroke); }
[data-ui-scope="internal"] .sg-mobile-record:last-child { border-block-end: 0; }
[data-ui-scope="internal"] .sg-mobile-record-metadata { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sg-space-3); }
[data-ui-scope="internal"] .sg-mobile-record-secondary { min-width: 0; color: var(--sg-color-foreground-muted); overflow-wrap: anywhere; }
[data-ui-scope="internal"] .sg-mobile-record-label { display: block; font-size: .72rem; font-weight: 700; }

/* SG-0011 internal detail foundations */
[data-ui-scope="internal"] .sg-detail-layout { display: grid; min-width: 0; gap: var(--sg-space-4); }
[data-ui-scope="internal"] .sg-detail-related-actions { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: var(--sg-density-control-gap); }
[data-ui-scope="internal"] .sg-detail-related-actions .button { max-width: 100%; white-space: normal; }
[data-ui-scope="internal"] .sg-detail-context-link { min-width: 0; max-width: 100%; color: var(--sg-color-link); text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .18em; overflow-wrap: anywhere; white-space: normal; }
[data-ui-scope="internal"] .sg-detail-context-link:visited { color: var(--sg-color-link-visited); }
[data-ui-scope="internal"] .sg-detail-context-link:hover { color: var(--sg-color-link-hover); text-decoration-thickness: .12em; }
[data-ui-scope="internal"] .sg-detail-context-link:active { color: var(--sg-color-interactive-fill-pressed); }
[data-ui-scope="internal"] .sg-detail-address { white-space: normal; overflow-wrap: anywhere; }

/* SG-0011 internal form foundations */
[data-ui-scope="internal"] .sg-form-surface { display: grid; width: min(100%, 48rem); min-width: 0; gap: var(--sg-space-4); }
[data-ui-scope="internal"] .sg-form { display: grid; min-width: 0; gap: var(--sg-density-section-gap); }
[data-ui-scope="internal"] .sg-form-fields { display: grid; min-width: 0; gap: var(--sg-space-4); }
[data-ui-scope="internal"] .sg-form-field { display: grid; min-width: 0; gap: var(--sg-space-2); }
[data-ui-scope="internal"] .sg-form-label { font-size: .86rem; font-weight: 700; }
[data-ui-scope="internal"] .sg-form-control { min-width: 0; max-width: 100%; min-height: var(--sg-target-size-min); }
[data-ui-scope="internal"] .sg-form-control:disabled { background: var(--sg-color-surface-subtle); color: var(--sg-color-foreground-disabled); }
[data-ui-scope="internal"] .sg-form-help { color: var(--sg-color-foreground-muted); overflow-wrap: anywhere; }
[data-ui-scope="internal"] .sg-form-feedback { min-width: 0; overflow-wrap: anywhere; }
[data-ui-scope="internal"] .sg-actionable-feedback:focus { outline: 3px solid var(--sg-color-focus); outline-offset: 3px; }
[data-ui-scope="internal"] .sg-form-actions { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: var(--sg-density-control-gap); }
[data-ui-scope="internal"] .sg-form-actions .button { max-width: 100%; white-space: normal; }
[data-ui-scope="internal"] .sg-form-readonly { display: grid; min-width: 0; margin: 0; }
[data-ui-scope="internal"] .sg-form-readonly-item { display: grid; min-width: 0; gap: var(--sg-space-1); }
[data-ui-scope="internal"] .sg-form-readonly-item dt { color: var(--sg-color-foreground-muted); font-size: .75rem; font-weight: 700; }
[data-ui-scope="internal"] .sg-form-readonly-item dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }

/* SG-0011 actions mounted by the migrated internal patterns */
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-primary { border-color: var(--sg-color-interactive-fill); background: var(--sg-color-interactive-fill); color: var(--sg-color-on-brand); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-primary:hover { border-color: var(--sg-color-interactive-fill-hover); background: var(--sg-color-interactive-fill-hover); color: var(--sg-color-on-brand); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-primary:active { border-color: var(--sg-color-interactive-fill-pressed); background: var(--sg-color-interactive-fill-pressed); color: var(--sg-color-on-brand); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-primary:disabled { border-color: var(--sg-color-stroke); background: var(--sg-color-interactive-fill-disabled); color: var(--sg-color-interactive-foreground-disabled); cursor: not-allowed; opacity: 1; }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-secondary { border-color: var(--sg-color-stroke); background: var(--sg-color-surface); color: var(--sg-color-foreground); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-secondary:hover { border-color: var(--sg-color-stroke-strong); background: var(--sg-color-surface-subtle); color: var(--sg-color-foreground); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-secondary:active { border-color: var(--sg-color-stroke-strong); background: var(--sg-color-interactive-neutral-pressed); color: var(--sg-color-foreground); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-secondary:disabled { border-color: var(--sg-color-stroke); background: var(--sg-color-interactive-fill-disabled); color: var(--sg-color-interactive-foreground-disabled); cursor: not-allowed; opacity: 1; }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-secondary.sg-danger-action { border-color: var(--sg-color-danger); background: var(--sg-color-surface); color: var(--sg-color-danger); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-secondary.sg-danger-action:visited { color: var(--sg-color-danger); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-secondary.sg-danger-action:hover { border-color: var(--sg-color-danger); background: var(--sg-color-danger-subtle); color: var(--sg-color-danger); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-secondary.sg-danger-action:active { border-color: var(--sg-color-danger-pressed); background: var(--sg-color-danger-pressed); color: var(--sg-color-on-brand); }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button-secondary.sg-danger-action:disabled { border-color: var(--sg-color-stroke); background: var(--sg-color-interactive-fill-disabled); color: var(--sg-color-interactive-foreground-disabled); cursor: not-allowed; opacity: 1; }
[data-ui-scope="internal"] .sg-state-confirmation-actions .button-danger { border-color: var(--sg-color-danger); background: var(--sg-color-danger); color: var(--sg-color-on-brand); }
[data-ui-scope="internal"] .sg-state-confirmation-actions .button-danger:hover { border-color: var(--sg-color-danger-hover); background: var(--sg-color-danger-hover); color: var(--sg-color-on-brand); }
[data-ui-scope="internal"] .sg-state-confirmation-actions .button-danger:active { border-color: var(--sg-color-danger-pressed); background: var(--sg-color-danger-pressed); color: var(--sg-color-on-brand); }
[data-ui-scope="internal"] .sg-state-confirmation-actions .button-danger:disabled { border-color: var(--sg-color-stroke); background: var(--sg-color-interactive-fill-disabled); color: var(--sg-color-interactive-foreground-disabled); cursor: not-allowed; opacity: 1; }
[data-ui-scope="internal"] :is(.sg-page-header-actions, .sg-detail-related-actions, .sg-form-actions, .sg-feedback-actions, .sg-state-confirmation-actions) .button:focus-visible { outline: 3px solid var(--sg-color-focus); outline-offset: 3px; }

#blazor-error-ui { display: none; position: fixed; inset: auto 0 0; z-index: 2000; padding: 1rem; background: #fff2cc; box-shadow: 0 -1px 3px rgb(0 0 0 / 20%); }.blazor-error-boundary { padding: 1rem; background: var(--color-danger); color: white; }.blazor-error-boundary::after { content: "Ocurrió un error."; }

@media (max-width: 900px) { .state-grid { grid-template-columns: 1fr; }.preview-desktop { display: none; }.preview-mobile { display: flex; } }
@media (max-width: 767px) {
    .page-header, .showcase-section, .card { width: 100%; max-width: 100%; min-width: 0; }.button-row { align-items: stretch; flex-direction: column; }.button-row .button { width: 100%; white-space: normal; }.type-specimen { overflow: hidden; }.form-grid { grid-template-columns: minmax(0, 1fr); }.field-wide { grid-column: auto; }.section-intro { grid-template-columns: 1.5rem minmax(0, 1fr); }.account-manage-header { margin-bottom: var(--space-6); }.account-settings-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }.account-settings-navigation .nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }.account-settings-navigation .nav-link { height: 100%; padding: .65rem .5rem; text-align: center; }.account-readonly-with-status { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; } }

@media (max-width: 767px) {
    .environment-banner { min-height: 0; padding: .35rem .75rem; overflow: visible; font-size: .62rem; line-height: 1.3; white-space: normal; }
    .internal-shell, .client-shell { min-height: 0; }
    .auth-main { display: block; padding: var(--space-8) var(--space-4); }
    .auth-frame { margin: 0 auto; }
    .auth-frame > .shell-brand { margin-left: 0; }
    .auth-card { padding: 1.35rem; }
    .internal-shell { display: block; }
    .internal-sidebar { display: none; }
    .shell-topbar { position: sticky; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 68px; gap: .5rem; padding: .55rem .75rem; }
    .shell-mobile-brand { display: block; min-width: 0; }
    .shell-mobile-brand .shell-brand-copy { display: none; }
    .shell-mobile-menu { position: relative; display: block; }
    .shell-mobile-menu > summary { display: flex; min-height: 44px; align-items: center; justify-content: center; gap: .4rem; padding: .45rem .65rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); cursor: pointer; font-size: .84rem; font-weight: 700; }
    .shell-mobile-menu-panel { position: absolute; top: calc(100% + .5rem); left: 0; z-index: 250; width: min(18rem, calc(100vw - 1.5rem)); padding: .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 18px 48px rgb(31 31 28 / 16%); }
    .shell-context { display: none; }
    .shell-content, .client-content { padding: var(--space-8) var(--space-4); }
    .shell-page-header { margin-bottom: var(--space-8); }
    .account-menu-trigger { max-width: none; min-width: 48px; justify-content: center; padding: .3rem; }
    .account-menu-trigger-copy, .account-menu-chevron { display: none; }
    .account-menu-panel { width: min(19rem, calc(100vw - 1.5rem)); }
    .client-topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; min-height: 68px; padding: .55rem .75rem; }
    .client-topbar > .shell-brand .shell-brand-copy { display: block; }
    .client-desktop-navigation { display: none; }
    .client-mobile-menu { display: block; }
    .client-mobile-menu .shell-mobile-menu-panel { right: 0; left: auto; }
    .client-business-navigation { display: grid; }
    .account-settings-layout { grid-template-columns: minmax(0, 1fr); }
    .account-settings-navigation .nav { display: grid; grid-template-columns: minmax(0, 1fr); }
    .account-settings-navigation .nav-link { min-height: 44px; text-align: left; }
}

@media (max-width: 48rem) {
    [data-ui-scope="internal"] .sg-collection-desktop { display: none; }
    [data-ui-scope="internal"] .sg-collection-mobile { display: grid; min-width: 0; margin: 0; padding: 0; list-style: none; }
}

@media (max-width: 360px) {
    .auth-main { padding-inline: var(--space-3); }
    .auth-card { padding: 1.1rem; }
    .client-topbar > .shell-brand .shell-brand-copy { display: none; }
    .shell-mobile-menu > summary { padding-inline: .5rem; }
}
