body.er-affiliate-portal {
    margin: 0;
    font-family: "Inter", "Segoe UI", sans-serif;
    overflow-x: hidden;
    background: #f3f4f6;
    color: #1f2937;
}

body.er-affiliate-portal .admin-panel {
    min-height: 100vh;
    width: 100%;
}

body.er-affiliate-portal a {
    color: inherit;
    text-decoration: none;
}



body.er-affiliate-portal #main-content {
    min-width: 0;
}

body.er-affiliate-portal #sidebar {
    width: 240px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    will-change: transform;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

body.er-affiliate-portal .nav-item-inner {
    transition: background-color 0.2s ease, color 0.2s ease;
}

body.er-affiliate-portal .nav-item.active .nav-item-inner {
    background: #2563eb;
    color: #ffffff;
}

body.er-affiliate-portal .page-content {
    width: 100%;
    box-sizing: border-box;
}

body.er-affiliate-portal .bg-white {
    background: #ffffff;
}

body.er-affiliate-portal .rounded,
body.er-affiliate-portal .rounded-lg,
body.er-affiliate-portal .rounded-xl {
    border-radius: 0.75rem;
}

body.er-affiliate-portal .shadow,
body.er-affiliate-portal .shadow-sm {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.er-affiliate-portal .p-4 {
    padding: 1rem;
}

body.er-affiliate-portal .p-6 {
    padding: 1.5rem;
}

body.er-affiliate-portal .mb-4 {
    margin-bottom: 1rem;
}

body.er-affiliate-portal .mb-6 {
    margin-bottom: 1.5rem;
}

body.er-affiliate-portal table.er-table {
    border-collapse: collapse;
    background: #ffffff;
}

body.er-affiliate-portal table.er-table th,
body.er-affiliate-portal table.er-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
    vertical-align: middle;
}

body.er-affiliate-portal table.er-table th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

body.er-affiliate-portal .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0.55rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid #d1d5db;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.1;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

body.er-affiliate-portal .btn:hover {
    border-color: #94a3b8;
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

body.er-affiliate-portal .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

body.er-affiliate-portal .btn:focus,
body.er-affiliate-portal .btn:focus-visible {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.er-affiliate-portal .btn:disabled,
body.er-affiliate-portal .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


body.er-affiliate-portal select.btn {
    padding-right: 2.1rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #475569 50%), linear-gradient(135deg, #475569 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

body.er-affiliate-portal .er-pagination {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

body.er-affiliate-portal .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0.4rem 0.7rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.87rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.er-affiliate-portal .page-link:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    transform: translateY(-1px);
}

body.er-affiliate-portal .page-link.active {
    border-color: #3b82f6;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

body.er-affiliate-portal .page-link.active:hover {
    border-color: #2563eb;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

body.er-affiliate-portal .page-link[aria-disabled="true"],
body.er-affiliate-portal .page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

body.er-affiliate-portal button,
body.er-affiliate-portal .button,
body.er-affiliate-portal input,
body.er-affiliate-portal select,
body.er-affiliate-portal textarea {
    font: inherit;
}

body.er-affiliate-portal button {
    cursor: pointer;
}

body.er-affiliate-portal input,
body.er-affiliate-portal select,
body.er-affiliate-portal textarea {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
}

body.er-affiliate-portal .text-white {
    color: #fff;
}

body.er-affiliate-portal .hover\:bg-er-brand:hover {
    background: #2563eb;
}

body.er-affiliate-portal .hover\:text-white:hover {
    color: #fff;
}

body.er-affiliate-portal .er-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.er-affiliate-portal .er-table-responsive table,
body.er-affiliate-portal table.er-table {
    min-width: 100%;
}

body.er-affiliate-portal img,
body.er-affiliate-portal canvas,
body.er-affiliate-portal video {
    max-width: 100%;
    height: auto;
}

body.er-affiliate-portal .page-head,
body.er-affiliate-portal .page-actions,
body.er-affiliate-portal .seach_filter_member_wrap,
body.er-affiliate-portal .seach_filter_product_wrap,
body.er-affiliate-portal .field-inputs,
body.er-affiliate-portal .submitForm,
body.er-affiliate-portal .er-modal-body,
body.er-affiliate-portal .tabs {
    min-width: 0;
}

body.er-affiliate-portal input,
body.er-affiliate-portal select,
body.er-affiliate-portal textarea {
    max-width: 100%;
}

body.er-affiliate-portal .whitespace-nowrap {
    white-space: nowrap;
}

body.er-affiliate-portal td {
    white-space: nowrap;
}

body.er-affiliate-portal #er-modalBackdrop {
    transition: opacity 0.3s ease;
}

body.er-affiliate-portal #er-modalBackdrop.hidden {
    display: none !important;
    opacity: 0;
}

body.er-affiliate-portal #er-modalContent {
    max-height: 78vh;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

body.er-affiliate-portal #closeModal {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    width: 2rem;
    height: 2rem;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

body.er-affiliate-portal #er-modalContent.scale-95 {
    transform: scale(0.95);
    opacity: 0;
}

body.er-affiliate-portal #er-modalContent.scale-100 {
    transform: scale(1);
    opacity: 1;
}

body.er-affiliate-portal .tab-item-modal {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    color: #1f2937;
    background: transparent;
    border: none;
    text-align: left;
}

body.er-affiliate-portal .tab-item-modal:hover {
    background: #f3f4f6;
}

body.er-affiliate-portal .tab-item-modal.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

body.er-affiliate-portal .tab-content-modal {
    transition: all 0.2s ease;
}

body.er-affiliate-portal .tab-content-modal.hidden {
    display: none !important;
}

body.er-affiliate-portal .modal-transition {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

body.er-affiliate-portal #er-openModal {
    cursor: pointer;
    position: relative;
    z-index: auto;
}

body.er-affiliate-portal #er-openModal:hover .nav-item-inner {
    background: #3b82f6;
    color: #ffffff;
}

body.er-affiliate-portal .statics-item {
    flex: 1;
    min-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

@media (min-width: 640px) {
    body.er-affiliate-portal .statics-item {
        min-width: calc(50% - 0.5rem);
    }
}

@media (min-width: 1024px) {
    body.er-affiliate-portal .statics-item {
        min-width: calc(25% - 0.75rem);
    }
}

@media (max-width: 767px) {
    body.er-affiliate-portal #sidebar {
        transform: translateX(-100%);
        width: min(86vw, 320px);
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    }

    body.er-affiliate-portal #main-content {
        margin-left: 0 !important;
    }

    body.er-affiliate-portal .p-6 {
        padding: 1rem;
    }

    body.er-affiliate-portal .btn {
        min-height: 38px;
        padding: 0.5rem 0.85rem;
    }

    body.er-affiliate-portal.sidebar-open #sidebar {
        transform: translateX(0);
    }

    body.er-affiliate-portal #overlay-sidebar {
        display: block;
        pointer-events: none;
    }

    body.er-affiliate-portal.sidebar-open #overlay-sidebar {
        pointer-events: auto;
    }

    body.er-affiliate-portal .page-head,
    body.er-affiliate-portal .page-actions,
    body.er-affiliate-portal .seach_filter_member_wrap,
    body.er-affiliate-portal .seach_filter_product_wrap,
    body.er-affiliate-portal .field-inputs,
    body.er-affiliate-portal .submitForm,
    body.er-affiliate-portal .page-content>div,
    body.er-affiliate-portal .page-content>form {
        width: 100%;
    }

    body.er-affiliate-portal .page-actions,
    body.er-affiliate-portal .seach_filter_member_wrap,
    body.er-affiliate-portal .seach_filter_product_wrap,
    body.er-affiliate-portal .field-inputs,
    body.er-affiliate-portal .submitForm {
        flex-direction: column;
        align-items: stretch;
    }

    body.er-affiliate-portal .page-actions>*,
    body.er-affiliate-portal .seach_filter_member_wrap>*,
    body.er-affiliate-portal .seach_filter_product_wrap>*,
    body.er-affiliate-portal .field-inputs>*,
    body.er-affiliate-portal .submitForm>* {
        width: 100%;
    }

    body.er-affiliate-portal .form-input,
    body.er-affiliate-portal .form-select,
    body.er-affiliate-portal select,
    body.er-affiliate-portal input{
        width: 100% !important;
        min-width: 0 !important;
    }

    body.er-affiliate-portal .page-head h1,
    body.er-affiliate-portal .page-head h2,
    body.er-affiliate-portal .page-head p {
        max-width: 100%;
    }

    body.er-affiliate-portal .er-modal-body,
    body.er-affiliate-portal .modal__left,
    body.er-affiliate-portal .modal__right {
        width: 100%;
    }

    body.er-affiliate-portal #er-modalContent,
    body.er-affiliate-portal #addOrderModalContent {
        max-width: calc(100vw - 1rem);
        padding: 0.75rem;
    }

    body.er-affiliate-portal .er-levels-scroll {
        max-height: none;
    }


    body.er-affiliate-portal table select,
    body.er-affiliate-portal table input {
        width: max-content !important;
    }
}

/* Input and Select Elements - Full Content Display */
body.er-affiliate-portal input,
body.er-affiliate-portal select,
body.er-affiliate-portal textarea {
    min-height: auto;
    height: auto;
    overflow: visible;
    word-break: break-word;
    white-space: normal;
}

body.er-affiliate-portal input[type="text"],
body.er-affiliate-portal input[type="email"],
body.er-affiliate-portal input[type="number"],
body.er-affiliate-portal input[type="tel"],
body.er-affiliate-portal input[type="date"],
body.er-affiliate-portal input[type="password"] {
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.er-affiliate-portal select,
body.er-affiliate-portal .form-select {
    min-height: 2.75rem;
    height: auto;
    overflow: visible;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

body.er-affiliate-portal select option {
    padding: 0.5rem;
    overflow: visible;
}

body.er-affiliate-portal .form-input {
    min-height: 2.75rem;
    height: auto;
    overflow: hidden;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

body.er-affiliate-portal input:disabled,
body.er-affiliate-portal select:disabled,
body.er-affiliate-portal textarea:disabled {
    background: #f3f4f6;
    opacity: 0.7;
}
