/* Mobile-First CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #256f8a;
    --primary-dark: #113745;
    --primary-light: #3ba0c9;
    --secondary: #f8f9fa;
    --accent: #ff9f43;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --dark: #343a40;
    --light: #f8f9fa;
    --gray: #6c757d;
    --mobile-font-size: 14px;
    --tablet-font-size: 15px;
    --desktop-font-size: 16px;
    --accent-dark: #e67e22;
    --success: #28a745;
    --success-light: rgba(40, 167, 69, 0.1);
    --danger-light: rgba(220, 53, 69, 0.1);
    --warning: #ffc107;
    --warning-light: rgba(255, 193, 7, 0.1);
    --gray-light: #adb5bd;
    --gray-extra-light: #e9ecef;
    --white: #ffffff;
    --black: #212529;
    
      /* Color Variables */
  --primary-blue: #256f8a;
  --primary-blue-light: #3498db;
  --secondary-green: #113745;
  --secondary-gold: #28a745;
  --secondary-red: #e74c3c;
  --background-light: #f8f9fa;
  --background-card: #ffffff;
  --border-color: #e0e0e0;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.15);
  
    
    /* Layout */
    --topbar-height: 70px;
    --topbar-height-mobile: 60px;
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --border-radius: 8px;
    --border-radius-sm: 4px;
    
    /* Typography */
    --font-xs: 12px;
    --font-sm: 13px;
    --font-base: 14px;
    --font-md: 15px;
    --font-lg: 16px;
    --font-xl: 18px;
    
    /* Transitions */
    --transition-fast: 200ms ease;
    --transition: 300ms ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-md: 0 6px 18px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
}

/* Base Mobile Styles */
body {
    background: linear-gradient(135deg, #0f2b3d, #1e4a6a);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    color: #333;
    overflow-x: hidden;
    font-size: var(--mobile-font-size);
}

/* Container */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 5px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    cursor: pointer;
    background-color: #f8f9fa;
    transition: all 0.3s;
    font-weight: 500;
    color: #6c757d;
    position: relative;
    font-size: 13px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab.active {
    background-color: white;
    font-weight: 600;
    color: #256f8a;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #256f8a, #3ba0c9);
    border-radius: 3px 3px 0 0;
}

/* Forms */
.form-container {
    padding: 15px 12px;
}

.form {
    display: none;
}

.form.active {
    display: block;
}

.form-control {
    margin-bottom: 15px;
    position: relative;
}

.form-control label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.form-control input {
    width: 100%;
    padding: 16px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: var(--dark);
    font-size: 16px; /* Prevents zoom on iOS */
    transition: all 0.3s ease;
    min-height: 44px;
}

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

.password-toggle {
    position: absolute;
    right: 15px;
    top: 42px;
    cursor: pointer;
    color: var(--primary);
    font-size: 14px;
    background: white;
    padding: 5px;
    border-radius: 4px;
}

/* Buttons */
.btn {
    background: linear-gradient(to right, #256f8a, #3ba0c9);
    border: none;
    border-radius: 8px;
    color: white;
    display: block;
    font-size: 16px;
    font-weight: 600;
    padding: 16px;
    margin-top: 20px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(37, 111, 138, 0.2);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    opacity: 0.92;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 111, 138, 0.25);
}

.btn:active {
    transform: translateY(0);
}

/* Dashboard */
.dashboard {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    overflow-y: auto;
}

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


 
.nav-item {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    white-space: nowrap;
    font-size: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-item.active {
    background: white;
    font-weight: 500;
    color: #2c5f7c;
}

.dashboard-content {
    padding: 12px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.dashboard-header {
    background: linear-gradient(135deg, #2c5f7c, #4a6491);
    color: white;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header {
    background: linear-gradient(to right, #2c5f7c, #3ba0c9);
    padding: 20px 15px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(30deg);
}

.header h2 {
    font-weight: 700;
    font-size: 20px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Content Sections */
.content-section {
    display: none;
    padding: 12px;
}

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

.content-title {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-size: 16px;
}

/* Account Info */
.account-info {
    background: #e8f4fc;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: none;
    font-size: 13px;
}

.account-info.active {
    display: block;
}

/* Quick Amounts */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.quick-amount {
    background: #3498db;
    color: white;
    padding: 12px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 13px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-amount:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Instructions */
.instructions {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 0 5px 5px 0;
    font-size: 13px;
}

.instructions ol {
    margin-left: 18px;
}

.instructions li {
    margin-bottom: 5px;
}

/* Profile Picture */
#profile-pic {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.profile-picture-section {
    margin: 12px 0;
    text-align: center;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-container img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.change-avatar-btn {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
}

.profile-container .avatar-container img {
    width: 50px;
    height: 50px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-info {
    flex: 1;
}

.verification-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-top: 4px;
}

/* Balance Section */
.balance-section {
    text-align: center;
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.pending-amount {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Withdrawal Calculation */
.withdrawal-calc {
    background: #e8f4fc;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 12px;
    font-size: 13px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #d1ecf1;
}

.calc-row:last-child {
    border-bottom: none;
}

/* Status Section */
.status-section {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 10px;
    margin-top: 12px;
    border-radius: 0 5px 5px 0;
    font-size: 13px;
}

.status-pending {
    color: #e74c3c;
    font-weight: bold;
}

/* Transaction History */
.transaction-history {
    margin-top: 15px;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 12px;
}

.transaction-table th,
.transaction-table td {
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.transaction-table th {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
    font-size: 11px;
}

.transaction-table tr:hover {
    background-color: #f5f5f5;
}

.status-approved {
    color: #27ae60;
    font-weight: bold;
}

.status-rejected {
    color: #e74c3c;
    font-weight: bold;
}

/* Mobile Grid */
.mobile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}


/* Footer */
.footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 11px;
    color: var(--gray);
    padding: 12px;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 4px;
    font-size: 11px;
}

.collect-btn, .delete-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    flex: 1;
    min-height: 36px;
}

.collect-btn {
    background: #27ae60;
    color: white;
}

.collect-btn:hover {
    background: #219653;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Animation keyframes */
@keyframes messageAppear {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Ensure all interactive elements are mobile-friendly */
button, .btn, .tab, .nav-item, .quick-amount {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

/* Mobile-optimized classes */
.mobile-optimized {
    font-size: 16px !important;
}

.mobile-optimized input,
.mobile-optimized select,
.mobile-optimized textarea {
    font-size: 16px !important;
}

/* Additional responsive utilities */
.responsive-text {
    font-size: clamp(14px, 4vw, 16px);
}

.responsive-padding {
    padding: clamp(8px, 3vw, 15px);
}

.responsive-margin {
    margin: clamp(6px, 2vw, 12px);
}

/* Enhanced Media Queries */

/* Small Mobile Devices (up to 360px) */
@media (max-width: 360px) {
    body {
        padding: 8px;
        font-size: 13px;
    }
    
    .login-box {
        border-radius: 8px;
    }
    
    .form-container {
        padding: 12px 8px;
    }
    
    .tab {
        padding: 12px 6px;
        font-size: 12px;
    }
    
    .dashboard-content {
        padding: 8px;
    }
    
    .content-section {
        padding: 8px;
    }
    
    .btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .header h2 {
        font-size: 18px;
    }
}

/* Mobile Devices (361px to 480px) */
@media (min-width: 361px) and (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 12px;
    }
    
    .login-box {
        max-width: 95%;
    }
    
    .header h2 {
        font-size: 20px;
    }
}

/* Tablets and Small Screens (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    body {
        font-size: var(--tablet-font-size);
    }
    
    .container {
        max-width: 90%;
        padding: 15px;
    }
    
    .login-box {
        max-width: 400px;
    }
    
    .dashboard-content {
        padding: 15px;
    }
    
    .mobile-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header h2 {
        font-size: 22px;
    }
    
    .transaction-table {
        font-size: 13px;
    }
    
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    h5 { font-size: 14px; }
    h6 { font-size: 13px; }
}

/* Desktop and Larger Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        font-size: var(--tablet-font-size);
    }
    
    .container {
        max-width: 85%;
    }
    
    .login-box {
        max-width: 450px;
    }
    
    .tablet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Large Desktops (1025px and above) */
@media (min-width: 1025px) {
    body {
        font-size: var(--desktop-font-size);
    }
    
    .container {
        max-width: 1200px;
    }
    
    .login-box {
        max-width: 450px;
    }
    
    .desktop-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Orientation-specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .login-container {
        min-height: auto;
        padding: 5px;
    }
    
    .login-box {
        max-width: 90%;
    }
    
    .form-container {
        padding: 12px;
    }
    
    .dashboard-content {
        max-height: calc(100vh - 100px);
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-box {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn, .tab, .nav-item, .quick-amount {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    input, select, textarea {
        font-size: 16px !important;
    }
    
    .chat-input {
        min-height: 44px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .login-box {
        background: rgba(45, 45, 45, 0.95);
        color: #ffffff;
    }
    
    .form-control input {
        background: #333;
        color: #fff;
        border-color: #555;
    }
}

/* History Actions - Mobile Optimized */
.history-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.history-actions .collect-btn,
.history-actions .delete-btn {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 40px;
    flex: 1;
    min-width: 120px;
}

/* Profit Summary - Mobile Optimized */
.profit-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.profit-card {
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.profit-card h4 {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 13px;
}

.profit-amount {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
}

.profit-amount.current {
    color: #3498db;
}

.profit-amount.collected {
    color: #27ae60;
}

.profit-amount.total {
    color: #9b59b6;
}

/* Percentage Breakdown - Mobile Optimized */
.percentage-breakdown {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.percentage-bar {
    background: #ecf0f1;
    height: 16px;
    border-radius: 8px;
    overflow: hidden;
    margin: 8px 0;
}

.percentage-fill {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    height: 100%;
    transition: width 0.3s ease;
}

.percentage-text {
    text-align: center;
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

/* Individual Breakdown - Mobile Optimized */
.individual-breakdown {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.investment-breakdown {
    padding: 8px;
    border-bottom: 1px solid #ecf0f1;
}

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

.breakdown-details {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
    gap: 8px;
}

.percentage.positive {
    color: #27ae60;
    font-weight: bold;
}

.percentage.negative {
    color: #e74c3c;
    font-weight: bold;
}

.collected-profits {
    display: flex;
    justify-content: space-between;
    color: #27ae60;
    font-weight: 500;
    margin-top: 4px;
    font-size: 13px;
}

.history-collected {
    display: flex;
    justify-content: space-between;
    color: #27ae60;
    font-weight: 500;
    font-size: 13px;
}

.history-profit-percentage {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
    font-size: 13px;
}

/* Mineral Investment Styles - Mobile Optimized */
.mineral-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.mineral-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e0e0e0;
}

.mineral-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.mineral-icon {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 12px;
}

.mineral-card h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.mineral-price {
    font-size: 1rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 8px;
    background: rgba(39, 174, 96, 0.1);
    padding: 6px;
    border-radius: 6px;
}

.mineral-card p {
    color: #7f8c8d;
    margin-bottom: 12px;
    font-size: 14px;
}

.mineral-certified {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.invest-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
    min-height: 44px;
}

.invest-btn:hover {
    background: #2980b9;
}

.invest-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Calculator - Mobile Optimized */
.calculator {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.calc-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    min-height: 44px;
}

.calc-result {
    background: #2c3e50;
    color: white;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 1.1rem;
    text-align: center;
}

/* Modal Styles - Mobile Optimized */
.investment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.modal-content {
    background: white;
    width: 95%;
    max-width: 500px;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Support Hint Float - Mobile Optimized */
.support-hint-float {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #90caf9;
    border-radius: 12px;
    padding: 20px 20px 20px 70px;
    margin: 12px 0;
    position: relative;
    box-shadow: 0 6px 15px rgba(33, 150, 243, 0.2);
    animation: float 4s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.support-hint-float:hover {
    animation: floatHover 1s ease-in-out infinite;
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.3);
}

@keyframes floatHover {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0px); }
}

.support-hint-float .icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #2196f3;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    animation: iconRotate 5s linear infinite;
}

@keyframes iconRotate {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.support-hint-float .title {
    font-weight: 700;
    color: #0d47a1;
    margin-bottom: 6px;
    font-size: 16px;
}

.support-hint-float .message {
    color: #1565c0;
    font-size: 14px;
    line-height: 1.4;
}

/* Support Options - Mobile Optimized */
.support-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

.support-option {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid #e9ecef;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.support-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #3ba0c9;
}

.support-icon {
    font-size: 24px;
    color: #3ba0c9;
    margin-bottom: 10px;
}

.support-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #256f8a;
    font-size: 15px;
}

.support-desc {
    font-size: 13px;
    color: #6c757d;
}

/* Animated Certification Badge - Mobile Optimized */
.certification-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0077cc 0%, #005999 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.3);
    position: relative;
    overflow: hidden;
    animation: pulse 2s infinite;
    margin: 15px 0;
    font-size: 14px;
}

.certification-badge i {
    font-size: 1.2rem;
    color: #ffd700;
    animation: rotate 3s infinite linear;
}

.certification-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.6s;
}

.certification-badge:hover::before {
    left: 100%;
}

.certification-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 119, 204, 0.4);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(8deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-8deg); }
    100% { transform: rotate(0deg); }
}

/* Footer - Mobile Optimized */
.footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 12px;
    color: var(--gray);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 4px;
    font-size: 12px;
}

.admin-password-section {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 6px;
    border-left: 4px solid var(--danger);
    font-size: 13px;
}

/* Animated Background - Mobile Optimized */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #256f8a, #1a556b, #f8f9fa, #256f8a);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Error Message - Mobile Optimized */
.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.error-message i {
    margin-right: 4px;
}

/* Email Preview - Mobile Optimized */
.email-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    max-height: 250px;
    overflow-y: auto;
    transition: all 0.3s;
}

.email-preview h4 {
    margin-top: 0;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.email-content {
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
    margin-top: 12px;
}

.email-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 10px;
    margin-top: 12px;
    font-size: 13px;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.email-note i {
    color: #f39c12;
    margin-top: 2px;
}

/* Header Container - Mobile Optimized */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.header-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 15px;
}

.header-title {
    font-size: 1.2rem;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-search {
    position: relative;
}

.header-search input {
    padding: 10px 15px 10px 35px;
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 150px;
    transition: width 0.3s;
    font-size: 14px;
}

.header-search input:focus {
    width: 180px;
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.header-notifications {
    position: relative;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-user {
    display: flex;
    align-items: center;
    cursor: pointer;
    min-height: 44px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-weight: bold;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Navigation Bar - Mobile Optimized */
.nav-bar {
    background-color: white;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #eaeaea;
    overflow-x: auto;
}

.nav-container {
    display: flex;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    min-width: max-content;
}

.nav-items {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.nav-item {
    position: relative;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    color: #555;
    white-space: nowrap;
    min-height: 44px;
}

.nav-item:hover {
    background-color: rgba(52, 152, 219, 0.05);
    color: #3498db;
}

.nav-item.active {
    background-color: rgba(52, 152, 219, 0.1);
    border-bottom: 3px solid #3498db;
    color: #3498db;
}

.nav-icon {
    font-size: 1rem;
    margin-right: 8px;
}

.nav-text {
    font-weight: 500;
    font-size: 14px;
}

.nav-badge {
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}

/* Main Content Area - Mobile Optimized */
.dashboard-content {
    max-width: 100%;
    margin: 20px auto;
    padding: 0 15px;
}

.content-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
}

.content-title h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

.content-title p {
    color: #7f8c8d;
    font-size: 14px;
}

.content-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.content-actions button {
    margin: 0;
    flex: 1;
    min-width: 120px;
}

.content-section {
    display: none;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
}

.card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
}

.card h3 {
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 16px;
}

.card p {
    color: #7f8c8d;
    line-height: 1.5;
    font-size: 14px;
}

/* Stats Container - Mobile Optimized */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
    margin: 8px 0;
}

.stat-label {
    color: #7f8c8d;
    font-size: 13px;
}

/* Dashboard Tabs - Mobile Optimized */
.dashboard-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
}

.dashboard-tab {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    color: var(--gray);
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.dashboard-tab.active {
    border-bottom: 3px solid var(--primary);
    color: var(--primary);
    background: white;
}

.tab-content {
    padding: 20px;
    display: none;
}

.tab-content.active {
    display: block;
}

/* Content Grid - Mobile Optimized */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.main-content, .side-content {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 15px;
}

.content-title {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #2c5f7c;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.activity-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e8f4fd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c5f7c;
    font-size: 14px;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 14px;
}

.activity-time {
    font-size: 11px;
    color: #888;
}

/* Welcome Section - Mobile Optimized */
.welcome-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-section h1 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.5rem;
}

/* Stats Grid - Mobile Optimized */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    margin-bottom: 8px;
    color: var(--gray);
    font-size: 14px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 8px 0;
}

/* Enhanced Media Queries for Larger Screens */

/* Tablets and Small Screens (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .profit-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mineral-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .support-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-header {
        flex-direction: row;
        align-items: center;
    }
    
    .header-search input {
        width: 180px;
    }
    
    .header-search input:focus {
        width: 220px;
    }
}

/* Desktop and Larger Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .profit-summary {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mineral-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .header-search input {
        width: 200px;
    }
    
    .header-search input:focus {
        width: 250px;
    }
}

/* Large Desktops (1025px and above) */
@media (min-width: 1025px) {
    .profit-summary {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mineral-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .header-search input {
        width: 200px;
    }
    
    .header-search input:focus {
        width: 250px;
    }
}

/* Orientation-specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .chat-container {
        height: 300px;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .mineral-card:hover {
        transform: none;
    }
    
    .support-option:hover {
        transform: none;
    }
    
    .certification-badge:hover {
        transform: none;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .support-hint-float,
    .certification-badge,
    .typing-dots span {
        animation: none;
    }
    
    .percentage-fill,
    .progress {
        transition: none;
    }
}


/* Animated Logo - Mobile Optimized */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: bold;
}

.logo i {
    font-size: 1.5rem;
    animation: logoSpin 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes logoSpin {
    0% {
        transform: rotateY(0deg) scale(1);
        text-shadow: 0 0 10px rgba(255,215,0,0.5);
    }
    50% {
        transform: rotateY(180deg) scale(1.05);
        text-shadow: 0 0 15px rgba(255,215,0,0.8);
    }
    100% {
        transform: rotateY(360deg) scale(1);
        text-shadow: 0 0 10px rgba(255,215,0,0.5);
    }
}

.logo span {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.2rem;
}

/* Referral Section - Mobile Optimized */
.referral-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.referral-code {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin: 12px 0;
}

.code {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 2px;
    margin: 12px 0;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 2px dashed var(--primary);
    word-break: break-all;
}

/* Change Password Section - Mobile Optimized */
.change-password-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
}

.change-password-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-size: 20px;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.password-input-container {
    position: relative;
}

.password-input {
    width: 100%;
    padding: 14px 45px 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-height: 44px;
}

.password-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 16px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
}

.toggle-password:hover {
    color: #34495e;
}

.password-strength {
    margin-top: 6px;
    height: 4px;
    border-radius: 2px;
    background: #ecf0f1;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak {
    background: #e74c3c;
    width: 25%;
}

.strength-medium {
    background: #f39c12;
    width: 50%;
}

.strength-strong {
    background: #27ae60;
    width: 75%;
}

.strength-very-strong {
    background: #2ecc71;
    width: 100%;
}

.password-requirements {
    margin-top: 4px;
    font-size: 11px;
    color: #7f8c8d;
}

.requirement {
    display: flex;
    align-items: center;
    margin: 2px 0;
    font-size: 11px;
}

.requirement.met {
    color: #27ae60;
}

.requirement.unmet {
    color: #e74c3c;
}

.requirement-icon {
    margin-right: 4px;
    font-size: 12px;
}

.btn-change-password {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 8px;
    min-height: 44px;
    width: 100%;
}

.btn-change-password:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-change-password:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.password-feedback {
    padding: 10px;
    border-radius: 6px;
    margin: 12px 0;
    text-align: center;
    font-weight: 500;
    display: none;
    font-size: 14px;
}

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

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

.security-tips {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #3498db;
}

.security-tips h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.security-tips ul {
    margin: 0;
    padding-left: 18px;
    color: #5d6d7e;
}

.security-tips li {
    margin: 4px 0;
    font-size: 12px;
}

/* Logout Button - Mobile Optimized */
.logout-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    min-height: 44px;
    font-size: 14px;
}

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

/* Enhanced Media Queries */

/* Tablets and Small Screens (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .user-management {
        padding: 20px;
    }
    
    .management-header {
        flex-direction: row;
        align-items: center;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .operations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .investment-summary {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    .user-stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .code {
        font-size: 1.6rem;
    }
}

/* Desktop and Larger Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .user-management {
        max-width: 95%;
        padding: 25px;
    }
    
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .operations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .users-table table {
        min-width: auto;
    }
    
    .user-table {
        display: table;
    }
    
    .admin-investment-table {
        display: table;
    }
}

/* Large Desktops (1025px and above) */
@media (min-width: 1025px) {
    .user-management {
        max-width: 1200px;
        padding: 30px;
    }
    
    .info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .operations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .users-table table {
        min-width: auto;
    }
    
    .user-table {
        display: table;
    }
    
    .admin-investment-table {
        display: table;
    }
    
    .change-password-section {
        max-width: 500px;
    }
}

/* Orientation-specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 85vh;
    }
    
    .admin-chat-messages {
        height: 300px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .operation-item:hover {
        transform: none;
    }
    
    .operation-section:hover {
        transform: none;
    }
    
    .btn-change-password:hover:not(:disabled) {
        transform: none;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .logo i {
        animation: none;
    }
    
    .operation-item,
    .operation-section,
    .progress-bar-fill {
        transition: none;
    }
    
    @keyframes modalSlideIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes slideDown {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Additional Mobile Optimizations */
.user-actions button,
.btn-admin-action,
.btn-change-password,
.logout-btn,
.copy-referral-btn,
.share-referral-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.password-input,
.search-box input,
.chat-input {
    font-size: 16px !important;
}

/* Ensure tables are scrollable on mobile */
.users-table,
.user-table,
.admin-investment-table {
    -webkit-overflow-scrolling: touch;
}

/* Improve modal accessibility on mobile */
.modal {
    padding: 5px;
}

.modal-content {
    width: 95%;
}

/* Optimize referral section for mobile */
.referral-item {
    flex-direction: column;
    text-align: center;
    gap: 10px;
}

.referral-earnings {
    text-align: center;
}

/* Chat container mobile optimization */
.admin-chat-container {
    height: 500px;
}

.admin-chat-messages {
    height: 300px;
}

/* Modal Styles */
.investment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    font-size: 1.8rem;
    cursor: pointer;
    color: #7f8c8d;
}

        /* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Enhanced Referral Section Styles - Mobile Optimized */
.referral-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 13px;
}

.referral-code-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.code-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #3498db;
    flex-direction: column;
    text-align: center;
}

.code-display span {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #2c3e50;
    flex: 1;
    word-break: break-all;
}

.btn-copy {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s;
    min-height: 44px;
    width: 100%;
    justify-content: center;
}

.btn-copy:hover {
    background: #2980b9;
}

.referral-description {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 14px;
}

.referral-link-container {
    margin-bottom: 15px;
}

.referral-link-container label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.referral-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    flex-direction: column;
    text-align: center;
}

.referral-link span {
    flex: 1;
    font-size: 13px;
    color: #555;
    word-break: break-all;
}

.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-direction: column;
}

.share-btn {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s;
    min-height: 44px;
    font-size: 14px;
}

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

.share-btn.email {
    background: #3498db;
    color: white;
}

.share-btn.sms {
    background: #9b59b6;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Referral Tiers - Mobile Optimized */
.referral-tiers {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tiers-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
}

.tier-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.tier-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.tier-header {
    margin-bottom: 12px;
}

.tier-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.tier-badge.bronze {
    background: #cd7f32;
    color: white;
}

.tier-badge.silver {
    background: #c0c0c0;
    color: white;
}

.tier-badge.gold {
    background: #ffd700;
    color: #333;
}

.tier-reward {
    margin: 12px 0;
}

.reward-label {
    color: #7f8c8d;
    font-size: 13px;
}

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

.tier-benefits li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 13px;
}

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

/* Referral List Section - Mobile Optimized */
.referral-list-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.list-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.list-controls select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-height: 44px;
    flex: 1;
}

.btn-refresh {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-size: 14px;
}

.referrals-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.referrals-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 600px;
}

.referrals-table th {
    background: #34495e;
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.referrals-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 13px;
}

.referrals-table tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

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

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.no-data-message {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
}

.no-data-message i {
    font-size: 36px;
    margin-bottom: 12px;
    color: #bdc3c7;
}

/* Earnings Summary - Mobile Optimized */
.earnings-summary {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border-left: 4px solid #3498db;
}

.earnings-summary h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
}

.btn-withdraw-earnings {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
    margin-top: 12px;
    min-height: 44px;
    width: 100%;
    font-size: 14px;
}

.btn-withdraw-earnings:hover {
    background: #219653;
}

/* Enhanced Referral Earnings Styles - Mobile Optimized */
.referral-earnings-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 15px;
}

.earnings-stats {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.earnings-breakdown {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.earnings-stat-card {
    text-align: center;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: #f8f9fa;
}

.earnings-stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.earnings-stat-label {
    color: #7f8c8d;
    font-size: 13px;
}

.commission-rates {
    background: #e8f4fc;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    border-left: 4px solid #3498db;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #d1ecf1;
    font-size: 13px;
}

.rate-item:last-child {
    border-bottom: none;
}

.rate-range {
    font-weight: 500;
    color: #2c3e50;
}

.rate-percentage {
    font-weight: bold;
    color: #27ae60;
}

.earnings-actions {
    margin-top: 15px;
    text-align: center;
}

.btn-collect-earnings {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
}

.btn-collect-earnings:hover:not(:disabled) {
    background: #219653;
}

.btn-collect-earnings:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Earnings History - Mobile Optimized */
.earnings-history {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.earnings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    overflow-x: auto;
    display: block;
}

.earnings-table th {
    background: #34495e;
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.earnings-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 13px;
}

.earnings-table tr:hover {
    background-color: #f8f9fa;
}

.earning-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

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

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

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

.status-collected {
    background: #d1ecf1;
    color: #0c5460;
}

/* Admin Earnings Approval - Mobile Optimized */
.admin-earnings-approval {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.earning-approval-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
    border-left: 4px solid #3498db;
}

.earning-approval-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.earning-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.earning-amount {
    font-size: 16px;
    font-weight: bold;
    color: #27ae60;
}

.earning-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 8px 0;
    font-size: 13px;
    color: #7f8c8d;
}

.earning-actions-admin {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-direction: column;
}

.btn-approve {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    flex: 1;
    min-height: 44px;
    font-size: 14px;
}

.btn-reject {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    flex: 1;
    min-height: 44px;
    font-size: 14px;
}

.btn-approve:hover {
    background: #219653;
}

.btn-reject:hover {
    background: #c0392b;
}

.no-earnings {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
}

.no-earnings i {
    font-size: 36px;
    margin-bottom: 12px;
    color: #bdc3c7;
}

/* Earnings Notification - Mobile Optimized */
.earnings-notification {
    position: fixed;
    top: 15px;
    right: 15px;
    padding: 12px 15px;
    background: #27ae60;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 2000;
    max-width: calc(100% - 30px);
}

.earnings-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.earnings-notification.error {
    background: #e74c3c;
}

/* Enhanced Quick Amount Button Styles - Mobile Optimized */
.quick-amount, .amount-suggestion {
    position: relative;
    padding: 12px 14px;
    background: linear-gradient(135deg, #256f8a 0%, #113745 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    user-select: none;
    overflow: hidden;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.quick-amount:hover, .amount-suggestion:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.quick-amount:active, .amount-suggestion:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

.quick-amount.active, 
.quick-amount.selected,
.amount-suggestion.active,
.amount-suggestion.selected {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-color: #3498db;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.quick-amount.highlighted,
.amount-suggestion.highlighted {
    animation: pulse-highlight 1s ease;
}

.quick-amount.animating,
.amount-suggestion.animating {
    animation: button-press 0.3s ease;
}

.amount-display {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.amount-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    margin-top: 4px;
}

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0;
}

.amount-suggestions {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

/* Focus styles for accessibility */
.quick-amount:focus-visible, 
.amount-suggestion:focus-visible {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* Animation keyframes */
@keyframes pulse-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

@keyframes button-press {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced Media Queries */

/* Tablets and Small Screens (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .referral-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tiers-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-buttons {
        flex-direction: row;
    }
    
    .code-display {
        flex-direction: row;
        text-align: left;
    }
    
    .referral-link {
        flex-direction: row;
        text-align: left;
    }
    
    .earning-approval-header {
        flex-direction: row;
        align-items: center;
    }
    
    .earning-details {
        grid-template-columns: 1fr 1fr;
    }
    
    .earning-actions-admin {
        flex-direction: row;
    }
    
    .section-header {
        flex-direction: row;
        align-items: center;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-amounts {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop and Larger Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .referral-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tiers-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .referral-earnings-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .quick-amounts {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .share-buttons {
        flex-direction: row;
    }
}

/* Large Desktops (1025px and above) */
@media (min-width: 1025px) {
    .referral-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .tiers-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .referral-earnings-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .quick-amounts {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .share-buttons {
        flex-direction: row;
    }
    
    .code-display {
        flex-direction: row;
        text-align: left;
    }
    
    .referral-link {
        flex-direction: row;
        text-align: left;
    }
}

/* Orientation-specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .earnings-notification {
        top: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        margin: 2% auto;
        max-height: 96vh;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .quick-amount:hover, .amount-suggestion:hover {
        transform: none;
        box-shadow: none;
    }
    
    .quick-amount:active, .amount-suggestion:active {
        background: #3498db;
        color: white;
        transform: scale(0.98);
    }
    
    .tier-card:hover {
        transform: none;
    }
    
    .share-btn:hover {
        transform: none;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .quick-amount, .amount-suggestion,
    .tier-card, .share-btn,
    .earnings-notification {
        transition: none;
    }
    
    .quick-amount.highlighted,
    .amount-suggestion.highlighted,
    .quick-amount.animating,
    .amount-suggestion.animating {
        animation: none;
    }
}

/* Additional Mobile Optimizations */
.btn-copy,
.btn-refresh,
.btn-withdraw-earnings,
.btn-collect-earnings,
.btn-approve,
.btn-reject,
.share-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Ensure tables are scrollable on mobile */
.referrals-table-container,
.earnings-table {
    -webkit-overflow-scrolling: touch;
}

/* Improve notification visibility on mobile */
.earnings-notification {
    font-size: 14px;
    padding: 10px 12px;
}

/* Optimize modal for mobile */
.modal-content {
    width: 95%;
    margin: 10px auto;
    padding: 15px;
}

/* Improve form elements for mobile */
.list-controls select,
.earning-actions-admin button {
    min-height: 44px;
}

/* Ensure proper spacing on mobile */
.referral-section,
.referral-code-section,
.referral-tiers,
.referral-list-section {
    margin-bottom: 15px;
}

/* Optimize text readability on mobile */
.stat-value,
.earning-amount,
.summary-value {
    font-size: 18px;
}

.code-display span {
    font-size: 18px;
}

/* Animation Keyframes - Mobile Optimized */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling for Modal - Mobile Optimized */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }
    
    .user-info p {
        flex-direction: column;
        gap: 4px;
    }
    
    .user-info strong {
        min-width: auto;
        margin-bottom: 2px;
    }
    
    .operation-section h5 {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .operation-section h5::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 2% auto;
        padding: 12px;
    }
    
    .user-info,
    .operation-section {
        padding: 12px;
    }
    
    .edit-form {
        padding: 12px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 10px;
        font-size: 16px;
    }
}

/* Additional Utility Classes - Mobile Optimized */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.info-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.operations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-admin {
    background: #ffeaa7;
    color: #e17055;
}

.badge-user {
    background: #74b9ff;
    color: #2d3436;
}

/* Admin Investment Section - Mobile Optimized */
.admin-investment-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #3498db;
}

.investment-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.summary-value {
    font-size: 18px;
    font-weight: bold;
    margin: 4px 0;
}

.summary-label {
    font-size: 11px;
    opacity: 0.9;
}

.admin-investment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow-x: auto;
    display: block;
}

.admin-investment-table th {
    background: #34495e;
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.admin-investment-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 13px;
}

.admin-investment-table tr:hover {
    background: #f8f9fa;
}

.investment-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

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

.progress-cell {
    min-width: 100px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #27ae60;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 10px;
    color: #7f8c8d;
    margin-top: 3px;
    text-align: center;
}

.btn-admin-action {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    margin: 2px;
    transition: all 0.3s ease;
    min-height: 32px;
    white-space: nowrap;
}

.btn-complete {
    background: #3498db;
    color: white;
}

.btn-complete:hover {
    background: #2980b9;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
}

.btn-cancel:hover {
    background: #c0392b;
}

.no-investments-admin {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 15px 0;
}

.investment-actions-admin {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.quick-stat {
    background: white;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    border-left: 3px solid #3498db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quick-stat-value {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
}

.quick-stat-label {
    font-size: 9px;
    color: #7f8c8d;
    text-transform: uppercase;
}

/* Enhanced About Us Section Styles - Mobile Optimized */
.about-header {
    text-align: center;
    margin-bottom: 25px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--primary);
    margin-top: 8px;
    font-weight: 300;
}

/* Enhanced Tabs - Mobile Optimized */
.about-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
    gap: 5px;
}

.about-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
    transition: all 0.3s ease;
    position: relative;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.about-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.about-tab:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.about-tab-content {
    position: relative;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.tab-pane.active {
    display: block;
}

/* Enhanced Hero Section - Mobile Optimized */
 .floating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
    font-size: 12px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.animated-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

/* Enhanced Cards with Hover Effects - Mobile Optimized */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.hover-3d {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.hover-3d:hover {
    transform: translateY(-3px) rotateX(3deg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.03);
}

/* Enhanced Icons - Mobile Optimized */
.pulse {
    animation: pulse 2s infinite;
}

.rotate {
    transition: transform 0.3s ease;
}

.rotate:hover {
    transform: rotate(10deg);
}

.glow {
    position: relative;
}

.glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(52,152,219,0.2) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow:hover::before {
    opacity: 1;
}

.bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

/* Enhanced Stats with Counter Animation - Mobile Optimized */
.counter-animation .stat-number {
    font-size: 2rem;
    font-weight: bold;
}

/* Enhanced Section Dividers - Mobile Optimized */
.section-divider {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.section-divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    border-radius: 2px;
}

/* Enhanced Minerals Carousel - Mobile Optimized */
.minerals-carousel {
    position: relative;
    margin: 25px 0;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.mineral-slide {
    min-width: 100%;
    padding: 15px;
}

.mineral-item.featured {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    position: relative;
}

.mineral-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.mineral-badge.premium {
    background: #ffd700;
    color: #333;
}

.mineral-badge.classic {
    background: #c0c0c0;
    color: #333;
}

.mineral-badge.exclusive {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.mineral-badge.industrial {
    background: #e67e22;
    color: white;
}

.mineral-specs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.spec {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary);
    transition: all 0.3s ease;
    z-index: 10;
    min-height: 44px;
    min-width: 44px;
}

.carousel-nav:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 10px;
    min-width: 10px;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* Enhanced Commitment Section - Mobile Optimized */
.commitment-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
}

.highlight-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #2c3e50;
    font-weight: 500;
}

.commitment-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.commitment-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.commitment-item:hover {
    transform: translateX(5px);
}

.commitment-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.commitment-text {
    flex: 1;
}

.commitment-text h4 {
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 16px;
}

.slide-in {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideIn 0.6s ease forwards;
}

.slide-in:nth-child(1) { animation-delay: 0.1s; }
.slide-in:nth-child(2) { animation-delay: 0.2s; }
.slide-in:nth-child(3) { animation-delay: 0.3s; }
.slide-in:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Contact Section - Mobile Optimized */
.contact-hero {
    text-align: center;
    margin-bottom: 25px;
}

.contact-message {
    max-width: 100%;
    margin: 0 auto;
    font-size: 1rem;
    color: #5d6d7e;
}

.contact-details {
    flex: 1;
}

.contact-action {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background 0.3s ease;
    min-height: 44px;
    width: 100%;
}

.contact-action:hover {
    background: var(--primary-dark);
}

.response-time {
    margin-top: 25px;
    text-align: center;
}

.response-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    flex-direction: column;
    text-align: center;
}

.response-card i {
    font-size: 20px;
    color: var(--primary);
}

.response-info h5 {
    margin: 0 0 4px 0;
    color: #2c3e50;
    font-size: 16px;
}

.response-info p {
    margin: 0;
    color: var(--gray);
    font-size: 13px;
}

/* FAQ Section Styles - Mobile Optimized */
.faq-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-header {
    text-align: center;
    margin-bottom: 20px;
    color: #256f8a;
}

.faq-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.faq-header p {
    color: #666;
    font-size: 1rem;
}

.faq-search {
    max-width: 100%;
    margin: 0 auto 20px;
    position: relative;
}

.faq-search input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s;
    min-height: 44px;
}

.faq-search input:focus {
    border-color: #256f8a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 111, 138, 0.1);
}

.faq-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.faq-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.faq-category {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 14px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.faq-category.active,
.faq-category:hover {
    background: #256f8a;
    color: white;
    border-color: #256f8a;
}

.faq-container {
    max-width: 100%;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
    transition: background 0.3s;
    min-height: 44px;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question i {
    transition: transform 0.3s;
    font-size: 14px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.faq-item.active .faq-answer {
    padding: 15px;
    max-height: 1000px;
}

.faq-answer p {
    margin-bottom: 12px;
    line-height: 1.5;
    color: #555;
    font-size: 14px;
}

.faq-answer ul, .faq-answer ol {
    margin-left: 18px;
    margin-bottom: 12px;
}

.faq-answer li {
    margin-bottom: 6px;
    line-height: 1.4;
    font-size: 14px;
}

.faq-contact {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: #e8f4fc;
    border-radius: 8px;
    border-left: 4px solid #256f8a;
}

.faq-contact h3 {
    color: #256f8a;
    margin-bottom: 12px;
    font-size: 18px;
}

.contact-methods {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    flex-direction: column;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 44px;
    justify-content: center;
}

.contact-method i {
    color: #256f8a;
    font-size: 1rem;
}

/* Dashboard Content - Mobile Optimized */
.dashboard-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Password Change Modal Styles - Mobile Optimized */
.password-form {
    max-width: 100%;
}

.password-input-container {
    position: relative;
}

.password-input {
    width: 100%;
    padding: 14px 45px 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-height: 44px;
}

.password-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 16px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
}

.toggle-password:hover {
    color: #34495e;
}

.password-strength {
    margin-top: 6px;
    height: 4px;
    border-radius: 2px;
    background: #ecf0f1;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak {
    background: #e74c3c;
    width: 25%;
}

.strength-medium {
    background: #f39c12;
    width: 50%;
}

.strength-strong {
    background: #27ae60;
    width: 75%;
}

.strength-very-strong {
    background: #2ecc71;
    width: 100%;
}

.password-requirements {
    margin-top: 4px;
    font-size: 11px;
    color: #7f8c8d;
}

.requirement {
    display: flex;
    align-items: center;
    margin: 2px 0;
    font-size: 11px;
}

.requirement.met {
    color: #27ae60;
}

.requirement.unmet {
    color: #e74c3c;
}

.requirement-icon {
    margin-right: 4px;
    font-size: 12px;
}

.btn-change-password {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 8px;
    width: 100%;
    min-height: 44px;
}

.btn-change-password:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-change-password:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.password-feedback {
    padding: 10px;
    border-radius: 6px;
    margin: 12px 0;
    text-align: center;
    font-weight: 500;
    display: none;
    font-size: 14px;
}

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

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

.security-tips {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #3498db;
}

.security-tips h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.security-tips ul {
    margin: 0;
    padding-left: 18px;
    color: #5d6d7e;
}

.security-tips li {
    margin: 4px 0;
    font-size: 12px;
}

/* Animation for password change */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    animation: slideIn 0.3s ease;
}

.contact-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.contact-section h2 {
    color: #2d5a2d;
    margin-bottom: 15px;
    font-size: 20px;
}

/* Enhanced Media Queries for Larger Screens */

/* Tablets and Small Screens (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .operations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .investment-summary {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    .about-tabs {
        flex-direction: row;
    }
    
    .about-tab {
        width: auto;
    }
    
    .commitment-item {
        flex-direction: row;
        text-align: left;
    }
    
    .response-card {
        flex-direction: row;
        text-align: left;
    }
    
    .contact-methods {
        flex-direction: row;
    }
    
    .faq-categories {
        flex-direction: row;
    }
    
    .faq-category {
        width: auto;
    }
}

/* Desktop and Larger Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .operations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-investment-table {
        display: table;
    }
    
    .modal-content {
        width: 90%;
        margin: 2% auto;
    }
}

/* Large Desktops (1025px and above) */
@media (min-width: 1025px) {
    .info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .operations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .admin-investment-table {
        display: table;
    }
    
    .modal-content {
        width: 85%;
        max-width: 700px;
    }
    
    .about-tabs {
        gap: 10px;
    }
    
    .about-tab {
        padding: 15px 25px;
    }
}

/* Orientation-specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 85vh;
        margin: 1% auto;
    }
    
    .faq-answer {
        max-height: 200px;
        overflow-y: auto;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover,
    .hover-3d:hover,
    .hover-grow:hover,
    .commitment-item:hover {
        transform: none;
    }
    
    .carousel-nav:hover {
        transform: translateY(-50%);
    }
    
    .about-tab:hover {
        transform: none;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .floating-badge,
    .pulse,
    .bounce,
    .slide-in,
    .fade-in,
    .rotate,
    .faq-question i,
    .strength-bar,
    .progress-bar-fill {
        animation: none;
        transition: none;
    }
    
    .modal-content {
        animation: none;
    }
}

/* Additional Mobile Optimizations */
.btn-admin-action,
.btn-complete,
.btn-cancel,
.btn-change-password,
.contact-action,
.faq-category,
.carousel-nav,
.toggle-password {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.password-input,
.faq-search input,
.form-group input,
.form-group select {
    font-size: 16px !important;
}

/* Ensure tables are scrollable on mobile */
.admin-investment-table {
    -webkit-overflow-scrolling: touch;
}

/* Improve modal accessibility on mobile */
.modal {
    padding: 5px;
}

/* Optimize carousel for mobile */
.carousel-container {
    touch-action: pan-y pinch-zoom;
}

/* Ensure proper spacing on mobile */
.about-header,
.contact-section {
    margin-bottom: 15px;
}

/* Optimize text readability on mobile */
.section-subtitle,
.highlight-text,
.contact-message {
    font-size: 14px;
}

/* Improve button visibility on mobile */
.btn-change-password,
.contact-action {
    font-weight: 600;
}

/* Landing Section Styles - Mobile Optimized */
.landing-section {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f2b3d, #1e4a6a);
    z-index: 9999;
    overflow-y: auto;
    animation: fadeIn 0.8s ease;
    padding: 10px;
}

.landing-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 15px;
    color: white;
    text-align: center;
}

.landing-header {
    margin-bottom: 30px;
}

.landing-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 2rem;
}

.landing-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    line-height: 1.2;
}

.landing-subtitle {
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.9;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

/* Mobile-first CSS for landing-features */
.landing-cta {
    margin: 30px 0;
}

.cta-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    flex-direction: column;
    align-items: center;
}

.btn-landing {
    padding: 14px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
}

.btn-primary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-landing:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.landing-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    opacity: 0.7;
}

.skip-landing {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-height: 44px;
    z-index: 10000;
}

.skip-landing:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Animation for landing page */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* Error Display Styles - Mobile Optimized */
.error-container {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 10000;
    max-width: calc(100% - 30px);
    width: 100%;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.error-message.show {
    transform: translateX(0);
    opacity: 1;
}

.error-message.hide {
    transform: translateX(100%);
    opacity: 0;
}

.error-icon {
    font-size: 16px;
    color: #dc3545;
    flex-shrink: 0;
    margin-top: 2px;
}

.error-content {
    flex: 1;
}

.error-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 15px;
}

.error-details {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
}

.error-close {
    background: none;
    border: none;
    color: #721c24;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 20px;
    min-width: 20px;
}

.error-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #dc3545;
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 5s linear;
}

.error-message.warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.error-message.warning .error-icon {
    color: #ffc107;
}

.error-message.warning .error-progress {
    background: #ffc107;
}

.error-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.error-message.info .error-icon {
    color: #17a2b8;
}

.error-message.info .error-progress {
    background: #17a2b8;
}

.error-message.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.error-message.success .error-icon {
    color: #28a745;
}

.error-message.success .error-progress {
    background: #28a745;
}

/* Form Error Styles - Mobile Optimized */
.form-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    display: none;
}

.form-error.show {
    display: flex;
}

.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

.input-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1) !important;
}



/* Top Header - Mobile Optimized */
.top-header {
    background-color: #1a365d;
    color: white;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 50px;
    overflow: hidden;
}

.contact-info {
    font-size: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.contact-info::-webkit-scrollbar {
    display: none;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 11px;
}

.contact-info i {
    font-size: 10px;
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.social-links a {
    color: white;
    transition: color 0.3s;
    font-size: 14px;
    min-width: 20px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: var(--secondary);
}

/* Header Container - Mobile Optimized */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto;
    gap: 10px;
}

/* Navigation Styles - Mobile Optimized */
.main-nav {
    background-color: #ffffff;
    color: #333;
    padding: 0 15px;
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    z-index: 999;
    height: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e0e0e0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    gap: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Logo and Brand Styles */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1a365d;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}

.brand-logo i {
    font-size: 18px;
    color: #ffd700;
}

/* Navigation Menu - Mobile Optimized */
.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-top: 1px solid #e0e0e0;
    flex-direction: column;
}

.nav-menu.active {
    display: flex;
}

.nav-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #1a365d;
}

.nav-item.active {
    background: #e8f4fc;
    color: #1a365d;
    border-left: 4px solid #1a365d;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Mobile Menu Toggle */
.menu-toggle {
    background: none;
    border: none;
    color: #1a365d;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: #f8f9fa;
}

/* User Menu - Mobile Optimized */
.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a365d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: none;
}

/* Search Bar - Mobile Optimized */
.search-container {
    position: relative;
    flex: 1;
    max-width: 200px;
}

.search-input {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.3s;
    min-height: 36px;
}

.search-input:focus {
    outline: none;
    border-color: #1a365d;
    background: white;
    box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.1);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Notification Badge */
.notification-badge {
    position: relative;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.badge-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Enhanced Media Queries */

/* Small Mobile Devices (up to 360px) */
@media (max-width: 360px) {
    .top-header {
        padding: 8px 10px;
        height: 45px;
    }
    
    .contact-info {
        gap: 8px;
    }
    
    .contact-info span {
        font-size: 10px;
    }
    
    .social-links {
        gap: 8px;
    }
    
    .main-nav {
        top: 45px;
        height: 45px;
        padding: 0 10px;
    }
    
    .brand-logo {
        font-size: 14px;
    }
    
    .brand-logo i {
        font-size: 16px;
    }
}

/* Mobile Devices (361px to 480px) */
@media (min-width: 361px) and (max-width: 480px) {
    .contact-info span {
        font-size: 11px;
    }
    
    .search-container {
        max-width: 150px;
    }
}

/* Tablets and Small Screens (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .top-header {
        padding: 8px 20px;
    }
    
    .contact-info {
        gap: 15px;
    }
    
    .contact-info span {
        font-size: 12px;
    }
    
    .social-links {
        gap: 12px;
    }
    
    .main-nav {
        padding: 0 20px;
    }
    
    .user-name {
        display: block;
    }
    
    .search-container {
        max-width: 250px;
    }
    
    .nav-menu {
        width: 300px;
        left: auto;
        right: 0;
    }
}

/* Desktop and Larger Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .top-header {
        height: 45px;
    }
    
    .main-nav {
        top: 45px;
        height: 60px;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        background: none;
        box-shadow: none;
        border: none;
        width: auto;
        gap: 0;
    }
    
    .nav-item {
        padding: 0 15px;
        border: none;
        border-bottom: 3px solid transparent;
        min-height: 60px;
        justify-content: center;
    }
    
    .nav-item.active {
        border-left: none;
        border-bottom: 3px solid #1a365d;
        background: none;
    }
    
    .user-name {
        display: block;
    }
    
    .search-container {
        max-width: 300px;
    }
}

/* Large Desktops (1025px and above) */
@media (min-width: 1025px) {
    .top-header {
        padding: 8px 30px;
        height: 40px;
    }
    
    .contact-info span {
        font-size: 13px;
    }
    
    .main-nav {
        top: 40px;
        height: 70px;
        padding: 0 30px;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        background: none;
        box-shadow: none;
        border: none;
        width: auto;
        gap: 0;
    }
    
    .nav-item {
        padding: 0 20px;
        border: none;
        border-bottom: 3px solid transparent;
        min-height: 70px;
        justify-content: center;
        font-size: 15px;
    }
    
    .nav-item.active {
        border-left: none;
        border-bottom: 3px solid #1a365d;
        background: none;
    }
    
    .user-name {
        display: block;
        font-size: 15px;
    }
    
    .search-container {
        max-width: 350px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
}

/* Orientation-specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .top-header {
        height: 40px;
    }
    
    .main-nav {
        top: 40px;
        height: 45px;
    }
    
    .contact-info span {
        font-size: 10px;
    }
    
    .nav-menu {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-item:hover {
        background: transparent;
    }
    
    .nav-item:active {
        background: #f8f9fa;
    }
    
    .menu-toggle:active {
        background: #f8f9fa;
    }
    
    .search-button:active {
        background: #f0f0f0;
        border-radius: 4px;
    }
    
    .notification-badge:active {
        background: #f0f0f0;
        border-radius: 4px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .nav-item,
    .menu-toggle,
    .search-input {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .top-header {
        background: #000;
        border-bottom: 2px solid #fff;
    }
    
    .main-nav {
        background: #fff;
        border-bottom: 2px solid #000;
    }
    
    .nav-item.active {
        background: #000;
        color: #fff;
    }
}

/* Additional Mobile Optimizations */

/* Ensure proper spacing for fixed headers */
body {
    padding-top: 100px; /* 50px top-header + 50px main-nav */
}

@media (min-width: 769px) and (max-width: 1024px) {
    body {
        padding-top: 105px; /* 45px top-header + 60px main-nav */
    }
}

@media (min-width: 1025px) {
    body {
        padding-top: 110px; /* 40px top-header + 70px main-nav */
    }
}

/* Improve scroll behavior */
.top-header,
.main-nav {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Loading states */
.nav-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.nav-item.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #1a365d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus styles for accessibility */
.nav-item:focus-visible,
.menu-toggle:focus-visible,
.search-input:focus-visible,
.notification-badge:focus-visible {
    outline: 3px solid #1a365d;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .main-nav {
        background: #2d3748;
        color: #fff;
        border-bottom-color: #4a5568;
    }
    
    .nav-item {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .nav-item:hover {
        background: #4a5568;
    }
    
    .nav-item.active {
        background: #2c5282;
        color: #fff;
    }
    
    .search-input {
        background: #4a5568;
        border-color: #718096;
        color: #fff;
    }
    
    .search-input:focus {
        border-color: #63b3ed;
        background: #4a5568;
    }
    
    .search-button {
        color: #cbd5e0;
    }
    
    .user-name {
        color: #e2e8f0;
    }
}

/* Hero Buttons - Mobile First Approach */
.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
    width: 100%;
}

/* Base Hero Button Styles */
.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 56px;
    width: 100%;
    text-align: center;
    line-height: 1.4;
}

/* Button Size Variations */
.hero-btn-lg {
    padding: 18px 28px;
    font-size: 18px;
    min-height: 60px;
    font-weight: 700;
}

.hero-btn-sm {
    padding: 14px 20px;
    font-size: 15px;
    min-height: 50px;
    font-weight: 500;
}

/* Button Style Variations */
/* Primary Button */
.hero-btn-primary {
    background: linear-gradient(135deg, #256f8a, #3ba0c9);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 111, 138, 0.3);
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 111, 138, 0.4);
    background: linear-gradient(135deg, #1a556b, #256f8a);
}

.hero-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(37, 111, 138, 0.3);
}

/* Secondary Button */
.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* Accent Button */
.hero-btn-accent {
    background: linear-gradient(135deg, #ff9f43, #ff7b00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.3);
}

.hero-btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 159, 67, 0.4);
    background: linear-gradient(135deg, #ff8c1a, #e66a00);
}

.hero-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #219653, #1ba87e);
}

.deposit-btn {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    background: var(--primary-dark)
}

.withdraw-btn {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    background: var(--danger)
}

/* Outline Button */
.hero-btn-outline {
    background: transparent;
    color: #256f8a;
    border: 2px solid #256f8a;
    font-weight: 600;
}

.hero-btn-outline:hover {
    background: #256f8a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 111, 138, 0.3);
}

/* Ghost Button */
.hero-btn-ghost {
    background: transparent;
    color: currentColor;
    border: 2px solid transparent;
    font-weight: 500;
}

.hero-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Button with Icons */
.hero-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.hero-btn:hover i {
    transform: translateX(3px);
}

.hero-btn.hero-btn-icon-only {
    width: auto;
    min-width: 56px;
    padding: 16px;
}

.hero-btn.hero-btn-icon-only i {
    margin: 0;
    font-size: 20px;
}

/* Button Groups */
.hero-btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.hero-btn-group-row {
    flex-direction: row;
    flex-wrap: wrap;
}

.hero-btn-group-row .hero-btn {
    flex: 1;
    min-width: 120px;
}

/* Loading State */
.hero-btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.hero-btn-loading .btn-text {
    opacity: 0;
}

.hero-btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: button-spin 1s linear infinite;
}

@keyframes button-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Disabled State */
.hero-btn:disabled,
.hero-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Ripple Effect */
.hero-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hero-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Button with Badge */
.hero-btn-badge {
    position: relative;
}

.hero-btn-badge::after {
    content: attr(data-badge);
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* Split Button */
.hero-btn-split {
    padding: 0;
    overflow: visible;
}

.hero-btn-split .btn-main {
    flex: 1;
    padding: 16px 20px;
    border-radius: 12px 0 0 12px;
}

.hero-btn-split .btn-dropdown {
    padding: 16px 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 12px 12px 0;
    min-width: 44px;
}

/* Floating Action Button */
.hero-btn-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    min-height: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.hero-btn-fab i {
    font-size: 24px;
}

/* Animated Button */
.hero-btn-animated {
    background: linear-gradient(90deg, #256f8a, #3ba0c9, #256f8a);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Glass Morphism Button */
.hero-btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-btn-glass::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.6s;
}

.hero-btn-glass:hover::before {
    left: 100%;
}

/* Enhanced Media Queries */

/* Small Mobile Devices (up to 360px) */
@media (max-width: 360px) {
    .hero-btn {
        padding: 14px 20px;
        min-height: 52px;
        font-size: 15px;
    }
    
    .hero-btn-lg {
        padding: 16px 24px;
        min-height: 56px;
        font-size: 16px;
    }
    
    .hero-btn-sm {
        padding: 12px 18px;
        min-height: 48px;
        font-size: 14px;
    }
    
    .hero-btn-group-row .hero-btn {
        min-width: 100px;
    }
}

/* Mobile Devices (361px to 480px) */
@media (min-width: 361px) and (max-width: 480px) {
    .hero-buttons {
        gap: 12px;
    }
    
    .hero-btn {
        min-height: 54px;
    }
}

/* Tablets and Small Screens (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .hero-btn {
        width: auto;
        flex: 1;
        min-width: 140px;
    }
    
    .hero-btn-group {
        flex-direction: row;
    }
    
    .hero-btn-group .hero-btn {
        flex: 1;
    }
}

/* Desktop and Larger Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-buttons {
        flex-direction: row;
        gap: 20px;
    }
    
    .hero-btn {
        width: auto;
        min-width: 160px;
    }
    
    .hero-btn-lg {
        min-width: 200px;
    }
}

/* Large Desktops (1025px and above) */
@media (min-width: 1025px) {
    .hero-buttons {
        flex-direction: row;
        gap: 25px;
    }
    
    .hero-btn {
        width: auto;
        min-width: 180px;
        padding: 18px 32px;
    }
    
    .hero-btn-lg {
        min-width: 220px;
        padding: 20px 36px;
        font-size: 18px;
    }
    
    .hero-btn-sm {
        min-width: 140px;
        padding: 14px 24px;
    }
}

/* Orientation-specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-btn {
        min-height: 50px;
        padding: 12px 20px;
    }
    
    .hero-buttons {
        margin: 20px 0;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .hero-btn:hover {
        transform: none;
    }
    
    .hero-btn:active {
        transform: scale(0.98);
    }
    
    .hero-btn:hover i {
        transform: none;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-btn {
        transition: none;
    }
    
    .hero-btn:hover i {
        transform: none;
    }
    
    .hero-btn::before {
        display: none;
    }
    
    .hero-btn-animated {
        animation: none;
        background: #256f8a;
    }
    
    .hero-btn-glass::before {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-btn {
        border: 2px solid currentColor;
    }
    
    .hero-btn-primary {
        background: #000;
        color: #fff;
    }
    
    .hero-btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .hero-btn-outline {
        border-color: #3ba0c9;
        color: #3ba0c9;
    }
    
    .hero-btn-outline:hover {
        background: #3ba0c9;
        color: #000;
    }
    
    .hero-btn-ghost:hover {
        background: rgba(59, 160, 201, 0.1);
        border-color: rgba(59, 160, 201, 0.3);
    }
}

/* Focus styles for accessibility */
.hero-btn:focus-visible {
    outline: 3px solid #256f8a;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 111, 138, 0.2);
}

/* Print styles */
@media print {
    .hero-btn {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .hero-btn-fab {
        display: none;
    }
}

/* Utility Classes for Hero Buttons */
.hero-btn-full {
    width: 100%;
}

.hero-btn-auto {
    width: auto;
}

.hero-btn-center {
    margin-left: auto;
    margin-right: auto;
}

.hero-btn-left {
    margin-right: auto;
}

.hero-btn-right {
    margin-left: auto;
}

/* Button Text Alignment */
.hero-btn-text-left {
    justify-content: flex-start;
    text-align: left;
}

.hero-btn-text-center {
    justify-content: center;
    text-align: center;
}

.hero-btn-text-right {
    justify-content: flex-end;
    text-align: right;
}

/* Button with Shadow Variations */
.hero-btn-shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-btn-shadow-md {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-btn-shadow-lg {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-btn-shadow-none {
    box-shadow: none;
}

/* Logout Button - Mobile Optimized */
.logout-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    min-height: 44px;
    min-width: 44px;
    box-shadow: 0 2px 8px rgba(37, 111, 138, 0.2);
    position: relative;
    overflow: hidden;
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 35, 51, 0.3);
}

.logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(200, 35, 51, 0.3);
}

.logout-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(200, 35, 51, 0.3);
}

.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;
}

.logout-btn:hover::before {
    left: 100%;
}

/* Icon styling */
.logout-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.logout-btn:hover i {
    transform: translateX(2px);
}

/* Text element */
.logout-btn span {
    font-weight: 500;
    white-space: nowrap;
}

/* Loading state */
.logout-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.logout-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Small logout button variant */
.logout-btn.small {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
    min-width: 36px;
}

.logout-btn.small i {
    font-size: 14px;
}

/* Large logout button variant */
.logout-btn.large {
    padding: 16px 24px;
    font-size: 16px;
    min-height: 52px;
    min-width: 52px;
}

.logout-btn.large i {
    font-size: 18px;
}

/* Outline variant */
.logout-btn.outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

.logout-btn.outline:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Danger variant */
.logout-btn.danger {
    background: var(--danger);
}

.logout-btn.danger:hover {
    background: #c82333;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Icon-only variant for mobile */
.logout-btn.icon-only {
    padding: 10px;
    border-radius: 50%;
    aspect-ratio: 1;
}

.logout-btn.icon-only span {
    display: none;
}

.logout-btn.icon-only i {
    margin: 0;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .logout-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .logout-btn span {
        font-size: 13px;
    }
    
    .logout-btn i {
        font-size: 15px;
    }
    
    /* On very small screens, show icon-only by default */
    @media (max-width: 360px) {
        .logout-btn:not(.keep-text) {
            padding: 10px;
            border-radius: 50%;
            aspect-ratio: 1;
        }
        
        .logout-btn:not(.keep-text) span {
            display: none;
        }
        
        .logout-btn:not(.keep-text) i {
            margin: 0;
            font-size: 16px;
        }
    }
}

/* Tablet and desktop enhancements */
@media (min-width: 769px) {
    .logout-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .logout-btn:hover {
        transform: translateY(-2px);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .logout-btn:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(37, 111, 138, 0.2);
    }
    
    .logout-btn:active {
        background: #c82333;
        transform: scale(0.98);
    }
    
    .logout-btn::before {
        display: none;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .logout-btn {
        transition: none;
    }
    
    .logout-btn:hover {
        transform: none;
    }
    
    .logout-btn::before {
        display: none;
    }
    
    .logout-btn i {
        transition: none;
    }
    
    .logout-btn.loading i {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .logout-btn {
        border: 2px solid currentColor;
    }
    
    .logout-btn.outline {
        border-width: 3px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .logout-btn.outline {
        background: transparent;
        color: #fff;
        border-color: #fff;
    }
    
    .logout-btn.outline:hover {
        background: #fff;
        color: #333;
    }
}

/* Focus visible for keyboard navigation */
.logout-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Disabled state */
.logout-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.logout-btn:disabled:hover {
    background: var(--gray);
    transform: none;
    box-shadow: none;
}

/* Grouped logout buttons */
.logout-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.logout-group .logout-btn {
    flex: 1;
}

@media (max-width: 768px) {
    .logout-group {
        flex-direction: column;
        width: 100%;
    }
    
    .logout-group .logout-btn {
        width: 100%;
    }
}

/* Confirmation dialog styles */
.logout-confirmation {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    margin: 20px;
}

.logout-confirmation .logout-btn {
    margin: 10px 5px;
    min-width: 100px;
}

/* Animation for logout button appearance */
@keyframes buttonAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logout-btn {
    animation: buttonAppear 0.3s ease;
}

/* Emergency logout variant */
.logout-btn.emergency {
    background: linear-gradient(45deg, #dc3545, #c82333);
    animation: pulseEmergency 2s infinite;
}

@keyframes pulseEmergency {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

/* Mobile Profile Dropdown Styles */
.profile-container {
    position: relative;
    z-index: 1000;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary);
    padding: 8px 12px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(30, 58, 138, 0.1);
    min-height: 44px; /* Mobile touch target */
}

.profile-btn:hover {
    background: #e0edff;
    box-shadow: 0 0 10px rgba(45, 78, 168, 0.1);
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 10px 0;
    margin-top: 5px;
    display: none;
    z-index: 1001;
    border: 1px solid #e0e0e0;
}

.profile-dropdown.active {
    display: block;
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    color: #333;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item i {
    width: 18px;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

/* Mobile Profile Section */
.profile-management-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
}

.profile-header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.profile-avatar-large {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 12px;
}

.profile-avatar-large:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay i {
    font-size: 20px;
    margin-bottom: 5px;
}

.avatar-overlay span {
    font-size: 12px;
    font-weight: 600;
}

.profile-info {
    flex: 1;
    width: 100%;
}

.profile-info h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    word-break: break-word;
}

.profile-role {
    margin: 0 0 12px 0;
    opacity: 0.9;
    font-size: 14px;
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 15px;
}

.profile-stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 11px;
    opacity: 0.8;
}

/* Profile Actions Grid - Mobile Optimized */
.profile-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.action-card:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin: 0 auto 12px;
}

.action-content h4 {
    margin: 0 0 6px 0;
    color: #2c3e50;
    font-size: 16px;
}

.action-content p {
    margin: 0;
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.4;
}

/* Profile Details - Mobile Optimized */
.profile-details-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.profile-details-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 8px;
}

.details-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.detail-item span {
    color: #7f8c8d;
    font-weight: 500;
    font-size: 14px;
    word-break: break-word;
}

/* Bottom Navigation Bar */
.bottombar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--primary-dark);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 999;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray);
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 100px;
}

.bottom-item:hover {
    color: var(--light);
    background: rgba(45, 90, 45, 0.2);
}

.bottom-item.active {
    color: var(--accent);
    background: rgba(255, 215, 0, 0.1);
}

.bottom-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.bottom-badge {
    position: absolute;
    top: 5px;
    right: 25%;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

/* ===== HAMBURGER NAVIGATION STYLES ===== */
.hambtn {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.hambtn i {
    font-size: 24px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.hambtn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.hambtn:hover i {
    color: var(--secondary-color);
}

.hambtn.premium i {
    color: var(--accent-gold);
}

.hambtn.premium:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

.hambtn.premium:hover i {
    color: #ffd700;
}

/* Dashboard Navigation Bar */
.top-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.top-title span {
    font-size: 1.5rem;
    font-weight: 600;
}

.top-title small {
    font-size: 0.9rem;
    opacity: 0.8;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.notification-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-icon i {
    font-size: 22px;
    color: white;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4757;
    color: white;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Sidebar Styles */
#user-uiwrap, #admin-uiwrap, #super-admin-uiwrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
}

#user-uiwrap.active, #admin-uiwrap.active, #super-admin-uiwrap.active {
    display: block;
}

.backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sidebar {
    position: absolute;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: white;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1001;
}

.sidebar.active {
    left: 0;
}

.sidebar.premium {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
}

.closebtn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.closebtn:hover {
    background: var(--primary-dark);
}

.sidebar.premium .closebtn {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar.premium .closebtn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-user-info {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar.premium .sidebar-user-info {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-avatar.admin {
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-avatar.admin i {
    font-size: 36px;
    color: white;
}

.sidebar-avatar.super-admin {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-avatar.super-admin i {
    font-size: 36px;
    color: #ffd700;
}

.sidebar-user-details h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.sidebar-balance {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 5px 0;
}

.sidebar.premium .sidebar-balance {
    color: #ffd700;
}

.sidebar-role {
    font-size: 0.9rem;
    color: #666;
    margin: 5px 0;
}

.sidebar.premium .sidebar-role {
    color: rgba(255, 255, 255, 0.8);
}

.sidebar nav {
    padding: 20px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(113, 103, 255, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.nav-link.active .nav-icon {
    color: var(--primary-color);
}

.sidebar.premium .nav-link {
    color: white;
}

.sidebar.premium .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar.premium .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-left: 4px solid #ffd700;
    color: #ffd700;
}

.nav-icon {
    margin-right: 15px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-badge {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar.premium .sidebar-badge {
    background: #ffd700;
    color: #8B4513;
}

.sidebar-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-action-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-action-btn.deposit {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.sidebar-action-btn.withdraw {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.sidebar-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nav-link.logout {
    color: #e74c3c;
    margin-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: black;
}

.sidebar.premium .nav-link.logout {
    color: #ffcccc;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.sidebar.premium .sidebar-divider {
    background: rgba(255, 255, 255, 0.1);
}


/* Animation for sidebar */
@keyframes slideIn {
    from {
        left: -300px;
        opacity: 0;
    }
    to {
        left: 0;
        opacity: 1;
    }
}

.sidebar.active {
    animation: slideIn 0.3s ease forwards;
}

/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification i {
    font-size: 20px;
}

/* Error Container */
.error-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: none;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Form Styles */
.form-control {
    margin-bottom: 20px;
}

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

.form-control input,
.form-control select,
.form-control textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .top-title span {
        font-size: 1.2rem;
    }
    
    .hambtn {
        width: 36px;
        height: 36px;
    }
    
    .hambtn i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 5% auto;
        width: 98%;
        padding: 15px;
    }
    
    .notification {
        left: 10px;
        right: 10px;
        top: 10px;
    }
}

/* Modern icon gradient effect */
.nav-icon.gradient {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
}

.nav-icon.gradient i {
    color: white;
}

/* Icon with badge notification */
.nav-icon.has-badge {
    position: relative;
}

.nav-icon.has-badge::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Icon with background circle */
.nav-icon.circle {
    border-radius: 50%;
    background: white;
}

/* Hover lift effect */
.nav-link:hover .nav-icon {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
}

/* Active icon glow effect */
.nav-link.active .nav-icon {
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
}

/* Navigation Icon Styles */
.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.nav-icon i {
    font-size: 18px;
    color: var(--primary-dark);
    transition: all 0.3s ease;
}

/* Active state for navigation links */
.nav-link.active .nav-icon i {
    color: #007bff;
    transform: scale(1.1);
}

/* Hover effects */
.nav-link:hover .nav-icon i {
    color: #007bff;
    transform: translateY(-2px);
}

/* Sidebar specific styles */
.sidebar .nav-icon {
    width: 28px;
    height: 28px;
    margin-right: 15px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 8px;
    padding: 5px;
}

.sidebar .nav-icon i {
    font-size: 16px;
    color: #495057;
}

.sidebar .nav-link.active .nav-icon {
    background: rgba(0, 123, 255, 0.2);
}

.sidebar .nav-link.active .nav-icon i {
    color: #007bff;
}

.sidebar .nav-link:hover .nav-icon {
    background: rgba(0, 123, 255, 0.15);
    transform: translateX(5px);
}

/* Logout icon specific style */
.nav-link.logout .nav-icon i {
    color: #dc3545;
}

.nav-link.logout:hover .nav-icon i {
    color: #bd2130;
}

/* Sidebar action buttons */
.sidebar-actions .nav-icon {
    background: transparent;
    margin-right: 10px;
}

.sidebar-action-btn.deposit .nav-icon i {
    color: #28a745;
}

.sidebar-action-btn.withdraw .nav-icon i {
    color: #dc3545;
}

/* Bottom bar icon styles */
.bottom-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.bottom-icon i {
    font-size: 20px;
    color: #6c757d;
}

.bottom-item.active .bottom-icon i {
    color: #007bff;
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-icon {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
    
    .nav-icon i {
        font-size: 16px;
    }
    
    .sidebar .nav-icon {
        width: 24px;
        height: 24px;
        margin-right: 12px;
    }
    
    .sidebar .nav-icon i {
        font-size: 14px;
    }
}

/* Animation for icons */
@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.nav-icon.has-notification i {
    animation: iconPulse 2s infinite;
    color: #ffc107;
}

/* Tab switching mobile responsive styles */
.about-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.about-tab {
    flex: 1;
    min-width: 120px;
    padding: 12px 15px;
    text-align: center;
    background: var(--secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--mobile-font-size);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: var(--dark);
}

.about-tab.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--light);
    box-shadow: 0 4px 12px rgba(37, 111, 138, 0.3);
}

/* Tab content responsive */
.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    padding: 0 10px;
}

.tab-pane.active {
    display: block;
}

/* Mission & Vision cards mobile */
.mission-vision {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

@media (min-width: 768px) {
    .mission-vision {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mission-card, .vision-card {
    background: var(--light);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
    color: var(--dark);
}

.mission-icon, .vision-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 15px;
}

/* About stats mobile */
.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 30px 0;
}

@media (min-width: 768px) {
    .about-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.stat-item {
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 32px;
    }
}

.stat-label {
    font-size: 12px;
    color: var(--gray);
}

@media (min-width: 768px) {
    .stat-label {
        font-size: 14px;
    }
}

/* Features grid mobile */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-icon-rotate {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 15px;
    display: inline-block;
}

/* Minerals carousel mobile */
.minerals-carousel {
    overflow: hidden;
    margin: 30px -10px;
    position: relative;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.mineral-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
}

.mineral-item {
    background: var(--light);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    color: var(--dark);
}

.mineral-image {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 20px;
}

.mineral-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--light);
}

.mineral-badge.premium {
    background: linear-gradient(90deg, var(--accent) 0%, #e67e22 100%);
}

.mineral-badge.classic {
    background: linear-gradient(90deg, var(--gray) 0%, #495057 100%);
}

.mineral-badge.exclusive {
    background: linear-gradient(90deg, #8b5cf6 0%, var(--primary-dark) 100%);
}

.mineral-badge.industrial {
    background: linear-gradient(90deg, var(--success) 0%, #1e7e34 100%);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 10;
    color: var(--dark);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 0 10px;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-dots .dot.active {
    background: var(--primary);
}

/* Commitment section mobile */
.commitment-content {
    padding: 0 10px;
}

.commitment-hero {
    margin-bottom: 30px;
}

.highlight-text {
    font-size: var(--mobile-font-size);
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(120deg, rgba(165, 243, 252, 0.3) 0%, rgba(224, 231, 255, 0.3) 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid var(--primary);
}

@media (min-width: 768px) {
    .highlight-text {
        font-size: var(--tablet-font-size);
        padding: 25px;
    }
}

.commitment-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

@media (min-width: 768px) {
    .commitment-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

.commitment-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    color: var(--dark);
}

.commitment-icon {
    font-size: 30px;
    color: var(--primary);
    flex-shrink: 0;
}

.commitment-text h4 {
    margin-bottom: 5px;
    font-size: var(--mobile-font-size);
    color: var(--dark);
}

.commitment-text p {
    font-size: 14px;
    color: var(--gray);
}

.commitment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 30px 0;
}

@media (min-width: 640px) {
    .commitment-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.commitment-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--light);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

@media (min-width: 768px) {
    .commitment-card {
        padding: 25px;
        border-radius: 12px;
    }
}

.commitment-card:hover {
    transform: translateY(-5px);
}

.commitment-number {
    font-size: 32px;
    font-weight: bold;
    opacity: 0.7;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .commitment-number {
        font-size: 48px;
    }
}

.commitment-testimonials {
    background: var(--secondary);
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .commitment-testimonials {
        padding: 40px;
    }
}

.testimonial-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 15px 5px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.testimonial {
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    min-width: 280px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex-shrink: 0;
    color: var(--dark);
}

.testimonial-author {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.testimonial-author strong {
    color: var(--dark);
}

.testimonial-author span {
    color: var(--gray);
    font-size: 13px;
}

/* Contact section mobile */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 30px 0;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.contact-icon {
    font-size: 35px;
    color: var(--primary);
    margin-bottom: 15px;
}

.contact-details h4 {
    margin-bottom: 5px;
    font-size: var(--mobile-font-size);
    color: var(--dark);
}

.contact-details p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
    word-break: break-all;
}

.contact-action {
    background: var(--primary);
    color: var(--light);
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.contact-action:hover {
    background: var(--primary-dark);
}

.response-card {
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
    color: var(--dark);
}

.response-card i {
    color: var(--primary);
    font-size: 24px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Hover effects only on desktop */
@media (hover: hover) and (pointer: fine) {
    .hover-lift:hover {
        transform: translateY(-5px);
        transition: transform 0.3s;
    }
    
    .hover-3d:hover {
        transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
        transition: transform 0.3s;
    }
    
    .feature-card:hover .feature-icon-rotate {
        transform: rotate(15deg);
    }
    
    .commitment-card:hover {
        transform: translateY(-5px);
    }
}

/* Touch-friendly adjustments for mobile */
@media (max-width: 768px) {
    .about-tab {
        padding: 12px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .carousel-nav.prev {
        left: 5px;
    }
    
    .carousel-nav.next {
        right: 5px;
    }
    
    .mineral-item {
        padding: 20px 15px;
    }
    
    .mineral-image {
        font-size: 50px;
    }
    
    .commitment-item {
        padding: 15px;
    }
    
    .commitment-icon {
        font-size: 25px;
    }
    
    .testimonial {
        min-width: 260px;
        padding: 15px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .commitment-grid {
        grid-template-columns: 1fr;
    }
    
    .about-tab {
        flex: 1 0 45%;
        font-size: 12px;
        padding: 10px 5px;
    }
    
    .mission-card, .vision-card {
        padding: 20px 15px;
    }
    
    .mission-icon, .vision-icon {
        font-size: 35px;
    }
}

/* Tablet landscape optimization */
@media (min-width: 768px) and (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mission-vision {
        grid-template-columns: 1fr;
    }
    
    .about-tab {
        font-size: var(--tablet-font-size);
    }
}

/* Large desktop screens */
@media (min-width: 1440px) {
    .about-tabs {
        justify-content: center;
    }
    
    .about-tab {
        max-width: 200px;
        font-size: var(--desktop-font-size);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    
    .mission-card, .vision-card {
        padding: 35px;
    }
    
    .mission-icon, .vision-icon {
        font-size: 50px;
    }
}

/* Prevent horizontal scroll on mobile */
body {
    overflow-x: hidden;
    width: 100%;
    color: var(--dark);
    background: var(--light);
}

.dashboard-content {
    width: 100%;
    overflow-x: hidden;
}

/* Smooth scrolling for better mobile experience */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .tab-pane,
    .carousel-track,
    .commitment-item,
    .commitment-card {
        transition: none;
    }
    
    .bounce, .pulse {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mission-card, .vision-card,
    .feature-card,
    .mineral-item,
    .commitment-item,
    .testimonial,
    .response-card,
    .stat-item {
        background: var(--secondary);
        color: var(--dark);
    }
    
    .highlight-text {
        background: rgba(37, 111, 138, 0.2);
        color: var(--dark);
    }
    
    .commitment-testimonials {
        background: rgba(37, 111, 138, 0.1);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .about-tab.active {
        background: var(--primary-dark);
        border: 2px solid var(--dark);
    }
    
    .commitment-card {
        border: 2px solid var(--light);
    }
    
    .contact-action {
        border: 2px solid var(--light);
    }
}

/* FAQ Section Styles */
.faq-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.faq-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.faq-header h2 {
    color: var(--primary);
    font-size: 28px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.faq-header p {
    color: var(--gray);
    font-size: 16px;
    line-height: 1.6;
}

.faq-search {
    position: relative;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.faq-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 18px;
    z-index: 2;
}

#faq-search {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 2px solid var(--primary-light);
    border-radius: 12px;
    font-size: 16px;
    background: var(--light);
    color: var(--dark);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 111, 138, 0.1);
}

#faq-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(37, 111, 138, 0.2);
}

.faq-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 10px;
}

.faq-category {
    padding: 12px 24px;
    background: var(--secondary);
    border: 2px solid transparent;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    color: var(--dark);
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-category:hover {
    background: var(--primary-light);
    color: var(--light);
    transform: translateY(-2px);
}

.faq-category.active {
    background: var(--primary);
    color: var(--light);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(37, 111, 138, 0.3);
}

.faq-container {
    background: var(--light);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    margin-bottom: 50px;
    border: 1px solid rgba(0,0,0,0.05);
}

.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item.hidden {
    opacity: 0;
    transform: translateY(-10px);
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

.faq-question {
    cursor: pointer;
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    position: relative;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    transition: transform 0.3s ease;
    font-size: 16px;
    color: var(--primary);
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.5s ease-out, padding 0.5s ease;
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray);
}

.faq-item.active .faq-answer {
    max-height: 2000px;
    padding: 0 0 25px 0;
}

.faq-answer p {
    margin-bottom: 15px;
}

.faq-answer ul {
    margin: 15px 0;
    padding-left: 20px;
}

.faq-answer li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 10px;
}

.faq-answer li:before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.faq-answer strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.faq-contact {
    text-align: center;
    background: linear-gradient(135deg, rgba(37, 111, 138, 0.05) 0%, rgba(37, 111, 138, 0.02) 100%);
    padding: 50px;
    border-radius: 20px;
    margin-top: 40px;
    border: 1px solid rgba(37, 111, 138, 0.1);
}

.faq-contact h3 {
    color: var(--primary);
    font-size: 26px;
    margin-bottom: 15px;
}

.faq-contact p {
    color: var(--gray);
    font-size: 16px;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    background: var(--light);
    border-radius: 12px;
    font-size: 16px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    min-width: 220px;
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}

.contact-method i {
    font-size: 22px;
    color: var(--primary);
    width: 30px;
    text-align: center;
}

/* Mobile responsive FAQ */
@media (max-width: 768px) {
    .faq-section {
        padding: 15px;
    }
    
    .faq-header {
        padding: 15px;
        margin-bottom: 30px;
    }
    
    .faq-header h2 {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .faq-search {
        margin-bottom: 25px;
    }
    
    #faq-search {
        padding: 14px 15px 14px 50px;
        font-size: 15px;
    }
    
    .faq-categories {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 15px;
        margin-bottom: 30px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .faq-categories::-webkit-scrollbar {
        height: 4px;
    }
    
    .faq-categories::-webkit-scrollbar-thumb {
        background: var(--primary-light);
        border-radius: 2px;
    }
    
    .faq-category {
        font-size: 13px;
        padding: 10px 20px;
        min-height: 40px;
    }
    
    .faq-container {
        padding: 20px;
        margin-bottom: 40px;
    }
    
    .faq-question {
        font-size: 16px;
        padding: 18px 0;
    }
    
    .faq-answer {
        font-size: 15px;
    }
    
    .faq-contact {
        padding: 30px 20px;
    }
    
    .faq-contact h3 {
        font-size: 22px;
    }
    
    .contact-methods {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .contact-method {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 16px 20px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .faq-header h2 {
        font-size: 22px;
    }
    
    .faq-header p {
        font-size: 15px;
    }
    
    .faq-category {
        font-size: 12px;
        padding: 8px 16px;
        min-height: 36px;
    }
    
    .faq-question {
        font-size: 15px;
        padding: 16px 0;
    }
    
    .faq-contact h3 {
        font-size: 20px;
    }
}

/* Animation for FAQ items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeInUp 0.5s ease forwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }
.faq-item:nth-child(7) { animation-delay: 0.7s; }
.faq-item:nth-child(8) { animation-delay: 0.8s; }
.faq-item:nth-child(9) { animation-delay: 0.9s; }
.faq-item:nth-child(10) { animation-delay: 1.0s; }
.faq-item:nth-child(11) { animation-delay: 1.1s; }
.faq-item:nth-child(12) { animation-delay: 1.2s; }
.faq-item:nth-child(13) { animation-delay: 1.3s; }
.faq-item:nth-child(14) { animation-delay: 1.4s; }
.faq-item:nth-child(15) { animation-delay: 1.5s; }
.faq-item:nth-child(16) { animation-delay: 1.6s; }
.faq-item:nth-child(17) { animation-delay: 1.7s; }
.faq-item:nth-child(18) { animation-delay: 1.8s; }

/* FAQ Section Styles */
#faq.content-section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#faq.content-section.active {
    display: block;
    opacity: 1;
}

.faq-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.faq-header h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.faq-header p {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.6;
}

.faq-search {
    position: relative;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.faq-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.2rem;
    z-index: 2;
}

#faq-search {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid var(--primary-light);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--light);
    color: var(--dark);
    transition: all 0.3s ease;
}

#faq-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 111, 138, 0.1);
}

.faq-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 10px;
}

.faq-category {
    padding: 10px 20px;
    background: var(--secondary);
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--dark);
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-category:hover {
    background: var(--primary-light);
    color: var(--light);
    transform: translateY(-2px);
}

.faq-category.active {
    background: var(--primary);
    color: var(--light);
    border-color: var(--primary-dark);
}

.faq-container {
    background: var(--light);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    cursor: pointer;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary);
    font-size: 0.9rem;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.5s ease, padding 0.5s ease;
    color: var(--gray);
    line-height: 1.6;
}

.faq-answer p {
    margin-bottom: 15px;
}

.faq-answer ul {
    margin: 15px 0;
    padding-left: 20px;
}

.faq-answer li {
    margin-bottom: 8px;
}

.faq-item.active .faq-answer {
    max-height: 2000px;
    padding: 0 0 20px 0;
}

.faq-contact {
    text-align: center;
    background: var(--secondary);
    padding: 40px;
    border-radius: 12px;
    margin-top: 40px;
}

.faq-contact h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.faq-contact p {
    color: var(--gray);
    margin-bottom: 25px;
}

.contact-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: var(--light);
    border-radius: 8px;
    color: var(--dark);
    transition: transform 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-3px);
}

.contact-method i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .faq-section {
        padding: 15px;
    }
    
    .faq-header h2 {
        font-size: 1.5rem;
    }
    
    .faq-categories {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }
    
    .faq-category {
        font-size: 0.8rem;
        padding: 8px 16px;
        white-space: nowrap;
    }
    
    .faq-container {
        padding: 20px;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 15px 0;
    }
    
    .faq-contact {
        padding: 30px 20px;
    }
    
    .contact-methods {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-method {
        width: 100%;
        max-width: 300px;
    }
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #09f;
    animation: spin 1s ease infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.investment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    font-size: 1.8rem;
    cursor: pointer;
    color: #7f8c8d;
}

/* My Investments Section */
.investments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}


.investment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.investment-mineral {
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c3e50;
}

.investment-amount {
    font-size: 1.1rem;
    color: #27ae60;
}

.investment-details {
    margin-bottom: 15px;
}

.investment-duration, .investment-rate {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #7f8c8d;
}

.profit-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 15px;
}

.current-profit {
    font-size: 1.5rem;
    font-weight: bold;
    color: #27ae60;
    margin: 10px 0;
}

.countdown {
    font-size: 0.9rem;
    color: #e74c3c;
}

.progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #3498db;
    border-radius: 4px;
    width: 0%;
    transition: width 1s;
}

.balance-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.insufficient-funds {
    color: #e74c3c;
    margin: 10px 0;
    font-weight: bold;
    display: none;
}

/* Investment Options Grid */
.investment-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.investment-option-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.investment-option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.option-mineral {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.option-details {
    margin: 15px 0;
}

.option-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.option-detail-value {
    color: #2c3e50;
    font-weight: 600;
}

.option-profit {
    font-size: 1.1rem;
    font-weight: bold;
    color: #27ae60;
    margin: 15px 0;
}

.invest-button {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
}

.invest-button:hover {
    background: linear-gradient(135deg, #2980b9, #1a252f);
    transform: scale(1.05);
}

/* Investment Form */
.invest-form {
    margin-top: 20px;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.amount-input-container {
    position: relative;
}

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

.amount-input-container input {
    padding-left: 30px;
}

.amount-slider {
    margin-top: 15px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

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

.confirm-button {
    flex: 1;
    background: linear-gradient(135deg, #27ae60, #219653);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-button:hover {
    background: linear-gradient(135deg, #219653, #1e8449);
    transform: translateY(-2px);
}

.cancel-button {
    flex: 1;
    background: #e0e0e0;
    color: #2c3e50;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-button:hover {
    background: #d5d5d5;
}

/* Investment Summary */
.investment-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 25px;
}

.summary-header {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.summary-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.summary-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.summary-profit {
    color: #27ae60;
}

/* Investment Status */
.investment-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.active {
    background: #27ae60;
}

.status-dot.pending {
    background: #f39c12;
}

.status-dot.completed {
    background: #3498db;
}

.status-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Empty State */
.investments-empty {
    text-align: center;
    padding: 50px 20px;
    color: #7f8c8d;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.empty-message {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.empty-submessage {
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.quick-action-button {
    flex: 1;
    min-width: 120px;
    background: white;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-action-button:hover {
    background: #3498db;
    color: white;
}

.quick-action-button.secondary {
    border-color: #7f8c8d;
    color: #7f8c8d;
}

.quick-action-button.secondary:hover {
    background: #7f8c8d;
    color: white;
}



/* Admin Chat Modal Styles */
#admin-chat-modal.modal,
#user-chat-modal.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

#admin-chat-modal .modal-content,
#user-chat-modal .modal-content {
    background-color: #fefefe;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Close Button */

/* Admin Chat Container */
.admin-chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: white;
}

/* Sidebar - Mobile First */
.admin-chat-sidebar {
    width: 100%;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    max-height: 40vh;
    min-height: 200px;
}

.chat-search {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 10;
}

#admin-chat-search {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    appearance: none;
}

#admin-chat-search:focus {
    border-color: #4a90e2;
}

.chat-users-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

/* Main Chat Area */
.admin-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    min-height: 60vh;
}

.admin-chat-header {
    padding: 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.no-chat-selected {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-chat-selected i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.no-chat-selected h3 {
    margin: 10px 0;
    color: #333;
    font-size: 20px;
}

.no-chat-selected p {
    color: #888;
    font-size: 14px;
    line-height: 1.4;
}

/* Messages Container */
.admin-chat-messages,
#user-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    -webkit-overflow-scrolling: touch;
}

/* Storage Management */
.storage-management {
    padding: 12px 15px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.btn-storage, .btn-export {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.btn-storage:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #2196f3;
}

.btn-export:hover {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #4caf50;
}

#storageStatus {
    font-size: 12px;
    color: #666;
    text-align: center;
    flex: 1 0 100%;
    margin-top: 5px;
}




/* Modal backdrop click to close */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal exit animation */
.modal.closing {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from { 
        opacity: 1;
        backdrop-filter: blur(5px);
    }
    to { 
        opacity: 0;
        backdrop-filter: blur(0);
    }
}

/* Modal content exit animation */
.modal-content.closing {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
    from { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to { 
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* Escape key indicator (for accessibility) */
.close-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.modal:hover .close-hint {
    opacity: 1;
}

@media (max-width: 768px) {
    .close-hint {
        display: none; /* Hide on mobile for cleaner UI */
    }
}

/* Chat Actions */
.chat-actions {
    padding: 12px 15px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.btn-clear {
    padding: 12px;
    background: #fff;
    border: 1px solid #ff5252;
    border-radius: 6px;
    color: #ff5252;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    width: 100%;
}

.btn-clear:hover {
    background: #ff5252;
    color: white;
}

.storage-info {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Chat Input Area */
.admin-chat-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.quick-responses {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.quick-responses::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.quick-response {
    padding: 8px 12px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 16px;
    font-size: 13px;
    color: #1976d2;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.quick-response:hover {
    background: #1976d2;
    color: white;
}

.chat-footer {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.admin-message-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* Larger for mobile touch */
    resize: none;
    outline: none;
    transition: border-color 0.3s;
    min-height: 44px; /* Minimum touch target size */
    max-height: 120px;
    appearance: none;
    line-height: 1.4;
}

#admin-message-input:focus,
#user-message-input:focus {
    border-color: #4a90e2;
}

.chat-send-btn,
.chat-send {
    padding: 12px 20px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
    min-height: 44px; /* Minimum touch target size */
    min-width: 60px;
}

.chat-send-btn:hover,
.chat-send:hover {
    background: #1976d2;
}

/* User Chat Modal Specific Styles */
#user-chat-modal .admin-chat-container {
    height: 100vh;
}

/* Chat Header */
.chat-header {
    padding: 20px 15px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    flex-wrap: wrap;
}

.chat-title i {
    font-size: 22px;
}

.chat-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Messages */
.message {
    margin-bottom: 12px;
    max-width: 85%;
}

.support-message {
    margin-left: 0;
    margin-right: auto;
}

.message-content {
    padding: 12px 15px;
    border-radius: 18px 18px 18px 4px;
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
}

.message-time {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    margin-left: 12px;
}

/* Quick Options */
.quick-options {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.quick-option {
    padding: 12px 15px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-option:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
}

/* File Upload */
.file-upload-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    text-align: center;
    min-height: 44px;
}

.file-upload-label:hover {
    border-color: #2196f3;
    background: #e3f2fd;
    color: #1976d2;
}

.file-upload-label i {
    font-size: 20px;
}

#user-file-input {
    display: none;
}

.file-list {
    padding: 10px 15px 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

/* Chat Footer */
.chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.input-group-4 {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* Scrollbar Styling */
.admin-chat-messages::-webkit-scrollbar,
.chat-users-list::-webkit-scrollbar,
#user-chat-messages::-webkit-scrollbar,
.file-list::-webkit-scrollbar,
.quick-responses {
    width: 4px;
    height: 4px;
}

.admin-chat-messages::-webkit-scrollbar-track,
.chat-users-list::-webkit-scrollbar-track,
#user-chat-messages::-webkit-scrollbar-track,
.file-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.admin-chat-messages::-webkit-scrollbar-thumb,
.chat-users-list::-webkit-scrollbar-thumb,
#user-chat-messages::-webkit-scrollbar-thumb,
.file-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.admin-chat-messages::-webkit-scrollbar-thumb:hover,
.chat-users-list::-webkit-scrollbar-thumb:hover,
#user-chat-messages::-webkit-scrollbar-thumb:hover,
.file-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design for Larger Screens */
@media (min-width: 768px) {
    #admin-chat-modal .modal-content,
    #user-chat-modal .modal-content {
        margin: 5vh auto;
        width: 90%;
        max-width: 1200px;
        height: 90vh;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        max-height: 90vh !important;
    }
    
    #admin-chat-modal .admin-chat-container {
        flex-direction: row;
        height: calc(90vh - 20px);
    }
    
    .admin-chat-sidebar {
        width: 300px;
        max-height: none;
        min-height: auto;
        border-right: 1px solid #e0e0e0;
        border-bottom: none;
    }
    
    .admin-chat-main {
        min-height: auto;
    }
    
    .quick-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-responses {
        flex-wrap: wrap;
        overflow-x: visible;
    }
    
    .chat-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .btn-clear {
        width: auto;
    }
    
    #storageStatus {
        flex: none;
        margin-top: 0;
        margin-left: auto;
    }
}

@media (min-width: 1024px) {
    .quick-options {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .storage-management {
        flex-wrap: nowrap;
    }
    
    .btn-storage, .btn-export {
        flex: none;
    }
    
    #storageStatus {
        flex: none;
        margin-left: auto;
    }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    #admin-chat-modal .modal-content,
    #user-chat-modal .modal-content {
        width: 95%;
    }
    
    .admin-chat-sidebar {
        width: 250px;
    }
}

/* Prevent iOS zoom on input focus */
@media (max-width: 768px) {
    input, textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    select {
        font-size: 16px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-storage:hover,
    .btn-export:hover,
    .btn-clear:hover,
    .quick-response:hover,
    .quick-option:hover,
    .file-upload-label:hover,
    .chat-send-btn:hover,
    .chat-send:hover {
        transform: none;
    }
    
    .quick-response:active,
    .quick-option:active {
        background: #1976d2;
        color: white;
    }
    
    .btn-storage:active,
    .btn-export:active {
        opacity: 0.8;
    }
    
    .btn-clear:active {
        background: #ff5252;
        color: white;
    }
}

/* Safe area insets for notch phones */
@supports (padding: max(0px)) {
    #admin-chat-modal .modal-content,
    #user-chat-modal .modal-content {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
    
    .chat-footer,
    .admin-chat-input {
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}

/* Animation for modal */
.modal-content {
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .modal-content {
        animation: modalFadeIn 0.3s;
    }
    
    @keyframes modalFadeIn {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Admin Management Styles */
.super-admin-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-left: 8px;
}

.admin-role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.role-support { background: #3498db; color: white; }
.role-approval { background: #2ecc71; color: white; }
.role-financial { background: #9b59b6; color: white; }
.role-full { background: #e74c3c; color: white; }
.role-moderator { background: #f39c12; color: white; }

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-active { background: #d4edda; color: #155724; }
.status-inactive { background: #f8d7da; color: #721c24; }
.status-suspended { background: #fff3cd; color: #856404; }

.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-action {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-action.view { background: #3498db; color: white; }
.btn-action.edit { background: #f39c12; color: white; }
.btn-action.delete { background: #e74c3c; color: white; }

.btn-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.protected-badge {
    color: #7f8c8d;
    font-size: 14px;
}

/* Admin Details Modal */
.admin-details-modal {
    max-width: 600px;
}

.admin-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: bold;
    color: #666;
    font-size: 12px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.permission-item i {
    color: #3498db;
}

.all-permissions {
    background: #e8f4f8;
    border-left-color: #2ecc71;
    grid-column: span 2;
}

.all-permissions i {
    color: #2ecc71;
}

/* Permissions Checkboxes */
.permissions-list {
    display: grid;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s;
}

.permission-checkbox:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

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

.permission-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.permission-label i {
    color: #3498db;
    width: 20px;
}

/* Super Admin Header */
.super-admin-header {
    position: relative;
}

.super-admin-banner {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

/* Admin Preview */
.admin-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.user-detail-item {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-details-grid {
        grid-template-columns: 1fr;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
        margin-bottom: 5px;
    }
}

.search-box {
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: #667eea;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.user-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.user-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.user-table tr:hover {
    background: #f8f9fa;
}

.user-info-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background: #27ae60;
    box-shadow: 0 0 10px #27ae60;
}

.status-indicator.offline {
    background: #95a5a6;
}

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

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

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

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

.password-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-masked {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.btn-show-password {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-show-password:hover {
    background: #f0f0f0;
}

.referral-code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #333;
}

.btn-copy {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: #f0f0f0;
}

.balance-amount {
    font-weight: bold;
    color: #27ae60;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal > div {
    background: white;
    border-radius: 10px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-details-modal, .edit-user-modal, .delete-user-modal {
    padding: 30px;
}

.user-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.user-details-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-group label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.info-group span {
    font-size: 16px;
    color: #333;
}

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

.stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.stat-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-value.profit {
    color: #27ae60;
}

.transactions-table, .referrals-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.transactions-table th, .referrals-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.transactions-table td, .referrals-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.transaction-deposit {
    border-left: 4px solid #27ae60;
}

.transaction-withdrawal {
    border-left: 4px solid #e74c3c;
}

.edit-user-form {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
}

.form-group input, .form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.password-input-group {
    display: flex;
    gap: 10px;
}

.password-input-group input {
    flex: 1;
}

.btn-toggle-password {
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 0 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-toggle-password:hover {
    background: #e0e0e0;
}

.delete-options {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.warning-text {
    color: #e74c3c;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}


/* Responsive Design */
@media (max-width: 768px) {
    .user-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .user-table {
        font-size: 14px;
    }
    
    .user-table th,
    .user-table td {
        padding: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modal > div {
        max-height: 95vh;
    }
    
    .user-details-modal,
    .edit-user-modal,
    .delete-user-modal {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .user-stats {
        grid-template-columns: 1fr;
    }
    
    .user-table {
        display: block;
        overflow-x: auto;
    }
    
    .user-info-grid {
        grid-template-columns: 1fr;
    }
    
    .user-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
 
          /* Referral System Styles */
        .referral-code-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
        .code-display {
            flex: 1;
            padding: 15px;
            background: #f8f9fa;
            border: 2px dashed #3498db;
            border-radius: 8px;
            font-family: 'Courier New', monospace;
            font-size: 20px;
            font-weight: bold;
            color: #2c3e50;
            text-align: center;
            letter-spacing: 2px;
        }
        
        .btn-copy {
            padding: 15px 25px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .btn-copy:hover {
            background: #2980b9;
            transform: translateY(-2px);
        }
        
        .referral-link-container {
            margin: 20px 0;
        }
        
        .referral-link {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 10px 0;
        }
        
        .referral-link span {
            flex: 1;
            padding: 12px;
            background: #f8f9fa;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            color: #2c3e50;
            overflow-x: auto;
            white-space: nowrap;
        }
        
        .share-buttons {
            display: flex;
            gap: 10px;
            margin: 20px 0;
            flex-wrap: wrap;
        }
        
        .share-btn {
            flex: 1;
            padding: 15px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: all 0.3s;
            min-width: 200px;
        }
        
        .share-btn.whatsapp {
            background: #25D366;
            color: white;
        }
        
        .share-btn.email {
            background: #EA4335;
            color: white;
        }
        
        .share-btn.sms {
            background: #34B7F1;
            color: white;
        }
        
        .share-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
        
        .referral-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin: 30px 0;
        }
        
        .stat-card {
            background: white;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            transition: transform 0.3s;
        }
        
        .stat-card:hover {
            transform: translateY(-5px);
        }
        
        .stat-value {
            font-size: 36px;
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 10px;
        }
        
        .stat-label {
            font-size: 14px;
            color: #7f8c8d;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .referrals-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .referrals-table th {
            background: #2c3e50;
            color: white;
            padding: 15px;
            text-align: left;
            font-weight: 600;
        }
        
        .referrals-table td {
            padding: 15px;
            border-bottom: 1px solid #eee;
        }
        
        .referrals-table tr:hover {
            background: #f8f9fa;
        }
        
        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            background: #3498db;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 18px;
        }
        
        .user-name {
            font-weight: bold;
            color: #2c3e50;
        }
        
        .user-email {
            font-size: 12px;
            color: #7f8c8d;
        }
        
        .generation-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: bold;
            margin-top: 5px;
        }
        
        .generation-badge-1st-generation {
            background: #27ae60;
            color: white;
        }
        
        .generation-badge-2nd-generation {
            background: #f39c12;
            color: white;
        }
        
        .generation-badge-3rd-generation {
            background: #9b59b6;
            color: white;
        }
        
        .status-badge {
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: bold;
            display: inline-block;
        }
        
        .status-badge.active {
            background: #27ae60;
            color: white;
        }
        
        .status-badge.inactive {
            background: #e74c3c;
            color: white;
        }
        
        .deposit-amount {
            font-weight: bold;
            color: #2c3e50;
        }
        
        .deposit-count {
            font-size: 11px;
            color: #7f8c8d;
            margin-top: 5px;
        }
        
        .commission-amount {
            font-weight: bold;
            color: #27ae60;
        }
        
        .commission-amount.has-commission {
            color: #27ae60;
        }
        
        .commission-status {
            font-size: 11px;
            color: #7f8c8d;
            margin-top: 5px;
        }
        
        .commission-status.pending {
            color: #f39c12;
        }
        
        .referral-actions {
            display: flex;
            gap: 5px;
        }
        
        .referral-actions button {
            width: 35px;
            height: 35px;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }
        
        .btn-view {
            background: #3498db;
            color: white;
        }
        
        .btn-message {
            background: #2ecc71;
            color: white;
        }
        
        .btn-invite {
            background: #f39c12;
            color: white;
        }
        
        .referral-actions button:hover {
            transform: scale(1.1);
        }
        
        .referral-actions button:disabled {
            background: #bdc3c7;
            cursor: not-allowed;
            transform: none;
        }
        
        .loading-spinner {
            width: 40px;
            height: 40px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #3498db;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 10px;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* Modal Styles */
        .referral-details-modal .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #f1f1f1;
        }
        
        .referral-details-modal .modal-header h3 {
            margin: 0;
            color: #2c3e50;
        }
        
.close-modal {
    position: absolute;
    top: 15 px;
    right: 15 px;
    color: white;
    font-size: 28 px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    background: #113745;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    /* Remove float: right since we're using absolute positioning */
    /* float: right; */
}

.close-modal:hover {
    color: black;
    background: white;
    transform: rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .close-modal {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
        background: #113745;
}

}

/* For very small screens */
@media(max-width: 480px) {
    .close-modal {
        top: 8 px;
        right: 8 px;
        width: 38 px;
        height: 38 px;
        font-size: 22 px;
    }
}
        
        .user-profile-section {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-bottom: 30px;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 10px;
        }
        
        .profile-avatar {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            font-weight: bold;
        }
        
        .profile-info h4 {
            margin: 0 0 5px 0;
            color: #2c3e50;
        }
        
        .profile-info p {
            margin: 0 0 10px 0;
            color: #7f8c8d;
        }
        
        .details-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .detail-card {
            background: white;
            padding: 20px;
            border-radius: 10px;
            border: 1px solid #eee;
        }
        
        .detail-card h5 {
            margin: 0 0 15px 0;
            color: #2c3e50;
            padding-bottom: 10px;
            border-bottom: 2px solid #f1f1f1;
        }
        
        .detail-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px dashed #eee;
        }
        
        .detail-item:last-child {
            border-bottom: none;
        }
        
        .detail-item span:first-child {
            color: #7f8c8d;
        }
        
        .detail-item span:last-child {
            font-weight: 600;
            color: #2c3e50;
        }
        
        .detail-item.total {
            font-size: 16px;
            font-weight: bold;
        }
        
        .commission-amount {
            color: #27ae60;
            font-weight: bold;
        }
        
        .total-commission {
            color: #27ae60;
            font-size: 18px;
        }
        
        .action-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }
        
        .btn-primary, .btn-secondary {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.3s;
        }
        
        .btn-primary {
            background: #3498db;
            color: white;
        }
        
        .btn-secondary {
            background: #f1f1f1;
            color: #2c3e50;
        }
        
        .btn-primary:hover, .btn-secondary:hover {
            transform: translateY(-2px);
        }
        
        /* Commission rates */
        .commission-rates {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 25px;
            border-radius: 15px;
            margin: 30px 0;
        }
        
        .commission-rates .content-title {
            margin: 0 0 20px 0;
            color: white;
            font-size: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .rate-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            margin-bottom: 10px;
        }
        
        .rate-item:last-child {
            margin-bottom: 0;
        }
        
        .amount-range {
            font-size: 16px;
            font-weight: 600;
        }
        
        .commission-rate {
            background: white;
            color: #667eea;
            padding: 8px 20px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 18px;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .share-buttons {
                flex-direction: column;
            }
            
            .share-btn {
                min-width: auto;
            }
            
            .referral-stats {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .details-grid {
                grid-template-columns: 1fr;
            }
            
            .referrals-table {
                display: block;
                overflow-x: auto;
            }
        }
        
        @media (max-width: 480px) {
            .referral-stats {
                grid-template-columns: 1fr;
            }
            
            .code-display {
                font-size: 16px;
            }
            
            .referral-link span {
                font-size: 12px;
            }
        }
        
/* ============================================
   USER & ADMIN MANAGEMENT RESPONSIVE STYLES
   ============================================ */

/* Base Styles - Mobile First */
.management-container {
    width: 100%;
    padding: 15px;
    background: #f8f9fa;
    min-height: 100vh;
}

.content-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

/* Management Header */
.management-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f1f1;
}

.management-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}


.stat-card > div:first-child {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 20;
    font-weight: 800;
    line-height: 1;
}

/* Search Box */
.search-container {
    margin: 20px 0;
    position: relative;
}

.search-box {
    width: 100%;
    padding: 14px 45px 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-box:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.search-box::placeholder {
    color: #95a5a6;
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 18px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219653;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

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

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
}

/* Tables - Mobile */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin: 20px 0;
    background: white;
    position: relative;
}

.table-container::before {
    content: '← Scroll →';
    position: absolute;
    top: -25px;
    right: 10px;
    font-size: 0.8rem;
    color: #7f8c8d;
    display: none;
}

@media (max-width: 768px) {
    .table-container::before {
        display: block;
    }
}

.user-table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
}

.user-table th {
    background: #2c3e50;
    color: white;
    padding: 16px 12px;
    font-weight: 600;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 0.9rem;
}

.user-table th:first-child {
    border-top-left-radius: 10px;
}

.user-table th:last-child {
    border-top-right-radius: 10px;
}

.user-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.9rem;
}

.user-table tr:last-child td {
    border-bottom: none;
}

.user-table tr:hover {
    background: #f8f9fa;
}

/* User/Admin Info Cells */
.user-info-cell, .admin-info-cell {
    min-width: 180px;
}

.user-info, .admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar, .admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.admin-avatar.super-admin {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.admin-avatar.regular-admin {
    background: linear-gradient(135deg, #3498db, #2ecc71);
}

.user-avatar {
    background: linear-gradient(135deg, #9b59b6, #e74c3c);
}

.user-details, .admin-details {
    flex: 1;
    min-width: 0;
}

.user-name, .admin-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta, .admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.user-id, .admin-id,
.user-ref, .admin-email {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Status Badges */
.status-cell {
    min-width: 100px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.status-active {
    background: #d5f4e6;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.status-inactive {
    background: #fdeaea;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.status-pending {
    background: #fff4e6;
    color: #f39c12;
    border: 1px solid #f39c12;
}

/* Role Badges */
.role-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.super-admin-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.admin-badge {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.support-badge {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

/* Permissions Display */
.permissions-cell {
    min-width: 200px;
    max-width: 250px;
}

.permissions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.permission-badge {
    padding: 4px 10px;
    background: #ecf0f1;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #2c3e50;
    white-space: nowrap;
}

/* Password Cell */
.password-cell {
    min-width: 140px;
}

.password-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-masked {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    color: #2c3e50;
    font-size: 0.9rem;
}

.btn-show-password {
    width: 32px;
    height: 32px;
    border: none;
    background: #ecf0f1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

.btn-show-password:hover {
    background: #3498db;
    color: white;
    transform: scale(1.1);
}

/* Balance Display */
.balance-display {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.total-deposits {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 4px;
}

/* Actions Cell */
.actions-cell {
    min-width: 200px;
}

.actions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-action {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-action.view {
    background: #3498db;
    color: white;
}

.btn-action.edit {
    background: #f39c12;
    color: white;
}

.btn-action.chat {
    background: #2ecc71;
    color: white;
}

.btn-action.investments {
    background: #9b59b6;
    color: white;
}

.btn-action.transactions {
    background: #1abc9c;
    color: white;
}

.btn-action.reset {
    background: #34495e;
    color: white;
}

.btn-action.status {
    background: #e74c3c;
    color: white;
}

.btn-action.delete {
    background: #c0392b;
    color: white;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* No Data State */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-data-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-data h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.no-data p {
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
    .management-container {
        padding: 25px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .management-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .management-header h3 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .search-box {
        padding: 16px 50px 16px 25px;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    .user-table th,
    .user-table td {
        padding: 18px 16px;
    }
    
    .actions-container {
        gap: 10px;
    }
    
    .btn-action {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
    .management-container {
        padding: 30px;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .content-section {
        padding: 30px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .search-box {
        max-width: 500px;
        margin: 0 auto;
        display: block;
    }
    
    .table-container {
        margin: 30px 0;
    }
    
    .user-table {
        min-width: auto;
    }
    
    .user-table th,
    .user-table td {
        padding: 20px;
    }
    
    .actions-container {
        justify-content: flex-start;
    }
}

/* Large Desktop Styles (1440px and up) */
@media (min-width: 1440px) {
    .management-container {
        padding: 40px;
    }
    
    .content-section {
        padding: 40px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .stat-card {
        padding: 25px;
    }
    
    .stat-number {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {
    .management-container {
        padding: 0;
        background: white;
    }
    
    .content-section {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .btn,
    .btn-action,
    .btn-show-password {
        display: none;
    }
    
    .table-container {
        overflow: visible;
    }
    
    .user-table {
        min-width: auto;
    }
    
    .user-table th {
        background: #333 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .management-container {
        background: #1a1a1a;
    }
    
    .content-section {
        background: #2d2d2d;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .section-title {
        color: #ffffff;
    }
    
    .search-box {
        background: #333;
        border-color: #444;
        color: #fff;
    }
    
    .search-box::placeholder {
        color: #888;
    }
    
    .user-table tr:hover {
        background: #333;
    }
    
    .user-name,
    .admin-name,
    .balance-display {
        color: #fff;
    }
    
    .user-meta,
    .admin-meta {
        color: #aaa;
    }
    
    .password-masked {
        color: #fff;
    }
    
    .btn-show-password {
        background: #333;
        color: #aaa;
    }
    
    .btn-secondary {
        background: #333;
        color: #fff;
    }
    
    .permission-badge {
        background: #333;
        color: #ddd;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-action {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .btn-show-password {
        width: 40px;
        height: 40px;
    }
    
    .user-table th,
    .user-table td {
        padding: 20px 15px;
    }
    
    .btn {
        padding: 16px 32px;
        min-height: 50px;
    }
    
    /* Increase touch targets */
    .status-badge,
    .role-badge {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .stat-card {
        border: 2px solid white;
    }
    
    .search-box {
        border-width: 3px;
    }
    
    .user-table td {
        border-bottom: 2px solid #000;
    }
    
    .status-badge,
    .role-badge {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .btn,
    .btn-action,
    .btn-show-password {
        transition: none;
    }
    
    .loading-spinner {
        animation-duration: 2s;
    }
}

/* Card View for Very Small Screens (Alternative to table) */
@media (max-width: 480px) {
    .card-view {
        display: block;
    }
    
    .table-view {
        display: none;
    }
    
    .user-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .card-header {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px solid #f1f1f1;
    }
    
    .card-info {
        flex: 1;
    }
    
    .card-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .card-detail-item {
        font-size: 0.9rem;
    }
    
    .card-detail-label {
        font-weight: 600;
        color: #7f8c8d;
        margin-bottom: 4px;
        font-size: 0.8rem;
    }
    
    .card-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .card-actions .btn-action {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}

/* Toggle between card and table view */
.view-toggle {
    display: none;
}

@media (max-width: 480px) {
    .view-toggle {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 15px;
    }
    
    .view-toggle-btn {
        background: #ecf0f1;
        border: none;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.9rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .view-toggle-btn.active {
        background: #3498db;
        color: white;
    }
}

/* Filter Controls */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    border-color: #3498db;
    outline: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f1f1f1;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination-btn:hover:not(:disabled) {
    background: #3498db;
    color: white;
}

.pagination-btn.active {
    background: #3498db;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Export Controls */
.export-controls {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .export-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #e8f4fc;
    border-radius: 10px;
    border: 2px solid #3498db;
}

.bulk-checkbox {
    width: 20px;
    height: 20px;
}

.bulk-select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
}

/* Quick Stats Bar */
.quick-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
}

.quick-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.quick-stat-icon.users {
    background: #3498db;
}

.quick-stat-icon.admins {
    background: #9b59b6;
}

.quick-stat-icon.active {
    background: #2ecc71;
}

.quick-stat-icon.inactive {
    background: #e74c3c;
}

.quick-stat-info {
    flex: 1;
}

.quick-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}

.quick-stat-label {
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* Responsive adjustments for quick stats */
@media (max-width: 768px) {
    .quick-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-stats-bar {
        grid-template-columns: 1fr;
    }
}

/* Notification Badge */
.notification-badge {
    position: relative;
    display: inline-block;
}

.badge-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Empty State Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-data {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover effects for cards */
.user-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
.btn:focus,
.btn-action:focus,
.search-box:focus,
.filter-group select:focus {
    outline: 3px solid rgba(52, 152, 219, 0.5);
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Custom Scrollbar */
.table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Smooth transitions for theme changes */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

    .input-group-4 select {
        width: 100%;
        padding: 12px;
        border: 2px solid #3498db;
        border-radius: 5px;
        font-size: 16px;
        margin-bottom: 15px;
        background-color: white;
    }
    
    .input-group-4 select:focus {
        outline: none;
        border-color: #2980b9;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    }
    
    .btn.deposit-btn {
        background-color: #3498db;
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 16px;
        font-weight: 600;
        width: 100%;
        margin-top: 20px;
        transition: background-color 0.3s;
    }
    
    .btn.deposit-btn:hover {
        background-color: #2980b9;
    }
    
    .form-control input {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 5px;
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .form-control label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #2c3e50;
    }
    
    .currency {
        color: #7f8c8d;
        font-size: 14px;
    }
    
    /* ==============================================
   DAILY REWARDS SYSTEM - FULLY RESPONSIVE
   ============================================== */

/* === BASE CONTAINER === */
.rewards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* === REWARD CARD === */
.reward-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-left: 5px solid #3498db;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.reward-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(52, 152, 219, 0.03), transparent);
    z-index: 0;
}

.reward-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    display: inline-block;
}

/* === REWARD INPUT GROUP === */
.reward-input-group {
    display: flex;
    gap: 10px;
    margin: 25px 0;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.reward-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    text-transform: uppercase;
    font-family: 'Roboto Mono', 'Courier New', monospace;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    min-width: 200px;
    box-sizing: border-box;
}

.reward-input-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.reward-input-group button {
    padding: 14px 24px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reward-input-group button:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
}

.reward-input-group button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* === REWARD STATUS MESSAGES === */
.reward-status {
    margin: 20px 0;
    padding: 16px;
    border-radius: 10px;
    font-weight: 500;
    text-align: left;
    display: none;
    position: relative;
    z-index: 1;
    animation: slideDown 0.3s ease;
}

.reward-status.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #15572425;
    display: block;
}

.reward-status.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid #721c2425;
    display: block;
}

.reward-status.pending {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 2px solid #85640425;
    display: block;
}

/* === REWARD INFO SECTION === */
.reward-info {
    background: linear-gradient(135deg, #e8f4fc, #d4eaf7);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(52, 152, 219, 0.1);
}

.reward-info p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: #2c3e50;
    line-height: 1.5;
}

.reward-info i {
    color: #3498db;
    margin-right: 8px;
    width: 20px;
}

/* === CLAIMED REWARDS SECTION === */
.claimed-rewards {
    margin-top: 30px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.claimed-rewards h5 {
    border-bottom: 2px solid #eef5fc;
    padding-bottom: 12px;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
    flex-wrap: wrap;
    gap: 10px;
}

.reward-item:hover {
    background: #f8fbfe;
    border-radius: 8px;
    margin: 0 -10px;
    padding: 16px 20px;
}

.reward-item:last-child {
    border-bottom: none;
}

.reward-code-display {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: 1px;
    font-size: 1.1rem;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
}

.reward-amount {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2rem;
    background: rgba(39, 174, 96, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
}

.reward-date {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 4px;
    width: 100%;
}

/* === ADMIN REWARDS CONTAINER === */
.admin-rewards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

/* === CREATE REWARD SECTION === */
.create-reward-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-top: 5px solid #3498db;
}

.reward-codes-section,
.reward-history-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-top: 5px solid #3498db;
}

/* === REWARD STATS === */
.reward-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.reward-stats .stat-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
}

.reward-stats .stat-card:hover {
    transform: translateY(-3px);
}

.reward-stats .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1;
}

.reward-stats .stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === REWARD CODE ITEMS === */
.reward-code-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.reward-code-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

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

.reward-code {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: 2px;
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.reward-amount-badge {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: bold;
    min-width: 100px;
    text-align: center;
}

.reward-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
}

.reward-details div {
    display: flex;
    flex-direction: column;
}

.reward-details span:first-child {
    font-weight: 600;
    color: #5d6d7e;
    margin-bottom: 4px;
}

/* === REWARD ACTIONS === */
.reward-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.reward-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.reward-actions button:first-child {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.reward-actions button:last-child {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.reward-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* === REDEEMED USERS === */
.redeemed-users {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eef5fc;
}

.redeemed-user {
    background: linear-gradient(135deg, #e8f4fc, #d4eaf7);
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.redeemed-user:not(:last-child) {
    margin-bottom: 10px;
}

.redeemed-username {
    font-weight: bold;
    color: #2c3e50;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
}

.redeemed-date {
    color: #7f8c8d;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.7);
    padding: 4px 10px;
    border-radius: 4px;
}

/* === STATUS BADGES === */
.expired-badge,
.limit-reached-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 10px;
    display: inline-block;
}

.expired-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.limit-reached-badge {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

/* === NO REWARDS STATE === */
.no-rewards {
    text-align: center;
    color: #7f8c8d;
    padding: 40px 20px;
    font-style: italic;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 2px dashed #bdc3c7;
}

.no-rewards i {
    font-size: 3rem;
    color: #bdc3c7;
    margin-bottom: 15px;
    display: block;
}

/* === ANIMATIONS === */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.reward-icon.pulse {
    animation: pulse 2s infinite;
}

/* ==============================================
   RESPONSIVE BREAKPOINTS
   ============================================== */

/* === DESKTOP (1200px and above) === */
@media (min-width: 1200px) {
    .rewards-container {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        gap: 30px;
    }
    
    .admin-rewards-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .reward-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === LARGE TABLET (992px - 1199px) === */
@media (min-width: 992px) and (max-width: 1199px) {
    .rewards-container {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
        gap: 25px;
    }
    
    .admin-rewards-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .reward-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reward-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === TABLET (768px - 991px) === */
@media (min-width: 768px) and (max-width: 991px) {
    .rewards-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .admin-rewards-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }
    
    .reward-card,
    .create-reward-section,
    .reward-codes-section,
    .reward-history-section {
        padding: 20px;
    }
    
    .reward-input-group {
        flex-direction: column;
    }
    
    .reward-input-group input,
    .reward-input-group button {
        width: 100%;
    }
    
    .reward-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reward-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reward-actions {
        flex-direction: column;
    }
    
    .reward-actions button {
        width: 100%;
    }
}

/* === MOBILE LANDSCAPE (576px - 767px) === */
@media (min-width: 576px) and (max-width: 767px) {
    .rewards-container {
        padding: 0 12px;
        gap: 18px;
    }
    
    .admin-rewards-container {
        padding: 0 12px;
        gap: 20px;
    }
    
    .reward-card,
    .create-reward-section,
    .reward-codes-section,
    .reward-history-section {
        padding: 18px;
        border-radius: 14px;
    }
    
    .reward-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .reward-input-group {
        flex-direction: column;
        margin: 20px 0;
    }
    
    .reward-input-group input,
    .reward-input-group button {
        width: 100%;
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .reward-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .reward-stats .stat-card {
        padding: 18px;
    }
    
    .reward-stats .stat-value {
        font-size: 1.6rem;
    }
    
    .reward-code-item {
        padding: 18px;
    }
    
    .reward-code-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .reward-code {
        font-size: 1.1rem;
        padding: 6px 12px;
    }
    
    .reward-amount-badge {
        align-self: flex-start;
        padding: 6px 14px;
        font-size: 0.9rem;
    }
    
    .reward-details {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
    }
    
    .reward-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .reward-actions button {
        width: 100%;
        padding: 12px;
    }
    
    .redeemed-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* === SMALL MOBILE (up to 575px) === */
@media (max-width: 575px) {
    .rewards-container {
        padding: 0 10px;
        gap: 15px;
    }
    
    .admin-rewards-container {
        padding: 0 10px;
        gap: 15px;
    }
    
    .reward-card,
    .create-reward-section,
    .reward-codes-section,
    .reward-history-section {
        padding: 15px;
        border-radius: 12px;
    }
    
    .reward-icon {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }
    
    .reward-input-group {
        flex-direction: column;
        margin: 18px 0;
        gap: 12px;
    }
    
    .reward-input-group input,
    .reward-input-group button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .reward-status {
        padding: 14px;
        font-size: 0.95rem;
    }
    
    .reward-info {
        padding: 16px;
        margin: 16px 0;
    }
    
    .reward-info p {
        font-size: 0.9rem;
    }
    
    .claimed-rewards {
        margin-top: 20px;
    }
    
    .claimed-rewards h5 {
        font-size: 1.2rem;
    }
    
    .reward-item {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .reward-code-display {
        font-size: 1rem;
        padding: 5px 10px;
    }
    
    .reward-amount {
        font-size: 1.1rem;
        padding: 5px 10px;
    }
    
    .reward-date {
        font-size: 0.8rem;
    }
    
    .reward-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .reward-stats .stat-card {
        padding: 15px;
    }
    
    .reward-stats .stat-value {
        font-size: 1.5rem;
    }
    
    .reward-code-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .reward-code {
        font-size: 1rem;
        padding: 6px 10px;
    }
    
    .reward-details {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }
    
    .reward-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .reward-actions button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .redeemed-users {
        padding-top: 15px;
    }
    
    .redeemed-user {
        padding: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .no-rewards {
        padding: 30px 15px;
    }
    
    .no-rewards i {
        font-size: 2.5rem;
    }
}

/* === EXTRA SMALL DEVICES (up to 375px) === */
@media (max-width: 375px) {
    .rewards-container,
    .admin-rewards-container {
        padding: 0 8px;
    }
    
    .reward-card,
    .create-reward-section,
    .reward-codes-section,
    .reward-history-section {
        padding: 12px;
    }
    
    .reward-icon {
        font-size: 2rem;
    }
    
    .reward-input-group input,
    .reward-input-group button {
        padding: 10px;
        font-size: 13px;
    }
    
    .reward-stats .stat-value {
        font-size: 1.3rem;
    }
    
    .reward-code {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .reward-card,
    .create-reward-section,
    .reward-codes-section,
    .reward-history-section {
        background: #2d3436;
        color: #ecf0f1;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .reward-info {
        background: rgba(52, 152, 219, 0.1);
        border-color: rgba(52, 152, 219, 0.2);
    }
    
    .reward-info p {
        color: #bdc3c7;
    }
    
    .reward-code-display {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .reward-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .reward-stats .stat-card {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .reward-stats .stat-value {
        color: #ecf0f1;
    }
    
    .reward-stats .stat-label {
        color: #bdc3c7;
    }
    
    .reward-code-item {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .reward-details {
        background: rgba(255, 255, 255, 0.03);
    }
    
    .no-rewards {
        background: rgba(255, 255, 255, 0.05);
        border-color: #555;
    }
}

/* === REDUCED MOTION SUPPORT === */
@media (prefers-reduced-motion: reduce) {
    .reward-card,
    .reward-card:hover,
    .reward-input-group button,
    .reward-actions button,
    .reward-code-item,
    .reward-stats .stat-card {
        transition: none;
        transform: none;
        animation: none;
    }
    
    .reward-icon.pulse {
        animation: none;
    }
}

/* === PRINT STYLES === */
@media print {
    .reward-card,
    .create-reward-section,
    .reward-codes-section,
    .reward-history-section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .reward-input-group button,
    .reward-actions button {
        display: none;
    }
    
    .reward-status {
        border: 1px solid #000;
    }
}

/* === TOUCH DEVICE OPTIMIZATION === */
@media (hover: none) and (pointer: coarse) {
    .reward-card:hover,
    .reward-stats .stat-card:hover,
    .reward-code-item:hover {
        transform: none;
    }
    
    .reward-input-group button,
    .reward-actions button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .reward-item {
        padding: 20px 16px;
    }
}

/* Enhanced Terms Modal Styles */
.terms-modal-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.terms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 10px 10px 0 0;
}

.header-content h2 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
}

.header-content p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.terms-search-nav {
    padding: 15px 20px;
    background: var(--light-bg);
    border-bottom: 1px solid var(--light-gray);
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
}

.quick-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.quick-nav-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.terms-tabs-nav {
    padding: 0 20px;
    background: white;
    border-bottom: 1px solid var(--light-gray);
}

.tabs-container {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 10px 0;
}

.terms-tab {
    padding: 12px 20px;
    background: var(--light-bg);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

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

.terms-tab:hover:not(.active) {
    background: var(--primary-light);
    color: white;
}

.terms-content-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.terms-sidebar {
    width: 250px;
    background: var(--light-bg);
    border-right: 1px solid var(--light-gray);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.sidebar-header h4 {
    margin: 0;
    color: var(--primary-dark);
}

.toc-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.toc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--dark-gray);
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.toc-item:hover {
    background: rgba(113, 103, 255, 0.1);
    border-left-color: var(--primary);
}

.toc-item.active {
    background: rgba(113, 103, 255, 0.15);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--light-gray);
}

.acceptance-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--danger);
    font-weight: 500;
}

.acceptance-status i {
    font-size: 1.2rem;
}

.terms-main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.terms-tab-content {
    display: none;
}

.terms-tab-content.active {
    display: block;
}

.terms-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

.section-header h3 {
    margin: 0;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
}

.section-copy {
    background: var(--light-bg);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray);
}

.section-content p {
    line-height: 1.6;
    color: var(--dark-gray);
    margin-bottom: 20px;
}

.terms-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--primary);
}

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

.card-content h4 {
    margin: 0 0 8px 0;
    color: var(--primary-dark);
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
}

.requirement-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.security-list {
    margin: 20px 0;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}

.security-item:last-child {
    border-bottom: none;
}

.security-item i {
    color: var(--primary);
}

.warning-box {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

.warning-icon {
    color: #ffc107;
    font-size: 1.5rem;
}

.risk-disclosure {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}

.risk-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #dc3545;
}

.investment-table {
    overflow-x: auto;
    margin: 20px 0;
}

.investment-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.investment-table th {
    background: var(--primary);
    color: white;
    padding: 15px;
    text-align: left;
}

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

.risk-high, .risk-medium, .risk-low {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.risk-high {
    background: #f8d7da;
    color: #dc3545;
}

.risk-medium {
    background: #fff3cd;
    color: #856404;
}

.certification-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 10px;
    margin: 20px 0;
}

.certification-banner i {
    font-size: 2.5rem;
}

.certification-details {
    margin: 20px 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    margin-bottom: 10px;
}

.financial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.financial-card {
    padding: 20px;
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.financial-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--primary);
}

.financial-card ul {
    padding-left: 20px;
    margin: 0;
}

.financial-card li {
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.processing-schedule {
    margin: 30px 0;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.schedule-day {
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    text-align: center;
}

.schedule-day .day {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.profit-table {
    overflow-x: auto;
    margin: 20px 0;
}

.profit-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.profit-table th {
    background: var(--primary);
    color: white;
    padding: 15px;
    text-align: left;
}

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

.profit-rate {
    color: var(--success);
    font-weight: 600;
}

.note-box {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 8px;
    margin-top: 20px;
}

.note-box i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 3px;
}

.fees-table {
    margin: 20px 0;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.fee-item:last-child {
    border-bottom: none;
}

.fee-type {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark-gray);
}

.fee-amount {
    color: var(--primary);
    font-weight: 600;
}

.privacy-statement {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 10px;
    margin: 20px 0;
}

.privacy-statement i {
    color: var(--primary);
    font-size: 2rem;
}

.privacy-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.privacy-point {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
}

.jurisdiction-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 10px;
    margin: 20px 0;
}

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

.terms-acceptance-footer {
    padding: 20px;
    background: var(--light-bg);
    border-top: 1px solid var(--light-gray);
    border-radius: 0 0 10px 10px;
}

.acceptance-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.checkbox-container label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--dark-gray);
}

.acceptance-actions {
    display: flex;
    gap: 10px;
}

.acceptance-note {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 0.9rem;
}

.acceptance-note i {
    color: var(--primary);
}

/* Scrollbar Styling */
.terms-main-content::-webkit-scrollbar {
    width: 8px;
}

.terms-main-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.terms-main-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.terms-main-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .terms-modal-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .terms-content-container {
        flex-direction: column;
    }
    
    .terms-sidebar {
        width: 100%;
        height: 200px;
    }
    
    .acceptance-content {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .acceptance-actions {
        justify-content: flex-end;
    }
}

/* Add highlight style for search */
mark {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* Additional CSS for new elements */
.account-rules, .privacy-points, .collection-grid {
    margin: 20px 0;
}

.rule-item, .privacy-point, .collection-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    margin-bottom: 10px;
}

.verification-process, .dispute-resolution, .data-usage {
    margin: 20px 0;
}

.verification-process ol, .dispute-resolution ol {
    padding-left: 20px;
}

.verification-process li, .dispute-resolution li {
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.violation-list {
    margin: 20px 0;
}

.violation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--light-gray);
}

.violation-type {
    color: var(--dark-gray);
}

.violation-action {
    color: var(--danger);
    font-weight: 600;
}

.fee-explanation, .liability-details {
    margin-top: 20px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--primary-dark);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification.info {
    border-left: 4px solid var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Referral Earnings Approvals Styles */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 800;
    margin-top: 5px;
}

.filters-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 10px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #3498db;
    outline: none;
}

.info-box {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    border: 2px solid rgba(52, 152, 219, 0.2);
}

.info-box h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-box li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
    color: #5d6d7e;
}

.info-box li:last-child {
    border-bottom: none;
}

.info-box li strong {
    color: #2c3e50;
}

/* Table Actions */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-approve-sm {
    background: #27ae60;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-approve-sm:hover {
    background: #219653;
    transform: translateY(-2px);
}

.btn-reject-sm {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-reject-sm:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-approved {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-rejected {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.bonus-type {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.type-referral {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.type-deposit {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}


/* Reward System Styles */
.reward-status {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 600;
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

.reward-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading States */
.loading-rewards {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-style: italic;
}

/* No Rewards State */
.no-rewards, .error-rewards {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.no-rewards i, .error-rewards i {
    display: block;
    margin-bottom: 15px;
}

/* Rewards History List */
.rewards-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reward-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.reward-history-item:hover {
    transform: translateX(5px);
}

.reward-history-info {
    flex: 1;
}

.reward-history-code {
    font-weight: 600;
    color: #2c3e50;
    font-family: monospace;
    letter-spacing: 1px;
}

.reward-history-date {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

.reward-history-amount {
    font-weight: 700;
    color: #27ae60;
    font-size: 18px;
}

/* Admin Reward Codes Grid */
.reward-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.reward-code-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reward-code-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.reward-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f8ff;
}

.reward-code-display {
    font-family: monospace;
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    letter-spacing: 2px;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 5px;
}

.reward-amount-badge {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
}

.reward-code-details {
    margin: 15px 0;
}

.reward-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.reward-detail:last-child {
    border-bottom: none;
}

.detail-label {
    color: #7f8c8d;
    font-weight: 600;
}

.detail-value {
    color: #2c3e50;
    font-weight: 600;
}

/* Status Badges */
.expired-badge, .limit-reached-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 10px 0;
}

.expired-badge {
    background: #f39c12;
    color: white;
}

.limit-reached-badge {
    background: #e74c3c;
    color: white;
}

/* Redeemed Users Section */
.redeemed-users-section {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.redeemed-users-section h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 14px;
}

.redeemed-users-list {
    max-height: 150px;
    overflow-y: auto;
}

.redeemed-user-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: white;
    margin-bottom: 5px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
}

.redeemed-date {
    font-size: 12px;
    color: #7f8c8d;
}

.no-redemptions {
    text-align: center;
    padding: 10px;
    color: #95a5a6;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 5px;
    margin: 10px 0;
}

/* Reward Actions */
.reward-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-action {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-btn {
    background: #3498db;
    color: white;
}

.copy-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.deactivate-btn {
    background: #e74c3c;
    color: white;
}

.deactivate-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Redemption History */
.redemption-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.redemption-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #9b59b6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.redemption-info {
    flex: 1;
}

.redemption-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.redemption-user strong {
    color: #2c3e50;
}

.redemption-code {
    font-family: monospace;
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    color: #7f8c8d;
}

.redemption-time {
    font-size: 12px;
    color: #7f8c8d;
}

.redemption-transaction {
    font-size: 11px;
    color: #95a5a6;
    margin-top: 5px;
    font-family: monospace;
}

.redemption-amount {
    font-weight: 700;
    color: #9b59b6;
    font-size: 18px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .reward-codes-grid {
        grid-template-columns: 1fr;
    }
    
    .reward-code-display {
        font-size: 20px;
    }
    
    .reward-actions {
        flex-direction: column;
    }
    
    .reward-history-item, .redemption-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .reward-history-amount, .redemption-amount {
        align-self: flex-end;
    }
}

/* Referral Earnings Description Styles */
.referral-earnings-description {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #3498db;
}

.description-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.description-header h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.description-header p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

.earnings-process {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.process-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateX(5px);
}

.step-number {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-content p {
    color: #5d6d7e;
    line-height: 1.6;
    margin-bottom: 15px;
}

.code-example {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px dashed #3498db;
    text-align: center;
    margin-top: 10px;
}

.commission-rates {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.amount-range {
    font-weight: 600;
    color: #2c3e50;
}

.commission-rate {
    background: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.earnings-example {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
}

.earning-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.earning-detail:last-child {
    border-bottom: none;
}

.highlight {
    color: #27ae60;
    font-weight: bold;
    font-size: 18px;
}

.chat-instructions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.instruction-item i {
    color: #3498db;
    width: 20px;
}

code {
    background: #2c3e50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.approval-steps {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.approval-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #5d6d7e;
}

.approval-steps li i {
    color: #27ae60;
}

.processing-time {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #856404;
}

.earnings-requirements {
    margin-bottom: 30px;
}

.earnings-requirements h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #e74c3c;
}

.requirement-item i {
    font-size: 24px;
    color: #e74c3c;
    width: 40px;
    text-align: center;
}

.requirement-item h5 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.requirement-item p {
    color: #7f8c8d;
    margin: 0;
    font-size: 14px;
}

.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.btn-action {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-action:hover {
    background: linear-gradient(135deg, #2980b9, #1f639e);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.important-notes {
    margin-bottom: 30px;
}

.important-notes h4 {
    color: #e74c3c;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.note-item i {
    color: #e74c3c;
    margin-top: 2px;
}

.note-item p {
    margin: 0;
    color: #5d6d7e;
    line-height: 1.5;
}

.support-contact {
    text-align: center;
}

.contact-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}

.contact-card h5 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.contact-method i {
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .referral-earnings-description {
        padding: 20px;
    }
    
    .process-step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .requirements-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-method {
        justify-content: center;
    }
}

/* High contrast mode */
.high-contrast {
    filter: contrast(1.5);
    background: #000;
    color: #fff;
}

/* Screen reader support */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== USER AVATAR STYLES ========== */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-avatar.small {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.user-avatar.medium {
    width: 50px;
    height: 50px;
    font-size: 22px;
}

.user-avatar.large {
    width: 70px;
    height: 70px;
    font-size: 30px;
}

.user-avatar.x-large {
    width: 100px;
    height: 100px;
    font-size: 42px;
}

/* Avatar colors based on username */
.user-avatar.color-1 { background: linear-gradient(135deg, #3498db, #2980b9); }
.user-avatar.color-2 { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.user-avatar.color-3 { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.user-avatar.color-4 { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.user-avatar.color-5 { background: linear-gradient(135deg, #f39c12, #d35400); }
.user-avatar.color-6 { background: linear-gradient(135deg, #1abc9c, #16a085); }
.user-avatar.color-7 { background: linear-gradient(135deg, #34495e, #2c3e50); }
.user-avatar.color-8 { background: linear-gradient(135deg, #e67e22, #d35400); }

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.user-avatar.online::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #2ecc71;
    border: 2px solid white;
    border-radius: 50%;
}

/* Avatar in sidebar */
.sidebar-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Avatar in header */
.header-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.header-avatar .user-info {
    display: flex;
    flex-direction: column;
}

.header-avatar .username {
    font-weight: 600;
    font-size: 14px;
}

.header-avatar .user-role {
    font-size: 12px;
    color: #7f8c8d;
}

/* Avatar in dropdown */
.dropdown-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

/* Avatar in cards */
.card-avatar {
    width: 35px;
    height: 35px;
    font-size: 16px;
}

/* Investment Plans Styles */
.investments-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.investments-header h3 {
    margin: 0;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.investments-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 10px;
}

/* Investment Plans Grid */
.investment-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.investment-plan-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
}

.investment-plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.investment-plan-card.copper {
    border-color: #e67e22;
}

.investment-plan-card.gold {
    border-color: #f1c40f;
}

.investment-plan-card.tanzanite {
    border-color: #9b59b6;
}

.investment-plan-card.diamond {
    border-color: #3498db;
}

.plan-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.plan-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.copper-icon {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.gold-icon {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
}

.tanzanite-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.diamond-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.plan-title h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
}

.plan-minimum {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

.plan-minimum .amount {
    font-weight: bold;
    color: #2c3e50;
}

.plan-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge.entry {
    background: #e67e22;
    color: white;
}

.plan-badge.popular {
    background: #f1c40f;
    color: #2c3e50;
}

.plan-badge.exclusive {
    background: #9b59b6;
    color: white;
}

.plan-badge.premium {
    background: #3498db;
    color: white;
}

.plan-details {
    padding: 0 20px 20px;
}

.return-rate {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f1f1;
}

.rate-days {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.rate {
    text-align: center;
}

.rate .value {
    font-size: 32px;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.rate .label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.divider {
    color: #bdc3c7;
}

.average-rate {
    font-size: 14px;
    color: #7f8c8d;
}

.average-rate strong {
    color: #27ae60;
    font-size: 16px;
}

.plan-features {
    margin-bottom: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.feature-item i {
    color: #27ae60;
    font-size: 14px;
}

.profit-calculation {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.profit-calculation h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.calculation-grid {
    display: grid;
    gap: 10px;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px dashed #dee2e6;
    font-size: 14px;
}

.calc-item:last-child {
    border-bottom: none;
}

.calc-item.total {
    font-size: 16px;
    font-weight: bold;
    color: #27ae60;
}

.plan-actions {
    display: flex;
    gap: 10px;
}

.btn-invest {
    flex: 2;
    padding: 12px;
    background: linear-gradient(135deg, #27ae60, #219653);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-invest:hover {
    background: linear-gradient(135deg, #219653, #1e8449);
    transform: translateY(-2px);
}

.btn-details {
    flex: 1;
    padding: 12px;
    background: #f8f9fa;
    color: #2c3e50;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-details:hover {
    background: #e9ecef;
    border-color: #3498db;
    color: #3498db;
}

/* Comparison Table */
.investment-comparison {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.section-header {
    margin-bottom: 25px;
}

.section-header h4 {
    color: #2c3e50;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.comparison-table-container {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table thead {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.comparison-table th {
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table tbody tr {
    border-bottom: 1px solid #e9ecef;
}

.comparison-table tbody tr:hover {
    background: #f8fbfe;
}

.comparison-table td {
    padding: 15px;
    color: #2c3e50;
    font-size: 14px;
}

.comparison-table td:first-child {
    font-weight: 600;
    background: #f8f9fa;
}

/* Investment Calculator */
.investment-calculator {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
}

.calculator-inputs {
    padding-right: 30px;
    border-right: 2px solid #f1f1f1;
}

@media (max-width: 768px) {
    .calculator-inputs {
        padding-right: 0;
        border-right: none;
        padding-bottom: 30px;
        border-bottom: 2px solid #f1f1f1;
    }
}

.calc-input-group {
    margin-bottom: 20px;
}

.calc-input-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.calc-input-group select,
.calc-input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.calc-input-group select:focus,
.calc-input-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.calculator-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.result-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e9ecef;
}

.result-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.result-value {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.result-value.highlight {
    color: #27ae60;
    font-size: 24px;
}

.btn-calc-invest {
    grid-column: span 2;
    padding: 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    margin-top: 10px;
}

.btn-calc-invest:hover {
    background: linear-gradient(135deg, #2980b9, #1c6ea4);
    transform: translateY(-2px);
}

/* FAQ Section */
.investment-faq {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

.faq-item {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #3498db;
}

.faq-question {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.faq-question span {
    flex: 1;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    margin: 0 0 15px 0;
    color: #2c3e50;
    line-height: 1.6;
}

.faq-answer ul {
    margin: 10px 0;
    padding-left: 20px;
}

.faq-answer li {
    margin-bottom: 8px;
    color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .investment-plans-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-actions {
        flex-direction: column;
    }
    
    .comparison-table-container {
        margin: 0 -25px;
        padding: 0 25px;
    }
}

/* ==============================================
   ADMIN CALCULATOR - ULTRA RESPONSIVE & ADAPTIVE
   ============================================== */

/* === BASE MOBILE-FIRST STYLES === */
.content-section#admin-calculator {
    padding: clamp(1rem, 4vw, 2.5rem);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
    box-sizing: border-box;
}

.content-section#admin-calculator .section-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    font-weight: 800;
    color: #1a365d;
    margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
}

.content-section#admin-calculator .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(80px, 25vw, 150px);
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
}

/* Calculator Container */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 1400px;
    margin: 0 auto;
}

/* Calculator Card */
.calculator-card {
    background: white;
    border-radius: clamp(12px, 3vw, 20px);
    padding: clamp(1.25rem, 4vw, 2rem);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.calculator-card h3 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    color: #2c3e50;
    margin-bottom: clamp(1.25rem, 4vw, 1.75rem);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.calculator-card h3 i {
    color: #3498db;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
}

/* Calculator Form */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3vw, 1.5rem);
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label::before {
    content: '•';
    color: #3498db;
    font-size: 1.2rem;
}

.form-group input {
    padding: clamp(0.75rem, 2.5vw, 1rem);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #2d3748;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background: white;
}

.form-group input::placeholder {
    color: #a0aec0;
    opacity: 0.7;
}

/* Calculator Options */
.calculator-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2rem);
    margin: clamp(1rem, 3vw, 1.5rem) 0;
}

.option-group {
    background: #f8fbfe;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: clamp(1rem, 3vw, 1.5rem);
    transition: transform 0.3s ease;
}

.option-group:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.option-group h4 {
    font-size: clamp(1.1rem, 3.5vw, 1.3rem);
    color: #2c3e50;
    margin-bottom: clamp(1rem, 3vw, 1.25rem);
    font-weight: 600;
}

/* Calculate Buttons */
.btn-calculate {
    padding: clamp(0.75rem, 2.5vw, 1rem) clamp(1.25rem, 4vw, 1.75rem);
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
}

.btn-calculate:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-calculate:active {
    transform: translateY(0);
}

.btn-calculate i {
    font-size: 1.1rem;
}

/* Calculator Results */
.calculator-results {
    background: linear-gradient(135deg, #f0f9ff, #e6f2ff);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 12px;
    padding: clamp(1rem, 3vw, 1.5rem);
    margin: clamp(1rem, 3vw, 1.5rem) 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 2.5vw, 1rem) 0;
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    color: #2c3e50;
    font-weight: 600;
}

.result-value {
    font-size: clamp(1rem, 3.5vw, 1.2rem);
    color: #2c3e50;
    font-weight: 700;
    text-align: right;
}

.result-value#percentage-amount-result {
    color: #27ae60;
}

.result-value#percentage-result {
    color: #3498db;
}

.result-value#total-amount-result {
    color: #9b59b6;
}

/* Calculator Actions */
.calculator-actions {
    display: flex;
    gap: clamp(0.75rem, 2.5vw, 1rem);
    margin-top: clamp(1rem, 3vw, 1.5rem);
}

.btn-reset {
    flex: 1;
    padding: clamp(0.75rem, 2.5vw, 1rem);
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-reset:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-copy {
    flex: 1;
    padding: clamp(0.75rem, 2.5vw, 1rem);
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-copy:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

/* Calculator History */
.calculator-history {
    background: white;
    border-radius: clamp(12px, 3vw, 20px);
    padding: clamp(1.25rem, 4vw, 2rem);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.calculator-history h4 {
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    color: #2c3e50;
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.calculator-history h4 i {
    color: #3498db;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.history-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #4a5568;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item .history-datetime {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.history-item .history-calculation {
    font-weight: 600;
    color: #2c3e50;
}

.history-item .history-result {
    color: #27ae60;
    font-weight: 600;
}

.btn-clear-history {
    width: 100%;
    padding: clamp(0.75rem, 2.5vw, 1rem);
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-clear-history:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

/* === RESPONSIVE BREAKPOINTS === */

/* Level 1: Ultra Small Mobile (≤320px) - Foldable devices */
@media (max-width: 320px) {
    .content-section#admin-calculator {
        padding: 0.75rem;
    }
    
    .calculator-card,
    .calculator-history {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .calculator-actions {
        flex-direction: column;
    }
    
    .btn-reset,
    .btn-copy {
        width: 100%;
    }
}

/* Level 2: Small Mobile (321px - 375px) */
@media (min-width: 321px) and (max-width: 375px) {
    .calculator-card h3,
    .calculator-history h4 {
        font-size: 1.1rem;
    }
}

/* Level 3: Standard Mobile (376px - 479px) */
@media (min-width: 376px) and (max-width: 479px) {
    .calculator-options {
        gap: 1.25rem;
    }
    
    .option-group {
        padding: 1.25rem;
    }
}

/* Level 4: Large Mobile (480px - 599px) */
@media (min-width: 480px) {
    .calculator-container {
        gap: 2rem;
    }
    
    .calculator-card h3 {
        font-size: 1.5rem;
    }
    
    .calculator-history h4 {
        font-size: 1.3rem;
    }
    
    .form-group input {
        font-size: 1.05rem;
    }
}

/* Level 5: Mobile Landscape & Small Tablet (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .calculator-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .calculator-results {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        border-bottom: none;
        border-right: 1px solid rgba(52, 152, 219, 0.1);
        padding: 0.75rem;
    }
    
    .result-item:last-child {
        border-right: none;
    }
    
    .result-value {
        text-align: left;
        margin-top: 0.25rem;
    }
}

/* Level 6: Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .calculator-container {
        grid-template-columns: 2fr 1fr;
    }
    
    .calculator-card h3 {
        font-size: 1.6rem;
    }
    
    .calculator-history {
        align-self: start;
    }
}

/* Level 7: Tablet Landscape & Small Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .content-section#admin-calculator {
        padding: 3rem;
    }
    
    .calculator-card {
        padding: 2.5rem;
    }
    
    .calculator-history {
        padding: 2.5rem;
    }
}

/* Level 8: Desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .calculator-container {
        max-width: 1200px;
    }
    
    .calculator-card h3 {
        font-size: 1.8rem;
    }
    
    .calculator-history h4 {
        font-size: 1.5rem;
    }
}

/* Level 9: Large Desktop (1440px - 1919px) */
@media (min-width: 1440px) {
    .content-section#admin-calculator {
        padding: 4rem;
    }
    
    .calculator-container {
        gap: 3rem;
    }
    
    .calculator-card,
    .calculator-history {
        padding: 3rem;
    }
}

/* Level 10: Ultra Large Desktop (1920px and above) */
@media (min-width: 1920px) {
    .content-section#admin-calculator {
        padding: 5rem;
    }
    
    .calculator-container {
        max-width: 1600px;
    }
    
    .calculator-card h3 {
        font-size: 2rem;
    }
}

/* === SPECIAL DEVICE CONSIDERATIONS === */

/* Foldable Devices (Dual Screen) */
@media (max-width: 280px) {
    .content-section#admin-calculator {
        padding: 0.5rem;
    }
    
    .calculator-card,
    .calculator-history {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .calculator-card h3 {
        font-size: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .btn-calculate,
    .btn-reset,
    .btn-copy,
    .btn-clear-history {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .content-section#admin-calculator {
        min-height: auto;
        padding: 1rem;
    }
    
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculator-card h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .calculator-form {
        gap: 0.75rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .calculator-card:hover {
        transform: none;
    }
    
    .btn-calculate,
    .btn-reset,
    .btn-copy,
    .btn-clear-history {
        min-height: 44px;
        padding: 1rem;
    }
    
    .form-group input {
        min-height: 44px;
        font-size: 16px; /* Prevent iOS zoom */
    }
}

/* High-density screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .calculator-card,
    .calculator-history {
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    }
}

/* === ACCESSIBILITY FEATURES === */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .calculator-card,
    .calculator-card:hover,
    .btn-calculate,
    .btn-reset,
    .btn-copy,
    .btn-clear-history,
    .option-group {
        transition: none;
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .calculator-card,
    .calculator-history {
        border: 2px solid #000;
        background: #fff;
    }
    
    .calculator-results {
        border: 2px solid #000;
    }
    
    .form-group input {
        border: 2px solid #000;
    }
    
    .btn-calculate {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .content-section#admin-calculator {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .calculator-card,
    .calculator-history {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .calculator-card h3,
    .calculator-history h4 {
        color: #e2e8f0;
    }
    
    .form-group label {
        color: #cbd5e0;
    }
    
    .form-group input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .form-group input::placeholder {
        color: #a0aec0;
    }
    
    .form-group input:focus {
        background: #2d3748;
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
    }
    
    .option-group {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .calculator-results {
        background: linear-gradient(135deg, #2d3748, #4a5568);
        border-color: rgba(52, 152, 219, 0.3);
    }
    
    .result-label {
        color: #cbd5e0;
    }
    
    .result-value {
        color: #e2e8f0;
    }
    
    .history-list {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .history-item {
        color: #cbd5e0;
        border-color: #4a5568;
    }
    
    .history-item .history-calculation {
        color: #e2e8f0;
    }
}

/* === PRINT STYLES === */
@media print {
    .content-section#admin-calculator {
        background: white !important;
        padding: 1rem !important;
        min-height: auto !important;
    }
    
    .calculator-card,
    .calculator-history {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
    
    .btn-calculate,
    .btn-reset,
    .btn-copy,
    .btn-clear-history {
        display: none !important;
    }
}

/* === LOADING STATE === */
.form-group.loading input {
    position: relative;
    overflow: hidden;
}

.form-group.loading input::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* === FOCUS STATES FOR ACCESSIBILITY === */
.btn-calculate:focus-visible,
.btn-reset:focus-visible,
.btn-copy:focus-visible,
.btn-clear-history:focus-visible {
    outline: 3px solid #3498db;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(52, 152, 219, 0.3);
}

.form-group input:focus-visible {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* === CUSTOM SCROLLBAR FOR HISTORY === */
.history-list.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #3498db #f1f5f9;
}

/* === SUCCESS/ERROR STATES === */
.form-group.success input {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

.form-group.error input {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

/* === RESPONSIVE UTILITY CLASSES === */
.hidden-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: block;
    }
    
    .hidden-desktop {
        display: none;
    }
}

/* === ANIMATIONS FOR RESULTS === */
.result-value.updated {
    animation: resultUpdate 0.5s ease;
}

@keyframes resultUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* === CURRENCY FORMATTING STYLES === */
.currency-symbol {
    font-weight: 600;
    color: #3498db;
    margin-right: 0.25rem;
}

/* === RESPONSIVE TYPOGRAPHY FOR RESULTS === */
.result-value.large {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
}

.result-value.xlarge {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
}

/* ==============================================
   ADMIN WITHDRAWAL CALCULATOR - RESPONSIVE & ADAPTIVE
   ============================================== */

/* === BASE MOBILE-FIRST STYLES === */
.admin-calculator-container {
    width: 100%;
    max-width: clamp(320px, 95vw, 500px);
    margin: 0 auto;
    padding: clamp(1rem, 4vw, 1.5rem);
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: clamp(10px, 3vw, 15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.admin-calculator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9, #2c3e50);
    z-index: 1;
}

.admin-calculator-title {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: clamp(1rem, 4vw, 1.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 0.75rem);
}

.admin-calculator-title i {
    color: #3498db;
    font-size: clamp(1.5rem, 6vw, 1.75rem);
}

/* Input Section */
.calculator-input-group {
    margin-bottom: clamp(1.25rem, 5vw, 1.75rem);
}

.calculator-input-label {
    display: block;
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: clamp(0.5rem, 2vw, 0.75rem);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calculator-input-wrapper {
    position: relative;
    width: 100%;
}

.calculator-input {
    width: 100%;
    padding: clamp(0.75rem, 3vw, 1rem) clamp(0.75rem, 3vw, 1rem) clamp(0.75rem, 3vw, 1rem) 2.75rem;
    font-size: clamp(1rem, 4vw, 1.125rem);
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: clamp(8px, 2.5vw, 10px);
    background: #ffffff;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: right;
}

.calculator-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.calculator-input::placeholder {
    color: #95a5a6;
    opacity: 0.7;
}

.calculator-currency {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    font-weight: 600;
    color: #3498db;
    pointer-events: none;
}

/* Results Section */
.calculator-results {
    background: linear-gradient(135deg, #f8fbfe, #f0f7ff);
    border-radius: clamp(8px, 2.5vw, 12px);
    padding: clamp(1rem, 4vw, 1.5rem);
    margin-bottom: clamp(1.25rem, 5vw, 1.75rem);
    border: 2px solid rgba(52, 152, 219, 0.1);
}

.calculator-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 3vw, 1rem) 0;
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

.calculator-result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.calculator-result-item:first-child {
    padding-top: 0;
}

.calculator-result-label {
    font-size: clamp(0.85rem, 3.2vw, 0.95rem);
    color: #5d6d7e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calculator-result-label i {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    width: 1.25rem;
    text-align: center;
}

.calculator-result-value {
    font-size: clamp(1rem, 4vw, 1.125rem);
    font-weight: 700;
    text-align: right;
}

/* Color-coded values */
.calculator-result-value.withdrawal-amount {
    color: #2c3e50;
}

.calculator-result-value.fee-amount {
    color: #e74c3c;
}

.calculator-result-value.net-amount {
    color: #27ae60;
    font-size: clamp(1.1rem, 4.5vw, 1.25rem);
}

.calculator-result-value.percentage {
    color: #9b59b6;
    font-size: clamp(0.9rem, 3.5vw, 1rem);
}

/* Summary Section */
.calculator-summary {
    background: linear-gradient(135deg, #e8f7ee, #d4f2e1);
    border-radius: clamp(8px, 2.5vw, 12px);
    padding: clamp(1rem, 4vw, 1.5rem);
    text-align: center;
    border: 2px solid rgba(39, 174, 96, 0.2);
}

.calculator-summary-title {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    color: #27ae60;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.calculator-summary-amount {
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 800;
    color: #27ae60;
    line-height: 1.2;
}

.calculator-summary-subtitle {
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    color: #5d6d7e;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Calculator Actions */
.calculator-actions {
    display: flex;
    gap: clamp(0.75rem, 3vw, 1rem);
    margin-top: clamp(1.25rem, 5vw, 1.75rem);
}

.calculator-btn {
    flex: 1;
    padding: clamp(0.75rem, 3vw, 1rem);
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    font-weight: 600;
    border: none;
    border-radius: clamp(8px, 2.5vw, 10px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.calculator-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.calculator-btn:hover::before {
    transform: translateX(100%);
}

.calculator-btn.primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.calculator-btn.primary:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.calculator-btn.secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.calculator-btn.secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #95a5a6);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(149, 165, 166, 0.4);
}

.calculator-btn:active {
    transform: scale(0.98);
}

/* === RESPONSIVE BREAKPOINTS === */

/* Level 1: Ultra Small Mobile (≤320px) */
@media (max-width: 320px) {
    .admin-calculator-container {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .calculator-actions {
        flex-direction: column;
    }
    
    .calculator-btn {
        width: 100%;
    }
}

/* Level 2: Small Mobile (321px - 375px) */
@media (min-width: 321px) and (max-width: 375px) {
    .calculator-input {
        font-size: 1rem;
    }
    
    .calculator-result-value {
        font-size: 1rem;
    }
}

/* Level 3: Large Mobile (480px - 599px) */
@media (min-width: 480px) {
    .admin-calculator-container {
        padding: 1.75rem;
        border-radius: 12px;
    }
    
    .calculator-summary-amount {
        font-size: 2.25rem;
    }
}

/* Level 4: Tablet (768px - 991px) */
@media (min-width: 768px) {
    .admin-calculator-container {
        max-width: 600px;
        padding: 2rem;
    }
    
    .calculator-summary-amount {
        font-size: 2.5rem;
    }
}

/* Level 5: Desktop (1200px and above) */
@media (min-width: 1200px) {
    .admin-calculator-container {
        max-width: 550px;
        margin: 2rem auto;
    }
    
    .calculator-summary-amount {
        font-size: 2.75rem;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .admin-calculator-container {
        max-width: 90%;
        margin: 1rem auto;
        padding: 1rem;
    }
    
    .calculator-input-group,
    .calculator-results,
    .calculator-summary {
        margin-bottom: 1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .calculator-btn::before {
        display: none;
    }
    
    .calculator-btn:hover {
        transform: none;
    }
    
    .calculator-btn:active {
        transform: scale(0.95);
    }
    
    .calculator-input {
        font-size: 16px; /* Prevent iOS zoom */
    }
}

/* === ACCESSIBILITY FEATURES === */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .calculator-btn,
    .calculator-input {
        transition: none;
    }
    
    .calculator-btn:hover,
    .calculator-btn:active {
        transform: none;
    }
    
    .calculator-btn::before {
        display: none;
    }
    
    .admin-calculator-container::before {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .admin-calculator-container {
        border: 2px solid black;
        background: white;
    }
    
    .calculator-input {
        border: 2px solid black;
    }
    
    .calculator-results {
        border: 2px solid black;
        background: #f0f0f0;
    }
    
    .calculator-summary {
        border: 2px solid #006400;
        background: #e6ffe6;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .admin-calculator-container {
        background: linear-gradient(135deg, #2c3e50, #34495e);
        border-color: rgba(255, 255, 255, 0.1);
        color: #ecf0f1;
    }
    
    .admin-calculator-title {
        color: #ecf0f1;
    }
    
    .calculator-input {
        background: #34495e;
        border-color: rgba(255, 255, 255, 0.2);
        color: #ecf0f1;
    }
    
    .calculator-results {
        background: linear-gradient(135deg, rgba(52, 73, 94, 0.8), rgba(44, 62, 80, 0.8));
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .calculator-result-label {
        color: #bdc3c7;
    }
    
    .calculator-summary {
        background: linear-gradient(135deg, rgba(39, 174, 96, 0.2), rgba(46, 204, 113, 0.1));
        border-color: rgba(39, 174, 96, 0.3);
    }
    
    .calculator-summary-title {
        color: #2ecc71;
    }
    
    .calculator-summary-amount {
        color: #2ecc71;
    }
}

/* === ANIMATIONS === */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-calculator-container {
    animation: slideIn 0.5s ease-out;
}

/* Loading animation for calculations */
.calculating {
    position: relative;
    overflow: hidden;
}

.calculating::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: loadingShimmer 1s infinite;
}

@keyframes loadingShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* Success animation */
@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.success-animation {
    animation: successPulse 0.5s ease;
}

/* === PRINT STYLES === */
@media print {
    .admin-calculator-container {
        box-shadow: none;
        border: 1px solid #ddd;
        max-width: 100%;
        background: white;
        color: black;
    }
    
    .calculator-actions {
        display: none;
    }
    
    .calculator-input {
        background: white;
        border: 1px solid #ddd;
        color: black;
    }
}

/* Language Toggle Button */
.language-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.language-toggle-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10001;
}

.language-toggle-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.language-toggle-btn i {
    font-size: 1.2rem;
}

#current-language {
    font-weight: bold;
}

/* Ensure the button is visible on all pages */
.login-container .language-toggle-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

.dashboard .language-toggle-container {
    position: fixed;
    top: 90px;
    right: 20px;
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .language-toggle-container {
        top: 10px;
        right: 10px;
    }
    
    .language-toggle-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .dashboard .language-toggle-container {
        top: 70px;
        right: 10px;
    }
}
/* Super Admin Dashboard Specific Styles */
.super-admin-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

.admin-info-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-name {
    font-weight: 500;
}

.admin-tag {
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.user-info-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-masked {
    font-family: monospace;
    letter-spacing: 1px;
}

.btn-show-password {
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 6px;
    cursor: pointer;
    color: #666;
}

.btn-show-password:hover {
    background: #f8f9fa;
    color: #333;
}

.btn-action.promote {
    background: #2ecc71;
    color: white;
}

.btn-action.promote:hover {
    background: #27ae60;
}

/* Activity Items */
.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.activity-icon.deposit {
    background: #d4edda;
    color: #155724;
}

.activity-icon.withdrawal {
    background: #f8d7da;
    color: #721c24;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.activity-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.activity-time {
    font-size: 11px;
    color: #999;
}

/* User Details Modal */
.user-details-modal {
    max-width: 700px;
}

.user-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: bold;
    color: #666;
    font-size: 12px;
}

.password-display {
    margin: 20px 0;
}

.password-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.password-field input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
}

/* Log Items */
.log-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.log-time {
    color: #999;
    min-width: 70px;
}

.log-message {
    flex: 1;
}

.log-info .log-message { color: #3498db; }
.log-success .log-message { color: #2ecc71; }
.log-warning .log-message { color: #f39c12; }
.log-error .log-message { color: #e74c3c; }

/* Transactions Table */
.transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.transactions-table th {
    background: #f8f9fa;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #dee2e6;
}

.transactions-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.transaction-deposit { background: #f8fff8; }
.transaction-withdrawal { background: #fff8f8; }

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-action-btn:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 24px;
    color: #3498db;
    margin-bottom: 10px;
}

.quick-action-btn span {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* System Health */
.system-health {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.health-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.health-item:last-child {
    border-bottom: none;
}

.health-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.health-status.healthy { background: #d4edda; color: #155724; }
.health-status.warning { background: #fff3cd; color: #856404; }
.health-status.critical { background: #f8d7da; color: #721c24; }

/* Responsive Design */
@media (max-width: 768px) {
    .user-details-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-action {
        width: 100%;
        margin-bottom: 5px;
    }
}


/* ==============================================
   LANDING FEATURES - ULTRA RESPONSIVE & ADAPTIVE
   ============================================== */

/* === BASE MOBILE-FIRST STYLES === */
.landing-features {
    padding: 0.75rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    max-width: 100%;
    overflow-x: hidden;
    margin: 1.25rem 0;
    box-sizing: border-box;
}

.feature-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border-radius: clamp(8px, 2vw, 12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: clamp(0.875rem, 3vw, 1.25rem);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    min-height: clamp(100px, 20vh, 150px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-title {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
    margin-bottom: clamp(0.5rem, 2vw, 0.625rem);
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
    position: relative;
    z-index: 1;
}

.feature-description {
    opacity: 0.8;
    line-height: 1.4;
    font-size: clamp(0.8rem, 3.5vw, 0.9rem);
    color: inherit;
    position: relative;
    z-index: 1;
}

/* === INTERACTION STATES === */

/* Desktop hover effects */
@media (hover: hover) and (pointer: fine) {
    .feature-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 
            0 12px 24px rgba(0, 0, 0, 0.15),
            0 8px 16px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.25);
    }
    
    .feature-card:hover::before {
        opacity: 1;
    }
}

/* Touch devices - active state */
.feature-card:active {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Focus state for accessibility */
.feature-card:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    box-shadow: 
        0 0 0 3px rgba(52, 152, 219, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

/* === RESPONSIVE BREAKPOINTS === */

/* Level 1: Ultra Small Mobile (320px and below) */
@media (max-width: 320px) {
    .landing-features {
        padding: 0.5rem;
        gap: 0.5rem;
        margin: 0.75rem 0;
    }
    
    .feature-card {
        min-height: 90px;
        padding: 0.75rem;
        border-radius: 6px;
    }
    
    .feature-title {
        font-size: 0.9rem;
        margin-bottom: 0.375rem;
    }
    
    .feature-description {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}

/* Level 2: Small Mobile (321px - 375px) */
@media (min-width: 321px) and (max-width: 375px) {
    .landing-features {
        padding: 0.625rem;
        gap: 0.625rem;
    }
    
    .feature-card {
        min-height: 95px;
        padding: 0.875rem;
    }
}

/* Level 3: Standard Mobile (376px - 479px) */
@media (min-width: 376px) and (max-width: 479px) {
    .landing-features {
        padding: 1rem;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .feature-card {
        min-height: 110px;
        padding: 1rem;
        border-radius: 10px;
    }
    
    .feature-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-description {
        font-size: 0.85rem;
    }
}

/* Level 4: Large Mobile (480px - 599px) */
@media (min-width: 480px) {
    .landing-features {
        padding: 1.25rem;
        gap: 1.25rem;
        margin: 1.75rem 0;
    }
    
    .feature-card {
        padding: 1.5rem;
        border-radius: 12px;
        min-height: clamp(120px, 18vh, 180px);
    }
    
    .feature-title {
        font-size: clamp(1.1rem, 3.5vw, 1.2rem);
        margin-bottom: 0.75rem;
    }
    
    .feature-description {
        font-size: clamp(0.9rem, 3vw, 1rem);
    }
}

/* Level 5: Mobile Landscape & Small Tablet (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .landing-features {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .feature-card {
        min-height: clamp(130px, 20vh, 200px);
    }
    
    .feature-title {
        font-size: 1.25rem;
        margin-bottom: 0.875rem;
    }
}

/* Level 6: Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .landing-features {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.75rem;
        gap: 1.75rem;
        margin: 2.25rem 0;
    }
    
    .feature-card {
        min-height: clamp(140px, 22vh, 220px);
        padding: 1.75rem;
    }
    
    .feature-title {
        font-size: clamp(1.2rem, 2.5vw, 1.3rem);
        margin-bottom: 1rem;
    }
    
    .feature-description {
        font-size: clamp(0.95rem, 2vw, 1.05rem);
    }
}

/* Level 7: Tablet Landscape & Small Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .landing-features {
        grid-template-columns: repeat(3, 1fr);
        padding: 2rem;
        gap: 2rem;
        margin: 2.5rem auto;
        max-width: 1100px;
    }
    
    .feature-card {
        min-height: clamp(150px, 24vh, 240px);
        padding: 2rem;
    }
    
    .feature-title {
        font-size: 1.35rem;
        margin-bottom: 1rem;
    }
    
    .feature-description {
        font-size: 1.1rem;
    }
}

/* Level 8: Desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .landing-features {
        grid-template-columns: repeat(3, 1fr);
        padding: 2.25rem;
        gap: 2.25rem;
        margin: 3rem auto;
        max-width: 1200px;
    }
    
    .feature-card {
        min-height: 260px;
    }
    
    .feature-title {
        font-size: 1.4rem;
    }
}

/* Level 9: Large Desktop (1440px - 1919px) */
@media (min-width: 1440px) {
    .landing-features {
        grid-template-columns: repeat(4, 1fr);
        padding: 2.5rem;
        gap: 2.5rem;
        margin: 3.5rem auto;
        max-width: 1400px;
    }
    
    .feature-card {
        min-height: 280px;
        padding: 2.5rem;
    }
    
    .feature-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .feature-description {
        font-size: 1.15rem;
    }
}

/* Level 10: Ultra Large Desktop (1920px and above) */
@media (min-width: 1920px) {
    .landing-features {
        max-width: 1600px;
        padding: 3rem;
        gap: 3rem;
        margin: 4rem auto;
    }
    
    .feature-card {
        min-height: 320px;
        padding: 3rem;
        border-radius: 16px;
    }
    
    .feature-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .feature-description {
        font-size: 1.25rem;
    }
}

/* === SPECIAL DEVICE CONSIDERATIONS === */

/* Foldable Devices (Dual Screen) */
@media (max-width: 280px) {
    .landing-features {
        padding: 0.375rem;
        gap: 0.375rem;
    }
    
    .feature-card {
        min-height: 80px;
        padding: 0.5rem;
        border-radius: 4px;
    }
    
    .feature-title {
        font-size: 0.8rem;
    }
    
    .feature-description {
        font-size: 0.7rem;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .landing-features {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        padding: 0.75rem;
        gap: 0.75rem;
        margin: 1rem 0;
    }
    
    .feature-card {
        min-height: 120px;
        padding: 1rem;
    }
    
    .feature-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-description {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .feature-card {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .feature-card:active {
        transform: translateY(-3px);
    }
    
    /* Larger touch targets on mobile */
    .feature-title,
    .feature-description {
        touch-action: manipulation;
    }
}

/* High-density screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .feature-card {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 
            0 4px 12px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
}

/* Ultra High DPI (4K+) */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
    .feature-card {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

/* === ACCESSIBILITY FEATURES === */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .feature-card {
        transition: none;
    }
    
    .feature-card:hover,
    .feature-card:active {
        transform: none;
    }
    
    .feature-card::before {
        transition: none;
        opacity: 0;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .feature-card {
        background: rgba(255, 255, 255, 0.15);
        border: 2px solid currentColor;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    .feature-title {
        font-weight: 800;
    }
    
    .feature-description {
        opacity: 1;
        font-weight: 600;
    }
}

/* Inverted colors mode */
@media (inverted-colors: inverted) {
    .feature-card {
        background: rgba(0, 0, 0, 0.1);
        border-color: rgba(0, 0, 0, 0.3);
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .feature-card {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.15));
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 
            0 4px 12px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.9);
    }
    
    .feature-title {
        color: rgba(255, 255, 255, 0.95);
    }
    
    .feature-description {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .feature-card::before {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent);
    }
    
    @media (hover: hover) and (pointer: fine) {
        .feature-card:hover {
            border-color: rgba(255, 255, 255, 0.2);
            box-shadow: 
                0 12px 24px rgba(0, 0, 0, 0.25),
                0 8px 16px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }
    }
}

/* === PRINT STYLES === */
@media print {
    .landing-features {
        display: block;
        padding: 0;
        margin: 1rem 0;
        break-inside: avoid;
    }
    
    .feature-card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        backdrop-filter: none;
        min-height: auto;
        margin-bottom: 1rem;
        page-break-inside: avoid;
        color: black;
    }
    
    .feature-title {
        color: black;
        font-weight: 700;
    }
    
    .feature-description {
        color: #333;
        opacity: 1;
    }
    
    .feature-card::before {
        display: none;
    }
}

/* === PERFORMANCE OPTIMIZATIONS === */
@media (prefers-reduced-transparency: reduce) {
    .feature-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.95);
    }
    
    @media (prefers-color-scheme: dark) {
        .feature-card {
            background: rgba(30, 30, 30, 0.95);
        }
    }
}

/* === GRID FALLBACK FOR OLD BROWSERS === */
@supports not (display: grid) {
    .landing-features {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .feature-card {
        width: 100%;
        margin: 0.5rem;
    }
    
    @media (min-width: 600px) {
        .feature-card {
            width: calc(50% - 1rem);
        }
    }
    
    @media (min-width: 992px) {
        .feature-card {
            width: calc(33.333% - 1rem);
        }
    }
    
    @media (min-width: 1440px) {
        .feature-card {
            width: calc(25% - 1rem);
        }
    }
}

/* === SCROLLBAR STYLING (Optional) === */
.landing-features::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.landing-features::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.landing-features::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.landing-features::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* === LOADING STATE (Optional) === */
.landing-features.loading {
    opacity: 0.7;
}

.feature-card.loading {
    position: relative;
    overflow: hidden;
}

.feature-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(200%);
    }
}
 /* Announcement System Styles - Mobile First */
.announcements-container,
.admin-announcements-container {
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Slideshow Styles */
.announcements-slideshow {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    background: var(--primary-dark);
    min-height: 250px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.announcement-slide {
    flex: 0 0 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    color: white;
}

.slide-media {
    flex: 1;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 180px;
}

.slide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.slide-media iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.slide-content {
    flex: 1;
    padding: 10px;
}

.slide-content h3 {
    font-size: 18px;
    margin: 8px 0;
    color: white;
    line-height: 1.3;
}

.slide-content p {
    font-size: 14px;
    line-height: 1.5;
    margin: 10px 0;
    opacity: 0.9;
}

.slide-content small {
    opacity: 0.7;
    font-size: 12px;
    display: block;
    margin-top: 8px;
}

.priority-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.priority-high {
    background: #ff4757;
    color: white;
}

.priority-medium {
    background: #ffa502;
    color: white;
}

.priority-low {
    background: #2ed573;
    color: white;
}

.priority-urgent {
    background: #ff3838;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
    z-index: 10;
    opacity: 0.8;
}

.slideshow-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.slideshow-prev {
    left: 10px;
}

.slideshow-next {
    right: 10px;
}

.slideshow-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.slideshow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.slideshow-dot.active {
    background: white;
    transform: scale(1.3);
}

/* User Announcements List */
.announcements-list-section {
    margin-top: 20px;
}

.section-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.announcements-list {
    display: grid;
    gap: 12px;
}

.announcement-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #667eea;
    transition: transform 0.3s, box-shadow 0.3s;
}

.announcement-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.announcement-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.announcement-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.announcement-item-date {
    font-size: 12px;
    color: #7f8c8d;
    white-space: nowrap;
    margin-left: 10px;
}

.announcement-item-content {
    font-size: 14px;
    color: #34495e;
    line-height: 1.5;
    margin-bottom: 10px;
}

.announcement-item-media {
    margin-top: 10px;
    border-radius: 6px;
    overflow: hidden;
}

.announcement-item-media img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 6px;
}

/* Admin Styles */
.admin-section-header {
    margin-bottom: 25px;
    text-align: center;
}

.section-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 5px;
}

.new-announcement-btn-container {
    margin-bottom: 20px;
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Form Styles */
.announcement-form-container {
    margin-bottom: 25px;
}

.form-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-input,
.form-textarea,
.form-select,
.form-file {
    width: 100%;
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #f8f9fa;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-text {
    font-weight: normal;
    color: #555;
}

.media-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #7f8c8d;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-col {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.checkbox-text {
    font-weight: normal;
    color: #555;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

/* Admin Announcements List */
.admin-announcements-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.list-header h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 13px;
}

.btn-refresh {
    background: #3498db;
    color: white;
}

.btn-refresh:hover {
    background: #2980b9;
}

/* Announcement Cards for Admin */
.announcement-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
}

.announcement-card.inactive {
    opacity: 0.6;
    background: #f1f2f3;
}

.announcement-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

@media (min-width: 480px) {
    .announcement-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.announcement-title {
    font-size: 16px;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.announcement-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.announcement-content {
    margin: 12px 0;
    font-size: 14px;
    color: #34495e;
    line-height: 1.6;
}

.announcement-media-preview {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 200px;
}

.announcement-media-preview img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.video-placeholder {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: white;
}

.video-placeholder i {
    font-size: 32px;
    margin-bottom: 10px;
}

.announcement-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-toggle {
    background: #2ecc71;
    color: white;
}

.btn-toggle:hover {
    background: #27ae60;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

/* Tablet Styles */
@media (min-width: 768px) {
    .announcements-container,
    .admin-announcements-container {
        padding: 20px;
    }
    
    .announcements-slideshow {
        min-height: 300px;
        margin-bottom: 30px;
    }
    
    .announcement-slide {
        flex-direction: row;
        padding: 30px;
    }
    
    .slide-media {
        flex: 1;
        margin-right: 30px;
        margin-bottom: 0;
        max-height: 240px;
    }
    
    .slide-content {
        flex: 1;
        padding: 10px;
    }
    
    .slide-content h3 {
        font-size: 22px;
    }
    
    .slide-content p {
        font-size: 15px;
    }
    
    .slideshow-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .slideshow-dots {
        bottom: 20px;
        gap: 8px;
    }
    
    .slideshow-dot {
        width: 10px;
        height: 10px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .announcements-list {
        gap: 15px;
    }
    
    .announcement-item {
        padding: 20px;
    }
    
    .announcement-item-title {
        font-size: 17px;
    }
    
    .form-row {
        flex-direction: row;
    }
    
    .form-card {
        padding: 25px;
    }
    
    .form-title {
        font-size: 20px;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .announcements-container,
    .admin-announcements-container {
        padding: 30px;
    }
    
    .announcements-slideshow {
        min-height: 350px;
        margin-bottom: 40px;
    }
    
    .announcement-slide {
        padding: 40px;
    }
    
    .slide-content h3 {
        font-size: 24px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
    
    .announcements-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .btn-lg {
        padding: 16px 32px;
        font-size: 17px;
    }
    
    .form-input,
    .form-textarea,
    .form-select,
    .form-file {
        padding: 14px;
        font-size: 15px;
    }
    
    .announcement-card {
        padding: 20px;
    }
    
    .announcement-title {
        font-size: 17px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .announcement-item,
    .form-card,
    .admin-announcements-list {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .announcement-item-title,
    .announcement-item-content,
    .form-group label,
    .form-title,
    .list-header h3,
    .announcement-title {
        color: #ecf0f1;
    }
    
    .form-input,
    .form-textarea,
    .form-select,
    .form-file,
    .checkbox-label {
        background: #34495e;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .checkbox-text,
    .radio-text {
        color: #bdc3c7;
    }
    
    .announcement-card {
        background: #34495e;
        border-color: #4a6572;
    }
    
    .announcement-card.inactive {
        background: #2c3e50;
    }
}

/* Empty State */
.no-announcements {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #7f8c8d;
}

.no-announcements i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.no-announcements h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #95a5a6;
}

.no-announcements p {
    font-size: 14px;
    max-width: 300px;
    margin: 0 auto;
}

/* Loading State */
.announcement-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .announcements-slideshow,
    .new-announcement-btn-container,
    .announcement-actions {
        display: none;
    }
    
    .announcement-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility Improvements */
.slideshow-nav:focus,
.btn:focus,
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Touch-friendly improvements */
.btn,
.radio-label,
.checkbox-label,
.slideshow-dot {
    min-height: 44px;
    min-width: 44px;
}

.announcement-item {
    cursor: pointer;
}

/* Smooth scrolling for announcements */
.announcements-container {
    scroll-behavior: smooth;
}

/* Custom scrollbar for announcements list */
.announcements-list::-webkit-scrollbar {
    width: 8px;
}

.announcements-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.announcements-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.announcements-list::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}   











/* ============================================
   UPDATED USER DASHBOARD ANNOUNCEMENT WIDGET
   Unified with Announcement System Styles
   Mobile-First Design
   ============================================ */

/* Widget Container - Updated */
.announcement-widget {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

/* Widget Header - Updated */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e8e8;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: #667eea;
    font-size: 20px;
    background: rgba(102, 126, 234, 0.1);
    padding: 8px;
    border-radius: 10px;
}

.widget-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.widget-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    min-height: 44px;
}

.widget-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-text {
    display: inline;
}

/* Slideshow Widget - Updated */
.announcement-slideshow-widget {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slideshow-track-widget {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.announcement-slide-widget {
    flex: 0 0 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    color: white;
    position: relative;
}

.slide-media-widget {
    flex: 1;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 180px;
    position: relative;
}

.slide-media-widget img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.slide-content-widget {
    flex: 1;
    padding: 10px;
    position: relative;
    z-index: 2;
}

.slide-content-widget .priority-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.slide-content-widget h4 {
    margin: 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.slide-content-widget p {
    font-size: 14px;
    line-height: 1.5;
    margin: 10px 0;
    opacity: 0.9;
    display: -webkit-box;
    line-clamp: 3;
    box-orient: vertical;
    overflow: hidden;
}

.slide-content-widget small {
    opacity: 0.7;
    font-size: 12px;
    display: block;
    margin-top: 8px;
}

/* Navigation buttons - Updated */
.slideshow-nav-widget {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
    z-index: 10;
    opacity: 0.8;
    min-height: 44px;
    min-width: 44px;
}

.slideshow-nav-widget:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.slideshow-prev-widget {
    left: 10px;
}

.slideshow-next-widget {
    right: 10px;
}

/* Dots indicator - Updated */
.slideshow-dots-widget {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 10;
}

.slideshow-dot-widget {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    min-height: 44px;
    min-width: 44px;
}

.slideshow-dot-widget.active {
    background: white;
    transform: scale(1.3);
}

/* Announcements List Widget - Updated */
.announcements-list-widget {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.announcement-item-widget {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #667eea;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.announcement-item-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.announcement-item-header-widget {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.announcement-item-title-widget {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.announcement-item-date-widget {
    font-size: 12px;
    color: #7f8c8d;
    white-space: nowrap;
    margin-left: 10px;
}

.announcement-item-content-widget {
    font-size: 14px;
    color: #34495e;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    line-clamp: 2;
    
    overflow: hidden;
}

.announcement-item-meta-widget {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Priority Badges - Updated */
.priority-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: bold;
    text-transform: uppercase;
}

.priority-high {
    background: #ff4757;
    color: white;
}

.priority-medium {
    background: #ffa502;
    color: white;
}

.priority-low {
    background: #2ed573;
    color: white;
}

.priority-urgent {
    background: #ff3838;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* No Announcements State - Updated */
.no-announcements-widget {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #7f8c8d;
}

.no-announcements-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.no-announcements-widget h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #95a5a6;
}

.no-announcements-widget p {
    font-size: 14px;
    margin: 0 auto;
    max-width: 300px;
}

/* Loading State - Updated */
.announcement-loading-widget {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.announcement-loading-widget p {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

/* Widget Footer - Updated */
.widget-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
}

.announcement-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #7f8c8d;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-item i {
    font-size: 14px;
}

#active-announcements-count {
    font-weight: 600;
    color: #667eea;
}

#last-updated-time {
    font-weight: 600;
    color: #2c3e50;
}

/* ============================================
   RESPONSIVE DESIGN - TABLET
   ============================================ */
@media (min-width: 768px) {
    .announcement-widget {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .widget-title h3 {
        font-size: 20px;
    }
    
    .widget-action {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .announcement-slideshow-widget { 
        min-height: 300px;
        margin-bottom: 30px;
    }
    
    .announcement-slide-widget {
        flex-direction: row;
        padding: 30px;
    }
    
    .slide-media-widget {
        flex: 1;
        margin-right: 30px;
        margin-bottom: 0;
        max-height: 240px;
    }
    
    .slide-content-widget h4 {
        font-size: 22px;
    }
    
    .slide-content-widget p {
        font-size: 15px;
        line-clamp: 4;
    }
    
    .slideshow-nav-widget {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .slideshow-dots-widget {
        bottom: 20px;
        gap: 8px;
    }
    
    .slideshow-dot-widget {
        width: 10px;
        height: 10px;
    }
    
    .announcements-list-widget {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .announcement-item-title-widget {
        font-size: 17px;
    }
    
    .announcement-item-content-widget {
        font-size: 14px;
        line-clamp: 3;
    }
    
    .announcement-stats {
        font-size: 14px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - DESKTOP
   ============================================ */
@media (min-width: 1024px) {
    .announcement-widget {
        padding: 25px;
        margin-bottom: 30px;
    }
    
    .announcement-slideshow-widget {
        min-height: 350px;
        margin-bottom: 40px;
    }
    
    .announcement-slide-widget {
        padding: 40px;
    }
    
    .slide-content-widget h4 {
        font-size: 24px;
    }
    
    .slide-content-widget p {
        font-size: 16px;
    }
    
    .announcements-list-widget {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    .announcement-widget {
        background: #2c3e50;
        border-color: #4a6572;
    }
    
    .widget-title h3 {
        color: #ecf0f1;
    }
    
    .widget-title i {
        color: #667eea;
        background: rgba(102, 126, 234, 0.2);
    }
    
    .widget-action {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .announcement-item-widget {
        background: #34495e;
        border-left-color: #667eea;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .announcement-item-title-widget {
        color: #ecf0f1;
    }
    
    .announcement-item-content-widget {
        color: #bdc3c7;
    }
    
    .announcement-item-date-widget {
        color: #95a5a6;
    }
    
    .widget-footer {
        border-top-color: #4a6572;
    }
    
    .announcement-stats {
        color: #bdc3c7;
    }
    
    #last-updated-time {
        color: #ecf0f1;
    }
    
    .loading-spinner {
        border-color: #4a6572;
        border-top-color: #667eea;
    }
    
    .no-announcements-widget {
        background: #34495e;
    }
    
    .no-announcements-icon {
        color: #7f8c8d;
    }
    
    .no-announcements-widget h4 {
        color: #bdc3c7;
    }
    
    .no-announcements-widget p {
        color: #95a5a6;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.slideshow-nav-widget:focus,
.widget-action:focus,
.announcement-item-widget:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .announcement-widget {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .widget-action,
    .slideshow-nav-widget,
    .slideshow-dots-widget {
        display: none;
    }
    
    .announcement-item-widget {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

        .logout-btn {
            background: var(--primary-dark);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.3s ease;
        }
        
        .logout-btn:hover {
            background: #c82333;
        }
        
        /* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg, #2c3e50);
    color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.active {
    transform: translateX(0);
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

/* Hamburger Button */
.hambtn {
    background: none;
    border: none;
    color: #333;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hambtn:focus {
    outline: none;
}

/* Close Button */
.closebtn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    margin: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.closebtn:hover {
    background: #c0392b;
}

/* Sidebar Navigation Links */
.sidebar nav {
    flex: 1;
    padding: 20px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
    border-left: 4px solid transparent;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: #3498db;
}

.nav-link.active {
    background: rgba(255,255,255,0.15);
    border-left-color: #3498db;
    font-weight: bold;
}


/* Sidebar User Info */
.sidebar-user-info {
    padding: 30px 20px;
    text-align: center;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid #3498db;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-details h4 {
    margin: 0 0 5px;
    font-size: 18px;
}

.sidebar-balance {
    font-size: 16px;
    color: #f1c40f;
    margin: 5px 0;
}

.sidebar-role {
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255,255,255,0.1);
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
}

/* Badges in sidebar */
.sidebar-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: auto;
}

/* Sidebar Actions */
.sidebar-actions {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.deposit-btn, .withdraw-btn {
    width: 100%;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
    }
}

/* For admin and super-admin specific styles */
.sidebar.premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sidebar.premium .nav-link.active {
    background: rgba(255,255,255,0.2);
    border-left-color: #fff;
}

.sidebar.admin {
    background: #34495e;
}

/* Mobile view improvements */
@media (max-width: 480px) {
    .hambtn {
        font-size: 20px;
        padding: 8px;
    }
    
    .sidebar {
        width: 85%;
    }
}

    .dashboard-announcements {
        background: white;
        border-radius: 10px;
        padding: 25px;
        margin-bottom: 30px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        border-left: 4px solid #3498db;
    }
    
    .dashboard-announcements-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #ecf0f1;
    }
    
    .dashboard-announcements-header h3 {
        color: #2c3e50;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .announcements-container {
        max-height: 400px;
        overflow-y: auto;
    }
    
    .announcement-item {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 20px;
        margin-bottom: 15px;
        border-left: 4px solid #3498db;
        transition: all 0.3s ease;
    }
    
    .announcement-item:hover {
        transform: translateX(5px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    
    .announcement-item.urgent {
        border-left-color: #e74c3c;
        background: linear-gradient(135deg, #fdf2f2 0%, #f8d7da 100%);
    }
    
    .announcement-item.high {
        border-left-color: #e67e22;
        background: linear-gradient(135deg, #fff5eb 0%, #ffe3cc 100%);
    }
    
    .announcement-item.medium {
        border-left-color: #f39c12;
        background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    }
    
    .announcement-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 10px;
    }
    
    .announcement-title {
        font-size: 1.2rem;
        font-weight: bold;
        color: #2c3e50;
        margin: 0;
    }
    
    .announcement-meta {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    
    .priority-badge {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: bold;
    }
    
    .priority-badge.urgent {
        background: #e74c3c;
        color: white;
    }
    
    .priority-badge.high {
        background: #e67e22;
        color: white;
    }
    
    .priority-badge.medium {
        background: #f39c12;
        color: white;
    }
    
    .priority-badge.low {
        background: #27ae60;
        color: white;
    }
    
    .announcement-content {
        color: #555;
        line-height: 1.5;
        margin-bottom: 15px;
    }
    
    .announcement-media {
        margin: 15px 0;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .announcement-media img {
        width: 100%;
        max-height: 300px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .announcement-media video {
        width: 100%;
        border-radius: 8px;
    }
    
    .announcement-media iframe {
        width: 100%;
        height: 300px;
        border-radius: 8px;
    }
    
    .announcement-timestamp {
        font-size: 0.8rem;
        color: #7f8c8d;
        margin-top: 10px;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .announcement-loading,
    .no-announcements {
        text-align: center;
        padding: 30px;
        color: #7f8c8d;
        font-style: italic;
    }
    
    .announcement-loading i {
        margin-right: 10px;
        color: #3498db;
    }










/* Enhanced Modal Styles */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.modal-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: #f8f9fa;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.media-source-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.media-tab {
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.media-tab.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.media-section {
    display: none;
    margin-top: 15px;
}

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

.upload-area {
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-area:hover {
    background: #e8f4fc;
    border-color: #2980b9;
}

.upload-area.dragover {
    background: #d1ecf1;
    border-color: #117a8b;
}

.upload-area i {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 15px;
}

.preview-container {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.url-input-group {
    margin-top: 15px;
}

.url-type-selector {
    display: flex;
    gap: 15px;
    margin: 10px 0;
}

.url-type-selector label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.url-preview {
    margin-top: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    display: none;
}

.url-preview.show {
    display: block;
}

.url-preview img,
.url-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 5px;
}

.no-media-message {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
}

.no-media-message i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.date-display {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.date-display i {
    color: #3498db;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.form-actions button {
    flex: 1;
}

/* Management Tab Styles */
.management-controls {
    margin-bottom: 20px;
}

.search-filter {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.filter-options {
    display: flex;
    gap: 10px;
}

.filter-options select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    min-width: 150px;
}

.announcements-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.announcements-stats span {
    font-weight: 600;
    color: #2c3e50;
}

.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.announcement-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.announcement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.announcement-card.urgent { border-left-color: #e74c3c; }
.announcement-card.high { border-left-color: #e67e22; }
.announcement-card.medium { border-left-color: #f39c12; }
.announcement-card.low { border-left-color: #27ae60; }

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.announcement-title {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    font-size: 16px;
}

.announcement-type-badge {
    background: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.announcement-content {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.announcement-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.announcement-date {
    color: #7f8c8d;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.announcement-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.announcement-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.action-btn {
    padding: 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-toggle {
    background: #f39c12;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.action-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.no-announcements {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.no-announcements i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.loading-state i {
    font-size: 24px;
    margin-bottom: 15px;
    color: #3498db;
}

/* Centered Date Display in Announcements */
.center-date {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-size: 12px;
    padding: 8px 0;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.center-date i {
    color: #3498db;
}

/* Add these styles to your existing CSS */
.upload-info {
    background: #e8f4fc;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
}

.upload-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.upload-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .upload-options {
        grid-template-columns: 1fr;
    }
}

.upload-option {
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-option:hover {
    background: #e8f4fc;
    border-color: #2980b9;
    transform: translateY(-2px);
}

.upload-option i {
    font-size: 32px;
    color: #3498db;
}

.upload-option span {
    font-weight: 600;
    color: #2c3e50;
}

.preview-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    border: 2px dashed #ddd;
    border-radius: 10px;
}

.preview-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    margin-bottom: 10px;
}

.preview-item img,
.preview-item video {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.remove-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-preview:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.file-info {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

.url-preview {
    margin-top: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    display: none;
}

.url-preview-content {
    width: 100%;
}

.url-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.url-preview video,
.url-preview iframe {
    width: 100%;
    height: 200px;
    border-radius: 5px;
    border: none;
}

.url-info {
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    word-break: break-all;
}

.url-error, .loading-preview {
    padding: 15px;
    text-align: center;
    color: #721c24;
    background: #f8d7da;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-preview {
    color: #0c5460;
    background: #d1ecf1;
}

.announcement-media-indicator {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 3px solid #3498db;
}

.error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #721c24;
    background: #f8d7da;
    border-radius: 10px;
}

.error-state i {
    font-size: 48px;
    margin-bottom: 15px;
}

.center-date {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-size: 12px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    margin-top: 15px;
    text-align: center;
}

.center-date i {
    color: #3498db;
}

.dashboard-announcements-section {
width: 100%;
max-width: 1000px;
margin: 0 auto;
padding: 20px;
}

.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 2px solid #007bff;
}

.section-header h3 {
margin: 0;
color: #333;
font-size: 1.5rem;
display: flex;
align-items: center;
gap: 10px;
}

.section-header h3 i {
color: #007bff;
}

.btn-refresh {
background: #007bff;
color: white;
border: none;
padding: 8px 15px;
border-radius: 5px;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
transition: background 0.3s ease;
}

.btn-refresh:hover {
background: #0056b3;
}

.announcements-container {
height: 600px; /* Fixed height for slideshow */
overflow: hidden;
}

/* ===== DASHBOARD NAVIGATION COMMON STYLES ===== */
/* Add this to your existing CSS file */
/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Top Navigation Bar */
.dashboard-topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--topbar-height);
    background: var(--white);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 1000;
    transition: var(--transition);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.brand-role {
    font-size: var(--font-sm);
    color: var(--gray);
    line-height: 1.2;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hamburger Button */
.hamburger-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.hamburger-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Notification Icon */
.notification-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-icon:hover {
    background: var(--gray-light);
}

.notification-icon i {
    color: var(--gray);
    font-size: 1.1rem;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: var(--white);
    font-size: var(--font-xs);
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* Sidebar */
.dashboard-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: left var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.dashboard-sidebar.active {
    left: 0;
}

/* Sidebar Header */
.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--gray-extra-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-extra-light);
    border: none;
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.sidebar-close:hover {
    background: var(--gray-light);
    color: var(--dark);
}

/* Sidebar Profile */
.sidebar-profile {
    padding: 25px 20px;
    border-bottom: 1px solid var(--gray-extra-light);
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-extra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar i {
    font-size: 1.8rem;
    color: var(--primary);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 3px;
}

.profile-role {
    font-size: var(--font-sm);
    color: var(--gray);
    margin-bottom: 3px;
}

.profile-balance {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--success);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 15px;
}

.section-title {
    padding: 10px 20px;
    font-size: var(--font-xs);
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Navigation Items */
.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.nav-link:hover {
    background: var(--primary-extra-light);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary-extra-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary);
}


.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dropdown Items */
.nav-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
    background: var(--gray-extra-light);
}

.nav-item.open .nav-dropdown {
    max-height: 500px;
}

.dropdown-arrow {
    font-size: 0.9rem;
    color: var(--gray);
    transition: transform var(--transition-fast);
    margin-left: 5px;
}

.nav-item.open .dropdown-arrow {
    transform: rotate(90deg);
    color: var(--primary);
}

.dropdown-link {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 56px;
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
}

.dropdown-link:hover {
    background: rgba(37, 111, 138, 0.05);
    color: var(--primary);
    padding-left: 60px;
}

.dropdown-link.active {
    color: var(--primary);
    font-weight: 500;
    background: rgba(37, 111, 138, 0.08);
}

.dropdown-link.active::before {
    content: '';
    position: absolute;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

/* Badges */
.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--white);
    font-size: var(--font-xs);
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.dropdown-badge {
    margin-left: auto;
    background: var(--warning);
    color: var(--dark);
    font-size: var(--font-xs);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* Sidebar Actions */
.sidebar-actions {
    padding: 20px;
    border-top: 1px solid var(--gray-extra-light);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: var(--font-base);
}

.deposit-btn {
    background: var(--success);
    color: var(--white);
}

.deposit-btn:hover {
    background: #218838;
}

.withdraw-btn {
    background: var(--danger);
    color: var(--white);
}

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

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-extra-light);
}

/* Admin/Super Admin Specific */
.dashboard-sidebar.admin-sidebar {
    background: linear-gradient(180deg, #1a2a3a 0%, #1a556b 100%);
    color: var(--white);
}

.dashboard-sidebar.super-admin-sidebar {
    background: linear-gradient(180deg, #0d1824 0%, #1a2a3a 100%);
    color: var(--white);
}

.admin-sidebar .sidebar-header,
.admin-sidebar .sidebar-profile,
.admin-sidebar .sidebar-footer,
.super-admin-sidebar .sidebar-header,
.super-admin-sidebar .sidebar-profile,
.super-admin-sidebar .sidebar-footer {
    border-bottom-color: rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link,
.super-admin-sidebar .nav-link {
    color: rgba(255,255,255,0.9);
}

.admin-sidebar .nav-link:hover,
.super-admin-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.admin-sidebar .nav-link.active,
.super-admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: var(--white);
}

.admin-sidebar .dropdown-link,
.super-admin-sidebar .dropdown-link {
    color: rgba(255,255,255,0.7);
}

.admin-sidebar .dropdown-link:hover,
.super-admin-sidebar .dropdown-link:hover {
    background: rgba(255,255,255,0.05);
    color: var(--white);
}

.admin-sidebar .dropdown-link.active,
.super-admin-sidebar .dropdown-link.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

/* Premium Badge for Super Admin */
.premium-badge {
    background: linear-gradient(135deg, var(--warning) 0%, var(--accent) 100%);
    color: var(--dark);
    font-weight: 700;
}

/* Responsive Design */
@media (min-width: 992px) {
    .dashboard-sidebar {
        left: 0;
    }
    
    .dashboard-content {
        margin-left: var(--sidebar-width);
    }
    
    .hamburger-btn,
    .sidebar-overlay,
    .sidebar-close {
        display: none;
    }
}

@media (max-width: 991px) {
    .dashboard-topbar {
        height: var(--topbar-height-mobile);
        padding: 0 20px;
    }
    
    .brand-text {
        display: none;
    }
    
    .dashboard-content {
        margin-top: var(--topbar-height-mobile);
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .dashboard-topbar {
        padding: 0 15px;
    }
    
    .dashboard-sidebar {
        width: 85%;
    }
}

@media (max-width: 480px) {
    .dashboard-sidebar {
        width: 100%;
    }
    
    .brand-logo {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .hamburger-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

















































/* Admin Chat Section - Base Styles */
.admin-chat-section {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Modal Specific Styles */
#admin-chat-modal .modal-content {
    max-width: 1200px;
    height: 90vh;
    padding: 0;
    margin: 5vh auto;
    width: 95%;
}

#admin-chat-modal .dashboard-content {
    height: 100%;
    padding: 0;
}

/* Admin Chat Container - Mobile First */
.admin-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
}

/* Sidebar */
.admin-chat-sidebar {
    flex: 0 0 auto;
    border-bottom: 1px solid #e0e0e0;
    max-height: 40vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Main Chat Area */
.admin-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Chat Search */
.chat-search {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.chat-search input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Chat Users List */
.chat-users-list {
    flex: 1;
    overflow-y: auto;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}

.chat-user-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.chat-user-item:last-child {
    border-bottom: none;
}

.chat-user-item:hover {
    background-color: #f8f9fa;
}

.chat-user-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid #3498db;
}

.user-chat-info {
    flex: 1;
    min-width: 0;
    margin-right: 10px;
}

.user-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-message {
    font-size: 12px;
    color: #7f8c8d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.chat-meta {
    text-align: right;
    font-size: 11px;
    color: #95a5a6;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.unread-count {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    margin-top: 5px;
    flex-shrink: 0;
}

/* Chat Header */
.admin-chat-header {
    background: #34495e;
    color: white;
    padding: 12px 15px;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    min-height: 60px;
}

/* Chat Messages Area */
.admin-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    min-height: 0;
}

.admin-message {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    max-width: 90%;
}

.admin-message.user {
    align-items: flex-start;
    margin-right: auto;
}

.admin-message.admin {
    align-items: flex-end;
    margin-left: auto;
}

.message-bubble {
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.4;
}

.user .message-bubble {
    background: white;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.admin .message-bubble {
    background: #3498db;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 10px;
    color: #95a5a6;
    margin-top: 4px;
    padding: 0 4px;
}

/* Chat Input Area */
.admin-chat-input {
    padding: 12px;
    border-top: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
}

.quick-responses {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.quick-response {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.quick-response:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Chat Footer */
.chat-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-footer textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.chat-send-btn {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.chat-send-btn:hover {
    background: #2980b9;
}

/* No Chat Selected State */
.no-chat-selected {
    text-align: center;
    padding: 40px 15px;
    color: #7f8c8d;
    width: 100%;
}

.no-chat-selected i {
    font-size: 36px;
    margin-bottom: 12px;
    color: #bdc3c7;
}

.no-chat-selected h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #34495e;
}

.no-chat-selected p {
    font-size: 14px;
    color: #7f8c8d;
}

/* File Attachment */
.file-attachment-admin {
    background: #f8f9fa;
    padding: 8px 10px;
    border-radius: 6px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    max-width: 100%;
    overflow: hidden;
}

.attachment-icon {
    color: #3498db;
    flex-shrink: 0;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-style: italic;
    color: #7f8c8d;
    margin: 8px 0;
    font-size: 13px;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #7f8c8d;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Chat Status */
.chat-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    background: #27ae60;
    color: white;
    display: inline-block;
}

.chat-status.offline {
    background: #95a5a6;
}

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
    .admin-chat-container {
        flex-direction: row;
    }
    
    .admin-chat-sidebar {
        flex: 0 0 300px;
        border-right: 1px solid #e0e0e0;
        border-bottom: none;
        max-height: none;
    }
    
    .admin-chat-main {
        flex: 1;
    }
    
    .chat-user-item {
        padding: 15px;
    }
    
    .user-name {
        font-size: 15px;
    }
    
    .last-message {
        max-width: 200px;
    }
    
    .message-bubble {
        max-width: 70%;
    }
    
    .admin-chat-messages {
        padding: 20px;
    }
    
    .chat-footer {
        flex-direction: row;
        align-items: flex-end;
    }
    
    .chat-footer textarea {
        min-height: 60px;
    }
    
    .chat-send-btn {
        width: auto;
        min-width: 100px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .admin-chat-sidebar {
        flex: 0 0 350px;
    }
    
    .no-chat-selected {
        padding: 60px 20px;
    }
    
    .no-chat-selected i {
        font-size: 48px;
    }
    
    .no-chat-selected h3 {
        font-size: 20px;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
    .admin-chat-section {
        padding: 12px;
        margin: 10px 0;
        border-radius: 8px;
    }
    
    #admin-chat-modal .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .admin-chat-messages {
        padding: 12px;
    }
    
    .message-bubble {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .quick-responses {
        gap: 4px;
    }
    
    .quick-response {
        padding: 5px 10px;
        font-size: 10px;
    }
}

/* Orientation Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .admin-chat-sidebar {
        max-height: 30vh;
    }
    
    .admin-chat-messages {
        height: 50vh;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .admin-chat-section,
    .admin-chat-container,
    .chat-user-item,
    .admin-chat-input,
    .chat-search input,
    .chat-footer textarea {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .user .message-bubble {
        background: #34495e;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .chat-user-item:hover {
        background-color: #34495e;
    }
    
    .admin-chat-messages {
        background: #243342;
    }
    
    .quick-response {
        background: #34495e;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .user-name,
    .last-message,
    .message-time,
    .no-chat-selected p {
        color: #bdc3c7;
    }
}   

/* User Chat Container - Mobile First */
.chat-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    max-width: 100%;
    margin: 15px auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    height: 80vh;
    max-height: 600px;
    width: 100%;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary, #3498db), #2980b9);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.chat-title {
    font-size: 20px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.chat-title i {
    font-size: 24px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    opacity: 0.9;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success, #2ecc71);
    box-shadow: 0 0 5px var(--success, #2ecc71);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.message {
    margin-bottom: 12px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.4;
    position: relative;
    animation: messageAppear 0.3s ease;
    word-wrap: break-word;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    background: var(--primary, #3498db);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
}

.support-message {
    background: white;
    color: var(--dark, #2c3e50);
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    align-self: flex-start;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    padding: 0 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.quick-option {
    background: #e3f2fd;
    border: 1px solid #b3e5fc;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.quick-option:hover,
.quick-option:active {
    background: var(--primary, #3498db);
    color: white;
    transform: translateY(-2px);
}

/* File Upload */
.file-upload-area {
    margin: 10px 15px;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--primary, #3498db);
    background: #f8f9fa;
}

.file-upload-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--dark, #2c3e50);
}

.file-upload-label i {
    font-size: 20px;
    color: var(--primary, #3498db);
}

.file-upload-label span {
    font-size: 14px;
}

#file-input {
    display: none;
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 15px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    max-width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.file-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-remove {
    color: var(--accent, #e74c3c);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.file-remove:hover {
    background-color: #ffebee;
}

.file-preview {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    margin-top: 5px;
    border: 1px solid #ddd;
}

/* Chat Input Area */
.chat-input-container {
    padding: 12px 15px;
    border-top: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
}

.chat-input {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 12px 15px;
    font-size: 14px;
    resize: none;
    min-height: 48px;
    max-height: 120px;
    font-family: inherit;
    line-height: 1.4;
}

.chat-input textarea:focus {
    outline: none;
    border-color: var(--primary, #3498db);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.chat-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-action-btn {
    background: var(--primary, #3498db);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.chat-action-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.chat-action-btn.send {
    background: var(--success, #2ecc71);
}

.chat-action-btn.send:hover {
    background: #27ae60;
}

.chat-action-btn.attach {
    background: #f1c40f;
}

.chat-action-btn.attach:hover {
    background: #f39c12;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: white;
    border-radius: 18px;
    margin: 5px 0;
    align-self: flex-start;
    max-width: 85%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.typing-text {
    font-size: 12px;
    color: #7f8c8d;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #7f8c8d;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Connection Status */
.connection-status {
    padding: 8px 15px;
    text-align: center;
    font-size: 12px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    margin: 0 15px 10px;
    border-radius: 6px;
    display: none;
}

.connection-status.connected {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.connection-status.disconnected {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Empty State */
.chat-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.chat-empty-state i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 15px;
}

.chat-empty-state h3 {
    font-size: 18px;
    color: #34495e;
    margin-bottom: 10px;
}

.chat-empty-state p {
    font-size: 14px;
    line-height: 1.5;
}

/* Tablet Styles */
@media (min-width: 768px) {
    .chat-container {
        max-width: 700px;
        margin: 20px auto;
        height: 600px;
        max-height: 70vh;
    }
    
    .chat-header {
        padding: 20px 25px;
    }
    
    .chat-title {
        font-size: 24px;
    }
    
    .chat-status {
        font-size: 14px;
    }
    
    .status-indicator {
        width: 10px;
        height: 10px;
    }
    
    .chat-messages {
        padding: 20px;
    }
    
    .message {
        padding: 12px 18px;
        max-width: 80%;
    }
    
    .quick-options {
        gap: 10px;
        margin: 15px 0;
        padding: 0 20px;
    }
    
    .quick-option {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .file-upload-area {
        margin: 15px 20px;
        padding: 15px;
    }
    
    .file-upload-label i {
        font-size: 24px;
    }
    
    .file-list {
        margin: 10px 20px;
    }
    
    .file-name {
        max-width: 200px;
    }
    
    .chat-input-container {
        padding: 15px 20px;
    }
    
    .chat-input textarea {
        min-height: 60px;
        padding: 15px;
        font-size: 15px;
    }
    
    .chat-action-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .chat-container {
        max-width: 800px;
        height: 700px;
    }
    
    .chat-empty-state {
        padding: 60px 20px;
    }
    
    .chat-empty-state i {
        font-size: 60px;
    }
    
    .chat-empty-state h3 {
        font-size: 20px;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
    .chat-container {
        height: calc(100vh - 120px);
        margin: 10px auto;
        border-radius: 6px;
    }
    
    .chat-header {
        padding: 12px 15px;
    }
    
    .chat-title {
        font-size: 18px;
        gap: 8px;
    }
    
    .chat-title i {
        font-size: 20px;
    }
    
    .chat-status {
        font-size: 12px;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .message {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .quick-options {
        gap: 6px;
        margin: 10px 0;
        padding: 0 12px;
    }
    
    .quick-option {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 32px;
    }
    
    .file-upload-area {
        margin: 8px 12px;
        padding: 10px;
    }
    
    .file-upload-label span {
        font-size: 13px;
    }
    
    .file-item {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .chat-input-container {
        padding: 10px 12px;
    }
    
    .chat-input textarea {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .chat-action-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .typing-indicator {
        padding: 6px 12px;
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .chat-container {
        height: 90vh;
        max-height: none;
    }
    
    .chat-header {
        padding: 10px 15px;
    }
    
    .chat-messages {
        padding: 10px;
    }
    
    .message {
        padding: 6px 10px;
        margin-bottom: 8px;
    }
    
    .chat-input-container {
        padding: 8px 10px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .chat-container {
        background: #2c3e50;
        border-color: #4a6572;
    }
    
    .chat-messages {
        background: #243342;
    }
    
    .support-message {
        background: #34495e;
        color: #ecf0f1;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    .quick-option {
        background: #34495e;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .file-upload-area {
        background: #2c3e50;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .file-upload-area:hover {
        background: #34495e;
    }
    
    .file-item {
        background: #34495e;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .chat-input-container,
    .chat-input textarea {
        background: #2c3e50;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .typing-indicator {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .connection-status {
        background: #f39c12;
        color: #2c3e50;
    }
}

/* Accessibility Improvements */
.chat-action-btn:focus,
.quick-option:focus,
.file-upload-label:focus {
    outline: 2px solid var(--primary, #3498db);
    outline-offset: 2px;
}

.chat-input textarea:focus {
    outline: 2px solid var(--primary, #3498db);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .chat-container {
        border: none;
        box-shadow: none;
        height: auto;
        max-height: none;
    }
    
    .chat-input-container,
    .quick-options,
    .file-upload-area,
    .chat-action-btn {
        display: none !important;
    }
    
    .chat-messages {
        overflow: visible;
        height: auto;
    }
}

/* User Chat Modal - Mobile First */
#user-chat-modal .modal-content {
    max-width: 800px;
    height: 90vh;
    padding: 0;
    margin: 5vh auto;
    width: 95%;
    border-radius: 12px;
    overflow: hidden;
}

/* Admin Chat Container - User Version */
.admin-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 20px 25px;
    border-radius: 0;
    flex-shrink: 0;
}

.chat-title {
    font-size: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.chat-title i {
    font-size: 24px;
    color: #f1c40f;
}

.chat-title span {
    font-weight: 600;
    font-size: 22px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 20px;
    margin-top: 5px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
}

@keyframes pulse {
    0% { 
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% { 
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* Chat Messages Area */
.admin-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.4;
    position: relative;
    animation: messageAppear 0.3s ease;
    word-wrap: break-word;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-message {
    background: white;
    color: #2c3e50;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    align-self: flex-start;
    border-left: 4px solid #3498db;
}

.message-content {
    font-size: 15px;
    line-height: 1.5;
}

.message-time {
    font-size: 11px;
    color: #95a5a6;
    margin-top: 6px;
    text-align: right;
    font-style: italic;
}

/* Quick Options */
.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    max-height: 120px;
}

.quick-option {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 20px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    color: #1565c0;
    font-weight: 500;
}

.quick-option:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

/* File Upload Area */
.file-upload-area {
    margin: 0 20px;
    padding: 15px;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
    margin-top: 15px;
}

.file-upload-area:hover {
    border-color: #3498db;
    background: #f0f7ff;
}

.file-upload-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #34495e;
}

.file-upload-label i {
    font-size: 28px;
    color: #3498db;
}

.file-upload-label span {
    font-size: 14px;
    color: #7f8c8d;
}

#user-file-input {
    display: none;
}

/* File List */
.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 20px;
    min-height: 40px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    max-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.file-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2c3e50;
}

.file-remove {
    color: #e74c3c;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.file-remove:hover {
    background-color: #ffebee;
}

/* Chat Footer */
.chat-footer {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.input-group-4 {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    font-size: 15px;
    resize: none;
    min-height: 60px;
    max-height: 120px;
    font-family: inherit;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.chat-input::placeholder {
    color: #95a5a6;
}

.chat-send {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    min-width: 100px;
    height: 60px;
    justify-content: center;
}

.chat-send:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.chat-send:active {
    transform: translateY(0);
}

.chat-send i {
    font-size: 16px;
}

/* Typing Indicator (Optional - can be added via JS) */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: white;
    border-radius: 18px;
    margin: 10px 0;
    align-self: flex-start;
    max-width: 85%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-style: italic;
    color: #7f8c8d;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #3498db;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Empty State for Messages */
.chat-empty {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.chat-empty i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.chat-empty h3 {
    font-size: 20px;
    color: #34495e;
    margin-bottom: 10px;
}

.chat-empty p {
    font-size: 15px;
    line-height: 1.6;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    #user-chat-modal .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .chat-header {
        padding: 15px;
    }
    
    .chat-title {
        font-size: 18px;
        gap: 8px;
    }
    
    .chat-title span {
        font-size: 18px;
    }
    
    .chat-title i {
        font-size: 20px;
    }
    
    .chat-status {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .admin-chat-messages {
        padding: 15px;
    }
    
    .message {
        padding: 10px 15px;
        font-size: 14px;
        max-width: 90%;
    }
    
    .quick-options {
        padding: 12px 15px;
        gap: 8px;
        max-height: 110px;
    }
    
    .quick-option {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .file-upload-area {
        margin: 0 15px;
        padding: 12px;
    }
    
    .file-upload-label i {
        font-size: 24px;
    }
    
    .file-upload-label span {
        font-size: 13px;
    }
    
    .file-list {
        margin: 12px 15px;
        gap: 8px;
    }
    
    .file-item {
        max-width: 150px;
    }
    
    .chat-footer {
        padding: 12px 15px;
    }
    
    .chat-input {
        padding: 12px;
        min-height: 50px;
        font-size: 14px;
    }
    
    .chat-send {
        padding: 12px 20px;
        min-width: 80px;
        height: 50px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .chat-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .chat-status {
        align-self: flex-start;
    }
    
    .quick-options {
        flex-direction: column;
        max-height: none;
        overflow-x: visible;
    }
    
    .quick-option {
        width: 100%;
        text-align: left;
        white-space: normal;
        padding: 10px;
    }
    
    .input-group-4 {
        flex-direction: column;
        gap: 10px;
    }
    
    .chat-send {
        width: 100%;
    }
    
    .file-item {
        max-width: 100%;
        width: 100%;
        justify-content: space-between;
    }
    
    .file-name {
        max-width: none;
        flex: 1;
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .chat-header {
        padding: 10px 15px;
    }
    
    .admin-chat-messages {
        padding: 10px 15px;
    }
    
    .message {
        margin-bottom: 10px;
        padding: 8px 12px;
    }
    
    .quick-options {
        padding: 8px 15px;
        max-height: 80px;
    }
    
    .file-upload-area {
        margin: 8px 15px;
        padding: 10px;
    }
    
    .chat-footer {
        padding: 10px 15px;
    }
    
    .chat-input {
        min-height: 45px;
        padding: 10px;
    }
    
    .chat-send {
        height: 45px;
        padding: 10px 15px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .admin-chat-container {
        background: #1a252f;
    }
    
    .chat-header {
        background: linear-gradient(135deg, #2c3e50, #1a5276);
    }
    
    .admin-chat-messages {
        background: #141e27;
    }
    
    .support-message {
        background: #2c3e50;
        color: #ecf0f1;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    .quick-options {
        background: #1a252f;
        border-color: #34495e;
    }
    
    .quick-option {
        background: #2c3e50;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .file-upload-area {
        background: #1a252f;
        border-color: #34495e;
    }
    
    .file-upload-label {
        color: #ecf0f1;
    }
    
    .file-item {
        background: #2c3e50;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .chat-footer {
        background: #1a252f;
        border-color: #34495e;
    }
    
    .chat-input {
        background: #2c3e50;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .chat-input::placeholder {
        color: #7f8c8d;
    }
}

/* Accessibility Improvements */
.chat-input:focus,
.quick-option:focus,
.chat-send:focus,
.file-upload-label:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Loading Animation */
.message-loading {
    opacity: 0.7;
    position: relative;
}

.message-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Badge Styles */
.sidebar-badge {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: none;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.bottom-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 50%;
    min-width: 16px;
    text-align: center;
}

/* Notification Styles */
.notification {
    background: var(--primary-dark);
    border-left: 4px solid var(--primary);
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left-color: var(--success);
}

.notification.error {
    border-left-color: var(--danger);
}

.notification.warning {
    border-left-color: var(--warning);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* ======================
   FIXED BOTTOM BAR - NO SHAKING
   ====================== */

.bottombar {
    position: relative !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    z-index: 9999 !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
    height: 60px !important;
    /* Prevent any movement */
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* Bottom bar container */
.bottom-nav-container {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: space-around !important;
    align-items: center !important;
}

/* Bottom items */
.bottom-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    flex: 1 !important;
    height: 100% !important;
    padding: 8px 5px !important;
    border-radius: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    min-width: 60px !important;
    -webkit-tap-highlight-color: transparent !important;
    /* Prevent shaking */
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    will-change: transform !important;
}

.bottom-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.bottom-item.active {
    color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    position: relative !important;
}

.bottom-item.active::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: var(--accent) !important;
}

/* Bottom icons */
.bottom-icon {
    font-size: 20px !important;
    margin-bottom: 4px !important;
    transition: transform 0.3s ease !important;
    /* Fix icon shaking */
    display: inline-block !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

.bottom-item.active .bottom-icon {
    transform: translateY(-2px) !important;
}

.bottom-text {
    font-size: 11px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    /* Fix text shaking */
    display: inline-block !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

/* Bottom badges */
.bottom-badge {
    position: absolute !important;
    top: 8px !important;
    right: 25% !important;
    background: var(--danger) !important;
    color: white !important;
    font-size: 10px !important;
    padding: 2px 5px !important;
    border-radius: 10px !important;
    min-width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    border: 2px solid var(--primary-dark) !important;
    /* Fix badge shaking */
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    animation: none !important;
}

/* ======================
   BOTTOM BAR RESPONSIVE ADAPTATIONS
   ====================== */

/* Small Mobile Devices (up to 375px) */
@media (max-width: 375px) {
    .bottombar {
        height: 55px !important;
    }
    
    .bottom-item {
        padding: 6px 3px !important;
        min-width: 55px !important;
    }
    
    .bottom-icon {
        font-size: 18px !important;
        margin-bottom: 3px !important;
    }
    
    .bottom-text {
        font-size: 10px !important;
    }
    
    .bottom-badge {
        top: 6px !important;
        right: 20% !important;
        font-size: 9px !important;
        min-width: 14px !important;
        height: 14px !important;
    }
}

/* Standard Mobile (376px - 767px) */
@media (min-width: 376px) and (max-width: 767px) {
    .bottombar {
        height: 60px !important;
    }
    
    .bottom-item {
        padding: 8px 4px !important;
        min-width: 65px !important;
    }
    
    .bottom-icon {
        font-size: 20px !important;
    }
    
    .bottom-text {
        font-size: 11px !important;
    }
}

/* Hide bottom bar on tablet and desktop */
@media (min-width: 768px) {
    .bottombar {
        display: none !important;
    }
    
    /* Add padding to body for bottom bar only on mobile */
    body {
        padding-bottom: 0 !important;
    }
}

/* Show bottom bar only on mobile */
@media (max-width: 767px) {
    body {
        padding-bottom: 60px !important;
    }
    
    /* Prevent content from being hidden behind bottom bar */
    .dashboard-content {
        padding-bottom: 70px !important;
    }
    
    .content-section {
        padding-bottom: 70px !important;
    }
    
    /* Modal adjustments for bottom bar */
    .modal {
        bottom: 60px !important;
    }
}

/* ======================
   FIX FOR SHAKING ISSUES
   ====================== */

/* Hardware acceleration fixes */
.bottombar,
.bottom-item,
.bottom-icon,
.bottom-text,
.bottom-badge {
    -webkit-transform: translate3d(0, 0, 0) !important;
    -moz-transform: translate3d(0, 0, 0) !important;
    -ms-transform: translate3d(0, 0, 0) !important;
    -o-transform: translate3d(0, 0, 0) !important;
    transform: translate3d(0, 0, 0) !important;
    
    -webkit-backface-visibility: hidden !important;
    -moz-backface-visibility: hidden !important;
    -ms-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    
    -webkit-perspective: 1000 !important;
    -moz-perspective: 1000 !important;
    -ms-perspective: 1000 !important;
    perspective: 1000 !important;
}

/* Remove all animations that could cause shaking */
.bottombar,
.bottom-item {
    animation: none !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .bottombar {
        padding-bottom: constant(safe-area-inset-bottom) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        height: calc(60px + env(safe-area-inset-bottom)) !important;
    }
    
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    }
}

/* ======================
   FIXED BOTTOM BAR - NO SHAKING
   ====================== */

.bottombar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    z-index: 9999 !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
    height: 60px !important;
    /* Prevent any movement */
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* Bottom bar container */
.bottom-nav-container {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: space-around !important;
    align-items: center !important;
}

/* Bottom items */
.bottom-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    flex: 1 !important;
    height: 100% !important;
    padding: 8px 5px !important;
    border-radius: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    min-width: 60px !important;
    -webkit-tap-highlight-color: transparent !important;
    /* Prevent shaking */
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    will-change: transform !important;
}

.bottom-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.bottom-item.active {
    color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    position: relative !important;
}

.bottom-item.active::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: var(--accent) !important;
}

/* Bottom icons */
.bottom-icon {
    font-size: 20px !important;
    margin-bottom: 4px !important;
    transition: transform 0.3s ease !important;
    /* Fix icon shaking */
    display: inline-block !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

.bottom-item.active .bottom-icon {
    transform: translateY(-2px) !important;
}

.bottom-text {
    font-size: 11px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    /* Fix text shaking */
    display: inline-block !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

/* Bottom badges */
.bottom-badge {
    position: absolute !important;
    top: 8px !important;
    right: 25% !important;
    background: var(--danger) !important;
    color: white !important;
    font-size: 10px !important;
    padding: 2px 5px !important;
    border-radius: 10px !important;
    min-width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    border: 2px solid var(--primary-dark) !important;
    /* Fix badge shaking */
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    animation: none !important;
}

/* ======================
   BOTTOM BAR RESPONSIVE ADAPTATIONS
   ====================== */

/* Small Mobile Devices (up to 375px) */
@media (max-width: 375px) {
    .bottombar {
        height: 55px !important;
    }
    
    .bottom-item {
        padding: 6px 3px !important;
        min-width: 55px !important;
    }
    
    .bottom-icon {
        font-size: 18px !important;
        margin-bottom: 3px !important;
    }
    
    .bottom-text {
        font-size: 10px !important;
    }
    
    .bottom-badge {
        top: 6px !important;
        right: 20% !important;
        font-size: 9px !important;
        min-width: 14px !important;
        height: 14px !important;
    }
}

/* Standard Mobile (376px - 767px) */
@media (min-width: 376px) and (max-width: 767px) {
    .bottombar {
        height: 60px !important;
    }
    
    .bottom-item {
        padding: 8px 4px !important;
        min-width: 65px !important;
    }
    
    .bottom-icon {
        font-size: 20px !important;
    }
    
    .bottom-text {
        font-size: 11px !important;
    }
}

/* Hide bottom bar on tablet and desktop */
@media (min-width: 768px) {
    .bottombar {
        display: none !important;
    }
    
    /* Add padding to body for bottom bar only on mobile */
    body {
        padding-bottom: 0 !important;
    }
}

/* Show bottom bar only on mobile */
@media (max-width: 767px) {
    body {
        padding-bottom: 60px !important;
    }
    
    /* Prevent content from being hidden behind bottom bar */
    .dashboard-content {
        padding-bottom: 70px !important;
    }
    
    .content-section {
        padding-bottom: 70px !important;
    }
    
    /* Modal adjustments for bottom bar */
    .modal {
        bottom: 60px !important;
    }
}

/* ======================
   FIX FOR SHAKING ISSUES
   ====================== */

/* Hardware acceleration fixes */
.bottombar,
.bottom-item,
.bottom-icon,
.bottom-text,
.bottom-badge {
    -webkit-transform: translate3d(0, 0, 0) !important;
    -moz-transform: translate3d(0, 0, 0) !important;
    -ms-transform: translate3d(0, 0, 0) !important;
    -o-transform: translate3d(0, 0, 0) !important;
    transform: translate3d(0, 0, 0) !important;
    
    -webkit-backface-visibility: hidden !important;
    -moz-backface-visibility: hidden !important;
    -ms-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    
    -webkit-perspective: 1000 !important;
    -moz-perspective: 1000 !important;
    -ms-perspective: 1000 !important;
    perspective: 1000 !important;
}

/* Remove all animations that could cause shaking */
.bottombar,
.bottom-item {
    animation: none !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .bottombar {
        padding-bottom: constant(safe-area-inset-bottom) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        height: calc(60px + env(safe-area-inset-bottom)) !important;
    }
    
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    }
}

/* ============================================
   ENHANCED STAT CARD & RESPONSIVENESS
   ============================================ */

/* ======================
   ENHANCED STAT CARDS
   ====================== */

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(37, 111, 138, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 12px 12px 0 0;
}

.stat-card:hover::before {
    height: 6px;
    transition: height 0.3s ease;
}

.stat-card.premium {
    background: linear-gradient(135deg, #fff9db 0%, #ffeaa7 100%);
    border-color: rgba(255, 215, 0, 0.2);
}

.stat-card.premium::before {
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
}

.stat-card.danger {
    background: linear-gradient(135deg, #ffeaea 0%, #f8d7da 100%);
    border-color: rgba(220, 53, 69, 0.1);
}

.stat-card.danger::before {
    background: linear-gradient(90deg, #dc3545 0%, #e74c3c 100%);
}

.stat-card.success {
    background: linear-gradient(135deg, #e8f6ef 0%, #d4edda 100%);
    border-color: rgba(40, 167, 69, 0.1);
}

.stat-card.success::before {
    background: linear-gradient(90deg, #28a745 0%, #2ecc71 100%);
}

.stat-card-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(37, 111, 138, 0.2);
}

.stat-card.premium .stat-icon {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.stat-card.danger .stat-icon {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, #28a745 0%, #2ecc71 100%);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    letter-spacing: -0.5px;
}

.stat-card.premium .stat-value {
    color: #b8860b;
}

.stat-card.danger .stat-value {
    color: #c82333;
}

.stat-card.success .stat-value {
    color: #1e7e34;
}

.stat-label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
    margin: 0;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.stat-change.negative {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}


/* ======================
   ENHANCED BUTTONS
   ====================== */

.btn {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    outline: none;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(37, 111, 138, 0.2);
    min-height: 48px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}

.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.7s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 111, 138, 0.3);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 111, 138, 0.2);
    transition: transform 0.1s;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(3px);
}

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(37, 111, 138, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 8px 25px rgba(37, 111, 138, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #dc3545 100%);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffd700 0%, #ffc107 100%);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 25px rgba(37, 111, 138, 0.3);
}

.btn-ghost {
    background: transparent;
    border: 2px solid transparent;
    color: var(--primary);
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(37, 111, 138, 0.1);
    border-color: rgba(37, 111, 138, 0.2);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 40px;
    border-radius: 8px;
}

.btn-lg {
    padding: 20px 32px;
    font-size: 17px;
    min-height: 56px;
    border-radius: 12px;
    font-weight: 700;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-circle {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    min-height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-circle.btn-sm {
    width: 40px;
    height: 40px;
    min-height: 40px;
    min-width: 40px;
}

.btn-circle.btn-lg {
    width: 56px;
    height: 56px;
    min-height: 56px;
    min-width: 56px;
}

.btn-loading {
    opacity: 0.8;
    pointer-events: none;
}

.btn-loading .btn-text {
    opacity: 0;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: btn-spin 1s linear infinite;
}

@keyframes btn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ======================
   MOBILE RESPONSIVENESS
   ====================== */

@media (max-width: 767px) {
    /* Stat Cards Mobile */
    .stat-card {
        padding: 15px;
        min-height: 100px;
        border-radius: 10px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .stat-value {
        font-size: 20px;
        font-weight: 700;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-change {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* Stat Grid Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    

    
    .investment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .investment-mineral {
        font-size: 16px;
    }
    
    .mineral-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .investment-amount {
        font-size: 18px;
        align-self: flex-end;
    }
    
    .detail-row {
        padding: 6px 0;
    }
    
    .detail-label {
        font-size: 12px;
    }
    
    .detail-value {
        font-size: 13px;
    }
    
    .progress-section {
        padding: 12px;
        margin: 10px 0;
    }
    
    .current-profit {
        font-size: 20px;
    }
    
    .profit-display {
        padding: 12px;
    }
    
    .investment-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 14px 20px;
        font-size: 14px;
        min-height: 44px;
        border-radius: 8px;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
    }
    
    .btn-lg {
        padding: 16px 24px;
        font-size: 15px;
        min-height: 48px;
    }
    
    .btn-circle {
        width: 44px;
        height: 44px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-circle.btn-sm {
        width: 36px;
        height: 36px;
        min-height: 36px;
        min-width: 36px;
    }
}

/* ======================
   TABLET RESPONSIVENESS
   ====================== */

@media (min-width: 768px) and (max-width: 1024px) {
    /* Stat Cards Tablet */
    .stat-card {
        padding: 18px;
        min-height: 110px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Stat Grid Tablet */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }
    

    
    .investment-mineral {
        font-size: 17px;
    }
    
    .investment-amount {
        font-size: 19px;
    }
    
    /* Buttons Tablet */
    .btn {
        padding: 15px 22px;
        font-size: 15px;
    }
    
    .btn-lg {
        padding: 18px 28px;
        font-size: 16px;
    }
}

/* ======================
   DESKTOP RESPONSIVENESS
   ====================== */

@media (min-width: 1025px) {
    /* Stat Cards Desktop */
    .stat-card {
        padding: 20px;
        min-height: 120px;
    }
    
    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    /* Stat Grid Desktop */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px !important;
    }
    
    /* Buttons Desktop */
    .btn {
        padding: 16px 24px;
        font-size: 15px;
    }
    
    .btn-lg {
        padding: 20px 32px;
        font-size: 17px;
    }
}

/* ======================
   COMPACT MODE FOR STAT
   ====================== */

.compact-mode .stat-card {
    padding: 12px;
    min-height: 90px;
}

.compact-mode .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin-bottom: 8px;
}

.compact-mode .stat-value {
    font-size: 18px;
}

.compact-mode .stat-label {
    font-size: 10px;
}

.compact-mode .stat-change {
    display: none;
}

.compact-mode {
    padding: 15px;
}

.compact-mode  {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.compact-mode {
    font-size: 15px;
}

.compact-mode {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.compact-mode  {
    font-size: 16px;
}

.compact-mode {
    padding: 5px 0;
}

.compact-mode {
    font-size: 11px;
}

.compact-mode {
    font-size: 12px;
}

.compact-mode {
    padding: 10px;
    margin: 8px 0;
}

.compact-mode {
    padding: 10px;
}

.compact-mode {
    font-size: 18px;
    margin: 5px 0;
}

.compact-mode .btn {
    padding: 12px 18px;
    font-size: 13px;
    min-height: 40px;
    border-radius: 8px;
}

.compact-mode .btn-sm {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
}

/* Toggle button for compact mode */
.compact-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.compact-toggle:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

/* ======================
   ANIMATIONS & EFFECTS
   ====================== */

@keyframes cardPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.stat-card.pulse {
    animation: cardPulse 2s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeInUp 0.5s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }


 

/* ======================
   DARK MODE SUPPORT
   ====================== */

@media (prefers-color-scheme: dark) {
    .stat-card {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: rgba(59, 160, 201, 0.2);
        color: #e2e8f0;
    }
    
    .stat-card::before {
        background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary) 100%);
    }
    
    .stat-value {
        color: #e2e8f0;
    }
    
    .stat-label {
        color: #a0aec0;
    }
}

/* ======================
   PERFORMANCE OPTIMIZATIONS
   ====================== */

/* Reduce animations on mobile for performance */
@media (max-width: 767px) {
    .stat-card,
    .btn {
        animation: none !important;
        transition: none !important;
    }
    
    .btn::before,
    .progress-bar::after {
        display: none !important;
    }
}

/* Will-change for smooth animations */
.stat-card,

.btn {
    will-change: transform, box-shadow;
}

/* ======================
   ACCESSIBILITY
   ====================== */

.btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 111, 138, 0.2);
}

.stat-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ======================
   PRINT STYLES
   ====================== */

@media print {
    .stat-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        background: white !important;
        color: black !important;
    }
    
    .btn {
        display: none !important;
    }
    
    .compact-toggle {
        display: none !important;
    }
}

/* ============================================
   SECTION-SPECIFIC RESPONSIVE FIXES
   ============================================ */

/* FIX 1: HERO SECTION ADAPTATION */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

/* Ensure hero content is always visible */
.landing-container,
.login-container,
.dashboard-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Hero content visibility fix */
.landing-title,
.landing-subtitle,
.cta-title {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 60px 15px 30px;
    }
    
    .landing-title {
        font-size: 28px !important;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .landing-subtitle {
        font-size: 16px !important;
        line-height: 1.5;
        margin-bottom: 25px;
        max-width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .btn-landing {
        width: 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }
}

/* Tablet Hero Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        padding: 80px 30px 50px;
    }
    
    .landing-title {
        font-size: 36px !important;
        margin-bottom: 20px;
    }
    
    .landing-subtitle {
        font-size: 18px !important;
        margin-bottom: 30px;
        max-width: 80%;
    }
    
    .cta-buttons {
        flex-direction: row;
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-landing {
        width: auto;
        min-width: 200px;
    }
}

/* Desktop Hero Adjustments */
@media (min-width: 1025px) {
    .hero-section {
        padding: 100px 40px 60px;
    }
    
    .landing-title {
        font-size: 48px !important;
        margin-bottom: 25px;
    }
    
    .landing-subtitle {
        font-size: 20px !important;
        margin-bottom: 40px;
        max-width: 70%;
    }
    
    .cta-buttons {
        flex-direction: row;
        gap: 25px;
    }
    
    .btn-landing {
        min-width: 220px;
        padding: 18px 32px !important;
    }
}

/* ============================================
   FIX 2: TABLE RESPONSIVE ADAPTATIONS
   ============================================ */

/* Base table styles with responsive features */
.transaction-table,
.users-table,
.referrals-table,
.earnings-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive table container */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border-radius: 8px;
    background: var(--light);
    padding: 1px;
}

/* Mobile Table Adaptations */
@media (max-width: 767px) {
    /* Stack table rows for mobile */
    .mobile-table {
        display: block;
    }
    
    .mobile-table thead {
        display: none;
    }
    
    .mobile-table tbody,
    .mobile-table tr,
    .mobile-table td {
        display: block;
        width: 100%;
    }
    
    .mobile-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        background: white;
    }
    
    .mobile-table td {
        padding: 10px;
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 45%;
        text-align: right;
    }
    
    .mobile-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        top: 10px;
        width: 40%;
        text-align: left;
        font-weight: bold;
        color: var(--primary);
    }
    
    .mobile-table td:last-child {
        border-bottom: none;
    }
    
    /* Regular tables - horizontal scroll */
    .transaction-table,
    .users-table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* Status badges mobile optimization */
    .status-badge {
        padding: 4px 6px;
        font-size: 10px;
        display: inline-block;
        margin: 2px 0;
    }
}

/* Tablet Table Adaptations */
@media (min-width: 768px) and (max-width: 1024px) {
    .transaction-table,
    .users-table {
        font-size: 13px;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 10px 8px;
    }
    
    /* Reduce column width on tablet */
    .transaction-table th:nth-child(3),
    .transaction-table td:nth-child(3),
    .transaction-table th:nth-child(4),
    .transaction-table td:nth-child(4) {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Action buttons tablet optimization */
    .user-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .user-actions button {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Desktop Table Adaptations */
@media (min-width: 1025px) {
    .transaction-table,
    .users-table {
        font-size: 14px;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 12px 10px;
    }
    
    /* Hover effects for desktop tables */
    .transaction-table tbody tr:hover {
        background-color: rgba(37, 111, 138, 0.05);
        transform: translateX(2px);
        transition: all 0.2s ease;
    }
    
    /* Smooth scrolling for large tables */
    .table-responsive {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* ============================================
   FIX 3: DASHBOARD SECTION ADAPTATIONS
   ============================================ */

/* Dashboard Grid System */
.dashboard-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* Mobile Dashboard */
@media (max-width: 767px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-content {
        padding: 15px !important;
    }
    
    .content-section {
        padding: 15px !important;
        margin-bottom: 20px;
    }
    
    /* Stack dashboard cards */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px !important;
        text-align: center;
    }
    
    /* Navigation optimization */
    
    
    .nav-item {
        flex: 1 0 calc(50% - 10px);
        margin: 5px;
        text-align: center;
        justify-content: center;
    }
}

/* Tablet Dashboard */
@media (min-width: 768px) and (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .dashboard-content {
        padding: 25px !important;
    }
    
    .content-section {
        padding: 25px !important;
    }
    
    /* Tablet grid layouts */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px;
    }
    
    /* Two-column layout for tablets */
    .dashboard-main {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 25px;
    }
    
    /* Navigation tablet */
    
    
    .nav-item {
        flex: none;
        padding: 12px 20px;
    }
}

/* Desktop Dashboard */
@media (min-width: 1025px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .dashboard-content {
        padding: 30px !important;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .content-section {
        padding: 30px !important;
        margin-bottom: 30px;
    }
    
    /* Desktop grid layouts */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px;
    }
    
    /* Three-column desktop layout */
    .dashboard-main {
        display: grid;
        grid-template-columns: 3fr 1fr;
        gap: 30px;
    }
    
    /* Sidebar integration */
    .dashboard-with-sidebar {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 30px;
        min-height: calc(100vh - 120px);
    }
    
    /* Enhanced hover effects */
    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        transition: all 0.3s ease;
    }
}

/* ============================================
   FIX 4: FORM SECTION ADAPTATIONS
   ============================================ */

.form-container,
.change-password-section {
    width: 100%;
    max-width: 100%;
}

/* Mobile Forms */
@media (max-width: 767px) {
    .form-container {
        padding: 15px !important;
    }
    
    .form-control {
        margin-bottom: 15px;
    }
    
    .form-control label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .form-control input,
    .form-control select,
    .form-control textarea {
        width: 100%;
        padding: 14px 12px;
        font-size: 16px;
        border-radius: 8px;
        min-height: 48px;
    }
    
    
    /* Quick amounts mobile */
    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 15px 0;
    }
    
    .quick-amount {
        padding: 12px 8px;
        font-size: 14px;
    }
}

/* Tablet Forms */
@media (min-width: 768px) and (max-width: 1024px) {
    .form-container {
        padding: 25px !important;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .form-control input,
    .form-control select,
    .form-control textarea {
        padding: 16px 15px;
        font-size: 16px;
    }
    
    
    /* Quick amounts tablet */
    .quick-amounts {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Desktop Forms */
@media (min-width: 1025px) {
    .form-container {
        padding: 30px !important;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .form-control input,
    .form-control select,
    .form-control textarea {
        padding: 18px 20px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    /* Quick amounts desktop */
    .quick-amounts {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* ============================================
   FIX 5: NAVIGATION & HEADER ADAPTATIONS
   ============================================ */

/* Mobile Navigation */
@media (max-width: 767px) {
    .top-header {
        height: 50px;
        padding: 8px 10px;
    }
    
    .main-nav {
        top: 50px;
        height: 50px;
        padding: 0 10px;
    }
    
    /* Adjust body padding for fixed headers */
    body {
        padding-top: 100px !important; /* 50px + 50px */
    }
    
    /* Mobile menu optimization */
    .nav-menu {
        position: fixed;
        top: 100px;
        left: 0;
        width: 100%;
        background: white;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        display: none;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-item {
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }
    
    /* Hide some elements on mobile */
    .header-search {
        display: none;
    }
    
    .user-name {
        display: none;
    }
}

/* Tablet Navigation */
@media (min-width: 768px) and (max-width: 1024px) {
    .top-header {
        height: 45px;
        padding: 8px 20px;
    }
    
    .main-nav {
        top: 45px;
        height: 60px;
        padding: 0 20px;
    }
    
    body {
        padding-top: 105px !important; /* 45px + 60px */
    }
    
    /* Tablet menu */
    .menu-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex !important;
        position: static;
        background: transparent;
        max-height: none;
    }
    
    .nav-item {
        width: auto;
        padding: 0 15px;
        border-bottom: none;
    }
    
    /* Show search on tablet */
    .header-search {
        display: block;
        max-width: 200px;
    }
    
    .user-name {
        display: block;
    }
}

/* Desktop Navigation */
@media (min-width: 1025px) {
    .top-header {
        height: 40px;
        padding: 8px 30px;
    }
    
    .main-nav {
        top: 40px;
        height: 70px;
        padding: 0 30px;
    }
    
    body {
        padding-top: 110px !important; /* 40px + 70px */
    }
    
    /* Desktop menu enhancements */
    .nav-menu {
        display: flex !important;
    }
    
    .nav-item {
        padding: 0 20px;
        min-height: 70px;
        display: flex;
        align-items: center;
        border-bottom: 3px solid transparent;
    }
    
    .nav-item.active {
        border-bottom: 3px solid var(--primary);
        background: transparent;
    }
    
    .nav-item:hover {
        border-bottom: 3px solid var(--primary-light);
        background: rgba(37, 111, 138, 0.05);
    }
    
    /* Enhanced search */
    .header-search {
        max-width: 300px;
    }
    
    /* User profile enhancements */
    .user-menu {
        gap: 15px;
    }
    
    .user-name {
        font-size: 16px;
    }
}

/* ============================================
   FIX 6: SIDEBAR ADAPTATIONS
   ============================================ */

/* Mobile Sidebar */
@media (max-width: 767px) {
    .sidebar {
        width: 85%;
        max-width: 300px;
    }
    
    /* Full screen overlay */
    .backdrop {
        background: rgba(0,0,0,0.7);
        backdrop-filter: blur(5px);
    }
    
    /* Adjust sidebar content for mobile */
    .sidebar-user-info {
        padding: 20px 15px;
    }
    
    .sidebar-avatar {
        width: 70px;
        height: 70px;
    }
    
    .nav-link {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Tablet Sidebar */
@media (min-width: 768px) and (max-width: 1024px) {
    .sidebar {
        width: 300px;
    }
    
    /* Tablet sidebar positioning */
    .sidebar.active {
        left: 0;
        box-shadow: 5px 0 25px rgba(0,0,0,0.2);
    }
}

/* Desktop Sidebar */
@media (min-width: 1025px) {
    .sidebar {
        width: 320px;
    }
    
    /* Desktop sidebar enhancements */
    .sidebar:hover {
        box-shadow: 5px 0 30px rgba(0,0,0,0.15);
    }
    
    .nav-link {
        padding: 15px 25px;
        font-size: 16px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        padding-left: 30px;
        background: rgba(37, 111, 138, 0.1);
    }
}

/* ============================================
   FIX 7: FOOTER ADAPTATIONS
   ============================================ */

/* Mobile Footer */
@media (max-width: 767px) {
    .footer {
        padding: 20px 15px;
        font-size: 12px;
        text-align: center;
    }
    
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin: 15px 0;
    }
    
    .footer a {
        margin: 0 5px;
        font-size: 12px;
    }
}

/* Tablet Footer */
@media (min-width: 768px) and (max-width: 1024px) {
    .footer {
        padding: 25px 20px;
        font-size: 13px;
    }
    
    .footer-links {
        gap: 20px;
    }
    
    .footer a {
        margin: 0 8px;
        font-size: 13px;
    }
}

/* Desktop Footer */
@media (min-width: 1025px) {
    .footer {
        padding: 30px 25px;
        font-size: 14px;
    }
    
    .footer-content {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        gap: 40px;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .footer-links {
        gap: 25px;
    }
    
    .footer a {
        margin: 0 10px;
        font-size: 14px;
        transition: color 0.3s ease;
    }
    
    .footer a:hover {
        color: var(--primary);
    }
}

/* ==============================================
   REWARD SYSTEM STYLES
   ============================================== */

/* === REWARD SYSTEM CONTAINER === */
.reward-system-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* === ADMIN REWARD MANAGEMENT === */
.reward-management-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.reward-form-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

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

.reward-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reward-form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.reward-form-group input,
.reward-form-group select {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.reward-form-group input:focus,
.reward-form-group select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.reward-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* === REWARD CARDS === */
.reward-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.reward-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.reward-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f8ff;
}

.reward-code {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
}

.reward-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.status-expired {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.status-claimed {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.reward-card-body {
    margin-bottom: 20px;
}

.reward-amount {
    font-size: 32px;
    font-weight: 800;
    color: #2c3e50;
    margin: 10px 0;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reward-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #5d6d7e;
}

.reward-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reward-detail-item i {
    width: 20px;
    color: #3498db;
}

.reward-progress {
    margin: 15px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12px;
    color: #7f8c8d;
}

.progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.reward-card-actions {
    display: flex;
    gap: 10px;
}

.reward-card-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-copy-reward {
    background: #3498db;
    color: white;
}

.btn-copy-reward:hover {
    background: #2980b9;
}

.btn-delete-reward {
    background: #e74c3c;
    color: white;
}

.btn-delete-reward:hover {
    background: #c0392b;
}

/* === USER REWARD CLAIM SECTION === */
.reward-claim-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.reward-claim-form {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.reward-claim-input {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.reward-claim-input input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.reward-claim-input input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.reward-claim-input i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

.claim-actions {
    display: flex;
    gap: 15px;
}

.claim-result {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
    display: none;
}

.claim-success {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid #27ae60;
    color: #27ae60;
}

.claim-error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

/* === REWARD HISTORY SECTIONS === */
.history-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.history-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.history-filters select,
.history-filters input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.history-table-container {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.history-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
}

.history-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.history-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* === STATS CARDS === */
.reward-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: inline-block;
}

.stat-amount {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 14px;
}

.stat-total-rewards {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.stat-active-codes {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.stat-total-claims {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.stat-user-claims {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: white;
}

/* === MODALS === */
.reward-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.reward-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.reward-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f8ff;
}

.reward-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.close-reward-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
}

.reward-modal-body {
    margin-bottom: 25px;
}

.reward-details-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reward-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.reward-detail-label {
    color: #5d6d7e;
    font-weight: 600;
}

.reward-detail-value {
    color: #2c3e50;
    font-weight: 700;
}

.reward-modal-footer {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #f1f8ff;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .reward-system-container {
        padding: 15px;
    }
    
    .reward-management-section,
    .reward-claim-section,
    .history-section {
        padding: 20px;
    }
    
    .reward-form-grid {
        grid-template-columns: 1fr;
    }
    
    .reward-cards-container {
        grid-template-columns: 1fr;
    }
    
    .reward-claim-form {
        flex-direction: column;
    }
    
    .reward-claim-input {
        min-width: 100%;
    }
    
    .claim-actions {
        width: 100%;
    }
    
    .claim-actions button {
        flex: 1;
    }
    
    .history-filters {
        flex-direction: column;
    }
    
    .reward-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .reward-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .reward-card-actions {
        flex-direction: column;
    }
    
    .reward-action-buttons {
        flex-direction: column;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reward-card {
    animation: fadeIn 0.5s ease-out;
}

/* === LOADING STATES === */
.loading-reward {
    position: relative;
    overflow: hidden;
}

.loading-reward::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* === NOTIFICATIONS === */
.reward-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.reward-notification.success {
    background: #27ae60;
}

.reward-notification.error {
    background: #e74c3c;
}

.reward-notification.info {
    background: #3498db;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.minimalist .input-wrapper {
    border: 2px solid #e0e0e0;
    border-radius: clamp(20px, 5vw, 25px); /* Adaptive radius */
    padding: clamp(6px, 1.5vw, 8px) clamp(10px, 3vw, 15px); /* Adaptive padding */
    background: white;
    display: flex;
    align-items: flex-end;
    transition: border-color 0.3s;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.minimalist .input-wrapper:focus-within {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.minimalist .chat-input {
    border: none;
    resize: none;
    padding: clamp(6px, 1.5vw, 8px) 0;
    flex-grow: 1;
    min-height: 40px;
    max-height: min(120px, 30vh); /* Responsive max height */
    font-size: clamp(14px, 4vw, 16px); /* Responsive font size */
    font-family: inherit;
    line-height: 1.4;
    overflow-y: auto;
}

.minimalist .chat-input:focus {
    outline: none;
}

.minimalist .chat-input::placeholder {
    font-size: clamp(14px, 3.5vw, 16px);
    color: #999;
}

.minimalist .input-actions {
    display: flex;
    gap: clamp(4px, 1.5vw, 8px); /* Responsive gap */
    align-items: center;
    flex-shrink: 0;
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
    .minimalist .input-wrapper {
        border-radius: 20px;
        padding: 6px 12px;
    }
    
    .minimalist .input-actions {
        gap: 4px;
    }
    
    .minimalist .chat-input {
        font-size: 15px;
        max-height: 100px;
    }
}

/* Tablet adjustments */
@media (min-width: 481px) and (max-width: 768px) {
    .minimalist .input-wrapper {
        border-radius: 22px;
        padding: 7px 14px;
    }
    
    .minimalist .chat-input {
        font-size: 15.5px;
        max-height: 110px;
    }
}

/* Desktop/laptop adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .minimalist .input-wrapper {
        padding: 8px 16px;
    }
    
    .minimalist .chat-input {
        font-size: 15.8px;
    }
}

/* Large desktop adjustments */
@media (min-width: 1025px) {
    .minimalist .input-wrapper {
        max-width: 900px; /* Limit width on large screens */
        margin: 0 auto; /* Center on large screens */
    }
    
    .minimalist .chat-input {
        font-size: 16px;
        max-height: 150px; /* Allow more height on desktop */
    }
}

/* Landscape mode adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .minimalist .input-wrapper {
        border-radius: 18px;
        padding: 4px 12px;
    }
    
    .minimalist .chat-input {
        min-height: 32px;
        max-height: 80px;
        font-size: 14px;
    }
    
    .minimalist .icon-btn,
    .minimalist .chat-send {
        width: 36px;
        height: 36px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .minimalist .input-wrapper {
        border-width: 1.5px; /* Thinner border on retina */
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .minimalist .input-wrapper {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .minimalist .chat-input {
        background: #2d2d2d;
        color: #fff;
    }
    
    .minimalist .icon-btn {
        color: #aaa;
    }
    
    .minimalist .icon-btn:hover {
        background: #404040;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .minimalist .icon-btn,
    .minimalist .chat-send {
        min-width: 44px; /* Larger touch target */
        min-height: 44px;
        padding: 10px;
    }
    
    .minimalist .chat-input {
        font-size: 16px; /* Prevent iOS zoom on focus */
    }
    
    .minimalist .input-wrapper:focus-within {
        border-width: 3px; /* More visible on touch */
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .minimalist .input-wrapper,
    .minimalist .icon-btn,
    .minimalist .chat-send {
        transition: none;
    }
}

/* Button styles with responsive sizing */
.minimalist .icon-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: clamp(6px, 1.5vw, 8px);
    border-radius: 50%;
    transition: background 0.2s, transform 0.1s;
    font-size: clamp(14px, 4vw, 16px);
    width: clamp(36px, 9vw, 40px);
    height: clamp(36px, 9vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimalist .icon-btn:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.minimalist .icon-btn:active {
    transform: scale(0.95);
}

.minimalist .chat-send {
    background: #4285f4;
    color: white;
    border: none;
    width: clamp(38px, 10vw, 44px);
    height: clamp(38px, 10vw, 44px);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 4vw, 16px);
    flex-shrink: 0;
}

.minimalist .chat-send:hover {
    background: #3367d6;
    transform: scale(1.05);
}

.minimalist .chat-send:active {
    transform: scale(0.95);
}

.minimalist .chat-send:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* Input hint with responsive text */
.minimalist .input-hint {
    font-size: clamp(10px, 3vw, 12px); /* Responsive font */
    color: #999;
    text-align: center;
    margin-top: clamp(3px, 1vw, 5px);
    padding: 0 10px;
    line-height: 1.3;
}

/* For very small screens (smartwatches, very old phones) */
@media (max-width: 320px) {
    .minimalist .input-wrapper {
        border-radius: 18px;
        padding: 5px 10px;
    }
    
    .minimalist .chat-input {
        font-size: 14px;
        min-height: 35px;
    }
    
    .minimalist .icon-btn,
    .minimalist .chat-send {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    
    .minimalist .input-hint {
        font-size: 10px;
    }
}

/* Foldable devices */
@media (max-width: 280px) {
    .minimalist .input-wrapper {
        border-radius: 15px;
        padding: 4px 8px;
    }
    
    .minimalist .chat-input {
        font-size: 13px;
    }
    
    .minimalist .icon-btn,
    .minimalist .chat-send {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
}

/* Accessibility: High contrast mode */
@media (prefers-contrast: high) {
    .minimalist .input-wrapper {
        border-color: #000;
        border-width: 3px;
    }
    
    .minimalist .input-wrapper:focus-within {
        border-color: #0057b8;
    }
    
    .minimalist .chat-send {
        background: #0057b8;
        border: 2px solid #000;
    }
}

































/* User Chat Modal Styles */
#user-chat-modal .modal-content {
    max-width: 800px;
    height: 90vh;
    width: 95%;
    margin: 5vh auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: clamp(12px, 2vw, 20px);
    overflow: hidden;
}

@media (max-width: 768px) {
    #user-chat-modal .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-width: none;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    #user-chat-modal .modal-content {
        height: 100vh;
        margin: 0;
    }
}

/* Admin Chat Container */
.admin-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    position: relative;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #113745 0%, #1a4d5e 100%);
    color: white;
    padding: clamp(15px, 3vw, 20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    font-size: clamp(16px, 4vw, 20px);
    font-weight: 600;
}

.chat-title i {
    font-size: clamp(18px, 4vw, 22px);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(12px, 3vw, 14px);
    opacity: 0.9;
    margin-left: auto;
    padding-left: 15px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background: #4CAF50;
    box-shadow: 0 0 8px #4CAF50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Chat Messages Area */
.admin-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: clamp(15px, 3vw, 20px);
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

/* Custom scrollbar for chat */
.admin-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.admin-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.admin-chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.admin-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Message Bubbles */
.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    animation: messageAppear 0.3s ease-out;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.support-message {
    background: white;
    border: 1px solid #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.user-message {
    background: linear-gradient(135deg, #4285f4 0%, #3367d6 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.message-time {
    font-size: clamp(10px, 2.5vw, 12px);
    color: #718096;
    margin-top: 4px;
    text-align: right;
}

.message.user-message .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive message width */
@media (max-width: 768px) {
    .message {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .message {
        max-width: 90%;
    }
}

/* Quick Options */
.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: clamp(10px, 3vw, 15px);
    background: white;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.quick-option {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: clamp(12px, 3vw, 14px);
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: calc(50% - 10px);
    text-align: center;
}

.quick-option:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.quick-option:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .quick-option {
        min-width: 100%;
    }
}

@media (min-width: 769px) {
    .quick-option {
        min-width: calc(25% - 10px);
        max-width: calc(25% - 10px);
    }
}

/* Chat Footer */
.chat-footer {
    padding: clamp(10px, 3vw, 15px);
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    align-self: flex-start;
    margin: 5px 0;
    border-bottom-left-radius: 4px;
}

.typing-indicator.active {
    display: flex;
    align-items: center;
    gap: 8px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingAnimation 1.5s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingAnimation {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Empty State */
.empty-chat-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    text-align: center;
    padding: 20px;
}

.empty-chat-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-chat-state h3 {
    margin-bottom: 10px;
    color: #475569;
    font-size: 18px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .admin-chat-container {
        background: #1a1a1a;
    }
    
    .admin-chat-messages {
        background: #2d2d2d;
    }
    
    .message.support-message {
        background: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .chat-header {
        background: linear-gradient(135deg, #0d2b35 0%, #143945 100%);
    }
    
    .quick-option {
        background: #2d2d2d;
        border-color: #404040;
        color: #b0b0b0;
    }
    
    .quick-option:hover {
        background: #404040;
    }
    
    .chat-footer {
        background: #1a1a1a;
        border-top-color: #404040;
    }
    
    .message-time {
        color: #a0a0a0;
    }
    
    .admin-chat-messages::-webkit-scrollbar-track {
        background: #2d2d2d;
    }
    
    .admin-chat-messages::-webkit-scrollbar-thumb {
        background: #555;
    }
}

/* Loading Animation */
.loading-messages {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Attachment Preview */
.attachment-preview {
    display: none;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 8px;
    margin: 10px 0;
    align-items: center;
    gap: 10px;
}

.attachment-preview.show {
    display: flex;
}

.attachment-preview .file-icon {
    color: #4285f4;
    font-size: 20px;
}

.attachment-preview .file-info {
    flex: 1;
    font-size: 14px;
}

.attachment-preview .remove-attachment {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    font-size: 16px;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    .chat-title span {
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .chat-status {
        display: none;
    }
    
    .quick-option {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .quick-option {
        padding: 12px 16px;
        margin: 5px 0;
    }
    
    .message {
        min-width: 120px;
    }
    
    #user-chat-modal .close-modal {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .message,
    .quick-option,
    #user-chat-modal .close-modal,
    .status-indicator.online,
    .notification-badge {
        animation: none;
        transition: none;
    }
    
    .typing-indicator .typing-dot {
        animation: none;
    }
}

/* ============================================
   FIX 9: UTILITY CLASSES FOR RESPONSIVE DESIGN
   ============================================ */

/* Hide/Show based on device */
.hide-on-mobile {
    display: none !important;
}

.show-on-mobile {
    display: block !important;
}

.hide-on-tablet {
    display: block !important;
}

.show-on-tablet {
    display: none !important;
}

.hide-on-desktop {
    display: block !important;
}

.show-on-desktop {
    display: none !important;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .hide-on-tablet {
        display: none !important;
    }
    
    .show-on-tablet {
        display: block !important;
    }
    
    .hide-on-mobile {
        display: block !important;
    }
    
    .show-on-mobile {
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .hide-on-desktop {
        display: none !important;
    }
    
    .show-on-desktop {
        display: block !important;
    }
    
    .hide-on-mobile {
        display: block !important;
    }
    
    .show-on-mobile {
        display: none !important;
    }
}

/* Responsive spacing */
.responsive-padding {
    padding: 15px;
}

.responsive-margin {
    margin: 15px;
}

@media (min-width: 768px) {
    .responsive-padding {
        padding: 25px;
    }
    
    .responsive-margin {
        margin: 25px;
    }
}

@media (min-width: 1025px) {
    .responsive-padding {
        padding: 35px;
    }
    
    .responsive-margin {
        margin: 35px;
    }
}

/* Responsive text sizes */
.responsive-text-sm {
    font-size: 12px;
}

.responsive-text-md {
    font-size: 14px;
}

.responsive-text-lg {
    font-size: 16px;
}

@media (min-width: 768px) {
    .responsive-text-sm {
        font-size: 14px;
    }
    
    .responsive-text-md {
        font-size: 16px;
    }
    
    .responsive-text-lg {
        font-size: 18px;
    }
}

@media (min-width: 1025px) {
    .responsive-text-sm {
        font-size: 16px;
    }
    
    .responsive-text-md {
        font-size: 18px;
    }
    
    .responsive-text-lg {
        font-size: 20px;
    }
}

/* ============================================
   FIX 10: CRITICAL BUG FIXES
   ============================================ */

/* Fix for hero content being hidden */
.landing-section.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Fix for section visibility */
.content-section.active {
    display: block !important;
    animation: fadeIn 0.5s ease !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fix for overflowing content */
body, .container, .dashboard-content {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Fix for mobile viewport */
@media (max-width: 767px) {
    html, body {
        width: 100% !important;
        position: relative !important;
        overflow-x: hidden !important;
    }
    
    .container {
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Fix for images not scaling */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix for table responsiveness */
.table-responsive {
    display: block;
    width: 100%;
}

/* Fix for sidebar overlay */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* Fix for bottom navigation */
.bottombar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--primary-dark);
}

/* Ensure content doesn't hide behind fixed elements */
body {
    padding-bottom: 70px !important; /* Space for bottom bar */
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0 !important;
    }
    
    .bottombar {
        display: none !important;
    }
}

/* ============================================
   DEBUG HELPER CLASSES (Remove in production)
   ============================================ */

.debug-outline * {
    outline: 1px solid red;
}

.debug-grid {
    background-image: linear-gradient(rgba(255,0,0,0.1) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,0,0,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Device indicator (for debugging) */
.device-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 9999;
    display: none;
}

.debug .device-indicator {
    display: block;
}

@media (max-width: 320px) {
    .debug .device-indicator:after {
        content: "Mobile (XS) < 320px";
    }
}

@media (min-width: 321px) and (max-width: 375px) {
    .debug .device-indicator:after {
        content: "Mobile (S) 321-375px";
    }
}

@media (min-width: 376px) and (max-width: 480px) {
    .debug .device-indicator:after {
        content: "Mobile (M) 376-480px";
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .debug .device-indicator:after {
        content: "Tablet (Portrait) 481-768px";
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .debug .device-indicator:after {
        content: "Tablet (Landscape) 769-1024px";
    }
}

@media (min-width: 1025px) and (max-width: 1366px) {
    .debug .device-indicator:after {
        content: "Desktop (S) 1025-1366px";
    }
}

@media (min-width: 1367px) {
    .debug .device-indicator:after {
        content: "Desktop (L) > 1367px";
    }
}

/* ============================================
   ENHANCED DEVICE-SPECIFIC RESPONSIVE DESIGN
   ============================================ */

/* Device Detection Helper Classes */
@media (max-width: 767px) {
    html:before { content: 'mobile'; display: none; }
    body:before { content: 'touch-device'; display: none; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    html:before { content: 'tablet'; display: none; }
}

@media (min-width: 1024px) {
    html:before { content: 'desktop'; display: none; }
    body:before { content: 'mouse-device'; display: none; }
}

/* ============================================
   ULTRA-SMALL MOBILE DEVICES (up to 320px)
   ============================================ */
@media (max-width: 320px) {
    body {
        padding: 5px !important;
        font-size: 12px !important;
        zoom: 0.9;
    }
    
    .container {
        padding: 5px !important;
        max-width: 100% !important;
    }
    
    .login-box {
        border-radius: 6px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    }
    
    /* Reduce all padding */
    .btn, .tab, .nav-item, .hero-btn {
        padding: 10px 8px !important;
        font-size: 13px !important;
        min-height: 40px !important;
    }
    
    /* Single column layouts */
    .mobile-grid,

    .features-grid,
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    
    /* Font size reductions */
    h1 { font-size: 18px !important; }
    h2 { font-size: 16px !important; }
    h3 { font-size: 14px !important; }
    h4 { font-size: 13px !important; }
    
    /* Table optimizations */
    .transaction-table,
    .users-table,
    .referrals-table {
        font-size: 10px !important;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 6px 4px !important;
    }
    

    
    /* Hide less important elements */
    .social-links,
    .user-name,
    .stat-label {
        display: none !important;
    }
    
    /* Optimize buttons */
    .cta-buttons {
        gap: 8px !important;
    }
    
    .btn-landing {
        padding: 12px !important;
        font-size: 14px !important;
    }
    
    /* Icon size reduction */
    i, .nav-icon, .bottom-icon {
        font-size: 14px !important;
    }
    
    /* Profile adjustments */
    .profile-avatar-large {
        width: 60px !important;
        height: 60px !important;
    }
    
    .profile-info h2 {
        font-size: 16px !important;
    }
}

/* ============================================
   SMALL MOBILE DEVICES (321px to 375px)
   ============================================ */
@media (min-width: 321px) and (max-width: 375px) {
    body {
        font-size: 13px !important;
        padding: 8px !important;
    }
    
    .container {
        padding: 8px !important;
    }
    
    .login-box {
        max-width: 100% !important;
        margin: 0 5px !important;
    }
    
    /* Button optimizations */
    .btn {
        padding: 14px 10px !important;
        font-size: 15px !important;
    }
    
    /* Grid optimizations */
    .quick-amounts {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    
    .stats-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    /* Header optimizations */
    .header h2 {
        font-size: 18px !important;
    }
    
    .header-container {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    /* Sidebar adjustments */
    .sidebar {
        width: 85% !important;
    }
    
    /* Table improvements */
    .transaction-table {
        font-size: 11px !important;
    }
    
    /* Hide secondary info on very small screens */
    .contact-info span:not(:first-child),
    .social-links a:not(:first-child) {
        display: none !important;
    }
}

/* ============================================
   STANDARD MOBILE DEVICES (376px to 480px)
   ============================================ */
@media (min-width: 376px) and (max-width: 480px) {
    body {
        font-size: 14px !important;
    }
    
    .container {
        max-width: 95% !important;
        padding: 10px !important;
    }
    
    /* Improved button sizes */
    .btn, .hero-btn {
        padding: 15px 20px !important;
        font-size: 16px !important;
        min-height: 48px !important;
    }
    
    /* Better grid layouts */
    .quick-amounts {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Enhanced typography */
    h1 { font-size: 22px !important; }
    h2 { font-size: 19px !important; }
    h3 { font-size: 16px !important; }
    
    /* Improved table readability */
    .transaction-table,
    .users-table {
        font-size: 12px !important;
    }
    
    /* Sidebar improvements */
    .sidebar {
        width: 280px !important;
    }
    
    /* Navigation improvements */
    .nav-item {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }
    
    /* Profile display improvements */
    .profile-avatar-large {
        width: 80px !important;
        height: 80px !important;
    }
}

/* ============================================
   TABLET PORTRAIT (481px to 768px)
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
    body {
        font-size: var(--tablet-font-size) !important;
        padding: 15px !important;
    }
    
    .container {
        max-width: 90% !important;
        padding: 15px !important;
    }
    
    /* Tablet-optimized grids */
    .mobile-grid,

    .features-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    /* Enhanced typography for tablet */
    h1 { font-size: 26px !important; }
    h2 { font-size: 22px !important; }
    h3 { font-size: 19px !important; }
    h4 { font-size: 17px !important; }
    
    /* Improved button sizing */
    .btn {
        padding: 16px 24px !important;
        font-size: 17px !important;
    }
    
    /* Tablet-optimized tables */
    .transaction-table,
    .users-table {
        font-size: 13px !important;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 10px 8px !important;
    }

    /* Sidebar tablet adjustments */
    .sidebar {
        width: 300px !important;
    }
    
    /* Navigation tablet improvements */
    .nav-menu {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        background: none !important;
        box-shadow: none !important;
    }
    
    .nav-item {
        padding: 15px 20px !important;
        border-bottom: 3px solid transparent !important;
    }
    
    .nav-item.active {
        border-bottom: 3px solid var(--primary) !important;
        border-left: none !important;
    }
    
    /* Hide mobile menu toggle on tablet */
    .menu-toggle {
        display: none !important;
    }
    
    /* Enhanced form elements */
    .form-control input,
    .form-control select {
        padding: 14px !important;
        font-size: 16px !important;
    }
    
    /* Better card layouts */
    .card,

    .mineral-card {
        padding: 20px !important;
        border-radius: 10px !important;
    }
}

/* ============================================
   TABLET LANDSCAPE (769px to 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        font-size: var(--tablet-font-size) !important;
        padding: 20px !important;
    }
    
    .container {
        max-width: 95% !important;
        padding: 20px !important;
    }
    
    /* Landscape tablet grid optimizations */

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* Enhanced typography for landscape */
    h1 { font-size: 28px !important; }
    h2 { font-size: 24px !important; }
    h3 { font-size: 20px !important; }
    
    /* Improved button design for tablet */
    .btn, .hero-btn {
        padding: 18px 28px !important;
        font-size: 18px !important;
        min-height: 52px !important;
    }
    
    /* Enhanced table readability */
    .transaction-table,
    .users-table,
    .referrals-table {
        font-size: 14px !important;
    }
    
    /* Sidebar landscape optimizations */
    .sidebar {
        width: 320px !important;
    }
    
    /* Navigation improvements */
    .nav-container {
        max-width: 95% !important;
    }
    
    .nav-item {
        padding: 18px 25px !important;
        font-size: 16px !important;
    }
    
    /* Enhanced dashboard layout */
    .dashboard-content {
        padding: 25px !important;
    }
    
    .content-section {
        padding: 25px !important;
    }
    
    /* Improved form elements */
    .form-control input,
    .form-control select,
    .form-control textarea {
        padding: 16px !important;
        font-size: 17px !important;
    }
    
    /* Better card designs */
    .card {
        padding: 25px !important;
        margin-bottom: 20px !important;
    }
    
    /* Enhanced footer */
    .footer {
        padding: 20px !important;
        font-size: 14px !important;
    }
}

/* ============================================
   DESKTOP SMALL (1025px to 1366px)
   ============================================ */
@media (min-width: 1025px) and (max-width: 1366px) {
    body {
        font-size: var(--desktop-font-size) !important;
        padding: 25px !important;
    }
    
    .container {
        max-width: 1200px !important;
        padding: 25px !important;
    }
    
    /* Desktop-optimized grids */

    .features-grid,
    .mineral-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Enhanced desktop typography */
    h1 { font-size: 32px !important; }
    h2 { font-size: 28px !important; }
    h3 { font-size: 24px !important; }
    h4 { font-size: 20px !important; }
    
    /* Desktop button enhancements */
    .btn, .hero-btn {
        padding: 20px 32px !important;
        font-size: 18px !important;
        min-height: 56px !important;
    }
    
    .btn:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
    }
    
    /* Enhanced table design */
    .transaction-table,
    .users-table,
    .referrals-table {
        font-size: 15px !important;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 15px 12px !important;
    }
    
    /* Sidebar desktop adjustments */
    .sidebar {
        width: 350px !important;
    }
    
    /* Enhanced navigation */
    .nav-container {
        max-width: 1200px !important;
    }
    
    .nav-item {
        padding: 20px 30px !important;
        font-size: 17px !important;
    }
    
    /* Improved dashboard */
    .dashboard-content {
        padding: 30px !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
    }
    
    /* Enhanced form elements */
    .form-control input,
    .form-control select,
    .form-control textarea {
        padding: 18px !important;
        font-size: 18px !important;
        max-width: 100% !important;
    }
    
    /* Card hover effects */
    .card:hover,
    .mineral-card:hover {
        transform: translateY(-5px) !important;
        transition: transform 0.3s ease !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    }
    
    /* Enhanced animations */
    .btn,
    .nav-item,
    .card {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
}

/* ============================================
   DESKTOP LARGE (1367px and above)
   ============================================ */
@media (min-width: 1367px) {
    body {
        font-size: 17px !important;
        padding: 30px !important;
    }
    
    .container {
        max-width: 1400px !important;
        padding: 30px !important;
    }
    
    /* Large screen grid optimizations */

    .features-grid,
    .mineral-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 35px !important;
    }
    
    /* Enhanced typography for large screens */
    h1 { font-size: 36px !important; }
    h2 { font-size: 32px !important; }
    h3 { font-size: 28px !important; }
    h4 { font-size: 24px !important; }
    
    /* Large screen button enhancements */
    .btn, .hero-btn {
        padding: 22px 36px !important;
        font-size: 19px !important;
        min-height: 60px !important;
    }
    
    /* Enhanced table design */
    .transaction-table,
    .users-table,
    .referrals-table {
        font-size: 16px !important;
    }
    
    /* Wide sidebar */
    .sidebar {
        width: 400px !important;
    }
    
    /* Enhanced navigation for large screens */
    .nav-container {
        max-width: 1400px !important;
    }
    
    .nav-item {
        padding: 22px 35px !important;
        font-size: 18px !important;
    }
    
    /* Spacious dashboard */
    .dashboard-content {
        padding: 40px !important;
        max-width: 1400px !important;
    }
    
    /* Large form elements */
    .form-control input,
    .form-control select,
    .form-control textarea {
        padding: 20px !important;
        font-size: 19px !important;
    }
    
    /* Enhanced hover effects */
    .card:hover {
        transform: translateY(-8px) scale(1.02) !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.2) !important;
    }
    
    /* Smooth scrolling enhancement */
    html {
        scroll-behavior: smooth !important;
    }
    
    /* Enhanced gradient effects */
    .btn-primary,
    .hero-btn-primary {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    }
    
    /* Improved shadows */
    .login-box,

    .card {
        box-shadow: 0 15px 50px rgba(0,0,0,0.15) !important;
    }
}

/* ============================================
   DEVICE-SPECIFIC ORIENTATION ADJUSTMENTS
   ============================================ */

/* Tablet Landscape Specific */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .dashboard-content {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 25px !important;
    }
    
    .content-section {
        grid-column: span 1 !important;
    }
    
    .content-section.wide {
        grid-column: span 2 !important;
    }
    
    /* Optimize for landscape viewing */
    .header-container {
        flex-wrap: nowrap !important;
    }
    
    .search-container {
        max-width: 300px !important;
    }
}

/* Mobile Landscape Specific */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 10px !important;
    }
    
    .login-container {
        min-height: auto !important;
        padding: 10px !important;
    }
    
    .dashboard-content {
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
    
    /* Horizontal layout for landscape */
    .quick-amounts {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* Reduce vertical padding */
    .btn, .nav-item, .tab {
        padding: 10px 12px !important;
        min-height: 40px !important;
    }
    
    /* Adjust header for landscape */
    .top-header {
        height: 40px !important;
    }
    
    .main-nav {
        top: 40px !important;
        height: 45px !important;
    }
    
    /* Sidebar adjustments */
    .sidebar {
        width: 60% !important;
    }
}

/* ============================================
   DEVICE-SPECIFIC TOUCH OPTIMIZATIONS
   ============================================ */

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn, .tab, .nav-item, .quick-amount,
    .hero-btn, .bottom-item, .faq-category {
        min-height: 48px !important;
        min-width: 48px !important;
    }
    
    /* Remove hover effects for touch */
    .btn:hover, .nav-item:hover, .card:hover {
        transform: none !important;
    }
    
    /* Active state feedback */
    .btn:active, .nav-item:active, .quick-amount:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s !important;
    }
    
    /* Larger form inputs for touch */
    input, select, textarea {
        font-size: 16px !important;
        min-height: 48px !important;
    }
    
    /* Adjust spacing for touch */
    .cta-buttons {
        gap: 15px !important;
    }
    
    /* Touch-friendly carousel */
    .carousel-track {
        scroll-snap-type: x mandatory !important;
        overflow-x: auto !important;
    }
    
    .mineral-slide {
        scroll-snap-align: center !important;
        flex: 0 0 auto !important;
    }
    
    /* Hide hover-only content */
    .tooltip, [title]:hover:after {
        display: none !important;
    }
}

/* Mouse Device Optimizations */
@media (hover: hover) and (pointer: fine) {
    /* Enhanced hover effects */
    .btn:hover, .nav-item:hover, .card:hover {
        transition: all 0.3s ease !important;
    }
    
    /* Smooth transitions */

    .sidebar,
    .dropdown-menu {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    /* Tooltip displays */
    .tooltip {
        opacity: 0;
        transition: opacity 0.3s !important;
    }
    
    .tooltip:hover {
        opacity: 1 !important;
    }
}

.reward-status {
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px 0;
    display: none;
    font-weight: 500;
}

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

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

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.reward-info {
    flex: 1;
}

.reward-code {
    font-weight: 600;
    color: #2c3e50;
    font-family: monospace;
}

.reward-date {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 4px;
}

.reward-amount {
    font-weight: bold;
    color: #27ae60;
    font-size: 16px;
}

.reward-code-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.reward-code-item.expired {
    opacity: 0.7;
    border-color: #e74c3c;
}

.reward-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.reward-code-header .code {
    font-family: monospace;
    font-weight: bold;
    font-size: 18px;
    color: #3498db;
}

.reward-code-header .amount {
    font-weight: bold;
    color: #27ae60;
    font-size: 16px;
}

.reward-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
    color: #555;
    margin-bottom: 15px;
}

.reward-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-copy {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.btn-deactivate {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.no-rewards {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.no-rewards i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.no-rewards h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.error {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.redemption-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.redemption-info {
    flex: 1;
}

.redemption-info .status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.redemption-info .status.success {
    background: #27ae60;
    color: white;
}

.redemption-info .status.failed {
    background: #e74c3c;
    color: white;
}

.redemption-amount {
    font-weight: bold;
    color: #27ae60;
}

/* ============================================
   PRINT OPTIMIZATIONS
   ============================================ */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
        padding: 0 !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Hide non-essential elements */
    .top-header,
    .main-nav,
    .sidebar,
    .chat-button,
    .logout-btn,
    .footer,
    .btn,
    .hero-btn {
        display: none !important;
    }
    
    /* Optimize typography for print */
    h1, h2, h3, h4 {
        color: white !important;
        page-break-after: avoid !important;
    }
    
    /* Remove backgrounds and shadows */
    .card, .login-box {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    /* Table print optimizations */
    table {
        page-break-inside: avoid !important;
    }
    
    /* Link display for print */
    a {
        color: black !important;
        text-decoration: underline !important;
    }
    
    a:after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .btn:hover,
    .card:hover,
    .nav-item:hover {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    body {
        background: white !important;
        color: black !important;
    }
    
    .btn,
    .card {
        border: 2px solid black !important;
    }
    
    .btn-primary {
        background: black !important;
        color: white !important;
    }
    
    a {
        text-decoration: underline !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #3ba0c9;
        --primary-dark: #256f8a;
        --secondary: #2d3748;
        --light: #1a202c;
        --dark: #f7fafc;
        --gray: #a0aec0;
    }
    
    body {
        background: #121826 !important;
        color: #e2e8f0 !important;
    }
    
    .login-box,
    
    .card {
        background: #1e293b !important;
        color: #e2e8f0 !important;
        border-color: #334155 !important;
    }
    
    input,
    select,
    textarea {
        background: #2d3748 !important;
        color: #e2e8f0 !important;
        border-color: #4a5568 !important;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Will-change for smooth animations */
.btn,
.nav-item,

.sidebar {
    will-change: transform, opacity;
}

/* Hardware acceleration for smooth scrolling */
.dashboard-content,

.sidebar {
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
}

/* Optimize image rendering */
img,
.profile-avatar-large img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ============================================
   BROWSER-SPECIFIC FIXES
   ============================================ */

/* Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .login-container {
        min-height: -webkit-fill-available !important;
    }
    
    .dashboard-content {
        max-height: -webkit-fill-available !important;
    }
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--secondary);
}

/* Chrome/Edge scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   UTILITY CLASSES FOR DEVICE DETECTION
   ============================================ */

/* Device visibility classes */
.mobile-only {
    display: block !important;
}

.tablet-only,
.desktop-only {
    display: none !important;
}

@media (min-width: 481px) and (max-width: 768px) {
    .mobile-only {
        display: none !important;
    }
    
    .tablet-only {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .mobile-only,
    .tablet-only {
        display: none !important;
    }
    
    .desktop-only {
        display: block !important;
    }
}

/* Orientation classes */
.portrait-only {
    display: block !important;
}

.landscape-only {
    display: none !important;
}

@media (orientation: landscape) {
    .portrait-only {
        display: none !important;
    }
    
    .landscape-only {
        display: block !important;
    }
}

/* Touch device classes */
.touch-device .hover-effect {
    transform: none !important;
}

.mouse-device .hover-effect:hover {
    transform: translateY(-3px) !important;
}

/* Loading state for all devices */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}











/* ============================================
   ENHANCED BROWSER COMPATIBILITY & DEVICE ADAPTATION
   ============================================ */

/* 1. BROWSER-SPECIFIC FIXES & PREFIXES */

/* Chrome/Safari specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    /* Fix for Chrome gradient rendering */
    .hero-btn-primary,
    .btn,
    .logout-btn {
        -webkit-background-clip: padding-box;
        background-clip: padding-box;
    }
    
    /* Improve font rendering on Chrome */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Fix for Safari flexbox bugs */
    .dashboard-nav,
    .nav-container {
        -webkit-box-align: center;
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    /* Improve scrollbar appearance in Firefox */
    .admin-chat-messages,
    .chat-users-list {
        scrollbar-width: thin;
        scrollbar-color: #c1c1c1 #f1f1f1;
    }
    
    /* Fix for Firefox gradient rendering */
    .modal-content {
        background-image: linear-gradient(to bottom, #fefefe, #f8f9fa);
    }
}

/* Microsoft Edge specific fixes */
@supports (-ms-ime-align: auto) {
    .login-box {
        display: flex;
        flex-direction: column;
    }
    
    /* Fix for Edge flexbox issues */
    .dashboard-content {
        -ms-flex: 1 0 auto;
    }
}

/* Internet Explorer 10/11 specific fixes */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    /* IE 10+ specific styles */
    .login-container {
        display: table;
        width: 100%;
    }
    
    .login-box {
        display: table-cell;
        vertical-align: middle;
    }
    
    /* Fix for IE flexbox issues */
    
    
    /* Gradient fallback for IE */
    .btn {
        background: #256f8a; /* Fallback for IE */
    }
}

/* 2. DEVICE-SPECIFIC ENHANCEMENTS */

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Prevent text size adjustment on orientation change */
    body {
        -webkit-text-size-adjust: 100%;
    }
    
    /* Improve tap highlight color */
    .btn, .tab, .nav-item, .quick-amount {
        -webkit-tap-highlight-color: rgba(37, 111, 138, 0.3);
    }
    
    /* Fix for iOS input styling */
    input, select, textarea {
        -webkit-appearance: none;
        border-radius: 0;
    }
    
    /* Fix for sticky elements in iOS */
    .top-header, .main-nav {
        position: -webkit-sticky;
    }
}

/* 3. SCREEN DENSITY ADAPTATIONS */

/* High DPI/Retina displays */
@media 
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-resolution: 144dpi),
only screen and (min-resolution: 1.5dppx) {
    .login-box {
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    }
    
    /* Crisper borders */
    .form-control input,
    .search-input {
        border-width: 1.5px;
    }
    
    /* Sharper shadows */
    .modal-content {
        box-shadow: 0 8px 35px rgba(0, 0, 0, 0.2);
    }
}

/* Ultra-high DPI/4K displays */
@media 
only screen and (-webkit-min-device-pixel-ratio: 3),
only screen and (min-resolution: 288dpi),
only screen and (min-resolution: 3dppx) {
    /* Even sharper rendering */
    body {
        font-smooth: always;
    }
    
    .login-box {
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    }
}

/* 4. VIEWPORT HEIGHT ADAPTATIONS */

/* Devices with dynamic viewport (mobile browsers with address bar) */
@media (max-height: 700px) and (orientation: portrait) {
    .login-container {
        min-height: calc(100vh - 80px);
        padding-top: 40px;
        padding-bottom: 40px;
    }
    
    .modal-content {
        max-height: 85vh;
    }
}

/* Very short screens (landscape phones) */
@media (max-height: 500px) {
    .login-box {
        max-height: 95vh;
        overflow-y: auto;
    }
    

    
    .header h2 {
        font-size: 18px;
    }
}


/* 5. ASPECT RATIO ADAPTATIONS */

/* Square screens (some tablets, foldables) */
@media (min-aspect-ratio: 1/1) and (max-aspect-ratio: 1.2/1) {
    .container {
        max-width: 600px;
    }
    
    .login-box {
        max-width: 450px;
    }
}

/* Ultra-wide screens */
@media (min-aspect-ratio: 2/1) {
    body {
        background-attachment: fixed;
    }
    
    .container {
        max-width: 1400px;
    }
}

/* 6. INPUT MODE ADAPTATIONS */

/* Devices with physical keyboards */
@media (hover: hover) and (pointer: fine) {
    /* Show hover effects only for devices that support them */
    .btn:hover,
    .nav-item:hover,
    .quick-amount:hover {
        transform: translateY(-2px);
        transition: transform 0.2s ease;
    }
    
    /* Improve focus states for keyboard navigation */
    .btn:focus-visible,
    input:focus-visible,
    select:focus-visible {
        outline: 3px solid #256f8a;
        outline-offset: 2px;
    }
}

/* Touch-only devices */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .tab,
    .nav-item,
    .quick-amount {
        min-height: 48px;
    }
    
    input,
    select,
    textarea {
        min-height: 48px;
        font-size: 18px !important;
    }
    
    /* Remove hover effects that don't work on touch */
    .btn:hover,
    .nav-item:hover {
        transform: none;
    }
    
    /* Better active states for touch */
    .btn:active,
    .tab:active,
    .nav-item:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}

/* Devices with stylus input */
@media (pointer: fine) and (hover: none) {
    /* Smaller, more precise touch targets for stylus */
    .btn,
    .tab,
    .nav-item {
        min-height: 36px;
        padding: 8px 16px;
    }
}

/* 7. BATTERY SAVING MODES */

/* Reduce animations when prefers-reduced-motion is enabled */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Still show essential transitions */
    .modal,
    .modal-content,
    .faq-answer {
        transition-duration: 300ms !important;
    }
}

/* Low data mode (Safari) */
@media (prefers-reduced-data: reduce) {
    /* Prevent background images/videos */
    .animated-background {
        display: none;
    }
    
    /* Simplify gradients */
    .btn,
    .hero-btn-primary {
        background: #256f8a;
        background-image: none;
    }
    
    /* Reduce shadows */
    .login-box,
    .modal-content {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* 8. COLOR SCHEME & CONTRAST ADAPTATIONS */

/* Force dark mode regardless of preference (for specific sections) */
.dark-mode-section {
    color-scheme: dark;
    background: #1a1a1a;
    color: #ffffff;
}

.dark-mode-section .login-box {
    background: #2d2d2d;
    color: #ffffff;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .form-control input {
        border: 2px solid currentColor;
    }
    
    .tab.active::after {
        height: 4px;
    }
    
    /* Ensure text is readable */
    body {
        color: #000000;
        background: #ffffff;
    }
    
    .login-box {
        border: 2px solid #000000;
    }
}

/* Increased contrast for older users */
@media (prefers-contrast: more) {
    body {
        font-weight: 500;
    }
    
    .btn {
        font-weight: 600;
    }
    
    .form-control label {
        font-weight: 600;
    }
}

/* 9. FOLDABLE & DUAL-SCREEN DEVICES */

/* Foldable devices with seam */
@media (horizontal-viewport-segments: 2) {
    .container {
        max-width: calc(100vw - env(viewport-segment-width 0 0) - env(viewport-segment-width 1 0));
        margin-left: env(viewport-segment-left 1 0);
    }
}

/* Foldable devices in folded state */
@media (vertical-viewport-segments: 2) {
    .login-container {
        padding-top: env(viewport-segment-top 1 0);
        min-height: calc(env(viewport-segment-height 0 0) + env(viewport-segment-height 1 0));
    }
}

/* 10. PRINT ADAPTATIONS */

@media print {
    /* Hide non-essential elements */
    .top-header,
    .main-nav,
    .bottombar,
    .chat-button,
    .logout-btn,
    .menu-toggle {
        display: none !important;
    }
    
    /* Adjust body for printing */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Ensure content prints properly */

    .login-box,
    .modal-content {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        max-width: none !important;
        box-shadow: none !important;
        background: white !important;
        color: black !important;
    }
    
    /* Remove backgrounds and gradients */
    .btn,
    .hero-btn-primary {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
    }
    
    /* Improve table printing */
    .transaction-table,
    .referrals-table {
        page-break-inside: avoid;
    }
    
    /* Add URLs after links */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
    
    /* Page breaks */
    h1, h2, h3, h4 {
        page-break-after: avoid;
    }
    
    .content-section {
        page-break-inside: avoid;
    }
}

/* 11. PERFORMANCE OPTIMIZATIONS */

/* Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
    .spinner,
    .notification,
    .error-message {
        animation: none;
    }
    
    .modal-content,
    .sidebar {
        transition: none;
    }
}

/* Optimize for devices with slow GPUs */
@media (max-width: 768px) {
    .animated-background {
        will-change: transform;
        backface-visibility: hidden;
        transform: translateZ(0);
    }
}

/* 12. ACCESSIBILITY ENHANCEMENTS */

/* Focus visible for all browsers */
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid #256f8a;
    outline-offset: 2px;
}

/* Improve focus for Windows High Contrast Mode */
@media (forced-colors: active) {
    .btn:focus,
    input:focus,
    select:focus {
        outline: 3px solid currentColor;
        outline-offset: 2px;
    }
}

/* 13. BROWSER-SPECIFIC HACKS */

/* Safari 10.1+ */
@media not all and (min-resolution: .001dpcm) {
    @supports (-webkit-appearance:none) and (stroke-color:transparent) {
        /* Safari specific fixes */
        .login-box {
            -webkit-mask-image: -webkit-radial-gradient(white, black);
        }
    }
}

/* Chrome 29+ */
@media screen and (-webkit-min-device-pixel-ratio:0) and (min-resolution:.001dpcm) {
    .search-input::-webkit-search-decoration,
    .search-input::-webkit-search-cancel-button,
    .search-input::-webkit-search-results-button,
    .search-input::-webkit-search-results-decoration {
        display: none;
    }
}

/* 14. FORM ENHANCEMENTS FOR DIFFERENT DEVICES */

/* iOS form fixes */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    /* Disable iOS auto-zoom */
    font-size: 16px;
    
    /* Improve touch target */
    min-height: 44px;
    
    /* Remove iOS rounded corners */
    border-radius: 0;
    -webkit-appearance: none;
}

/* Android form fixes */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select,
    button,
    input[type="button"],
    input[type="submit"] {
        -webkit-appearance: none;
        border-radius: 0;
    }
}

/* Windows form fixes */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    input,
    select,
    textarea {
        padding: 10px;
    }
}

/* 15. SCROLLBAR CONSISTENCY */

/* Custom scrollbar for WebKit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* 16. SAFE AREA INSETS FOR MODERN DEVICES */

/* Support for devices with notches (iPhone X and later) */
@supports (padding: max(0px)) {
    body,
    .modal-content {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
        padding-top: max(15px, env(safe-area-inset-top));
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
    
    .top-header,
    .main-nav {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .chat-button {
        bottom: max(25px, env(safe-area-inset-bottom) + 10px);
        right: max(25px, env(safe-area-inset-right) + 10px);
    }
}

/* 17. LOADING STATE OPTIMIZATIONS */

/* Show loading states progressively */
.loading-skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

@keyframes skeleton-loading {
    0% { background-color: #f0f0f0; }
    50% { background-color: #e0e0e0; }
    100% { background-color: #f0f0f0; }
}

/* Optimize image loading */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* 18. ERROR STATE RESILIENCE */

/* Fallback for when CSS variables aren't supported */
:root {
    --primary-fallback: #256f8a;
    --secondary-fallback: #f8f9fa;
}

@supports not (--css: variables) {
    .btn {
        background: var(--primary-fallback);
    }
    
    body {
        background: var(--secondary-fallback);
    }
}

/* 19. ZOOM & SCALE ADAPTATIONS */

/* Prevent layout breakage on zoom */
@media (min-resolution: 120dpi) {
    .container {
        max-width: 95%;
    }
    
    .login-box {
        transform-origin: center center;
    }
}

/* Handle browser zoom levels */
@media (min-width: 1200px) {
    /* Large screen with zoom */
    .container {
        zoom: 1;
        -moz-transform: scale(1);
        -moz-transform-origin: 0 0;
    }
}

/* 20. FINAL POLYFILLS & FALLBACKS */

/* Flexbox fallback for very old browsers */
.no-flexbox {
    display: table;
    width: 100%;
}

.no-flexbox .nav-item {
    display: table-cell;
    vertical-align: middle;
}

/* Grid fallback */
.no-grid .mineral-grid {
    display: block;
}

.no-grid .mineral-card {
    float: left;
    width: 48%;
    margin: 1%;
}

/* CSS Variables fallback */
.no-css-vars {
    --primary: #256f8a;
    --secondary: #f8f9fa;
    /* Define all variables as static values */
}

/* 21. DEBUG & TESTING UTILITIES */

/* Highlight layout issues */
.debug * {
    outline: 1px solid rgba(255, 0, 0, 0.1);
}

.debug .container {
    outline: 2px solid rgba(0, 255, 0, 0.3);
}

/* Performance monitoring */
.perf-warning {
    animation: perf-warning-pulse 2s infinite;
}

@keyframes perf-warning-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(255, 165, 0, 0); }
}

/* 22. BROWSER UPGRADE NOTICES */

/* Hide from modern browsers */
.browser-upgrade {
    display: none;
}

/* Show for outdated browsers */
.old-browser .browser-upgrade {
    display: block;
    background: #ffc107;
    color: #856404;
    padding: 15px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
}

.dashboard-header {
    background: linear-gradient(135deg, #2c5f7c, #4a6491);
    color: white;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-nav {
    background: black;
    color: white;
    padding: 15px 30px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 60px;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}



        .modal-header {
            background: linear-gradient(135deg, #113745 0%, #1a4d5e 100%);
            color: white;
            padding: 25px 30px;
            position: relative;
        }

        .modal-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 5px;
        }

        .modal-subtitle {
            font-size: 0.9rem;
            opacity: 0.8;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-content {
            padding: 30px;
            max-height: 70vh;
            overflow-y: auto;
        }

        .terms-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
        }

        .terms-section {
            background: #f8fafc;
            border-radius: 12px;
            padding: 20px;
            border: 1px solid #e2e8f0;
            transition: transform 0.3s ease;
        }

        .terms-section:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
        }

        .section-number {
            display: inline-block;
            width: 32px;
            height: 32px;
            background: #113745;
            color: white;
            border-radius: 50%;
            text-align: center;
            line-height: 32px;
            margin-right: 10px;
            font-weight: bold;
        }

        .section-title {
            font-size: 1.2rem;
            color: #113745;
            margin-bottom: 15px;
            font-weight: 600;
        }

        .section-content {
            color: #4a5568;
            line-height: 1.6;
            font-size: 0.95rem;
        }

        .highlight-box {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border-left: 4px solid #0ea5e9;
            padding: 15px;
            margin: 15px 0;
            border-radius: 0 8px 8px 0;
        }

        .certified-badge {
            display: inline-block;
            background: #10b981;
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-top: 10px;
        }

        .contact-title {
            color: #113745;
            font-weight: 600;
            margin-bottom: 15px;
        }

        .contact-details {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 20px;
        }

        .contact-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #4a5568;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .contact-item:hover {
            color: #113745;
        }

        .last-updated {
            text-align: center;
            color: #718096;
            font-size: 0.9rem;
            margin-top: 20px;
            padding: 10px;
            background: #f7fafc;
            border-radius: 8px;
        }

        @media (max-width: 768px) {
            .modal {
                border-radius: 15px;
            }
            
            .modal-content {
                padding: 20px;
            }
            
            .terms-container {
                grid-template-columns: 1fr;
            }
            
            .contact-details {
                flex-direction: column;
                align-items: center;
            }
        }
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        /* rewards-styles.css */
/* ==============================================
   REWARDS SYSTEM STYLES - COMPREHENSIVE
   ============================================== */

/* === REWARDS CONTAINER === */
.rewards-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* === HEADER SECTION === */
.rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #3498db;
}

.rewards-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 15px;
}

.rewards-title i {
    font-size: 36px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rewards-stats {
    display: flex;
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 150px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 600;
}

/* === REWARDS TABS === */
.rewards-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.reward-tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #7f8c8d;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    background: none;
}

.reward-tab.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.reward-tab:hover:not(.active) {
    background: #f8f9fa;
    color: #3498db;
}

/* === TAB CONTENT === */
.reward-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.reward-tab-content.active {
    display: block;
}

/* === CLAIM REWARD SECTION === */
.claim-reward-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.claim-form {
    max-width: 500px;
    margin: 0 auto;
}

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

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

.form-control {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-control:focus {
    border-color: #3498db;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.claim-button {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.claim-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.3);
}

.claim-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* === REWARD HISTORY === */
.history-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.history-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 20px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 200px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.history-table th {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-weight: 700;
    font-size: 15px;
}

.history-table td {
    padding: 18px 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #2c3e50;
    font-size: 14px;
}

.history-table tr:hover {
    background: #f8fafc;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.status-pending {
    background: rgba(241, 196, 15, 0.1);
    color: #f39c12;
}

.status-expired {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* === ADMIN REWARDS MANAGEMENT === */
.admin-rewards-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.generate-reward-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
}

.generate-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    grid-column: 1 / -1;
}

.btn-generate {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-generate-auto {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.btn-generate-auto:hover {
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.3);
}

/* === REWARD CODES GRID === */
.reward-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.reward-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.reward-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.reward-card.expired::before {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.reward-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.reward-code {
    background: linear-gradient(135deg, #e8f4fc, #d4eaf7);
    color: #2980b9;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.reward-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-copy {
    background: #e8f4fc;
    color: #3498db;
}

.btn-copy:hover {
    background: #3498db;
    color: white;
}

.btn-delete {
    background: #fde8e8;
    color: #e74c3c;
}

.btn-delete:hover {
    background: #e74c3c;
    color: white;
}

.reward-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 600;
}

.detail-value {
    color: #2c3e50;
    font-weight: 700;
}

.detail-value.amount {
    color: #27ae60;
    font-size: 18px;
}

.detail-value.expiry {
    color: #f39c12;
}

.detail-value.claims {
    color: #9b59b6;
}

.reward-progress {
    margin-top: 20px;
}

.progress-bar {
    height: 8px;
    background: #e0e9f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 4px;
    transition: width 1s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7f8c8d;
}

/* === MODAL STYLES === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #e74c3c;
}

/* === NOTIFICATIONS === */
.reward-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 10001;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.reward-notification.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.reward-notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.reward-notification.info {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* === LOADING STATES === */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loadingShimmer 1.5s infinite;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes loadingShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .rewards-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .rewards-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-card {
        min-width: 120px;
    }
    
    .rewards-tabs {
        flex-direction: column;
    }
    
    .reward-codes-grid {
        grid-template-columns: 1fr;
    }
    
    .history-filters {
        flex-direction: column;
    }
    
    .filter-select {
        min-width: 100%;
    }
    
    .history-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .rewards-container {
        padding: 15px 10px;
    }
    
    .rewards-title {
        font-size: 24px;
    }
    
    .generate-reward-form {
        grid-template-columns: 1fr;
    }
    
    .generate-actions {
        flex-direction: column;
    }
    
    .btn-generate {
        width: 100%;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .rewards-container {
        background: linear-gradient(135deg, #2d3436 0%, #2c3e50 100%);
    }
    
    .claim-reward-section,
    .history-section,
    .admin-rewards-container,
    .reward-card,
    .modal-content {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .form-control {
        background: #34495e;
        border-color: #4a6572;
        color: #ecf0f1;
    }
    
    .form-control:focus {
        background: #34495e;
        border-color: #3498db;
    }
    
    .history-table th {
        background: linear-gradient(135deg, #2980b9, #3498db);
    }
    
    .history-table td {
        color: #bdc3c7;
        border-color: #4a6572;
    }
    
    .history-table tr:hover {
        background: #34495e;
    }
    
    .reward-card {
        background: #34495e;
    }
    
    .detail-label {
        color: #95a5a6;
    }
    
    .detail-value {
        color: #ecf0f1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    background: #113745;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    /* Remove float: right since we're using absolute positioning */
    /* float: right; */
}

.close-modal:hover {
    color: black;
    background: white;
    transform: rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .close-modal {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
        background: #113745;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .close-modal {
        top: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
}

/* Close Modal Button - Top Right Positioning */
#user-chat-modal .modal-content {
    position: relative; /* This is crucial for absolute positioning of child elements */
    /* Keep your existing styles */
}

#user-chat-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    background: #113745;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    /* Remove float: right since we're using absolute positioning */
    /* float: right; */
}

#user-chat-modal .close-modal:hover {
    color: black;
    background: white;
    transform: rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #user-chat-modal .close-modal {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
        background: #113745;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    #user-chat-modal .close-modal {
        top: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
}

/* Updated Chat Button - Positioned above bottom bar */
.chat-button {
    position: fixed;
    bottom: 80px; /* Increased from 25px to position above bottom bar */
    right: 25px;
    width: 70px; /* Slightly larger */
    height: 70px;
    background: linear-gradient(135deg, #4a6cf7, #6a11cb);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(106, 17, 203, 0.5);
    z-index: 1001; /* Higher than bottom bar's z-index (999) */
    transition: all 0.3s ease;
    animation: bounce 2s infinite, glow 3s infinite;
}

.chat-button:hover {
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(106, 17, 203, 0.9);
    animation: none;
}

.chat-button i {
    color: white;
    font-size: 28px; /* Slightly larger icon */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    animation: icon-float 3s ease-in-out infinite;
}

.chat-button:hover i {
    animation: none;
    transform: scale(1.15);
}

/* Animation keyframes */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 6px 25px rgba(106, 17, 203, 0.5); }
    50% { box-shadow: 0 6px 25px rgba(106, 17, 203, 0.8), 0 0 35px rgba(74, 108, 247, 0.7); }
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-button {
        bottom: 70px; /* Adjusted for mobile */
        right: 20px;
        width: 65px;
        height: 65px;
    }
    
    .chat-button i {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .chat-button {
        bottom: 65px; /* Further adjustment for small screens */
        right: 15px;
        width: 60px;
        height: 60px;
    }
    
    .chat-button i {
        font-size: 24px;
    }
}

/* Ensure bottom bar doesn't overlap */
.bottombar {
    z-index: 999; /* Keep this lower than chat-button's z-index */
    pointer-events: auto;
}

/* Make sure chat button is always on top */
.chat-button {
    pointer-events: auto;
}































/* Referral System Styles */
.referral-share-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e8f4fd;
}

.referral-code-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

@media (max-width: 768px) {
    .referral-code-card {
        grid-template-columns: 1fr;
    }
}

.referral-code-display,
.referral-link-display {
    background: linear-gradient(135deg, #f8fbfe, #f0f7ff);
    border: 2px solid #d1e9ff;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.referral-code-display:hover,
.referral-link-display:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.15);
    border-color: #3498db;
}

.code-label,
.link-label {
    color: #5d6d7e;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-label i,
.link-label i {
    color: #3498db;
}

.code-value {
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    letter-spacing: 2px;
    margin: 15px 0;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 2px dashed #3498db;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.link-value {
    font-size: 16px;
    color: #3498db;
    margin: 15px 0;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 2px dashed #2ecc71;
    word-break: break-all;
    max-height: 60px;
    overflow-y: auto;
}

.btn-copy-code,
.btn-copy-link {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-copy-link {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.btn-copy-code:hover {
    background: linear-gradient(135deg, #2980b9, #1c6ea4);
    transform: translateY(-2px);
}

.btn-copy-link:hover {
    background: linear-gradient(135deg, #27ae60, #219653);
    transform: translateY(-2px);
}

.share-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 25px 0;
}

@media (max-width: 768px) {
    .share-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.share-btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.share-btn.email {
    background: linear-gradient(135deg, #EA4335, #D14836);
    color: white;
}

.share-btn.sms {
    background: linear-gradient(135deg, #34B7F1, #0099CC);
    color: white;
}

.share-btn.more {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.referral-instructions {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    border: 2px solid #dee2e6;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .instructions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .instructions-grid {
        grid-template-columns: 1fr;
    }
}

.instruction-step {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.instruction-step:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.1);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto 15px;
    font-size: 18px;
}

.step-content h5 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.step-content p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}

/* Referrals Table */
.referrals-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 25px 0;
    border: 1px solid #e8f4fd;
}

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

.referrals-table thead {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.referrals-table th {
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.referrals-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s ease;
}

.referrals-table tbody tr:hover {
    background: #f8fbfe;
}

.referrals-table td {
    padding: 15px;
    color: #2c3e50;
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #d5edda;
    color: #155724;
}

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

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.bonus-status {
    font-weight: 600;
}

.bonus-status.paid {
    color: #27ae60;
}

.bonus-status.pending {
    color: #f39c12;
}

.bonus-status.failed {
    color: #e74c3c;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.action-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.action-btn.view {
    background: #e8f4fd;
    color: #3498db;
    border-color: #b3d7ff;
}

.action-btn.contact {
    background: #d5edda;
    color: #27ae60;
    border-color: #b3e0b3;
}

/* Bonus History */
.bonus-history-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    border: 1px solid #e8f4fd;
}

.bonus-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.bonus-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s ease;
}

.bonus-item:hover {
    background: #f8fbfe;
}

.bonus-info h5 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 15px;
}

.bonus-info p {
    color: #7f8c8d;
    font-size: 13px;
}

.bonus-amount {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
}

.no-history {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.no-history i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

/* Leaderboard */
.leaderboard-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    border: 1px solid #e8f4fd;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s ease;
}

.leaderboard-item:hover {
    background: #f8fbfe;
}

.leaderboard-rank {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #495057;
    margin-right: 15px;
}

.rank-1 .leaderboard-rank {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #856404;
}

.rank-2 .leaderboard-rank {
    background: linear-gradient(135deg, #C0C0C0, #B0B0B0);
    color: #495057;
}

.rank-3 .leaderboard-rank {
    background: linear-gradient(135deg, #CD7F32, #A67C52);
    color: #664d03;
}

.leaderboard-user {
    flex: 1;
}

.leaderboard-user h5 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 15px;
}

.leaderboard-user p {
    color: #7f8c8d;
    font-size: 13px;
}

.leaderboard-earnings {
    font-size: 16px;
    font-weight: 700;
    color: #27ae60;
}

/* Modal Styles */
.bonus-celebration {
    text-align: center;
    font-size: 60px;
    color: #f39c12;
    margin: 20px 0;
}

.bonus-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.bonus-amount,
.bonus-date {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bonus-amount .value {
    font-size: 24px;
    font-weight: 800;
    color: #27ae60;
}

.bonus-message {
    background: #e8f4fd;
    padding: 12px;
    border-radius: 8px;
    color: #3498db;
    font-size: 14px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-share-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.social-share-btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
}

.social-share-btn.facebook {
    background: linear-gradient(135deg, #1877F2, #0D5BB5);
}

.social-share-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2, #0C85D0);
}

.social-share-btn.telegram {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.social-share-btn.copy-link {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.qr-code-container {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .referrals-table {
        display: block;
        overflow-x: auto;
    }
    
    .referrals-table th,
    .referrals-table td {
        white-space: nowrap;
    }
    
    .social-share-grid {
        grid-template-columns: 1fr;
    }
}

/* Add to your style.css */
.back-to-landing-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 0;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    justify-content: center;
}

.back-to-landing-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.back-to-landing-link i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.back-to-landing-link:hover i {
    transform: translateX(-3px);
}

/* Or you can style them as simple text links */
.simple-back-link {
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
    margin-top: 15px;
    display: inline-block;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.simple-back-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ==============================================
   SLIDESHOW DOTS - ULTRA RESPONSIVE & ADAPTIVE
   ============================================== */

/* === BASE MOBILE-FIRST STYLES === */
.slideshow-dots {
    position: absolute;
    bottom: clamp(0.75rem, 3vw, 1rem);
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.25rem, 1vw, 0.375rem);
    padding: clamp(0.375rem, 1.5vw, 0.625rem);
    z-index: 10;
    pointer-events: none;
}

/* Enable pointer events only for dots */
.slideshow-dots * {
    pointer-events: auto;
}

/* Standard Dot */
.slideshow-dot {
    width: clamp(0.375rem, 1.5vw, 0.5rem);
    height: clamp(0.375rem, 1.5vw, 0.5rem);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.slideshow-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

/* Active Dot */
.slideshow-dot.active {
    background: gray;
    transform: scale(1.4);
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 8px rgba(255, 255, 255, 0.3);
}

.slideshow-dot.active::before {
    transform: scale(1);
}

/* Hover Effects */
@media (hover: hover) and (pointer: fine) {
    .slideshow-dot:hover {
        background: rgba(255, 255, 255, 0.5);
        transform: scale(1.2);
    }
    
    .slideshow-dot:hover::before {
        transform: scale(1);
    }
}

/* Touch Device Active State */
.slideshow-dot:active {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

/* Focus State for Accessibility */
.slideshow-dot:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* === SMALL DOTS VARIANT === */
.slideshow-dots.small-dots .slideshow-dot {
    width: clamp(0.25rem, 1vw, 0.375rem);
    height: clamp(0.25rem, 1vw, 0.375rem);
    background: rgba(255, 255, 255, 0.25);
    border: none;
}

.slideshow-dots.small-dots .slideshow-dot.active {
    transform: scale(1.6);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
}

@media (hover: hover) and (pointer: fine) {
    .slideshow-dots.small-dots .slideshow-dot:hover {
        transform: scale(1.4);
    }
}

/* === LARGE DOTS VARIANT (for touch devices) === */
.slideshow-dots.large-dots .slideshow-dot {
    width: clamp(0.625rem, 2.5vw, 0.875rem);
    height: clamp(0.625rem, 2.5vw, 0.875rem);
    background: rgba(255, 255, 255, 0.4);
}

.slideshow-dots.large-dots .slideshow-dot.active {
    transform: scale(1.3);
    background: rgba(255, 255, 255, 0.95);
}

/* === RESPONSIVE BREAKPOINTS === */

/* Level 1: Ultra Small Mobile (≤320px) */
@media (max-width: 320px) {
    .slideshow-dots {
        bottom: 0.5rem;
        gap: 0.25rem;
        padding: 0.25rem;
    }
    
    .slideshow-dot {
        width: 0.25rem;
        height: 0.25rem;
    }
    
    .slideshow-dot.active {
        transform: scale(1.6);
    }
}

/* Level 2: Small Mobile (321px - 375px) */
@media (min-width: 321px) and (max-width: 375px) {
    .slideshow-dots {
        bottom: 0.625rem;
    }
    
    .slideshow-dot {
        width: 0.35rem;
        height: 0.35rem;
    }
}

/* Level 3: Standard Mobile (376px - 479px) */
@media (min-width: 376px) and (max-width: 479px) {
    .slideshow-dots {
        bottom: 0.75rem;
        gap: 0.375rem;
    }
    
    .slideshow-dot {
        width: 0.4rem;
        height: 0.4rem;
    }
}

/* Level 4: Large Mobile (480px - 599px) */
@media (min-width: 480px) {
    .slideshow-dots {
        bottom: clamp(0.875rem, 2vw, 1rem);
        gap: clamp(0.375rem, 1vw, 0.5rem);
    }
    
    .slideshow-dot {
        width: clamp(0.45rem, 1.2vw, 0.55rem);
        height: clamp(0.45rem, 1.2vw, 0.55rem);
    }
}

/* Level 5: Mobile Landscape & Small Tablet (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .slideshow-dots {
        bottom: 1rem;
        gap: 0.5rem;
    }
    
    .slideshow-dot {
        width: 0.6rem;
        height: 0.6rem;
    }
    
    .slideshow-dot.active {
        transform: scale(1.5);
    }
}

/* Level 6: Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .slideshow-dots {
        bottom: 1.125rem;
        gap: 0.625rem;
    }
    
    .slideshow-dot {
        width: 0.7rem;
        height: 0.7rem;
    }
}

/* Level 7: Tablet Landscape & Small Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .slideshow-dots {
        bottom: 1.25rem;
        gap: 0.75rem;
    }
    
    .slideshow-dot {
        width: 0.8rem;
        height: 0.8rem;
    }
}

/* Level 8: Desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .slideshow-dots {
        bottom: 1.375rem;
        gap: 0.875rem;
    }
    
    .slideshow-dot {
        width: 0.9rem;
        height: 0.9rem;
    }
}

/* Level 9: Large Desktop (1440px - 1919px) */
@media (min-width: 1440px) {
    .slideshow-dots {
        bottom: 1.5rem;
        gap: 1rem;
    }
    
    .slideshow-dot {
        width: 1rem;
        height: 1rem;
    }
    
    .slideshow-dot.active {
        transform: scale(1.35);
    }
}

/* Level 10: Ultra Large Desktop (1920px and above) */
@media (min-width: 1920px) {
    .slideshow-dots {
        bottom: 1.75rem;
        gap: 1.125rem;
    }
    
    .slideshow-dot {
        width: 1.1rem;
        height: 1.1rem;
    }
}

/* === SPECIAL DEVICE CONSIDERATIONS === */

/* Foldable Devices (Dual Screen) */
@media (max-width: 280px) {
    .slideshow-dots {
        bottom: 0.375rem;
        gap: 0.125rem;
        padding: 0.125rem;
    }
    
    .slideshow-dot {
        width: 0.2rem;
        height: 0.2rem;
    }
    
    .slideshow-dot.active {
        transform: scale(2);
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .slideshow-dots {
        bottom: 0.5rem;
        gap: 0.25rem;
        padding: 0.25rem;
    }
    
    .slideshow-dot {
        width: 0.35rem;
        height: 0.35rem;
    }
    
    .slideshow-dot.active {
        transform: scale(1.8);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .slideshow-dots {
        padding: 0.5rem;
    }
    
    .slideshow-dot {
        min-width: 1rem;
        min-height: 1rem;
        background: rgba(255, 255, 255, 0.4);
    }
    
    .slideshow-dots.small-dots .slideshow-dot {
        min-width: 0.75rem;
        min-height: 0.75rem;
    }
    
    .slideshow-dots.large-dots .slideshow-dot {
        min-width: 1.25rem;
        min-height: 1.25rem;
    }
}

/* High-density screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .slideshow-dot {
        box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.2);
    }
    
    .slideshow-dot.active {
        box-shadow: 
            0 0 0 1px rgba(255, 255, 255, 0.3),
            0 0 10px rgba(255, 255, 255, 0.4);
    }
}

/* Ultra High DPI (4K+) */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
    .slideshow-dot {
        border-width: 0.5px;
    }
    
    .slideshow-dot.active {
        box-shadow: 
            0 0 0 1.5px rgba(255, 255, 255, 0.3),
            0 0 12px rgba(255, 255, 255, 0.5);
    }
}

/* === ACCESSIBILITY FEATURES === */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .slideshow-dot {
        transition: none;
    }
    
    .slideshow-dot.active {
        transform: none;
    }
    
    .slideshow-dot::before {
        transition: none;
        display: none;
    }
    
    .slideshow-dot:hover,
    .slideshow-dot:active {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .slideshow-dot {
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid white;
    }
    
    .slideshow-dot.active {
        background: white;
        border: 2px solid black;
        box-shadow: 0 0 0 2px white;
    }
}

/* Inverted colors mode */
@media (inverted-colors: inverted) {
    .slideshow-dot {
        background: rgba(0, 0, 0, 0.5);
        border-color: rgba(0, 0, 0, 0.3);
    }
    
    .slideshow-dot.active {
        background: black;
        border-color: white;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .slideshow-dot {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .slideshow-dot.active {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 
            0 0 0 1px rgba(255, 255, 255, 0.3),
            0 0 10px rgba(255, 255, 255, 0.4);
    }
    
    .slideshow-dots.small-dots .slideshow-dot {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .slideshow-dots.large-dots .slideshow-dot {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* === ALTERNATIVE STYLES === */

/* Square Dots */
.slideshow-dots.square-dots .slideshow-dot {
    border-radius: 2px;
    width: clamp(0.5rem, 2vw, 0.75rem);
    height: clamp(0.25rem, 1vw, 0.375rem);
}

.slideshow-dots.square-dots .slideshow-dot.active {
    transform: scaleY(1.8);
}

/* Line Dots */
.slideshow-dots.line-dots .slideshow-dot {
    border-radius: 1px;
    width: clamp(1rem, 4vw, 1.5rem);
    height: clamp(0.125rem, 0.5vw, 0.25rem);
}

.slideshow-dots.line-dots .slideshow-dot.active {
    transform: scaleX(1.5);
}

/* Pulse Animation for Active Dot */
.slideshow-dot.pulse.active {
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0%, 100% { 
        box-shadow: 
            0 0 0 0 rgba(255, 255, 255, 0.7),
            0 0 0 1px rgba(255, 255, 255, 0.2);
    }
    70% { 
        box-shadow: 
            0 0 0 4px rgba(255, 255, 255, 0),
            0 0 0 5px rgba(255, 255, 255, 0.2);
    }
    100% { 
        box-shadow: 
            0 0 0 0 rgba(255, 255, 255, 0),
            0 0 0 1px rgba(255, 255, 255, 0.2);
    }
}

/* Glow Effect */
.slideshow-dot.glow.active {
    box-shadow: 
        0 0 5px rgba(255, 255, 255, 0.8),
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 15px rgba(255, 255, 255, 0.3);
}

/* === CUSTOM COLORS === */
.slideshow-dots.primary-color .slideshow-dot.active {
    background: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
}

.slideshow-dots.success-color .slideshow-dot.active {
    background: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
}

.slideshow-dots.warning-color .slideshow-dot.active {
    background: #f39c12;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.5);
}

.slideshow-dots.danger-color .slideshow-dot.active {
    background: #e74c3c;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

/* === LOADING STATE === */
.slideshow-dots.loading .slideshow-dot {
    animation: dotLoading 1.5s infinite ease-in-out;
    animation-delay: calc(var(--dot-index, 0) * 0.1s);
}

@keyframes dotLoading {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* === VERTICAL DOTS (Optional) === */
.slideshow-dots.vertical {
    flex-direction: column;
    right: clamp(0.75rem, 3vw, 1rem);
    left: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    gap: clamp(0.375rem, 1.5vw, 0.625rem);
}

/* Add this to your existing CSS */
.loading-dots {
    display: inline-block;
    min-width: 1em;
    text-align: left;
    font-weight: bold;
}

button.loading {
    position: relative;
    opacity: 0.9;
}

button.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
}

/* Animation for the dots */
@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

.loading-dots::after {
    content: '...';
    animation: dots 1.5s steps(1, end) infinite;
}

/* Button styles for loading state */
button:disabled {
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Optional: Add a subtle pulse animation for the loading button */
@keyframes subtlePulse {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
}

button.loading {
    animation: subtlePulse 2s ease-in-out infinite;
}