/* 🌐 Layout */
body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background-color: #f9f9fb;
  margin: 0;
  padding: 0;
  color: #333;
}

h1, h2, h3 {
  color: #2c3e50;
  margin-top: 20px;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/*-------------Index Page CSS Starts Here---------------------*/

/* ===== MODERN LOGIN STYLES ===== */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-weight: 600;
}

.login-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #0077cc;
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.1);
}

.form-input:hover {
    border-color: #0077cc;
}

.remember-group {
    margin: 25px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.checkbox {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox:checked + .checkmark {
    background: #0077cc;
    border-color: #0077cc;
}

.checkbox:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-btn.full-width {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

.btn-loader {
    display: none;
}

.login-footer {
    margin-top: 25px;
    text-align: center;
}

.security-notice {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* ===== MODERN DASHBOARD STYLES ===== */
.welcome-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e5e9;
    text-align: left;
}

.user-info-card {
    background: #f8f9fa;
    padding: 25px 20px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    border-left: 4px solid #0077cc;
}

.user-name {
    color: #2c3e50;
    text-transform: uppercase; /* Force uppercase */
    letter-spacing: 0.5px; /* Better spacing for uppercase */
    font-size: 1.1em;
}

.user-role {
    color: #666;
    font-weight: normal;
    font-size: 0.9em;
    margin-left: 8px;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.module-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #0077cc;
}

.module-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.module-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.module-link {
    color: #0077cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.module-link:hover {
    color: #005fa3;
    text-decoration: none;
}

/* ===== ALERT STYLES ===== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.alert-error {
    background: #fee;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.no-access-message {
    text-align: center;
    margin: 40px 0;
}

.system-alerts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e1e5e9;
}

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.alert-item {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    font-size: 14px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .user-info-card {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .alerts-grid {
        grid-template-columns: 1fr;
    }
    
    .module-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container-login {
        margin: 20px auto;
        padding: 20px;
    }
    
    .login-header h2 {
        font-size: 20px;
    }
}

/*--------------Index Page CSS Ends Here-------------------*/

/*--------------Header Page CSS Starts Here----------------*/

/* Main Header Container */
.admin-header {
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    border-bottom: 1px solid #e1e8f0;
    padding: 12px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1000;
}

/* Alert Badges Enhancement */
.badges {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.alert-icon:hover {
    background: #ffffff;
    border-color: #0077cc;
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
}

.alert-emoji {
    font-size: 16px;
    filter: grayscale(0.3);
    transition: filter 0.3s ease;
}

.alert-icon:hover .alert-emoji {
    filter: grayscale(0);
}

/* Enhanced Badge Animation */
.badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    animation: pulse-gentle 2s infinite;
}

@keyframes pulse-gentle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Header Main Layout */
.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-left {
    flex: 0 1 auto;
    min-width: 100px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.network-logo {
    max-height: 85px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.network-logo:hover {
    transform: scale(1.02);
}

.header-right {
    flex: 0 1 auto;
    min-width: 550px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Enhanced Header Actions */
.header-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.btn.logout,
.btn.help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn.logout:hover {
    background: linear-gradient(135deg, #fff5f5, #ffe3e3);
    border-color: #ff6b6b;
    color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

.btn.help:hover {
    background: linear-gradient(135deg, #f0f9ff, #e6f7ff);
    border-color: #0077cc;
    color: #0077cc;
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.15);
}

.btn-icon {
    font-size: 14px;
}

.btn-label {
    font-size: 12px;
    font-weight: 600;
}

/* Enhanced Header Meta */
.header-meta {
    text-align: right;
    font-size: 12px;
    line-height: 1.5;
}

.user-info {
    margin-bottom: 4px;
}

.user-fullname {
    color: #2c3e50;
    font-weight: 700;
}

.user-role {
    color: #6c757d;
    font-weight: 500;
}

.ip-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 11px;
}

.admin-location img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ip-address {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #495057;
}

.server-time {
    color: #868e96;
    font-style: italic;
}

/* Enhanced Navigation Tabs */
.header-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    position: relative;
    z-index: 999;
}

/* Enhanced Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.btn.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    min-width: 120px;
}

.btn.dropdown-toggle:hover {
    background: linear-gradient(135deg, #0077cc, #0056b3);
    color: white;
    border-color: #0077cc;
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.2);
    transform: translateY(-1px);
}

.nav-icon {
    font-size: 14px;
}

.nav-label {
    font-size: 12px;
    font-weight: 600;
}

.dropdown-arrow {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Enhanced Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    display: none;
    z-index: 1001;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.dropdown-menu a:hover {
    background: linear-gradient(135deg, #0077cc, #0056b3);
    color: white;
    transform: translateX(4px);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Tablet and smaller desktop */
@media (max-width: 1200px) {
    .header-tabs {
        gap: 6px;
        padding: 12px 15px;
    }
    
    .btn.dropdown-toggle {
        min-width: 110px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Mobile - Compact Single Row Layout (768px and below) */
@media (max-width: 768px) {
    .admin-header {
        padding: 8px 12px;
    }
    
    .badges {
        margin-bottom: 0;
        gap: 6px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        order: 1;
        flex: 0 0 auto;
    }
    
    /* Reorganize header into single compact row */
    .header-main {
        flex-direction: row;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Hide empty left section */
    .header-left {
        display: none;
    }
    
    /* Center logo with flexible space */
    .header-center {
        flex: 1;
        justify-content: center;
        order: 2;
        min-width: 0;
    }
    
    .network-logo {
        max-height: 30px;
    }
    
    /* Compact right section - user info and buttons inline */
    .header-right {
        flex: 0 0 auto;
        min-width: auto;
        align-items: flex-end;
        order: 3;
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    /* Move header actions inline */
    .header-actions {
        margin-bottom: 0;
        gap: 4px;
        order: 2;
    }
    
    /* Compact header meta info */
    .header-meta {
        text-align: right;
        font-size: 10px;
        line-height: 1.3;
        order: 1;
        margin-bottom: 0;
    }
    
    .user-info {
        margin-bottom: 0;
        white-space: nowrap;
    }
    
    .user-fullname {
        font-size: 11px;
    }
    
    .user-role {
        font-size: 10px;
    }
    
    .ip-info {
        flex-direction: row;
        align-items: center;
        gap: 4px;
        font-size: 9px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    /* Compact alert icons */
    .alert-icon {
        padding: 5px 6px;
        min-width: 38px;
        min-height: 38px;
    }
    
    .alert-emoji {
        font-size: 13px;
    }
    
    .badge {
        font-size: 9px;
        padding: 1px 4px;
        min-width: 14px;
    }
    
    /* Compact buttons */
    .btn.logout,
    .btn.help {
        min-width: 18px;
        min-height: 18px;
        padding: 3px;
    }
    
    .btn-icon {
        font-size: 13px;
    }
    
    .btn-label {
        display: none;
    }
    
    /* Icon-only navigation tabs */
    .header-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 10px;
        justify-content: center;
    }
    
    .btn.dropdown-toggle {
        width: auto;
        min-width: 44px;
        padding: 8px;
        justify-content: center;
        min-height: 38px;
    }
    
    /* Hide labels, show only icons */
    .nav-label {
        display: none;
    }
    
    .dropdown-arrow {
        display: none;
    }
    
    .nav-icon {
        font-size: 14px;
        margin: 0;
    }
    
    /* Adjust dropdown menu for mobile */
    .dropdown-menu {
        position: absolute;
        left: 0;
        right: auto;
        min-width: 180px;
        max-width: 280px;
    }
}

/* Small mobile devices (480px and below) */
@media (max-width: 480px) {
    .admin-header {
        padding: 6px 10px;
    }
    
    .header-main {
        gap: 8px;
    }
    
    .badges {
        gap: 4px;
    }
    
    .alert-icon {
        min-width: 34px;
        min-height: 34px;
        padding: 4px;
    }
    
    .alert-emoji {
        font-size: 12px;
    }
    
    .badge {
        font-size: 8px;
        padding: 1px 3px;
        min-width: 12px;
    }
    
    .network-logo {
        max-height: 25px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .header-actions {
        gap: 3px;
    }
    
    .btn.logout,
    .btn.help {
        min-width: 16px;
        min-height: 16px;
        padding: 2px;
    }
    
    .btn-icon {
        font-size: 12px;
    }
    
    .header-meta {
        font-size: 9px;
    }
    
    .user-fullname {
        font-size: 10px;
    }
    
    .user-role {
        font-size: 9px;
    }
    
    .ip-info {
        font-size: 8px;
        gap: 3px;
    }
    
    .admin-location img {
        width: 12px;
        height: 9px;
    }
    
    .header-tabs {
        gap: 4px;
        padding: 6px 8px;
    }
    
    .btn.dropdown-toggle {
        min-width: 40px;
        padding: 6px;
        min-height: 34px;
    }
    
    .nav-icon {
        font-size: 12px;
    }
}

/* Very small screens (360px and below) */
@media (max-width: 360px) {
    .admin-header {
        padding: 4px 8px;
    }
    
    .header-main {
        gap: 6px;
    }
    
    .badges {
        gap: 3px;
    }
    
    .alert-icon {
        min-width: 30px;
        min-height: 30px;
        padding: 3px;
    }
    
    .alert-emoji {
        font-size: 11px;
    }
    
    .network-logo {
        max-height: 22px;
    }
    
    .header-right {
        gap: 4px;
    }
    
    /* Hide user role on very small screens */
    .user-role {
        display: none;
    }
    
    .ip-info {
        font-size: 7px;
    }
    
    /* Optionally hide server time on very small screens */
    .server-time {
        display: none;
    }
    
    .header-actions {
        gap: 2px;
    }
    
    .btn.logout,
    .btn.help {
        min-width: 14px;
        min-height: 14px;
        padding: 1.5px;
    }
    
    .btn-icon {
        font-size: 11px;
    }
    
    .header-tabs {
        gap: 2px;
        padding: 4px 6px;
    }
    
    .btn.dropdown-toggle {
        min-width: 36px;
        padding: 4px;
        min-height: 30px;
    }
    
    .nav-icon {
        font-size: 11px;
    }
}

/* Ensure proper touch targets for mobile */
@media (max-width: 768px) {
    .btn.dropdown-toggle,
    .btn.logout,
    .btn.help,
    .alert-icon {
        min-height: 10px;
        min-width: 10px;
    }
}

/* Smooth transitions for all interactive elements */
.btn.dropdown-toggle,
.btn.logout,
.btn.help,
.alert-icon,
.dropdown-menu a {
    transition: all 0.3s ease;
}

/*--------------Header Page CSS Ends Here----------------*/

/*--------------Affiliates Manage Page CSS Ends Here----------------*/

/* ===== ENHANCED AFFILIATES PAGE STYLES ===== */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-top: 15px;
    flex-wrap: wrap;
}

.page-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Enhanced Search Area */
.search-area {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.search-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.search-tools {
    display: flex;
    gap: 10px;
}

.search-toggle {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-toggle:hover {
    background: #f8f9fa;
    border-color: #0077cc;
}

.search-form {
    margin: 0;
}

.search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.search-full-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.search-input {
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #0077cc;
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.1);
}

.search-select {
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.search-select:focus {
    outline: none;
    border-color: #0077cc;
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.1);
}

.country-select {
    font-size: 13px;
}

.search-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.search-btn.primary {
    background: linear-gradient(135deg, #0077cc, #0056b3);
    border-color: #0077cc;
    color: white;
}

.search-btn.primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.3);
}

.search-btn.secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.search-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Results Summary */
.results-summary {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0077cc;
}

.summary-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 14px;
    color: #495057;
}

.stat-item strong {
    color: #2c3e50;
}

/* Enhanced Table Styles */
.table-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.affiliate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.affiliate-th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 12px 10px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
    text-align: center;
    white-space: nowrap;
}

.affiliate-td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    vertical-align: middle;
}

.affiliate-row:hover {
    background: #f8fbff;
}

/* Enhanced Status Badges */
.affiliate-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-suspend {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-rejected {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Enhanced Table Cells */
.date-cell {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #6c757d;
}

.id-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.username-cell {
    font-weight: 600;
    color: #2c3e50;
}

.category-badge {
    background: #e7f1ff;
    color: #004085;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.country-flag {
    margin-right: 6px;
    font-size: 14px;
}

/* Enhanced Action Buttons */
.affiliate-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.affiliate-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.affiliate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.edit-btn:hover {
    background: #0077cc;
    border-color: #0077cc;
    color: white;
}

.view-btn:hover {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

/* Empty State */
.no-data {
    text-align: center;
    padding: 40px 20px;
}

.empty-state {
    color: #6c757d;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.empty-state p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Enhanced Pagination */
.affiliate-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab-button:hover,
.tab-button.active {
    background: linear-gradient(135deg, #0077cc, #0056b3);
    color: white;
    border-color: #0077cc;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 119, 204, 0.2);
}

.tab-button.first,
.tab-button.last,
.tab-button.prev,
.tab-button.next {
    font-weight: 700;
}

/* Enhanced Records Per Page */
.records-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.records-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.dropdown-records-per-page {
    position: relative;
}

.dropdown-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-btn:hover {
    border-color: #0077cc;
    color: #0077cc;
}

.dropdown-list {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
}

.dropdown-records-per-page:hover .dropdown-list {
    display: flex;
}

.dropdown-list a {
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
}

.dropdown-list a:hover,
.dropdown-list a.active {
    background: #0077cc;
    color: white;
}

/* Enhanced Export Button */
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #28a745;
    border-radius: 8px;
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    text-decoration: none;
    color: white;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
    }
    
    .search-full-row {
        grid-template-columns: 1fr;
    }
    
    .table-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .affiliate-pagination {
        justify-content: center;
    }
    
    .records-per-page {
        justify-content: center;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .affiliate-table {
        min-width: 1000px;
    }
}

@media (max-width: 480px) {
    .search-actions {
        flex-direction: column;
    }
    
    .search-btn {
        justify-content: center;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/*--------------Affiliates Manage CSS Ends Here----------------*/

.container-login {
  max-width: 500px;
  margin: 40px auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
            
.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 5px;
    background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
    color: #333;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
    border: none;
}

.login-btn:hover {
    background: linear-gradient(135deg, #d6e4ff, #adc8ff);
    color: #003366;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transform: translateY(-1px);
    text-decoration: none;
}

/* 🧭 Navigation */
ul {
  list-style: none;
  padding: 0;
}

ul li {
  margin: 8px 0;
}

ul li a {
  text-decoration: none;
  color: #0077cc;
  font-weight: 500;
}

ul li a:hover {
  text-decoration: underline;
}

/* 📋 Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #fff;
}

table th, table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

table th {
  background-color: #f0f0f0;
  font-weight: 600;
}

/* 🧾 Forms */
form {
  margin-top: 20px;
}

input, select, textarea, button {
  padding: 8px;
  margin: 5px 0;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  background-color: #0077cc;
  color: #99c0f1;
  border: none;
  cursor: pointer;
}

button:hover {
  background-color: #005fa3;
}

/* 🚨 Alerts */
p.success {
  color: #2ecc71;
  font-weight: bold;
}

p.error {
  color: #e74c3c;
  font-weight: bold;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  table, th, td {
    font-size: 12px;
  }

  input, select, textarea, button {
    width: 100%;
  }
}

/* 🧭 Modern Dashboard Enhancements */
.container {
  max-width: 960px;
  margin: 40px auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

ul li {
  background: #ecf0f1;
  padding: 12px 16px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

ul li:hover {
  background: #d0d7de;
}

ul li a {
  color: #34495e;
  font-weight: 600;
}

.error {
  background: #ffe6e6;
  color: #c0392b;
  padding: 10px 15px;
  border-radius: 6px;
  margin-top: 20px;
}

/* 🌐 Header Container */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 16px;
  height: 60px;
  background: #f9fbff;
  border-bottom: 1px solid #dbe4f5;
  font-family: 'Segoe UI', Roboto, sans-serif;
  color: #333;
}

/* 🔹 Left and Right Sections */
.header-left,
.header-right {
  flex: 0 0 auto;
}

/* 🔹 Centered Logo */
.header-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 🔹 Right Section Layout */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 13px;
  padding: 10px 16px;
}

/* 🔹 Top Buttons */
.header-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.btn.logout,
.btn.help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
  color: #333;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn.logout:hover,
.btn.help:hover {
  background: linear-gradient(135deg, #d6e4ff, #adc8ff);
  color: #003366;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.btn .icon {
  font-size: 16px;
}

.btn .label {
  font-size: 13px;
}

/* 🔹 Bottom Metadata */
.header-meta {
  text-align: right;
  margin-top: 45px;
  font-size: 12px;
  line-height: 1.4;
  color: #555;
}

.user-info {
  font-weight: 600;
}

.ip-info {
  font-style: italic;
  color: #666;
}

.admin-location img {
  width: 16px;
  height: 12px;
  vertical-align: middle;
  margin-left: 8px;
}

/* 🔹 Alert Badges */
.badges {
  display: flex;
  align-items: center;
  gap: 15px;
}

.alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 17px;
  color: #333;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
  position: relative;
}

.alert-icon:hover {
  background: #f0f4ff;
}

.badge {
  background: #e0ecff;
  color: #003366;
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  min-width: 10px;
  text-align: center;
  display: inline-block;
  line-height: 1.4;
  transition: all 0.3s ease;
  animation: pulseBadge 0.3s ease;
  box-shadow: inset 0 0 0 1px #c0d8ff;
}

@keyframes pulseBadge {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* 📱 Responsive Adjustments */
@media (max-width: 600px) {
  .admin-header {
    flex-direction: row-reverse;
    align-items: center;
    height: auto;
    padding: 8px;
    text-align: center;
  }

  .header-right {
    align-items: center;
    text-align: center;
    margin-top: -10px;
    display: flex;
    flex-direction: column-reverse;
  }

  .header-actions {
    justify-content: center;
  }

  .header-meta {
    font-size: 11px;
    margin-top: 10px;
  }

  .btn .label {
    display: none;
  }

  .btn {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
  }

  .btn .icon {
    font-size: 18px;
  }

  .badge {
    font-size: 11px;
    padding: 2px 5px;
  }
}

/* Header Tabs */

.header-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Each dropdown stays inline */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown toggle button */
.btn.dropdown-toggle {
  width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
  color: #333;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .btn.dropdown-toggle {
    width: 30px;
    font-size: 11px;
    padding: 15px 10px;
  }
}

.dropdown-toggle:hover {
  background: linear-gradient(135deg, #d6e4ff, #adc8ff);
  color: #003366;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

/* Dropdown menu styled like buttons */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 8px;
  display: none;
  z-index: 1000;
  min-width: 180px;
}

.dropdown-menu a {
  display: block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 5px;
  background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
  color: #333;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
  margin-bottom: 6px;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: linear-gradient(135deg, #d6e4ff, #adc8ff);
  color: #003366;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* ✅ Mobile-friendly adjustments */
@media (max-width: 768px) {
  .header-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 12px;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    padding: 8px;
  }

  .dropdown:hover .dropdown-menu {
    display: block;
  }
}

/* Manage Affiliates Page CSS Start */

.status.approved { color: green; font-weight: 600; }
.status.pending { color: orange; font-weight: 600; }
.status.suspend { color: red; font-weight: 600; }
.status.rejected  { color: gray; font-weight: 600; }

.actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  margin-right: 6px;
}

.actions button:hover {
  color: #003366;
}

.affiliate-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-top: 20px;
}

.affiliate-th,
.affiliate-td {
  padding: 12px 14px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
  text-align: center;
  vertical-align: middle;
}

.affiliate-th {
  background: #f5f8ff;
  font-weight: 600;
  color: #333;
}

.affiliate-status {
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

.affiliate-status.approved { color: green; }
.affiliate-status.pending { color: orange; }
.affiliate-status.suspend { color: red; }
.affiliate-status.rejected  { color: gray; }

.affiliate-actions {
  white-space: nowrap;
}

.affiliate-actions .affiliate-btn {
  display: inline-block;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin: 0 4px;
  padding: 2px;
  vertical-align: middle;
}

.affiliate-actions .affiliate-btn:hover {
  color: #003366;
}

.affiliate-th.sorted a {
  font-weight: bold;
  color: #003366;
}

/* 🔹 Pagination Style */

.affiliate-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
  gap: 8px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 5px;
  background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
  color: #333;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
  cursor: pointer;
  margin: 0 4px;
  white-space: nowrap;
}

.tab-button:hover,
.tab-button.active {
  background: linear-gradient(135deg, #d6e4ff, #adc8ff);
  color: #003366;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

/* 🔹 Records Per Page */

.records-per-page {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 20px;
  margin-right: 20px;
  gap: 10px;
}

.records-label {
  font-size: 12px;
  font-weight: 500;
  color: #333;
  margin-right: 6px;
}

.dropdown-records-per-page {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 5px;
  background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
  color: #333;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  min-width: 60px; /* Reduced button width */
}

.dropdown-btn:hover {
  background: linear-gradient(135deg, #d6e4ff, #adc8ff);
  color: #003366;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.dropdown-list {
  position: absolute;
  bottom: 100%; /* Opens upward */
  left: 0;
  background: transparent;
  border: none;
  padding: 8px;
  display: none;
  z-index: 1000;
  min-width: 80px;
  width: auto;
  margin-bottom: 5px;
  flex-direction: column-reverse;
  display: none;
  gap: 4px;
}

.dropdown-list a {
  display: block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 5px;
  background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
  color: #333;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
  white-space: nowrap;
  text-align: center; /* Center align text */
}

.dropdown-list a:hover,
.dropdown-list a.active {
  background: linear-gradient(135deg, #d6e4ff, #adc8ff);
  color: #003366;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.dropdown-records-per-page:hover .dropdown-list {
  display: flex;
}

/* Create invisible hover bridge to prevent menu from closing */
.dropdown-list::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 8px;
  background: transparent;
}

/* Affiliate Manage Table Style */

        /* Responsive table container */
        
        .table-container {
            width: 100%;
            overflow-x: auto;
            margin-bottom: 20px;
            border: 1px solid #dee2e6;
            border-radius: 4px;
        }
        
        /* Table optimization */
        .affiliate-table {
            width: 100%;
            min-width: 1200px;
            table-layout: auto;
            border-collapse: collapse;
            font-size: 12px;
            margin: 0;
        }
        
        /* Optimized column widths */
        .affiliate-th:nth-child(1) { width: 90px; }   /* Date */
        .affiliate-th:nth-child(2) { width: 80px; }   /* Status */
        .affiliate-th:nth-child(3) { width: 70px; }   /* ID */
        .affiliate-th:nth-child(4) { width: 150px; }  /* Company */
        .affiliate-th:nth-child(5) { width: 150px; }  /* Contact */
        .affiliate-th:nth-child(6) { width: 200px; }  /* Address */
        .affiliate-th:nth-child(7) { width: 120px; }  /* Country */
        .affiliate-th:nth-child(8) { width: 120px; }  /* Username */
        .affiliate-th:nth-child(9) { width: 120px; }  /* Category */
        .affiliate-th:nth-child(10) { width: 100px; } /* Actions */
        
        .affiliate-th {
            padding: 8px 6px;
            text-align: center;
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            white-space: nowrap;
            font-weight: bold;
            position: sticky;
            top: 0;
        }
        
        /* CENTER ALIGN ALL TABLE DATA */
        .affiliate-td {
            padding: 6px 4px;
            border: 1px solid #dee2e6;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            vertical-align: middle;
            text-align: center; /* Center align all data */
        }
        
        /* Status badges - ensure they're centered */
        .affiliate-status {
            padding: 3px 6px;
            border-radius: 3px;
            font-size: 11px;
            font-weight: bold;
            display: inline-block;
            text-align: center;
            margin: 0 auto;
        }
        .affiliate-status.active { background: #d4edda; color: #155724; }
        .affiliate-status.pending { background: #fff3cd; color: #856404; }
        .affiliate-status.inactive { background: #f8d7da; color: #721c24; }
        .affiliate-status.inactive { background: #f8d7da; color: #721c24; }
        
        /* Action buttons - centered */
        .affiliate-actions {
            text-align: center;
        }
        .affiliate-btn {
            padding: 3px 6px;
            margin: 0 1px;
            font-size: 11px;
            border: none;
            background: #f8f9fa;
            border-radius: 3px;
            cursor: pointer;
            display: inline-block;
        }
        
        /* Container */
        .container {
            width: 95%;
            max-width: 100%;
            margin: 30px auto 35px;
            padding: 0 15px 20px;
            box-sizing: border-box;
        }
        
        /* Sort links */
        .sort-link {
            color: #333;
            text-decoration: none;
            display: block;
            text-align: center;
        }
        
        .sort-link:hover {
            color: #007bff;
        }
        
        /* Export button */
        .export-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 500;
            border-radius: 5px;
            background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
            color: #333;
            text-decoration: none;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            transition: all 0.25s ease;
            cursor: pointer;
            white-space: nowrap;
            border: none;
        }
        
        .export-btn:hover {
            background: linear-gradient(135deg, #d6e4ff, #adc8ff);
            color: #003366;
            box-shadow: 0 3px 6px rgba(0,0,0,0.15);
            transform: translateY(-1px);
            text-decoration: none;
        }
        
        /* Mobile responsiveness */
        @media (max-width: 768px) {
            .container {
                padding: 0 10px;
            }
            
            .table-container {
                font-size: 11px;
            }
            
            .affiliate-th,
            .affiliate-td {
                padding: 4px 3px;
            }
            
            .affiliate-btn {
                padding: 2px 4px;
                font-size: 10px;
            }
            
            h2 {
                font-size: 18px;
            }
        }
        
        @media (max-width: 480px) {
            .affiliate-table {
                min-width: 1000px;
            }
            
            .affiliate-th:nth-child(1) { width: 80px; }
            .affiliate-th:nth-child(2) { width: 70px; }
            .affiliate-th:nth-child(4) { width: 130px; }
            .affiliate-th:nth-child(5) { width: 130px; }
            .affiliate-th:nth-child(6) { width: 180px; }
        }
        
        
        /* Make action links look like buttons */
        .affiliate-actions a.affiliate-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: none;
            border-radius: 6px;
            padding: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            text-decoration: none;
            color: inherit;
        }
        
        .affiliate-actions a.edit-btn:hover {
            background: #0077cc;
            border-color: #0077cc;
            color: white;
            text-decoration: none;
        }
        
        .affiliate-actions a.view-btn:hover {
            background: #28a745;
            border-color: #28a745;
            color: white;
            text-decoration: none;
        }
        
/* Affiliate Manage Search Area */

        /* Search Area Styles */
        .search-area {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 20px;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
        }

        .search-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .search-title {
            font-size: 20px;
            font-weight: bold;
            color: #333;
            margin: 0;
            text-align: left;
            width: 100%;
        }
        
        .search-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-bottom: 12px;
            align-items: start;
        }

        .search-column {
            display: flex;
            flex-direction: column;
        }

        .search-group {
            display: flex;
            flex-direction: row;
            align-items: center;
            min-height: 55px;
            width: 100%;
        }

        .search-label {
            font-size: 11px;
            font-weight: 600;
            margin-bottom: 3px;
            color: #555;
            text-align: center;
            width: 120px;
            flex-shrink: 0;
        }
        
        
        /* Input fields should remain white background */
        .search-input {
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 500;
            border-radius: 5px;
            background: white;
            color: #333;
            border: 1px solid #ced4da;
            height: 30px;
            width: 180px;
            flex-grow: 1;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            transition: all 0.25s ease;
        }

        .search-input:focus {
            border-color: #007bff;
            outline: none;
            box-shadow: 0 0 0 2px rgba(0,123,255,.25);
        }
        
        .search-input:hover {
            border-color: #007bff;
            box-shadow: 0 3px 6px rgba(0,0,0,0.15);
            transform: translateY(-1px);
        }

        .search-input, .search-select {
            padding: 5px 8px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 11px;
            width: 180px;
            box-sizing: border-box;
            text-align: left;
            height: 30px;
            flex-grow: 1;
            background: white;
        }

        .search-input:focus, .search-select:focus {
            border-color: #007bff;
            outline: none;
            box-shadow: 0 0 0 2px rgba(0,123,255,.25);
        }

        /* Updated dropdown styling */
        .search-select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 8px center;
            background-size: 12px;
            padding: 6px 12px;
            padding-right: 25px;
            font-size: 12px;
            font-weight: 500;
            border-radius: 5px;
            color: #333;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            transition: all 0.25s ease;
            cursor: pointer;
            border: none;
            height: 30px;
            width: 180px;
            flex-grow: 1;
        }
        
        .search-select:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(0,123,255,.25);
        }
        
        .search-select:hover {
            background: linear-gradient(135deg, #d6e4ff, #adc8ff);
            color: #003366;
            box-shadow: 0 3px 6px rgba(0,0,0,0.15);
            transform: translateY(-1px);
        }
        
        /* Country dropdown specific styling */
        .search-select.country-select {
            font-size: 12px;
        }
        
        /* Custom scrollbar for country dropdown */
        .search-select.country-select::-webkit-scrollbar {
            width: 8px;
        }
        
        .search-select.country-select::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        
        .search-select.country-select::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 4px;
        }
        
        .search-select.country-select::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

        /* Search buttons styling */
        .search-actions {
            display: flex;
            gap: 8px;
            justify-content: center;
            margin-top: 8px;
        }

        .search-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 500;
            border-radius: 5px;
            background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
            color: #333;
            text-decoration: none;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            transition: all 0.25s ease;
            cursor: pointer;
            white-space: nowrap;
            border: none;
            min-width: 80px;
        }
        
        .search-btn:hover {
            background: linear-gradient(135deg, #d6e4ff, #adc8ff);
            color: #003366;
            box-shadow: 0 3px 6px rgba(0,0,0,0.15);
            transform: translateY(-1px);
            text-decoration: none;
        }

        .clear-search {
            text-align: center;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid #dee2e6;
        }

        .clear-search a {
            color: #dc3545;
            text-decoration: none;
            font-size: 11px;
        }

        .clear-search a:hover {
            text-decoration: underline;
        }

        /* Mobile responsiveness */
        @media (max-width: 768px) {
            .search-area {
                max-width: 95%;
            }
            
            .search-grid {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            
            .search-group {
                flex-direction: column;
                align-items: flex-start;
                min-height: auto;
            }
            
            .search-label {
                width: 100%;
                text-align: left;
                margin-bottom: 5px;
            }
            
            .search-input, .search-select {
                width: 100%;
            }
            
            .search-actions {
                flex-direction: column;
                align-items: center;
            }
            
            .search-btn {
                width: 100%;
                max-width: 150px;
            }
        }

/* Affiliate Manage Search Area End */
    

/* Manage Affiliates Page CSS End */

/*--------------Affiliate Profile CSS Starts Here---------------*/

.edit-form {
  max-width: 800px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.edit-form label {
  font-weight: 600;
  margin-bottom: 5px;
}

.edit-form input {
  padding: 8px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.edit-form .btn {
  grid-column: span 2;
  margin-top: 20px;
}

.profile-text {
    text-align: center;
    background-color: #adc8ff;
    color: white;
    font-weight: 500;
    font-size: 20px;
}

.search-grid.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.column-left, .column-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-divider {
  margin: 32px 0;
  border-top: 2px solid #ccc;
}

/*--------------Affiliate Profile CSS Starts Here---------------*/