html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ============================================
   Hero Banner Block
   Полноэкранная секция с заголовком,
   подзаголовком и CTA-кнопкой
   ============================================ */
.hero-banner {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b6ec2 0%, #006bb7 50%, #0d4f8a 100%);
    overflow: hidden;
    padding: 4rem 2rem;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-banner__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    color: #ffffff;
}

.hero-banner__title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-banner__subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0 0 2rem 0;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-banner__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1b6ec2;
    background-color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hero-banner__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    color: #0d4f8a;
}

.hero-banner__button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ============================================
   Rich Text Block
   Контейнер для HTML-контента с типографикой
   ============================================ */
.rich-text {
    max-width: 100%;
    line-height: 1.7;
    color: #333;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

.rich-text h1 { font-size: 2rem; }
.rich-text h2 { font-size: 1.5rem; }
.rich-text h3 { font-size: 1.25rem; }
.rich-text h4 { font-size: 1.125rem; }

.rich-text p {
    margin: 0 0 1rem 0;
}

.rich-text p:last-child {
    margin-bottom: 0;
}

.rich-text a {
    color: #1b6ec2;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rich-text a:hover {
    text-decoration: none;
}

.rich-text ul,
.rich-text ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.rich-text li {
    margin-bottom: 0.5rem;
}

.rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.rich-text blockquote {
    border-left: 4px solid #1b6ec2;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

.rich-text code {
    background: #f1f3f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
}

.rich-text pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.rich-text pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.rich-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.rich-text th,
.rich-text td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

.rich-text th {
    background: #f5f5f5;
    font-weight: 600;
}

/* ============================================
   Rich Text Editor (WYSIWYG)
   Стили для компонента редактирования
   ============================================ */
.rich-text-editor {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    min-height: 40px;
}

.rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #495057;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-family: inherit;
    line-height: 1;
}

.rte-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #212529;
}

.rte-btn:active {
    background: #dee2e6;
    transform: scale(0.95);
}

.rte-btn.rte-btn-danger:hover {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.rte-btn-text {
    font-size: 12px;
    font-weight: 700;
    color: inherit;
}

.rte-separator {
    width: 1px;
    height: 24px;
    background: #dee2e6;
    margin: 0 4px;
}

.rte-editor {
    min-height: 200px;
    padding: 12px 16px;
    outline: none;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    overflow-y: auto;
}

.rte-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(27,110,194,0.15);
}

.rte-editor:empty:before {
    content: attr(data-placeholder);
    color: #adb5bd;
    font-style: italic;
}

/* Стили внутри редактора */
.rte-editor h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    color: #1a1a1a;
}

.rte-editor h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    color: #333;
}

.rte-editor p {
    margin: 0 0 1rem 0;
}

.rte-editor a {
    color: #1b6ec2;
    text-decoration: underline;
}

/* Source mode textarea */
.rte-source-editor {
    width: 100%;
    min-height: 200px;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #d4d4d4;
    background: #1e1e1e;
    resize: vertical;
    tab-size: 4;
}

.rte-source-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(27,110,194,0.15);
}

/* Active Source button */
.rte-btn.rte-btn-active {
    background: #1b6ec2;
    color: #fff;
    border-color: #1b6ec2;
}

.rte-btn.rte-btn-active:hover {
    background: #155a9e;
    color: #fff;
}

/* ============================================
   Утилита обрезки текста (аналог Bootstrap .text-truncate)
   ============================================ */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   Дерево каталога: имя категории с обрезкой
   ============================================ */
.catalog-tree-name {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   Bootstrap-совместимые утилиты
   (классы, отсутствующие в MudBlazor 6.11)
   ============================================ */

/* Выравнивание текста */
.text-center { text-align: center !important; }
.text-start { text-align: start !important; }
.text-end { text-align: end !important; }

/* Цвет текста (маппинг на палитру MudBlazor) */
.text-primary { color: var(--mud-palette-primary) !important; }
.text-secondary { color: var(--mud-palette-text-secondary) !important; }
.text-muted { color: var(--mud-palette-text-secondary) !important; }
.text-success { color: var(--mud-palette-success) !important; }
.text-info { color: var(--mud-palette-info) !important; }
.text-warning { color: var(--mud-palette-warning) !important; }
.text-danger { color: var(--mud-palette-error) !important; }

/* Жирность шрифта */
.font-weight-normal { font-weight: 400 !important; }
.font-weight-medium { font-weight: 500 !important; }
.font-weight-bold { font-weight: 700 !important; }

/* Размеры */
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

/* Позиционирование */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }

/* Изображения */
.img-fluid { max-width: 100%; height: auto; }

/* Фоны (блоки Page Builder) */
.bg-light { background-color: var(--mud-palette-background-grey) !important; }
.bg-dark { background-color: #212121 !important; }
.bg-white { background-color: #ffffff !important; }

/* ============================================
   Вкладки MudTabs: запрет переноса заголовков
   (длинные заголовки не должны разрывать layout;
   при переполнении MudBlazor показывает кнопки прокрутки)
   ============================================ */
.mud-tab {
    white-space: nowrap;
}

/* ============================================
   Разделитель (сплиттер) для панели деталей товара в каталоге
   ============================================ */
.catalog-details-splitter {
    width: 6px;
    cursor: col-resize;
    background-color: var(--mud-palette-lines-default, #e0e0e0);
    flex-shrink: 0;
    position: relative;
    z-index: 15;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.catalog-details-splitter::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 36px;
    border-radius: 2px;
    background-color: var(--mud-palette-text-disabled, rgba(0, 0, 0, 0.25));
    transition: background-color 0.2s ease, height 0.2s ease;
}

.catalog-details-splitter:hover,
.catalog-details-splitter.active {
    background-color: var(--mud-palette-primary, #1976D2);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.25);
}

.catalog-details-splitter:hover::after,
.catalog-details-splitter.active::after {
    background-color: #ffffff;
    height: 48px;
}

/* ============================================
   Smart Filter Splitters (Drawer left edge & Inner section)
   ============================================ */
.smart-filter-drawer-splitter {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize;
    background: linear-gradient(to right, #cbd5e1 0%, #f1f5f9 100%);
    border-right: 1px solid #cbd5e1;
    z-index: 1200;
    transition: background 0.2s ease, box-shadow 0.2s ease, width 0.2s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smart-filter-drawer-splitter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: ew-resize;
}

.smart-filter-drawer-splitter::after {
    content: '⋮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 64px;
    border-radius: 4px;
    background-color: #64748b;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.smart-filter-drawer-splitter:hover,
.smart-filter-drawer-splitter.active {
    background: #1976d2 !important;
    border-color: #1976d2 !important;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.4);
}

.smart-filter-drawer-splitter:hover::after,
.smart-filter-drawer-splitter.active::after {
    background-color: #ffffff;
    color: #1976d2;
    transform: translate(-50%, -50%) scale(1.15);
}

.smart-filter-section-splitter {
    width: 10px;
    cursor: col-resize;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    border-radius: 5px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smart-filter-section-splitter::after {
    content: '⋮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 50px;
    border-radius: 3px;
    background-color: #94a3b8;
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.smart-filter-section-splitter:hover,
.smart-filter-section-splitter.active {
    background-color: #1976d2 !important;
    border-color: #1976d2 !important;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.35);
}

.smart-filter-section-splitter:hover::after,
.smart-filter-section-splitter.active::after {
    background-color: #ffffff;
    color: #1976d2;
    transform: translate(-50%, -50%) scale(1.15);
}

/* ============================================
   Excel Matrix Mode Styles
   ============================================ */
.excel-matrix-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--mud-palette-surface, #ffffff);
    outline: none;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.excel-matrix-table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.excel-matrix-header-cell {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--mud-palette-background-grey, #f4f6f8);
    color: var(--mud-palette-text-primary, #333333);
    font-weight: 600;
    padding: 4px 6px;
    border-right: 1px solid var(--mud-palette-lines-default, #e0e0e0);
    border-bottom: 2px solid var(--mud-palette-lines-default, #c0c0c0);
    white-space: nowrap;
    text-align: left;
    user-select: none;
    box-sizing: border-box;
    overflow: visible;
}

.excel-matrix-header-cell.sorted-col {
    background-color: #e9f2fb;
}

.excel-matrix-header-cell.filtered-col {
    background-color: #fff9e6;
}

.excel-header-title-wrapper {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.excel-header-title-wrapper:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.excel-filter-btn {
    opacity: 0.4;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.excel-matrix-header-cell:hover .excel-filter-btn,
.excel-filter-btn.active {
    opacity: 1;
}

.excel-filter-btn.active {
    color: var(--mud-palette-primary) !important;
}

.excel-filter-popover {
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-default, #d0d7de);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18) !important;
}

.excel-matrix-header-col-num {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 20;
    width: 45px;
    min-width: 45px;
    max-width: 45px;
    text-align: center;
    background-color: var(--mud-palette-background-grey, #e8ecef);
    border-right: 2px solid var(--mud-palette-lines-default, #c0c0c0);
    border-bottom: 2px solid var(--mud-palette-lines-default, #c0c0c0);
    font-weight: 600;
    padding: 6px 4px;
    box-sizing: border-box;
}

.excel-column-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 15;
    background-color: transparent;
    transition: background-color 0.15s ease;
}

.excel-column-resizer:hover,
.excel-column-resizer.resizing {
    background-color: #1976D2;
}

.excel-matrix-row-num {
    position: sticky;
    left: 0;
    z-index: 5;
    width: 45px;
    min-width: 45px;
    max-width: 45px;
    background-color: var(--mud-palette-background-grey, #f8f9fa);
    text-align: center;
    color: var(--mud-palette-text-secondary, #757575);
    font-size: 11px;
    border-right: 2px solid var(--mud-palette-lines-default, #c0c0c0);
    border-bottom: 1px solid var(--mud-palette-lines-default, #e0e0e0);
    padding: 4px;
    user-select: none;
    cursor: pointer;
    box-sizing: border-box;
}

.excel-matrix-row-num:hover {
    background-color: #e2e8f0;
}

.excel-matrix-cell {
    border-right: 1px solid var(--mud-palette-lines-default, #e5e7eb);
    border-bottom: 1px solid var(--mud-palette-lines-default, #e5e7eb);
    padding: 3px 6px;
    height: 28px;
    max-height: 28px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: var(--mud-palette-surface, #ffffff);
    position: relative;
    cursor: cell;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

.excel-matrix-cell.cell-modified {
    background-color: rgba(255, 193, 7, 0.18) !important;
}

.excel-matrix-cell.cell-modified::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 6px 6px 0;
    border-color: transparent #ff9800 transparent transparent;
}

.excel-cell-content {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    min-width: 0;
}

.excel-text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    min-width: 0;
}
.excel-matrix-cell.active-cell {
    outline: 2px solid #1976D2 !important;
    outline-offset: -2px;
    z-index: 4;
}

.excel-matrix-cell.selected-range {
    background-color: rgba(25, 118, 210, 0.15) !important;
}

.excel-fill-handle {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 7px;
    height: 7px;
    background-color: #1976D2;
    border: 1px solid #ffffff;
    cursor: crosshair;
    z-index: 10;
    pointer-events: all;
}

.excel-matrix-cell.fill-preview {
    background-color: rgba(76, 175, 80, 0.2) !important;
    outline: 1px dashed #4caf50 !important;
    outline-offset: -1px;
}

.excel-cell-editor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2px 6px;
    margin: 0;
    border: 2px solid #1976D2;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    background-color: var(--mud-palette-surface, #ffffff);
    color: var(--mud-palette-text-primary, #000000);
    box-sizing: border-box;
    z-index: 15;
}

.matrix-tag {
    display: inline-block;
    padding: 1px 6px;
    font-size: 11px;
    line-height: 16px;
    background-color: var(--mud-palette-background-grey, #f0f2f5);
    color: var(--mud-palette-text-primary, #333);
    border: 1px solid var(--mud-palette-lines-default, #d0d7de);
    border-radius: 4px;
    white-space: nowrap;
}

.cell-dropdown-btn {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--mud-palette-background-grey, #e9ecef);
    border: 1px solid var(--mud-palette-lines-default, #ced4da);
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    color: var(--mud-palette-text-primary, #495057);
    z-index: 5;
    opacity: 0.85;
    transition: opacity 0.15s, background-color 0.15s;
}

.cell-dropdown-btn:hover {
    opacity: 1;
    background-color: #1976D2;
    color: #ffffff;
    border-color: #1976D2;
}

.excel-matrix-cell:hover .cell-dropdown-btn,
.excel-matrix-cell.active-cell .cell-dropdown-btn {
    display: flex;
}

.excel-cell-editor.select-editor {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231976D2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 6px top 50%;
    background-size: 10px auto;
    padding-right: 20px;
    appearance: none;
    -webkit-appearance: none;
}

/* ============================================
   Product Catalog Photo Thumbnail & Popover Preview
   ============================================ */
.product-photo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.product-photo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mud-palette-lines-default, #e0e0e0);
    background-color: var(--mud-palette-background-grey, #f5f5f5);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-photo-badge:hover .product-photo-thumb {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}






/* ============================================
   MudBlazor Icon & Focus Helper
   ============================================ */
svg.mud-svg-icon,
.mud-icon-root,
.mud-input-adornment svg,
.mud-select svg {
    pointer-events: none !important;
}

.mud-button-root,
.mud-icon-button,
.mud-chip,
.mud-list-item,
.mud-list,
.mud-select,
.mud-popover {
    pointer-events: auto;
}


/* ============================================
   Catalog Nested Rows & Bundle Breakdown Styles
   ============================================ */
.catalog-nested-row-container {
    background-color: #f8fafc !important;
    border-bottom: 2px solid var(--mud-palette-lines-default, #e0e0e0) !important;
}

.catalog-nested-content {
    padding: 12px 16px;
    background: #fdfdfd;
    border-left: 4px solid var(--mud-palette-primary, #1976D2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.catalog-child-table {
    border: 1px solid var(--mud-palette-lines-default, #e0e0e0);
    border-radius: 6px;
    background-color: #ffffff;
}

.catalog-child-table th {
    background-color: #f1f5f9 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 6px 10px !important;
}

.catalog-child-table td {
    font-size: 13px !important;
    padding: 6px 10px !important;
}

.catalog-bottleneck-chip {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeeba !important;
    font-weight: 600;
}


/* ============================================
   Smart Filter 1C-Style Hierarchical Grouping
   ============================================ */
.smart-filter-group-container {
    position: relative;
    border-radius: 6px;
    padding: 2px 2px 4px 6px;
    transition: all 0.2s ease;
}

.smart-filter-group-container.bracket-and {
    border-left: 3px solid #1976D2;
    background-color: rgba(25, 118, 210, 0.015);
}

.drop-zone-active {
    border: 2px dashed #1976D2 !important;
    background-color: rgba(25, 118, 210, 0.08) !important;
}


.smart-filter-group-container.bracket-or {
    border-left: 3px solid #f59e0b;
    background-color: rgba(245, 158, 11, 0.025);
}

.smart-filter-group-container.bracket-not {
    border-left: 3px solid #ef4444;
    background-color: rgba(239, 68, 68, 0.025);
}

.smart-filter-group-container.group-disabled {
    opacity: 0.55;
}

.smart-filter-group-header {
    border-color: var(--mud-palette-lines-default, #e0e0e0) !important;
    background-color: var(--mud-palette-surface, #ffffff);
}

.smart-filter-criterion-row {
    border-color: var(--mud-palette-lines-default, #e0e0e0) !important;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.smart-filter-criterion-row:hover {
    border-color: var(--mud-palette-primary-lighten, #64b5f6) !important;
}

.smart-filter-criterion-row.criterion-selected {
    border-color: var(--mud-palette-primary, #1976D2) !important;
    background-color: rgba(25, 118, 210, 0.06) !important;
}

.smart-filter-criterion-row.criterion-disabled {
    opacity: 0.5;
    background-color: var(--mud-palette-background-grey, #f5f5f5);
}


/* ============================================
   Table Column Settings & Pinned Columns (1C Style)
   ============================================ */
.sticky-col-left {
    position: sticky !important;
    left: 0;
    z-index: 2;
    background-color: var(--mud-palette-surface, #ffffff) !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.table-col-header-custom {
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================
   Catalog Category Splitter & Table Column Resizers
   ============================================ */
.catalog-category-splitter {
    width: 6px;
    cursor: col-resize;
    background-color: var(--mud-palette-lines-default, #e0e0e0);
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    transition: background-color 0.15s ease;
}

.catalog-category-splitter:hover,
.catalog-category-splitter.active {
    background-color: var(--mud-palette-primary, #1976D2);
}

.catalog-table-wrapper th.mud-table-cell {
    position: relative !important;
}

/* Fixed compact width for MudTable multi-selection checkbox column */
.catalog-table-wrapper th.mud-table-cell:first-child,
.catalog-table-wrapper td.mud-table-cell:first-child {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    padding: 0 4px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.catalog-col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 10;
    background-color: transparent;
    transition: background-color 0.15s ease;
}

.catalog-col-resizer:hover,
.catalog-col-resizer.resizing {
    background-color: var(--mud-palette-primary, #1976D2);
}


/* ============================================
   Catalog Table Scroll & Structure
   ============================================ */
.catalog-table-wrapper {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.catalog-table-wrapper .mud-table {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.catalog-table-wrapper .mud-table-container {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow-y: auto !important;
}

/* ============================================
   Catalog Selected Row & Slide Panel
   ============================================ */
.catalog-selected-row {
    background-color: rgba(25, 118, 210, 0.12) !important;
    outline: 2px solid var(--mud-palette-primary, #1976D2);
    outline-offset: -2px;
}
.catalog-selected-row:hover {
    background-color: rgba(25, 118, 210, 0.18) !important;
}

.catalog-details-panel {
    background-color: var(--mud-palette-surface, #ffffff);
    z-index: 10;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease, width 0.28s ease;
    will-change: transform, width, opacity;
}

.catalog-details-panel.is-collapsed {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.catalog-details-open-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    border-radius: 8px 0 0 8px !important;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15) !important;
    background-color: var(--mud-palette-surface, #ffffff) !important;
    color: var(--mud-palette-primary, #1976D2) !important;
    border: 1px solid var(--mud-palette-lines-default, #e0e0e0) !important;
    border-right: none !important;
    padding: 8px 4px !important;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.catalog-details-open-btn:hover {
    background-color: var(--mud-palette-primary, #1976D2) !important;
    color: #ffffff !important;
    transform: translateY(-50%) scale(1.05);
}


/* ============================================
   AppDateTimePicker Compact Controls
   ============================================ */
.app-datetime-picker .mud-input-adornment-end {
    margin-inline-start: 2px !important;
}

.app-datetime-picker .mud-input-clear-button {
    padding: 2px !important;
    margin-inline-start: 2px !important;
}

.app-datetime-picker .mud-input-control > .mud-input-control-input-container > .mud-input.mud-input-outlined {
    padding-left: 8px;
    padding-right: 4px;
}



.catalog-header-expand-btn {
    position: absolute;
    top: 6px;
    right: 20px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background-color: var(--mud-palette-surface, #ffffff);
    color: var(--mud-palette-primary, #1976D2);
    border: 1px solid var(--mud-palette-lines-default, #e0e0e0);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.catalog-header-expand-btn:hover {
    background-color: var(--mud-palette-primary, #1976D2);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.35);
    transform: translateY(-1px);
}
