/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #0d6b6e 0%, #158173 100%);
    color: #fff;
    padding: 0 12px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 900;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: hidden;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
    max-width: 250px;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    justify-content: center;
    min-width: 0;
    max-width: 400px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
    max-width: 300px;
}

.toggle-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 200px;
    overflow: hidden;
}

.logo-container h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Header Drawer System for Mobile */
.header-drawer {
    position: fixed;
    top: 60px;
    right: -300px;
    width: 280px;
    height: calc(100vh - 60px);
    background: linear-gradient(135deg, #0d6b6e 0%, #158173 100%);
    box-shadow: -2px 0 8px rgba(0,0,0,0.3);
    z-index: 950;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.header-drawer.open {
    right: 0;
}

.header-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 940;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.header-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.drawer-section h3 {
    color: #fff;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    opacity: 0.8;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-nav a {
    color: #fff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-actions .btn {
    width: 100%;
    justify-content: center;
    margin: 0;
}

.drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
    justify-content: center;
    width: 40px;
    height: 40px;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo {
    height: 45px;
    width: auto;
    max-width: 45px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
}

.header h3 {
    font-size: 1.4em;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: #fff;
    margin: 0;
}

/* View Switcher */
.view-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
    margin: 0;
    flex-shrink: 0;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 500;
    min-width: 60px;
    justify-content: center;
    white-space: nowrap;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-1px);
}

.view-btn.active {
    background: #158173;
    color: #fff;
    box-shadow: 0 2px 8px rgba(21, 129, 115, 0.3);
}

.view-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    flex-shrink: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    overflow: hidden;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Balance Display */
.balance-display {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Responsive Header Elements */
@media (max-width: 768px) {
    .header-left .logo-container {
        gap: 8px;
    }
    
    .header-right .header-nav {
        gap: 8px;
    }
    
    .user-actions {
        gap: 8px;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .header-left {
        gap: 8px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .user-actions {
        gap: 4px;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
    
    .icon-btn svg {
        width: 18px;
        height: 18px;
    }
}

.balance-display {
    margin-right: 24px;
    font-weight: 600;
    color: #fff;
    background: #158173;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.9em;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-dropdown {
    position: relative;
}

.avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 160px;
    z-index: 3000;
    overflow: hidden;
}

.user-menu a {
    display: block;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.user-menu a:hover {
    background: #f5f7fa;
}

.user-menu .logout {
    color: #e53935;
}

.user-menu .admin-link {
    color: #1976d2;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.user-menu .admin-link:hover {
    background: #e3f2fd;
    color: #0d47a1;
}

.user-menu .admin-link svg {
    stroke: currentColor;
}

.menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

.toggle-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    margin-right: 16px;
    display: none;
    padding: 8px;
    border-radius: 4px;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content Styles */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content {
    padding: 32px;
    min-height: calc(100vh - 120px);
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #e0e6ed;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.card h3 {
    color: #158173;
    margin-bottom: 16px;
    font-size: 1.3em;
}

.card p {
    color: #666;
    margin-bottom: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #158173 0%, #0d6b6e 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0d6b6e 0%, #158173 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 129, 115, 0.3);
}

.btn-secondary {
    background: #3949ab;
    color: #fff;
}

.btn-secondary:hover {
    background: #303f9f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(57, 73, 171, 0.3);
}

.btn-danger {
    background: #e53935;
    color: #fff;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

/* Tables */
.table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 24px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: #f8f9fa;
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e0e6ed;
}

.table th {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #158173;
    box-shadow: 0 0 0 3px rgba(21, 129, 115, 0.1);
}

.form-control:invalid {
    border-color: #e53935;
}

.form-control:invalid:focus {
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

/* Status Messages */
.status-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-weight: 500;
}

.status-success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status-warning {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}

.status-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #1a5e7e 0%, #0d4f5c 100%);
    color: #fff;
    padding: 40px 32px 20px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    text-align: center;
    margin-bottom: 32px;
}

.contact-info a {
    color: #fff;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.company-profile {
    text-align: center;
    margin-bottom: 32px;
}

.company-profile h3 {
    color: #158173;
    margin-bottom: 16px;
    font-size: 1.5em;
}

.company-profile p {
    max-width: 700px;
    margin: 0 auto 16px;
    font-size: 1.05em;
    color: #e0e6ef;
}

.features ul {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    color: #e0e6ef;
}

.features li {
    margin-bottom: 8px;
}

/* Animated Stickers */
.animated-stickers {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.sticker {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sticker svg {
    filter: drop-shadow(0 2px 8px rgba(57, 73, 171, 0.2));
}

.sticker-label {
    margin-top: 8px;
    font-weight: 700;
    color: #3949ab;
}

.float-1 {
    animation: float1 2.2s ease-in-out infinite alternate;
}

.float-2 {
    animation: float2 2.4s ease-in-out infinite alternate;
}

.float-3 {
    animation: float3 2.1s ease-in-out infinite alternate;
}

.float-4 {
    animation: float4 2.3s ease-in-out infinite alternate;
}

@keyframes float1 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

@keyframes float2 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-14px); }
}

@keyframes float3 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

@keyframes float4 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-12px); }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-primary {
    color: #158173;
}

/* View Switcher Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.switch-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: #f5f5f5;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.switch-view-content {
    max-width: 500px;
}

.preview-card {
    background: linear-gradient(135deg, #158173 0%, #1976d2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.preview-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.preview-card p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.feature-list li {
    padding: 5px 0;
    opacity: 0.9;
}

.switch-options {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin: 0;
}

.info-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    font-size: 14px;
    color: #1565c0;
}

.info-box strong {
    color: #0d47a1;
}

@media (max-width: 768px) {
    .view-switcher {
        margin: 0 10px;
    }
    
    .view-btn {
        min-width: 80px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .view-btn span {
        display: none;
    }
    
    .view-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .switch-modal {
        width: 95%;
        margin: 20px;
    }
}

.text-secondary {
    color: #3949ab;
}

.text-danger {
    color: #e53935;
}

.text-success {
    color: #2e7d32;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-32 {
    margin-bottom: 32px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mt-32 {
    margin-top: 32px;
}

.hidden {
    display: none;
}

/* Site Visit Earnings Dashboard */
.earnings-container {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 32px;
    text-align: center;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-icon {
    color: #158173;
}

.page-description {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Earnings Overview Cards */
.earnings-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.overview-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.overview-card.primary {
    border-left: 4px solid #158173;
}

.overview-card.success {
    border-left: 4px solid #4caf50;
}

.overview-card.warning {
    border-left: 4px solid #ffd600;
}

.overview-card.info {
    border-left: 4px solid #3949ab;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.overview-card.primary .card-icon {
    background: rgba(21, 129, 115, 0.1);
    color: #158173;
}

.overview-card.success .card-icon {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.overview-card.warning .card-icon {
    background: rgba(255, 214, 0, 0.1);
    color: #ffd600;
}

.overview-card.info .card-icon {
    background: rgba(57, 73, 171, 0.1);
    color: #3949ab;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    color: #333;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1;
}

.card-change {
    font-size: 0.85rem;
    font-weight: 500;
}

.card-change.positive {
    color: #4caf50;
}

.card-change.negative {
    color: #e53935;
}

.card-change.neutral {
    color: #666;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
}

.action-btn.primary {
    background: #158173;
    color: white;
}

.action-btn.primary:hover {
    background: #0f6b5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(21, 129, 115, 0.3);
}

.action-btn.success {
    background: #4caf50;
    color: white;
}

.action-btn.success:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.action-btn.info {
    background: #3949ab;
    color: white;
}

.action-btn.info:hover {
    background: #303f9f;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(57, 73, 171, 0.3);
}

/* Analytics Section */
.analytics-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.period-selector {
    display: flex;
    gap: 8px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
}

.period-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
}

.period-btn.active,
.period-btn:hover {
    background: #158173;
    color: white;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-top: 16px;
}

/* Tables */
.visit-details-section,
.withdrawal-history-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select,
.filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #e0e0e0;
}

.visits-table-container,
.withdrawals-table-container {
    overflow-x: auto;
    margin-top: 16px;
}

.visits-table,
.withdrawals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.visits-table th,
.visits-table td,
.withdrawals-table th,
.withdrawals-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.visits-table th,
.withdrawals-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.visits-table tbody tr:hover,
.withdrawals-table tbody tr:hover {
    background: #f8f9fa;
}

.ip-address {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #666;
}

.location {
    color: #333;
}

.device {
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.8rem;
}

.page-views,
.duration {
    color: #666;
}

.earnings.positive {
    color: #4caf50;
    font-weight: 600;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status.completed {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.status.pending {
    background: rgba(255, 214, 0, 0.1);
    color: #ffd600;
}

.status.processing {
    background: rgba(57, 73, 171, 0.1);
    color: #3949ab;
}

/* Modal Enhancements */
.amount-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    color: #666;
    font-weight: 600;
    z-index: 1;
}

.amount-input-container .form-control {
    padding-left: 32px;
    padding-right: 60px;
}

.max-btn {
    position: absolute;
    right: 8px;
    padding: 4px 8px;
    background: #158173;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
}

.max-btn:hover {
    background: #0f6b5f;
}

.amount-info {
    margin-top: 8px;
    color: #666;
    font-size: 0.9rem;
}

.available-amount {
    color: #158173;
    font-weight: 600;
}

.withdrawal-summary {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #666;
}

.summary-row.total {
    border-top: 1px solid #ddd;
    padding-top: 8px;
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

.mt-2 {
    margin-top: 8px;
}

/* Analytics Modal */
.modal-content.large {
    max-width: 900px;
    width: 90vw;
}

.analytics-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
    gap: 8px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #158173;
    border-bottom-color: #158173;
    background: rgba(21, 129, 115, 0.05);
}

.tab-btn:hover {
    background: rgba(21, 129, 115, 0.1);
    color: #158173;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.analytics-card h4 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
}

.metric-change {
    font-size: 0.85rem;
    font-weight: 500;
}

.country-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.country-flag {
    font-size: 1.2rem;
    margin-right: 12px;
}

.country-name {
    flex: 1;
    font-weight: 500;
}

.country-visits {
    color: #666;
    margin-right: 12px;
}

.country-percentage {
    color: #158173;
    font-weight: 600;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background: #4caf50;
}

.notification.error {
    background: #e53935;
}

.notification.info {
    background: #3949ab;
}

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .earnings-container {
        padding: 16px;
    }
    
    .page-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .earnings-overview {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .action-btn {
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .period-selector {
        justify-content: center;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content.large {
        width: 95vw;
        margin: 10px;
    }
    
    .analytics-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

.visible {
    display: block;
}

/* Authentication Modal Styles */
.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: #158173;
    border-bottom-color: #158173;
    background: rgba(21, 129, 115, 0.05);
}

.auth-tab:hover {
    background: rgba(21, 129, 115, 0.1);
    color: #158173;
}

.auth-content {
    display: none;
}

.auth-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form {
    margin: 0;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #158173;
    box-shadow: 0 0 0 3px rgba(21, 129, 115, 0.1);
}

.form-control.error {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.form-control::placeholder {
    color: #999;
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    padding: 4px;
}

.password-toggle:hover {
    color: #158173;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.field-error {
    color: #e53935;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.btn-block {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
}

.btn-loader {
    display: none;
}

.auth-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

.auth-footer ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.auth-footer li {
    margin-bottom: 4px;
}

.forgot-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

/* Terms and Privacy Modal Styles */
.terms-content,
.privacy-content {
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.6;
}

.terms-content h4,
.privacy-content h4 {
    color: #158173;
    margin-bottom: 16px;
}

.terms-content h5,
.privacy-content h5 {
    color: #333;
    margin: 20px 0 8px 0;
    font-size: 16px;
}

.terms-content p,
.privacy-content p {
    margin-bottom: 12px;
    color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        max-width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auth-tab {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .form-control {
        padding: 10px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ===== USER LOGOUT BUTTON STYLES ===== */
.user-actions .logout-btn {
    background: #e53935 !important;
    border: 2px solid #e53935 !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-left: 10px;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 100px;
}

.user-actions .logout-btn:hover {
    background: #c62828 !important;
    border-color: #c62828 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.user-actions .logout-btn:active {
    transform: translateY(0);
}

.user-actions .logout-btn .logout-text {
    margin-left: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
    color: white;
}

.user-actions .logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.user-actions .logout-btn:hover::before {
    left: 100%;
}

/* User logout button responsive */
@media (max-width: 768px) {
    .user-actions .logout-btn .logout-text {
        display: none;
    }
    
    .user-actions .logout-btn {
        min-width: auto;
        padding: 8px 12px;
    }
}

/* ===== AUTHENTICATION REQUIRED MODAL STYLES ===== */
.auth-required-modal .modal-content {
    border-top: 4px solid #0d6b6e;
    max-width: 500px;
}

.auth-required-modal .modal-header {
    background: linear-gradient(135deg, #158173, #0d6b6e);
    color: white;
}

.auth-required-modal .modal-header h3 {
    margin: 0;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-required-modal .auth-required-content {
    text-align: center;
    padding: 20px 0;
}

.auth-required-modal .auth-icon {
    margin-bottom: 20px;
}

.auth-required-modal .auth-required-content h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.auth-required-modal .auth-required-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.auth-required-modal .auth-benefits {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
    border-left: 4px solid #158173;
}

.auth-required-modal .auth-benefits h5 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.auth-required-modal .auth-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-required-modal .auth-benefits li {
    padding: 5px 0;
    color: #555;
    font-size: 0.95em;
}

.auth-required-modal .btn-primary {
    background: #158173;
    border-color: #158173;
    font-weight: 500;
    padding: 12px 24px;
}

.auth-required-modal .btn-primary:hover {
    background: #0d6b6e;
    border-color: #0d6b6e;
}

/* ===== USER LOGOUT MODAL STYLES ===== */
.logout-modal .modal-content {
    border-top: 4px solid #e53935;
    max-width: 450px;
}

.logout-modal .modal-header {
    background: linear-gradient(135deg, #158173, #0d6b6e);
    color: white;
}

.logout-modal .modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.logout-modal .logout-confirmation {
    text-align: center;
    padding: 20px 0;
}

.logout-modal .logout-icon {
    margin-bottom: 20px;
}

.logout-modal .logout-confirmation p {
    margin-bottom: 15px;
    color: #333;
}

.logout-modal .logout-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
    border-left: 4px solid #158173;
}

.logout-modal .logout-details small {
    color: #666;
    line-height: 1.6;
}

.logout-modal .btn-danger {
    background: #e53935;
    border-color: #e53935;
    color: white;
    font-weight: 500;
}

.logout-modal .btn-danger:hover {
    background: #c62828;
    border-color: #c62828;
}

/* Login Required Screen */
.login-required-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-required-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.login-required-header {
    margin-bottom: 40px;
}

.login-icon {
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.login-required-header h2 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-required-header .subtitle {
    font-size: 1.2em;
    color: #7f8c8d;
    margin-bottom: 0;
}

.auth-benefits {
    margin: 40px 0;
    text-align: left;
}

.auth-benefits h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5em;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #158173;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 2em;
    margin-right: 15px;
    flex-shrink: 0;
}

.benefit-text h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.benefit-text p {
    color: #7f8c8d;
    margin: 0;
    font-size: 0.95em;
}

.login-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.demo-access {
    margin-top: 40px;
    padding: 25px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 12px;
    border: 2px dashed #ffc107;
}

.demo-access p {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.demo-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.btn-demo {
    background: #ffc107;
    color: #2c3e50;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.btn-demo:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-demo.admin {
    background: #e53935;
    color: white;
}

.btn-demo.admin:hover {
    background: #c62828;
}

.demo-access small {
    color: #7f8c8d;
    font-style: italic;
}

.security-notice {
    margin-top: 30px;
    padding: 15px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.security-notice p {
    color: #2c3e50;
    margin: 0;
    font-size: 0.95em;
}

/* Dashboard Choice Modal */
.dashboard-choice-modal .modal-content {
    max-width: 800px;
    border-top: 4px solid #158173;
}

.dashboard-choice {
    text-align: center;
}

.dashboard-choice p {
    font-size: 1.1em;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.dashboard-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.dashboard-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.dashboard-option:hover {
    border-color: #158173;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dashboard-option .option-icon {
    margin-bottom: 20px;
}

.dashboard-option h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.dashboard-option p {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 1em;
}

.dashboard-option ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.dashboard-option li {
    padding: 5px 0;
    color: #6c757d;
    font-size: 0.95em;
}

.dashboard-option li::before {
    content: '✓';
    color: #158173;
    font-weight: bold;
    margin-right: 8px;
}

.choice-note {
    margin-top: 25px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.choice-note small {
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design for Login Required Screen */
@media (max-width: 768px) {
    .login-required-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .login-required-header h2 {
        font-size: 2em;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .login-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        min-width: 100%;
        max-width: 300px;
    }
    
    .demo-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-demo {
        min-width: 200px;
    }
    
    .dashboard-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-required-header h2 {
        font-size: 1.8em;
    }
    
    .login-required-header .subtitle {
        font-size: 1.1em;
    }
    
    .benefit-item {
        flex-direction: column;
        text-align: center;
    }
    
    .benefit-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
