/* Artikelkatalog – modal tabellvy */
.saved-articles-modal .saved-articles-content {
    max-width: min(960px, 96vw);
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.saved-articles-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.75rem;
    margin-bottom: 0;
}

#articleCatalogTableHost {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0.75rem 0 0;
}

.catalog-toolbar {
    margin-bottom: 0.75rem;
}

.catalog-search {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
}

.catalog-table-scroll {
    overflow: auto;
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.catalog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.catalog-table th,
.catalog-table td {
    padding: 0.55rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.catalog-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    z-index: 1;
}

.catalog-table tbody tr:hover {
    background: #f9fafb;
}

.catalog-row--hidden {
    opacity: 0.65;
}

.catalog-code {
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

.catalog-price {
    font-variant-numeric: tabular-nums;
}

.catalog-set-price {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    text-decoration: underline;
}

.catalog-set-price:hover {
    color: #1d4ed8;
}

.catalog-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.catalog-badge--standard {
    background: #e5e7eb;
    color: #374151;
}

.catalog-badge--customized {
    background: #dbeafe;
    color: #1d4ed8;
}

.catalog-badge--custom {
    background: #d1fae5;
    color: #047857;
}

.catalog-badge--hidden {
    background: #fef3c7;
    color: #92400e;
    margin-left: 0.35rem;
}

.catalog-actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

.catalog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 0.8rem;
}

.catalog-btn:hover {
    background: #f3f4f6;
}

.catalog-btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.catalog-btn--primary:hover {
    background: #1d4ed8;
}

.catalog-btn--danger {
    color: #dc2626;
    border-color: #fecaca;
}

.catalog-btn--danger:hover {
    background: #fef2f2;
}

.catalog-empty {
    text-align: center;
    color: #6b7280;
    padding: 2rem !important;
}

.catalog-hint {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.catalog-form-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.catalog-form-wrap h4 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
}

.catalog-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.catalog-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.catalog-form-grid input,
.catalog-form-grid select {
    padding: 0.45rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.catalog-checkbox {
    flex-direction: row !important;
    align-items: center;
    grid-column: 1 / -1;
}

.catalog-form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@media (max-width: 640px) {
    .catalog-table thead {
        display: none;
    }

    .catalog-table tbody tr {
        display: block;
        border-bottom: 1px solid #e5e7eb;
        padding: 0.65rem 0;
    }

    .catalog-table tbody td {
        display: flex;
        justify-content: space-between;
        border: none;
        padding: 0.25rem 0.65rem;
    }

    .catalog-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        margin-right: 0.5rem;
    }

    .catalog-form-grid {
        grid-template-columns: 1fr;
    }
}
