* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1e40af 0%, #0ea5e9 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.navbar {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-container h1 {
    font-size: 1.5rem;
    color: #1e40af;
}

.logo {
    max-height: 60px;
    height: auto;
    width: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-logo {
    max-width: 300px;
    height: auto;
    margin: 0 auto 30px;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.auth-card, .form-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    margin: 50px auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1, h2 {
    color: #333;
    margin-bottom: 20px;
}

.form-description {
    color: #666;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #84cc16;
}

.form-group input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: #1e40af;
    color: white;
}

.btn-primary:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.btn-success {
    background: #84cc16;
    color: white;
}

.btn-success:hover {
    background: #65a30d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(132, 204, 22, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

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

.text-center {
    text-align: center;
    margin-top: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

table thead {
    background: #f8f9fa;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

table th {
    font-weight: 600;
    color: #333;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-approved {
    background: #d4edda;
    color: #155724;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-rejected {
    background: #f8d7da;
    color: #721c24;
}

.referral-list {
    margin-top: 15px;
}

.referral-item {
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    margin-bottom: 15px;
}

.referral-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.referral-date {
    color: #666;
    font-size: 14px;
}

.referral-item p {
    margin-bottom: 8px;
    color: #555;
}

.temperature-display {
    margin-top: 15px;
}

.temperature-bar,
.temperature-bar-preview {
    width: 100%;
    height: 20px;
    background: #e1e8ed;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.temperature-fill,
.temperature-fill-preview {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ff5722 100%);
    transition: width 0.3s;
}

.temperature-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e1e8ed;
    outline: none;
    -webkit-appearance: none;
}

.temperature-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.temperature-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.temp-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.currency-input {
    position: relative;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.currency-input input {
    padding-left: 30px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .auth-card, .form-card {
        padding: 20px;
        margin: 20px auto;
    }
    
    .nav-container h1 {
        font-size: 1.2rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .card {
        padding: 15px;
    }
    
    table {
        font-size: 14px;
    }
    
    table th,
    table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-between;
    }
}

.stats-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stats-tab {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s;
}

.stats-tab:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.stats-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #667eea;
    margin: 0 0 10px 0;
}

.stat-card p {
    margin: 0;
    color: #666;
    font-weight: 600;
}

.stats-table {
    width: 100%;
}

.rank-cell {
    font-weight: 700;
    font-size: 1.2rem;
    color: #667eea;
}

.value-cell {
    font-weight: 600;
    color: #28a745;
}

.highlight-row {
    background: #f0f4ff;
}

.you-badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.activity-list {
    margin-top: 15px;
}

.activity-item {
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.activity-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

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

.activity-type {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.activity-type.referral-sent {
    background: #e3f2fd;
    color: #1976d2;
}

.activity-type.referral-received {
    background: #f3e5f5;
    color: #7b1fa2;
}

.activity-type.b2b-sent {
    background: #fff3e0;
    color: #f57c00;
}

.activity-type.b2b-received {
    background: #ffe0b2;
    color: #e65100;
}

.activity-type.thank-you-sent {
    background: #e8f5e9;
    color: #2e7d32;
}

.activity-type.thank-you-received {
    background: #c8e6c9;
    color: #1b5e20;
}

.activity-date {
    color: #666;
    font-size: 14px;
}

.activity-value {
    color: #28a745;
    font-weight: 600;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: 1fr;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .stats-tabs {
        justify-content: center;
    }
    
    .stats-tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}
