:root, :root[data-theme="light"] {
    --primary: #228B22;
    --secondary: #fbc02d;
    --accent: #20B2AA;
    --bg: #f5f7f9;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-dim: #6b7280;
    --white: #ffffff;
    --success: #2e7d32;
    --warning: #fbc02d;
    --error: #ef4444;
    --nav-bg: #f9fafb;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] {
    --primary: #228B22;
    --secondary: #fbc02d;
    --accent: #20B2AA;
    --bg: #1a1a1a;
    --card-bg: #2d2d2d;
    --text: #e0e0e0;
    --text-dim: #a0a0a0;
    --white: #ffffff;
    --success: #2e7d32;
    --warning: #fbc02d;
    --error: #c62828;
    --nav-bg: #222222;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 70px;
    /* Space for bottom nav */
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-bar-container {
    width: 200px;
    height: 8px;
    background: rgba(34, 139, 34, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% {
        width: 0%;
    }

    50% {
        width: 100%;
    }

    100% {
        width: 0%;
        transform: translateX(200px);
    }
}

.loading-text {
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.75rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--card-bg);
    border: 1.5px solid rgba(34, 139, 34, 0.1);
    border-radius: 12px;
    color: var(--text);
    outline: none;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input::placeholder {
    color: #a0a0a0;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(34, 139, 34, 0.05);
}

/* Auth Pages Style */
.auth-container {
    max-width: 450px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(34, 139, 34, 0.05);
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Rounded Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    /* Fully rounded */
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    gap: 8px;
}

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

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

.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.2);
}

/* Layout */
main {
    padding: 1.5rem;
    max-width: 600px;
    /* Mobile-first feel */
    margin: 0 auto;
}

.header {
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.header h1 {
    font-size: 1.75rem;
    color: var(--primary);
}

/* Admin Sidebar Wrapper */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--primary);
    color: white;
    padding: 2rem 1rem;
    flex-shrink: 0;
}

.admin-sidebar a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-main {
    flex: 1;
    padding: 2rem;
    background: var(--nav-bg);
}

/* Dashboard New UI */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0 0 20px 20px;
    margin-bottom: 1rem;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
}

.marquee-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.marquee-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.marquee-text span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
    color: var(--text-dim);
    font-size: 0.85rem;
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-100%, 0);
    }
}

/* Dash Action Grid Refined */
.action-grid-container {
    background: var(--primary);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.2);
}

.action-row {
    display: flex;
    align-items: center;
}

.action-item-compact {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.action-item-compact span {
    opacity: 0.9;
}

.icon-small {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.separator-v {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
}

.separator-h {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 1rem;
}

/* Activity Cards */
.activity-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

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

.activity-card div[style*="font-weight: 600"] {
    color: var(--text);
}

.activity-img-box {
    background: var(--nav-bg);
    padding: 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-micro {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

/* Task Hall Refined */
.task-hall-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-hall-card {
    display: flex;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    color: var(--text);
}

.task-hall-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 139, 34, 0.15);
}

.hall-left {
    width: 120px;
    position: relative;
    background: var(--nav-bg);
}

.hall-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.hall-label {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-dim);
}

.hall-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 50%;
    width: 24px;
}

.hall-right {
    flex: 1;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hall-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
}

.hall-price {
    font-size: 1.2rem;
    font-weight: 700;
}

.task-hall-card.locked .hall-right {
    background: #2e7d32;
    opacity: 0.9;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.action-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 500;
}

.action-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

.main-banners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.banner-btn {
    background: var(--primary);
    color: white;
    padding: 1.25rem;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    font-weight: 600;
}

/* Floating Action Buttons */
.fab-container {
    position: fixed;
    right: 0.75rem;
    bottom: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1500;
}

.fab {
    width: 32px;
    height: 32px;
    background: var(--card-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.fab i {
    width: 16px;
    height: 16px;
    color: #1a1a1a;
}

.fab.checkin {
    background: var(--card-bg);
}

.fab.support {
    background: var(--card-bg);
}

.fab.inbox {
    background: var(--card-bg);
}

.badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    border: 1.5px solid #fff;
}

@media (max-width: 480px) {
    .dashboard-header {
        border-radius: 0;
    }
}

/* Registration Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

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

/* Member Commission List Refined */
.member-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.member-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.member-card-top {
    background: var(--primary);
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.member-card-bottom {
    background: var(--card-bg);
    padding: 0.6rem 0.75rem;
    text-align: left;
}

.member-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.member-amount {
    font-weight: 700;
    font-size: 0.85rem;
}

.member-email {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
}

/* Partner Logos */
.partner-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.partner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.partner-img {
    width: 100%;
    height: auto;
    opacity: 0.8;
}

/* Profile Piggy UI */
.profile-card-piggy {
    background: #2d2b38;
    color: white;
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.piggy-img {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 80px;
    opacity: 0.9;
}

/* Modal Language */
.lang-modal-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.lang-item {
    padding: 0.75rem 0.5rem;
    background: var(--nav-bg);
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
    border: 1px solid transparent;
}

.lang-item.active {
    border-color: var(--primary);
    background: rgba(34, 139, 34, 0.05);
    color: var(--primary);
}

/* Enhanced Responsive Design */
@media (max-width: 480px) {
    .dashboard-header {
        border-radius: 0;
        padding: 0.75rem 1rem;
    }
    
    .dashboard-header span {
        font-size: 0.9rem;
    }
    
    .main-banners {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .banner-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .action-grid-container {
        padding: 0.25rem;
    }
    
    .action-item-compact {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
/* Profile V2 Styles */
.profile-v2-header {
    background: #2c2c3e;
    padding: 1.5rem;
    color: white;
    border-radius: 0 0 30px 30px;
    position: relative;
    overflow: hidden;
}
.piggy-illustration {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 120px;
}
.balance-card-v2 {
    background: #c3e63e; /* Lime green as seen in screenshot */
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 8px 20px rgba(195, 230, 62, 0.2);
}
.account-btn-v2 {
    background: #000;
    color: white;
    padding: 8px;
    border-radius: 99px;
    text-align: center;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.action-btns-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0 1rem;
}
.action-btn-blue {
    background: #3b82f6;
    color: white;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}
.action-btn-orange {
    background: #ff7c5c;
    color: white;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}
.action-btn-white {
    background: var(--card-bg);
    color: #1a1a1a;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.circle-icon-blue {
    background: #e0e7ff;
    padding: 8px;
    border-radius: 50%;
    color: #6366f1;
}
.circle-icon-red {
    background: #fee2e2;
    padding: 8px;
    border-radius: 50%;
    color: #f87171;
}
    .hall-left {
        width: 100px;
    }
    
    .hall-img {
        height: 70px;
    }
    
    .member-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .fab-container {
        right: 1rem;
        bottom: 90px;
        gap: 0.75rem;
    }
    
    .fab {
        width: 45px;
        height: 45px;
    }
    
    .activity-card {
        padding: 1rem;
    }
    
    .activity-img-box {
        padding: 8px;
    }
    
    .activity-img-box img {
        width: 35px;
    }
    
    .btn-micro {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .marquee-container {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .info-item {
        padding: 0.875rem;
    }
    
    .partner-section {
        padding: 1rem;
        margin-top: 0.75rem;
    }
}

@media (max-width: 360px) {
    .dashboard-header {
        padding: 0.5rem 0.75rem;
    }
    
    .dashboard-header span {
        font-size: 0.8rem;
    }
    
    .lang-selector {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin: 1rem 0 0.5rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .fab-container {
        right: 0.75rem;
        bottom: 85px;
    }
    
    .fab {
        width: 40px;
        height: 40px;
    }
    
    .fab i {
        font-size: 1rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 481px) and (max-width: 768px) {
    main {
        max-width: 768px;
        padding: 2rem;
    }
    
    .member-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .action-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-banners {
        max-width: 600px;
        margin: 0 auto 1rem;
    }
    
    .fab-container {
        right: 2rem;
    }
}

/* Desktop Enhancements */
@media (min-width: 769px) {
    main {
        max-width: 800px;
        padding: 2rem;
    }
    
    .bottom-nav {
        display: none; /* Hide bottom nav on desktop */
    }
    
    .desktop-nav {
        display: flex;
        position: sticky;
        top: 0;
        background: var(--nav-bg);
        padding: 1rem 2rem;
        box-shadow: var(--shadow);
        z-index: 1000;
        justify-content: space-between;
        align-items: center;
    }
    
    .fab-container {
        right: 2rem;
        bottom: 2rem;
    }
    
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .member-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .action-item,
    .nav-item,
    .fab,
    .task-hall-card,
    .member-card,
    .info-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn:active,
    .action-item:active,
    .nav-item:active,
    .fab:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hall-img,
    .activity-img-box img,
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}



/* Reduced motion support */
@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;
    }
    
    .loading-bar {
        animation: none;
    }
    
    .marquee-text span {
        animation: none;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .dashboard-header {
        padding: 0.5rem 1rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .fab-container {
        bottom: 70px;
    }
    
    .bottom-nav {
        padding: 0.5rem 0;
    }
    
    .nav-item span {
        font-size: 0.65rem;
    }
}

/* Print styles */
@media print {
    .bottom-nav,
    .fab-container,
    .dashboard-header,
    .lang-selector,
    .btn,
    .action-item {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
    :root {
        --primary: #006600;
        --accent: #008080;
        --text: #000000;
        --text-dim: #333333;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    input,
    textarea,
    select {
        border: 2px solid var(--text);
    }
}

/* Focus visible for keyboard navigation */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

.js-focus-visible .focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading states for better UX */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Pull to refresh indicator */
#pull-refresh-indicator {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 600;
}

/* Safe area insets for modern mobile devices */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    }
    
    .fab-container {
        bottom: max(100px, env(safe-area-inset-bottom) + 80px);
    }
    
    main {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
    }
}

/* Enhanced card hover effects */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 139, 34, 0.15);
}

/* Button improvements */
.btn {
    position: relative;
    overflow: hidden;
}

.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.3s ease, height 0.3s ease;
}

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

/* Form validation styles */
input:invalid,
textarea:invalid,
select:invalid {
    border-color: var(--error);
}

input:valid,
textarea:valid,
select:valid {
    border-color: var(--success);
}

/* Toast notifications */
.falcon-notification {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.falcon-notification.show {
    transform: translateX(0);
}

/* Modal improvements */
.modal {
    backdrop-filter: blur(4px);
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Table responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .table-responsive table {
        min-width: 600px;
    }
}