@charset "UTF-8";

/* Modern Dashboard Styles - Optimized Version */
:root {
    /* Primary color scheme */
    --primary-color: #a71f37;
    --primary-light: #e7c9ce;
    --primary-dark: #85182a;
    --secondary-color: #344955;
    --accent-color: #f9aa33;
    --text-dark: #333333;
    --text-light: #f5f5f5;
    --bg-light: #f8f9fa;
    --bg-medium: #e9ecef;
    --border-color: #dee2e6;
    /* Visual effects */
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.2s;
    /* Tab colors */
    --equipment-color: #f76807;
    --company-color: #56882a;
    --country-color: #1d71b8;
    --market-color: #a71f37;
    --annual-color: #f1b51c;
    --other-color: #6c757d;
    --global-market-color: #f76807;
    --electric-equipment-color: #a71f37;
    --archive-color: #6c757d;
    --special-equipment-color: #e74c3c; /* Bright red */
    --global-volume-color: #27ae60; /* Emerald green */
    --special-country-color: #3498db; /* Bright blue */
    /* Spacing variables */
    --card-spacing: 20px;
    --item-spacing: 16px;
    --content-padding: 15px;
}

/* === Container fixes to prevent overflow === */
.dashboard-container {
    margin-top: 0;
    padding-bottom: 0;
    overflow: visible; /* Changed to visible to allow scrollable children */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Scrollable content containment */
.scrollable-content {
    overflow-y: auto;
    max-height: 500px; /* Will scroll if content exceeds this height */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: rgba(0,0,0,0.2) transparent; /* For Firefox */
}

    .scrollable-content::-webkit-scrollbar {
        width: 6px;
    }

    .scrollable-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .scrollable-content::-webkit-scrollbar-thumb {
        background-color: rgba(0,0,0,0.2);
        border-radius: 3px;
    }

/* Fix space above dashboard title */
section.content {
    padding-top: 0 !important;
}

/* No gap between header and dashboard – seamless band with header */
body:has(.dashboard-section) main#site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Below hero: main and sides use same bg as content body (no cover on sides) */
section.content.dashboard-section {
    background-color: var(--bg-light) !important;
}
body:has(.dashboard-section) main#site-content {
    background-color: var(--bg-light) !important;
    background-image: none !important;
}

.dashboard-section {
    overflow-x: hidden;
}

/* Remove all vertical padding so cover banner has no white strip and image continuity with header */
section.content.dashboard-section {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.dashboard-section .container {
    padding-bottom: 0 !important;
}

/* Align header logo and nav with dashboard hero: same left as Client Dashboard, same right as profile greeting box */
body:has(.dashboard-section) header#site-header .container,
body:has(.dashboard-section) header#site-header .container-fluid {
    padding-left: 20px !important;
    padding-right: 28px !important;
    box-sizing: border-box;
}
body:has(.dashboard-section) header#site-header #logo {
    padding-left: 12px !important;
}
@media (min-width: 1400px) {
    body:has(.dashboard-section) header#site-header .container,
    body:has(.dashboard-section) header#site-header .container-fluid {
        max-width: 1600px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Hide "In this section" sub-nav on client dashboard at small resolutions */
@media (max-width: 991px) {
    body:has(.dashboard-section) .in-this-section {
        display: none !important;
    }
}

/* Dashboard content: wider for more space under hero, slightly more width to the left */
.dashboard-content-container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 28px;
}

@media (min-width: 1400px) {
    .dashboard-content-container {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Gray background for entire area under hero (nav + content blocks) */
.dashboard-content-container {
    background-color: var(--bg-light);
    padding-bottom: 32px;
    /* Light dividing line between hero and navigation */
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body {
    background-color: #f4f5f7;
}

/* === Full-width hero banner === */
.dashboard-hero-fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 0;
}

/* === Dashboard Cover Banner – same image as header, fixed so they read as one piece === */
.dashboard-cover-banner {
    background-image: url('/img/ohr-cover.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--primary-dark);
    overflow: visible;
    padding: 28px 0 32px;
}
@media (prefers-reduced-motion: reduce), (max-width: 1023px) {
    .dashboard-cover-banner {
        background-attachment: scroll;
    }
}

/* Continuity option: gradient blend at bottom into next section (no hard edge) */
.dashboard-cover-banner--blend::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--bg-light));
    pointer-events: none;
}
.dashboard-cover-banner--blend {
    position: relative;
}

/* Continuity option: 30/70 vertical split – title 30%, welcome card 70% */
.dashboard-cover-banner--30-70 .dashboard-hero-inner {
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 24px;
    align-items: end;
    justify-content: space-between;
}
.dashboard-cover-banner--30-70 .dashboard-title {
    flex: unset;
}
.dashboard-cover-banner--30-70 .welcome-banner {
    flex: unset;
    min-width: 0;
    max-width: 70%;
    margin-left: 0;
}
@media (max-width: 991px) {
    .dashboard-cover-banner--30-70 .dashboard-hero-inner {
        grid-template-columns: 1fr;
    }
    .dashboard-cover-banner--30-70 .welcome-banner {
        max-width: 100%;
    }
}

/* Inner wrapper - aligns hero content with data blocks below (same width constraints) */
.dashboard-hero-inner {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 28px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

@media (min-width: 1400px) {
    .dashboard-hero-inner {
        max-width: 1600px;
    }
}

/* Impersonation badge - subtle bar at top of welcome card, flows with layout */
.impersonate-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f4f8;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    margin-bottom: 4px;
}
.impersonate-badge i {
    flex-shrink: 0;
    color: #64748b;
}
.impersonate-badge strong {
    color: #334155;
    font-weight: 600;
}
.dashboard-hero-inner {
    position: relative;
}

/* Title left, profile card right */
.dashboard-cover-banner .dashboard-title {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.dashboard-cover-banner .welcome-banner {
    background: transparent;
    box-shadow: none;
    border: none;
    margin-bottom: 0;
    flex: 0 0 40%;
    margin-left: auto;
    min-width: 280px;
}


/* Ensure white text on cover for dashboard title when on dark background */
.dashboard-cover-banner .dashboard-title h1 {
    color: white !important;
}


/* White/cream card for greeting on cover - fills 40% column; 24px left so content aligns with notification block */
.dashboard-cover-banner .welcome-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #fafaf9;
    border-radius: 0;
    padding: 20px 24px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.dashboard-cover-banner .welcome-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
    font-size: 16px;
    font-weight: 600;
    font-style: normal;
    color: #000000;
}

.dashboard-cover-banner .welcome-heading .greeting,
.dashboard-cover-banner .welcome-heading .user-name,
.dashboard-cover-banner .welcome-heading .company-separator,
.dashboard-cover-banner .welcome-heading .company-name {
    color: #000000 !important;
    font-weight: 600 !important;
    font-style: normal !important;
    font-size: 16px !important;
}

.dashboard-cover-banner .welcome-heading .company-name::before {
    content: none;
}

.dashboard-cover-banner .welcome-heading .company-name {
    padding-left: 0;
}

.dashboard-cover-banner .welcome-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.dashboard-cover-banner .welcome-bottom-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-cover-banner .user-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.2;
}

.dashboard-cover-banner .user-details .user-display-name,
.dashboard-cover-banner .user-details .user-email {
    margin: 0;
}

.dashboard-cover-banner .user-display-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.dashboard-cover-banner .welcome-bottom-left .user-avatar {
    margin-right: 0;
    border-color: #e5e7eb;
    background-color: #f3f4f6;
    color: #6b7280;
}

.dashboard-cover-banner .welcome-bottom-left .user-avatar span,
.dashboard-cover-banner .welcome-bottom-left .user-avatar img {
    color: #6b7280;
}

.dashboard-cover-banner .user-email {
    font-size: 13px;
    color: #6b7280;
}

.dashboard-cover-banner .welcome-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.dashboard-cover-banner .access-key-toggle {
    color: var(--primary-color) !important;
    padding: 6px;
    border-radius: 6px;
}

.dashboard-cover-banner .access-key-toggle i {
    font-size: 18px;
}

.dashboard-cover-banner .access-key-toggle:hover {
    background-color: rgba(167, 31, 55, 0.1);
}

/* === Dashboard title - More compact === */
.dashboard-title {
    display: flex;
    align-items: center;
    margin: 0 0 20px 0;
    padding-top: 0;
    transition: all var(--transition-speed);
    cursor: pointer;
}

.title-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #a71f37, #851830);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(167, 31, 55, 0.25);
}

.dashboard-title h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Add hover effects for dashboard heading */
.dashboard-title:hover {
    transform: translateY(-2px);
}

    .dashboard-title:hover .title-icon {
        background: linear-gradient(135deg, #851830, #a71f37);
        box-shadow: 0 4px 8px rgba(167, 31, 55, 0.4);
    }

    .dashboard-title:hover h1 {
        color: var(--primary-color);
    }

/* Subtle transition for smoother hover effect */
.dashboard-title, .dashboard-title .title-icon, .dashboard-title h1 {
    transition: all 0.2s ease-in-out;
}

/* === Welcome banner - Reduced height === */
.welcome-banner {
    background: linear-gradient(to right, rgba(167, 31, 55, 0.9), rgba(167, 31, 55, 0.7));
    border-radius: 10px;
    margin-bottom: 36px;
    box-shadow: 0 6px 16px rgba(167, 31, 55, 0.18);
    overflow: visible;
    border: 1px solid rgba(167, 31, 55, 0.24);
}

.welcome-content {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.welcome-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
}

.welcome-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    margin-right: 14px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-avatar:hover {
    transform: scale(1.05);
    border-color: white;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}


/* Letter-avatar: center initial in circle (position + transform = reliable cross-browser) */
.user-avatar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: 18px;
    font-weight: 600;
    color: inherit;
    text-align: center;
    display: block;
    border-radius: 0;
}

.user-avatar img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: none;
}

.user-avatar .gravatar-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    color: white;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
}

.greeting {
    font-size: 13px;
    opacity: 0.9;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
}

.company-name {
    font-size: 13px;
    opacity: 0.8;
    font-style: italic;
    position: relative;
    padding-left: 8px;
}

.company-name::before {
    content: "\2022";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.user-avatar img {
    object-fit: cover;
    display: none;
}

.welcome-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.welcome-actions > * + * {
    margin-left: 6px;
}

.access-key-toggle {
    background-color: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color var(--transition-speed);
}

.access-key-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.access-key-toggle i {
    font-size: 16px;
}


    .last-login i {
        margin-right: 5px;
    }

/* === Stats Cards - IMPROVED SPACING & ALIGNMENT === */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px; /* Increased spacing between stat cards */
    margin-bottom: 20px; /* More space below stats container */
}

.stat-card {
    background-color: white;
    border-radius: 6px;
    box-shadow: var(--card-shadow);
    padding: 15px; /* Consistent padding */
    display: flex;
    align-items: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    height: 70px; /* Fixed height for consistency */
}

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

.stat-icon {
    background-color: rgba(167, 31, 55, 0.1);
    color: var(--primary-color);
    width: 40px; /* Slightly larger */
    height: 40px; /* Slightly larger */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    flex-shrink: 0; /* Prevent icon shrinking */
}

.stat-info {
    flex: 1;
    display: flex; /* Use flex for better alignment */
    flex-direction: column;
    justify-content: center;
}

    .stat-info h3 {
        font-size: 13px;
        font-weight: 500;
        margin: 0 0 6px 0; /* More space between title and number */
        color: var(--text-dark);
        line-height: 1.2;
        white-space: nowrap; /* Keep title on one line */
    }

.stat-number {
    font-size: 20px; /* Larger number */
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1; /* Tighter line height */
}

/* === Top row: Global Reports + Notifications (bordering) - 60% reports, 40% notifications === */
.dashboard-top-row {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
    align-items: start;
    margin-top: 24px;
}

.dashboard-notifications-sidebar {
    position: sticky;
    top: 24px;
    width: 100%;
    min-width: 0;
}

/* Global Reports block: width fits 6 report cards; notification block unchanged */
.dashboard-card--bordering {
    max-width: 1500px;
}

/* Full-width sections (New Reports, Store Purchases, Featured) - max width so row has equal start/end padding */
.dashboard-full-width {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

@media (max-width: 1200px) {
    .dashboard-top-row {
        grid-template-columns: 3fr 2fr;
    }

    .dashboard-notifications-sidebar {
        width: 100%;
        min-width: 0;
    }

    .dashboard-cover-banner .welcome-banner {
        flex: 0 0 400px;
    }

    .dashboard-cover-banner .welcome-content {
        max-width: 400px;
    }
}

@media (max-width: 992px) {
    .dashboard-top-row {
        grid-template-columns: 1fr;
    }

    .dashboard-notifications-sidebar {
        order: -1;
        position: static;
        width: 100%;
        min-width: 100%;
    }

    .notification-center-card {
        max-width: none;
    }

    .dashboard-cover-banner .welcome-banner {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .dashboard-cover-banner .welcome-content {
        max-width: 100%;
    }
}

/* === 6 reports per row grid with smaller covers (matches design) === */
.reports-grid-container {
    padding: 0;
    overflow: visible;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
    border: none;
    border-top: 1px solid #e5e7eb;
}

.reports-grid-card .card-body {
    padding: 0;
}

.reports-grid-card {
    max-height: none;
}

.reports-grid-card .no-data-message {
    padding: 24px 20px;
    margin: 0;
}

.reports-grid-card .featured-reports-actions {
    padding: 16px 20px;
}

.reports-grid {
    display: grid;
    gap: 16px;
    padding: 20px;
}

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

/* Bordering notification: 3 per row, smaller cards */
.reports-grid-bordering {
    grid-template-columns: repeat(3, 1fr);
}

.reports-grid-bordering > .report-card,
.reports-grid-bordering > a.report-card {
    aspect-ratio: 4 / 5;
}

.reports-grid-bordering .report-card__content {
    padding: 12px 14px;
    text-align: left;
}

.reports-grid-bordering .report-card__heading {
    font-size: 0.82rem;
}

.reports-grid-bordering .report-card__overline {
    font-size: 9px;
}

/* Full width: 6 per row, cards expand to use full width of report block */
.reports-grid-fullwidth {
    grid-template-columns: repeat(6, minmax(200px, 1fr));
    align-items: start;
    width: 100%;
}

.reports-grid-fullwidth > .report-card,
.reports-grid-fullwidth > a.report-card {
    aspect-ratio: 4 / 5;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* Equal left/right padding so content has equal white space; reports start at same point */
.reports-grid-fullwidth .report-card__content {
    padding: 12px 14px;
    text-align: left;
}

.reports-grid-fullwidth .report-card__heading {
    font-size: 0.82rem;
}

.reports-grid-fullwidth .report-card__overline {
    font-size: 9px;
}

@media (max-width: 992px) {
    .reports-grid-bordering,
    .reports-grid-fullwidth {
        grid-template-columns: repeat(4, 1fr);
    }

    .reports-grid-fullwidth > .report-card,
    .reports-grid-fullwidth > a.report-card {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .reports-grid-bordering,
    .reports-grid-fullwidth {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .reports-grid-bordering,
    .reports-grid-fullwidth {
        grid-template-columns: 1fr;
    }
}

/* Legacy reports-grid-6 for region views */
.reports-grid-6 > .report-card,
.reports-grid-6 > a.report-card {
    aspect-ratio: 3 / 4;
}

.reports-grid-6 .report-card__content {
    padding: 12px 14px;
}

.reports-grid-6 .report-card__heading {
    font-size: 0.9rem;
}

.reports-grid-6 .report-card__overline {
    font-size: 10px;
}

@media (max-width: 1400px) {
    .reports-grid-6 {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .reports-grid-6 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .reports-grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .reports-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .reports-grid-6 {
        grid-template-columns: 1fr;
    }
}

/* === Main Dashboard Layout (legacy) === */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 5px;
}

.dashboard-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e1e4ea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 0;
    height: auto;
}

.dashboard-card .card-body {
    background-color: #ffffff;
    border-radius: 10px;
}

.card-header {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 20px;
}

.card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.card-header h3 i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

.card-body {
    padding: 15px;
    flex: 1;
    overflow: auto;
}

/* === Store Items Grid - 2 per row with PROPER TITLES === */
.store-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px; /* Increased spacing between items */
}

.store-item {
    display: flex;
    height: 85px; /* Slightly taller for titles */
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    border-radius: 5px;
    padding: 10px;
    transition: all var(--transition-speed);
    text-decoration: none;
    color: inherit;
    align-items: center;
}

    .store-item:hover {
        background-color: var(--bg-medium);
        transform: translateY(-2px);
        box-shadow: var(--card-shadow);
    }

.store-item-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    margin-right: 12px; /* Slightly more space */
}

    .store-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
        border: 1px solid var(--border-color);
    }

.new-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary-color);
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 600;
}

.store-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.store-item-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.4;
    /* Fixed: Show report titles on multiple lines with ellipsis after 2 lines */
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Allow text wrapping */
    max-height: 2.6em; /* Limit height to 2 lines */
    text-align: center;
}

.store-item-date {
    font-size: 11px;
    color: var(--secondary-color);
    margin: 0;
    white-space: nowrap; /* Keep date on one line */
}

.store-item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 4px 0 0 0;
}

/* === Notification Center (exact design dimensions, compact height) === */
/* Red vertical accent on left; content inset matches hero greeting card (24px) */
.notification-center-card {
    margin-bottom: 0;
    background: #ffffff;
    border: 1px solid #e1e4ea;
    border-left: 4px solid var(--primary-color, #a71f37);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    padding: 14px 16px 16px 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.notification-center__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

.notification-center__title {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    font-weight: 700;
}

.notification-center__title i {
    color: var(--primary-color);
    font-size: 16px;
    position: relative;
}

.notification-center__title i::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    border: 1px solid white;
    display: none;
}

.notification-center__title[data-has-unread="true"] i::after {
    display: block;
}

.notification-center__subtitle {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.45;
}


.notification-center__metrics {
    margin-top: 4px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.notification-metric {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    font-size: 12px;
    color: #6b7280;
}

.notification-metric strong {
    font-size: 14px;
    margin-right: 2px;
    font-weight: 700;
}

.notification-metric strong[data-unread-count] {
    color: var(--primary-color);
}

.notification-metric strong[data-total-count] {
    color: var(--text-dark);
}

.notification-center__email-preference {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.notification-center__email-preference .notification-toggle {
    margin-bottom: 4px;
}

.notification-center__bulk-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: stretch;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    width: 100%;
}

.notification-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 0;
    border: 1px solid #e1e4ea;
    background: #f3f4f6;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 0;
}

.notification-action:hover:not([disabled]),
.notification-action:focus-visible:not([disabled]) {
    border-color: #d1d5db;
    color: var(--text-dark);
    outline: none;
    background: #e5e7eb;
}

.notification-action:active:not([disabled]) {
    background: #d1d5db;
}

.notification-action[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.notification-center__filters {
    margin: 0 0 10px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    border-radius: 0;
    border: 1px solid #e1e4ea;
    background: #f3f4f6;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chip:hover:not([aria-selected="true"]) {
    background: #f9fafb;
    color: var(--text-dark);
}

.chip.active,
.chip[aria-selected="true"] {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.notification-preferences-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.notification-preferences-overlay[hidden] {
    display: none !important;
}

.notification-preferences-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
}

.notification-preferences-panel {
    position: relative;
    z-index: 1;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 24px;
    margin: 0;
    max-width: 440px;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}

.notification-preferences-panel[hidden] {
    display: none;
}

.notification-preferences-panel.is-open {
    animation: notificationPreferencesFade 0.18s ease;
}

.notification-preferences-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.notification-preferences-panel__title {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
}

.notification-preferences-panel__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--secondary-color);
}

.notification-preferences-close {
    border: none;
    background: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
}

.notification-preferences-close:hover,
.notification-preferences-close:focus-visible {
    color: var(--primary-color);
    outline: none;
}

.notification-preferences {
    margin-top: 16px;
}

.notification-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.notification-toggle--inline .notification-toggle__label-group {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: nowrap;
    max-width: none;
}

.notification-toggle--inline .notification-preferences__helper {
    white-space: nowrap;
}

.notification-toggle__label-group {
    max-width: 420px;
}

.notification-toggle__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.notification-preferences__helper {
    font-size: 12px;
    color: var(--secondary-color);
}

.notification-toggle__control {
    position: relative;
    width: 48px;
    height: 26px;
}

.notification-toggle__control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.notification-toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    transition: background var(--transition-speed);
}

.notification-toggle__slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition-speed);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.notification-toggle__control input:checked + .notification-toggle__slider {
    background: var(--primary-color);
}

.notification-toggle__control input:checked + .notification-toggle__slider::before {
    transform: translateX(20px);
}

.notification-toggle__control input:focus-visible + .notification-toggle__slider {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.notification-preferences__status {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--secondary-color);
}

.notification-preferences__status[data-tone="success"] {
    color: #16a34a;
}

.notification-preferences__status[data-tone="error"] {
    color: #b91c1c;
}

.notification-preferences__status[data-tone="pending"] {
    color: #d97706;
}

.notification-center__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.notification-center__list::-webkit-scrollbar {
    width: 6px;
}

.notification-center__list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-center__list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0;
}

/* Vertical accent on left of each notification body: red = unread, darker grey = read */
.notification-row {
    display: block;
    padding: 12px 14px 12px 18px;
    border-radius: 0;
    border: none;
    border-left: 4px solid #6b7280;
    background: #f3f4f6;
    box-shadow: none;
    transition: background 0.2s ease, border-left-color 0.2s ease;
    cursor: pointer;
    position: relative;
}

.notification-row.is-unread {
    border-left-color: var(--primary-color, #a71f37);
    background: #f3f4f6;
}

.notification-row:hover {
    background: #e5e7eb;
}

.notification-row.is-unread:hover {
    background: #e5e7eb;
}

.notification-row.is-read {
    background: #f9fafb;
    border-left-color: #6b7280;
}

.notification-row.is-read:hover {
    background: #f3f4f6;
}

.notification-row.is-read .notification-row__title,
.notification-row.is-read .notification-row__summary,
.notification-row.is-read .notification-row__meta,
.notification-row.is-read .notification-row__type {
    color: #9ca3af;
}

.notification-row.is-read .notification-row__title {
    font-weight: 500;
}

.notification-row__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-row__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.notification-row__title-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-row__head .notification-row__title {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.notification-row__type {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    line-height: 1.2;
}

.notification-row__actions-top {
    flex-shrink: 0;
    display: flex !important;
    visibility: visible;
}

.notification-row__mark-read {
    white-space: nowrap;
}

.notification-row__title {
    color: var(--text-dark);
}

.notification-row__summary {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.notification-row__content {
    margin: 0;
    padding-top: 6px;
    font-size: 12px;
    color: var(--text-dark);
    line-height: 1.45;
    min-width: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.notification-row__content--truncated {
    max-height: 96px;
    overflow: hidden;
    position: relative;
}

.notification-row__content--truncated::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24px;
    background: linear-gradient(to bottom, rgba(243, 244, 246, 0), #f3f4f6);
    pointer-events: none;
}

/* Uniform body: small thumbnail for report images; rich text scales down for all types */
.notification-row .notification-row__content img {
    max-width: 56px;
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: cover;
    vertical-align: middle;
    border-radius: 6px;
}

.notification-row .notification-row__content div,
.notification-row .notification-row__content section {
    min-width: 0;
}

.notification-row .notification-row__content [style*="flex: 0 0 260px"],
.notification-row .notification-row__content [style*="max-width: 260px"] {
    flex: 0 0 auto !important;
    max-width: 56px !important;
}

.notification-row .notification-row__content h1,
.notification-row .notification-row__content h2,
.notification-row .notification-row__content h3 {
    font-size: 1em;
    margin: 0 0 4px;
    font-weight: 600;
    line-height: 1.3;
}

.notification-row .notification-row__content p {
    margin: 0 0 4px;
}

.notification-row .notification-row__content p:last-child {
    margin-bottom: 0;
}

.notification-row .notification-row__content a {
    color: var(--primary-color);
}

.notification-row.is-read .notification-row__content {
    color: #9ca3af;
}

.notification-row.is-read .notification-row__content--truncated::after {
    background: linear-gradient(to bottom, rgba(249, 250, 251, 0), #f9fafb);
}

.notification-row__meta {
    margin: 0;
    font-size: 11px;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.notification-row__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding-top: 2px;
}

.notification-row__mark-read {
    padding: 5px 10px;
    border-radius: 0;
    border: none;
    background: var(--primary-color);
    font-size: 11px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.notification-row__mark-read:hover:not([disabled]),
.notification-row__mark-read:focus-visible:not([disabled]) {
    background: var(--primary-dark);
    color: #ffffff;
    outline: none;
}

.notification-row__mark-unread {
    padding: 5px 10px;
    border-radius: 0;
    border: 1px solid #6b7280;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.notification-row__mark-unread:hover:not([disabled]),
.notification-row__mark-unread:focus-visible:not([disabled]) {
    background: #f3f4f6;
    color: var(--text-dark);
    border-color: #4b5563;
    outline: none;
}

.notification-row__cta {
    padding: 5px 10px;
    border-radius: 0;
    border: none;
    background: var(--primary-color);
    font-size: 11px;
    font-weight: 600;
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
    visibility: visible;
    opacity: 1;
}

.notification-row__cta:link,
.notification-row__cta:visited,
.notification-row__cta:hover,
.notification-row__cta:focus {
    color: #ffffff !important;
}

.notification-row__cta:hover:not([disabled]),
.notification-row__cta:focus-visible:not([disabled]) {
    background: var(--primary-dark);
    color: #ffffff !important;
    outline: none;
}

.notification-row__cta .fa-arrow-right {
    font-size: 10px;
    color: #ffffff !important;
}

.notification-center__empty {
    display: none;
}

.notification-center__empty.is-visible {
    display: block;
}

.empty-state {
    border: 2px dashed rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    text-align: center;
    box-shadow: inset 0 0 30px rgba(15, 23, 42, 0.02);
}

.empty-state h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
    color: var(--secondary-color);
    max-width: 400px;
    line-height: 1.6;
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(167, 31, 55, 0.1), rgba(167, 31, 55, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(167, 31, 55, 0.1);
}

.notification-detail-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    z-index: 99999;
    padding: 30px 18px;
    isolation: isolate;
}

.notification-detail-modal.show {
    display: flex !important;
}

.notification-detail-modal .modal-dialog {
    margin: 0;
    width: min(960px, 96vw);
}

.notification-detail-modal .modal-content {
    border-radius: 0;
    border: none;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    background: #ffffff;
}

.notification-detail-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.notification-detail-modal .modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.notification-detail-modal .modal-header .close {
    margin: 0;
    padding: 4px;
    opacity: 0.7;
    color: var(--text-dark);
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
}

.notification-detail-modal .modal-header .close:hover {
    opacity: 1;
}

.notification-detail-modal .modal-body {
    padding: 24px;
    background: #ffffff;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.7;
}

.notification-detail-body-actions {
    display: flex !important;
    justify-content: flex-end;
    margin-bottom: 16px;
    min-height: 40px;
}

.notification-detail-mark-read-top {
    border-radius: 0;
    border: none;
    background: var(--primary-color);
    color: #ffffff;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    visibility: visible;
    opacity: 1;
}

.notification-detail-mark-read-top:hover:not([disabled]),
.notification-detail-mark-read-top:focus-visible:not([disabled]) {
    background: var(--primary-dark);
    color: #ffffff;
    outline: none;
}

.notification-detail-mark-read-top[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.notification-detail-mark-read-top[style*="display: none"] {
    display: none !important;
}

.notification-detail-mark-read-top i {
    color: #ffffff;
}

.notification-detail-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.notification-detail-body {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.7;
}

.notification-detail-body p {
    margin-bottom: 12px;
}

.notification-detail-body a {
    color: var(--primary-color);
}

.notification-detail-body a.notification-detail-view-pdf {
    display: inline-block !important;
    padding: 8px 18px;
    border-radius: 0;
    border: none;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    visibility: visible;
    opacity: 1;
    margin-top: 8px;
}

.notification-detail-body a.notification-detail-view-pdf:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.notification-detail-body .notification-detail-hide-open-file {
    display: none !important;
}

.notification-detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.notification-detail-footer__actions {
    display: flex;
    gap: 10px;
}

/* Delete notification - clear button style, bottom left */
.notification-detail-modal .notification-detail-delete-btn,
.notification-detail-modal [data-modal-delete] {
    border-radius: 0;
    border: 2px solid #dc2626;
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.notification-detail-modal .notification-detail-delete-btn:hover:not([disabled]),
.notification-detail-modal .notification-detail-delete-btn:focus-visible:not([disabled]),
.notification-detail-modal [data-modal-delete]:hover:not([disabled]),
.notification-detail-modal [data-modal-delete]:focus-visible:not([disabled]) {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #b91c1c;
    outline: none;
}

.notification-detail-modal .notification-detail-delete-btn i,
.notification-detail-modal [data-modal-delete] i {
    color: inherit;
}

/* Close - dark grey, white text, sharp edges */
.notification-detail-modal .notification-detail-footer__actions [data-modal-close],
.notification-detail-modal .btn-secondary[data-modal-close] {
    border-radius: 0;
    border: none;
    background: #6c757d;
    color: #ffffff;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
}

.notification-detail-modal .notification-detail-footer__actions [data-modal-close]:hover:not([disabled]),
.notification-detail-modal .btn-secondary[data-modal-close]:hover:not([disabled]) {
    background: #5a6268;
    color: #ffffff;
}

/* Mark as read - primary red, white text, sharp edges */
.notification-detail-modal .notification-detail-footer__actions [data-modal-mark-read],
.notification-detail-modal .btn-primary[data-modal-mark-read] {
    border-radius: 0;
    border: none;
    background: var(--primary-color);
    color: #ffffff;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notification-detail-modal .notification-detail-footer__actions [data-modal-mark-read]:hover:not([disabled]),
.notification-detail-modal .btn-primary[data-modal-mark-read]:hover:not([disabled]) {
    background: var(--primary-dark);
    color: #ffffff;
}

.notification-detail-modal .btn-primary[data-modal-mark-read] i {
    color: #ffffff;
}

/* All buttons in notification modal - no rounded edges */
.notification-detail-modal .modal-footer .btn,
.notification-detail-modal .notification-detail-footer .btn {
    border-radius: 0;
}

/* View report PDF - OHR red, sharp corners (class added by JS) */
.notification-detail-body a[href*=".pdf"],
.notification-detail-body a[href*=".PDF"] {
    border-radius: 0;
}

@media (max-width: 768px) {
    .notification-center-card {
        padding: 20px;
        border-radius: 20px;
    }

    .notification-center__header {
        flex-direction: column;
        gap: 20px;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .notification-center__title {
        font-size: 20px;
    }

    .notification-center__bulk-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .notification-action {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .notification-center__filters {
        width: 100%;
        justify-content: stretch;
    }

    .chip {
        flex: 1;
        text-align: center;
    }

    .notification-row {
        padding: 16px 16px 16px 20px;
    }

    .notification-row__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .notification-metric {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@keyframes notificationPreferencesFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Purchase List Compact Design === */
.purchases-list {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Increased spacing between purchases */
}

.purchase-item {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.purchase-image {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
}

    .purchase-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
        border: 1px solid var(--border-color);
    }

.purchase-details {
    flex: 1;
    min-width: 0;
}

.purchase-title {
    font-size: 13px;
    margin: 0 0 4px 0;
    color: var(--text-dark);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.purchase-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Increased spacing between meta items */
    align-items: center;
    font-size: 11px;
}

.purchase-price {
    font-weight: 700;
    color: var(--primary-color);
}

.purchase-date {
    color: var(--secondary-color);
}

/* Badge styling */
.source-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.ecwid-badge {
    background-color: #f0ad4e;
    color: #fff;
}

.btn-download {
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    margin-left: 10px;
}

    .btn-download i {
        color: white;
    }

    .btn-download:hover {
        background-color: var(--primary-dark);
        transform: scale(1.1);
    }

/* === Region Menu (design: gray bg under hero, tabs as buttons) === */
.navigation-tabs, .region-tabs {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #dee2e6;
    box-shadow: none;
    margin-bottom: 24px;
    padding: 20px 0 20px;
    overflow: visible;
    width: 100%;
    display: flex;
    justify-content: center;
}

.tabs-list, .region-tabs-list {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start; /* flex-start so horizontal scroll works both ways when zoomed/narrow */
    -webkit-overflow-scrolling: touch;
}

/* Large screens: spread main region menu to full width; sub-nav under a region stays left-aligned */
@media (min-width: 992px) {
    .navigation-tabs .tabs-list {
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-wrap: nowrap;
        overflow-x: auto; /* keep scroll if many items or zoomed */
    }

    .navigation-tabs .tabs-list .tab-item {
        flex: 0 0 auto;
        min-width: min-content;
    }

    /* Sub-nav under a region (e.g. Market Reports, Annual Reviews): left-aligned */
    .region-tabs .region-tabs-list {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
    }

    .region-tabs .region-tabs-list .region-tab {
        flex: 0 0 auto;
        min-width: min-content;
    }
}

.region-tabs-list {
    border-bottom: none;
}

.tab-item, .region-tab {
    padding: 10px 36px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: #595959;
    background-color: #ffffff;
    border: 1px solid #e1e4ea;
    border-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    min-width: min-content;
    overflow: visible;
}

.tab-item:last-child, .region-tab:last-child {
    margin-right: 0;
}

.tab-item.active, .region-tab.active {
    color: var(--primary-color);
    background-color: #e9ecef;
    border-color: #dee2e6;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.tab-item.disabled {
    color: #b3b3b3;
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.8;
}

.tab-item:not(.disabled):hover {
    color: var(--primary-color);
    background-color: #f1f3f5;
    border-color: #dee2e6;
}

/* === Region View Styling === */
.region-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.region-tab.equipment {
    color: var(--equipment-color);
}

.region-tab.company {
    color: var(--company-color);
}

.region-tab.country {
    color: var(--country-color);
}

.region-tab.market {
    color: var(--market-color);
}

.region-tab.annual {
    color: var(--annual-color);
}

.region-tab.other {
    color: var(--other-color);
}

.region-tab.global-market {
    color: var(--global-market-color);
}

.region-tab.electric-equipment {
    color: var(--electric-equipment-color);
}

/* === Category Headers === */
.category-header {
    color: white;
    font-size: 15px;
    padding: 2px 15px;
    font-weight: 600;
}

.equipment-header {
    background-color: var(--equipment-color);
}


.company-header {
    background-color: var(--company-color);
}

.global-market-header {
    background-color: var(--global-market-color);
}

.electric-equipment-header {
    background-color: var(--electric-equipment-color);
}

.country-header {
    background-color: var(--country-color);
}

.market-header {
    background-color: var(--market-color);
}

.annual-header {
    background-color: var(--annual-color);
}

.archive-header {
    background-color: var(--archive-color);
}

/* Special Equipment Tab Styling */
.region-tab.special-equipment {
    color: var(--special-equipment-color);
}

.special-equipment-header {
    background-color: var(--special-equipment-color);
}

/* Global Volume Tab Styling */
.region-tab.global-volume {
    color: var(--global-volume-color);
}

.global-volume-header {
    background-color: var(--global-volume-color);
}

/* Special Country Tab Styling */
.region-tab.special-country {
    color: var(--special-country-color);
}

.special-country-header {
    background-color: var(--special-country-color);
}

/* === Product Grid Layouts === */

figure {
    margin: 0rem;
}
.product-grid, .month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* Consistent spacing */
    row-gap: 20px; /* Add more space between rows for taller content */
    margin: 15px;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* Consistent spacing */
    row-gap: 20px; /* Add more space between rows for taller content */
    margin: 15px;
}

.annual-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* Consistent spacing */
    row-gap: 20px; /* Add more space between rows for taller content */
    margin: 15px;
}

.product-item, .month-item, .annual-item {
    display: flex;
    align-items: center;
    padding: 8px;
/*    border: 1px solid var(--border-color);*/
/*    border-radius: 5px;*/
    background-color: white;
    min-height: 66px; /* Set a minimum height to accommodate the image */
    box-sizing: border-box; /* Ensure padding is included in height calculation */
    overflow: hidden; /* Prevent content from spilling */
}

.product-image, .month-image, .annual-image {
    width: 100px;
    height: 100px;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden; /* Add overflow hidden to contain the image */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
}

    .product-image img, .month-image img, .annual-image img {
        width: initial !important;
        height: 100%;
        object-fit: contain; /* Change to contain instead of cover */
        position: absolute; /* Make sure the image stays contained */
        top: 0;
        left: 25px;
        border: 1px solid #e6e6e6;
        border-radius: 3px;
        background-color: #fff;
        box-shadow: 0 2px 5px 0 rgba(0,0,0,0.1);
        transition: box-shadow .2s ease 0s, background-color .2s ease 0s;
    }

.product-info, .month-info, .annual-info {
    flex: 1;
    min-width: 0;
}

.product-link, month-link, annual-link {
    font-weight: 500;
    font-size: 12px;
    white-space: wrap;
    /*    overflow: hidden;*/
    /*    text-overflow: ellipsis;*/
    display: block;
    text-align: center;
}

.product-region {
    font-size: 11px;
    color: var(--secondary-color);
}

.month-link, .annual-link {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: var(--primary-color);
}


/* === Company & Country Profiles === */
.profile-grid, .country-grid {
    padding: 15px;
}

.company-profiles-grid, .country-analyses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* Consistent spacing */
    row-gap: 20px; /* Add more space between rows for taller content */
}

.profile-image, .country-image {
    width: 100px;
    height: 100px;
    margin-right: 10px;
    flex-shrink: 0;
/*    border: 1px solid var(--border-color);*/
    position: relative;
    overflow: hidden; /* Add overflow hidden to contain the image */
}

    .profile-image img, .country-image img {
        width: initial !important;
        height: 100%;
        object-fit: contain; /* Change to contain instead of cover */
        position: absolute; /* Make sure the image stays contained */
        top: 0;
        left: 25px;
        border: 1px solid #e6e6e6;
        border-radius: 3px;
        background-color: #fff;
        box-shadow: 0 2px 5px 0 rgba(0,0,0,0.1);
        transition: box-shadow .2s ease 0s, background-color .2s ease 0s;
    }

.profile-item, .country-item {
    display: flex;
    align-items: center;
    padding: 8px;
/*    border: 1px solid var(--border-color);*/
/*    border-radius: 5px;*/
    background-color: white;
    min-height: 66px; /* Set a minimum height to accommodate the image */
    box-sizing: border-box; /* Ensure padding is included in height calculation */
    overflow: hidden; /* Prevent content from spilling */
}

    /* One-Off Purchase Highlighting */
    .one-off-purchase {
        position: relative;
        border: 2px solid #8b1a2e !important;
        background-color: #fff5f5 !important;
        box-shadow: 0 2px 8px rgba(139, 26, 46, 0.2) !important;
    }

    /* OHR Store Purchase Highlighting */
    .ohr-store-purchase {
        position: relative;
        border: 2px solid #0066cc !important;
        background-color: #f0f7ff !important;
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2) !important;
    }

    .one-off-badge {
        display: inline-block;
        background-color: #8b1a2e;
        color: white;
        font-size: 9px;
        font-weight: bold;
        padding: 3px 8px;
        border-radius: 8px;
        margin-top: 4px;
        text-transform: uppercase;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
        letter-spacing: 0.3px;
        pointer-events: none;
    }

    .ohr-store-badge {
        display: inline-block;
        background-color: #0066cc;
        color: white;
        font-size: 9px;
        font-weight: bold;
        padding: 3px 8px;
        border-radius: 8px;
        margin-top: 4px;
        text-transform: uppercase;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
        letter-spacing: 0.3px;
        pointer-events: none;
    }

    .one-off-purchase:hover {
        border-color: #b02a3a !important;
        box-shadow: 0 4px 12px rgba(139, 26, 46, 0.3) !important;
    }

    .ohr-store-purchase:hover {
        border-color: #1a88ff !important;
        box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3) !important;
    }

    .profile-item .profile-image, .country-item .country-image {
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: white;
    }

.profile-details, .country-details {
    flex: 1;
    min-width: 0;
}

.profile-link, .country-link {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 12px;
    white-space: wrap;
/*    overflow: hidden;*/
/*    text-overflow: ellipsis;*/
    display: block;
    text-align: center;
}

/* === Archive Sections === */
.archive-section {
    margin-top: 20px;
}

.archive-item {
    position: relative;
}

    .archive-item:after {
        content: "Archive";
        position: absolute;
        top: 5px;
        right: 5px;
        background-color: rgba(0,0,0,0.6);
        color: white;
        font-size: 9px;
        padding: 2px 5px;
        border-radius: 3px;
    }

.archive-selector {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

    .archive-selector label {
        margin-right: 10px;
        font-weight: 500;
        font-size: 13px;
    }

    .archive-selector select {
        padding: 5px 10px;
        border-radius: 4px;
        border: 1px solid var(--border-color);
        font-size: 13px;
    }

.category-subheader {
    background-color: #f0f0f0;
    padding: 8px 12px;
    font-weight: 500;
    font-size: 14px;
}

.archive-category {
    margin-top: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

/* === Placeholder & No Data === */
.placeholder-card {
    background-color: var(--bg-light);
    opacity: 0.9;
}

.no-data-message {
    text-align: center;
    color: var(--secondary-color);
    padding: 20px;
    font-style: italic;
    margin: 0;
    font-size: 14px;
}

/* === Fix spacing in main UI === */
.page-title, .page-title-container, .heading-col.col {
    margin-top: 0 !important;
    padding-top: 5px !important;
}

.breadcrumb-container {
    margin-bottom: 5px !important;
}

.container > .row:first-child {
    margin-top: 0 !important;
}

h1.heading.main.base-heading {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* === Responsive layout === */
@media (max-width: 1200px) {
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .company-profiles-grid, .country-analyses-grid, .product-grid, .annual-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .dashboard-title {
        margin: 0 0 15px 0;
    }

    .welcome-banner {
        margin-bottom: 15px;
    }

    .navigation-tabs, .region-tabs {
        margin-bottom: 20px;
    }

    .welcome-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .welcome-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .welcome-bottom-left {
        order: 1;
    }

    .welcome-actions {
        order: 2;
        justify-content: flex-end;
    }

    .welcome-primary {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .welcome-secondary {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .user-profile {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .user-avatar {
        width: 48px;
        height: 48px;
    }

    .welcome-text {
        align-items: center;
    }

    .welcome-text .greeting {
        text-align: center;
    }

    .welcome-text .user-name {
        text-align: center;
    }

    .welcome-text .company-name {
        text-align: center;
    }

    .welcome-info {
        justify-content: center;
    }

    .welcome-actions {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .welcome-actions > * + * {
        margin-left: 0;
    }

    /* Dashboard hero: compact greeting and buttons on same line */
    .dashboard-cover-banner .welcome-heading {
        font-size: 14px !important;
        line-height: 1.25;
        gap: 0 4px;
    }
    .dashboard-cover-banner .welcome-heading .greeting,
    .dashboard-cover-banner .welcome-heading .user-name,
    .dashboard-cover-banner .welcome-heading .company-separator,
    .dashboard-cover-banner .welcome-heading .company-name {
        font-size: 14px !important;
    }
    .dashboard-cover-banner .welcome-content {
        gap: 10px;
    }
    .dashboard-cover-banner .welcome-actions {
        flex-direction: row !important;
        width: auto !important;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }
    .dashboard-cover-banner .welcome-actions > * + * {
        margin-left: 6px;
    }

    .tabs-list, .region-tabs-list {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .company-profiles-grid, .country-analyses-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-title h1 {
        font-size: 1.4rem;
    }

    .last-login {
        margin-left: 0;
    }

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

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

    .store-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .store-items {
        grid-template-columns: 1fr;
    }

    .bulletin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bulletin-date {
        margin-top: 3px;
    }
    .product-grid, .annual-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Online Database Button Styles */
.btn-online-db {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

    .btn-online-db.btn-primary {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        color: white;
        box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
    }

        .btn-online-db.btn-primary:hover {
            background: linear-gradient(135deg, #1e7e34 0%, #17a2b8 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
        }

    .btn-online-db.btn-secondary {
        background: #f8f9fa;
        color: #6c757d;
        border: 1px solid #dee2e6;
        cursor: not-allowed;
    }

    .btn-online-db.disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .btn-online-db i {
        font-size: 16px;
    }

/* Database Services Section Styles */
.database-services-section {
    margin-top: 30px;
}

.database-services-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.database-services-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.database-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex-shrink: 0;
}

.database-icon i {
    font-size: 32px;
    color: var(--primary-color);
}

.database-title h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
}

.database-services-body {
    padding-top: 10px;
}

.database-description {
    font-size: 16px;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 25px;
}

.database-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.online-access-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px 26px !important;
    border-radius: 8px !important;
    border: none !important;
    background: var(--primary-color) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    white-space: nowrap !important;
    align-self: flex-start;
    max-width: min(100%, 320px) !important;
    width: auto !important;
}

.online-access-button:hover,
.online-access-button:focus-visible {
    background: var(--primary-dark) !important;
}

.online-access-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6) !important;
    outline-offset: 2px !important;
}

.online-access-button.loading {
    opacity: 0.8 !important;
    cursor: wait !important;
}

.online-access-button__icon {
    font-size: 18px !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.online-access-button__label {
    margin: 0 !important;
    line-height: 1 !important;
    color: inherit !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Active tab styling for Database Services */
/* === Presentations Section === */
.presentations-section {
    padding: 20px;
    background-color: #f8f9fa;
}

.presentations-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.presentations-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.presentations-icon {
    font-size: 32px;
    color: white;
}

.presentations-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.presentations-body {
    padding: 20px;
}

.presentations-description {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 14px;
}

.presentations-group {
    margin-bottom: 40px;
}

.presentations-group:last-child {
    margin-bottom: 0;
}

.presentations-group-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.presentations-group-title i {
    color: var(--primary-color);
}

.presentations-grid {
    /* Uses .global-reports-grid for same layout/size as other reports */
}

.presentation-card__actions--dual {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.no-presentations-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.tab-item.database-services-tab.active,
.tab-item.presentations-tab.active {
    color: var(--primary-color);
    background-color: #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

    /* Loading state */
    .btn-online-db.loading {
        pointer-events: none;
    }

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

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

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

/* Admin Badge */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

    .admin-badge i {
        font-size: 14px;
    }

/* Package Info Modal */
/* Dashboard modals - centered in viewport */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[style*="display: block"],
.modal.show {
    display: flex !important;
}

.modal.fade {
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal .modal-dialog {
    margin: auto;
    max-height: 90vh;
}

.access-status {
    margin-bottom: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
}

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

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

.admin-access-info {
    padding: 16px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #4A90E2;
}

    .admin-access-info h6 {
        margin: 0 0 8px 0;
        color: #1565c0;
    }

    .admin-access-info p {
        margin: 0;
        color: #1976d2;
    }

.package-list {
    max-height: 400px;
    overflow-y: auto;
}

.package-item {
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #f8f9fa;
}

.package-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 12px;
}

    .package-header h6 {
        margin: 0;
        color: #495057;
        font-weight: 600;
        flex: 1;
    }

.package-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.data-levels {
    margin-top: 12px;
}

    .data-levels ul {
        list-style: none;
        padding: 0;
        margin: 8px 0 0 0;
    }

    .data-levels li {
        padding: 6px 12px;
        background: white;
        border-radius: 4px;
        margin-bottom: 4px;
        font-size: 13px;
        color: #6c757d;
        border-left: 3px solid #28a745;
    }

.no-access-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #6c757d;
}

    .no-access-info i {
        font-size: 20px;
        color: #17a2b8;
    }

/* Dashboard Actions Layout */
.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-left: 4px solid #007bff;
    animation: slideIn 0.3s ease;
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

    .notification-content i {
        font-size: 16px;
    }

.notification-success .notification-content i {
    color: #28a745;
}

.notification-error .notification-content i {
    color: #dc3545;
}

.notification-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
}

    .notification-close:hover {
        color: #495057;
    }

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* Responsive */
@media (max-width: 768px) {
    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-online-db {
        justify-content: center;
    }

    .admin-badge {
        justify-content: center;
    }

    .package-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* === Featured Reports Grid === */
.featured-reports-container {
    padding: 0;
    background-color: #f8f9fa;
}

.featured-reports-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    padding: 20px;
}

.featured-report-card {
    display: flex;
    flex-direction: column;
    background-color: white;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.featured-report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 1;
}

.featured-report-card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.featured-report-card:hover .featured-report-title {
    text-decoration: underline;
    color: var(--primary-color);
    line-clamp: unset;
    -webkit-line-clamp: unset;
    display: block;
    white-space: normal;
    font-size: 16px;
}

.featured-report-card:hover .featured-report-price {
    font-size: 16px;
}

.featured-report-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.featured-report-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.featured-report-info {
    padding: 15px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
    position: relative;
    z-index: 2;
}

.featured-report-card:hover .featured-report-info {
    min-height: auto;
}

.featured-report-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease, font-size 0.3s ease;
    text-align: center;
}

.featured-report-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 6px 0 0 0;
    transition: font-size 0.3s ease;
}

.featured-reports-actions {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-load-more {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 4px rgba(167, 31, 55, 0.2);
}

.btn-load-more:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(167, 31, 55, 0.3);
}

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

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Featured Reports Grid */
@media (max-width: 1199px) {
    .featured-reports-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .featured-reports-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .featured-reports-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px;
    }
}

/* === Reports Split Container (50-50 Layout) === */
.reports-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.reports-split-card {
    margin-bottom: 0;
}

.reports-split-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px;
    padding: 16px;
}

@media (max-width: 1200px) {
    .reports-split-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .reports-split-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 992px) {
    .reports-split-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .reports-split-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* === Global Reports Grid === */
.global-reports-container {
    padding: 0;
    background-color: #f1f2f6;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.global-reports-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
}

@media (max-width: 1199px) {
    .global-reports-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .global-reports-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .global-reports-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.report-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #f8fafc;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.9));
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    isolation: isolate;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.report-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
}

.report-card__image {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
}

.report-card__cover-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
}

.report-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: filter 0.4s ease;
}

.report-card:hover .report-card__image img {
    filter: brightness(1.08);
}

.report-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(190deg, rgba(4, 7, 18, 0.2) 0%, rgba(4, 7, 18, 0.78) 58%, rgba(3, 5, 12, 0.97) 100%);
    opacity: 0.95;
    transition: opacity 0.4s ease;
}

.report-card:hover .report-card__overlay {
    opacity: 1;
}

.report-card__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 18px;
}

.report-card__header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-card__overline {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: rgba(248, 250, 252, 0.72);
}

.report-card__heading {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    text-shadow: 0 4px 18px rgba(2, 4, 9, 0.7), 0 0 8px rgba(0, 0, 0, 0.45);
}

.report-card__meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.85);
}

.report-card__subtitle {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 10px rgba(2, 4, 9, 0.8);
}

.report-card__equipment-type {
    display: inline-block;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0.02em;
    font-weight: 600;
    color: #856404;
    background: rgba(255, 193, 7, 0.4);
    border: 1px solid rgba(255, 193, 7, 0.5);
    padding: 4px 10px;
    border-radius: 4px;
    margin: 0;
    text-shadow: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.report-card__context {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(248, 250, 252, 0.75);
    text-shadow: 0 1px 6px rgba(2, 4, 9, 0.7);
}

.report-card__chips {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-right: 6px;
    flex-wrap: nowrap;
}

.report-card__chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    line-height: 1.2;
}

.report-card__chip--package {
    background: rgba(59, 130, 246, 0.7);
    border-color: rgba(147, 197, 253, 0.5);
}

.report-card__chip--oneoff {
    background: rgba(244, 114, 182, 0.7);
    border-color: rgba(251, 182, 206, 0.5);
}

.report-card__chip--store {
    background: rgba(250, 204, 21, 0.75);
    border-color: rgba(254, 240, 138, 0.5);
}

.report-card__footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
}

.report-card__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(248, 250, 252, 0.18);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.35);
    color: #fff;
    transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.report-card:hover .report-card__action {
    background: rgba(248, 250, 252, 0.32);
    box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.55);
    color: #fff;
}

.report-card__action--downloading {
    pointer-events: none;
    opacity: 0.85;
    cursor: not-allowed;
}

.report-card__action .report-card__spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: report-card-spinner 0.7s linear infinite;
}

@keyframes report-card-spinner {
    to { transform: rotate(360deg); }
}

.report-card--oneoff .report-card__overlay,
.report-card--purchased .report-card__overlay,
.report-card--package .report-card__overlay {
    background: linear-gradient(190deg, rgba(4, 7, 18, 0.2) 0%, rgba(4, 7, 18, 0.78) 58%, rgba(3, 5, 12, 0.97) 100%);
}

/* === Quarterly Market Reports Display (South America) === */
.quarterly-year {
    margin-bottom: 32px;
}

.quarterly-year-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.quarterly-year-bar {
    width: 4px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 2px;
    flex-shrink: 0;
}

.quarterly-year-label {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.quarterly-reports-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
}

@media (max-width: 1199px) {
    .quarterly-reports-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .quarterly-reports-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .quarterly-reports-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    
    .quarterly-year-label {
        font-size: 24px;
    }
    
    .quarterly-year-bar {
        height: 36px;
    }
}

/* === My Access Summary Styles === */
.access-summary-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.access-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.access-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title {
    margin: 12px 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title i {
    font-size: 16px;
    color: var(--primary-color);
    cursor: pointer;
}

.access-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.access-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 12px;
    background-color: var(--bg-light);
    border-radius: 4px;
    transition: background-color var(--transition-speed);
}

.access-item:hover {
    background-color: var(--bg-medium);
}

.access-name {
    font-size: 13px;
    color: var(--text-dark);
    flex: 1;
    margin-right: 10px;
}

.access-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-package {
    background-color: #d4edda;
    color: #155724;
}

.text-muted {
    color: #6c757d !important;
    font-style: italic;
}

/* === Access Accordion in Welcome Banner === */
.access-accordion-wrapper {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 0;
}

/* When in modal, allow scroll when content exceeds height */
.dashboard-modal-body.access-accordion-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.access-accordion-content .access-summary-list {
    padding: 15px 18px;
}

.access-accordion-content .access-section {
    margin-bottom: 15px;
}

.access-accordion-content .access-section:last-child {
    margin-bottom: 0;
}

.access-accordion-content .section-title {
    font-size: 13px;
    margin: 12px 0 8px 0;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.access-accordion-content .access-item {
    margin-bottom: 6px;
}

.access-accordion-content .access-item:last-child {
    margin-bottom: 0;
}

.access-accordion-content .no-data-message {
    padding: 15px 18px;
    text-align: center;
    color: var(--secondary-color);
    font-size: 13px;
}

/* Tier badge styling within access summary */
.tier-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    margin-left: 8px;
    background-color: var(--primary-color);
    color: white;
}

/* Nested product types styling */
.product-types-nested {
    margin-top: 8px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-type-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--secondary-color);
}

.product-type-item i {
    font-size: 11px;
    color: var(--primary-color);
    opacity: 0.7;
}

.access-header {
    display: flex;
    align-items: center;
    width: 100%;
}

.access-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.btn-online-access .btn-icon i {
    line-height: 1 !important;
}

.online-access-button.loading {
    opacity: 0.8 !important;
    cursor: wait !important;
}

.online-access-button.loading .btn-loading-spinner {
    margin-left: 12px !important;
}

/* Presentation card: compact content so thumbnail is prominent; tooltip outside image */
.presentation-card.report-card {
    overflow: visible;
}

.presentations-grid.global-reports-grid {
    overflow: visible;
}

.presentation-card .report-card__content {
    padding: 10px 12px;
    gap: 4px;
}

.presentation-card .report-card__heading {
    font-size: 1rem;
    line-height: 1.25;
}

.presentation-card__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.presentation-card__footer--spacer {
    flex: 0 0 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

/* Presentation Card Actions - compact row under title */
.presentation-card__actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.presentation-card__actions--compact {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}

.presentation-card__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    white-space: nowrap;
}

.presentation-card__btn--compact {
    flex: 0 0 auto;
    padding: 5px 10px;
    min-height: 0;
    font-size: 11px;
    gap: 5px;
    border-radius: 4px;
}

.presentation-card__btn--compact i {
    font-size: 12px;
}

.presentation-card__btn--icon-only {
    flex: 0 0 auto;
    width: 44px;
    min-width: 44px;
    padding: 10px;
    gap: 0;
}

.presentation-card__btn--full {
    width: 100%;
}

.presentation-card__btn--watch {
    background-color: var(--primary-color);
    color: #ffffff !important;
}

.presentation-card__btn--watch:hover,
.presentation-card__btn--watch:focus {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(167, 31, 55, 0.4);
    color: #ffffff !important;
}

.presentation-card__btn--view {
    background-color: var(--primary-color);
    color: #ffffff !important;
}

.presentation-card__btn--view:hover,
.presentation-card__btn--view:focus {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(167, 31, 55, 0.4);
    color: #ffffff !important;
}

.presentation-card__btn--download {
    background-color: #344955;
    color: #ffffff !important;
}

.presentation-card__btn--download:hover,
.presentation-card__btn--download:focus {
    background-color: #2a3a44;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 73, 85, 0.4);
    color: #ffffff !important;
}

.presentation-card__btn i {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}

.presentation-card__btn--icon-only i {
    font-size: 18px;
}

.presentation-card__btn-text {
    font-weight: 600;
    color: inherit;
}

/* Info button: fixed top-right on card so position is standard regardless of data */
.presentation-card__info-slot {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

.presentation-card__info-wrap {
    position: relative;
}

.presentation-card__btn--info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    gap: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff !important;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-size: 16px;
}

.presentation-card__btn--info:hover,
.presentation-card__btn--info:focus,
.presentation-card__info-wrap.active .presentation-card__btn--info {
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff !important;
    transform: scale(1.05);
}

.presentation-card__btn--info i {
    font-size: 16px;
}

/* Tooltip opens below the (i) button so it stays in view, aligned to top-right */
.presentation-card__tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    z-index: 25;
    width: 280px;
    max-width: min(320px, calc(100vw - 24px));
    padding: 12px 14px;
    background-color: #1a1a1a;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    font-weight: normal;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    white-space: normal;
}

.presentation-card__info-wrap:hover .presentation-card__tooltip,
.presentation-card__info-wrap.active .presentation-card__tooltip {
    visibility: visible;
    opacity: 1;
}

/* Arrow pointing up to the (i) button */
.presentation-card__tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 12px;
    left: auto;
    border: 6px solid transparent;
    border-bottom-color: #1a1a1a;
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    overflow: hidden;
}

.video-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.video-modal__dialog {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    z-index: 10001;
    animation: videoModalFadeIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes videoModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-modal__content {
    position: relative;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.video-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10002;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.video-modal__close:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
}

.video-modal__header {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-modal__title {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.video-modal__body {
    position: relative;
    padding: 0;
    background-color: #000;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.video-modal__player-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    max-height: calc(90vh - 100px); /* leave room for header/close on small screens */
    aspect-ratio: 16 / 9;
    background-color: #000;
}

.video-modal__player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
    object-fit: contain;
}

.video-modal__embed-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-modal__embed {
    width: 100%;
    height: 100%;
    border: none;
}

/* PDF Modal Styles */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    overflow: hidden;
}

.pdf-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.pdf-modal__dialog {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    z-index: 10001;
    animation: pdfModalFadeIn 0.3s ease-out;
}

@keyframes pdfModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pdf-modal__content {
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.pdf-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10002;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pdf-modal__close:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
}

.pdf-modal__header {
    padding: 20px;
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.pdf-modal__title {
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.pdf-modal__body {
    position: relative;
    padding: 0;
    background-color: #ffffff;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pdf-modal__viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
    background-color: #525252;
    flex: 1;
}

.pdf-modal__viewer {
    width: 100%;
    height: 100%;
    border: none;
    min-height: 600px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-modal__dialog,
    .pdf-modal__dialog {
        width: 95%;
        max-height: 85vh;
    }
    
    .presentation-card__actions:not(.presentation-card__actions--compact) {
        flex-direction: column;
        gap: 8px;
    }
    
    .presentation-card__btn:not(.presentation-card__btn--compact) {
        width: 100%;
    }

    .pdf-modal__viewer-container,
    .pdf-modal__viewer {
        min-height: 400px;
    }
}

/* === Child accounts drawer (parent only) === */
.child-accounts-drawer-wrapper {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 0;
}

.child-accounts-drawer-content {
    max-height: 0;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.95);
    transition: max-height 0.35s ease;
}

.child-accounts-drawer-content.open {
    max-height: 420px;
    overflow-y: auto;
}

.child-accounts-drawer-inner {
    padding: 15px 18px;
}

.child-accounts-total {
    font-size: 13px;
    color: var(--secondary-color);
    margin: 0 0 10px 0;
    font-weight: 500;
}

.child-accounts-limit-message {
    font-size: 13px;
    color: var(--secondary-color);
    margin: 0;
}

.child-accounts-drawer-inner .section-title {
    font-size: 13px;
    margin: 0 0 12px 0;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.child-accounts-list {
    margin-bottom: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.child-accounts-list .child-accounts-loading {
    margin: 0;
    padding: 10px 0;
    color: var(--secondary-color);
    font-size: 13px;
}

.child-account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.child-account-item:last-child {
    margin-bottom: 0;
}

.child-account-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.child-account-name-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: nowrap;
}

.child-account-number {
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.child-account-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    min-width: 0;
}

.child-account-email {
    font-size: 12px;
    color: var(--secondary-color);
}

.child-account-meta {
    font-size: 11px;
    color: var(--border-color);
}

.child-account-item-actions {
    display: flex;
    gap: 6px;
}

.child-account-item-actions .btn-icon {
    background: transparent;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--secondary-color);
    transition: color 0.2s, background 0.2s;
}

.child-account-item-actions .btn-edit-child:hover {
    color: var(--country-color);
    background: rgba(29, 113, 184, 0.1);
}

.child-account-item-actions .btn-delete-child:hover {
    color: var(--primary-color);
    background: rgba(167, 31, 55, 0.1);
}

.child-accounts-actions {
    margin-top: 8px;
}

.child-account-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Child account modal (Add/Edit) - centered in viewport */
/* Dashboard modals (Access Summary, Child Accounts list) */
.dashboard-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.dashboard-modal-box {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    max-width: 560px;
    width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.dashboard-modal-header h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-modal-header h6 i {
    color: var(--primary-color);
}

.dashboard-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
}

.dashboard-modal-close:hover {
    color: var(--text-dark);
}

.dashboard-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.child-account-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

.child-account-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.child-account-modal-box {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 440px;
    width: calc(100% - 40px);
    max-height: 90vh;
    overflow-y: auto;
    pointer-events: auto;
    z-index: 10001;
}

.child-account-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
}

.child-account-modal-header h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.child-account-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 0 4px;
}

.child-account-modal-close:hover {
    color: var(--text-dark);
}

.child-account-form {
    padding: 18px;
}

.child-account-form .form-group {
    margin-bottom: 14px;
}

.child-account-form .form-group:last-of-type {
    margin-bottom: 18px;
}

.child-account-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.child-account-form .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.child-account-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
}

/* Toast message after add/update/delete child account (form POST redirect) */
.child-account-toast {
    padding: 12px 18px;
    margin-bottom: 12px;
    border-radius: 8px;
    font-size: 14px;
}
.child-account-toast-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.child-account-toast-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.child-account-toast {
    transition: opacity 0.5s ease-out;
}

.child-account-toast-fade-out {
    opacity: 0;
    pointer-events: none;
}

.child-account-modal-actions #childAccountSubmitBtn.loading {
    pointer-events: none;
    position: relative;
}

.child-account-modal-actions #childAccountSubmitBtn.loading .fa-spinner {
    margin-right: 6px;
}