.catalog-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 8px 0 28px; }
.toolbox-app .catalog-heading h1 { color: var(--text); margin: 0 0 8px; font-size: clamp(28px, 3vw, 36px); }
.catalog-heading > button { flex-shrink: 0; }
.catalog-heading .mud-icon-root { width: 20px; height: 20px; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.catalog-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.toolbox-app .catalog-tabs button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; padding: 8px 12px; font: 600 14px var(--font); }
.toolbox-app .catalog-tabs button.active { background: var(--pale); color: var(--pd); }
.catalog-tabs button > span { padding: 1px 6px; border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 12px; }
.catalog-tabs .mud-icon-root { width: 18px; height: 18px; }
.catalog-search, .icon-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.catalog-search { width: 300px; max-width: 100%; }
.catalog-search > svg, .icon-search > svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.catalog-search input, .icon-search input { min-width: 0; width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--text); font: 400 16px var(--font); }
.catalog-search input::placeholder, .icon-search input::placeholder { color: var(--muted); }
.catalog-search:focus-within, .icon-search:focus-within { outline: 2px solid var(--pd); outline-offset: 2px; }
.toolbox-app :is(.catalog-search, .icon-search) input:focus-visible { outline: none; }
.catalog-list { display: grid; gap: 12px; }
.catalog-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 20px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.catalog-leading { display: flex; align-items: center; gap: 10px; }
.toolbox-app .catalog-row button.catalog-drag { display: grid; place-items: center; width: 24px; min-width: 24px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: grab; touch-action: none; }
.catalog-drag svg { width: 20px; height: 20px; }
.catalog-row.is-dragging { opacity: .5; }
.catalog-row.is-dragging .catalog-drag { cursor: grabbing; }
.catalog-row.drop-before::before, .catalog-row.drop-after::after { content: ""; position: absolute; height: 3px; background: var(--pd); border-radius: 3px; left: 0; right: 0; }
.catalog-row.drop-before::before { top: -8px; }
.catalog-row.drop-after::after { bottom: -8px; }
.news-tabs { width: fit-content; margin-bottom: 22px; }
.news-row-actions button { min-height: 42px; border-radius: 7px; }
.news-row-actions svg { width: 19px; height: 19px; }
.catalog-symbol { display: inline-grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 12px; background: var(--pale); color: var(--pd); }
.catalog-symbol > svg { width: 27px; height: 27px; }
.catalog-row-content { min-width: 0; }
.toolbox-app .catalog-row h2 { margin: 0 0 5px; color: var(--text); font: 600 18px/1.4 var(--display); overflow-wrap: anywhere; }
.toolbox-app .catalog-row p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.catalog-row-actions { display: flex; align-items: center; gap: 8px; }
.toolbox-app .catalog-row button { border-radius: 7px; font: 600 14px var(--font); min-height: 42px; padding: 10px 12px; }
.catalog-row-actions .mud-icon-root { width: 19px; height: 19px; }
.toolbox-app .catalog-row button.catalog-delete-button { width: 42px; padding: 10px; border-color: transparent; background: transparent; color: var(--muted); }
.toolbox-app .catalog-row button.catalog-delete-button:hover { color: var(--error); background: var(--error-surface); }
.catalog-empty { padding: 64px 24px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); }
.catalog-empty > svg { width: 36px; height: 36px; margin-bottom: 18px; }
.catalog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.catalog-row .catalog-tags { margin: 10px 0 0; }
.catalog-tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 5px; background: var(--tag-bg); color: var(--tag-fg); font: 600 12px/1.4 var(--font); overflow-wrap: anywhere; max-width: 100%; }
[data-theme="dark"] .catalog-tag { background: var(--tag-dark-bg); color: var(--tag-dark-fg); }
.toolbox-app button.catalog-back { border: 0; background: transparent; min-height: 36px; padding: 0; font: 400 14px var(--font); margin: 0 0 12px; }
.catalog-editor-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.catalog-editor { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.catalog-editor > fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.catalog-editor-section { padding: 28px; }
.catalog-editor-section + .catalog-editor-section { border-top: 1px solid var(--line); }
.toolbox-app .catalog-editor-section > label { margin: 24px 0 0; font-size: 14px; }
.toolbox-app .catalog-editor textarea { min-height: 104px; }
.toolbox-app .catalog-editor .validation-errors { margin: 24px 28px; }
.catalog-icon-field { display: flex; align-items: center; gap: 18px; }
.catalog-symbol.large { width: 64px; height: 64px; }
.catalog-symbol.large > svg { width: 32px; height: 32px; }
.field-caption { display: block; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.toolbox-app .catalog-icon-field button { min-height: 36px; padding: 6px 10px; font: 600 14px var(--font); border-color: var(--line); border-radius: 6px; }
.catalog-icon-field button svg { width: 18px; height: 18px; }
.toolbox-app .catalog-editor-section h2 { font-size: 17px; margin-bottom: 20px; }
.tag-composer { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; align-items: end; gap: 10px; }
.toolbox-app .catalog-editor .tag-composer label { margin: 0; font-size: 13px; }
.toolbox-app .catalog-editor .tag-composer input { margin: 8px 0 0; }
.toolbox-app .catalog-editor.html-form .tag-color-field input[type=color] { width: 44px; height: 44px; min-height: 44px; padding: 3px; cursor: pointer; }
.toolbox-app .catalog-editor .tag-add-button { width: 44px; height: 44px; padding: 8px; }
.tag-edit-list { display: grid; gap: 8px; margin-top: 18px; }
.tag-edit-row { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.toolbox-app .catalog-editor label.tag-edit-color { display: flex; align-items: center; gap: 8px; width: auto; margin: 0 0 0 auto; font-size: 12px; font-weight: 400; color: var(--muted); }
.toolbox-app .catalog-editor.html-form .tag-edit-color input[type=color] { width: 30px; height: 30px; min-height: 30px; margin: 0; padding: 2px; cursor: pointer; }
.catalog-editor input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.catalog-editor input[type=color]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.catalog-editor input[type=color]::-moz-color-swatch { border: 0; border-radius: 3px; }
.toolbox-app .catalog-editor .tag-remove { border: 0; background: transparent; color: var(--muted); width: 32px; min-height: 32px; padding: 6px; }
.tag-remove svg { width: 18px; height: 18px; }
.field-hint, .toolbox-app p.field-hint { display: block; color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.catalog-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; gap: 28px; }
.toolbox-app .catalog-options label { font-size: 14px; }
.toolbox-app .catalog-editor.html-form .catalog-options input[type=number] { max-width: 140px; }
.toolbox-app .catalog-options .check { margin-top: 28px; }
.catalog-options small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 4px; }
.catalog-editor-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px 28px; border-top: 1px solid var(--line); }
.catalog-preview { position: sticky; top: 24px; min-width: 0; }
.page:has(.catalog-editor) > .back-link { display: none; }
.toolbox-app .catalog-preview > h2 { color: var(--muted); font: 600 13px var(--font); margin: 0 0 12px; }
.toolbox-app .catalog-preview .tool-card h3 { overflow-wrap: anywhere; }
.catalog-preview .tool-card p { overflow-wrap: anywhere; }
.catalog-preview .tool-card .button { margin-top: auto; cursor: default; }
.toolbox-app .icon-picker-dialog .mud-dialog-content { max-height: min(65vh, 640px); overflow-y: auto; }
.icon-result-count { margin: 14px 0 !important; font-size: 13px; color: var(--muted); }
.icon-picker-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.toolbox-app .icon-picker-grid button.icon-choice { min-width: 0; display: flex; flex-direction: column; gap: 8px; min-height: 80px; padding: 12px 5px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--paper); }
.toolbox-app .icon-picker-grid button.icon-choice:hover, .toolbox-app .icon-picker-grid button.selected { background: var(--pale); color: var(--pd); border-color: var(--pd); }
.icon-choice > svg { width: 27px; height: 27px; }
.icon-choice > span { max-width: 100%; font: 400 11px var(--font); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.toolbox-app .icon-load-more { margin-top: 20px; width: 100%; }
.icon-license { margin-right: auto; font-size: 12px; }
@media (max-width: 900px) {
    .catalog-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; }
    .catalog-row > .status-chip { grid-column: 2; grid-row: 2; justify-self: start; }
    .catalog-row-actions { grid-column: 3; grid-row: 1 / 3; }
    .catalog-editor-layout { grid-template-columns: minmax(0, 1fr); }
    .catalog-preview { position: static; max-width: 440px; width: 100%; margin-inline: auto; }
}
@media (max-width: 600px) {
    .catalog-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
    .catalog-search { width: 100%; }
    .catalog-row { padding: 18px; gap: 14px; grid-template-columns: auto minmax(0, 1fr); }
    .catalog-symbol { width: 42px; height: 42px; border-radius: 9px; }
    .toolbox-app .catalog-row h2 { font-size: 16px; }
    .catalog-row-actions { grid-column: 1 / -1; grid-row: 3; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--line); }
    .catalog-row-actions .catalog-edit-button { flex: 1; }
    .catalog-editor-section, .catalog-editor-actions { padding: 20px; }
    .catalog-options { grid-template-columns: 1fr; gap: 0; }
    .tag-edit-color > span { display: none; }
    .tag-composer { gap: 8px; }
    .icon-picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .icon-license { flex: 1 0 100%; margin-bottom: 8px; }
}
