/**
 * MOBI Afiliados - Frontend CSS
 */

/* General Frontend Styles */
.mobi-affiliate-dashboard,
.mobi-login-form,
.mobi-register-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Dashboard Layout */
.mobi-affiliate-dashboard {
    display: grid;
    gap: 30px;
}

.mobi-dashboard-stats {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.mobi-dashboard-links,
.mobi-dashboard-recent {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

/* Stats Grid */
.mobi-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mobi-stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobi-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mobi-stat-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

.mobi-stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.mobi-stat-item.highlight .mobi-stat-value {
    color: #fff;
}

.mobi-stat-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobi-stat-item.highlight .mobi-stat-label {
    color: rgba(255,255,255,0.9);
}

/* Links Section */
.mobi-affiliate-links h3,
.mobi-affiliate-stats h3,
.mobi-recent-activity h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.mobi-link-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.mobi-link-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.mobi-link-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mobi-link-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.mobi-link-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mobi-copy-btn {
    padding: 12px 20px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.mobi-copy-btn:hover {
    background: #5a6fd8;
}

.mobi-copy-btn:active {
    transform: translateY(1px);
}

/* Coupon Display */
.mobi-coupon-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobi-coupon-code {
    background: #fff;
    border: 2px dashed #667eea;
    padding: 15px 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    letter-spacing: 2px;
}

/* QR Code Section */
.mobi-qr-section,
.mobi-qr-code {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
}

.mobi-qr-code h4 {
    margin: 0 0 15px 0;
    color: #495057;
}

.mobi-qr-code img {
    max-width: 200px;
    height: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.mobi-qr-description {
    margin: 15px 0 0 0;
    color: #6c757d;
    font-size: 14px;
}

/* Social Share */
.mobi-social-share {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.mobi-social-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mobi-social-btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobi-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #fff;
}

.mobi-social-btn.facebook { background: #3b5998; }
.mobi-social-btn.twitter { background: #1da1f2; }
.mobi-social-btn.linkedin { background: #0077b5; }

/* Activity Section */
.mobi-activity-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.mobi-tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.mobi-tab-btn.active,
.mobi-tab-btn:hover {
    color: #667eea;
    border-bottom-color: #667eea;
}

.mobi-tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobi-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobi-activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.mobi-activity-item:last-child {
    border-bottom: none;
}

.mobi-activity-info {
    flex: 1;
}

.mobi-activity-info strong {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
}

.mobi-activity-status,
.mobi-activity-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-right: 8px;
}

.mobi-activity-date {
    color: #6c757d;
    font-size: 12px;
}

/* Status Colors */
.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-converted { background: #cce7ff; color: #004085; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-paid { background: #cce7ff; color: #004085; }
.status-cancelled { background: #f8d7da; color: #721c24; }

/* Tables */
.mobi-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobi-table th,
.mobi-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.mobi-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.mobi-table tr:hover {
    background: #f8f9fa;
}

.mobi-table tr:last-child td {
    border-bottom: none;
}

/* Status Indicators */
.mobi-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Forms */
.mobi-login-form,
.mobi-register-form {
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.mobi-login-form h3,
.mobi-register-form h3 {
    margin: 0 0 30px 0;
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

.mobi-login-form p,
.mobi-register-form p {
    margin-bottom: 20px;
}

.mobi-login-form label,
.mobi-register-form label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.mobi-login-form input[type="text"],
.mobi-login-form input[type="email"],
.mobi-login-form input[type="password"],
.mobi-register-form input[type="text"],
.mobi-register-form input[type="email"],
.mobi-register-form input[type="password"],
.mobi-register-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.mobi-login-form input:focus,
.mobi-register-form input:focus,
.mobi-register-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mobi-login-form input[type="submit"],
.mobi-register-form input[type="submit"] {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobi-login-form input[type="submit"]:hover,
.mobi-register-form input[type="submit"]:hover {
    background: #5a6fd8;
}

.mobi-login-form input[type="checkbox"],
.mobi-register-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.mobi-register-link,
.mobi-login-link,
.mobi-forgot-password {
    text-align: center;
    margin-top: 20px;
}

.mobi-register-link a,
.mobi-login-link a,
.mobi-forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.mobi-register-link a:hover,
.mobi-login-link a:hover,
.mobi-forgot-password a:hover {
    text-decoration: underline;
}

/* Payout Form */
.mobi-payout-request {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.mobi-payout-request h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.mobi-payout-form p {
    margin-bottom: 15px;
}

.mobi-payout-form label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.mobi-payout-form input,
.mobi-payout-form select,
.mobi-payout-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.mobi-payout-form input[type="submit"] {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    width: auto;
}

.mobi-payout-form input[type="submit"]:hover {
    background: #218838;
}

/* Messages */
.mobi-error,
.mobi-success,
.mobi-notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
    font-size: 14px;
}

.mobi-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mobi-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mobi-notice {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Not Affiliate / Inactive Messages */
.mobi-not-affiliate,
.mobi-inactive-affiliate {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.mobi-not-affiliate h3,
.mobi-inactive-affiliate h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 24px;
}

.mobi-not-affiliate p,
.mobi-inactive-affiliate p {
    color: #6c757d;
    margin-bottom: 25px;
}

.mobi-not-affiliate .button,
.mobi-inactive-affiliate .button {
    display: inline-block;
    padding: 12px 25px;
    background: #667eea;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.mobi-not-affiliate .button:hover,
.mobi-inactive-affiliate .button:hover {
    background: #5a6fd8;
    text-decoration: none;
    color: #fff;
}

/* Pagination */
.mobi-pagination {
    text-align: center;
    margin: 30px 0;
}

.mobi-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobi-pagination .page-numbers:hover,
.mobi-pagination .page-numbers.current {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* Loading States */
.mobi-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.mobi-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .mobi-affiliate-dashboard,
    .mobi-login-form,
    .mobi-register-form {
        padding: 15px;
    }
    
    .mobi-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mobi-stat-value {
        font-size: 24px;
    }
    
    .mobi-link-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mobi-copy-btn {
        margin-top: 10px;
    }
    
    .mobi-coupon-display {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .mobi-social-buttons {
        flex-direction: column;
    }
    
    .mobi-social-btn {
        text-align: center;
    }
    
    .mobi-activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .mobi-table {
        font-size: 12px;
    }
    
    .mobi-table th,
    .mobi-table td {
        padding: 10px 8px;
    }
    
    .mobi-login-form,
    .mobi-register-form {
        padding: 25px;
    }
    
    .mobi-activity-tabs {
        flex-direction: column;
    }
    
    .mobi-tab-btn {
        text-align: left;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .mobi-tab-btn.active,
    .mobi-tab-btn:hover {
        border-left-color: #667eea;
        border-bottom-color: transparent;
    }
}

@media (max-width: 480px) {
    .mobi-affiliate-dashboard,
    .mobi-login-form,
    .mobi-register-form {
        padding: 10px;
    }
    
    .mobi-dashboard-stats,
    .mobi-dashboard-links,
    .mobi-dashboard-recent {
        padding: 20px;
    }
    
    .mobi-login-form,
    .mobi-register-form {
        padding: 20px;
    }
    
    .mobi-login-form h3,
    .mobi-register-form h3 {
        font-size: 24px;
    }
    
    .mobi-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Print Styles */
@media print {
    .mobi-copy-btn,
    .mobi-social-share,
    .mobi-activity-tabs,
    .mobi-payout-request {
        display: none !important;
    }
    
    .mobi-affiliate-dashboard,
    .mobi-dashboard-stats,
    .mobi-dashboard-links,
    .mobi-dashboard-recent {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .mobi-stat-item {
        break-inside: avoid;
    }
}

