:root {
    --primary: #4361ee;
    --primary-hover: #3a56d4;
    --background: #f8f9fa;
    --surface: #ffffff;
    --text-primary: #2b2d42;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 16px 32px rgba(67, 97, 238, 0.12);
    --radius-md: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.provider-page-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    margin: 30px auto;
    max-width: 1400px;
    padding: 0 20px;
}

/* Sidebar / Filters */
.conditions-panel {
    width: 320px;
    flex-shrink: 0;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.conditions-header {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.conditions-header i {
    color: var(--primary);
    font-size: 1rem;
    opacity: 0.8;
}

.conditions-header:first-child {
    margin-top: 0;
}

.conditions-panel hr {
    border: none;
    border-top: 1px dashed var(--border-color);
    margin: 24px 0;
}

/* Custom Dropdown */
.dxeButtonEditSys {
    width: 100% !important;
    height: 48px !important;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    transition: var(--transition);
    cursor: pointer;
}

.dxeButtonEditSys:focus, .dxeButtonEditSys:hover {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

/* Custom Checkboxes */
.scopes-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-custom {
    display: none;
}

.check-custom-label {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.check-custom-label:hover {
    color: var(--text-primary);
}

.check-custom-label:before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 22px;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-right: 14px;
    transition: var(--transition);
    flex-shrink: 0;
}

.check-custom:checked + .check-custom-label {
    color: var(--text-primary);
    font-weight: 600;
}

.check-custom:checked + .check-custom-label:before {
    background: var(--primary);
    border-color: var(--primary);
}

.check-custom:checked + .check-custom-label:after {
    content: "";
    position: absolute;
    left: 8px;
    top: 5px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* Domestic Checkbox Special Styling */
.domestic-container .check-custom-label {
    color: var(--primary);
    font-weight: 700;
}

/* Action Buttons */
.btn-action-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), #5a75f6);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
}

.btn-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.35);
}

.btn-action-outline {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-action-outline:hover {
    background: var(--background);
    color: var(--text-primary);
    border-color: #ced4da;
}

/* Main Content Area */
.provider-right {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Search Bar */
.search-field-block {
    display: flex;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 8px 12px;
    margin-bottom: 24px;
    transition: var(--transition);
    border: 2px solid transparent;
    align-items: center;
}

.search-field-block:focus-within {
    box-shadow: var(--shadow-md);
    border-color: rgba(67, 97, 238, 0.4);
}

.search-field {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
}

.search-field::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.search-field-btn {
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary), #5a75f6);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

.search-field-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(67, 97, 238, 0.3);
}

/* Provider Container & Cards */
.provider-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.provider-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.provider-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(67, 97, 238, 0.2);
}

.provider-card:hover .provider-name {
    color: var(--primary);
}

.provider-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.provider-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    transition: var(--transition);
}

.provider-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: inset 0 0 0 1px currentColor;
}

.badge-domestic {
    background: rgba(6, 214, 160, 0.05);
    color: #05a87b;
}

.badge-paid {
    background: rgba(247, 37, 133, 0.05);
    color: #d6186c;
}

.provider-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    background: var(--background);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.detail-value i {
    color: var(--primary);
    opacity: 0.6;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.provider-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

/* Pager Styles */
.pager-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pgrLink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none !important;
}

.pgrLink:hover {
    background: var(--background);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.pager-btn-active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

/* Responsive */
@media screen and (max-width: 992px) {
    .provider-page-wrapper {
        flex-direction: column;
    }

    .conditions-panel {
        width: 100%;
        position: static;
    }
}