/* ===========================
   Associate Portal Styles
   =========================== */

/* Associate Hero Section */
.associate-hero {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 80px 20px;
}

.associate-hero .container {
    display: flex;
    gap: 60px;
    align-items: center;
}

.associate-hero .hero-content {
    flex: 1;
}

.associate-hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.associate-hero .hero-subtitle {
    font-size: 24px;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.associate-hero .hero-description {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.95;
}

.btn-large {
    padding: 18px 45px;
    font-size: 18px;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 40px;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card p {
    font-size: 16px;
    opacity: 0.9;
}

/* Benefits Section */
.benefits-section {
    padding: var(--section-padding);
    background: var(--light-gray);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.benefit-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.benefit-card i {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.benefit-card h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.benefit-card p {
    color: var(--dark-gray);
    line-height: 1.7;
}

/* How It Works Section */
.how-it-works {
    padding: var(--section-padding);
    background: var(--white);
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.step-card {
    background: var(--light-gray);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    transition: var(--transition);
}

.step-card:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

.step-card:hover .step-number {
    background: var(--accent-gold);
    color: var(--white);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.step-card p {
    font-size: 15px;
    line-height: 1.6;
}

.step-arrow {
    font-size: 30px;
    color: var(--primary-color);
}

/* Commission Structure */
.commission-structure {
    padding: var(--section-padding);
    background: var(--gradient-primary);
    color: var(--white);
}

.commission-structure .section-title {
    color: var(--white);
}

.commission-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.tier-card {
    background: var(--white);
    color: var(--text-color);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.tier-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.tier-card.featured {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tier-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.tier-badge.bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #A0522D 100%);
    color: var(--white);
}

.tier-badge.silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: var(--secondary-color);
}

.tier-badge.gold {
    background: linear-gradient(135deg, #D4AF37 0%, #C19B2E 100%);
    color: var(--white);
}

.tier-rate {
    font-size: 56px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.tier-requirement {
    font-size: 16px;
    color: var(--dark-gray);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light-gray);
}

.tier-benefits {
    list-style: none;
    text-align: left;
}

.tier-benefits li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.tier-benefits li:last-child {
    border-bottom: none;
}

.tier-benefits i {
    color: var(--accent-gold);
    font-size: 14px;
}

/* Auth Modal Styles */
.associate-modal {
    max-width: 500px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form input,
.auth-form select {
    padding: 15px 20px;
    border: 2px solid var(--gray);
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-full {
    width: 100%;
}

.form-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    text-align: center;
}

.form-footer a {
    color: var(--primary-color);
    font-size: 14px;
    transition: var(--transition);
}

.form-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Dashboard Styles */
.dashboard {
    display: none;
    min-height: 100vh;
    background: var(--light-gray);
}

.dashboard.active {
    display: flex;
}

.dashboard-sidebar {
    width: 280px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 30px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 24px;
    color: var(--accent-gold);
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 14px;
    opacity: 0.8;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav .nav-item {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--accent-gold);
}

.sidebar-nav .nav-item.active {
    background: rgba(0, 71, 171, 0.3);
    border-left-color: var(--accent-gold);
}

.sidebar-nav .nav-item i {
    width: 20px;
    font-size: 18px;
}

.dashboard-content {
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.dashboard-section h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.section-description {
    color: var(--dark-gray);
    margin-bottom: 30px;
    font-size: 16px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-box {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.stat-box i {
    font-size: 40px;
    color: var(--primary-color);
    background: var(--light-gray);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Recent Activity */
.recent-activity {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.recent-activity h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
}

.sales-table thead {
    background: var(--light-gray);
}

.sales-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--gray);
}

.sales-table td {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.sales-table tbody tr:hover {
    background: var(--light-gray);
}

/* Commission Summary */
.commission-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.summary-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.summary-card h4 {
    font-size: 14px;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.summary-card .amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.growth {
    font-size: 14px;
    font-weight: 600;
}

.growth.positive {
    color: #4CAF50;
}

.growth.negative {
    color: #f44336;
}

.payout-date,
.sales-count {
    font-size: 14px;
    color: var(--dark-gray);
}

/* Sales Chart */
.sales-chart {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.sales-chart h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.chart-placeholder {
    background: var(--light-gray);
    padding: 100px 20px;
    text-align: center;
    border-radius: 10px;
    color: var(--dark-gray);
}

/* Customers List */
.customers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.customer-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.customer-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.customer-info h4 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.customer-info p {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.customer-stats {
    display: flex;
    gap: 10px;
}

.stat-badge {
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    background: var(--light-gray);
    color: var(--text-color);
}

.stat-badge.active {
    background: var(--accent-gold);
    color: var(--white);
}

/* Referral Link Section */
.referral-box {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.referral-link-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.referral-link-container input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--gray);
    border-radius: 10px;
    font-size: 16px;
    background: var(--light-gray);
}

.share-buttons {
    margin-top: 30px;
}

.share-buttons h4 {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 15px;
}

.social-share-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    margin-right: 10px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.social-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-share-btn.facebook {
    background: #1877F2;
}

.social-share-btn.twitter {
    background: #1DA1F2;
}

.social-share-btn.instagram {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF);
}

.social-share-btn.whatsapp {
    background: #25D366;
}

.qr-code-section {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.qr-code-section h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.qr-placeholder {
    background: var(--light-gray);
    padding: 60px 20px;
    border-radius: 10px;
    margin-top: 20px;
}

/* Marketing Materials */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.material-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.material-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.material-card i {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.material-card h4 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.material-card p {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 20px;
}

/* Settings Form */
.settings-form {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.settings-form h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin: 30px 0 20px 0;
}

.settings-form h3:first-child {
    margin-top: 0;
}

.settings-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-form input,
.settings-form select {
    padding: 15px 20px;
    border: 2px solid var(--gray);
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
}

.settings-form input:focus,
.settings-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.payment-method-select {
    background: var(--white);
    cursor: pointer;
}

/* Responsive Design for Dashboard */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        width: 250px;
    }
    
    .dashboard-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .associate-hero .container {
        flex-direction: column;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .dashboard-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .dashboard-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .commission-summary {
        grid-template-columns: 1fr;
    }
    
    .referral-link-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .associate-hero h1 {
        font-size: 32px;
    }
    
    .associate-hero .hero-subtitle {
        font-size: 18px;
    }
    
    .tier-rate {
        font-size: 42px;
    }
    
    .sales-table {
        font-size: 14px;
    }
    
    .sales-table th,
    .sales-table td {
        padding: 10px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}
