/* LeafEarn - Garden Modern Theme Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
/* Flat Icons (UIcons) - Latest CDN Links (No version number = always latest) */
@import url('https://cdn-uicons.flaticon.com/uicons-regular-rounded/css/uicons-regular-rounded.css');
@import url('https://cdn-uicons.flaticon.com/uicons-solid-rounded/css/uicons-solid-rounded.css');
@import url('https://cdn-uicons.flaticon.com/uicons-bold-rounded/css/uicons-bold-rounded.css');

/* Root Variables - Garden Theme */
:root {
    --primary-green: #2d7a3e;
    --secondary-green: #4caf50;
    --light-green: #8bc34a;
    --dark-green: #1b5e20;
    --accent-green: #66bb6a;
    --leaf-green: #43a047;
    
    --bg-light: #f1f8f4;
    --bg-white: #ffffff;
    --bg-cream: #fafff7;
    
    --text-dark: #1a3a1a;
    --text-gray: #5a6c5a;
    --text-light: #8a9a8a;
    
    --border-color: #d4e8d4;
    --shadow: 0 2px 10px rgba(45, 122, 62, 0.1);
    --shadow-hover: 0 4px 20px rgba(45, 122, 62, 0.15);
    
    --gold: #ffd700;
    --orange: #ff9800;
    --red: #f44336;
    --blue: #2196f3;
    
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

main {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Header Styles */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-green);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-green);
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.logo i {
    font-size: 2.2rem;
    color: var(--leaf-green);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu > li > a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-menu > li > a i {
    font-size: 1.1rem;
}

.nav-menu > li > a:hover {
    background: var(--bg-light);
    color: var(--primary-green);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
}

.btn-primary:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
}

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

.btn-secondary {
    background: var(--secondary-green);
    color: white;
}

.btn-secondary:hover {
    background: var(--leaf-green);
}

.btn-danger {
    background: var(--red);
    color: white;
}

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

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: var(--text-dark);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-green);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile/Desktop Visibility */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex;
}

/* Mobile Notification Bell */
/* Mobile Header Actions Container */
.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.mobile-balance-display {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-light);
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    color: var(--primary-green);
    font-size: 0.9rem;
    border: 2px solid var(--border-color);
}

.mobile-balance-display i {
    font-size: 1rem;
    color: var(--leaf-green);
}

.mobile-notification {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-green);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nav Wrapper */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

/* Desktop Dropdown (keep existing behavior) */
@media (min-width: 1025px) {
    .nav-menu .has-submenu {
        position: relative;
    }
    
    .nav-menu .has-submenu > a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-menu .arrow-icon {
        font-size: 0.7rem;
        margin-left: 0.2rem;
        transition: transform 0.3s ease;
    }
    
    .nav-menu .has-submenu:hover > a .arrow-icon {
        transform: rotate(180deg);
    }
    
    .nav-menu .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--bg-white);
        border-radius: var(--radius);
        box-shadow: var(--shadow-hover);
        min-width: 250px;
        margin-top: 0.5rem;
        overflow: hidden;
        z-index: 1000;
        padding: 0;
        list-style: none;
        border: 1px solid var(--border-color);
    }
    
    .nav-menu .has-submenu:hover .submenu {
        display: block;
        animation: fadeInDown 0.3s ease;
    }
    
    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-menu .submenu li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu .submenu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu .submenu li a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 1rem 1.5rem;
        color: var(--text-dark);
        transition: var(--transition);
        white-space: nowrap;
    }
    
    .nav-menu .submenu li a:hover {
        background: var(--bg-light);
        color: var(--primary-green);
    }
    
    .nav-menu .submenu li a i {
        font-size: 1rem;
        width: 20px;
        text-align: center;
        color: var(--primary-green);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" fill="rgba(255,255,255,0.1)"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-coins {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-size: 1.5rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Dashboard User Header */
.user-header {
    background: transparent;
    color: var(--primary-green);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: var(--radius);
}

.user-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.user-info h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-green);
}

.user-badge {
    display: inline-block;
    background: var(--bg-light);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-green);
    border: 2px solid var(--border-color);
}

.user-badge.vip {
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: var(--text-dark);
    border-color: var(--gold);
}

.balance-display {
    text-align: right;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-green);
}

.balance-usd {
    font-size: 1rem;
    opacity: 0.8;
    color: var(--text-gray);
}

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-dark);
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.notification-bell:hover {
    background: var(--bg-light);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--red);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.dropdown-toggle:hover {
    background: var(--bg-light);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    min-width: 200px;
    margin-top: 0.5rem;
    overflow: hidden;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-green);
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    color: var(--text-gray);
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Earning Categories Grid */
.earn-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    position: relative;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-green);
    background: var(--bg-cream);
}

.category-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-light);
}

.category-card.locked:hover {
    transform: none;
    border-color: var(--border-color);
    background: var(--bg-light);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card.locked .category-icon {
    color: var(--text-light);
}

.category-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.category-reward {
    font-size: 1.1rem;
    color: var(--leaf-green);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.category-badge {
    display: inline-block;
    background: var(--gold);
    color: var(--text-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.active-users-badge {
    margin-top: 0.5rem;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(67, 160, 71, 0.15));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 15px;
    font-size: 0.75rem;
    color: var(--primary-green);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    animation: pulse-badge 2s ease-in-out infinite;
}

.active-users-badge i {
    font-size: 0.85rem;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Task Container */
.task-container {
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
}

.task-timer {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 2rem 0;
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius);
}

.task-question {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.task-options {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.option-btn {
    padding: 1rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.option-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-green);
}

.task-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    text-align: center;
}

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

/* Spin Wheel */
.spin-wheel-container {
    text-align: center;
    padding: 2rem;
}

.wheel-canvas {
    max-width: 400px;
    margin: 2rem auto;
    border-radius: 50%;
    box-shadow: var(--shadow-hover);
    display: block;
}

.spin-btn {
    font-size: 1.3rem;
    padding: 1rem 3rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 122, 62, 0.1);
}

.form-select {
    appearance: none;
    background: var(--bg-white) url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232d7a3e"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
    background-size: 20px;
    cursor: pointer;
}

.form-error {
    color: var(--red);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.form-success {
    color: var(--secondary-green);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead {
    background: var(--primary-green);
    color: white;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

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

.table tbody tr:last-child {
    border-bottom: none;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: var(--secondary-green);
    color: white;
}

.badge-warning {
    background: var(--orange);
    color: white;
}

.badge-danger {
    background: var(--red);
    color: white;
}

.badge-info {
    background: var(--blue);
    color: white;
}

.badge-gold {
    background: var(--gold);
    color: var(--text-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-green);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--red);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Chat/Support Ticket */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    gap: 10px;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
}

.message-bubble {
    background: var(--bg-white);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.chat-message.user .message-bubble {
    background: var(--primary-green);
    color: white;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

.chat-input-group {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
}

/* CTA Section - Remove all margins and ensure flush with footer */
.cta-section {
    margin: 0 !important;
    padding: 4rem 0 !important;
    margin-bottom: 0 !important;
}

/* Remove spacing before footer */
section:last-of-type {
    margin-bottom: 0 !important;
}

/* Ensure absolutely no gap between CTA section and footer */
.cta-section + footer,
main + footer {
    margin-top: 0 !important;
    padding-top: 3rem !important;
}

/* Footer - ensure it starts immediately after CTA with no gap */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin: 0 !important;
    margin-top: 0 !important;
    position: relative;
    display: block;
    line-height: 1.6;
}

/* Ensure last section in main has no bottom margin */
main > section:last-child {
    margin-bottom: 0 !important;
}

/* Remove any whitespace between main and footer - eliminate body background showing through */
body > main + footer {
    margin-top: 0 !important;
    padding-top: 3rem !important;
}

/* Eliminate any gap between main and footer by overlapping slightly */
main + footer {
    margin-top: -2px !important;
}

/* Ensure the footer background covers any gap and extends upward */
.footer {
    background: var(--text-dark) !important;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--light-green);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--light-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-left: 4px solid var(--primary-green);
    transition: var(--transition);
}

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

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

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

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Responsive Spinner - Tablet */
@media (max-width: 1024px) {
    .spinner {
        width: 32px;
        height: 32px;
        border-width: 2.5px;
        margin: 1.5rem auto;
    }
}

/* Responsive Spinner - Mobile */
@media (max-width: 768px) {
    .spinner {
        width: 28px;
        height: 28px;
        border-width: 2px;
        margin: 1rem auto;
    }
}

@media (max-width: 480px) {
    .spinner {
        width: 24px;
        height: 24px;
        border-width: 2px;
        margin: 0.75rem auto;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Responsive Design */

/* Large Screens - Keep layout balanced */
@media (min-width: 1400px) {
    .earn-categories {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .category-card {
        padding: 2.5rem 1.5rem;
        min-height: 200px;
    }
    
    .category-icon {
        font-size: 3.5rem;
    }
}

@media (max-width: 992px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Hide username text on tablets */
    .username-text {
        display: none;
    }
    
    /* Tablet Card Adjustments */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.2rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    /* Compact Category Cards on Tablet */
    .earn-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.2rem 0.8rem;
        min-height: 140px;
    }
    
    .category-icon {
        font-size: 2.2rem;
        margin-bottom: 0.6rem;
    }
    
    .category-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .category-reward {
        font-size: 0.85rem;
    }
    
    .category-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    
    .active-users-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
        margin-top: 0.4rem;
    }
    
    /* Compact other cards */
    .card-title {
        font-size: 1.3rem;
    }
    
    /* Spin Wheel - Tablet */
    .spin-wheel-container {
        padding: 1.5rem;
    }
    
    .wheel-canvas {
        max-width: 360px;
        margin: 1.5rem auto;
    }
    
    .spin-btn {
        font-size: 1.1rem;
        padding: 0.9rem 2.5rem;
    }
}

@media (max-width: 1024px) {
    /* Show hamburger menu for tablets and below */
    .menu-toggle {
        display: flex;
        order: 3;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-header-actions {
        display: flex !important;
        order: 2;
    }
    
    .menu-toggle {
        order: 3;
        margin-left: 0.5rem;
    }
    
    /* Mobile Navigation */
    .nav-wrapper {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-white);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        z-index: 1000;
        overflow-y: auto;
        padding: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    
    .nav-wrapper.active {
        display: flex !important;
        animation: slideIn 0.3s ease;
    }
    
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateX(-100%);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu li a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 1rem 1.5rem;
        color: var(--text-dark);
        font-weight: 500;
        width: 100%;
    }
    
    .nav-menu li a:hover {
        background: var(--bg-light);
        color: var(--primary-green);
    }
    
    .nav-menu li a i {
        font-size: 1.2rem;
        width: 24px;
        text-align: center;
    }
    
    /* Mobile Submenu */
    .nav-menu .has-submenu > a {
        position: relative;
        justify-content: space-between;
    }
    
    .nav-menu .arrow-icon {
        transition: transform 0.3s ease;
        margin-left: auto;
    }
    
    .nav-menu .has-submenu.active .arrow-icon {
        transform: rotate(180deg);
    }
    
    .nav-menu .submenu {
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
        background: var(--bg-light);
    }
    
    .nav-menu .has-submenu.active .submenu {
        display: block;
    }
    
    .nav-menu .submenu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav-menu .submenu li a {
        padding: 1rem 1.5rem 1rem 3.5rem;
        font-size: 0.95rem;
    }
    
    /* Balance Item in Mobile */
    .balance-item {
        background: var(--bg-light);
        padding: 1rem 1.5rem;
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
        border-bottom: 2px solid var(--primary-green) !important;
    }
    
    .balance-label {
        font-size: 0.85rem;
        color: var(--text-gray);
        font-weight: 500;
    }
    
    .balance-value {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--primary-green);
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    /* Mobile Buttons */
    .mobile-btn {
        display: block !important;
        text-align: center;
        padding: 0.8rem 1.5rem !important;
        margin: 0.5rem 1rem;
        border-radius: var(--radius);
        border: 2px solid var(--primary-green);
        background: white;
        color: var(--primary-green);
        font-weight: 600;
    }
    
    .btn-primary-mobile {
        background: var(--primary-green) !important;
        color: white !important;
    }
    
    /* Navbar adjustments */
    .navbar {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo {
        order: 1;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    /* Compact header spacing on mobile */
    .header .container {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .logo img {
        height: 32px;
    }
    
    /* Match mobile menu overlay offset to the reduced header height */
    .nav-wrapper {
        top: 56px;
    }
    .logo {
        font-size: 1.3rem;
        gap: 6px;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .user-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .balance-display {
        text-align: center;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Category Cards on smaller tablets/mobile */
    .earn-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }
    
    .category-card {
        padding: 1rem 0.6rem;
        min-height: 115px;
    }
    
    .category-icon {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .category-title {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .category-reward {
        font-size: 0.75rem;
    }
    
    .category-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
    
    .active-users-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
        margin-top: 0.3rem;
    }
    
    .message-content {
        max-width: 80%;
    }
    
    .dropdown-menu {
        right: 0;
        left: auto;
    }
    
    /* Compact Cards for Mobile */
    .card {
        padding: 1.2rem;
        margin-bottom: 1rem;
    }
    
    /* Spin Wheel - Mobile */
    .spin-wheel-container {
        padding: 1rem;
    }
    
    .wheel-canvas {
        max-width: 320px;
        margin: 1rem auto;
    }
    
    .spin-btn {
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }
    
    .card-header {
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    /* Compact Stat Cards */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
        margin-bottom: 0.2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Extra compact header on very small screens */
    .header .container {
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }
    
    .navbar {
        padding: 0.4rem 0;
    }
    
    .logo img {
        height: 28px;
    }
    
    .nav-wrapper {
        top: 52px;
    }
    .container {
        padding: 0 15px;
    }
    
    /* Extra compact mobile header */
    .mobile-balance-display {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
        gap: 0.25rem;
    }
    
    .mobile-balance-display i {
        font-size: 0.9rem;
    }
    
    .mobile-notification {
        font-size: 1.3rem;
        padding: 0.4rem;
    }
    
    .menu-toggle {
        margin-left: 0.3rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    /* Spin Wheel - Small Mobile */
    .spin-wheel-container {
        padding: 0.75rem;
    }
    
    .wheel-canvas {
        max-width: 280px;
        margin: 0.75rem auto;
    }
    
    .spin-btn {
        font-size: 0.95rem;
        padding: 0.75rem 1.5rem;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .task-timer {
        font-size: 2rem;
        padding: 1.5rem;
    }
    
    .task-question {
        font-size: 1.2rem;
        padding: 1.5rem;
    }
    
    .balance-amount {
        font-size: 1.5rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.6rem;
    }
    
    /* Extra Compact Stat Cards for Small Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stat-card {
        padding: 0.8rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
        margin-bottom: 0.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* Compact Category Cards */
    /* Mobile Category Cards - Single Column */
    .earn-categories {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .category-card {
        padding: 1rem 0.8rem;
        min-height: auto;
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
        gap: 0.8rem;
    }
    
    .category-icon {
        font-size: 2rem;
        margin-bottom: 0;
        flex-shrink: 0;
        min-width: 45px;
    }
    
    .category-card-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex: 1;
    }
    
    .category-title {
        font-size: 0.95rem;
        margin-bottom: 0.2rem;
    }
    
    .category-reward {
        font-size: 0.8rem;
    }
    
    .category-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .active-users-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
        margin-top: 0.3rem;
    }
    
    /* Smaller buttons on mobile */
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
    
    /* Compact User Header on Mobile */
    .user-info h2 {
        font-size: 1.5rem;
    }
    
    .user-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.8rem;
    }
    
    .balance-amount {
        font-size: 1.5rem;
    }
    
    /* Reduce vertical spacing on mobile */
    .hero {
        padding: 40px 0;
    }
    
    .user-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    /* Compact modals on mobile */
    .modal-content {
        max-width: 95%;
        padding: 0;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    /* Compact forms on mobile */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 0.7rem 0.9rem;
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .btn, .nav-menu, .dropdown {
        display: none;
    }
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: var(--transition);
    user-select: none;
}

.password-toggle-icon:hover {
    color: var(--primary-green);
}

.password-toggle-icon i {
    display: block;
}

/* Extra Small Mobile Devices (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    /* Ultra compact category cards */
    .earn-categories {
        gap: 0.5rem;
    }
    
    .category-card {
        padding: 0.8rem 0.6rem;
    }
    
    .category-icon {
        font-size: 1.8rem;
        min-width: 40px;
    }
    
    .category-title {
        font-size: 0.85rem;
    }
    
    .category-reward {
        font-size: 0.7rem;
    }
    
    .category-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.3rem;
    }
    
    .active-users-badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.4rem;
        margin-top: 0.25rem;
    }
    
    /* Ultra compact stat cards */
    .stat-card {
        padding: 0.8rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    /* Smaller user header */
    .user-info h2 {
        font-size: 1.2rem;
    }
    
    .balance-amount {
        font-size: 1.3rem;
    }
    
    .balance-usd {
        font-size: 0.75rem;
    }
}

/* ============================================
   ADMIN PANEL RESPONSIVE STYLES
   ============================================ */

/* Admin Container - Override inline styles with CSS */
.admin-container {
    padding: 4rem 20px !important;
}

@media (max-width: 992px) {
    .admin-container {
        padding: 2rem 1rem !important;
    }
}

@media (max-width: 768px) {
    .admin-container {
        padding: 2rem 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .admin-container {
        padding: 1.5rem 0.5rem !important;
    }
}

/* Table Responsive Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    position: relative;
    display: block;
}

.table-responsive::-webkit-scrollbar {
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 5px;
    margin: 0 5px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 5px;
    border: 2px solid var(--bg-light);
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

.table-responsive table {
    width: 100%;
    min-width: 900px;
    margin: 0;
}

.table-responsive .table {
    margin-bottom: 0;
    box-shadow: none;
}

/* Ensure table maintains structure */
.table-responsive .table thead {
    position: sticky;
    top: 0;
    z-index: 5;
}

/* Data Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    font-size: 0.95rem;
    min-width: 900px;
}

.data-table thead {
    background: var(--primary-green);
    color: white;
    position: sticky;
    top: 0;
    z-index: 5;
}

.data-table th,
.data-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

/* Data table within responsive wrapper */
.table-responsive .data-table {
    margin: 0;
    box-shadow: none;
}

/* Admin Card Header Responsive */
.card-header {
    flex-wrap: wrap;
    gap: 1rem;
}

.card-header .card-title {
    flex: 1;
    min-width: 200px;
}

.card-header .btn,
.card-header a.btn {
    white-space: nowrap;
}

/* Admin Filter Forms Responsive */
.admin-filters,
form[method="GET"].admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.admin-filters .form-group,
form[method="GET"].admin-filters .form-group {
    flex: 1;
    min-width: 200px;
    margin: 0;
}

.admin-filters .form-group label.form-label,
form[method="GET"].admin-filters .form-group label.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    min-height: 1.5rem;
}

.admin-filters .form-group label.form-label:empty::before,
form[method="GET"].admin-filters .form-group label.form-label:empty::before {
    content: "\00a0";
    display: block;
}

.admin-filters .form-group .btn,
form[method="GET"].admin-filters .form-group .btn {
    width: auto;
    min-width: auto;
}

/* Button Groups Responsive */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-group .btn {
    flex: 0 1 auto;
}

/* Admin Statistics Grid Responsive */
.admin-stats-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Pagination Responsive */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination .btn,
.pagination a,
.pagination span {
    white-space: nowrap;
    padding: 0.7rem 1.5rem;
}

/* Modal Responsive */
.modal-content {
    width: 90%;
    max-width: 600px;
    margin: 2rem auto;
}

.modal-body .form-group {
    margin-bottom: 1.5rem;
}

/* Grid Responsive for Admin */
.grid.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Action Buttons in Tables */
.table .btn,
.data-table .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.table .btn-icon,
.data-table .btn-icon {
    padding: 0.5rem;
    font-size: 1.1rem;
}

/* Status Badge Responsive */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================
   TABLET RESPONSIVE (max-width: 992px)
   ============================================ */
@media (max-width: 992px) {
    /* Admin Card Headers - Stack on Tablet */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-header .card-title {
        width: 100%;
    }
    
    .card-header .btn,
    .card-header a.btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Admin Filter Forms - Stack on Tablet */
    .admin-filters,
    form[method="GET"].admin-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-filters .form-group,
    form[method="GET"].admin-filters .form-group {
        width: 100%;
        min-width: 100%;
    }
    
    .admin-filters .form-group .btn,
    form[method="GET"].admin-filters .form-group .btn {
        width: 100%;
    }
    
    /* Grid 2 Column - Single Column on Tablet */
    .grid.grid-2 {
        grid-template-columns: 1fr;
    }
    
    /* Statistics Grid - 2 Columns on Tablet */
    .admin-stats-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tables - Smaller Font on Tablet */
    .table,
    .data-table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td,
    .data-table th,
    .data-table td {
        padding: 0.7rem 0.8rem;
    }
    
    /* Button Groups - Wrap on Tablet */
    .btn-group {
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    /* Pagination - Compact on Tablet */
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination .btn,
    .pagination a {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* Modal - Full Width on Tablet */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 1rem auto;
    }
    
    /* Container Padding on Tablet */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ============================================
   MOBILE RESPONSIVE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Admin Card Headers - Compact on Mobile */
    .card-header {
        padding-bottom: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .card-header .card-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    /* Admin Statistics Grid - Single Column on Mobile */
    .admin-stats-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 1.8rem;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    /* Tables - Enhanced Horizontal Scroll on Mobile */
    /* Break out of card padding to allow full-width scrolling */
    .card-body .table-responsive {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        width: calc(100% + 2rem);
        max-width: 100vw;
        position: relative;
        left: 0;
    }
    
    /* Also handle tables directly in container */
    .admin-container > .card > .card-body > .table-responsive {
        margin-left: calc(-0.75rem - 1px);
        margin-right: calc(-0.75rem - 1px);
        width: calc(100% + 1.5rem + 2px);
    }
    
    .table-responsive {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        display: block;
        position: relative;
    }
    
    .table-responsive table {
        min-width: 1000px;
        font-size: 0.85rem;
        display: table;
        width: 100%;
        margin: 0;
        border-collapse: separate;
        border-spacing: 0;
    }
    
    .table th,
    .table td,
    .data-table th,
    .data-table td {
        padding: 0.7rem 0.6rem;
        font-size: 0.8rem;
        vertical-align: top;
    }
    
    /* Allow text wrapping in key columns for better mobile display */
    .table td:nth-child(2) {
        word-break: break-word;
        min-width: 120px;
        max-width: 180px;
    }
    
    /* Email column - allow wrapping */
    .table td:nth-child(3) {
        word-break: break-word;
        white-space: normal;
        min-width: 150px;
        max-width: 200px;
    }
    
    /* Transaction ID and code elements - wrap properly but maintain readability */
    .table td code {
        word-break: break-all;
        white-space: normal;
        display: inline-block;
        max-width: 180px;
        line-height: 1.4;
    }
    
    /* Make scrollbar more visible on mobile */
    .table-responsive::-webkit-scrollbar {
        height: 12px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: var(--primary-green);
        border-radius: 6px;
        border: 2px solid var(--bg-light);
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: var(--bg-light);
        border-radius: 6px;
        margin: 0 5px;
    }
    
    /* Button Groups - Stack on Mobile */
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Action Buttons in Tables - Smaller on Mobile */
    .table .btn,
    .data-table .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .table .btn-icon,
    .data-table .btn-icon {
        padding: 0.4rem;
        font-size: 1rem;
    }
    
    /* Status Filter Buttons - Stack on Mobile */
    .admin-filters a.btn,
    form[method="GET"].admin-filters a.btn,
    .admin-filters .form-group .btn,
    form[method="GET"].admin-filters .form-group .btn {
        width: 100%;
        min-width: 100%;
    }
    
    /* Pagination - Compact on Mobile */
    .pagination {
        gap: 0.3rem;
    }
    
    .pagination .btn,
    .pagination a,
    .pagination span {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Modal - Full Screen on Mobile */
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    /* Form Controls - Full Width on Mobile */
    .form-control,
    .form-select {
        width: 100%;
    }
    
    /* Grid Forms - Single Column on Mobile */
    .grid.grid-2 .form-group {
        grid-column: 1 / -1;
    }
    
    /* Card Body Padding - Reduced on Mobile */
    .card-body {
        padding: 1rem;
    }
    
    /* Badge - Smaller on Mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* Container Padding - Reduced on Mobile */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Card Padding - Reduced on Mobile */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Card body padding adjustment for tables */
    .card-body {
        padding: 1rem;
    }
    
    /* Ensure table wrapper can extend beyond card padding */
    .card-body > .table-responsive:first-child {
        margin-top: 0;
    }
    
    .card-body > .table-responsive:last-child {
        margin-bottom: 0;
    }
}

/* ============================================
   SMALL MOBILE RESPONSIVE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Even More Compact Tables */
    .card-body .table-responsive {
        margin-left: -0.8rem;
        margin-right: -0.8rem;
        padding-left: 0.8rem;
        padding-right: 0.8rem;
        width: calc(100% + 1.6rem);
        max-width: 100vw;
    }
    
    .admin-container > .card > .card-body > .table-responsive {
        margin-left: calc(-0.5rem - 1px);
        margin-right: calc(-0.5rem - 1px);
        width: calc(100% + 1rem + 2px);
    }
    
    .table-responsive table {
        min-width: 950px;
        font-size: 0.75rem;
    }
    
    .table th,
    .table td,
    .data-table th,
    .data-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Better text handling for small screens */
    .table td {
        line-height: 1.4;
    }
    
    .table td code {
        max-width: 150px;
        font-size: 0.7rem;
    }
    
    /* Larger scrollbar on very small screens */
    .table-responsive::-webkit-scrollbar {
        height: 14px;
    }
    
    /* Ultra Compact Statistics */
    .stat-card {
        padding: 0.8rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Compact Card Headers */
    .card-header .card-title {
        font-size: 1.1rem;
    }
    
    /* Compact Buttons */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Status Filter Buttons - Full Width on Small Mobile */
    .admin-filters a.btn,
    form[method="GET"].admin-filters a.btn,
    .admin-filters .form-group .btn,
    form[method="GET"].admin-filters .form-group .btn {
        min-width: 100%;
        width: 100%;
    }
    
    /* Compact Pagination */
    .pagination .btn,
    .pagination a,
    .pagination span {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Compact Forms */
    .form-control,
    .form-select {
        padding: 0.7rem 0.9rem;
        font-size: 0.9rem;
    }
    
    /* Container - Minimal Padding on Small Mobile */
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    /* Card - Minimal Padding on Small Mobile */
    .card {
        padding: 0.8rem;
    }
    
    .card-body {
        padding: 0.8rem;
    }
    
    /* Table wrapper adjustment for small mobile */
    .card-body .table-responsive {
        margin-left: -0.8rem;
        margin-right: -0.8rem;
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }
}

/* ============================================
   EXTRA UTILITY CLASSES FOR ADMIN
   ============================================ */
.admin-action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-action-buttons .btn {
    flex: 0 1 auto;
}

@media (max-width: 768px) {
    .admin-action-buttons {
        width: 100%;
    }
    
    .admin-action-buttons .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 0.25rem);
    }
}

@media (max-width: 480px) {
    .admin-action-buttons {
        flex-direction: column;
    }
    
    .admin-action-buttons .btn {
        width: 100%;
        min-width: 100%;
    }
}

/* ============================================
   PTC PAGES RESPONSIVE STYLES
   ============================================ */

/* PTC Task Items - Additional Mobile Fixes */
@media (max-width: 768px) {
    .container[style*="padding: 4rem 20px"] {
        padding: 2rem 1rem !important;
    }
    
    .card-header[style*="display: flex"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem;
    }
    
    .card-header[style*="display: flex"] span {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .container[style*="padding: 4rem 20px"] {
        padding: 1.5rem 0.75rem !important;
    }
    
    .card-header h3 {
        font-size: 1.1rem !important;
    }
    
    .card-header span {
        font-size: 0.75rem !important;
        padding: 0.2rem 0.6rem !important;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

