/* Frontend Styles - Dashboard */
#apm-subscriber-dashboard {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Notification System */
.apm-notification {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s ease;
}

.apm-notification.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.apm-notification.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.apm-notification.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    display: block;
}

.apm-notification i {
    margin-right: 10px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.apm-dashboard-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.apm-dashboard-header h2 {
    font-size: 28px;
    margin: 0 0 5px 0;
    color: #333;
}

.apm-dashboard-header h2 i {
    color: #4a2c6d;
    margin-right: 10px;
}

.apm-dashboard-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.apm-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.apm-column {
    min-width: 0;
}

/* Submit Lead Form */
.apm-submit-lead-form {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.apm-submit-lead-form h3 {
    margin-top: 0;
    font-size: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.apm-submit-lead-form h3 i {
    color: #0073aa;
    margin-right: 10px;
}

.apm-submit-lead-form .form-group {
    margin-bottom: 15px;
}

.apm-submit-lead-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.apm-submit-lead-form .form-group label i {
    margin-right: 8px;
    color: #0073aa;
    width: 18px;
}

.apm-submit-lead-form .form-group input,
.apm-submit-lead-form .form-group select,
.apm-submit-lead-form .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.apm-submit-lead-form .form-group input:focus,
.apm-submit-lead-form .form-group select:focus,
.apm-submit-lead-form .form-group textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.apm-submit-lead-form .form-group input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.apm-submit-lead-form .form-group textarea {
    height: 80px;
    resize: vertical;
}

.apm-submit-lead-form button[type="submit"] {
    background: #4a2c6d;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.apm-submit-lead-form button[type="submit"]:hover {
    background: #60448a;
}

.apm-submit-lead-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.apm-submit-lead-form button[type="submit"] i {
    margin-right: 8px;
}

/* Stats Grid */
.apm-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-box {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-box .stat-icon {
    font-size: 28px;
    color: #4a2c6d;
    margin-bottom: 5px;
    display: block;
}

.stat-box .stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-box .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.stat-box.stat-approved .stat-value {
    color: #4a2c6d;
}

.stat-box.stat-approved .stat-icon {
    color: #4a2c6d;
}

.stat-box.stat-pending .stat-value {
    color: #4a2c6d;
}

.stat-box.stat-pending .stat-icon {
    color: #4a2c6d;
}

.stat-box.stat-revenue .stat-value {
    color: #4a2c6d;
}

.stat-box.stat-revenue .stat-icon {
    color: #4a2c6d;
}

/* User Leads Section */
.apm-user-leads {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.apm-user-leads h3 {
    margin-top: 0;
    font-size: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.apm-user-leads h3 i {
    color: #4a2c6d;
    margin-right: 10px;
}

#apm-leads-container {
    min-height: 200px;
}

.apm-leads-list {
    margin-bottom: 20px;
}

.apm-lead-item {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 15px;
    transition: box-shadow 0.2s ease;
}

.apm-lead-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.apm-lead-item .lead-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.apm-lead-item .lead-header strong {
    font-size: 16px;
    color: #333;
}

.apm-lead-item .lead-header strong i {
    color: #4a2c6d;
    margin-right: 8px;
}

.apm-lead-item .lead-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apm-lead-item .lead-status.pending {
    background: #ffb900;
    color: #fff;
}

.apm-lead-item .lead-status.approved {
    background: #46b450;
    color: #fff;
}

.apm-lead-item .lead-status.rejected {
    background: #dc3232;
    color: #fff;
}

.apm-lead-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 20px;
    margin: 10px 0;
    font-size: 14px;
}

.apm-lead-details div {
    padding: 3px 0;
}

.apm-lead-details strong {
    color: #555;
    font-weight: 600;
}

.apm-lead-details strong i {
    margin-right: 5px;
    color: #0073aa;
    width: 16px;
}

.apm-payments-list {
    margin-top: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}

.apm-payments-list strong {
    display: block;
    margin-bottom: 8px;
    color: #555;
}

.apm-payments-list strong i {
    color: #0073aa;
    margin-right: 8px;
}

.apm-payment-item {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.apm-payment-item:last-child {
    border-bottom: none;
}

.apm-payment-item i {
    margin-right: 5px;
    color: #0073aa;
}

.apm-payment-item a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.apm-payment-item a:hover {
    text-decoration: underline;
}

.apm-payment-item a i {
    margin-right: 5px;
}

/* Pagination */
.apm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 15px 0 5px 0;
    flex-wrap: wrap;
}

.apm-pagination .page-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.apm-pagination .page-btn:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.apm-pagination .page-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.apm-pagination .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.apm-pagination .page-info {
    padding: 8px 14px;
    color: #666;
    font-size: 14px;
}

.apm-loading {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.apm-loading .spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.apm-loading i {
    font-size: 30px;
    color: #0073aa;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.apm-no-leads {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.apm-no-leads i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

/* Login Required */
.apm-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 40px auto;
}

.apm-login-required p {
    font-size: 18px;
    color: #555;
}

.apm-login-required a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.apm-login-required a:hover {
    text-decoration: underline;
}

.apm-login-required i {
    font-size: 48px;
    color: #0073aa;
    margin-bottom: 15px;
}

/* Responsive */
@media screen and (max-width: 992px) {
    .apm-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .apm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    #apm-subscriber-dashboard {
        padding: 10px;
    }
    
    .apm-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-box {
        padding: 15px;
    }
    
    .stat-box .stat-value {
        font-size: 20px;
    }
    
    .apm-lead-details {
        grid-template-columns: 1fr;
    }
    
    .apm-lead-item .lead-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .apm-pagination .page-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
}