/**
 * W7Commerce Affiliates - Frontend Styles
 */

/* Reset & Base */
.w7-dashboard *,
.w7-registration-form *,
.w7-login-box * {
    box-sizing: border-box;
}

/* Forms */
.w7-registration-form,
.w7-login-box {
    max-width: 480px;
    margin: 0 auto;
}

.w7-login-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.w7-login-box h2 {
    margin: 0 0 30px;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
}

.w7-form-row {
    margin-bottom: 20px;
}

.w7-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.w7-form-row input[type="text"],
.w7-form-row input[type="email"],
.w7-form-row input[type="password"],
.w7-form-row input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.w7-form-row input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
    background: #fff;
}

.w7-form-row input::placeholder {
    color: #aaa;
}

.w7-form-row small {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 13px;
}

.w7-form-row .required {
    color: #e74c3c;
}

.w7-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.w7-form-checkbox label {
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.w7-form-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.w7-form-links {
    text-align: center;
    margin-top: 20px;
}

.w7-form-links a {
    color: #667eea;
    font-size: 14px;
    text-decoration: none;
}

.w7-form-links a:hover {
    text-decoration: underline;
}

/* Buttons */
.w7-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.w7-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.w7-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.5);
    color: #fff;
}

.w7-btn-full {
    width: 100%;
}

.w7-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.w7-btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.w7-btn-logout {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    padding: 12px 24px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(220,53,69,0.3);
}

.w7-btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220,53,69,0.4);
    color: #fff;
}

.w7-logout-icon {
    font-size: 16px;
}

.w7-btn-update {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 24px;
}

.w7-btn-update:hover {
    transform: translateY(-1px);
}

/* Messages */
.w7-form-messages {
    margin-top: 15px;
}

.w7-message {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.w7-message p {
    margin: 0;
}

.w7-message-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: none;
}

.w7-message-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: none;
}

.w7-message-info {
    background: linear-gradient(135deg, #e7f3ff 0%, #cce5ff 100%);
    color: #004085;
    border: none;
}

/* Login/Register links */
.w7-login-link,
.w7-register-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.w7-login-link p,
.w7-register-link p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.w7-login-link a,
.w7-register-link a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.w7-login-link a:hover,
.w7-register-link a:hover {
    text-decoration: underline;
}

/* Dashboard */
.w7-dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.w7-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.w7-header-welcome h2 {
    margin: 0 0 5px;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
}

.w7-header-subtitle {
    margin: 0;
    color: #666;
    font-size: 15px;
}

/* Affiliate Link Box */
.w7-affiliate-link-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    color: #fff;
    box-shadow: 0 8px 30px rgba(102,126,234,0.3);
}

.w7-link-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.w7-link-icon {
    font-size: 24px;
}

.w7-affiliate-link-box label {
    display: block;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.w7-affiliate-link-box small {
    display: block;
    margin-top: 15px;
    opacity: 0.9;
    font-size: 14px;
}

.w7-link-copy {
    display: flex;
    gap: 12px;
}

.w7-link-copy input {
    flex: 1;
    padding: 16px 18px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    background: rgba(255,255,255,0.95);
    color: #333;
    font-weight: 500;
}

.w7-btn-copy {
    padding: 16px 24px;
    background: #fff;
    color: #764ba2;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.w7-btn-copy:hover {
    background: #f8f9fa;
    color: #764ba2;
    transform: translateY(-2px);
}

.w7-copy-icon {
    font-size: 16px;
}

/* Stats Grid */
.w7-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.w7-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.w7-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.w7-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.w7-stat-card:hover::before {
    opacity: 1;
}

.w7-stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.w7-stat-highlight {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(40,167,69,0.3);
}

.w7-stat-highlight::before {
    display: none;
}

.w7-stat-highlight:hover {
    box-shadow: 0 12px 35px rgba(40,167,69,0.4);
}

.w7-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a2e;
}

.w7-stat-highlight .w7-stat-value {
    color: #fff;
}

.w7-stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.w7-stat-highlight .w7-stat-label {
    color: rgba(255,255,255,0.9);
}

/* Info Box */
.w7-info-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 25px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.w7-info-icon {
    font-size: 20px;
}

/* Section Headers */
.w7-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.w7-section-icon {
    font-size: 24px;
}

.w7-section-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

/* Pix Section */
.w7-pix-section {
    background: #fff;
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.w7-inline-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.w7-inline-form input {
    flex: 1;
    max-width: 400px;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.w7-inline-form input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
    outline: none;
}

/* Commissions Section */
.w7-commissions-section {
    background: #fff;
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.w7-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.w7-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.w7-empty p {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.w7-empty small {
    color: #888;
    font-size: 14px;
}

/* Table */
.w7-table-wrapper {
    overflow-x: auto;
    margin: 0 -10px;
    padding: 0 10px;
}

.w7-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.w7-table th,
.w7-table td {
    padding: 16px 14px;
    text-align: left;
}

.w7-table th {
    background: #f8f9fa;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    border-bottom: 2px solid #e8e8e8;
}

.w7-table th:first-child {
    border-radius: 10px 0 0 0;
}

.w7-table th:last-child {
    border-radius: 0 10px 0 0;
}

.w7-table td {
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
}

.w7-table tr:last-child td {
    border-bottom: none;
}

.w7-table tr:hover td {
    background: #fafafa;
}

.w7-table .w7-amount {
    font-weight: 700;
    color: #28a745;
}

/* Status badges */
.w7-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.w7-status-available {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.w7-status-pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
}

.w7-status-paid {
    background: linear-gradient(135deg, #cce5ff 0%, #b8daff 100%);
    color: #004085;
}

.w7-status-cancelled {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Pagination */
.w7-pagination {
    margin-top: 25px;
    text-align: center;
}

.w7-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.w7-pagination .page-numbers.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

.w7-pagination .page-numbers:hover:not(.current) {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .w7-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .w7-dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
    }
    
    .w7-header-welcome h2 {
        font-size: 24px;
    }
    
    .w7-btn-logout {
        width: 100%;
    }
    
    .w7-affiliate-link-box {
        padding: 25px 20px;
    }
    
    .w7-link-copy {
        flex-direction: column;
    }
    
    .w7-link-copy input,
    .w7-btn-copy {
        width: 100%;
    }
    
    .w7-pix-section,
    .w7-commissions-section {
        padding: 20px;
    }
    
    .w7-inline-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .w7-inline-form input {
        max-width: none;
    }
    
    .w7-stat-value {
        font-size: 22px;
    }
    
    .w7-stat-icon {
        font-size: 26px;
    }
}

@media screen and (max-width: 480px) {
    .w7-dashboard {
        padding: 10px;
    }
    
    .w7-login-box {
        padding: 25px 20px;
    }
    
    .w7-table th,
    .w7-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .w7-status {
        padding: 4px 10px;
        font-size: 10px;
    }
}
