.webshop-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.webshop-rate-summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 42px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #d7e5df;
    border-radius: 8px;
    background: #f7fbf9;
    color: #17382f;
}

.webshop-rate-summary-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #60736d;
}

.webshop-rate-summary-values {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 0.35rem;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.webshop-rate-summary-meta {
    grid-column: 1 / -1;
    color: #6b7c76;
    font-size: 0.72rem;
    font-weight: 500;
}

.webshop-tabs {
    display: inline-flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    border: 1px solid #e1e7e5;
    border-radius: 8px;
    background: #f7f9f8;
}

.webshop-filter-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid #e1e7e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.webshop-filter-fields {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
}

.webshop-filter-field {
    display: grid;
    gap: 0.25rem;
    min-width: 190px;
}

.webshop-filter-field label {
    color: #5f6d68;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.webshop-filter-field select,
.webshop-filter-field input {
    width: 100%;
    min-height: 40px;
    padding: 0.45rem 2rem 0.45rem 0.7rem;
    border: 1px solid #ccd8d4;
    border-radius: 8px;
    background-color: #fff;
    color: #17231f;
}

.webshop-filter-field input {
    padding-right: 0.7rem;
}

.webshop-filter-field-wide {
    min-width: 260px;
}

.webshop-filter-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.webshop-result-count {
    color: #4e5f59;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.webshop-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.webshop-dashboard-header h3 {
    margin: 0;
    color: #17231f;
    font-size: 1rem;
    font-weight: 800;
}

.webshop-dashboard-header span {
    color: #697974;
    font-size: 0.82rem;
    font-weight: 600;
}

.webshop-dashboard-cache {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.2rem 0.55rem;
    border: 1px solid #dce7e3;
    border-radius: 999px;
    background: #f7fbf9;
    color: #53635e;
    white-space: nowrap;
}

.webshop-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.webshop-dashboard-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-height: 92px;
    padding: 0.8rem;
    border: 1px solid #e1e7e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.webshop-dashboard-card-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.webshop-dashboard-card-loading {
    color: #697974;
}

.webshop-dashboard-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eaf5f0;
    color: #1d765f;
}

.webshop-dashboard-card > div:last-child {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.webshop-dashboard-card span {
    color: #5f6d68;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.webshop-dashboard-card strong {
    color: #17231f;
    font-size: 1.15rem;
    font-weight: 850;
    line-height: 1.15;
}

.webshop-dashboard-card small {
    color: #697974;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
}

.webshop-dashboard-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    font-weight: 700;
}

.webshop-products-shell,
.webshop-config-shell {
    display: grid;
    gap: 1.25rem;
}

.webshop-config-filters {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e1e7e5;
    border-radius: 8px;
    background: #fff;
}

.webshop-collapsible-section {
    border: 1px solid #dce7e3;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.webshop-collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 0;
    background: #f7fbf9;
    color: #17231f;
    cursor: pointer;
    text-align: left;
}

.webshop-collapsible-header span:first-child {
    display: grid;
    gap: 0.1rem;
}

.webshop-collapsible-header small {
    color: #697974;
    font-size: 0.8rem;
    font-weight: 600;
}

.webshop-collapsible-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #155e4b;
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.webshop-collapsible-body {
    padding: 0.75rem;
}

.webshop-bulk-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #dce7e3;
    border-radius: 8px;
    background: #f7fbf9;
}

.webshop-bulk-actions > div:first-child {
    display: grid;
    gap: 0.15rem;
}

.webshop-bulk-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.webshop-section-title {
    margin: 0 0 0.75rem;
    color: #17231f;
    font-size: 1rem;
    font-weight: 800;
}

.webshop-table-container {
    overflow: auto;
    border: 1px solid #e1e7e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.webshop-table-container .customer-table {
    margin: 0;
}

.webshop-table-container .webshop-product-table {
    width: 100%;
    table-layout: fixed;
}

.webshop-product-table .webshop-col-product {
    width: 21%;
}

.webshop-product-table .webshop-col-category {
    width: 11%;
}

.webshop-product-table .webshop-col-stock {
    width: 10%;
}

.webshop-product-table .webshop-col-linkage {
    width: 21%;
}

.webshop-product-table .webshop-col-woo-price {
    width: 12%;
}

.webshop-product-table .webshop-col-crm-price {
    width: 10%;
}

.webshop-product-table .webshop-col-modified {
    width: 9%;
}

.webshop-product-table .webshop-col-sync {
    width: 6%;
}

.webshop-product-table th:nth-child(1),
.webshop-product-table td:nth-child(1) {
    width: 21% !important;
}

.webshop-product-table th:nth-child(8),
.webshop-product-table td:nth-child(8) {
    width: 6% !important;
    text-align: center !important;
}

.webshop-table-container .customer-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f9f8;
    color: #3e4f49;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.webshop-product-name {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.webshop-product-name a {
    color: #155e4b;
    font-weight: 800;
}

.webshop-stock-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    max-width: 100%;
    margin-top: 0.25rem;
    padding: 0.25rem 0.45rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}

.webshop-stock-warning-critical {
    background: #fee2e2;
    color: #991b1b;
}

.webshop-stock-warning-warning {
    background: #fef3c7;
    color: #92400e;
}

.webshop-stock-warning-low {
    background: #fef3c7;
    color: #92400e;
}

.webshop-warning-critical {
    background: #fff7f7;
}

.webshop-warning-warning {
    background: #fffaf0;
}

.webshop-warning-low {
    background: #fffaf0;
}

.webshop-linkage-detail {
    margin-top: 0.25rem;
    color: #53635e;
    font-size: 0.78rem;
    line-height: 1.3;
}

.webshop-category-list,
.webshop-rate-stack {
    display: grid;
    gap: 0.15rem;
    line-height: 1.25;
}

.webshop-price-stack {
    display: grid;
    gap: 0.18rem;
    min-width: 150px;
    line-height: 1.25;
}

.webshop-price-stack strong {
    color: #53635e;
    font-size: 0.75rem;
    font-weight: 800;
}

.webshop-modified-stack {
    display: grid;
    gap: 0.3rem;
    min-width: 150px;
}

.webshop-rate-stack span {
    white-space: nowrap;
}

.webshop-price-sync-cell {
    display: grid;
    gap: 0.25rem;
    justify-items: center;
    min-width: 0;
    width: 100%;
}

.webshop-switch {
    position: relative;
    display: inline-flex;
    width: 46px;
    height: 26px;
}

.webshop-switch input {
    width: 0;
    height: 0;
    opacity: 0;
}

.webshop-switch-slider {
    position: absolute;
    inset: 0;
    border: 1px solid #cbd5d1;
    border-radius: 999px;
    background: #e5ece9;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.webshop-switch-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
    transition: transform 0.16s ease;
}

.webshop-switch input:checked + .webshop-switch-slider {
    border-color: #1d765f;
    background: #1d765f;
}

.webshop-switch input:checked + .webshop-switch-slider::before {
    transform: translateX(20px);
}

.webshop-switch input:disabled + .webshop-switch-slider {
    cursor: not-allowed;
    opacity: 0.48;
}

.webshop-sync-error {
    color: #b91c1c;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.webshop-muted {
    color: #697974;
}

.webshop-config-select {
    width: 100%;
    min-width: 260px;
    padding: 0.45rem;
}

.webshop-threshold-input {
    width: 90px;
    padding: 0.4rem;
}

.webshop-actions-nowrap {
    white-space: nowrap;
}

.webshop-inline-empty {
    padding: 1.25rem;
    color: #697974;
    text-align: center;
    font-weight: 700;
}

.webshop-select-column {
    width: 1%;
    min-width: 54px;
    text-align: center;
}

.webshop-select-column input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .webshop-header-actions,
    .webshop-filter-toolbar,
    .webshop-config-filters,
    .webshop-filter-meta {
        align-items: stretch;
        justify-content: flex-start;
    }

    .webshop-filter-toolbar,
    .webshop-config-filters,
    .webshop-header-actions {
        flex-direction: column;
    }

    .webshop-rate-summary,
    .webshop-filter-field,
    .webshop-filter-field-wide,
    .webshop-filter-meta .btn {
        width: 100%;
    }

    .webshop-rate-summary {
        justify-content: space-between;
    }

    .webshop-bulk-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .webshop-bulk-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 1400px) {
    .webshop-dashboard-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 700px) {
    .webshop-dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .webshop-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
