/* Permission-based tile colors */
.dashboard-card.permission-admin {
    --primary-color: #dc3545;
    border-left: 4px solid #dc3545;
}

.dashboard-card.permission-admin .card-icon {
    color: #dc3545;
}

.dashboard-card.permission-admin::before {
    background: #dc3545;
}

.dashboard-card.permission-restricted {
    --primary-color: #fd7e14;
    border-left: 4px solid #fd7e14;
}

.dashboard-card.permission-restricted .card-icon {
    color: #fd7e14;
}

.dashboard-card.permission-restricted::before {
    background: #fd7e14;
}

.dashboard-card.permission-open {
    --primary-color: #0d6efd;
    border-left: 4px solid #0d6efd;
}

.dashboard-card.permission-open .card-icon {
    color: #0d6efd;
}

.dashboard-card.permission-open::before {
    background: #0d6efd;
}

/* Featured Image Styles for Announcements */
.announcement-featured-image {
    width: calc(100% + 2rem);
    /* Use aspect ratio to maintain 3:1 ratio for taller images */
    aspect-ratio: 3 / 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0;
    margin: -1rem -1rem 1rem -1rem;
    position: relative;
    overflow: hidden;
    min-height: 120px; /* Increased minimum height */
}

.announcement-featured-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    z-index: 1;
}

.announcement-featured-image.no-image {
    background: linear-gradient(135deg, #0d6efd 0%, #3d8bfd 50%, #6ea8fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-featured-image.no-image::before {
    display: none;
}

.announcement-featured-image.no-image .placeholder-icon {
    color: rgba(255, 255, 255, 0.8);
    font-size: 3rem;
    z-index: 2;
    position: relative;
}

/* Responsive adjustments for featured images */
@media (max-width: 768px) {
    .announcement-featured-image {
        border-radius: 8px;
        min-height: 140px; /* Taller on mobile */
        aspect-ratio: 2.5 / 1; /* Even taller aspect ratio on mobile */
    }
    
    .announcement-featured-image.no-image .placeholder-icon {
        font-size: 2.5rem; /* Larger icon for taller image */
    }
    
    /* View All Card - Tablet/Mobile */
    .view-all-card {
        width: 340px;
        height: 480px;
        padding: 1.5rem;
    }
    
    .view-all-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    .view-all-title {
        font-size: 1.35rem;
    }
    
    .view-all-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .announcement-featured-image {
        border-radius: 6px;
        min-height: 120px; /* Still taller on very small screens */
        aspect-ratio: 2.2 / 1; /* Maintain taller aspect ratio */
    }
    
    .announcement-featured-image.no-image .placeholder-icon {
        font-size: 2rem; /* Larger icon */
    }
    
    /* View All Card - Small Mobile */
    .view-all-card {
        width: 300px;
        height: 450px;
        padding: 1.25rem;
    }
    
    .view-all-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .view-all-title {
        font-size: 1.25rem;
    }
    
    .view-all-subtitle {
        font-size: 0.85rem;
    }
    
    .view-all-arrow {
        width: 36px;
        height: 36px;
    }
}

/* Dark theme adjustments for featured images */
[data-bs-theme="dark"] .announcement-featured-image::before {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15) 0%, rgba(13, 110, 253, 0.08) 100%);
}

[data-bs-theme="dark"] .announcement-featured-image.no-image {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 50%, #4338ca 100%);
}

/* Prevent modal scroll shift */
body {
    scrollbar-gutter: stable;
}

/* Alternative approach for browsers that don't support scrollbar-gutter */
html {
    overflow-y: scroll;
}

/* Ensure modal doesn't cause layout shift */
.modal-open {
    padding-right: 0 !important;
}

.modal-backdrop {
    --bs-backdrop-zindex: 1050;
}

/* Custom wider modal for announcements */
.modal-xl-custom {
    max-width: 1400px;
}

@media (max-width: 1450px) {
    .modal-xl-custom {
        max-width: 1200px;
    }
}

@media (max-width: 1250px) {
    .modal-xl-custom {
        max-width: 95%;
    }
}

/* Table borders in announcement modal content */
#announcementModalContent table {
    border-collapse: collapse;
}

#announcementModalContent table td,
#announcementModalContent table th {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
}

#announcementModalContent table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
}

[data-bs-theme="dark"] #announcementModalContent table td,
[data-bs-theme="dark"] #announcementModalContent table th {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] #announcementModalContent table thead th {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Dark theme adjustments for permission colors */
[data-bs-theme="dark"] .dashboard-card.permission-admin {
    border-left-color: #f87171;
}

[data-bs-theme="dark"] .dashboard-card.permission-admin .card-icon {
    color: #f87171;
}

[data-bs-theme="dark"] .dashboard-card.permission-admin::before {
    background: #f87171;
}

[data-bs-theme="dark"] .dashboard-card.permission-restricted {
    border-left-color: #fb923c;
}

[data-bs-theme="dark"] .dashboard-card.permission-restricted .card-icon {
    color: #fb923c;
}

[data-bs-theme="dark"] .dashboard-card.permission-restricted::before {
    background: #fb923c;
}

[data-bs-theme="dark"] .dashboard-card.permission-open {
    border-left-color: #60a5fa;
}

[data-bs-theme="dark"] .dashboard-card.permission-open .card-icon {
    color: #60a5fa;
}

[data-bs-theme="dark"] .dashboard-card.permission-open::before {
    background: #60a5fa;
}

/* ===== APPLE-STYLE ANNOUNCEMENT CARDS ===== */
.announcements-cards-container {
    width: 100%;
    position: relative;
}

.announcements-cards-wrapper {
    position: relative;
    overflow: visible;
}

/* Navigation Arrows for Announcement Cards */
.announcements-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
                0 1px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--bs-body-color);
    font-size: 1rem;
}

.announcements-nav-arrow:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-50%) scale(1.05);
}

.announcements-nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.announcements-nav-arrow.prev {
    left: -20px;
}

.announcements-nav-arrow.next {
    right: -20px;
}

.announcements-nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dark mode for nav arrows */
[data-bs-theme="dark"] .announcements-nav-arrow {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="dark"] .announcements-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.08);
}

.announcements-cards-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--bs-primary-rgb), 0.3) transparent;
    padding: 0.5rem 0 1rem 0;
}

/* Custom scrollbar for announcement cards */
.announcements-cards-scroll::-webkit-scrollbar {
    height: 8px;
}

.announcements-cards-scroll::-webkit-scrollbar-track {
    background: rgba(var(--bs-border-color-rgb), 0.1);
    border-radius: 4px;
}

.announcements-cards-scroll::-webkit-scrollbar-thumb {
    background: rgba(var(--bs-primary-rgb), 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.announcements-cards-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--bs-primary-rgb), 0.5);
}

/* Individual Announcement Card - Apple Style */
.announcement-card {
    flex: 0 0 auto;
    width: 380px;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 550px; /* Increased height to show more subtitle content */
}

.announcement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12),
                0 4px 8px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

.announcement-card:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1),
                0 2px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.1s ease;
}

/* Announcement Card Image */
.announcement-card-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    position: relative;
}

.announcement-card-image.no-image {
    background: linear-gradient(135deg, #0d6efd 0%, #3d8bfd 50%, #6ea8fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-card-image .placeholder-icon {
    color: rgba(255, 255, 255, 0.9);
    font-size: 2.5rem;
}

/* Announcement Card Content */
.announcement-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Category and New Badge Container */
.announcement-card-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

/* Category Badge */
.announcement-card-category {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

/* NEW Badge */
.announcement-card-new-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.15) 0%, rgba(255, 59, 48, 0.1) 100%);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.2);
    width: fit-content;
    animation: newBadgePulse 2s ease-in-out infinite;
}

@keyframes newBadgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 4px rgba(255, 59, 48, 0);
    }
}

.announcement-card-category.general {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.12) 0%, rgba(13, 110, 253, 0.08) 100%);
    color: #0d6efd;
}

.announcement-card-category.important {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.12) 0%, rgba(220, 53, 69, 0.08) 100%);
    color: #dc3545;
}

.announcement-card-category.update {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.12) 0%, rgba(25, 135, 84, 0.08) 100%);
    color: #198754;
}

.announcement-card-category.event {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.12) 0%, rgba(255, 193, 7, 0.08) 100%);
    color: #ffc107;
}

/* Card Title */
.announcement-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin-bottom: 1.25rem; /* Increased spacing to create breathing room after 2-line heading */
    line-height: 1.2;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem;
}

/* Card Subtitle */
.announcement-card-subtitle {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 0.75rem;
    margin-top: 0; /* Ensure it starts right after the title spacing */
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Increased from 2 to 4 lines to show more subtitle content */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer */
.announcement-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.announcement-card-date {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.announcement-card-arrow {
    color: #0d6efd;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.announcement-card:hover .announcement-card-arrow {
    transform: translateX(4px);
}

/* View All Announcements Card - CTA Style */
.view-all-card {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.view-all-card:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%) !important;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(13, 110, 253, 0.3),
                0 6px 16px rgba(13, 110, 253, 0.2) !important;
}

.view-all-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    color: white;
    width: 100%;
}

.view-all-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.25s ease;
}

.view-all-card:hover .view-all-icon {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.view-all-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.view-all-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.4;
    font-weight: 500;
}

.view-all-arrow {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-top: 0.5rem;
    transition: all 0.25s ease;
}

.view-all-card:hover .view-all-arrow {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

/* Dark Mode for Announcement Cards */
[data-bs-theme="dark"] .announcement-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .announcement-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5),
                0 4px 8px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .view-all-card {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
}

[data-bs-theme="dark"] .view-all-card:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%) !important;
}

[data-bs-theme="dark"] .announcement-card-title {
    color: rgba(255, 255, 255, 0.95);
}

[data-bs-theme="dark"] .announcement-card-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

[data-bs-theme="dark"] .announcement-card-date {
    color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .announcement-card-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .announcement-card-image.no-image {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 50%, #4338ca 100%);
}

[data-bs-theme="dark"] .announcement-card-new-badge {
    background: linear-gradient(135deg, rgba(255, 69, 58, 0.2) 0%, rgba(255, 69, 58, 0.15) 100%);
    color: #ff453a;
    border-color: rgba(255, 69, 58, 0.3);
}

[data-bs-theme="dark"] .announcements-cards-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .announcements-cards-scroll::-webkit-scrollbar-thumb {
    background: rgba(var(--bs-primary-rgb), 0.4);
}

[data-bs-theme="dark"] .announcements-cards-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--bs-primary-rgb), 0.6);
}

/* Responsive Cards */
@media (max-width: 768px) {
    .announcements-cards-scroll {
        padding: 0.5rem 16px 1rem 16px; /* Match metric cards horizontal padding */
    }
    
    .announcement-card {
        width: 340px; /* Match metric card width on mobile */
        height: 520px; /* Increased height to fit 4-line subtitle */
    }
    
    .announcement-card-image {
        height: 260px;
    }
    
    .announcement-card-body {
        padding: 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .announcement-card-title {
        font-size: 1.3rem;
        min-height: 2.6rem;
        margin-bottom: 1rem; /* Match desktop spacing */
    }
    
    .announcement-card-subtitle {
        -webkit-line-clamp: 4; /* Show 4 lines to match desktop */
        line-height: 1.5;
    }
    
    .announcements-nav-arrow.prev {
        left: -15px;
    }
    
    .announcements-nav-arrow.next {
        right: -15px;
    }
}

@media (max-width: 480px) {
    .announcements-cards-scroll {
        padding: 0.5rem 16px 1rem 16px; /* Match metric cards horizontal padding */
    }
    
    .announcement-card {
        width: 340px; /* Match metric card width even on very small screens */
        height: 480px; /* Increased height to fit more subtitle content */
    }
    
    .announcement-card-image {
        height: 240px; /* Adjusted to maintain proportions */
    }
    
    .announcement-card-body {
        padding: 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .announcement-card-title {
        font-size: 1.15rem;
        min-height: 2.3rem;
        margin-bottom: 1rem;
    }
    
    .announcement-card-subtitle {
        font-size: 0.85rem;
        -webkit-line-clamp: 3; /* Show 3 lines on very small screens */
        line-height: 1.5;
    }
    
    .announcement-card-new-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }
    
    .announcements-nav-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .announcements-nav-arrow.prev {
        left: -10px;
    }
    
    .announcements-nav-arrow.next {
        right: -10px;
    }
}

/* Announcements section height improvements */
.announcement-carousel {
    min-height: 200px; /* Reasonable minimum height */
    height: auto; /* Allow dynamic height based on content */
}

.carousel-item {
    padding: 0 !important; /* No padding to allow full-width images */
    min-height: 200px; /* Reasonable minimum height */
    height: auto !important; /* Allow dynamic height */
    display: flex !important;
    align-items: stretch !important; /* Stretch to fill available space */
}

/* Enhanced announcement styling */
.carousel-item h4 {
    font-family: 'Inter', sans-serif !important;
    letter-spacing: -0.02em !important;
}

/* Announcement content layout */
.announcement-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 200px !important;
}

.announcement-content .w-100 {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.announcement-header-section {
    flex-shrink: 0 !important; /* Don't shrink the header */
}

.announcement-footer {
    margin-top: auto !important; /* Push footer to bottom */
    flex-shrink: 0 !important; /* Don't shrink the footer */
    padding-top: 1rem !important;
}

.announcement-category {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
}

/* Dark theme support for blue titles */
[data-bs-theme="dark"] .carousel-item h4 {
    color: #60a5fa !important;
}

/* Permission colors for search results */
.search-result-item.permission-admin {
    border-left: 4px solid #dc3545;
}

.search-result-item.permission-admin .search-result-icon {
    color: #dc3545;
}

.search-result-item.permission-restricted {
    border-left: 4px solid #fd7e14;
}

.search-result-item.permission-restricted .search-result-icon {
    color: #fd7e14;
}

.search-result-item.permission-open {
    border-left: 4px solid #0d6efd;
}

.search-result-item.permission-open .search-result-icon {
    color: #0d6efd;
}

/* Dark theme for search result permission colors */
[data-bs-theme="dark"] .search-result-item.permission-admin {
    border-left-color: #f87171;
}

[data-bs-theme="dark"] .search-result-item.permission-admin .search-result-icon {
    color: #f87171;
}

[data-bs-theme="dark"] .search-result-item.permission-restricted {
    border-left-color: #fb923c;
}

[data-bs-theme="dark"] .search-result-item.permission-restricted .search-result-icon {
    color: #fb923c;
}

[data-bs-theme="dark"] .search-result-item.permission-open {
    border-left-color: #60a5fa;
}

[data-bs-theme="dark"] .search-result-item.permission-open .search-result-icon {
    color: #60a5fa;
}

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    --card-radius: 16px;
    --transition-speed: 0.3s;
}

/* Apply Inter font to headings */
h1, h2, h3, h4, h5, h6, 
.card-title, 
.category-header h2,
.announcement-title,
.carousel-item h5 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

[data-bs-theme="dark"] {
    --primary-color: #3d8bfd;
    --secondary-color: #adb5bd;
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    --bs-body-bg: #212529;
    --bs-body-color: #f8f9fa;
    color-scheme: dark;
}

[data-bs-theme="dark"] .dashboard-card {
    background: #2c3034;
    border-color: rgba(255, 255, 255, 0.05);
}

/* Removed duplicate - using unified dark mode styling */

[data-bs-theme="dark"] .vip-products-section {
    background: #2c3034;
    border-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #2c3034;
    --bs-table-color: #f8f9fa;
    --bs-table-border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .search-box input {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8f9fa;
}

[data-bs-theme="dark"] .search-box i {
    color: #adb5bd;
}

/* VIP Promotions Styling */
.promotion-header {
    transition: all 0.2s ease;
}

.promotion-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

[data-bs-theme="dark"] .promotion-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.expand-icon {
    transition: transform 0.3s ease;
}

.promotion-products {
    background-color: rgba(0, 0, 0, 0.01);
}

[data-bs-theme="dark"] .promotion-products {
    background-color: rgba(255, 255, 255, 0.02);
}

.promotion-products .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promotion-products .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .promotion-products .card {
    background-color: #343a40;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .promotion-products .card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Enhanced product card styling */
.promotion-product-card {
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.promotion-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--primary-color) !important;
}

.fw-mono {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.85em;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

[data-bs-theme="dark"] .fw-mono {
    background: rgba(255, 255, 255, 0.1);
}

.promotion-price {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-left: 3px solid #22c55e;
    padding: 0.5rem;
    border-radius: 0 6px 6px 0;
    margin-top: 0.5rem;
}

[data-bs-theme="dark"] .promotion-price {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
}

/* Compact product cards - D1 Blue Theme */
.compact-product-card {
    border: 1px solid rgba(13, 110, 253, 0.15) !important;
    height: auto;
    min-height: 90px;
    background: linear-gradient(135deg, #ffffff 0%, #fafcff 100%);
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.05);
    transition: all 0.3s ease;
}

.compact-product-card:hover {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.25) !important;
    transform: translateY(-1px);
}

.compact-product-card .product-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a365d;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 1.8em;
    margin-bottom: 0.375rem;
}

.compact-product-card .product-ean {
    font-size: 0.7rem;
    margin-bottom: 0.375rem;
    color: var(--bs-secondary);
}

.compact-product-card .promo-price {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Rebate styling - Modern with D1 accent */
.rebate-info {
    color: #b91c1c !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.1);
}

/* Pricing section styling */
.pricing-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.pricing-section .rrp-price {
    font-size: 0.75rem;
    line-height: 1;
    color: var(--bs-secondary);
}

.pricing-section .promo-price {
    font-size: 0.95rem;
    line-height: 1.2;
    font-weight: 700;
    color: #0d6efd;
}

.compact-product-card .fw-mono {
    font-size: 0.7rem;
    padding: 0.125rem 0.375rem;
    background: rgba(var(--bs-secondary-rgb), 0.1);
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Responsive adjustments for compact cards */
@media (max-width: 768px) {
    .compact-product-card {
        min-height: 100px;
    }
    
    .compact-product-card .product-name {
        font-size: 0.8rem;
        min-height: 2.2em;
    }
    
    .compact-product-card .product-ean {
        font-size: 0.7rem;
    }
    
    .compact-product-card .promo-price {
        font-size: 0.8rem; /* Same size as RRP for consistency */
    }
}

/* Modern VIP Container Styles - D1 Blue Theme */
.modern-vip-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* VIP Activation Header - ensure white font in dark mode */
[data-bs-theme="dark"] .vip-activation-header,
[data-bs-theme="dark"] .vip-activation-header .fa-trophy {
    color: #fff !important;
}

.modern-promotion-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 12px;
    border: 1px solid rgba(13, 110, 253, 0.15);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.08);
    transition: all 0.3s ease;
}

.modern-promotion-section:hover {
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.12);
    transform: translateY(-1px);
}

.promotion-header-modern {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #e7f0ff 0%, #f0f7ff 100%);
    border-bottom: 2px solid rgba(13, 110, 253, 0.1);
    position: relative;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.promotion-header-modern.active-promotion {
    background: linear-gradient(135deg, #e7f0ff 0%, #d6e9ff 100%);
    border-left: 5px solid #0d6efd;
    box-shadow: inset 0 1px 3px rgba(13, 110, 253, 0.1);
}

.promotion-header-modern.upcoming-promotion {
    background: linear-gradient(135deg, #fff7e6 0%, #fef3e2 100%);
    border-left: 5px solid #f59e0b;
    box-shadow: inset 0 1px 3px rgba(245, 158, 11, 0.1);
}

.promotion-header-modern.past-promotion {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #6c757d;
    box-shadow: inset 0 1px 3px rgba(108, 117, 125, 0.1);
}

[data-bs-theme="dark"] .promotion-header-modern {
    background: #343a40;
    color: #fff;
}

[data-bs-theme="dark"] .promotion-header-modern.active-promotion {
    background: #1e3a40;
    border-left-color: #0dcaf0;
}

[data-bs-theme="dark"] .promotion-header-modern.upcoming-promotion {
    background: #3d1a1e;
    border-left-color: #dc3545;
}

[data-bs-theme="dark"] .promotion-header-modern.past-promotion {
    background: #2d3436;
    border-left-color: #6c757d;
}

.promotion-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #0d6efd;
    text-shadow: 0 1px 2px rgba(13, 110, 253, 0.1);
}

.promotion-dates {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    text-align: right;
    flex-shrink: 0;
}

.store-dates, .warehouse-dates {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.promotion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bs-secondary);
}

.meta-item i {
    margin-right: 0.25rem;
    width: 12px;
}

.promotion-notes {
    background: rgba(var(--bs-info-rgb), 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border-left: 3px solid var(--bs-info);
    margin-top: 0.5rem;
}

.products-grid-container {
    padding: 0.75rem;
    background: var(--bs-body-bg);
}



/* Mobile responsive - Clean & Compact */
@media (max-width: 768px) {
    .modern-vip-container {
        gap: 0.5rem;
    }
    
    .modern-promotion-section {
        border-radius: 6px;
        margin: 0 -0.25rem;
    }
    
    .promotion-header-modern {
        padding: 0.625rem 0.75rem;
    }
    
    .promotion-name {
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
    
    .promotion-dates {
        text-align: left;
        align-self: stretch;
    }
    
    .store-dates, .warehouse-dates {
        justify-content: flex-start;
    }
    
    .products-grid-container {
        padding: 0.5rem;
    }
    
    .compact-product-card {
        min-height: 80px;
    }
    
    .compact-product-card .product-name {
        font-size: 0.75rem;
        min-height: 1.5em;
    }
    
    .compact-product-card .product-ean,
    .compact-product-card .fw-mono {
        font-size: 0.65rem;
    }
    
    .pricing-section .rrp-price,
    .pricing-section .promo-price {
        font-size: 0.75rem;
    }
    
    .rebate-info {
        font-size: 0.65rem !important;
        padding: 0.125rem 0.25rem;
    }
    
    .promotion-meta {
        gap: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .meta-item {
        font-size: 0.7rem;
    }
}

body {
    background-color: var(--bs-body-bg);
    transition: background-color var(--transition-speed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bs-body-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--bs-body-color-rgb), 0.05);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.dashboard-container {
    flex: 1;
    padding: 2rem 1rem;
    padding-top: 1.5rem;
}

.dashboard-grid {
    display: block;
}

.category-header {
    cursor: pointer;
    user-select: none;
}

.category-header h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.category-header h2 i.fa-folder,
.category-header h2 i.fa-star {
    display: none;
}

.category-header h2 i {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    transition: transform 0.3s;
    opacity: 0.7;
}

.category-header.collapsed h2 i {
    transform: rotate(-90deg);
}

.fa-user-chart:before {
    content: "\f6c0";
}

.dashboard-card {
    background: var(--bs-body-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.05);
    height: auto;
    min-height: 130px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin: 0.5rem 0;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 3.6em;
    padding: 0 0.5rem;
}

.card-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-right: 1.2rem;
    transition: transform var(--transition-speed);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: center;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1.2;
}

.card-description {
    display: -webkit-box;
    color: var(--secondary-color);
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    opacity: 0.8;
}

/* Ensure anchor cards keep text color */
a.dashboard-card {
    color: inherit;
    text-decoration: none;
}

a.dashboard-card:hover {
    color: inherit;
    text-decoration: none;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-speed);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card:hover .card-icon {
    transform: scale(1.1);
}

.coming-soon {
    opacity: 0.6;
    position: relative;
}

.coming-soon::after {
    content: 'Coming Soon';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-color);
    color: #000;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

.theme-toggle {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background-color: rgba(var(--bs-body-color-rgb), 0.1);
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    padding-left: 2.5rem;
    border-radius: 50px;
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.1);
    background-color: rgba(var(--bs-body-color-rgb), 0.03);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

/* Removed duplicate - using unified styling */

.carousel-item {
    padding: 1.5rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    z-index: 15;
}

.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(13, 110, 253, 0.3);
    border: none;
    margin: 0;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.carousel-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(13, 110, 253, 0.2);
    z-index: 10;
}

.carousel-progress-bar {
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    transition: width 0.1s linear;
}

.announcement-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.announcement-date {
    font-size: 0.875rem;
    color: var(--bs-secondary);
    margin-top: 0.5rem;
}

.nav-pills .nav-link {
    color: var(--secondary-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    font-weight: 500;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.favorite-star {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: var(--secondary-color);
    cursor: pointer;
    z-index: 10;
    font-size: 1rem;
    background: var(--bs-body-bg);
    padding: 2px;
    border-radius: 50%;
}

.favorite-star.active {
    color: var(--accent-color);
}

#favoritesSection {
    display: none;
}

#favoritesSection.has-favorites {
    display: block;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-container {
        padding: 1rem 0.5rem;  /* Further reduced container padding */
    }
    
    .card-icon {
        font-size: 2.25rem;
    }

    .nav-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .nav-pills .nav-link {
        white-space: nowrap;
    }
}

/* VIP Products Table Styles */
.vip-products-section {
    background: var(--bs-body-bg);
    border-radius: var(--card-radius);
    padding: 1rem;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.05);
    margin-bottom: 1.5rem;
    overflow: hidden; /* Ensure border radius is maintained */
}

.vip-products-section .table-responsive {
    margin: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vip-products-section .table {
    min-width: 800px; /* Ensure table has minimum width for scrolling */
    font-size: 0.85rem;
    margin-bottom: 0;
}

.vip-products-section h3 {
    font-size: 0.9rem;  /* Reduced from default */
    margin-bottom: 0.75rem;  /* Reduced spacing */
}

.vip-products-section .table th,
.vip-products-section .table td {
    padding: 0.5rem 0.75rem;  /* Reduced padding */
    vertical-align: middle;
    line-height: 1.2;  /* Tighter line height */
}

.vip-products-section .table th {
    font-weight: 600;
    background-color: rgba(var(--bs-body-color-rgb), 0.03);
    font-size: 0.8rem;  /* Even smaller font for headers */
    text-transform: uppercase;  /* Make headers distinct */
    letter-spacing: 0.5px;
}

/* Make the Add Product button smaller */
#addVipProductBtn {
    padding: 0.25rem 0.5rem;  /* Smaller padding */
    font-size: 0.8rem;  /* Smaller font */
}

#addVipProductBtn i {
    font-size: 0.75rem;  /* Smaller icon */
}

/* Style for action buttons in table */
.vip-products-section .table .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Add subtle hover effect */
.vip-products-section .table tbody tr:hover {
    background-color: rgba(var(--bs-body-color-rgb), 0.02);
}

.notice-board-section h2 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.table th {
    font-weight: 600;
    background-color: rgba(var(--bs-body-color-rgb), 0.03);
}

.table td, .table th {
    padding: 1rem;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .vip-products-section {
        padding: 0.5rem;  /* Reduced padding */
        margin: 0 -0.5rem 1rem -0.5rem;  /* Negative margin for full bleed */
        width: calc(100% + 1rem);  /* Compensate for negative margins */
        border-radius: 8px;  /* Smaller border radius */
        border-left: none;
        border-right: none;
    }

    .vip-products-section .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;  /* Negative margin for full width */
        padding: 0;
        border-radius: 0;
    }

    .dashboard-card {
        padding: 1rem;  /* Reduced padding */
        margin: 0.25rem 0;  /* Reduced vertical spacing */
        min-height: 100px;  /* Smaller minimum height */
    }

    /* Adjust card grid spacing */
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 0.5rem;
    }

    .col-md-6 {
        padding: 0 0.25rem;  /* Further reduced card padding */
    }
}

/* Adjust grid spacing */
.row.g-4 {
    --bs-gutter-y: 1rem !important;
}

/* Adjust category spacing */
.category-section {
    margin-bottom: 1.5rem !important;
}

.category-header {
    margin-bottom: 0.5rem !important;
}

/* Responsive card layout */
@media (min-width: 1200px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 25%; /* 4 across on large screens */
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 50%; /* 2 across on tablets */
    }
    
    /* Tablet-specific optimizations */
    .dashboard-container {
        padding: 1.5rem 1rem;
    }
    
    .dashboard-card {
        padding: 1.25rem;
        min-height: 120px;
    }
    
    .card-icon {
        font-size: 2rem;
        margin-right: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .card-description {
        font-size: 0.8rem;
    }
    
    /* VIP Products section tablet optimization */
    .vip-products-section {
        padding: 1rem;
    }
    
    .vip-products-section .table {
        font-size: 0.9rem;
    }
    
    .vip-products-section .table th,
    .vip-products-section .table td {
        padding: 0.6rem 0.8rem;
    }
    
    /* Search box tablet optimization */
    .search-box input {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        font-size: 1rem;
    }
    
    /* Category headers tablet optimization */
    .category-header h2 {
        font-size: 1.1rem;
    }
    
    /* Announcement carousel tablet optimization */
    .carousel-item {
        padding: 1.25rem;
    }
}

@media (max-width: 767px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 100%; /* 1 across on mobile */
    }
}

/* Make Favorites header consistent with other categories */
#favoritesSection .category-header h2 {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem 0.5rem;  /* Further reduced container padding */
    }

    /* Welcome section mobile optimization */
    .display-5 {
        font-size: 1.5rem !important;  /* Smaller welcome heading */
        line-height: 1.3;
    }

    .lead {
        font-size: 0.9rem !important;  /* Smaller lead text */
        margin-bottom: 1rem;
    }

    /* Announcements section mobile optimization */
    .notice-board-section {
        margin-bottom: 1rem;  /* Reduced section spacing */
    }

    .notice-board-section h2 {
        font-size: 1.1rem;  /* Slightly smaller heading */
        margin-bottom: 0.75rem;
    }

    /* Carousel mobile adjustments */
    .carousel-item {
        padding: 1rem;  /* Reduced padding */
    }

    /* VIP Products section mobile optimizations */
    .vip-products-section {
        padding: 0.5rem;  /* Reduced padding */
        margin: 0 -0.5rem 1rem -0.5rem;  /* Negative margin for full bleed */
        width: calc(100% + 1rem);  /* Compensate for negative margins */
        border-radius: 8px;  /* Smaller border radius */
        border-left: none;
        border-right: none;
    }

    .vip-products-section h3 {
        font-size: 1rem !important;  /* Smaller heading */
        margin-bottom: 0.5rem;
    }

    /* VIP header controls mobile layout */
    .vip-products-section .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch !important;
    }

    .vip-products-section .d-flex.gap-2 {
        justify-content: space-between;
        align-items: center;
    }

    /* VIP toggle buttons mobile optimization */
    .btn-group .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    #addVipProductBtn {
        padding: 0.25rem 0.75rem !important;
        font-size: 0.75rem !important;
        white-space: nowrap;
    }

    /* Table mobile optimizations */
    .vip-products-section .table-responsive {
        margin: 0 -0.5rem;  /* Negative margin for full width */
        padding: 0;
        border-radius: 0;
    }

    .vip-products-section .table {
        min-width: 100%;  /* Allow table to be full width on mobile */
        font-size: 0.75rem;  /* Smaller font */
        margin-bottom: 0;
    }

    .vip-products-section .table th,
    .vip-products-section .table td {
        padding: 0.4rem 0.3rem;  /* Much more compact padding */
        font-size: 0.7rem;  /* Smaller font on mobile */
        line-height: 1.1;
        vertical-align: top;
    }

    .vip-products-section .table th {
        font-size: 0.65rem;  /* Even smaller headers */
        font-weight: 700;
        background-color: rgba(var(--bs-body-color-rgb), 0.05);
    }

    /* Product name column optimization */
    .vip-products-section .table td:nth-child(2) {
        max-width: 150px;  /* Limit product name width */
        word-wrap: break-word;
        hyphens: auto;
    }

    /* Date columns optimization */
    .vip-products-section .table td:nth-child(3),
    .vip-products-section .table td:nth-child(4) {
        min-width: 70px;
        font-size: 0.65rem;
        white-space: nowrap;
    }

    /* Status indicator mobile optimization */
    .vip-status-indicator {
        padding: 0.15rem 0.4rem;
        font-size: 0.6rem;
        margin-top: 0.2rem;
        display: block;
        width: fit-content;
    }

    /* Search box mobile optimization */
    .search-box {
        margin-bottom: 1rem;
    }

    .search-box input {
        padding: 0.5rem 1rem 0.5rem 2rem;  /* Adjusted padding */
        font-size: 0.85rem;  /* Smaller font */
    }

    .search-box i {
        left: 0.75rem;
        font-size: 0.8rem;
    }

    /* Dashboard cards mobile optimization */
    .dashboard-card {
        padding: 1rem;  /* Reduced padding */
        margin: 0.25rem 0;  /* Reduced vertical spacing */
        min-height: 100px;  /* Smaller minimum height */
    }

    .card-icon {
        font-size: 1.5rem;  /* Smaller icons */
        margin-right: 1rem;
    }

    .card-title {
        font-size: 1.1rem;  /* Smaller title */
    }

    .card-description {
        font-size: 0.75rem;  /* Smaller description */
    }

    /* Grid layout optimization */
    .col-md-6 {
        padding: 0 0.25rem;  /* Further reduced card padding */
    }

    .row.g-4 {
        margin: 0 -0.25rem;  /* Compensate for reduced padding */
        --bs-gutter-y: 0.5rem !important;
    }

    /* Category headers mobile optimization */
    .category-header h2 {
        font-size: 0.85rem;
        padding-bottom: 0.3rem;
        margin-bottom: 0.3rem;
    }

    /* Favorites section mobile optimization */
    #favoritesSection .category-header h2 {
        font-size: 0.85rem;
    }

    /* Modal optimization for mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-header {
        padding: 0.75rem 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
    }

    /* Form controls mobile optimization */
    .form-control,
    .form-select {
        font-size: 0.9rem;
    }

    /* Button mobile optimization */
    .btn {
        font-size: 0.85rem;
    }

    .btn-sm {
        font-size: 0.75rem;
    }

    /* Toast container mobile positioning */
    .toast-container {
        bottom: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        width: auto !important;
    }

    .toast {
        width: 100%;
    }
}

/* Extra small devices optimization */
@media (max-width: 576px) {
    .dashboard-container {
        padding: 0.75rem 0.25rem;
    }

    .display-5 {
        font-size: 1.3rem !important;
    }

    .vip-products-section {
        margin: 0 -0.25rem 1rem -0.25rem;
        width: calc(100% + 0.5rem);
        border-radius: 0;
    }

    .vip-products-section .table th,
    .vip-products-section .table td {
        padding: 0.3rem 0.2rem;
        font-size: 0.65rem;
    }

    .vip-products-section .table th {
        font-size: 0.6rem;
    }

    /* Stack VIP controls vertically on very small screens */
    .btn-group {
        width: 100%;
    }

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

    /* Ensure single column on very small screens */
    .col-md-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* Enhanced animations */
.d1-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
    animation: slideDown 0.3s ease-out;
}

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

/* VIP Products row styling for clickable rows */
.vip-product-row {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.vip-product-row:hover {
    border-left-color: var(--bs-primary);
    /* transform: translateX(2px); - Removed to prevent scroll issues */
}

/* Product info card styling */
.product-info-card {
    background: var(--bs-light);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .product-info-card {
    background: var(--bs-dark);
}

/* Modal button styling */
#vipProductActionsModal .btn {
    border-radius: 8px;
}

/* Table hover effect for admin users - Simplified to prevent scroll issues */
.table tbody .vip-product-row:hover td {
    background-color: rgba(var(--bs-primary-rgb), 0.03) !important;
}

/* VIP View Toggle Buttons */
.btn-group .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

.btn-group .btn.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.btn-group .btn-outline-secondary:hover {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: white;
}

/* Ensure VIP buttons have consistent sizing and spacing */
.vip-products-section .d-flex.gap-2 {
    gap: 0.75rem !important; /* Consistent spacing between button groups */
}

.vip-products-section .btn-group {
    margin-right: 0.5rem; /* Space between button group and manage button */
}

/* VIP buttons - Modern D1 Blue styling */
#vipPastBtn, #vipFutureBtn, #vipActiveBtn {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    border-radius: 8px !important;
    height: auto !important;
    min-height: 36px !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent !important;
}

#vipActiveBtn {
    background: linear-gradient(135deg, #0d6efd 0%, #2563eb 100%) !important;
    border-color: #0d6efd !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25) !important;
}

#vipActiveBtn:hover {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.35) !important;
    transform: translateY(-1px) !important;
}

#vipPastBtn, #vipFutureBtn {
    background: rgba(13, 110, 253, 0.05) !important;
    border-color: rgba(13, 110, 253, 0.2) !important;
    color: #0d6efd !important;
}

#vipPastBtn:hover, #vipFutureBtn:hover {
    background: rgba(13, 110, 253, 0.1) !important;
    border-color: #0d6efd !important;
    transform: translateY(-1px) !important;
}

/* Manage Promotions button - Enhanced */
.vip-products-section .btn-outline-primary {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    border-radius: 8px !important;
    height: auto !important;
    min-height: 36px !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
    border: 2px solid #0d6efd !important;
    color: #0d6efd !important;
    transition: all 0.3s ease !important;
}

.vip-products-section .btn-outline-primary:hover {
    background: #0d6efd !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* Mobile responsive adjustments for VIP buttons */
@media (max-width: 768px) {
    .vip-products-section .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    .vip-products-section .d-flex.gap-2 {
        align-self: stretch !important;
        justify-content: space-between !important;
    }
    
    .vip-products-section .btn-group {
        margin-right: 0 !important;
        flex: 1 !important;
    }
    
    .vip-products-section .btn-outline-primary {
        flex: 0 0 auto !important;
        min-width: 140px !important;
    }
}

/* VIP Products section status indicators */
.vip-status-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.vip-status-past {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
    border: 1px solid rgba(var(--bs-danger-rgb), 0.3);
}

.vip-status-future {
    background-color: rgba(var(--bs-info-rgb), 0.1);
    color: var(--bs-info);
    border: 1px solid rgba(var(--bs-info-rgb), 0.3);
}

.vip-status-active {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
    border: 1px solid rgba(var(--bs-success-rgb), 0.3);
}

/* Rebates section styling for privileged users */
.rebates-section {
    background: rgba(var(--bs-warning-rgb), 0.1);
    border: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.rebates-section label {
    color: var(--bs-warning-text);
    font-weight: 600;
}

.rebates-section .form-control {
    border-color: rgba(var(--bs-warning-rgb), 0.3);
}

.rebates-section .form-control:focus {
    border-color: var(--bs-warning);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-warning-rgb), 0.25);
}

/* Rebates content formatting styles */
.rebates-content ul {
    margin: 0.5rem 0;
    padding-left: 1.2rem;
}

.rebates-content li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.rebates-content strong {
    color: var(--bs-warning-text);
    font-weight: 700;
}

.rebates-content br {
    line-height: 1.6;
}

/* Quill Editor Styling */
.rebates-section .ql-editor {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 12px;
}

.rebates-section .ql-toolbar {
    border-top: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-left: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-right: 1px solid rgba(var(--bs-warning-rgb), 0.3);
}

.rebates-section .ql-container {
    border-bottom: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-left: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-right: 1px solid rgba(var(--bs-warning-rgb), 0.3);
}

.rebates-section .ql-editor.ql-blank::before {
    color: var(--bs-secondary);
    font-style: italic;
}

/* Dark theme support for Quill */
[data-bs-theme="dark"] .rebates-section .ql-toolbar {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .rebates-section .ql-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .rebates-section .ql-editor {
    background-color: rgba(255, 255, 255, 0.05);
    color: #f8f9fa;
}

/* Enhanced Announcement Popup Styling */
#newAnnouncementPopup {
    --announcement-primary: #0d6efd;
    --announcement-gradient-start: #0d6efd;
    --announcement-gradient-end: #4a90e2;
    --announcement-accent: #0052cc;
    --announcement-shadow: 0 25px 80px rgba(13, 110, 253, 0.15);
    --announcement-radius: 24px;
    --announcement-content-bg: #ffffff;
    --announcement-text: #1a1a1a;
    --announcement-border: rgba(13, 110, 253, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#newAnnouncementPopup .modal-dialog {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(-50px);
    max-width: 600px;
}

#newAnnouncementPopup.show .modal-dialog {
    transform: translateY(0);
}

#newAnnouncementPopup .modal-content {
    border: none;
    border-radius: var(--announcement-radius);
    box-shadow: var(--announcement-shadow);
    overflow: hidden;
    background: var(--announcement-content-bg);
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#newAnnouncementPopup .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--announcement-gradient-start), var(--announcement-gradient-end), #8e44ad, #e74c3c);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#newAnnouncementPopup .modal-header {
    border-bottom: none;
    padding: 2.5rem 2.5rem 1.5rem;
    background: linear-gradient(135deg, var(--announcement-gradient-start) 0%, var(--announcement-gradient-end) 100%);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

#newAnnouncementPopup .modal-header::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

#newAnnouncementPopup .modal-header .fas.fa-bullhorn {
    font-size: 2rem;
    margin-right: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

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

#newAnnouncementPopup .modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

#newAnnouncementPopup .modal-header small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
}

#newAnnouncementPopup .modal-body {
    padding: 2rem 2.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--announcement-text);
    background: var(--announcement-content-bg);
}

#newAnnouncementPopup .modal-footer {
    border-top: 1px solid var(--announcement-border);
    padding: 2rem 2.5rem;
    background: linear-gradient(to bottom, transparent, rgba(13, 110, 253, 0.02));
    justify-content: center;
}

#newAnnouncementPopup .announcement-content {
    max-height: 450px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--announcement-primary) transparent;
}

#newAnnouncementPopup .announcement-content::-webkit-scrollbar {
    width: 6px;
}

#newAnnouncementPopup .announcement-content::-webkit-scrollbar-track {
    background: transparent;
}

#newAnnouncementPopup .announcement-content::-webkit-scrollbar-thumb {
    background: var(--announcement-primary);
    border-radius: 3px;
}

#newAnnouncementPopup .announcement-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#newAnnouncementPopup .announcement-content h1,
#newAnnouncementPopup .announcement-content h2,
#newAnnouncementPopup .announcement-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--announcement-accent);
    font-weight: 700;
    line-height: 1.3;
}

#newAnnouncementPopup .announcement-content h1 {
    font-size: 1.5rem;
}

#newAnnouncementPopup .announcement-content h2 {
    font-size: 1.3rem;
}

#newAnnouncementPopup .announcement-content h3 {
    font-size: 1.1rem;
}

#newAnnouncementPopup .announcement-content p {
    margin-bottom: 1.2rem;
    color: var(--announcement-text);
}

#newAnnouncementPopup .announcement-content ul,
#newAnnouncementPopup .announcement-content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

#newAnnouncementPopup .announcement-content li {
    margin-bottom: 0.5rem;
    color: var(--announcement-text);
}

#newAnnouncementPopup .announcement-content blockquote {
    border-left: 4px solid var(--announcement-primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 0 8px 8px 0;
    padding: 1rem;
}

#newAnnouncementPopup .announcement-content code {
    background: rgba(13, 110, 253, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: var(--announcement-accent);
}

#newAnnouncementPopup .announcement-content pre {
    background: rgba(13, 110, 253, 0.05);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border-left: 4px solid var(--announcement-primary);
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn {
    background: linear-gradient(135deg, var(--announcement-gradient-start), var(--announcement-gradient-end));
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn:hover::before {
    left: 100%;
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(13, 110, 253, 0.4);
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.3);
}

/* Dark theme support for enhanced popup */
[data-bs-theme="dark"] #newAnnouncementPopup {
    --announcement-content-bg: #2c3034;
    --announcement-text: #f8f9fa;
    --announcement-border: rgba(255, 255, 255, 0.1);
    --announcement-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] #newAnnouncementPopup .modal-footer {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.02));
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] #newAnnouncementPopup .announcement-content blockquote {
    background: rgba(13, 110, 253, 0.1);
    color: #f8f9fa;
}

[data-bs-theme="dark"] #newAnnouncementPopup .announcement-content code {
    background: rgba(13, 110, 253, 0.15);
    color: #4a90e2;
}

[data-bs-theme="dark"] #newAnnouncementPopup .announcement-content pre {
    background: rgba(13, 110, 253, 0.1);
    color: #f8f9fa;
}

[data-bs-theme="dark"] #newAnnouncementPopup .category-badge {
    background: rgba(44, 48, 52, 0.9);
    color: #4a90e2;
}

/* Responsive design */
@media (max-width: 768px) {
    #newAnnouncementPopup .modal-dialog {
        margin: 1rem;
        max-width: none;
    }
    
    #newAnnouncementPopup .modal-header,
    #newAnnouncementPopup .modal-body,
    #newAnnouncementPopup .modal-footer {
        padding: 1.5rem;
    }
    
    #newAnnouncementPopup .modal-title {
        font-size: 1.5rem;
    }
    
    #newAnnouncementPopup .modal-header .fas.fa-bullhorn {
        font-size: 1.5rem;
    }
    
    #newAnnouncementPopup .priority-badge,
    #newAnnouncementPopup .category-badge {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin: 0.5rem 0;
        display: inline-block;
    }
}

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    --card-radius: 16px;
    --transition-speed: 0.3s;
}

/* Apply Inter font to headings */
h1, h2, h3, h4, h5, h6, 
.card-title, 
.category-header h2,
.announcement-title,
.carousel-item h5 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

[data-bs-theme="dark"] {
    --primary-color: #3d8bfd;
    --secondary-color: #adb5bd;
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    --bs-body-bg: #212529;
    --bs-body-color: #f8f9fa;
    color-scheme: dark;
}

[data-bs-theme="dark"] .dashboard-card {
    background: #2c3034;
    border-color: rgba(255, 255, 255, 0.05);
}

/* Removed duplicate - using unified dark mode styling */

[data-bs-theme="dark"] .vip-products-section {
    background: #2c3034;
    border-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #2c3034;
    --bs-table-color: #f8f9fa;
    --bs-table-border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .search-box input {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8f9fa;
}

[data-bs-theme="dark"] .search-box i {
    color: #adb5bd;
}

/* VIP Promotions Styling */
.promotion-header {
    transition: all 0.2s ease;
}

.promotion-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

[data-bs-theme="dark"] .promotion-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.expand-icon {
    transition: transform 0.3s ease;
}

.promotion-products {
    background-color: rgba(0, 0, 0, 0.01);
}

[data-bs-theme="dark"] .promotion-products {
    background-color: rgba(255, 255, 255, 0.02);
}

.promotion-products .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promotion-products .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .promotion-products .card {
    background-color: #343a40;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .promotion-products .card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Enhanced product card styling */
.promotion-product-card {
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.promotion-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--primary-color) !important;
}

.fw-mono {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.85em;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

[data-bs-theme="dark"] .fw-mono {
    background: rgba(255, 255, 255, 0.1);
}

.promotion-price {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-left: 3px solid #22c55e;
    padding: 0.5rem;
    border-radius: 0 6px 6px 0;
    margin-top: 0.5rem;
}

[data-bs-theme="dark"] .promotion-price {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
}

/* Compact product cards - D1 Blue Theme */
.compact-product-card {
    border: 1px solid rgba(13, 110, 253, 0.15) !important;
    height: auto;
    min-height: 90px;
    background: linear-gradient(135deg, #ffffff 0%, #fafcff 100%);
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.05);
    transition: all 0.3s ease;
}

.compact-product-card:hover {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.25) !important;
    transform: translateY(-1px);
}

.compact-product-card .product-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a365d;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 1.8em;
    margin-bottom: 0.375rem;
}

.compact-product-card .product-ean {
    font-size: 0.7rem;
    margin-bottom: 0.375rem;
    color: var(--bs-secondary);
}

.compact-product-card .promo-price {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Rebate styling - Modern with D1 accent */
.rebate-info {
    color: #b91c1c !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.1);
}

/* Pricing section styling */
.pricing-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.pricing-section .rrp-price {
    font-size: 0.75rem;
    line-height: 1;
    color: var(--bs-secondary);
}

.pricing-section .promo-price {
    font-size: 0.95rem;
    line-height: 1.2;
    font-weight: 700;
    color: #0d6efd;
}

.compact-product-card .fw-mono {
    font-size: 0.7rem;
    padding: 0.125rem 0.375rem;
    background: rgba(var(--bs-secondary-rgb), 0.1);
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Responsive adjustments for compact cards */
@media (max-width: 768px) {
    .compact-product-card {
        min-height: 100px;
    }
    
    .compact-product-card .product-name {
        font-size: 0.8rem;
        min-height: 2.2em;
    }
    
    .compact-product-card .product-ean {
        font-size: 0.7rem;
    }
    
    .compact-product-card .promo-price {
        font-size: 0.8rem; /* Same size as RRP for consistency */
    }
}

/* Modern VIP Container Styles - D1 Blue Theme */
.modern-vip-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* VIP Activation Header - ensure white font in dark mode */
[data-bs-theme="dark"] .vip-activation-header,
[data-bs-theme="dark"] .vip-activation-header .fa-trophy {
    color: #fff !important;
}

.modern-promotion-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 12px;
    border: 1px solid rgba(13, 110, 253, 0.15);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.08);
    transition: all 0.3s ease;
}

.modern-promotion-section:hover {
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.12);
    transform: translateY(-1px);
}

.promotion-header-modern {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #e7f0ff 0%, #f0f7ff 100%);
    border-bottom: 2px solid rgba(13, 110, 253, 0.1);
    position: relative;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.promotion-header-modern.active-promotion {
    background: linear-gradient(135deg, #e7f0ff 0%, #d6e9ff 100%);
    border-left: 5px solid #0d6efd;
    box-shadow: inset 0 1px 3px rgba(13, 110, 253, 0.1);
}

.promotion-header-modern.upcoming-promotion {
    background: linear-gradient(135deg, #fff7e6 0%, #fef3e2 100%);
    border-left: 5px solid #f59e0b;
    box-shadow: inset 0 1px 3px rgba(245, 158, 11, 0.1);
}

.promotion-header-modern.past-promotion {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #6c757d;
    box-shadow: inset 0 1px 3px rgba(108, 117, 125, 0.1);
}

[data-bs-theme="dark"] .promotion-header-modern {
    background: #343a40;
    color: #fff;
}

[data-bs-theme="dark"] .promotion-header-modern.active-promotion {
    background: #1e3a40;
    border-left-color: #0dcaf0;
}

[data-bs-theme="dark"] .promotion-header-modern.upcoming-promotion {
    background: #3d1a1e;
    border-left-color: #dc3545;
}

[data-bs-theme="dark"] .promotion-header-modern.past-promotion {
    background: #2d3436;
    border-left-color: #6c757d;
}

.promotion-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #0d6efd;
    text-shadow: 0 1px 2px rgba(13, 110, 253, 0.1);
}

.promotion-dates {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    text-align: right;
    flex-shrink: 0;
}

.store-dates, .warehouse-dates {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.promotion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bs-secondary);
}

.meta-item i {
    margin-right: 0.25rem;
    width: 12px;
}

.promotion-notes {
    background: rgba(var(--bs-info-rgb), 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border-left: 3px solid var(--bs-info);
    margin-top: 0.5rem;
}

.products-grid-container {
    padding: 0.75rem;
    background: var(--bs-body-bg);
}



/* Mobile responsive - Clean & Compact */
@media (max-width: 768px) {
    .modern-vip-container {
        gap: 0.5rem;
    }
    
    .modern-promotion-section {
        border-radius: 6px;
        margin: 0 -0.25rem;
    }
    
    .promotion-header-modern {
        padding: 0.625rem 0.75rem;
    }
    
    .promotion-name {
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
    
    .promotion-dates {
        text-align: left;
        align-self: stretch;
    }
    
    .store-dates, .warehouse-dates {
        justify-content: flex-start;
    }
    
    .products-grid-container {
        padding: 0.5rem;
    }
    
    .compact-product-card {
        min-height: 80px;
    }
    
    .compact-product-card .product-name {
        font-size: 0.75rem;
        min-height: 1.5em;
    }
    
    .compact-product-card .product-ean,
    .compact-product-card .fw-mono {
        font-size: 0.65rem;
    }
    
    .pricing-section .rrp-price,
    .pricing-section .promo-price {
        font-size: 0.75rem;
    }
    
    .rebate-info {
        font-size: 0.65rem !important;
        padding: 0.125rem 0.25rem;
    }
    
    .promotion-meta {
        gap: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .meta-item {
        font-size: 0.7rem;
    }
}

body {
    background-color: var(--bs-body-bg);
    transition: background-color var(--transition-speed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bs-body-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--bs-body-color-rgb), 0.05);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.dashboard-container {
    flex: 1;
    padding: 2rem 1rem;
    padding-top: 1.5rem;
}

.dashboard-grid {
    display: block;
}

.category-header {
    cursor: pointer;
    user-select: none;
}

.category-header h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.category-header h2 i.fa-folder,
.category-header h2 i.fa-star {
    display: none;
}

.category-header h2 i {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    transition: transform 0.3s;
    opacity: 0.7;
}

.category-header.collapsed h2 i {
    transform: rotate(-90deg);
}

.fa-user-chart:before {
    content: "\f6c0";
}

.dashboard-card {
    background: var(--bs-body-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.05);
    height: auto;
    min-height: 130px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin: 0.5rem 0;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 3.6em;
    padding: 0 0.5rem;
}

.card-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-right: 1.2rem;
    transition: transform var(--transition-speed);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: center;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1.2;
}

.card-description {
    display: -webkit-box;
    color: var(--secondary-color);
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    opacity: 0.8;
}

/* Ensure anchor cards keep text color */
a.dashboard-card {
    color: inherit;
    text-decoration: none;
}

a.dashboard-card:hover {
    color: inherit;
    text-decoration: none;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-speed);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card:hover .card-icon {
    transform: scale(1.1);
}

.coming-soon {
    opacity: 0.6;
    position: relative;
}

.coming-soon::after {
    content: 'Coming Soon';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-color);
    color: #000;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

.theme-toggle {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background-color: rgba(var(--bs-body-color-rgb), 0.1);
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    padding-left: 2.5rem;
    border-radius: 50px;
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.1);
    background-color: rgba(var(--bs-body-color-rgb), 0.03);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

/* Removed duplicate - using unified styling */

.carousel-item {
    padding: 1.5rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    z-index: 15;
}

.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(13, 110, 253, 0.3);
    border: none;
    margin: 0;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.carousel-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(13, 110, 253, 0.2);
    z-index: 10;
}

.carousel-progress-bar {
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    transition: width 0.1s linear;
}

.announcement-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.announcement-date {
    font-size: 0.875rem;
    color: var(--bs-secondary);
    margin-top: 0.5rem;
}

.nav-pills .nav-link {
    color: var(--secondary-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    font-weight: 500;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.favorite-star {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: var(--secondary-color);
    cursor: pointer;
    z-index: 10;
    font-size: 1rem;
    background: var(--bs-body-bg);
    padding: 2px;
    border-radius: 50%;
}

.favorite-star.active {
    color: var(--accent-color);
}

#favoritesSection {
    display: none;
}

#favoritesSection.has-favorites {
    display: block;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-container {
        padding: 1rem 0.5rem;  /* Further reduced container padding */
    }
    
    .card-icon {
        font-size: 2.25rem;
    }

    .nav-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .nav-pills .nav-link {
        white-space: nowrap;
    }
}

/* VIP Products Table Styles */
.vip-products-section {
    background: var(--bs-body-bg);
    border-radius: var(--card-radius);
    padding: 1rem;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.05);
    margin-bottom: 1.5rem;
    overflow: hidden; /* Ensure border radius is maintained */
}

.vip-products-section .table-responsive {
    margin: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vip-products-section .table {
    min-width: 800px; /* Ensure table has minimum width for scrolling */
    font-size: 0.85rem;
    margin-bottom: 0;
}

.vip-products-section h3 {
    font-size: 0.9rem;  /* Reduced from default */
    margin-bottom: 0.75rem;  /* Reduced spacing */
}

.vip-products-section .table th,
.vip-products-section .table td {
    padding: 0.5rem 0.75rem;  /* Reduced padding */
    vertical-align: middle;
    line-height: 1.2;  /* Tighter line height */
}

.vip-products-section .table th {
    font-weight: 600;
    background-color: rgba(var(--bs-body-color-rgb), 0.03);
    font-size: 0.8rem;  /* Even smaller font for headers */
    text-transform: uppercase;  /* Make headers distinct */
    letter-spacing: 0.5px;
}

/* Make the Add Product button smaller */
#addVipProductBtn {
    padding: 0.25rem 0.5rem;  /* Smaller padding */
    font-size: 0.8rem;  /* Smaller font */
}

#addVipProductBtn i {
    font-size: 0.75rem;  /* Smaller icon */
}

/* Style for action buttons in table */
.vip-products-section .table .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Add subtle hover effect */
.vip-products-section .table tbody tr:hover {
    background-color: rgba(var(--bs-body-color-rgb), 0.02);
}

.notice-board-section h2 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.table th {
    font-weight: 600;
    background-color: rgba(var(--bs-body-color-rgb), 0.03);
}

.table td, .table th {
    padding: 1rem;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .vip-products-section {
        padding: 0.5rem;  /* Reduced padding */
        margin: 0 -0.5rem 1rem -0.5rem;  /* Negative margin for full bleed */
        width: calc(100% + 1rem);  /* Compensate for negative margins */
        border-radius: 8px;  /* Smaller border radius */
        border-left: none;
        border-right: none;
    }

    .vip-products-section .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;  /* Negative margin for full width */
        padding: 0;
        border-radius: 0;
    }

    .dashboard-card {
        padding: 1rem;  /* Reduced padding */
        margin: 0.25rem 0;  /* Reduced vertical spacing */
        min-height: 100px;  /* Smaller minimum height */
    }

    /* Adjust card grid spacing */
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 0.5rem;
    }

    .col-md-6 {
        padding: 0 0.25rem;  /* Further reduced card padding */
    }
}

/* Adjust grid spacing */
.row.g-4 {
    --bs-gutter-y: 1rem !important;
}

/* Adjust category spacing */
.category-section {
    margin-bottom: 1.5rem !important;
}

.category-header {
    margin-bottom: 0.5rem !important;
}

/* Responsive card layout */
@media (min-width: 1200px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 25%; /* 4 across on large screens */
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 50%; /* 2 across on tablets */
    }
    
    /* Tablet-specific optimizations */
    .dashboard-container {
        padding: 1.5rem 1rem;
    }
    
    .dashboard-card {
        padding: 1.25rem;
        min-height: 120px;
    }
    
    .card-icon {
        font-size: 2rem;
        margin-right: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .card-description {
        font-size: 0.8rem;
    }
    
    /* VIP Products section tablet optimization */
    .vip-products-section {
        padding: 1rem;
    }
    
    .vip-products-section .table {
        font-size: 0.9rem;
    }
    
    .vip-products-section .table th,
    .vip-products-section .table td {
        padding: 0.6rem 0.8rem;
    }
    
    /* Search box tablet optimization */
    .search-box input {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        font-size: 1rem;
    }
    
    /* Category headers tablet optimization */
    .category-header h2 {
        font-size: 1.1rem;
    }
    
    /* Announcement carousel tablet optimization */
    .carousel-item {
        padding: 1.25rem;
    }
}

@media (max-width: 767px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 100%; /* 1 across on mobile */
    }
}

/* Make Favorites header consistent with other categories */
#favoritesSection .category-header h2 {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem 0.5rem;  /* Further reduced container padding */
    }

    /* Welcome section mobile optimization */
    .display-5 {
        font-size: 1.5rem !important;  /* Smaller welcome heading */
        line-height: 1.3;
    }

    .lead {
        font-size: 0.9rem !important;  /* Smaller lead text */
        margin-bottom: 1rem;
    }

    /* Announcements section mobile optimization */
    .notice-board-section {
        margin-bottom: 1rem;  /* Reduced section spacing */
    }

    .notice-board-section h2 {
        font-size: 1.1rem;  /* Slightly smaller heading */
        margin-bottom: 0.75rem;
    }

    /* Carousel mobile adjustments */
    .carousel-item {
        padding: 1rem;  /* Reduced padding */
    }

    /* VIP Products section mobile optimizations */
    .vip-products-section {
        padding: 0.5rem;  /* Reduced padding */
        margin: 0 -0.5rem 1rem -0.5rem;  /* Negative margin for full bleed */
        width: calc(100% + 1rem);  /* Compensate for negative margins */
        border-radius: 8px;  /* Smaller border radius */
        border-left: none;
        border-right: none;
    }

    .vip-products-section h3 {
        font-size: 1rem !important;  /* Smaller heading */
        margin-bottom: 0.5rem;
    }

    /* VIP header controls mobile layout */
    .vip-products-section .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch !important;
    }

    .vip-products-section .d-flex.gap-2 {
        justify-content: space-between;
        align-items: center;
    }

    /* VIP toggle buttons mobile optimization */
    .btn-group .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    #addVipProductBtn {
        padding: 0.25rem 0.75rem !important;
        font-size: 0.75rem !important;
        white-space: nowrap;
    }

    /* Table mobile optimizations */
    .vip-products-section .table-responsive {
        margin: 0 -0.5rem;  /* Negative margin for full width */
        padding: 0;
        border-radius: 0;
    }

    .vip-products-section .table {
        min-width: 100%;  /* Allow table to be full width on mobile */
        font-size: 0.75rem;  /* Smaller font */
        margin-bottom: 0;
    }

    .vip-products-section .table th,
    .vip-products-section .table td {
        padding: 0.4rem 0.3rem;  /* Much more compact padding */
        font-size: 0.7rem;  /* Smaller font on mobile */
        line-height: 1.1;
        vertical-align: top;
    }

    .vip-products-section .table th {
        font-size: 0.65rem;  /* Even smaller headers */
        font-weight: 700;
        background-color: rgba(var(--bs-body-color-rgb), 0.05);
    }

    /* Product name column optimization */
    .vip-products-section .table td:nth-child(2) {
        max-width: 150px;  /* Limit product name width */
        word-wrap: break-word;
        hyphens: auto;
    }

    /* Date columns optimization */
    .vip-products-section .table td:nth-child(3),
    .vip-products-section .table td:nth-child(4) {
        min-width: 70px;
        font-size: 0.65rem;
        white-space: nowrap;
    }

    /* Status indicator mobile optimization */
    .vip-status-indicator {
        padding: 0.15rem 0.4rem;
        font-size: 0.6rem;
        margin-top: 0.2rem;
        display: block;
        width: fit-content;
    }

    /* Search box mobile optimization */
    .search-box {
        margin-bottom: 1rem;
    }

    .search-box input {
        padding: 0.5rem 1rem 0.5rem 2rem;  /* Adjusted padding */
        font-size: 0.85rem;  /* Smaller font */
    }

    .search-box i {
        left: 0.75rem;
        font-size: 0.8rem;
    }

    /* Dashboard cards mobile optimization */
    .dashboard-card {
        padding: 1rem;  /* Reduced padding */
        margin: 0.25rem 0;  /* Reduced vertical spacing */
        min-height: 100px;  /* Smaller minimum height */
    }

    .card-icon {
        font-size: 1.5rem;  /* Smaller icons */
        margin-right: 1rem;
    }

    .card-title {
        font-size: 1.1rem;  /* Smaller title */
    }

    .card-description {
        font-size: 0.75rem;  /* Smaller description */
    }

    /* Grid layout optimization */
    .col-md-6 {
        padding: 0 0.25rem;  /* Further reduced card padding */
    }

    .row.g-4 {
        margin: 0 -0.25rem;  /* Compensate for reduced padding */
        --bs-gutter-y: 0.5rem !important;
    }

    /* Category headers mobile optimization */
    .category-header h2 {
        font-size: 0.85rem;
        padding-bottom: 0.3rem;
        margin-bottom: 0.3rem;
    }

    /* Favorites section mobile optimization */
    #favoritesSection .category-header h2 {
        font-size: 0.85rem;
    }

    /* Modal optimization for mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-header {
        padding: 0.75rem 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
    }

    /* Form controls mobile optimization */
    .form-control,
    .form-select {
        font-size: 0.9rem;
    }

    /* Button mobile optimization */
    .btn {
        font-size: 0.85rem;
    }

    .btn-sm {
        font-size: 0.75rem;
    }

    /* Toast container mobile positioning */
    .toast-container {
        bottom: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        width: auto !important;
    }

    .toast {
        width: 100%;
    }
}

/* Extra small devices optimization */
@media (max-width: 576px) {
    .dashboard-container {
        padding: 0.75rem 0.25rem;
    }

    .display-5 {
        font-size: 1.3rem !important;
    }

    .vip-products-section {
        margin: 0 -0.25rem 1rem -0.25rem;
        width: calc(100% + 0.5rem);
        border-radius: 0;
    }

    .vip-products-section .table th,
    .vip-products-section .table td {
        padding: 0.3rem 0.2rem;
        font-size: 0.65rem;
    }

    .vip-products-section .table th {
        font-size: 0.6rem;
    }

    /* Stack VIP controls vertically on very small screens */
    .btn-group {
        width: 100%;
    }

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

    /* Ensure single column on very small screens */
    .col-md-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* Enhanced animations */
.d1-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
    animation: slideDown 0.3s ease-out;
}

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

/* VIP Products row styling for clickable rows */
.vip-product-row {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.vip-product-row:hover {
    border-left-color: var(--bs-primary);
    /* transform: translateX(2px); - Removed to prevent scroll issues */
}

/* Product info card styling */
.product-info-card {
    background: var(--bs-light);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .product-info-card {
    background: var(--bs-dark);
}

/* Modal button styling */
#vipProductActionsModal .btn {
    border-radius: 8px;
}

/* Table hover effect for admin users - Simplified to prevent scroll issues */
.table tbody .vip-product-row:hover td {
    background-color: rgba(var(--bs-primary-rgb), 0.03) !important;
}

/* VIP View Toggle Buttons */
.btn-group .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

.btn-group .btn.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.btn-group .btn-outline-secondary:hover {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: white;
}

/* Ensure VIP buttons have consistent sizing and spacing */
.vip-products-section .d-flex.gap-2 {
    gap: 0.75rem !important; /* Consistent spacing between button groups */
}

.vip-products-section .btn-group {
    margin-right: 0.5rem; /* Space between button group and manage button */
}

/* VIP buttons - Modern D1 Blue styling */
#vipPastBtn, #vipFutureBtn, #vipActiveBtn {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    border-radius: 8px !important;
    height: auto !important;
    min-height: 36px !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent !important;
}

#vipActiveBtn {
    background: linear-gradient(135deg, #0d6efd 0%, #2563eb 100%) !important;
    border-color: #0d6efd !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25) !important;
}

#vipActiveBtn:hover {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.35) !important;
    transform: translateY(-1px) !important;
}

#vipPastBtn, #vipFutureBtn {
    background: rgba(13, 110, 253, 0.05) !important;
    border-color: rgba(13, 110, 253, 0.2) !important;
    color: #0d6efd !important;
}

#vipPastBtn:hover, #vipFutureBtn:hover {
    background: rgba(13, 110, 253, 0.1) !important;
    border-color: #0d6efd !important;
    transform: translateY(-1px) !important;
}

/* Manage Promotions button - Enhanced */
.vip-products-section .btn-outline-primary {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    border-radius: 8px !important;
    height: auto !important;
    min-height: 36px !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
    border: 2px solid #0d6efd !important;
    color: #0d6efd !important;
    transition: all 0.3s ease !important;
}

.vip-products-section .btn-outline-primary:hover {
    background: #0d6efd !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* Mobile responsive adjustments for VIP buttons */
@media (max-width: 768px) {
    .vip-products-section .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    .vip-products-section .d-flex.gap-2 {
        align-self: stretch !important;
        justify-content: space-between !important;
    }
    
    .vip-products-section .btn-group {
        margin-right: 0 !important;
        flex: 1 !important;
    }
    
    .vip-products-section .btn-outline-primary {
        flex: 0 0 auto !important;
        min-width: 140px !important;
    }
}

/* VIP Products section status indicators */
.vip-status-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.vip-status-past {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
    border: 1px solid rgba(var(--bs-danger-rgb), 0.3);
}

.vip-status-future {
    background-color: rgba(var(--bs-info-rgb), 0.1);
    color: var(--bs-info);
    border: 1px solid rgba(var(--bs-info-rgb), 0.3);
}

.vip-status-active {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
    border: 1px solid rgba(var(--bs-success-rgb), 0.3);
}

/* Rebates section styling for privileged users */
.rebates-section {
    background: rgba(var(--bs-warning-rgb), 0.1);
    border: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.rebates-section label {
    color: var(--bs-warning-text);
    font-weight: 600;
}

.rebates-section .form-control {
    border-color: rgba(var(--bs-warning-rgb), 0.3);
}

.rebates-section .form-control:focus {
    border-color: var(--bs-warning);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-warning-rgb), 0.25);
}

/* Rebates content formatting styles */
.rebates-content ul {
    margin: 0.5rem 0;
    padding-left: 1.2rem;
}

.rebates-content li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.rebates-content strong {
    color: var(--bs-warning-text);
    font-weight: 700;
}

.rebates-content br {
    line-height: 1.6;
}

/* Quill Editor Styling */
.rebates-section .ql-editor {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 12px;
}

.rebates-section .ql-toolbar {
    border-top: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-left: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-right: 1px solid rgba(var(--bs-warning-rgb), 0.3);
}

.rebates-section .ql-container {
    border-bottom: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-left: 1px solid rgba(var(--bs-warning-rgb), 0.3);
    border-right: 1px solid rgba(var(--bs-warning-rgb), 0.3);
}

.rebates-section .ql-editor.ql-blank::before {
    color: var(--bs-secondary);
    font-style: italic;
}

/* Dark theme support for Quill */
[data-bs-theme="dark"] .rebates-section .ql-toolbar {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .rebates-section .ql-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .rebates-section .ql-editor {
    background-color: rgba(255, 255, 255, 0.05);
    color: #f8f9fa;
}

/* Enhanced Announcement Popup Styling */
#newAnnouncementPopup {
    --announcement-primary: #0d6efd;
    --announcement-gradient-start: #0d6efd;
    --announcement-gradient-end: #4a90e2;
    --announcement-accent: #0052cc;
    --announcement-shadow: 0 25px 80px rgba(13, 110, 253, 0.15);
    --announcement-radius: 24px;
    --announcement-content-bg: #ffffff;
    --announcement-text: #1a1a1a;
    --announcement-border: rgba(13, 110, 253, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#newAnnouncementPopup .modal-dialog {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(-50px);
    max-width: 600px;
}

#newAnnouncementPopup.show .modal-dialog {
    transform: translateY(0);
}

#newAnnouncementPopup .modal-content {
    border: none;
    border-radius: var(--announcement-radius);
    box-shadow: var(--announcement-shadow);
    overflow: hidden;
    background: var(--announcement-content-bg);
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#newAnnouncementPopup .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--announcement-gradient-start), var(--announcement-gradient-end), #8e44ad, #e74c3c);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#newAnnouncementPopup .modal-header {
    border-bottom: none;
    padding: 2.5rem 2.5rem 1.5rem;
    background: linear-gradient(135deg, var(--announcement-gradient-start) 0%, var(--announcement-gradient-end) 100%);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

#newAnnouncementPopup .modal-header::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

#newAnnouncementPopup .modal-header .fas.fa-bullhorn {
    font-size: 2rem;
    margin-right: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

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

#newAnnouncementPopup .modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

#newAnnouncementPopup .modal-header small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
}

#newAnnouncementPopup .modal-body {
    padding: 2rem 2.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--announcement-text);
    background: var(--announcement-content-bg);
}

#newAnnouncementPopup .modal-footer {
    border-top: 1px solid var(--announcement-border);
    padding: 2rem 2.5rem;
    background: linear-gradient(to bottom, transparent, rgba(13, 110, 253, 0.02));
    justify-content: center;
}

#newAnnouncementPopup .announcement-content {
    max-height: 450px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--announcement-primary) transparent;
}

#newAnnouncementPopup .announcement-content::-webkit-scrollbar {
    width: 6px;
}

#newAnnouncementPopup .announcement-content::-webkit-scrollbar-track {
    background: transparent;
}

#newAnnouncementPopup .announcement-content::-webkit-scrollbar-thumb {
    background: var(--announcement-primary);
    border-radius: 3px;
}

#newAnnouncementPopup .announcement-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#newAnnouncementPopup .announcement-content h1,
#newAnnouncementPopup .announcement-content h2,
#newAnnouncementPopup .announcement-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--announcement-accent);
    font-weight: 700;
    line-height: 1.3;
}

#newAnnouncementPopup .announcement-content h1 {
    font-size: 1.5rem;
}

#newAnnouncementPopup .announcement-content h2 {
    font-size: 1.3rem;
}

#newAnnouncementPopup .announcement-content h3 {
    font-size: 1.1rem;
}

#newAnnouncementPopup .announcement-content p {
    margin-bottom: 1.2rem;
    color: var(--announcement-text);
}

#newAnnouncementPopup .announcement-content ul,
#newAnnouncementPopup .announcement-content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

#newAnnouncementPopup .announcement-content li {
    margin-bottom: 0.5rem;
    color: var(--announcement-text);
}

#newAnnouncementPopup .announcement-content blockquote {
    border-left: 4px solid var(--announcement-primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 0 8px 8px 0;
    padding: 1rem;
}

#newAnnouncementPopup .announcement-content code {
    background: rgba(13, 110, 253, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: var(--announcement-accent);
}

#newAnnouncementPopup .announcement-content pre {
    background: rgba(13, 110, 253, 0.05);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border-left: 4px solid var(--announcement-primary);
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn {
    background: linear-gradient(135deg, var(--announcement-gradient-start), var(--announcement-gradient-end));
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn:hover::before {
    left: 100%;
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(13, 110, 253, 0.4);
}

#newAnnouncementPopup #acknowledgeAnnouncementBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.3);
}

/* Dark theme support for enhanced popup */
[data-bs-theme="dark"] #newAnnouncementPopup {
    --announcement-content-bg: #2c3034;
    --announcement-text: #f8f9fa;
    --announcement-border: rgba(255, 255, 255, 0.1);
    --announcement-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] #newAnnouncementPopup .modal-footer {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.02));
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] #newAnnouncementPopup .announcement-content blockquote {
    background: rgba(13, 110, 253, 0.1);
    color: #f8f9fa;
}

[data-bs-theme="dark"] #newAnnouncementPopup .announcement-content code {
    background: rgba(13, 110, 253, 0.15);
    color: #4a90e2;
}

[data-bs-theme="dark"] #newAnnouncementPopup .announcement-content pre {
    background: rgba(13, 110, 253, 0.1);
    color: #f8f9fa;
}

[data-bs-theme="dark"] #newAnnouncementPopup .category-badge {
    background: rgba(44, 48, 52, 0.9);
    color: #4a90e2;
}

/* Responsive design */
@media (max-width: 768px) {
    #newAnnouncementPopup .modal-dialog {
        margin: 1rem;
        max-width: none;
    }
    
    #newAnnouncementPopup .modal-header,
    #newAnnouncementPopup .modal-body,
    #newAnnouncementPopup .modal-footer {
        padding: 1.5rem;
    }
    
    #newAnnouncementPopup .modal-title {
        font-size: 1.5rem;
    }
    
    #newAnnouncementPopup .modal-header .fas.fa-bullhorn {
        font-size: 1.5rem;
    }
    
    #newAnnouncementPopup .priority-badge,
    #newAnnouncementPopup .category-badge {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin: 0.5rem 0;
        display: inline-block;
    }
}

[data-bs-theme="dark"] .modern-promotion-section {
    background: linear-gradient(135deg, #232a36 0%, #1a202c 100%);
    border-radius: 12px;
    border: 1px solid rgba(13, 110, 253, 0.15);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.08);
}
[data-bs-theme="dark"] .promotion-header-modern {
    background: linear-gradient(135deg, #232a36 0%, #1a202c 100%);
    color: #fff;
    border-bottom: 2px solid rgba(13, 110, 253, 0.15);
}
[data-bs-theme="dark"] .promotion-name {
    color: #fffbe7;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
[data-bs-theme="dark"] .modern-vip-container {
    background: none;
}
[data-bs-theme="dark"] .compact-product-card {
    background: linear-gradient(135deg, #232a36 0%, #1a202c 100%);
    border: 1px solid rgba(13, 110, 253, 0.15) !important;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.10);
}
[data-bs-theme="dark"] .compact-product-card .product-name {
    color: #f1f5f9;
}
[data-bs-theme="dark"] .compact-product-card .product-ean,
[data-bs-theme="dark"] .compact-product-card .fw-mono {
    color: #cbd5e1;
}
[data-bs-theme="dark"] .pricing-section .promo-price {
    color: #60a5fa;
}
[data-bs-theme="dark"] .rebate-info {
    color: #fbbf24 !important;
    background: linear-gradient(135deg, rgba(251,191,36,0.12) 0%, rgba(251,191,36,0.05) 100%);
    border: 1px solid rgba(251,191,36,0.18);
}
[data-bs-theme="dark"] .promotion-header-modern .fas.fa-trophy {
    color: #ffd700 !important;
    filter: drop-shadow(0 1px 2px #0008);
}
[data-bs-theme="dark"] .promotion-header-modern .h5,
[data-bs-theme="dark"] .promotion-header-modern h3 {
    color: #fff;
}
[data-bs-theme="dark"] .promotion-header-modern .btn,
[data-bs-theme="dark"] .promotion-header-modern .btn:active,
[data-bs-theme="dark"] .promotion-header-modern .btn:focus {
    color: #fff;
    border-color: #60a5fa;
    background: #232a36;
}
/* VIP Activation Header - ensure white font in dark mode */
[data-bs-theme="dark"] .vip-products-section h3.h5,
[data-bs-theme="dark"] .vip-products-section h3.h5 .fa-trophy {
    color: #fff !important;
}

/* Simple Store Times Widget Styles - No Outer Border */
.store-times-section {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    margin-bottom: 1.5rem;
}

/* Clean VIP Section Overrides - No Outer Border */
.vip-products-section {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-bottom: 1.5rem !important;
}

.vip-products-section .btn-group .btn-sm {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    border-width: 1px !important;
}

         .vip-products-section .btn-outline-primary {
     padding: 0.375rem 0.75rem !important;
     font-size: 0.8rem !important;
     border-radius: 6px !important;
     font-weight: 500 !important;
     border-width: 1px !important;
 }

 /* Announcement carousel - Apple style white card */
 .announcement-carousel {
     background-color: #ffffff !important;
     border-radius: 14px !important;
     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 
                 0 1px 2px rgba(0, 0, 0, 0.03) !important;
     border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
 }
 
 /* Dark mode for announcement carousel */
 [data-bs-theme="dark"] .announcement-carousel {
     background-color: rgba(255, 255, 255, 0.05) !important;
     border-color: rgba(255, 255, 255, 0.1) !important;
     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
                 0 1px 2px rgba(0, 0, 0, 0.2) !important;
 }

 /* Add more spacing between main sections */
 .notice-board-section {
     margin-bottom: 3rem !important;
 }

 .store-times-section {
     margin-bottom: 3rem !important;
 }

 .vip-products-section {
     margin-bottom: 3rem !important;
 }

 /* Clean VIP Product Cards - Remove Gradients */
 .compact-product-card {
     border: 1px solid #e5e7eb !important;
     background: #ffffff !important;
     border-radius: 8px !important;
     box-shadow: none !important;
 }

 .compact-product-card:hover {
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
     border-color: #d1d5db !important;
 }

 [data-bs-theme="dark"] .compact-product-card {
     background: linear-gradient(135deg, #2c3034 0%, #1e293b 100%) !important;
     border-color: rgba(255, 255, 255, 0.1) !important;
     color: #f1f5f9 !important;
 }

 [data-bs-theme="dark"] .compact-product-card:hover {
     background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
     border-color: rgba(96, 165, 250, 0.3) !important;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
 }

 /* Enhanced VIP product card text styling for dark mode */
 [data-bs-theme="dark"] .compact-product-card .product-name {
     color: #f1f5f9 !important;
 }

 [data-bs-theme="dark"] .compact-product-card .product-ean {
     color: #94a3b8 !important;
 }

 [data-bs-theme="dark"] .compact-product-card .pricing-section .promo-price {
     color: #60a5fa !important;
 }

 [data-bs-theme="dark"] .compact-product-card .pricing-section .rrp-price {
     color: #94a3b8 !important;
 }

 [data-bs-theme="dark"] .compact-product-card .rebate-info {
     background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.08) 100%) !important;
     color: #fbbf24 !important;
     border-color: rgba(251, 191, 36, 0.25) !important;
 }

 [data-bs-theme="dark"] .compact-product-card .fw-mono {
     background: rgba(255, 255, 255, 0.1) !important;
     color: #cbd5e1 !important;
 }

 /* Fix scrolling bounds */
 html, body {
     overflow-x: hidden;
     max-width: 100vw;
 }

 .container-fluid {
     max-width: 100%;
     overflow-x: hidden;
     padding-left: 0 !important; /* Remove Bootstrap default padding */
     padding-right: 0 !important; /* Remove Bootstrap default padding */
 }

 .row {
     margin: 0;
 }

 .col-md-6, .col-lg-4, .col-xl-3 {
     padding-left: 0.5rem;
     padding-right: 0.5rem;
 }

 /* Blue VIP promotion headers with white font */
 .promotion-header-modern.active-promotion {
     background: #0d6efd !important;
     border-left: 3px solid #0d6efd !important;
     color: white !important;
 }

 .promotion-header-modern.upcoming-promotion {
     background: #0d6efd !important;
     border-left: 3px solid #0d6efd !important;
     color: white !important;
 }

 .promotion-header-modern.past-promotion {
     background: #6c757d !important;
     border-left: 3px solid #6c757d !important;
     color: white !important;
 }

 .promotion-header-modern .promotion-name {
     color: white !important;
 }

 .promotion-header-modern .promotion-dates {
     color: rgba(255, 255, 255, 0.8) !important;
 }

 /* Clean rebate styling - no icons */
 .rebate-info {
     color: #dc3545 !important;
     font-size: 0.75rem !important;
     font-weight: 600 !important;
     background: rgba(220, 53, 69, 0.1) !important;
     padding: 0.25rem 0.5rem !important;
     border-radius: 4px !important;
     display: inline-block !important;
     border: 1px solid rgba(220, 53, 69, 0.2) !important;
 }

 .rebate-info i {
     display: none !important;
 }

 /* Better search box spacing */
 .search-box {
     margin-bottom: 2.5rem !important;
 }

 /* Search Overlay Functionality */
 .search-container {
     position: relative;
     z-index: 1000;
     margin-bottom: 2.5rem;
 }

 .search-results-overlay {
     position: absolute;
     top: 100%;
     left: 0;
     right: 0;
     background: var(--bs-body-bg);
     border-radius: 12px;
     box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
     border: 1px solid rgba(var(--bs-body-color-rgb), 0.1);
     max-height: 60vh;
     overflow-y: auto;
     z-index: 1001;
     animation: searchSlideDown 0.2s ease-out;
 }

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

 .search-results-container {
     padding: 1rem;
 }

 .search-results-header {
     padding-bottom: 0.75rem;
     border-bottom: 1px solid rgba(var(--bs-body-color-rgb), 0.1);
     margin-bottom: 0.75rem;
 }

 .search-results-content {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
     gap: 0.75rem;
 }

 .search-result-item {
     background: var(--bs-body-bg);
     border: 1px solid rgba(var(--bs-body-color-rgb), 0.1);
     border-radius: 8px;
     padding: 0.75rem;
     text-decoration: none;
     color: inherit;
     transition: all 0.2s ease;
     display: flex;
     align-items: center;
     gap: 0.75rem;
 }

 .search-result-item:hover {
     color: inherit;
     text-decoration: none;
     transform: translateY(-2px);
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
     border-color: var(--bs-primary);
 }

 .search-result-icon {
     font-size: 1.25rem;
     color: var(--bs-primary);
     width: 24px;
     text-align: center;
 }

 .search-result-content h6 {
     margin: 0;
     font-size: 0.9rem;
     font-weight: 600;
     color: var(--bs-body-color);
 }

 .search-result-content p {
     margin: 0;
     font-size: 0.75rem;
     color: var(--bs-secondary);
     line-height: 1.3;
 }

 /* Blur effect for background content */
 .main-content.search-active {
     filter: blur(4px);
     opacity: 0.6;
     pointer-events: none;
     transition: all 0.3s ease;
 }

 /* Dark theme support */
 [data-bs-theme="dark"] .search-results-overlay {
     background: #2c3034;
     border-color: rgba(255, 255, 255, 0.1);
     box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
 }

 [data-bs-theme="dark"] .search-result-item {
     background: #2c3034;
     border-color: rgba(255, 255, 255, 0.1);
 }

 [data-bs-theme="dark"] .search-result-item:hover {
     border-color: #60a5fa;
 }

 /* Coming soon items in search */
 .search-result-item.coming-soon {
     opacity: 0.6;
     cursor: not-allowed;
 }

 .search-result-item.coming-soon:hover {
     transform: none;
     box-shadow: none;
     border-color: rgba(var(--bs-body-color-rgb), 0.1);
 }

 /* Mobile responsive */
 @media (max-width: 768px) {
     .search-results-content {
         grid-template-columns: 1fr;
     }
     
     .search-results-overlay {
         max-height: 50vh;
     }
 }

 /* Enhanced VIP Dark Mode Compatibility */
 [data-bs-theme="dark"] .modern-promotion-section {
     background: linear-gradient(135deg, #2c3034 0%, #212529 100%) !important;
     border-color: rgba(255, 255, 255, 0.1) !important;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
 }

 [data-bs-theme="dark"] .modern-promotion-section:hover {
     box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
 }

 [data-bs-theme="dark"] .promotion-header-modern.active-promotion {
     background: linear-gradient(135deg, #1a365d 0%, #2563eb 20%) !important;
     border-left-color: #60a5fa !important;
 }

 [data-bs-theme="dark"] .promotion-header-modern.upcoming-promotion {
     background: linear-gradient(135deg, #451a03 0%, #a16207 20%) !important;
     border-left-color: #fbbf24 !important;
 }

 [data-bs-theme="dark"] .promotion-header-modern.past-promotion {
     background: linear-gradient(135deg, #374151 0%, #4b5563 20%) !important;
     border-left-color: #9ca3af !important;
 }

 [data-bs-theme="dark"] .promotion-header-modern .promotion-name {
     color: #f8f9fa !important;
     text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
 }

 [data-bs-theme="dark"] .promotion-header-modern .promotion-dates {
     color: #cbd5e1 !important;
 }

 [data-bs-theme="dark"] .vip-products-section .btn-outline-primary {
     border-color: #60a5fa !important;
     color: #60a5fa !important;
 }

 [data-bs-theme="dark"] .vip-products-section .btn-outline-primary:hover {
     background: #60a5fa !important;
     border-color: #60a5fa !important;
     color: #0f172a !important;
 }

 [data-bs-theme="dark"] #vipActiveBtn {
     background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
     border-color: #60a5fa !important;
     color: #0f172a !important;
 }

 [data-bs-theme="dark"] #vipActiveBtn:hover {
     box-shadow: 0 4px 12px rgba(96, 165, 250, 0.4) !important;
 }

 [data-bs-theme="dark"] #vipPastBtn,
 [data-bs-theme="dark"] #vipFutureBtn {
     background: rgba(96, 165, 250, 0.1) !important;
     border-color: rgba(96, 165, 250, 0.3) !important;
     color: #60a5fa !important;
 }

 [data-bs-theme="dark"] #vipPastBtn:hover,
 [data-bs-theme="dark"] #vipFutureBtn:hover {
     background: rgba(96, 165, 250, 0.2) !important;
     border-color: #60a5fa !important;
 }

 /* VIP table dark mode improvements */
 [data-bs-theme="dark"] .vip-products-section .table tbody tr:hover {
     background-color: rgba(96, 165, 250, 0.05) !important;
 }

 [data-bs-theme="dark"] .vip-products-section .table th {
     background-color: rgba(255, 255, 255, 0.05) !important;
     color: #e5e7eb !important;
     border-color: rgba(255, 255, 255, 0.1) !important;
 }

 [data-bs-theme="dark"] .vip-products-section .table td {
     border-color: rgba(255, 255, 255, 0.1) !important;
     color: #f1f5f9 !important;
 }

 /* VIP Status indicators dark mode */
 [data-bs-theme="dark"] .vip-status-past {
     background-color: rgba(248, 113, 113, 0.15) !important;
     color: #fca5a5 !important;
     border-color: rgba(248, 113, 113, 0.3) !important;
 }

 [data-bs-theme="dark"] .vip-status-future {
     background-color: rgba(96, 165, 250, 0.15) !important;
     color: #93c5fd !important;
     border-color: rgba(96, 165, 250, 0.3) !important;
 }

 [data-bs-theme="dark"] .vip-status-active {
     background-color: rgba(34, 197, 94, 0.15) !important;
     color: #86efac !important;
     border-color: rgba(34, 197, 94, 0.3) !important;
 }

.simple-store-times {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
}

.simple-store-times::-webkit-scrollbar {
    height: 6px;
}

.simple-store-times::-webkit-scrollbar-track {
    background: rgba(var(--bs-body-color-rgb), 0.1);
    border-radius: 3px;
}

.simple-store-times::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 3px;
}

.simple-store-times::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

.simple-store-card {
    background: var(--bs-body-bg);
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.12);
    border-radius: 8px;
    padding: 0.75rem;
    flex: 0 0 auto;
    min-width: 180px;
    transition: all 0.2s ease;
    position: relative;
}

.simple-store-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.store-name-simple {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.25rem;
}

.store-time-simple {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0d6efd;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.store-hours-simple {
    font-size: 0.8rem;
    color: var(--bs-secondary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.store-timezone-simple {
    font-size: 0.7rem;
    color: var(--bs-secondary);
    font-style: italic;
    opacity: 0.8;
}

.store-status-simple {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
}

.store-status-simple.open {
    background: #22c55e;
}

.store-status-simple.closed {
    background: #ef4444;
}

.store-status-simple.opening-soon,
.store-status-simple.closing-soon {
    background: #f59e0b;
}

/* Dark theme support */
[data-bs-theme="dark"] .store-times-section {
    background: var(--bs-body-bg) !important;
    border: none !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .simple-store-card {
    background: var(--bs-body-bg) !important;
    border: none !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .simple-store-card:hover {
    box-shadow: none !important;
    transform: none !important;
}

[data-bs-theme="dark"] .store-time-simple {
    color: #60a5fa;
}

/* Dark mode scrollbar */
[data-bs-theme="dark"] .simple-store-times::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .simple-store-times::-webkit-scrollbar-thumb {
    background: #3d8bfd;
}

[data-bs-theme="dark"] .simple-store-times::-webkit-scrollbar-thumb:hover {
    background: #4c8cfd;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .simple-store-card {
        min-width: 160px;
    }
    
    .store-times-section {
        padding: 0.75rem;
        margin: 0 -0.5rem 1rem -0.5rem;
        border-radius: 8px;
        border-left: none;
        border-right: none;
    }
}

/* Regular announcement modal images */
#announcementModal .announcement-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Sidebar styles moved to navbar-complete.css for consistency */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--d1-navbar-height, 64px);
}


/* Dashboard Grid Layouts */
.section-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.search-container {
    position: relative;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary);
    font-size: 0.9rem;
}

.search-container input {
    padding-left: 2.5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    height: 38px;
}

.search-results {
    padding: 1rem 0;
}

.search-result-item {
    margin-bottom: 0.5rem;
}

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--bs-body-color);
    border-radius: 8px;
    margin: 2px 8px;
    font-weight: 500;
}

    background: var(--bs-secondary-bg);
}

    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    font-size: 1rem;
    color: var(--bs-primary);
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

    font-size: 0.8rem;
    transition: transform 0.2s ease;
    color: var(--bs-secondary);
}

    transform: rotate(-90deg);
}

    padding-left: 0;
    margin: 0;
    list-style: none;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    max-height: 0;
}

    max-height: 1000px;
}

    margin: 0;
}

    display: flex;
    align-items: center;
    padding: 0.6rem 1rem 0.6rem 2rem;
    text-decoration: none;
    color: var(--bs-body-color);
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    position: relative;
    border-radius: 0 8px 8px 0;
    margin: 2px 0;
}

    background: rgba(13, 110, 253, 0.1);
    color: var(--bs-primary);
    text-decoration: none;
    border-left-color: #0d6efd;
}

    opacity: 0.6;
    cursor: not-allowed;
}

    color: #6c757d !important; /* Gray for coming soon */
}

    background: none;
    color: var(--bs-body-color);
}

    color: #6c757d !important; /* Keep gray on hover for coming soon */
}

    width: 16px;
    height: 16px;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

    flex: 1;
    min-width: 0;
}

    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    font-size: 0.75rem;
    color: var(--bs-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--bs-secondary);
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.2s ease;
}

    opacity: 1;
}

    color: #ffc107;
    opacity: 1;
}

    color: #ffc107;
    transform: translateY(-50%) scale(1.1);
}

    color: #dc3545; /* Red for admin-only */
}

    color: #fd7e14; /* Orange for restricted access */
}

    color: #0d6efd; /* Blue for open access */
}

    border-left-color: #0d6efd !important;
    background: rgba(13, 110, 253, 0.15);
}

    border-left-color: #0d6efd !important;
    background: rgba(13, 110, 253, 0.15);
}

    border-left-color: #0d6efd !important;
    background: rgba(13, 110, 253, 0.15);
}

/* Keep icon colors on hover for better visibility */
    color: #0d6efd !important;
}

    border-bottom: 1px solid var(--bs-border-color);
    margin-bottom: 1rem;
}

    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-secondary);
    background: var(--bs-secondary-bg);
}

    padding-bottom: 1rem;
}

    padding-left: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

    background: rgba(13, 110, 253, 0.15);
    border-left-color: #0d6efd !important;
}

/* Maintain permission icon colors in favorites section */
    color: #dc3545; /* Red for admin-only */
}

    color: #fd7e14; /* Orange for restricted access */
}

    color: #0d6efd; /* Blue for open access */
}

    color: #0d6efd !important; /* Blue on hover */
}

/* Main area adjustments */
.main-area {
    flex: 1;
    margin-left: 320px;
    min-height: calc(100vh - var(--d1-navbar-height, 64px));
    transition: margin-left 0.3s ease;
}

    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

    margin-left: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
        transform: translateX(-100%);
        width: 100%;
        max-width: 340px;
    }
    
        transform: translateX(0);
    }
    
    .main-area {
        margin-left: 0;
    }
    
    .dashboard-layout {
        position: relative;
    }
    
        padding: 1rem;
    }
    
        padding: 1rem;
        font-size: 0.9rem;
        min-height: 48px; /* Better touch target */
    }
    
        padding: 0.75rem 1rem 0.75rem 2rem;
        min-height: 48px; /* Better touch target */
        align-items: center;
    }
    
        font-size: 0.9rem;
    }
    
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
        font-size: 1rem;
        width: 18px;
        height: 18px;
    }
    
        font-size: 1.1rem;
        width: 18px;
    }
    
    /* Mobile overlay */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
        display: block;
    }
}

/* Tablet adjustments */
@media (max-width: 992px) and (min-width: 769px) {
        width: 280px;
    }
    
    .main-area {
        margin-left: 280px;
    }
    
        font-size: 0.7rem;
        line-height: 1.1;
    }
    
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
        padding: 0.5rem 0.75rem 0.5rem 1.75rem;
    }
}

    padding: 0 1rem;
}

    padding: 2rem 1rem;
    text-align: center;
    color: var(--bs-secondary);
    font-size: 0.9rem;
}

    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Dashboard Grid Layouts */
.dashboard-top-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Removed dashboard-bottom-grid - now using full width sections */

.dashboard-announcements-full {
    width: 100%;
    margin-bottom: 1.5rem;
    /* Ensure consistent alignment with all sections */
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
}

/* Override dashboard-container padding for perfect alignment */
.dashboard-container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Desktop mode - 10% padding on left and right */
@media (min-width: 992px) {
    .dashboard-container {
        padding-left: 10% !important;
        padding-right: 10% !important;
    }
    
    /* Max width constraints for specific sections - keep left aligned */
    .metrics-section-full,
    .store-hours-section-full,
    .vip-section-full {
        max-width: 1200px;
        margin-left: 0 !important;
        margin-right: auto !important;
    }
    
    /* Events section - left aligned, no max-width constraint */
    .events-section-full {
        max-width: none;
        margin-left: 0 !important;
        margin-right: auto !important;
    }
}

/* Ensure all sections are left-aligned, not centered */
.dashboard-announcements-full,
.events-section-full,
.metrics-section-full,
.store-hours-section-full,
.vip-section-full {
    margin-left: 0;
    margin-right: auto;
}

.dashboard-header {
    width: 100%;
    box-sizing: border-box;
    /* Ensure consistent alignment with all sections */
    padding-left: 0;
    padding-right: 0;
}

/* Section Styling */
.announcements-section {
    width: 100%;
    margin-bottom: 2.5rem;
}

/* Full width wrapper sections */
.store-hours-section-full,
.vip-section-full {
    width: 100%;
}

.store-hours-section {
    width: 100%;
    margin-bottom: 0;
    padding: 1.25rem;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.03);
}

.vip-section {
    width: 100%;
    margin-bottom: 0;
    padding: 1.5rem;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Checkpoints Menu Bar - Horizontal Navigation Style */
.checkpoints-menu-bar {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0;
    background: transparent;
}

/* Apple-style light grey background for entire page */
body {
    background: #fafafa !important;
}

html {
    background: #fafafa !important;
}

.main-area {
    background: #fafafa !important;
}

.dashboard-container {
    background: transparent;
    min-height: 100vh;
}

/* Current Date Display Badge - Apple Style */
.current-date-display {
    display: inline-block;
}

.date-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-body-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.03);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.date-badge i {
    color: #0d6efd;
    opacity: 0.9;
    font-size: 0.85rem;
}

/* Dark mode for date badge */
[data-bs-theme="dark"] .date-badge {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Keep announcements and other sections clean */
.dashboard-announcements-full {
    margin-bottom: 2.5rem;
}

.checkpoints-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.checkpoints-carousel {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--bs-primary-rgb), 0.3) transparent;
    padding: 0.5rem 0;
}

/* Custom scrollbar styling */
.checkpoints-carousel::-webkit-scrollbar {
    height: 8px;
}

.checkpoints-carousel::-webkit-scrollbar-track {
    background: rgba(var(--bs-border-color-rgb), 0.1);
    border-radius: 4px;
}

.checkpoints-carousel::-webkit-scrollbar-thumb {
    background: rgba(var(--bs-primary-rgb), 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.checkpoints-carousel::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--bs-primary-rgb), 0.5);
}

/* Dark mode scrollbar */
[data-bs-theme="dark"] .checkpoints-carousel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .checkpoints-carousel::-webkit-scrollbar-thumb {
    background: rgba(var(--bs-primary-rgb), 0.4);
}

[data-bs-theme="dark"] .checkpoints-carousel::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--bs-primary-rgb), 0.6);
}

/* Section descriptions - REMOVED */
/* Removed as per design update */

/* VIP Promotion Header Status Colors */
.promotion-header-modern.warehouse-promotion {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
    border-color: #dc3545 !important;
    border-left: 3px solid #dc3545 !important;
}

.promotion-header-modern.warehouse-promotion .promotion-name {
    color: white !important;
}

.promotion-header-modern.warehouse-promotion .promotion-dates {
    color: rgba(255, 255, 255, 0.9) !important;
}

.promotion-header-modern.warehouse-promotion i {
    color: white !important;
}

[data-bs-theme="dark"] .promotion-header-modern.warehouse-promotion {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%) !important;
    color: white !important;
    border-color: #dc3545 !important;
    border-left: 3px solid #dc3545 !important;
}

/* ===== DAILY CHECKLIST METRICS SECTION ===== */
.metrics-section-full {
    width: 100%;
    background: #ffffff;
    margin-bottom: 2rem;
    padding: 1.25rem;
    border-radius: 18px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.03);
}

.metrics-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Two-column layout for first row */
.metrics-row-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Horizontal Progress Bar Container - Modern Apple Style */
.metric-bar-container {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: visible;
}

/* Subtle hover state */
.metric-bar-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                0 2px 6px rgba(0, 0, 0, 0.04),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Active/Pressed state */
.metric-bar-container:active {
    transform: translateY(0px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.06);
    transition: all 0.1s ease;
}

/* Completed state - subtle green accent */
.metric-bar-container.completed {
    border-color: rgba(52, 199, 89, 0.2);
}

.metric-bar-container.completed:hover {
    border-color: rgba(52, 199, 89, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                0 2px 6px rgba(0, 0, 0, 0.04),
                0 0 0 1px rgba(52, 199, 89, 0.08);
}

/* Focus state for accessibility */
.metric-bar-container:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-color: #0d6efd;
}

/* Metric Header (Title + Stats) */
.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.metric-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.metric-title i {
    font-size: 1.1rem;
}

/* Task-specific icon colors */
.metric-bar-container[data-task-type="important"] .metric-title i {
    color: #ff3b30;
}

.metric-bar-container[data-task-type="adhoc"] .metric-title i {
    color: #007aff;
}

.metric-bar-container[data-task-type="daily"] .metric-title i {
    color: #34c759;
}

/* Metric Stats (Percentage + Count) */
.metric-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.percentage-text {
    font-size: 1rem;
    font-weight: 800;
    color: var(--bs-body-color);
    line-height: 1;
}

.count-text {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    font-weight: 600;
    opacity: 0.8;
}

/* Horizontal Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 14px;
    background: rgba(var(--bs-border-color-rgb), 0.15);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e5e5ea, #e5e5ea);
    border-radius: 12px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Task-specific progress bar colors with gradients */
.metric-bar-container[data-task-type="important"] .progress-bar-fill {
    background: linear-gradient(90deg, #ff6b6b, #ff3b30);
}

.metric-bar-container[data-task-type="adhoc"] .progress-bar-fill {
    background: linear-gradient(90deg, #339dff, #007aff);
}

.metric-bar-container[data-task-type="daily"] .progress-bar-fill {
    background: linear-gradient(90deg, #5dd97c, #34c759);
}

/* Empty state - grey gradient */
.metric-bar-container:not(.has-tasks) .progress-bar-fill {
    background: linear-gradient(90deg, #e5e5ea, #d1d1d6);
}

.metric-subtitle {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin: 0;
    opacity: 0.7;
}

.metrics-date-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .metrics-row-top {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .metric-bar-container {
        padding: 1.25rem 1.5rem;
    }
    
    .percentage-text {
        font-size: 1.1rem;
    }
    
    .metric-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .metrics-section-full {
        padding: 20px 16px;
        margin-bottom: 1.5rem;
    }
    
    /* Stack metrics vertically on mobile */
    .metrics-row-top {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .metrics-grid {
        gap: 0.875rem;
        margin-top: 0.75rem;
    }
    
    .metric-bar-container {
        padding: 1rem 1.25rem;
    }
    
    .metric-header {
        margin-bottom: 0.65rem;
    }
    
    .percentage-text {
        font-size: 1rem;
    }
    
    .count-text {
        font-size: 0.75rem;
    }
    
    .metric-title {
        font-size: 0.9rem;
    }
    
    .progress-bar-container {
        height: 16px;
    }
    
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }
    
    .metrics-date-info {
        align-self: flex-end;
    }
    
    /* Date badge mobile styles */
    .date-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .metrics-section-full {
        padding: 16px 12px;
    }
    
    /* Keep metrics stacked on small mobile */
    .metrics-row-top {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .metric-bar-container {
        padding: 0.875rem 1rem;
    }
    
    .percentage-text {
        font-size: 0.95rem;
    }
    
    .metric-title {
        font-size: 0.85rem;
    }
    
    .count-text {
        font-size: 0.7rem;
    }
    
    .progress-bar-container {
        height: 14px;
    }
    
    /* Smaller date badge on tiny screens */
    .date-badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
    
    /* Stack header on very small screens */
    .dashboard-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .current-date-display {
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .date-badge {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode support */
[data-bs-theme="dark"] .metrics-section-full {
    background: transparent;
}

[data-bs-theme="dark"] .metric-bar-container {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .metric-bar-container:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
                0 2px 6px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .metric-bar-container:active {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .progress-bar-container {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Loading state for metrics */
.metrics-loading {
    opacity: 0.6;
    pointer-events: none;
}

.metrics-loading .progress-bar-fill {
    animation: pulse 2s ease-in-out infinite;
}

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

/* Blue divider lines - Pixel Perfect Alignment */
.section-divider {
    border: none !important;
    border-top: 3px solid #0d6efd !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    height: 0 !important; /* Ensure no height variations */
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important; /* Clear any floats */
    position: relative !important; /* Ensure consistent positioning context */
}

/* Ensure all section containers have identical spacing */
/* Section containers with proper spacing */

/* Natural content spacing */

/* .announcements-section:hover,
.store-hours-section:hover,
.vip-section:hover,
.checkpoints-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
} */

/* Section Headers - Pixel Perfect Alignment */
.section-title {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--bs-body-color) !important;
    margin-top: 0 !important; /* Reset browser defaults */
    margin-bottom: 0.5rem !important; /* Consistent spacing */
    padding: 0 !important; /* Reset any padding */
    line-height: 1.2 !important; /* Consistent line height */
    display: flex !important;
    align-items: center !important;
}

/* Ensure all h2 section titles have identical styling */
h2.section-title {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    padding: 0 !important;
}

.section-title i {
    color: #0d6efd;
    font-size: 1rem;
}

/* Metrics date info positioning */
.metrics-date-info {
    font-size: 0.75rem !important;
    color: var(--bs-secondary) !important;
    margin-left: auto !important;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--bs-secondary);
    font-size: 0.75rem;
    font-style: italic;
    margin-left: 2rem;
}

.last-updated {
    color: var(--bs-secondary);
    font-size: 0.7rem;
    align-self: flex-end;
    margin-top: -0.5rem;
}

/* VIP Controls */
.vip-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
}

/* Store Hours Grid - TABLE STYLE (States as Columns, Stores as Rows) */
.scrollable-store-times {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 0.75rem !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
}

/* State Column */
.store-state-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

/* State Header - Column Title with Time */
.store-state-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08) 0%, rgba(13, 110, 253, 0.04) 100%);
    border-radius: 8px;
    border: 1.5px solid rgba(13, 110, 253, 0.15);
}

.store-state-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bs-body-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.store-state-time {
    display: flex;
    align-items: baseline;
}

.state-time-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d6efd;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

[data-bs-theme="dark"] .store-state-header {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15) 0%, rgba(13, 110, 253, 0.08) 100%);
    border-color: rgba(13, 110, 253, 0.2);
}

/* Store Cards - Stacked Vertically */
.store-state-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Tablet: Adjust columns */
@media (min-width: 769px) and (max-width: 1199px) {
    .scrollable-store-times {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    }
}

/* Desktop: More columns */
@media (min-width: 1200px) {
    .scrollable-store-times {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    }
}

/* Allow tooltips to show above container on all screen sizes */
.scrollable-store-times {
    overflow: visible !important;
}

/* Store Extension Tooltip Styling - Production Ready */

/* Extension Tooltip - Production Ready (No arrow to avoid status indicator conflict) */
.scrollable-store-times .store-time-card[data-extension]:hover::after {
    content: "3CX Extension: " attr(data-extension) !important;
    position: absolute !important;
    top: -45px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0, 0, 0, 0.9) !important;
    color: white !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    display: block !important;
    opacity: 1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    animation: tooltipFadeIn 0.2s ease-in-out !important;
}

/* Hide tooltip for stores without extensions */
.store-time-card[data-extension="N/A"]:hover::after {
    display: none !important;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.scrollable-store-times::-webkit-scrollbar {
    width: 6px;
}

.scrollable-store-times::-webkit-scrollbar-track {
    background: var(--bs-tertiary-bg);
    border-radius: 3px;
}

.scrollable-store-times::-webkit-scrollbar-thumb {
    background: var(--bs-secondary);
    border-radius: 3px;
}

.scrollable-store-times::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Store Hours Individual Cards - Simple Style with Extension */
/* Special hours styling for Store Hours page */
.store-time-card.special-hours .store-hours,
.store-time-card.special-hours .store-name {
    color: #ff9800 !important; /* Orange text color */
}

.store-time-card.public-holiday .store-hours,
.store-time-card.public-holiday .store-name {
    color: #dc3545 !important; /* Red text color */
}

.store-time-card {
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.75rem !important;
    text-align: left !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    min-height: auto !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.03) !important;
    overflow: visible !important;
    min-height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    cursor: default;
}

.store-time-card:hover {
    border-color: rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                0 2px 6px rgba(0, 0, 0, 0.04),
                0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    transform: translateY(-2px);
}

/* Store info section - top of card */
.store-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

/* Status indicator - small dot */
.store-status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.store-time-card.open .store-status-indicator {
    background: #34c759;
    box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.15);
}

.store-time-card.closed .store-status-indicator {
    background: #ff3b30;
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.15);
}

/* Store details */
.store-details {
    flex: 1;
    min-width: 0;
}

.store-name {
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    color: var(--bs-body-color) !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-hours {
    font-size: 0.65rem !important;
    color: rgba(0, 0, 0, 0.5) !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    margin: 0.2rem 0 0 0 !important;
}

/* Extension Display - Right Side */
.store-extension {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.08);
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.01em;
    border: 1px solid rgba(13, 110, 253, 0.15);
}

[data-bs-theme="dark"] .store-extension {
    background: rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.25);
}

/* Dark mode adjustments for store cards */
[data-bs-theme="dark"] .store-time-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

[data-bs-theme="dark"] .store-time-card:hover {
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
                0 2px 6px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .store-name {
    color: rgba(255, 255, 255, 0.95) !important;
}

[data-bs-theme="dark"] .store-hours {
    color: rgba(255, 255, 255, 0.5) !important;
}

[data-bs-theme="dark"] .store-timezone {
    color: rgba(255, 255, 255, 0.4) !important;
}

[data-bs-theme="dark"] .store-status-indicator {
    background: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .store-time-card.open .store-status-indicator {
    background: #34c759;
}

[data-bs-theme="dark"] .store-time-card.closed .store-status-indicator {
    background: #ff3b30;
}

/* Removed - now using unified dark mode styling */

[data-bs-theme="dark"] .announcement-content {
    background: #2d3748 !important; /* Lighter grey background to distinguish announcements */
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .announcement-content h3,
[data-bs-theme="dark"] .announcement-content h4,
[data-bs-theme="dark"] .announcement-content p {
    color: #e2e8f0 !important; /* Light text for good contrast */
}

[data-bs-theme="dark"] .announcement-content .badge {
    background: #4a5568 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .store-name {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .store-time {
    color: #64b5f6;
}

[data-bs-theme="dark"] .store-hours,
[data-bs-theme="dark"] .store-timezone {
    color: #adb5bd;
}

/* Checkpoints Grid - Natural spacing */
/* Checkpoint Cards - Compact Menu Style */
.checkpoint-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: var(--bs-body-color);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    min-height: auto;
    min-width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 
                0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Subtle hover state - inspired by Linear & Apple */
.checkpoint-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                0 2px 6px rgba(0, 0, 0, 0.04),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    background: #ffffff;
}

/* Active/Pressed state */
.checkpoint-card:active {
    transform: translateY(0px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.06);
    transition: all 0.1s ease;
}

/* Icon styling - Compact for horizontal menu */
.checkpoint-icon {
    font-size: 1.1rem;
    margin-bottom: 0;
    color: #0d6efd;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
    flex-shrink: 0;
}

.checkpoint-card:hover .checkpoint-icon {
    transform: scale(1.08);
    opacity: 1;
}

.checkpoint-card:active .checkpoint-icon {
    transform: scale(1.03);
}

/* Title styling - Compact for horizontal menu */
.checkpoint-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

/* Focus state for accessibility */
.checkpoint-card:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-color: #0d6efd;
}

/* Dark mode refinements */
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] html,
[data-bs-theme="dark"] .main-area {
    background: #000000 !important;
}

[data-bs-theme="dark"] .dashboard-container {
    background: transparent;
}

[data-bs-theme="dark"] .checkpoints-menu-bar {
    background: transparent;
}

[data-bs-theme="dark"] .metrics-section-full,
[data-bs-theme="dark"] .vip-section,
[data-bs-theme="dark"] .store-hours-section {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .checkpoint-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .checkpoint-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
                0 2px 6px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .checkpoint-card:active {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .checkpoint-icon {
    opacity: 0.85;
}

[data-bs-theme="dark"] .checkpoint-card:hover .checkpoint-icon {
    opacity: 1;
}

/* Announcement Improvements */
.announcements-section .carousel-item {
    padding: 0 !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Announcement Content Typography */
.announcement-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #0d6efd !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

.announcement-subtitle {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    color: var(--bs-body-color) !important;
    text-align: left !important;
    line-height: 1.4 !important;
}

.announcements-section .carousel-inner {
    width: 100%;
    height: 100%;
}

.announcements-section .announcement-carousel {
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
}

.announcements-section .carousel-control-prev,
.announcements-section .carousel-control-next {
    z-index: 20 !important;
}

.announcements-section .carousel-indicators {
    z-index: 20 !important;
    margin-bottom: 10px !important;
}

.announcements-section .carousel-progress-container {
    z-index: 20 !important;
}

.announcements-section .announcement-content {
    max-height: none !important;
    overflow: visible !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 1rem 1rem 1rem !important; /* No top padding to allow image to extend */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
}

.announcements-section .announcement-text {
    display: -webkit-box !important;
    -webkit-line-clamp: 6 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.05rem !important;
    flex-grow: 1 !important;
    max-height: calc(100% - 160px) !important;
    word-wrap: break-word !important;
    position: relative !important;
    z-index: 1 !important;
    color: var(--bs-body-color) !important;
    font-weight: 400 !important;
}

/* Fix image sizing in announcements */
.announcements-section .announcement-text img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 0.5rem 0 !important;
    position: relative !important;
    z-index: -1 !important;
    display: block !important;
}

.announcements-section .announcement-footer {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-top: auto !important;
    padding-top: 0.5rem !important;
    position: relative !important;
    z-index: 15 !important;
    background: var(--bs-body-bg) !important;
}

.announcements-section .announcement-date {
    font-size: 0.8rem;
    color: var(--bs-secondary);
    font-style: italic;
}

.announcements-section .read-more-btn {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.announcements-section .read-more-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Hide original search on desktop */
@media (min-width: 769px) {
    .search-container {
        display: none !important;
    }
}

/* Tablet and Mobile Responsive Grid Layouts */
@media (max-width: 1199px) {
    .dashboard-top-grid,
    .dashboard-bottom-grid,
    .announcements-section,
    .store-hours-section,
    .vip-section,
    .checkpoints-menu-bar,
    .metrics-section-full {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Ensure store hours section takes full width */
    .store-hours-section {
        grid-column: 1 / -1 !important;
    }
}

/* Smaller tablets and mobile */
@media (max-width: 992px) {
    .dashboard-top-grid,
    .dashboard-bottom-grid,
    .announcements-section,
    .store-hours-section,
    .vip-section,
    .checkpoints-menu-bar,
    .metrics-section-full {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .store-hours-section,
    .vip-section,
    .metrics-section-full {
        padding: 1rem;
    }
    
    /* Ensure store hours section takes full width and has proper spacing */
    .store-hours-section {
        grid-column: 1 / -1 !important;
        min-height: auto !important; /* Allow natural height expansion */
    }
    
    /* Store hours container improvements for tablet and mobile */
    .scrollable-store-times {
        min-height: auto !important;
        height: auto !important;
    }
    
    .section-title {
        font-size: 1.3rem !important;
    }
    
    /* section-description removed */
    
    .checkpoint-card {
        padding: 0.75rem 1.15rem;
        gap: 0.45rem;
    }
    
    .checkpoint-icon {
        font-size: 1.05rem;
    }
    
    .checkpoint-title {
        font-size: 0.85rem;
    }
    
    .checkpoints-carousel {
        gap: 0.65rem;
    }
    
    /* Store Hours Mobile - Stack Columns */
    .store-hours-section {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        border-radius: 18px !important;
    }
    
    .scrollable-store-times {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    
    .store-state-header {
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem;
    }
    
    .store-state-cards {
        gap: 0.65rem;
    }
    
    .store-time-card {
        padding: 0.75rem !important;
    }
    
    .store-status-indicator {
        width: 7px;
        height: 7px;
    }
    
    .store-name {
        font-size: 0.85rem !important;
    }
    
    .store-hours {
        font-size: 0.68rem !important;
    }
    
    .store-time {
        font-size: 1.1rem !important;
    }
    
    .store-timezone {
        font-size: 0.65rem !important;
    }
    
    /* Announcements Mobile - Dynamic height that adapts to content */
    .announcements-section .announcement-carousel {
        min-height: 420px; /* Minimum height, but can grow with content */
        height: auto; /* Allow height to adjust to content */
    }
    
    .announcements-section .announcement-content {
        padding: 1rem;
        min-height: 420px !important; /* Ensure minimum height on mobile */
    }
    
    /* Ensure buttons are always visible on mobile */
    .announcement-footer {
        position: relative !important;
        z-index: 10 !important;
        background: var(--bs-body-bg) !important;
        padding: 1rem !important;
        margin-top: auto !important;
    }
    
    .announcements-section .announcement-text {
        -webkit-line-clamp: 5;
        font-size: 0.9rem;
    }
    
    .announcements-section .read-more-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Mobile announcement typography */
    .announcement-title {
        font-size: 1.4rem !important;
    }
    
    .announcement-subtitle {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 576px) {
    .dashboard-top-grid,
    .dashboard-bottom-grid,
    .announcements-section,
    .store-hours-section,
    .vip-section,
    .checkpoints-menu-bar,
    .metrics-section-full {
        width: 100% !important;
    }
    
    .store-hours-section,
    .vip-section,
    .metrics-section-full {
        padding: 0.75rem;
    }
    
    .checkpoint-card {
        padding: 0.65rem 1rem;
        gap: 0.4rem;
    }
    
    .checkpoint-icon {
        font-size: 1rem;
    }
    
    .checkpoint-title {
        font-size: 0.8rem;
    }
    
    .checkpoints-carousel {
        gap: 0.5rem;
    }
    
    .vip-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .vip-controls .btn-group {
        width: 100%;
    }
    
    .vip-controls .btn-group .btn {
        flex: 1;
    }
    
    /* Store Hours Single Column on Small Mobile - Enhanced */
    .store-hours-section {
        padding: 0 !important; /* Remove padding for full-width on small mobile */
        margin: 0 -0.25rem 1rem -0.25rem !important; /* Negative margin to extend to edges */
        border-radius: 0 !important; /* Remove border radius for full-width effect */
    }
    
    .scrollable-store-times {
        grid-template-columns: 1fr !important;
        max-height: none !important; /* Remove height constraint to show all stores */
        gap: 0.6rem !important;
        border-radius: 0 !important; /* Remove border radius for full-width effect */
    }
    
    .store-time-card {
        min-height: 75px !important;
        padding: 0.6rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    /* Announcements Smaller on Mobile - Dynamic height that adapts to content */
    .announcements-section .announcement-carousel {
        min-height: 380px; /* Minimum height, but can grow with content */
        height: auto; /* Allow height to adjust to content */
    }
    
    .announcements-section .announcement-content {
        min-height: 380px !important; /* Ensure minimum height on smaller mobile */
    }
    
    .announcements-section .announcement-text {
        -webkit-line-clamp: 3;
        font-size: 0.85rem;
    }
    
    /* Ensure buttons are always visible on smaller mobile */
    .announcement-footer {
        position: relative !important;
        z-index: 10 !important;
        background: var(--bs-body-bg) !important;
        padding: 0.75rem !important;
        margin-top: auto !important;
    }
    
    .announcements-section .read-more-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }
}

/* Small mobile devices (phones in portrait) */
@media (max-width: 480px) {
        max-width: 300px;
    }
    
        padding: 0.75rem;
    }
    
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
        padding: 0.875rem 0.75rem;
        margin: 2px 4px;
    }
    
        padding: 0.75rem 0.75rem 0.75rem 1.75rem;
    }
    
        display: none; /* Hide descriptions on very small screens */
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
        max-width: 280px;
    }
    
        padding: 0.5rem;
    }
    
        padding: 0.5rem 0.75rem;
        min-height: 40px;
    }
    
        padding: 0.5rem 0.75rem 0.5rem 1.5rem;
        min-height: 40px;
    }
}

/* Enhanced Announcement Popup Styling */
.announcement-main-title {
    font-size: 2.5rem !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    color: #1a1a1a !important;
    text-align: left !important;
    margin-bottom: 1rem !important;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.announcement-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: #6c757d;
    text-align: left !important;
    line-height: 1.4;
    font-style: italic;
}

.announcement-date {
    font-size: 0.95rem;
    color: #868e96;
    text-align: left !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.announcement-separator {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #007bff, transparent);
    margin: 1.5rem 0;
    opacity: 0.6;
}

.announcement-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}


/* Modal enhancements */
#newAnnouncementPopup .modal-content,
#announcementModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Fix z-index layering for modal headers */
#announcementModal .modal-header {
    position: relative;
    z-index: 10;
}

/* Ensure close button is on top */
#newAnnouncementPopup .modal-header .btn-close,
#announcementModal .modal-header .btn-close {
    position: relative;
    z-index: 15;
}

/* Content formatting inside announcement modal */
#newAnnouncementPopup .announcement-body-content,
#announcementModal .announcement-body-content {
    font-size: 1rem;
    line-height: 1rem;
    color: #212529;
}

/* Ensure images don't cause horizontal scroll */
#newAnnouncementPopup .announcement-body-content img,
#announcementModal .announcement-body-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.75rem 0;
}

/* Announcement modal staff dropdown styling */
#announcementModalStaffDropdown {
    position: fixed !important;
    z-index: 99999 !important;
    max-height: none !important;
    overflow-y: visible !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 0.375rem;
}

/* Make the dropdown appear above the input when it's near the bottom */
#announcementModalAcknowledgment .position-relative {
    position: static !important;
}

#announcementModalStaffName {
    position: relative;
    z-index: 1;
}

#announcementModalStaffDropdown .dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
}

#announcementModalStaffDropdown .dropdown-item.acknowledged {
    background-color: #f0f9ff;
    border-left: 3px solid #198754;
}

#announcementModalStaffDropdown .dropdown-item:last-child {
    border-bottom: none;
}

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

#announcementModalStaffDropdown .dropdown-item.acknowledged:hover {
    background-color: #e6f4ea;
}

#announcementModalStaffDropdown .dropdown-item strong {
    display: block;
    font-size: 0.95rem;
    color: #212529;
}

#announcementModalStaffDropdown .dropdown-item small {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

#newAnnouncementPopup .announcement-body-content p,
#announcementModal .announcement-body-content p {
    margin-bottom: 1rem;
}

/* Removed: strong tags should inherit color, not be forced blue */

#newAnnouncementPopup .announcement-body-content h1,
#newAnnouncementPopup .announcement-body-content h2,
#newAnnouncementPopup .announcement-body-content h3,
#newAnnouncementPopup .announcement-body-content h4,
#announcementModal .announcement-body-content h1,
#announcementModal .announcement-body-content h2,
#announcementModal .announcement-body-content h3,
#announcementModal .announcement-body-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #212529;
}

#newAnnouncementPopup .announcement-body-content ul,
#newAnnouncementPopup .announcement-body-content ol,
#announcementModal .announcement-body-content ul,
#announcementModal .announcement-body-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

#newAnnouncementPopup .announcement-body-content li,
#announcementModal .announcement-body-content li {
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .announcement-main-title {
        font-size: 2rem !important;
    }
    
    .announcement-subtitle {
        font-size: 1.1rem;
    }
    
    #newAnnouncementPopup .modal-body,
    #announcementModal .modal-body {
        padding: 1.5rem !important;
    }
    
    #newAnnouncementPopup .modal-footer,
    #announcementModal .modal-footer {
        padding: 1rem 1.5rem !important;
    }
    
    #newAnnouncementPopup .modal-header,
    #announcementModal .modal-header {
        padding: 1.25rem 1.5rem !important;
    }
}

/* Additional carousel styling improvements */
.announcement-content {
    padding: 1.5rem !important;
}

.announcement-header-section {
    text-align: left !important;
}

.announcement-header-section h4 {
    margin-bottom: 0.75rem !important;
}

.announcement-header-section p {
    margin-bottom: 0.75rem !important;
}

/* Responsive adjustments for carousel */
@media (max-width: 768px) {
    .announcement-title {
        font-size: 1.5rem !important;
    }
    
    .announcement-subtitle {
        font-size: 1rem !important;
        /* Limit to 1 line on mobile */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
    
    .announcement-content {
        padding: 1rem !important;
    }
}

@media (max-width: 576px) {
    .announcement-title {
        font-size: 1.3rem !important;
    }
    
    .announcement-subtitle {
        font-size: 0.95rem !important;
        /* Ensure 1 line limit on very small screens too */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
}

/* Fix announcement modal z-index layering issues */
#newAnnouncementPopup .modal-header,
#announcementModal .modal-header {
    position: relative;
    z-index: 10 !important;
}

#newAnnouncementPopup .modal-header .btn-close,
#announcementModal .modal-header .btn-close {
    position: relative;
    z-index: 15 !important;
}

/* Dark Mode Adjustments for Announcement Modal */
[data-bs-theme="dark"] #announcementModal .modal-content,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-content {
    background-color: #1a1a1a;
    border: 1px solid #333;
}

[data-bs-theme="dark"] #announcementModal .modal-body,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body {
    background-color: #1a1a1a;
    color: #e9ecef;
}

[data-bs-theme="dark"] #announcementModal .modal-footer,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-footer {
    background: linear-gradient(to bottom, #1a1a1a 0%, #0d0d0d 100%) !important;
    border-top: 1px solid #333;
}

[data-bs-theme="dark"] #announcementModalContent,
[data-bs-theme="dark"] .announcement-body-content {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] #announcementModalContent p,
[data-bs-theme="dark"] .announcement-body-content p,
[data-bs-theme="dark"] #announcementModalContent li,
[data-bs-theme="dark"] .announcement-body-content li {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] #announcementModalContent h1,
[data-bs-theme="dark"] #announcementModalContent h2,
[data-bs-theme="dark"] #announcementModalContent h3,
[data-bs-theme="dark"] #announcementModalContent h4,
[data-bs-theme="dark"] .announcement-body-content h1,
[data-bs-theme="dark"] .announcement-body-content h2,
[data-bs-theme="dark"] .announcement-body-content h3,
[data-bs-theme="dark"] .announcement-body-content h4 {
    color: #f8f9fa !important;
}

/* Removed: strong tags should inherit color in dark mode too */

[data-bs-theme="dark"] #announcementModalSubtitle {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15) 0%, rgba(13, 110, 253, 0.08) 100%) !important;
    border-left: 4px solid #0d6efd !important;
    color: #e9ecef !important;
}

[data-bs-theme="dark"] #announcementModalSubtitle span {
    color: #e9ecef !important;
}

/* Dark mode for acknowledgment section */
[data-bs-theme="dark"] #announcementModalAcknowledgment .alert {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.15) 0%, rgba(25, 135, 84, 0.08) 100%) !important;
    border-left: 4px solid #198754 !important;
}

[data-bs-theme="dark"] #announcementModalStaffName {
    background-color: #2b2b2b;
    border-color: #444;
    color: #e9ecef;
}

[data-bs-theme="dark"] #announcementModalStaffDropdown {
    background: #2b2b2b;
    border: 1px solid #444;
}

[data-bs-theme="dark"] #announcementModalStaffDropdown .dropdown-item {
    background: #2b2b2b;
    color: #e9ecef;
    border-bottom: 1px solid #444;
}

[data-bs-theme="dark"] #announcementModalStaffDropdown .dropdown-item:hover {
    background-color: #383838;
}

[data-bs-theme="dark"] #announcementModalStaffDropdown .dropdown-item.acknowledged {
    background-color: rgba(25, 135, 84, 0.2);
    border-left: 3px solid #198754;
}

[data-bs-theme="dark"] #announcementModalStaffDropdown .dropdown-item.acknowledged:hover {
    background-color: rgba(25, 135, 84, 0.3);
}

[data-bs-theme="dark"] #announcementModalStaffDropdown .dropdown-item strong {
    color: #f8f9fa;
}

[data-bs-theme="dark"] #announcementModalStaffDropdown .dropdown-item small {
    color: #adb5bd;
}

/* Dark mode for buttons */
[data-bs-theme="dark"] .btn-secondary {
    background-color: #444;
    border-color: #555;
    color: #e9ecef;
}

[data-bs-theme="dark"] .btn-secondary:hover {
    background-color: #555;
    border-color: #666;
}

/* Dark mode for modal backdrop to make it darker */
[data-bs-theme="dark"] .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Ensure Quill editor content in dark mode */
[data-bs-theme="dark"] .ql-editor {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] .ql-editor p,
[data-bs-theme="dark"] .ql-editor li,
[data-bs-theme="dark"] .ql-editor span {
    color: #e9ecef !important;
}

/* Catch all remaining text elements in modal that might be black */
[data-bs-theme="dark"] #announcementModal .modal-body *,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body * {
    color: inherit;
}

[data-bs-theme="dark"] #announcementModal .modal-body,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body,
[data-bs-theme="dark"] #announcementModalContent,
[data-bs-theme="dark"] #announcementModalContent *,
[data-bs-theme="dark"] .announcement-content-wrapper,
[data-bs-theme="dark"] .announcement-content-wrapper * {
    color: #e9ecef !important;
}

/* Specific overrides for common elements */
[data-bs-theme="dark"] #announcementModal .modal-body div,
[data-bs-theme="dark"] #announcementModal .modal-body span,
[data-bs-theme="dark"] #announcementModal .modal-body em,
[data-bs-theme="dark"] #announcementModal .modal-body i:not(.fa):not(.fas),
[data-bs-theme="dark"] #announcementModal .modal-body u,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body div,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body span,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body em,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body i:not(.fa):not(.fas),
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body u {
    color: #e9ecef !important;
}

/* Links in dark mode */
[data-bs-theme="dark"] #announcementModal .modal-body a,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body a {
    color: #6ea8fe !important;
}

/* Code blocks and preformatted text */
[data-bs-theme="dark"] #announcementModal .modal-body pre,
[data-bs-theme="dark"] #announcementModal .modal-body code,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body pre,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body code {
    background-color: #2b2b2b;
    color: #e9ecef !important;
    border: 1px solid #444;
}

/* Blockquotes */
[data-bs-theme="dark"] #announcementModal .modal-body blockquote,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body blockquote {
    border-left: 4px solid #6ea8fe;
    color: #e9ecef !important;
}

/* Tables in modal */
[data-bs-theme="dark"] #announcementModal .modal-body table,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body table {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] #announcementModal .modal-body table th,
[data-bs-theme="dark"] #announcementModal .modal-body table td,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body table th,
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body table td {
    border-color: #444;
    color: #e9ecef !important;
}

/* Override any inline styles that might set color to black */
[data-bs-theme="dark"] #announcementModal .modal-body [style*="color: #212529"],
[data-bs-theme="dark"] #announcementModal .modal-body [style*="color: black"],
[data-bs-theme="dark"] #announcementModal .modal-body [style*="color:#212529"],
[data-bs-theme="dark"] #announcementModal .modal-body [style*="color:black"],
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body [style*="color: #212529"],
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body [style*="color: black"],
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body [style*="color:#212529"],
[data-bs-theme="dark"] #newAnnouncementPopup .modal-body [style*="color:black"] {
    color: #e9ecef !important;
}

/* Mobile Title Improvements */
@media (max-width: 768px) {
    .dashboard-header .display-5 {
        font-size: 2rem !important;
        font-weight: 800 !important;
        letter-spacing: -0.02em;
    }
}

@media (max-width: 576px) {
    .dashboard-header .display-5 {
        font-size: 1.85rem !important;
        font-weight: 800 !important;
    }
}

/* Date Badge - Keep Left Aligned */
.current-date-display {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
}

.date-badge {
    margin-left: 0 !important;
    display: inline-flex !important;
    justify-content: flex-start !important;
}

.date-badge span {
    text-align: left !important;
}

@media (max-width: 480px) {
    .date-badge {
        width: auto !important;
        justify-content: flex-start !important;
    }
}

/* Store Hours Section Improvements */
.store-hours-section {
    border-radius: 16px !important;
    overflow: hidden;
    padding: 1.5rem !important;
}

/* Add consistent internal padding like metrics section */
.scrollable-store-times {
    padding: 0 !important;
    margin-top: 1rem;
}

/* Store info and details styling */
.store-time-card .store-info {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    flex: 1 !important;
}

.store-time-card .store-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.1rem !important;
}

.store-time-card .store-name {
    font-size: 0.85rem !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.store-time-card .store-hours {
    margin: 0 !important;
    font-size: 0.65rem !important;
    line-height: 1.2 !important;
}

.store-time-card .store-extension {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.2rem 0.5rem !important;
    background: rgba(13, 110, 253, 0.1) !important;
    border: 1px solid rgba(13, 110, 253, 0.2) !important;
    border-radius: 6px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: #0d6efd !important;
    flex-shrink: 0 !important;
}

[data-bs-theme="dark"] .store-time-card .store-extension {
    background: rgba(13, 110, 253, 0.2) !important;
    border-color: rgba(13, 110, 253, 0.3) !important;
    color: #6ea8fe !important;
}

/* Mobile adjustments for store cards */
@media (max-width: 768px) {
    .store-time-card {
        flex-direction: row !important;
        padding: 0.6rem 0.75rem !important;
    }
    
    .store-time-card .store-info {
        gap: 0.5rem !important;
    }
    
    .store-time-card .store-name {
        font-size: 0.8rem !important;
    }
    
    .store-time-card .store-extension {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.4rem !important;
    }
}

/* Section Title Headers */
.section-title-header {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1a1d23;
    margin-top: 0;
    display: flex;
    align-items: center;
}

[data-bs-theme="dark"] .section-title-header {
    color: #ffffff;
}

.section-title-header i {
    color: #0d6efd;
    opacity: 0.9;
}

[data-bs-theme="dark"] .section-title-header i {
    color: #6ea8fe;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.back-to-top-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.5);
}

.back-to-top-btn:active {
    transform: scale(0.95);
}

[data-bs-theme="dark"] .back-to-top-btn {
    background: linear-gradient(135deg, #3d8bfd 0%, #2563eb 100%);
    box-shadow: 0 4px 16px rgba(61, 139, 253, 0.4);
}

[data-bs-theme="dark"] .back-to-top-btn:hover {
    box-shadow: 0 8px 24px rgba(61, 139, 253, 0.5);
}

@media (max-width: 768px) {
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* =================================================================
   VIP FULLSCREEN MODAL STYLES
   Make everything bigger and bolder in fullscreen mode
   Truly fill the screen with larger, more readable content
   ================================================================= */

/* Fullscreen modal container - Use full width */
#vipFullscreenModal .modal-body {
    padding: 1.5rem 2rem;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

#vipFullscreenModal .modern-vip-container {
    gap: 2.5rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Bigger promotion headers in fullscreen */
#vipFullscreenModal .promotion-header-modern {
    padding: 1.75rem 2.5rem;
    border-radius: 20px 20px 0 0;
}

#vipFullscreenModal .promotion-name {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

#vipFullscreenModal .promotion-name span {
    font-size: 2rem;
    font-weight: 800;
}

/* Much bigger dates in fullscreen */
#vipFullscreenModal .promotion-dates {
    font-size: 1.25rem;
    gap: 2rem;
    margin-top: 0.75rem;
}

#vipFullscreenModal .store-dates,
#vipFullscreenModal .warehouse-dates {
    font-size: 1.25rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
}

#vipFullscreenModal .store-dates i,
#vipFullscreenModal .warehouse-dates i {
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

#vipFullscreenModal .promotion-notes {
    font-size: 1.15rem;
    margin-top: 1rem;
    opacity: 0.9;
}

/* Bigger product grid spacing */
#vipFullscreenModal .products-grid-container {
    padding: 2rem 2.5rem;
}

#vipFullscreenModal .products-grid .row {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
}

/* Bigger product cards in fullscreen */
#vipFullscreenModal .compact-product-card {
    min-height: 200px;
    height: 100%;
    border-radius: 16px !important;
    border-width: 2px !important;
    transition: all 0.2s ease;
}

#vipFullscreenModal .compact-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.15) !important;
}

#vipFullscreenModal .compact-product-card .card-body {
    padding: 1.5rem !important;
    display: flex;
    flex-direction: column;
}

/* Much bigger product names */
#vipFullscreenModal .compact-product-card .product-name {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 1rem;
    min-height: auto;
    -webkit-line-clamp: 3;
    letter-spacing: -0.01em;
}

#vipFullscreenModal .compact-product-card .product-ean {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

#vipFullscreenModal .compact-product-card .fw-mono {
    font-size: 1.05rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
}

/* Bigger pricing in fullscreen */
#vipFullscreenModal .compact-product-card .pricing-section {
    margin-top: auto;
    padding-top: 0.75rem;
}

#vipFullscreenModal .compact-product-card .rrp-price {
    font-size: 1.2rem;
}

#vipFullscreenModal .compact-product-card .promo-price {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

#vipFullscreenModal .compact-product-card .rebate-info {
    font-size: 1.05rem !important;
    padding: 0.5rem 1rem;
    margin-top: 0.75rem;
    border-radius: 8px;
}

/* Responsive grid - fill the screen */
#vipFullscreenModal .products-grid .col-lg-3,
#vipFullscreenModal .products-grid .col-md-4,
#vipFullscreenModal .products-grid .col-sm-6 {
    flex: 0 0 auto;
}

/* Default: 4 columns */
#vipFullscreenModal .products-grid .col-lg-3,
#vipFullscreenModal .products-grid .col-md-4 {
    width: 25%;
}

/* Large screens (1400px+): 5 columns */
@media (min-width: 1400px) {
    #vipFullscreenModal .products-grid .col-lg-3,
    #vipFullscreenModal .products-grid .col-md-4 {
        width: 20%;
    }
    
    #vipFullscreenModal .compact-product-card .product-name {
        font-size: 1.4rem;
    }
    
    #vipFullscreenModal .compact-product-card .promo-price {
        font-size: 1.85rem;
    }
    
    #vipFullscreenModal .promotion-name,
    #vipFullscreenModal .promotion-name span {
        font-size: 2.25rem;
    }
    
    #vipFullscreenModal .promotion-dates,
    #vipFullscreenModal .store-dates,
    #vipFullscreenModal .warehouse-dates {
        font-size: 1.35rem;
    }
}

/* Extra large screens (1800px+): 6 columns */
@media (min-width: 1800px) {
    #vipFullscreenModal .products-grid .col-lg-3,
    #vipFullscreenModal .products-grid .col-md-4 {
        width: 16.666667%;
    }
    
    #vipFullscreenModal .compact-product-card .product-name {
        font-size: 1.5rem;
    }
    
    #vipFullscreenModal .compact-product-card .promo-price {
        font-size: 2rem;
    }
    
    #vipFullscreenModal .promotion-name,
    #vipFullscreenModal .promotion-name span {
        font-size: 2.5rem;
    }
    
    #vipFullscreenModal .promotion-dates,
    #vipFullscreenModal .store-dates,
    #vipFullscreenModal .warehouse-dates {
        font-size: 1.5rem;
    }
}

/* Ultra wide screens (2200px+): even bigger */
@media (min-width: 2200px) {
    #vipFullscreenModal .products-grid .col-lg-3,
    #vipFullscreenModal .products-grid .col-md-4 {
        width: 14.285714%; /* 7 columns */
    }
    
    #vipFullscreenModal .compact-product-card {
        min-height: 220px;
    }
    
    #vipFullscreenModal .compact-product-card .product-name {
        font-size: 1.6rem;
    }
    
    #vipFullscreenModal .compact-product-card .promo-price {
        font-size: 2.2rem;
    }
}

/* Tablet adjustments for fullscreen */
@media (max-width: 1199px) {
    #vipFullscreenModal .modal-body {
        padding: 1.25rem;
    }
    
    #vipFullscreenModal .products-grid .col-lg-3,
    #vipFullscreenModal .products-grid .col-md-4 {
        width: 33.333333%;
    }
    
    #vipFullscreenModal .compact-product-card {
        min-height: 180px;
    }
    
    #vipFullscreenModal .compact-product-card .product-name {
        font-size: 1.2rem;
    }
    
    #vipFullscreenModal .compact-product-card .promo-price {
        font-size: 1.5rem;
    }
    
    #vipFullscreenModal .promotion-name,
    #vipFullscreenModal .promotion-name span {
        font-size: 1.75rem;
    }
    
    #vipFullscreenModal .promotion-dates,
    #vipFullscreenModal .store-dates,
    #vipFullscreenModal .warehouse-dates {
        font-size: 1.1rem;
    }
}

/* Mobile adjustments for fullscreen */
@media (max-width: 767px) {
    #vipFullscreenModal .modal-body {
        padding: 0.75rem;
    }
    
    #vipFullscreenModal .promotion-header-modern {
        padding: 1rem 1.25rem;
    }
    
    #vipFullscreenModal .promotion-name,
    #vipFullscreenModal .promotion-name span {
        font-size: 1.35rem;
    }
    
    #vipFullscreenModal .promotion-dates,
    #vipFullscreenModal .store-dates,
    #vipFullscreenModal .warehouse-dates {
        font-size: 0.95rem;
        padding: 0.35rem 0.6rem;
    }
    
    #vipFullscreenModal .products-grid .col-lg-3,
    #vipFullscreenModal .products-grid .col-md-4,
    #vipFullscreenModal .products-grid .col-sm-6 {
        width: 50%;
    }
    
    #vipFullscreenModal .compact-product-card {
        min-height: 150px;
    }
    
    #vipFullscreenModal .compact-product-card .card-body {
        padding: 1rem !important;
    }
    
    #vipFullscreenModal .compact-product-card .product-name {
        font-size: 1rem;
    }
    
    #vipFullscreenModal .compact-product-card .promo-price {
        font-size: 1.25rem;
    }
    
    #vipFullscreenModal .products-grid-container {
        padding: 1rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    #vipFullscreenModal .products-grid .col-lg-3,
    #vipFullscreenModal .products-grid .col-md-4,
    #vipFullscreenModal .products-grid .col-sm-6 {
        width: 100%;
    }
    
    #vipFullscreenModal .compact-product-card .product-name {
        font-size: 1.15rem;
    }
    
    #vipFullscreenModal .compact-product-card .promo-price {
        font-size: 1.4rem;
    }
}

/* Fullscreen modal header styling */
#vipFullscreenModal .modal-header {
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

#vipFullscreenModal .modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Modern section styling in fullscreen */
#vipFullscreenModal .modern-promotion-section {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] #vipFullscreenModal .modern-promotion-section {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] #vipFullscreenModal .store-dates,
[data-bs-theme="dark"] #vipFullscreenModal .warehouse-dates {
    background: rgba(0, 0, 0, 0.2);
}


