/* Agent Pages */
.agent-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
    /* Cleaner light background */
    background:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 25%);
}

.tour-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-top: 60px;
}

.tour-hero-category {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-gradient);
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.tour-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    font-family: 'Unbounded', sans-serif;
    color: #ffffff !important;
    /* Force White */
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    /* Heavy Shadow */
}

.tour-hero-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.tour-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: #ffffff !important;
    /* Force White */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Shadow for readability */
}

.tour-hero-meta-item i {
    width: 20px;
    height: 20px;
    color: #fbbf24;
    /* Gold Icon */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.agent-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.agent-hero-text h1 {
    margin-bottom: 24px;
    color: var(--text-primary);
}

.agent-hero-text p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.agent-features {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.agent-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.agent-feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.agent-feature-icon i {
    font-size: 1.25rem;
    color: white;
}

.agent-feature-text h4 {
    margin-bottom: 4px;
    color: var(--text-primary);
}

.agent-feature-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.agent-hero-image {
    position: relative;
}

.agent-hero-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.agent-stats-floating {
    position: absolute;
    bottom: -30px;
    left: -30px;
    display: flex;
    gap: 16px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    /* backdrop-filter removed for cleaner text */
    border-radius: var(--radius-md);
    padding: 20px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.stat-card-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px;
    background: var(--bg-secondary);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 24px;
}

.auth-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 32px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.auth-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
}

/* Dashboard */
.dashboard {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-welcome {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dashboard-title {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.referral-box {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.referral-link {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Stat Boxes */
.stat-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    /* Default dark text */
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
    border: 1px solid var(--border-color);
}

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

/* Common icon style */
.stat-box .stat-box-icon {
    background: var(--bg-secondary);
    margin-bottom: 24px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-box .stat-box-icon i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.stat-box .stat-box-value {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.stat-box .stat-box-label {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Color Variants for Admin (Solid Gradients) - ENFORCE WHITE TEXT HERE */
.stat-box.card-1,
.stat-box.card-2,
.stat-box.card-3,
.stat-box.card-4 {
    color: white !important;
    border: none;
}

.stat-box.card-1 .stat-box-icon,
.stat-box.card-2 .stat-box-icon,
.stat-box.card-3 .stat-box-icon,
.stat-box.card-4 .stat-box-icon {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.stat-box.card-1 .stat-box-icon i,
.stat-box.card-2 .stat-box-icon i,
.stat-box.card-3 .stat-box-icon i,
.stat-box.card-4 .stat-box-icon i {
    color: white;
}

.stat-box.card-1 .stat-box-value,
.stat-box.card-2 .stat-box-value,
.stat-box.card-3 .stat-box-value,
.stat-box.card-4 .stat-box-value {
    color: white;
    background: none;
    -webkit-text-fill-color: initial;
}

.stat-box.card-1 .stat-box-label,
.stat-box.card-2 .stat-box-label,
.stat-box.card-3 .stat-box-label,
.stat-box.card-4 .stat-box-label {
    color: rgba(255, 255, 255, 0.9);
}

.stat-box.card-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-box.card-2 {
    background: linear-gradient(135deg, #2af598 0%, #009efd 100%);
}

.stat-box.card-3 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-box.card-4 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.agent-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.agent-hero-text h1 {
    margin-bottom: 24px;
}

.agent-hero-text p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.agent-features {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.agent-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.agent-feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.agent-feature-icon i {
    font-size: 1.25rem;
}

.agent-feature-text h4 {
    margin-bottom: 4px;
}

.agent-feature-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.agent-hero-image {
    position: relative;
}

.agent-hero-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.agent-stats-floating {
    position: absolute;
    bottom: -30px;
    left: -30px;
    display: flex;
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    text-align: center;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 24px;
}

.auth-tabs {
    display: flex;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 32px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.auth-tab.active {
    background: var(--primary-gradient);
    color: white;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-light);
}

/* Dashboard */
.dashboard {
    padding-top: 100px;
    min-height: 100vh;
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-welcome {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dashboard-title {
    margin-bottom: 20px;
}

.referral-box {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.referral-link {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--primary-light);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Stat Boxes (Solid Colors like Step Cards) */
.stat-box {
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

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

.stat-box .stat-box-icon {
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    border-radius: 12px;
}

.stat-box .stat-box-icon i {
    color: white;
    font-size: 1.5rem;
}

.stat-box .stat-box-value {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.stat-box .stat-box-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Color Variants */
.stat-box.card-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-box.card-2 {
    background: linear-gradient(135deg, #2af598 0%, #009efd 100%);
}

.stat-box.card-3 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-box.card-4 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Step Cards (Full Gradient) */
.step-card {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
    color: white;
    height: 100%;
}

.step-card.success {
    background: var(--success-gradient);
}

.step-card.warning {
    background: var(--warning-gradient);
}

.step-card .stat-box-icon {
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.step-card .stat-box-icon i {
    color: white;
}

.step-card .stat-box-value {
    color: white;
    background: none;
    -webkit-text-fill-color: initial;
    font-size: 3rem;
    margin-bottom: 16px;
}

.step-card .stat-box-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
}

.stat-box-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.stat-box-icon i {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.stat-box-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-box-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Tables */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.table-title {
    font-size: 1.25rem;
}

.table-wrapper {
    overflow-x: auto;
}

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

th,
td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: var(--glass-bg);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    color: var(--text-secondary);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.pending {
    background: rgba(242, 153, 74, 0.15);
    color: #f2994a;
}

.status-badge.confirmed {
    background: rgba(56, 239, 125, 0.15);
    color: #38ef7d;
}

.status-badge.paid {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

.status-badge.cancelled {
    background: rgba(245, 87, 108, 0.15);
    color: #f5576c;
}

/* Admin Specific */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.admin-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-filters .form-input {
    width: auto;
    min-width: 200px;
}

.commission-table {
    margin-top: 40px;
}

.commission-table table {
    font-size: 0.9rem;
}

/* Region Popup Modal */
.region-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.region-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.region-popup {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: fadeInUp 0.4s ease;
}

.region-popup h2 {
    margin-bottom: 16px;
}

.region-popup p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.region-popup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.region-popup-btn {
    padding: 16px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
}

.region-popup-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
}

.region-popup-btn.selected {
    background: var(--primary-gradient);
    border-color: transparent;
}

@media (max-width: 768px) {
    .tour-hero-title {
        font-size: 2rem !important;
    }
}