/* Shared presentation layer. Workspace-specific behavior remains in its owning stylesheet. */
:root {
    --bg: #101419;
    --surface: #171c23;
    --surface-high: #202730;
    --border: #2b333e;
    --text: #edf1f5;
    --muted: #a0aab8;
    --text-muted: var(--muted);
    --text-primary: var(--text);
    --green: #79d9bb;
    --green-deep: #183e34;
    --blue: #a2c6ff;
    --radius: 12px;
    font-family: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

body { background: var(--bg); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled, .button:disabled { cursor: not-allowed; opacity: .55; }
code, pre { font-family: "Cascadia Code", Consolas, ui-monospace, monospace; }
.ui-icon { flex: 0 0 auto; vertical-align: middle; }
.app-shell { grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { padding: 25px 14px 16px; background: #12171d; backdrop-filter: none; }
.brand { gap: 11px; margin: 0 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: #244238; border-color: #385e50; font-size: 12px; letter-spacing: -.06em; }
.brand strong { font-size: 17px; font-weight: 650; }
.brand small { margin-top: 1px; font-size: 9px; letter-spacing: .13em; color: var(--muted); }
.nav-list { gap: 19px; margin-top: 31px; scrollbar-width: thin; scrollbar-color: #37404a transparent; }
.nav-group { gap: 5px; }
.nav-group-title { min-height: 18px; padding: 0 11px; color: #8e9aa9; font-size: 10px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.nav-group-title::before { display: none; }
.nav-submenu { gap: 3px; margin: 0; padding: 0; border: 0; }
.nav-link { gap: 11px; min-height: 35px; padding: 8px 11px; border-radius: 7px; color: #b0bac7; font-size: 12px; font-weight: 500; }
.nav-link .ui-icon { width: 17px; height: 17px; color: #8d99a9; }
.nav-link:hover { background: #1c242c; }
.nav-link.active { background: #233b34; color: #a7edd4; box-shadow: inset 0 0 0 1px #345248; }
.nav-link.active .ui-icon { color: var(--green); }
.nav-link.active::before { display: none; }
.sidebar-footer { gap: 13px; margin-top: 20px; padding: 17px 6px 0; }
.operator-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.operator-avatar { display: grid; flex: 0 0 29px; width: 29px; height: 29px; place-items: center; border: 1px solid #3c4653; border-radius: 50%; background: #28323e; color: #c1d0e3; font-size: 11px; font-weight: 650; }
.user-caption { color: #b3bdca; font-size: 11px; }
.sidebar-footer .button { min-height: 34px; background: #191f27; font-size: 11px; }
.sidebar-footer .ui-icon { width: 15px; height: 15px; }
.workspace { min-width: 0; }
.workspace-bar { display: flex; align-items: center; gap: 13px; min-height: 68px; padding: 15px 36px; border-bottom: 1px solid var(--border); background: #14191f; font-size: 12px; }
.workspace-home { color: var(--muted); flex: 0 0 auto; }
.workspace-home:hover { color: var(--text); }
.workspace-divider { color: #596575; }
.workspace-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d3dce7; }
.workspace-brand { margin-left: auto; padding-left: 20px; color: #8b98a8; letter-spacing: .15em; font-size: 9px; }
.content { width: 100%; max-width: 1580px; margin-inline: auto; padding: 32px 36px 56px; }
.page-header, .page-header-compact { align-items: center; gap: 20px; margin-bottom: 26px; }
.page-header h1, .page-header-compact h1, .detail-heading h1 { margin: 5px 0 7px; font-size: clamp(26px, 2.5vw, 34px); font-weight: 650; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.page-header p { font-size: 13px; line-height: 1.65; }
.eyebrow { color: #a0adbc; font-size: 10px; font-weight: 650; letter-spacing: .12em; }
.back-link { margin-bottom: 21px; font-size: 12px; }
.button { gap: 8px; min-height: 38px; padding: 8px 13px; border-radius: 7px; font-size: 12px; font-weight: 600; line-height: 1.5; transition: background .15s ease, border-color .15s ease; }
.button .ui-icon { width: 16px; height: 16px; }
.button-primary { border-color: #79d9bb; background: #79d9bb; color: #102d24; box-shadow: 0 1px 2px #0002; }
.button-primary:hover, .button-primary:focus-visible { border-color: #9ae9ce; background: #9ae9ce; }
.button-quiet { border-color: #39434f; background: #1b222b; color: #d0d8e2; }
.button-quiet:hover, .button-quiet:focus-visible { border-color: #586777; background: #26313d; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.button:focus-visible, .brand:focus-visible, .nav-link:focus-visible { outline-width: 2px; }
.data-card, .form-card, .operational-card, .detail-card, .audit-list { border-color: var(--border); background: var(--surface); box-shadow: 0 2px 5px #0000000b; }
.panel-heading { align-items: center; gap: 14px; }
.panel-heading h2, .section-heading h2, .detail-heading h2 { margin-top: 4px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.detail-panel { padding: 22px; }
.panel-heading .eyebrow { font-size: 9px; }
.registry-detail-grid { align-items: stretch; gap: 18px; }
.registry-section { margin-top: 18px; }
.detail-facts, .registry-facts { margin-top: 18px; }
.detail-facts > div, .registry-facts > div { grid-template-columns: minmax(110px, .42fr) minmax(0, 1fr); padding: 11px 0; border-color: #2b333e; }
.detail-facts > div:last-child, .registry-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-facts dt, .registry-facts dt { align-self: start; font-size: 12px; text-transform: none; letter-spacing: 0; line-height: 1.6; }
.detail-facts dd, .registry-facts dd { color: #e0e7ef; font-size: 13px; }
.detail-facts code, .registry-facts code, .registry-detail-header code { font-size: 12px; line-height: 1.7; color: #c6d5e6; overflow-wrap: anywhere; }
.state-badge, .status-pill { align-items: center; gap: 6px; padding: 4px 9px; font-size: 10px; font-weight: 600; margin-top: 0; }
.state-badge.enabled, .status-pill:not(.status-planned) { background: #203d32; color: #a2e6c6; border-color: #345a48; }
.status-dot { width: 6px; height: 6px; box-shadow: none; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 27px; height: 25px; padding: 0 7px; border: 1px solid #3b4552; border-radius: 6px; color: #b6c1ce; font-size: 11px; font-variant-numeric: tabular-nums; }
.table-scroll { min-width: 0; max-width: 100%; scrollbar-width: thin; scrollbar-color: #465463 #171c23; }
.data-card, .data-card > .table-scroll { min-width: 0; }
th { padding: 12px 16px; background: #1e252e; color: #aab6c5; font-size: 10px; letter-spacing: .045em; font-weight: 600; }
td { padding: 13px 16px; font-size: 12px; color: #d2dbe7; }
td code, .registry-table td code { font-size: 11px; }
tbody tr:hover { background: #ffffff03; }
.table-scroll:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.notice { margin: 16px 0; padding: 13px 16px; font-size: 13px; border-radius: 8px; }
.notice.validation-summary-valid, .notice:empty { display: none; }
.compact-empty { padding: 24px 0 6px; color: var(--muted); font-size: 13px; }
.empty-state { min-height: 280px; border-color: #3b4654; border-radius: 12px; background: var(--surface); }
.empty-state h1, .empty-state h2 { font-size: 25px; font-weight: 600; }
.toolbar input, .field-group input:not([type=checkbox]):not([type=radio]), .field-group select, .field-group textarea, .form-stack input[type=text], .form-stack input[type=email], .form-stack input[type=password], .installation-name-editor input[type=text] { border-color: #3b4654; border-radius: 7px; background: #12171e; color: var(--text); font-size: 13px; }
.field-group label, .form-stack label { color: #bbc7d5; font-size: 12px; font-weight: 500; }
input::placeholder, textarea::placeholder { color: #8693a4; opacity: 1; }
.registry-filter, .activity-filter, .scope-bar { border-radius: 10px; background: var(--surface); }
.registry-filter { flex-wrap: wrap; }
.registry-filter .field-group { min-width: 160px; flex: 1 1 190px; }
.registry-filter .registry-search-field { min-width: min(100%, 240px); flex: 2 1 260px; }
.registry-filter > .date-filter { flex: 1 0 100%; min-width: 0; }
.list-totals { font-size: 12px; color: var(--muted); }
.installation-table-compact td:first-child code { font-size: 11px; }
.installation-heading { display: flex; align-items: center; gap: 17px; min-width: 0; }
.installation-heading > div { min-width: 0; }
.device-emblem { display: grid; flex: 0 0 54px; width: 54px; height: 54px; place-items: center; border: 1px solid #38564d; border-radius: 14px; background: #203a32; color: #9ae3ca; }
.device-emblem .ui-icon { width: 27px; height: 27px; }
.installation-subtitle { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.installation-subtitle > span:last-child { text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.installation-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 0; margin: 0 0 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.installation-toolbar-primary { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.installation-toolbar form { margin: 0; }
.installation-default { color: #a2e6c6; font-size: 12px; }
.installation-name-editor { margin: 0 0 20px; padding: 15px 18px; border-color: #303a46; background: #171e26; border-radius: 10px; }
.installation-name-editor summary { font-size: 12px; color: #cbd8e7; font-weight: 500; }
.installation-name-editor summary::marker { color: #92a9c0; }
.installation-name-editor small { font-size: 11px; }
.feature-card, .app-content-action-card { padding: 24px; border-radius: 12px; background: var(--surface); border-color: var(--border); }
.feature-card { min-height: 215px; }
.feature-card:hover, .feature-card:focus-visible { transform: none; border-color: #607366; background: #1b2429; }
.feature-card.accent { background: #1b2d29; border-color: #39564c; }
.feature-card h2 { margin: 25px 0 5px; font-size: 19px; font-weight: 600; }
.feature-card p { font-size: 13px; line-height: 1.65; }
.feature-card .card-action { padding-top: 20px; font-size: 12px; }
.card-index { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid #3d4b59; background: #232e39; border-radius: 10px; color: #b3c7dc; }
.feature-card.accent .card-index { background: #28473b; color: #9be1c8; border-color: #406453; }
.dashboard-section-heading { margin: 32px 0 15px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-secondary { margin-top: 18px; }
.dashboard-secondary .feature-card { min-height: 190px; }
.dashboard-secondary .feature-card h2 { margin-top: 20px; }
.boundary-note { background: var(--surface); border-radius: 10px; }
.boundary-note strong, .boundary-note h2 { color: #becbdb; }
.settings-group-panel, .settings-list-panel, .api-test-group, .app-registry-card { background: var(--surface); }
.settings-group-heading, .settings-list-heading, .setting-compact-head { background: #1e252e; }
.settings-group-identity h2, .settings-list-heading h2 { font-size: 17px; font-weight: 600; }
.settings-view-tabs a { font-weight: 600; }
.settings-view-tabs a:focus-visible, .settings-directory-row:focus-visible, .api-test-group:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.api-test-group:hover, .api-test-group:focus-visible { transform: none; background: #1b2429; border-color: #607366; }
.api-test-group h2 { font-size: 19px; font-weight: 600; }
.scope-bar select, .api-run-toolbar select { border-color: #3b4654; border-radius: 7px; background: #12171e; }
.login-shell { background: radial-gradient(ellipse at 50% 35%, #25473833, transparent 65%), var(--bg); }
.login-card { border-color: #35423d; border-radius: 16px; background: #171e24; }
.login-card h1 { font-size: 32px; }
.login-header { background: #12171d; }

/* Filters compose fields and actions explicitly; do not infer slots from child order. */
.registry-filter:has(> .filter-main) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.filter-main { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; min-width: 0; }
.filter-main > .field-group { flex: 1 1 150px; min-width: 0; max-width: 220px; }
.filter-main > .client-search-main, .filter-main > .registry-search-field { flex: 2 1 240px; max-width: none; }
.filter-actions { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-actions .button, .registry-filter.operational-filter > .button { min-height: 42px; }
.filter-actions .client-reset { margin: 0; padding: 8px 13px; }
.filter-hint { display: block; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.client-filters .client-advanced-filters { padding-top: 6px; }
.client-advanced-filters summary { padding-block: 6px; }
.registry-filter.operational-filter:not(:has(> .filter-main)) { display: flex; flex-wrap: wrap; align-items: flex-end; }
.registry-filter.operational-filter > .date-filter, .filter-main > .date-filter { flex: 0 1 auto; width: auto; max-width: 100%; min-width: 0; }
.registry-filter.operational-filter > .field-group { flex: 1 1 160px; min-width: 0; max-width: 260px; }
.operational-filter .date-filter { gap: 8px; }
.operational-filter .date-filter > .field-group { flex: 1 1 145px; width: 145px; min-width: 130px; max-width: 180px; }
.filter-main > .date-error { flex-basis: 100%; }
form[method="get"].activity-filter { display: flex; align-items: flex-end; flex-wrap: wrap; }
form[method="get"].activity-filter > .field-group { flex: 1 1 170px; min-width: 0; max-width: 300px; }
form[method="get"].activity-filter > .activity-search-field { flex: 2 1 260px; max-width: none; }
form[method="get"].activity-filter > .button { flex: 0 0 auto; min-height: 42px; }
.table-shell { min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.visually-hidden, .client-visually-hidden { top: 0; left: 0; }
.campaign-create-form, .code-issue-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.campaign-create-form > .field-group, .code-issue-form > .field-group { min-width: 0; }
.activity-filter .field-group input, .activity-filter .field-group select, .activity-filter .field-group textarea { min-width: 0; max-width: 100%; }
form[method="get"].activity-filter > .field-group:has(input[type="datetime-local"]) { flex-basis: 240px; }
.api-workspace-header { min-width: 0; flex-wrap: wrap; }
.api-workspace-header > div { min-width: 0; max-width: 100%; flex-wrap: wrap; }
.api-workspace-header code { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }

@media (min-width: 921px) and (max-height: 850px) {
    .sidebar { padding-top: 19px; }
    .nav-list { gap: 13px; margin-top: 24px; }
    .nav-link { min-height: 32px; padding-block: 6px; }
    .sidebar-footer { padding-top: 12px; margin-top: 14px; gap: 10px; }
}
@media (max-width: 1100px) and (min-width: 921px) {
    .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
    .content { padding: 26px 24px 40px; }
    .workspace-bar { padding-inline: 24px; }
    .registry-detail-grid { grid-template-columns: 1fr; }
}
@media (min-width: 921px) and (max-width: 1320px) {
    .setting-compact-head { display: none; }
    .setting-compact-row { grid-template-columns: minmax(0, 1fr) minmax(150px, .6fr) auto; }
    .setting-primary { grid-column: 1 / -1; }
    .setting-reason { grid-column: 1 / 3; }
    .setting-readonly-message { grid-column: 2 / -1; }
    .setting-preference-row { grid-template-columns: minmax(0, 1fr) auto; }
    .setting-preference-row .setting-primary { grid-column: 1 / -1; }
}
@media (max-width: 920px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { display: flex; position: sticky; padding: 12px 20px; overflow-y: auto; background: #12171df5; }
    .sidebar .brand { gap: 9px; }
    .sidebar .brand strong { font-size: 15px; }
    .sidebar .brand-mark { width: 32px; height: 32px; }
    .sidebar .client-nav-label { min-height: 44px; border-color: #3c4754; background: #202832; color: #d0d9e5; }
    .sidebar .sidebar-footer { margin: 0; padding: 0; }
    .sidebar-footer .button { min-height: 44px; }
    .sidebar .operator-identity { display: none; }
    .client-nav-toggle:checked ~ .nav-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border); }
    .nav-link { min-height: 44px; }
    .client-nav-toggle:checked ~ .sidebar-footer .operator-identity { display: flex; }
    .workspace-bar { min-height: 49px; padding: 12px 24px; }
    .workspace-brand { display: none; }
    .content { padding: 26px 24px 44px; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-header, .page-header-compact { display: flex; align-items: center; }
    .registry-detail-grid { grid-template-columns: 1fr; }
    .registry-filter .field-group, .registry-filter .registry-search-field { min-width: 0; }
    .detail-facts > div { grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr); }
    .button { min-height: 44px; }
    .filter-actions .button, .registry-filter.operational-filter > .button, form[method="get"].activity-filter > .button { min-height: 44px; }
    .settings-view-tabs a, .client-workspace-nav > a, .client-segment a, .client-section-nav a, .client-reset { display: inline-flex; align-items: center; min-height: 44px; }
    .scope-bar select, .api-run-toolbar select { min-height: 44px; font-size: 16px; }
    .field-group input:not([type=checkbox]):not([type=radio]), .field-group select, .field-group textarea, .form-stack input[type=text], .form-stack input[type=email], .form-stack input[type=password] { min-height: 44px; font-size: 16px; }
}
@media (max-width: 620px) {
    .sidebar { gap: 9px; padding: 11px 16px; }
    .sidebar .brand small { display: none; }
    .sidebar-footer .button .ui-icon { display: none; }
    .sidebar .sidebar-footer .button { padding-inline: 10px; }
    .sidebar .client-nav-label { gap: 7px; padding-inline: 10px; }
    .client-nav-toggle:checked ~ .nav-list { grid-template-columns: 1fr; gap: 16px; }
    .client-nav-toggle:checked ~ .sidebar-footer { padding-top: 12px; border-top: 1px solid var(--border); }
    .workspace-bar { min-height: 45px; padding: 10px 16px; font-size: 11px; gap: 9px; }
    .content { padding: 24px 16px 40px; }
    .page-header, .page-header-compact { gap: 13px; margin-bottom: 22px; }
    .page-header h1, .page-header-compact h1 { font-size: 27px; }
    .installation-heading { gap: 12px; align-items: flex-start; }
    .device-emblem { flex-basis: 43px; width: 43px; height: 43px; border-radius: 11px; }
    .device-emblem .ui-icon { width: 23px; height: 23px; }
    .registry-detail-header > .state-badge { margin-left: 55px; }
    .installation-toolbar { align-items: stretch; margin-bottom: 16px; padding-block: 14px; gap: 9px; }
    .installation-toolbar-primary { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 9px; }
    .installation-toolbar form, .installation-toolbar form .button { width: 100%; }
    .installation-toolbar .button { white-space: normal; text-align: center; }
    .installation-name-editor { padding: 15px; margin-bottom: 16px; }
    .detail-panel { padding: 18px; }
    .panel-heading { flex-direction: row; align-items: center; }
    .detail-facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-block: 12px; }
    .detail-facts dt { font-size: 11px; }
    .detail-facts dd { font-size: 13px; }
    .detail-facts code { font-size: 12px; }
    .installation-table.installation-table-compact, .installation-table.installation-table-compact tbody { display: block; width: 100%; min-width: 0; }
    .installation-table-compact thead { display: none; }
    .installation-table.installation-table-compact tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 17px; border-bottom: 1px solid var(--border); }
    .installation-table.installation-table-compact td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
    .installation-table-compact td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
    .installation-table-compact td:first-child, .installation-table-compact td:last-child { grid-column: 1 / -1; }
    .installation-table-compact td .row-link { white-space: normal; }
    .card-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .feature-card, .dashboard-secondary .feature-card { min-height: 180px; padding: 22px; }
    .feature-card h2 { margin-top: 18px; }
    .status-pill { margin-top: 0; }
    .notice { margin-block: 16px; }
    .filter-main > .date-filter, .registry-filter.operational-filter > .date-filter { flex-basis: 100%; width: 100%; }
    .filter-main > .field-group { flex: 1 1 130px; max-width: none; }
    .filter-main > .client-search-main, .filter-main > .registry-search-field { flex-basis: 100%; }
    .filter-main > .filter-actions { flex-basis: 100%; }
    .filter-main > .filter-actions .button { flex: 1; }
    .operational-filter .date-filter > .field-group { max-width: none; min-width: 0; }
    .client-advanced-filters summary { min-height: 44px; padding-block: 11px; }
    form[method="get"].activity-filter > .field-group, .registry-filter.operational-filter > .field-group { max-width: none; }
}
/* Apps registry: artwork and product overview, quiet metadata, deliberate actions. */
.app-registry-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 620px), 1fr)); gap: 24px; align-items: start; }
.app-registry-card { --app-artwork-size: 208px; display: flex; flex-direction: column; min-height: 0; min-width: 0; max-width: 900px; padding: 0; overflow: hidden; border-color: #323d48; border-radius: 16px; background: var(--surface); box-shadow: 0 8px 24px #00000014; }
.app-product-overview { display: grid; grid-template-columns: var(--app-artwork-size) minmax(0, 1fr); align-items: center; gap: 28px; padding: 28px; }
.app-registry-card .app-product-visual { width: var(--app-artwork-size); height: var(--app-artwork-size); min-height: 0; aspect-ratio: 1; border: 1px solid #303d46; border-radius: 13px; background: linear-gradient(145deg, #1d2b30, #11181f); }
.app-registry-card .app-product-visual img { display: block; width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: contain; }
.app-registry-card .app-product-visual > span { width: 94px; height: 94px; border-color: #3b5c51; border-radius: 23px; background: #20372f; color: #a0e4ca; font-size: 28px; letter-spacing: .02em; }
.app-product-copy, .app-product-identity { min-width: 0; }
.app-registry-title { align-items: start; flex-wrap: wrap; gap: 8px 14px; }
.app-registry-title h2 { flex: 1 1 200px; min-width: 0; margin: 0; font-size: 24px; font-weight: 650; line-height: 1.25; letter-spacing: -.03em; overflow-wrap: anywhere; }
.app-registry-title .state-badge { flex: 0 0 auto; margin-top: 3px; }
.app-product-identity > code { display: block; margin-top: 7px; color: #9baab9; font-size: 11px; overflow-wrap: anywhere; }
.app-platforms { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 13px 0 0; list-style: none; }
.app-platforms li { padding: 3px 8px; border: 1px solid #35404b; border-radius: 5px; background: #1b232c; color: #c4cfdb; font-size: 11px; line-height: 1.4; }
.app-summary-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 20px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--border); background: transparent; }
.app-summary-metrics > div { min-width: 0; padding-right: 16px; }
.app-summary-metrics > div + div { padding-left: 20px; padding-right: 0; border-left: 1px solid var(--border); }
.app-summary-metrics dt { color: var(--muted); font-size: 11px; line-height: 1.5; }
.app-summary-metrics dd { margin: 5px 0 0; color: var(--text); font-size: 29px; font-weight: 600; line-height: 1.15; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.app-content-status { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.app-content-status .state-badge { max-width: 100%; white-space: normal; }
.app-content-status .state-badge.disabled { border-color: #394550; background: #202a32; color: #bac5d0; }
.app-product-metadata { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin: 0; padding: 16px 28px; border-block: 1px solid var(--border); background: #131a21; }
.app-product-metadata > div { min-width: 0; }
.app-product-metadata dt { margin-bottom: 5px; color: #8998a8; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.app-product-metadata dd { min-width: 0; margin: 0; color: #bfccd8; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.app-product-metadata code { color: inherit; font-size: 11px; overflow-wrap: anywhere; }
.app-registry-actions { margin: 0; padding: 18px 28px; border: 0; gap: 10px; }
.app-registry-actions > .button { min-height: 40px; white-space: normal; text-align: center; }
.app-registry-actions > .button-quiet { border-color: transparent; background: transparent; }
.app-registry-actions > .button-quiet:hover { border-color: #39434f; background: #202a34; }
.app-image-editor { min-width: 0; margin-left: auto; }
.app-image-editor summary { min-height: 40px; padding: 10px 0 10px 8px; color: #a1afbf; font-size: 12px; cursor: pointer; }
.app-image-editor summary:hover { color: var(--text); }
.app-image-editor[open] { flex-basis: 100%; margin-left: 0; }
.app-image-editor[open] summary { padding-left: 0; }
.app-image-editor .image-upload-form { flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 6px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #131920; }
.app-image-field { display: grid; flex: 1 1 220px; gap: 8px; min-width: 0; }
.app-image-field label { color: #d3dce7; font-size: 12px; font-weight: 600; }
.app-image-field input[type="file"] { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 6px; border: 1px solid #39434f; border-radius: 6px; background: var(--bg); color: #b7c2cf; font-size: 12px; }
.app-image-field input::file-selector-button { margin-right: 9px; padding: 6px 9px; border: 0; border-radius: 4px; background: #293541; color: var(--text); cursor: pointer; }
.app-image-field small { color: var(--muted); font-size: 11px; }
@media (max-width: 600px) {
    .app-registry-card { --app-artwork-size: 112px; max-width: none; border-radius: 13px; }
    .app-product-overview { grid-template-columns: var(--app-artwork-size) minmax(0, 1fr); gap: 18px 16px; align-items: start; padding: 20px 18px; }
    .app-product-copy { display: contents; }
    .app-product-identity { grid-column: 2; }
    .app-registry-card .app-product-visual { border-radius: 10px; }
    .app-registry-card .app-product-visual > span { width: 56px; height: 56px; border-radius: 15px; font-size: 20px; }
    .app-registry-title h2 { flex-basis: 100%; font-size: 20px; }
    .app-platforms { margin-top: 11px; }
    .app-summary-metrics { grid-column: 1 / -1; width: 100%; margin: 0; padding-top: 18px; }
    .app-content-status { grid-column: 1 / -1; margin-top: 0; }
    .app-product-metadata { grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 16px 18px; }
    .app-registry-actions { padding: 16px 18px; }
    .app-registry-actions > .button { flex: 1 1 140px; min-height: 44px; }
    .app-image-editor { flex-basis: 100%; margin-left: 0; }
    .app-image-editor summary { min-height: 44px; padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
/* Activity payloads stay outside the table's layout and remain readable on narrow screens. */
.activity-dialog {
    width: min(760px, calc(100vw - 32px));
    max-width: none;
    max-height: 85vh;
    max-height: 85dvh;
    padding: 0;
    color: var(--text, #e8eef5);
    background: var(--surface, #171e26);
    border: 1px solid var(--border, #303b48);
    border-radius: 16px;
    box-shadow: 0 24px 80px #0008;
    overflow: hidden;
}
.activity-dialog[open] { display: flex; flex-direction: column; }
.activity-dialog::backdrop { background: #02070bb8; }
.activity-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--border, #303b48); }
.activity-dialog-header h2 { margin: 8px 0 0; font-size: 22px; }
.activity-dialog-header p { margin: 8px 0 0; overflow-wrap: anywhere; }
.activity-dialog-header form { flex: none; margin: 0; }
.activity-dialog-payload { min-height: 0; margin: 0; padding: 24px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #0b1118; font-size: 13px; line-height: 1.7; }
.activity-dialog-payload code { white-space: inherit; overflow-wrap: inherit; }
@media (max-width: 600px) { .activity-dialog-header, .activity-dialog-payload { padding: 18px; } }
