/* ===== REFERRALS PAGE STYLING ===== */

/* User-facing Referral Form */
#custom-referral-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    color: white;
    direction: rtl;
    text-align: right;
}

#custom-referral-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

#custom-referral-form input[type="text"] {
    width: 100%;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#custom-referral-form input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#custom-referral-form input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#custom-referral-form button[type="submit"] {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(238, 90, 36, 0.3);
}

#custom-referral-form button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(238, 90, 36, 0.4);
}

#custom-referral-form button[type="submit"]:active {
    transform: translateY(-1px);
}

/* Form Response Messages */
#form-response {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

#form-response p {
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* User Referrals List */
.cis_list {
    max-width: 800px;
    margin: 2rem auto;
    direction: rtl;
}

.cis_list h3 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #3498db;
    position: relative;
}

.cis_list h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #e74c3c, #f39c12);
}

.form-entry {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-right: 4px solid #3498db;
    transition: all 0.3s ease;
}

.form-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.form-entry p {
    margin: 0.5rem 0;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.6;
}

.form-entry strong {
    color: #34495e;
    font-weight: 600;
    margin-left: 0.5rem;
}

.cis_list hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #bdc3c7, transparent);
    margin: 1.5rem 0;
}

/* Admin Monitoring Page Styling */
.wrap {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}




/* Filter Controls */
#referrer-filter {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    min-width: 200px;
    transition: all 0.3s ease;
}

#referrer-filter:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* DataTable Styling */
#refer-customers-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding-top: 40px !important;
}

#refer-customers-table thead th {
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
}

#refer-customers-table tbody td {
    text-align: center;
    transition: background-color 0.3s ease;
}

#refer-customers-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Delete Button */
.delete-referral {
    background: linear-gradient(45deg, #e74c3c, #c0392b) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.delete-referral:hover {
    background: linear-gradient(45deg, #c0392b, #a93226) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3) !important;
}

/* Date Filter Controls */
.persian-date-picker {
    padding: 0.75rem 1rem;
    border: 2px solid #27ae60;
    border-radius: 10px;
    background: white;
    color: #2c3e50;
    font-size: 1rem;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.persian-date-picker:focus {
    outline: none;
    border-color: #229954;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Export Button */
#export-csv {
    background: linear-gradient(45deg, #27ae60, #2ecc71) !important;
    color: white !important;
    border: none !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3) !important;
}

#export-csv:hover {
    background: linear-gradient(45deg, #229954, #27ae60) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4) !important;
}

/* Date Filter Container */
.wrap > div:last-child {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 2rem;
    text-align: center;
    border: 1px solid #e9ecef;
}

.wrap > div:last-child label {
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #custom-referral-form {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .cis_list {
        margin: 1rem;
    }
    
    .form-entry {
        padding: 1rem;
    }
    
    .wrap h1 {
        padding: 1rem;
        font-size: 1.5rem;
    }
    
    #refer-customers-table {
        font-size: 0.9rem;
    }
    
    #refer-customers-table thead th,
    #refer-customers-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .persian-date-picker {
        margin: 0.5rem 0;
        width: 100%;
    }
    
    .wrap > div:last-child {
        padding: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error Messages */
.success-message {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.error-message {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Animation for form entries */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-entry {
    animation: slideInUp 0.5s ease-out;
}

/* Custom scrollbar for DataTable */
.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
} 

select[name="refer-customers-table_length"] {
    width: 60px;
}

div#refer-customers-table_filter {
    margin-bottom: 20px;
}