.pi-client-card {
    --pi-table-control: #667eea;
    --pi-table-control-focus: rgba(102, 126, 234, 0.1);
    --pi-table-hover-shadow: rgba(102, 126, 234, 0.2);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.pi-client-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.pi-client-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 0;
    padding: 1.25rem 1.5rem;
}

.pi-client-card-header .card-title {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.pi-client-card-header i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.pi-client-card-body {
    padding: 1.5rem;
    margin-bottom: 0;
    background-color: #ffffff;
}

.pi-client-alert {
    background-color: #f0f7ff;
    border: 1px solid #cfe2ff;
    border-radius: 6px;
    color: #084298;
}

.pi-client-alert i {
    margin-right: 0.5rem;
}

.pi-client-table-wrap {
    margin: 0 -1.5rem -1.5rem -1.5rem;
}

.pi-client-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    border: none;
}

.pi-client-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.pi-client-table thead th {
    font-weight: 600;
    font-size: 1.06rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    padding: 1rem 1.25rem;
    border: none;
    min-width: 80px;
    position: relative;
    white-space: nowrap;
}

.pi-client-table thead th.sorting,
.pi-client-table thead th.sorting_asc,
.pi-client-table thead th.sorting_desc {
    padding-right: 2rem;
}

.pi-client-table thead th.sorting::after,
.pi-client-table thead th.sorting_asc::after,
.pi-client-table thead th.sorting_desc::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.pi-client-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.pi-client-table tbody tr:hover {
    background-color: #e8eef7;
    box-shadow: inset 0 0 0 2px var(--pi-table-hover-shadow);
}

.pi-client-table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.pi-client-item-link {
    color: #4338ca;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    font-weight: 600;
}

.pi-client-item-link:hover {
    color: #3730a3;
    text-decoration-thickness: 0.12em;
}

.pi-client-item-link:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
    border-radius: 2px;
}

#piClientPriceChangesTable_wrapper {
    position: relative;
}

#piClientPriceChangesTable_wrapper .dataTables_length {
    float: left;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

#piClientPriceChangesTable_wrapper .dataTables_length label,
#piClientPriceChangesTable_wrapper .dataTables_filter label {
    margin: 0;
    font-size: 0.9rem;
    color: #495057;
}

#piClientPriceChangesTable_wrapper .dataTables_filter {
    float: right;
    margin-bottom: 1rem;
}

#piClientPriceChangesTable_wrapper .dataTables_filter input,
#piClientPriceChangesTable_wrapper .dataTables_length select {
    margin-left: 0.5em;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#piClientPriceChangesTable_wrapper .dataTables_filter input:focus,
#piClientPriceChangesTable_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: var(--pi-table-control);
    box-shadow: 0 0 0 3px var(--pi-table-control-focus);
}

#piClientPriceChangesTable_wrapper .row:last-child {
    align-items: center;
    margin: 0;
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

#piClientPriceChangesTable_wrapper .dataTables_paginate {
    display: flex;
    float: none;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: right;
}

#piClientPriceChangesTable_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #adb5bd;
    border-radius: 4px;
    background-color: #ffffff;
    color: #212529;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.25;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#piClientPriceChangesTable_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    border-color: #495057;
    background-color: #f1f3f5;
    color: #212529;
}

#piClientPriceChangesTable_wrapper .dataTables_paginate .paginate_button.current {
    border-color: #495057;
    background-color: #e9ecef;
    color: #212529;
    font-weight: 700;
}

#piClientPriceChangesTable_wrapper .dataTables_paginate .paginate_button.disabled,
#piClientPriceChangesTable_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    border-color: #ced4da;
    background-color: #f8f9fa;
    color: #495057;
    cursor: not-allowed;
}

#piClientPriceChangesTable_wrapper .dataTables_paginate .paginate_button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.pi-client-new-price {
    color: #000000;
}

.pi-client-card .badge {
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
}

.pi-badge-product {
    background-color: #f3e5ff;
    color: #6c2fb5;
}

.pi-badge-domain {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.pi-badge-addon {
    background-color: #fff3e0;
    color: #e65100;
}

.pi-badge-other {
    background-color: #e9ecef;
    color: #495057;
}

.pi-upcoming-widget-badge {
    display: inline-block;
    color: #ffffff;
    border-radius: 12px;
    padding: 15px 25px;
    margin-bottom: 1rem;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.25);
}

.pi-upcoming-widget-count {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.pi-upcoming-widget-copy {
    color: #5a6c7d;
    font-size: 1.1rem;
}

.pi-upcoming-widget-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 20px;
}

.pi-upcoming-widget-link:hover,
.pi-upcoming-widget-link:focus {
    color: #ffffff;
    filter: brightness(0.92);
}

.pi-theme-blue {
    --pi-table-control: #1e40af;
    --pi-table-control-focus: rgba(37, 99, 235, 0.12);
    --pi-table-hover-shadow: rgba(37, 99, 235, 0.2);
}

.pi-theme-teal {
    --pi-table-control: #115e59;
    --pi-table-control-focus: rgba(15, 118, 110, 0.12);
    --pi-table-hover-shadow: rgba(15, 118, 110, 0.2);
}

.pi-theme-green {
    --pi-table-control: #166534;
    --pi-table-control-focus: rgba(21, 128, 61, 0.12);
    --pi-table-hover-shadow: rgba(21, 128, 61, 0.2);
}

.pi-theme-blue .pi-client-card-header,
.pi-theme-blue .pi-upcoming-widget-badge,
.pi-theme-blue .pi-upcoming-widget-link {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.pi-theme-blue .pi-client-table thead {
    background-color: #eff6ff;
    border-bottom-color: #bfdbfe;
}

.pi-theme-blue .pi-client-table tbody tr:hover {
    background-color: #eff6ff;
}

.pi-theme-teal .pi-client-card-header,
.pi-theme-teal .pi-upcoming-widget-badge,
.pi-theme-teal .pi-upcoming-widget-link {
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
}

.pi-theme-teal .pi-client-table thead {
    background-color: #f0fdfa;
    border-bottom-color: #99f6e4;
}

.pi-theme-teal .pi-client-table tbody tr:hover {
    background-color: #f0fdfa;
}

.pi-theme-green .pi-client-card-header,
.pi-theme-green .pi-upcoming-widget-badge,
.pi-theme-green .pi-upcoming-widget-link {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
}

.pi-theme-green .pi-client-table thead {
    background-color: #f0fdf4;
    border-bottom-color: #bbf7d0;
}

.pi-theme-green .pi-client-table tbody tr:hover {
    background-color: #f0fdf4;
}

@media (max-width: 767px) {
    .pi-client-card {
        margin: 0 -0.5rem;
        border-radius: 0;
    }

    .pi-client-card-header {
        padding: 1rem;
    }

    .pi-client-card-header .card-title {
        font-size: 1.1rem;
    }

    .pi-client-table thead th,
    .pi-client-table tbody td {
        font-size: 0.9rem;
        padding: 0.75rem 0.5rem;
    }

    #piClientPriceChangesTable_wrapper .dataTables_length,
    #piClientPriceChangesTable_wrapper .dataTables_filter {
        float: none;
        margin-bottom: 0.5rem;
        text-align: left;
    }

    #piClientPriceChangesTable_wrapper .dataTables_filter input {
        max-width: 100%;
    }

    #piClientPriceChangesTable_wrapper .dataTables_paginate {
        justify-content: center;
        text-align: center;
    }
}
