/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.min-h-screen {
    min-height: 100vh;
}



/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Main content */
.main-content {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 280px;
    }
    
    .sidebar.active + .main-content {
        margin-left: 280px;
    }
}

/* Top bar */
header {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Balance Section */
.balance-section {
    margin-bottom: 2rem;
}

.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 0;
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    height: 200px;
}

.promotional-banner {
    position: relative;
}

.banner-carousel {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    background-size: cover;
    background-position: center;
}

.banner-slide:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.banner-slide:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.banner-slide:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.banner-slide:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.banner-slide.active {
    opacity: 1;
}

.banner-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.banner-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cta-button {
    background-color = white;
    color: #333;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: white;
    transform: scale(1.2);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-control {
    background-color = rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-control:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Animated Sign In Button */
.animated-signin-container {
    position: relative;
}

.animated-signin-btn {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(79, 172, 254, 0.3);
    overflow: hidden;
    position: relative;
}

.animated-signin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 172, 254, 0.4);
    background: linear-gradient(135deg, #00f2fe, #4facfe);
}

.animated-signin-btn:hover .signin-text {
    transform: translateX(-10px);
    opacity: 0;
}

.animated-signin-btn:hover .signin-icon {
    transform: translateX(0);
    opacity: 1;
}

.signin-text {
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

.signin-icon {
    position: absolute;
    right: 1rem;
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Service Icons */
.section-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.icon-container {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.icon-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.animated-icon:hover .icon-animation {
    animation: pulse 1s infinite;
}

.animated-icon:hover .icon-circle {
    animation: bounce 0.5s ease;
}

.icon-circle {
    transition: all 0.3s ease;
}

.icon-animation {
    position: relative;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

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

/* Icon-specific animations */
.icon-container:nth-child(1):hover .icon-animation {
    animation: shake 0.5s ease;
}

.icon-container:nth-child(2):hover .icon-animation {
    animation: rotate 0.8s ease;
}

.icon-container:nth-child(3):hover .icon-animation {
    animation: wobble 0.8s ease;
}

.icon-container:nth-child(4):hover .icon-animation {
    animation: bounceIn 0.6s ease;
}

.icon-container:nth-child(5):hover .icon-animation {
    animation: tada 1s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

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

@keyframes wobble {
    0%, 100% { transform: translateX(0%); }
    15% { transform: translateX(-5%) rotate(-5deg); }
    30% { transform: translateX(4%) rotate(3deg); }
    45% { transform: translateX(-3%) rotate(-3deg); }
    60% { transform: translateX(2%) rotate(2deg); }
    75% { transform: translateX(-1%) rotate(-1deg); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes tada {
    0% { transform: scale(1); }
    10%, 20% { transform: scale(0.9) rotate(-3deg); }
    30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
    40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Reports Section Specific Styles */
#reports-section {
    min-height: auto !important;
}

/* Ensure all report items are visible for Franchisee users on mobile */
.franchisee-reports #reports-section .icon-container.visible {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Ensure the reports section container is visible */
.reports-section-container:not(.section-container-hidden) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
}

/* Hide View All button for Franchisee users in reports section */
body.franchisee-user #reports-view-all,
.franchisee-reports #reports-view-all {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Mobile-specific styles for reports section */
@media (max-width: 768px) {
    /* Ensure reports section is visible */
    .reports-section-container:not(.section-container-hidden) {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Show all report items on mobile for Franchisee users */
    body.franchisee-user #reports-section,
    .franchisee-reports #reports-section {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
        gap: 0.75rem !important;
    }
    
    /* Make sure all report items are visible */
    body.franchisee-user #reports-section .icon-container,
    .franchisee-reports #reports-section .icon-container {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        min-height: 80px !important;
    }
    
    /* Remove any hiding styles for mobile */
    body.franchisee-user #reports-section .icon-container:nth-child(n),
    .franchisee-reports #reports-section .icon-container:nth-child(n) {
        display: block !important;
    }
    
    /* Ensure section heading is visible */
    body.franchisee-user .reports-section-container h3,
    .franchisee-reports .reports-section-container h3 {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Hide View All button completely */
    body.franchisee-user #reports-view-all,
    .franchisee-reports #reports-view-all,
    body.franchisee-user .reports-section-container .view-all-container,
    .franchisee-reports .reports-section-container .view-all-container {
        display: none !important;
        height: 0 !important;
        width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
}

/* Additional styles for section containers */
.section-container-hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure regular sections work properly on mobile */
@media (max-width: 768px) {
    .section-icons {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.75rem;
    }
    
    /* Show only first 3 items in collapsed state for non-reports sections */
    .section-icons:not(.expanded) .icon-container.visible:nth-child(n+4) {
        display: none !important;
    }
    
    /* Show all items when expanded */
    .section-icons.expanded .icon-container.visible {
        display: block !important;
    }
    
    .balance-card {
        height: 180px;
    }
    
    .banner-content h3 {
        font-size: 1.25rem;
    }
    
    .banner-content p {
        font-size: 0.9rem;
    }
    
    .carousel-control {
        width: 35px;
        height: 35px;
    }
}

/* View All button styles */
.view-all-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.5rem;
}

.view-all-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.view-all-btn i {
    transition: transform 0.3s ease;
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

@media (max-width: 480px) {
    .section-icons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Franchisee reports should show all items */
    body.franchisee-user #reports-section,
    .franchisee-reports #reports-section {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .balance-card {
        height: 160px;
    }
    
    .banner-slide {
        padding: 0 1rem;
    }
    
    .banner-content h3 {
        font-size: 1.1rem;
    }
    
    .banner-content p {
        font-size: 0.8rem;
    }
    
    .carousel-control {
        width: 30px;
        height: 30px;
    }
    
    .animated-signin-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}

/* Force display for important elements */
.force-show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure no conflicting styles */
#reports-section,
.reports-section-container,
.reports-section-container .section-icons {
    min-height: auto !important;
}

/* Make sure report items have proper dimensions */
#reports-section .icon-container {
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Ensure consistent icon sizes */
#reports-section .icon-animation,
#reports-section .icon-circle {
    width: 40px;
    height: 40px;
}

/* Responsive text for labels */
#reports-section .icon-label {
    font-size: 0.8rem;
    text-align: center;
    margin-top: 0.5rem;
    line-height: 1.2;
}