:root { --lte-sidebar-width: 220px; --bridge-header-height: 48px; }
/* Shared AdminLTE design system for the entire administration. */
body { font-size: .875rem; }
.catalog-workspace { --bs-link-color: #345d52; --bs-link-hover-color: #173d32; }
.catalog-workspace a { color: #345d52; text-decoration: none; transition: color .15s, background-color .15s; }
.catalog-workspace a:hover { color: #173d32; text-decoration: underline; text-underline-offset: 3px; }
.catalog-workspace a:focus-visible, .editorial-tabs .nav-link:focus-visible { outline: 2px solid #638b7c; outline-offset: 3px; }
.table-panel td:first-child a { color: #76837e; font-weight: 500; font-variant-numeric: tabular-nums; }
.table-panel td:nth-child(2) a { color: #263d35; font-weight: 500; }
.status-help { cursor: help; }
.tooltip-inner { max-width: 360px; white-space: pre-line; text-align: left; padding: 9px 12px; font-size: .78rem; }
.price-publications { max-width: 680px; display: grid; gap: 12px; }
.price-record { border: 1px solid #e4e9e6; border-radius: 6px; padding: 16px; }
.price-publications small { display: block; }
.catalog-workspace { padding: 20px 20px 30px; }
.app-header, .app-sidebar .sidebar-brand {
    height: var(--bridge-header-height);
    min-height: var(--bridge-header-height);
    padding-block: 0;
}
.app-sidebar .nav-link { padding: .55rem .8rem; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
h1 { font-size: 1.35rem; margin: 4px 0; font-weight: 600; }
h2 { font-size: 1.05rem; font-weight: 600; }
h3 { font-size: 1rem; }
.page-heading .lead, .page-heading .eyebrow, .editorial-section-head .eyebrow { display: none; }
.back-link { font-size: .8rem; }
.button, .link-button { display: inline-block; border: 1px solid #345d52; border-radius: 5px; padding: 5px 10px; background: #345d52; color: white; font: inherit; text-decoration: none; }
.button-secondary { background: white; color: #495057; border-color: #ced4da; }
.link-button { color: #345d52; background: none; border: 0; padding: 3px 5px; }
button:disabled { opacity: .55; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { display: block; width: 100%; border: 1px solid #ced4da; border-radius: 4px; padding: 6px 9px; font: inherit; background: white; color: #212529; }
input:focus, select:focus, textarea:focus { outline: 2px solid #94b3a6; outline-offset: 1px; }
label { display: block; font-weight: 500; }
label input, label select, label textarea { margin-top: 4px; }
.notice { padding: 9px 12px; background: #e7f1ff; border-left: 3px solid #6ea8fe; border-radius: 3px; margin-bottom: 12px; }
.notice p { margin: 5px 0 0; }
.notice-error { background: #f8d7da; border-color: #dc3545; }
.tag { display: inline-block; font-size: .72rem; font-weight: 500; border-radius: 3px; padding: 2px 5px; background: #e9ecef; color: #495057; white-space: nowrap; }
.tag-succeeded { background: #d1e7dd; color: #0a5132; }
.tag-running { background: #cfe2ff; color: #084298; }
.tag-waiting { background: #fff3cd; color: #664d03; }
.tag-failed { background: #f8d7da; color: #842029; }
.summary-strip { display: flex; flex-wrap: wrap; gap: 20px; color: #6c757d; margin: 8px 0 14px; font-size: .8rem; }
.summary-strip strong { color: #212529; margin-left: 5px; }
.catalog-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; background: white; border: 1px solid #dee2e6; border-radius: 4px; padding: 12px; }
.catalog-filters label:first-child { flex: 1; min-width: 200px; }
.catalog-filters label:not(:first-child) { min-width: 150px; }
@media (max-width: 767px) {
    .catalog-publication-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-publication-filters label { display: flex; flex-direction: column; gap: 4px; min-width: 0 !important; }
    .catalog-publication-filters label:first-child { grid-column: 1 / -1; }
    .catalog-publication-filters label:nth-last-of-type(-n+2) { grid-column: 1 / -1; }
    .catalog-publication-filters input, .catalog-publication-filters select { width: 100%; min-width: 0; }
    .catalog-publication-filters button { justify-self: start; }
}
@media (max-width: 575px) {
    .family-list-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .family-list-filters label:first-child { grid-column: 1 / -1; min-width: 0; }
}
.result-caption { font-size: .8rem; color: #6c757d; margin: 12px 0 8px; }
.table-panel { background: white; border: 1px solid #dee2e6; border-radius: 4px; overflow-x: auto; }
.table-panel table { width: 100%; border-collapse: collapse; }
.table-panel th { font-size: .75rem; background: #f8f9fa; white-space: nowrap; }
.table-panel th, .table-panel td { padding: 7px 10px; border-bottom: 1px solid #e9ecef; vertical-align: middle; }
.table-panel tbody tr:hover { background: #f5f8fc; }
.table-panel td.numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-panel td small { display: block; color: #6c757d; }
.table-panel details { min-width: 110px; }
.price-detail { max-width: 280px; padding: 8px 0; }
.pagination { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.editorial-cover { width: 48px; height: 48px; object-fit: contain; }
.editorial-meta { display: flex; gap: 5px; }
.editorial-tabs { margin-top: 18px; gap: 5px; padding: 5px; background: #e9eeeb; border: 1px solid #dce4df; border-radius: 10px; width: fit-content; max-width: 100%; }
.editorial-tabs .nav-link { padding: 9px 18px; border: 0; border-radius: 7px; color: #67766e; font-weight: 500; }
.editorial-tabs .nav-link:hover { background: #f2f5f3; color: #264f40; }
.editorial-tabs .nav-link.active { background: #fff; color: #244d3f; box-shadow: 0 1px 4px #193c241a; }
.tab-content { margin-top: 14px; background: white; border: 1px solid #e0e6e2; border-radius: 8px; padding: 22px; box-shadow: 0 2px 7px #243c2d05; }
.editorial-section-head { display: flex; justify-content: space-between; margin-bottom: 10px; }
.family-editor { display: grid; gap: 14px; max-width: 960px; }
.family-editor > button { justify-self: start; }
.editorial-hint, .editorial-upload small { font-size: .78rem; color: #6c757d; margin: 0; }
.editorial-description { white-space: pre-wrap; }
.editorial-upload { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.editorial-upload label { min-width: 230px; }
.editorial-source-picker { margin: 16px 0; }
details > summary { cursor: pointer; color: #495057; }
details[open] > summary { margin-bottom: 10px; }
.editorial-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 14px; margin: 16px 0; }
.editorial-image { border: 1px solid #dee2e6; border-radius: 4px; padding: 12px; }
.editorial-image > img { width: 100%; height: 150px; object-fit: contain; margin: 10px 0; }
.editorial-image-top small { display: block; font-size: .72rem; color: #6c757d; margin-top: 4px; }
.editorial-image-hidden { background: #f8f9fa; }
.editorial-check { display: flex; align-items: center; gap: 7px; font-weight: normal; }
.editorial-check input { margin: 0; }
.editorial-image-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.editorial-remove { color: #b02a37; }
.editorial-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.editorial-parameter { display: flex; gap: 20px; padding: 12px 0; border-bottom: 1px solid #e9ecef; }
.editorial-parameter small { display: block; color: #6c757d; }
.editorial-values, .editorial-value { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.editorial-value { background: #e9ecef; border-radius: 4px; padding: 3px 8px; }
.editorial-value-remove { border: 0; background: transparent; }
.editorial-parameter-list { margin-bottom: 16px; }
.description-editor { border: 1px solid var(--bs-border-color); border-radius: 8px; overflow: hidden; }
.description-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.description-toolbar button { background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); border-radius: 5px; padding: 4px 9px; }
.description-body { min-height: 220px; padding: 12px; overflow-wrap: anywhere; }
.description-body:focus { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.image-drop { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 20px; border: 2px dashed var(--bs-border-color); border-radius: 8px; cursor: pointer; }
.image-drop:hover, .image-drop-active, .image-drop:focus-within { border-color: var(--bs-primary); background: var(--bs-tertiary-bg); }
.parameter-workspace { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: 16px; align-items: start; }
.parameter-known-values { max-height: 9rem; overflow: auto; margin-top: 4px; color: var(--bs-secondary-color); }
.parameter-order-list { list-style: none; padding: 0; margin: 12px 0 0; }
.parameter-catalog-value { display: flex; flex-wrap: wrap; align-items: start; gap: 8px 12px; padding: 8px 0; border-top: 1px solid var(--bs-border-color); }
.parameter-catalog-value > span { flex: 1 1 120px; }
.parameter-order-position { display: inline-block; min-width: 2rem; color: var(--bs-secondary-color); }
.parameter-order-controls button { min-width: 2rem; }
.family-editor [hidden], .image-drop [hidden] { display: none !important; }
@media (max-width: 767px) { .parameter-workspace { grid-template-columns: 1fr; } }
.editorial-empty { padding: 20px; background: #f8f9fa; color: #6c757d; }
.editorial-source-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 16px; }
.editorial-source-grid dt { color: #6c757d; font-size: .8rem; }
.editorial-source-grid dd { margin-bottom: 0; }
.editorial-member-links { display: grid; gap: 5px; }
.page-heading { flex-wrap: wrap; }
.page-heading > p:not(.eyebrow):not(.lead) { flex-basis: 100%; margin: 0; color: #6c757d; }
.button { cursor: pointer; }
.catalog-workspace a.button { color: white; }
.catalog-workspace a.button-secondary { color: #495057; }
.catalog-workspace a.button:hover { text-decoration: none; filter: brightness(.96); }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button-row form { margin: 0; }
.button-compact { padding: 3px 7px; font-size: .78rem; }
.compact-buttons { gap: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.card, .family-panel { background: #fff; border: 1px solid #e0e6e2; border-radius: 8px; padding: 18px; box-shadow: 0 2px 7px #243c2d05; }
.family-panel { margin-bottom: 16px; }
.family-panel > h2 { margin-bottom: 8px; }
.family-panel > p { color: #6c757d; margin-bottom: 12px; }
.family-panel .table-panel { margin: 12px 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card h2 { margin-bottom: 8px; }
.card p { margin-bottom: 12px; color: #6c757d; }
.icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: #edf3ef; color: #345d52; font-size: .8rem; font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 12px; margin-top: auto; border-top: 1px solid #e9ecef; font-size: .78rem; }
.meta span { color: #6c757d; }
.section-heading { margin: 0 0 12px; }
.section-heading h2 { margin: 0; }
.section-heading .kicker { display: none; }
.section-heading p { color: #6c757d; margin: 6px 0 0; }
.section-spaced { margin-top: 24px; }
.channel-facts { display: grid; gap: 5px; margin: 0 0 16px; font-size: .78rem; }
.channel-facts span { display: flex; justify-content: space-between; gap: 10px; color: #6c757d; }
.channel-facts strong { color: #35433b; text-align: right; font-weight: 500; }
.channel-card { min-width: 0; }
.channel-card a { overflow-wrap: anywhere; }
.channel-actions { margin-top: auto; padding-top: 12px; border-top: 1px solid #e9ecef; }
.channel-actions details { margin-top: 12px; }
.token-form, .auth-form { display: grid; gap: 8px; }
.token-form { margin-top: 12px; }
.token-form button { justify-self: start; }
.token-form small, .field-error, .password-hint { font-size: .78rem; }
.token-form small { color: #6c757d; }
.channel-approval { margin: 12px 0; border-top: 1px solid #e9ecef; padding-top: 12px; }
.channel-approval > summary { display: flex; align-items: center; gap: 12px; list-style: none; }
.channel-approval > summary::before { content: '▸'; }
.channel-approval[open] > summary::before { content: '▾'; }
.channel-approval h3 { margin: 14px 0 8px; }
.family-editor { margin: 14px 0; }
.family-axis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.family-member-actions { white-space: nowrap; }
.family-member-actions form { display: inline-flex; margin: 0 0 0 8px; vertical-align: middle; }
@media (max-width: 767px) { .family-axis-grid { grid-template-columns: 1fr; } }
.tab-pane .family-editor { margin-top: 0; }
.empty-state { background: white; border: 1px solid #e0e6e2; border-radius: 8px; padding: 36px 20px; text-align: center; color: #6c757d; }
.empty-state h2 { color: #35433b; margin-top: 12px; }
.empty-symbol { font-size: 1.5rem; color: #638b7c; }
.empty-state p { margin: 0; }
.tag-success, .tag-sent { background: #d1e7dd; color: #0a5132; }
.tag-pending { background: #fff3cd; color: #664d03; }
.tag-sending { background: #cfe2ff; color: #084298; }
.tag-muted { background: #e9ecef; color: #6c757d; }
.job-error, .field-error { color: #a6313b; }
.field-error:empty, .validation-summary:empty { display: none; }
.validation-summary { background: #f8d7da; color: #842029; border-radius: 4px; padding: 10px; }
.validation-summary ul { margin: 0; padding-left: 18px; }
details pre { max-width: min(650px, 70vw); max-height: 420px; overflow: auto; padding: 12px; border-radius: 4px; background: #f6f8f7; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; font-size: .75rem; }
.table-panel td strong { font-weight: 600; }
.table-panel td { font-size: .82rem; }
.table-panel td small { font-size: .74rem; margin-top: 3px; }
.table-panel td form { margin: 5px 0; }
.table-panel tbody tr:last-child td { border-bottom: 0; }
.order-diagnostics { margin-top: 5px; max-width: 380px; }
.order-diagnostics[open] { min-width: 270px; }
.order-diagnostics > summary { font-size: .75rem; }
.order-actions { display: flex; gap: 5px; margin-top: 6px; }
.sync-time { white-space: nowrap; color: #6c757d; font-size: .75rem; }
.invoice-link { display: block; margin-top: 4px; font-size: .75rem; }
.toolbar-details { max-width: 100%; }
.toolbar-details[open] { flex-basis: 100%; }
.toolbar-details .button-row { padding: 12px; background: #fff; border: 1px solid #e0e6e2; border-radius: 6px; margin-top: 8px; }
.content-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,220px)); gap: 14px; margin: 14px 0; }
.content-gallery figure { margin: 0; }
.content-gallery img { width: 100%; height: 140px; object-fit: contain; border: 1px solid #e0e6e2; border-radius: 5px; }
.content-gallery figcaption { font-size: .75rem; color: #6c757d; overflow-wrap: anywhere; margin-top: 6px; }
.source-description { font-family: inherit; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card { padding: 16px 18px; background: white; border: 1px solid #e0e6e2; border-radius: 8px; }
.metric-card span { color: #6c757d; font-size: .8rem; }
.metric-card strong { display: block; font-size: 1.6rem; color: #263d35; margin: 3px 0; font-weight: 600; }
.metric-card small { color: #6c757d; font-size: .74rem; }
.dashboard-connections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.connection-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid #edf0ee; }
.connection-row:last-child { border: 0; }
.connection-row small { display: block; color: #6c757d; font-size: .75rem; margin-top: 3px; }
.system-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: #6c757d; padding-top: 16px; border-top: 1px solid #e0e6e2; font-size: .75rem; }
.system-panel dl { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; }
.system-panel dt { font-weight: normal; }
.system-panel dd { margin: 0; color: #35433b; }
.error-page { max-width: 680px; margin: 40px auto; padding: 24px; background: white; border: 1px solid #e0e6e2; border-radius: 8px; }
.error-page h1 { font-size: 1.35rem; }
.error-page .lead { font-size: .875rem; color: #6c757d; }
.error-page .eyebrow { font-size: .78rem; color: #6c757d; }
.auth-body { display: grid; min-height: 100vh; place-items: center; background: #f4f6f5; }
.auth-main { width: min(420px,calc(100% - 32px)); padding: 24px 0; }
.login-panel { padding: 28px; background: white; border: 1px solid #e0e6e2; border-radius: 8px; box-shadow: 0 3px 14px #243c2d08; }
.login-panel h1 { font-size: 1.35rem; margin-bottom: 8px; }
.login-panel header p, .password-hint { color: #6c757d; }
.auth-form { margin-top: 22px; }
.auth-form input:not([type=checkbox]) { min-height: 38px; }
.auth-form > label:not(.check-row) { margin-top: 6px; }
.auth-form .check-row { display: flex; gap: 8px; align-items: center; font-weight: normal; margin: 8px 0; }
.auth-form .check-row input { margin: 0; }
.button-block { width: 100%; }
@media (max-width: 991px) { .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 575px) { .dashboard-connections { grid-template-columns: 1fr; } .dashboard-metrics { gap: 10px; } .catalog-filters label:not(:first-child) { min-width: 0; flex: 1; } .login-panel { padding: 22px; } .system-panel { align-items: start; } }
@media (max-width: 767px) { .catalog-workspace { padding: 12px; } .tab-content { padding: 14px; } .page-heading { align-items: start; } .editorial-tabs .nav-link { padding: 8px 10px; } .summary-strip { gap: 10px; } }

.family-wizard .wizard-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.family-wizard .wizard-step > legend { float: none; width: auto; margin-bottom: 10px; font-size: 1.125rem; font-weight: 650; }
.family-wizard .wizard-panel { margin-bottom: 12px; }
.family-wizard .wizard-panel:last-child { margin-bottom: 0; }
.family-wizard .wizard-panel h2 { font-size: 1rem; margin-bottom: 12px; }
.wizard-shops { display: grid; grid-template-columns: minmax(160px, 230px) minmax(0, 1fr); gap: 20px; align-items: start; }
.wizard-copy { border: 0; border-left: 1px solid var(--bs-border-color); min-width: 0; margin: 0; padding: 0 0 0 20px; }
.wizard-copy > legend { float: none; width: auto; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.wizard-copy-options { display: flex; flex-wrap: wrap; gap: 6px; }
.wizard-copy-options .wizard-shop-option {
    display: flex; align-items: center; gap: 6px; margin: 0;
    border: 1px solid var(--bs-border-color); border-radius: 6px; padding: 6px 10px; cursor: pointer;
}
.wizard-shop-option:has(input:checked) { background: var(--bs-tertiary-bg); border-color: var(--bs-secondary-color); }
.wizard-shop-option input { margin: 0; }
.wizard-search { display: grid; grid-template-columns: minmax(0, 380px) auto; gap: 12px; align-items: end; justify-content: start; }
.wizard-search label { margin: 0; }
.family-wizard .wizard-status { margin: 8px 0 0; }
.wizard-selection { border-top: 1px solid var(--bs-border-color); margin-top: 16px; padding-top: 14px; }
.wizard-selection h3 { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 0 0 8px; }
.family-wizard .wizard-table { margin: 10px 0 0; }
.wizard-table :is(td, th):first-child { width: 6.5rem; }
.wizard-table :is(td, th):last-child { width: 1%; text-align: right; }
.wizard-table td[colspan] { width: auto; text-align: left; color: var(--bs-secondary-color); }
.wizard-product-action { min-width: 5.2rem; white-space: nowrap; }
@media (max-width: 575px) {
    .wizard-shops { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .wizard-copy { border-left: 0; padding-left: 0; }
    .wizard-search { grid-template-columns: minmax(0, 1fr) auto; }
}

.family-axis-list { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 8px; padding-left: 22px; }
.family-arrangement .table-panel { position: relative; }
.family-arrangement .family-panel > p.editorial-hint { margin-bottom: 0; }
.family-panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.family-panel-heading h2 { margin: 0; }
.family-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.family-member-panel { scroll-margin-top: 70px; }
.family-bulk-row { border-bottom: 1px solid var(--bridge-border, #dbe0e5); padding-bottom: 12px; }
.family-bulk-row .family-member-product { margin-bottom: 8px; }
.family-bulk-row select { width: 100%; }
.family-member-product { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.family-member-form { margin-bottom: 0; }
.family-axis-new { margin-top: 6px; font-size: .8rem; }
.family-axis-new[open] > summary { margin-bottom: 4px; }
.family-actions { width: 1%; text-align: right; white-space: nowrap; }
.family-unit-options { margin-top: 6px; }
.family-unit-options a { display: block; }

.category-workspace { display: grid; grid-template-columns: minmax(0, 3fr) minmax(250px, 2fr); gap: 16px; align-items: start; }
.category-workspace [hidden] { display: none; }
.category-filters { display: grid; grid-template-columns: minmax(140px, 2fr) repeat(2, minmax(115px, 1fr)); gap: 8px; }
.category-filters label, .category-editor label { font-size: .85rem; font-weight: 600; }
.category-filters .form-control, .category-filters .form-select, .category-editor textarea { margin-top: 4px; }
.category-tree-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 8px; }
.category-rows { --category-indent: 26px; --category-guide-color: var(--bs-secondary-border-subtle); list-style: none; margin: 0; padding: 0; }
.category-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 0 8px; box-shadow: inset 0 -1px var(--bs-border-color); }
.category-row:hover { background: var(--bs-tertiary-bg); }
.category-row.category-selected { background: var(--bs-primary-bg-subtle); border-radius: 6px; }
.category-row-main, .category-row-status { display: flex; align-items: center; }
.category-row-main { min-width: 0; align-self: stretch; }
.category-row-status { flex-wrap: wrap; justify-content: end; gap: 5px; }
.category-guides { flex: none; display: flex; align-self: stretch; }
.category-guide { position: relative; width: var(--category-indent); }
.category-guide-through::before, .category-guide-elbow::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: calc(var(--category-indent) / 2); border-inline-start: 1px solid var(--category-guide-color); }
.category-guide-end::before { inset-block-end: 50%; }
.category-guide-elbow::after { content: ""; position: absolute; inset-block-start: 50%; inset-inline: calc(var(--category-indent) / 2) 2px; border-block-start: 1px solid var(--category-guide-color); }
.category-toggle, .category-leaf-space { flex: 0 0 var(--category-indent); width: var(--category-indent); }
.category-toggle { min-height: 25px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--bs-secondary-color); }
.category-toggle:enabled:hover { border-color: var(--bs-border-color); background: var(--bs-body-bg); }
.category-toggle-empty { visibility: hidden; }
.catalog-workspace .category-link { margin-inline-start: 4px; padding-block: 4px; color: var(--bs-body-color); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.catalog-workspace .category-link:hover { text-decoration: underline; }
.catalog-workspace .category-context .category-link { color: var(--bs-secondary-color); font-weight: 400; }
.category-no-results { padding: 12px 0; }
.category-editor { position: sticky; top: 72px; min-width: 0; scroll-margin-top: 72px; }
.category-editor .category-breadcrumb { margin-bottom: 6px; font-size: .82rem; overflow-wrap: anywhere; }
.category-editor textarea { margin-bottom: 10px; }
.category-sync summary { cursor: pointer; font-weight: 600; }
.category-sync-content { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 12px; margin-top: 10px; }
@media (max-width: 1050px) {
    .category-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .category-editor { position: static; grid-row: 1; }
}
@media (max-width: 575px) {
    .category-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-filters label:first-child { grid-column: 1 / -1; }
    .category-rows { --category-indent: 18px; }
}

.family-channel-switch { margin: 0 0 16px; }
.family-channel-switch .nav-link { padding: 6px 12px; color: #45574f; }
.family-channel-switch .nav-link.active { color: #244d3f; font-weight: 650; }
.family-category-form [hidden] { display: none; }
.family-category-selected {
    margin-bottom: 16px; padding: 12px; border: 1px solid var(--bs-border-color);
    border-radius: 8px; background: var(--bs-tertiary-bg);
}
.family-category-selected h2 { margin: 0 0 6px; font-size: 1rem; }
.family-category-selected li {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
    gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid var(--bs-border-color);
}
.family-category-selected li:last-child { border-bottom: 0; }
.family-category-selected [data-category-name] { flex: 1 1 12rem; overflow-wrap: anywhere; }
.family-category-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.family-category-action[aria-disabled="true"],
.family-category-actions button[aria-disabled="true"] { opacity: .65; cursor: progress; }

.bridge-toasts {
    position: fixed;
    inset-inline-end: 10px;
    top: calc(var(--bridge-header-height) + 8px);
    width: min(404px, calc(100% - 20px));
    max-height: calc(100dvh - var(--bridge-header-height) - 32px);
    overflow: auto;
    padding: 6px;
    z-index: 1090;
}
.bridge-toast {
    --toast-accent: #1557ab;
    --toast-surface: #eaf3ff;
    --toast-ink: #15385f;
    width: 100%;
    pointer-events: auto;
    background: var(--toast-surface);
    color: var(--toast-ink);
    border-inline-start: 5px solid var(--toast-accent);
    border-radius: 10px;
    box-shadow: 0 4px 12px #17213329;
}
.bridge-toast[data-kind="success"] {
    --toast-accent: #137046;
    --toast-surface: #e5f7ed;
    --toast-ink: #173e2d;
}
.bridge-toast[data-kind="error"] {
    --toast-accent: #ae253a;
    --toast-surface: #ffeaed;
    --toast-ink: #651d2a;
}
.bridge-toast .toast-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    overflow-wrap: anywhere;
}
.bridge-toast-icon {
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    height: 24px;
    background: var(--toast-accent);
    color: white;
    border-radius: 50%;
    font-weight: 700;
}
.bridge-toast-content { flex: 1; min-width: 0; }
.bridge-toast-content strong { display: block; margin-bottom: 2px; }
.bridge-toast .btn-close { flex: none; }
.family-category-tools { margin-bottom: 8px; }
.family-category-tools label { display: block; margin-bottom: 4px; font-weight: 600; }
.family-category-tools .form-control[type="search"] { width: min(100%, 20rem); }
.family-category-rows { max-height: min(52vh, 34rem); overflow: auto; border: 1px solid var(--bs-border-color); border-radius: 8px; }
.family-category-rows .category-link { margin-inline-start: 4px; overflow-wrap: anywhere; }
.family-category-action { flex: none; white-space: nowrap; margin-block: 3px; }

.header-user { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.header-user form { margin: 0 !important; }
.header-profile {
    display: inline-flex; align-items: center; gap: .45rem; min-width: 0;
    padding: .2rem .65rem .2rem .25rem; border: 1px solid var(--bs-border-color);
    border-radius: 999px; color: var(--bs-emphasis-color); background: var(--bs-body-bg);
    text-decoration: none; font-size: .85rem; font-weight: 600;
}
.header-profile:is(:hover, [aria-current="page"]) {
    background: var(--bs-tertiary-bg); color: var(--bs-emphasis-color); text-decoration: none;
}
.header-profile-avatar {
    display: grid; place-items: center; width: 1.65rem; height: 1.65rem; flex: 0 0 auto;
    border-radius: 50%; color: #eeeef4; background: #465c76; font-size: .65rem;
}
.header-profile-name { max-width: clamp(5rem, 22vw, 16rem); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; max-width: 54rem; align-items: start; }
.account-settings .family-editor { margin-bottom: 0; }
