/* Modern Hotel Survey Dashboard - Sidebar Layout */

:root {
    /* Default UI theme (gold & midnight) */
    --primary-color: #a68a3a;
    --primary-hover: #8a7030;
    --secondary-color: #2c3e50;
    --sidebar-bg: #1a1d29;
    --sidebar-hover: #252937;
    --panel-header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-dark: #333;
    --text-light: #666;
    --text-white: #ffffff;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
    --sidebar-width: 240px;
    --sidebar-width-collapsed: 56px;

    /* Design System Variables */
    /* Colors */
    --ds-bg-page: #F7F7F5;
    --ds-bg-card: #FFFFFF;
    --ds-border-default: #E8E5E0;
    --ds-text-primary: #1A1A1A;
    --ds-text-secondary: #666;
    --ds-text-muted: #999;
    --ds-accent-primary: #2F9E8B;
    --ds-accent-hover: #278A79;
    --ds-data-series-1: #2F9E8B;
    --ds-data-series-2: #D4D1CC;
    
    /* Spacing */
    --ds-card-padding: 24px;
    --ds-card-gap: 16px;
    --ds-page-padding: 16px;
    
    /* Border Radius */
    --ds-radius-card: 12px;
    --ds-radius-button: 8px;
    
    /* Shadows */
    --ds-shadow-card: 0 1px 3px rgba(0,0,0,0.04);
    
    /* Typography */
    --ds-font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ds-font-size-page-title: 22px;
    --ds-font-weight-page-title: 700;
    --ds-font-size-card-title: 14px;
    --ds-font-weight-card-title: 600;
    --ds-font-size-nav-item: 13px;
    --ds-font-weight-nav-item: 500;
    --ds-font-size-nav-section: 11px;
    --ds-font-weight-nav-section: 600;
    --ds-font-size-body: 14px;
    --ds-font-weight-body: 400;
    --ds-font-size-small: 12px;
    --ds-font-weight-small: 400;
    
    /* Transitions */
    --ds-transition-default: 0.15s ease;
}

/* UI theme variants (driven by body[data-ui-theme]) */

body[data-ui-theme="gold-purple"] {
    --primary-color: #a68a3a;
    --primary-hover: #8a7030;
    --secondary-color: #2c3e50;
    --sidebar-bg: #1a1d29;
    --sidebar-hover: #252937;
    --panel-header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body[data-ui-theme="ocean"] {
    --primary-color: #0ea5e9;   /* sky-500 */
    --primary-hover: #0284c7;   /* sky-600 */
    --secondary-color: #0b1120; /* slate-950 */
    --sidebar-bg: #020617;      /* slate-950 */
    --sidebar-hover: #111827;   /* slate-900 */
    --panel-header-bg: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

body[data-ui-theme="slate"] {
    --primary-color: #64748b;   /* slate-500 */
    --primary-hover: #475569;   /* slate-600 */
    --secondary-color: #020617; /* slate-950 */
    --sidebar-bg: #020617;
    --sidebar-hover: #111827;
    --panel-header-bg: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

body[data-ui-theme="emerald"] {
    --primary-color: #10b981;   /* emerald-500 */
    --primary-hover: #059669;   /* emerald-600 */
    --secondary-color: #1f2933; /* dark neutral */
    --sidebar-bg: #111827;
    --sidebar-hover: #1f2937;
    --panel-header-bg: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

body[data-ui-theme="minimal"] {
    --primary-color: #2F9E8B;   /* warmer muted green */
    --primary-hover: #268876;   /* darker shade for hover */
    --secondary-color: #111827; /* gray-900 */
    --sidebar-bg: #020617;
    --sidebar-hover: #111827;
    --panel-header-bg: #e5e7eb; /* light grey - minimalist */
    
    /* Override design system variables for minimal theme */
    --ds-accent-primary: #2F9E8B;
    --ds-accent-hover: #268876;
}

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

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #F7F7F5;
    height: 100%;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-light);
}

/* Sidebar — Notion-inspired light sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: #F7F7F5;
    color: #37352F;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    border-right: 1px solid #E8E5E0;
    box-shadow: none;
    transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #E8E5E0;
}
.sidebar-header-with-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.sidebar-header-with-toggle .sidebar-toggle {
    margin: 0;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #37352F;
}

.sidebar-logo i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.sidebar-title {
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0.5rem;
    overflow-y: auto;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.375rem 0.625rem;
    margin: 1px 0;
    color: #37352F;
    text-decoration: none;
    transition: background-color 0.15s ease;
    border-left: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.3;
}
.sidebar-nav .nav-item span,
.nav-section-header span,
.nav-group-header span {
    transition: opacity 100ms 0ms;
}
.sidebar:not(.sidebar-collapsed) .sidebar-nav .nav-item span,
.sidebar:not(.sidebar-collapsed) .nav-section-header span,
.sidebar:not(.sidebar-collapsed) .nav-group-header span {
    opacity: 1;
    transition: opacity 150ms 50ms;
}

.sidebar-nav .nav-item:hover {
    background-color: #EFEFED;
    color: #37352F;
    border-left-color: transparent;
    transition: background-color 0.15s ease;
}

.sidebar-nav .nav-item.active {
    background-color: #E8E5E0;
    color: #37352F;
    border-left-color: transparent;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.sidebar-nav .nav-item.active i {
    color: #91918E;
}

.sidebar-nav .nav-item i {
    font-size: 1rem;
    width: 16px;
    height: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #91918E;
    flex-shrink: 0;
}

.sidebar-nav .nav-item:hover i {
    color: #91918E;
}

/* Sidebar toggle button (expand/collapse) — at top so not covered by Feedback */
.sidebar-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0.75rem auto;
    padding: 0;
    border: none;
    background: transparent;
    color: #91918E;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.sidebar-toggle:hover {
    background-color: #EFEFED;
    color: #37352F;
}
.sidebar-toggle .icon-expand,
.sidebar-toggle .icon-collapse {
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar.sidebar-collapsed .sidebar-toggle .icon-collapse {
    display: none;
}
.sidebar:not(.sidebar-collapsed) .sidebar-toggle .icon-expand {
    display: none;
}

/* Collapsed sidebar state (~56px, icons only) */
.sidebar.sidebar-collapsed {
    width: var(--sidebar-width-collapsed);
    overflow: hidden;
    transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1) 100ms;
}
.sidebar:not(.sidebar-collapsed) {
    transition-delay: 0ms;
}
.sidebar.sidebar-collapsed + .main-wrapper {
    margin-left: var(--sidebar-width-collapsed);
    transition: margin-left 250ms cubic-bezier(0.4, 0, 0.2, 1) 100ms;
}
.sidebar:not(.sidebar-collapsed) + .main-wrapper {
    transition-delay: 0ms;
}
.sidebar.sidebar-collapsed .sidebar-title,
.sidebar.sidebar-collapsed .sidebar-nav .nav-item span,
.sidebar.sidebar-collapsed .nav-section-header span,
.sidebar.sidebar-collapsed .nav-group-header span {
    opacity: 0;
    width: 0;
    min-width: 0;
    overflow: hidden;
    transition: opacity 100ms 0ms;
    display: block;
}
.sidebar.sidebar-collapsed .sidebar-title {
    display: block;
}
.sidebar.sidebar-collapsed .nav-section .nav-group,
.sidebar.sidebar-collapsed .nav-section .nav-item.nav-sub-item,
.sidebar.sidebar-collapsed .nav-section .nav-item.nav-sub-item-2 {
    display: none !important;
}
.sidebar.sidebar-collapsed .nav-section-header i:first-child {
    display: none;
}
.sidebar.sidebar-collapsed .sidebar-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0;
}
.sidebar.sidebar-collapsed .sidebar-nav .nav-item,
.sidebar.sidebar-collapsed .nav-section-header {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}
.sidebar.sidebar-collapsed .sidebar-nav .nav-item i,
.sidebar.sidebar-collapsed .nav-section-header i:not(:first-child) {
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin: 0;
}
.sidebar.sidebar-collapsed .sidebar-header {
    padding: 1rem 0;
    justify-content: center;
}
.sidebar.sidebar-collapsed .sidebar-logo {
    justify-content: center;
}
.sidebar.sidebar-collapsed .sidebar-logo i {
    font-size: 20px;
}

/* Hover-to-peek: overlay when collapsed, does not push content */
.sidebar.sidebar-collapsed.sidebar-peek {
    position: absolute;
    width: var(--sidebar-width) !important;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.06);
    transition: none;
}
.sidebar.sidebar-collapsed.sidebar-peek .sidebar-title,
.sidebar.sidebar-collapsed.sidebar-peek .sidebar-nav .nav-item span,
.sidebar.sidebar-collapsed.sidebar-peek .nav-section-header span,
.sidebar.sidebar-collapsed.sidebar-peek .nav-group-header span {
    opacity: 1;
    width: auto;
    min-width: 0;
    overflow: visible;
}
.sidebar.sidebar-collapsed.sidebar-peek .nav-section .nav-group,
.sidebar.sidebar-collapsed.sidebar-peek .nav-section .nav-item.nav-sub-item,
.sidebar.sidebar-collapsed.sidebar-peek .nav-section .nav-item.nav-sub-item-2 {
    display: block !important;
}
.sidebar.sidebar-collapsed.sidebar-peek .nav-section-header i:first-child {
    display: flex;
}
.sidebar.sidebar-collapsed.sidebar-peek .sidebar-nav {
    display: block;
    justify-content: unset;
}
.sidebar.sidebar-collapsed.sidebar-peek .sidebar-nav .nav-item,
.sidebar.sidebar-collapsed.sidebar-peek .nav-section-header {
    justify-content: flex-start;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
}
.sidebar.sidebar-collapsed.sidebar-peek .sidebar-nav .nav-item i,
.sidebar.sidebar-collapsed.sidebar-peek .nav-section-header i:not(:first-child) {
    font-size: 1rem;
    width: 16px;
    height: 16px;
}
.sidebar.sidebar-collapsed.sidebar-peek .sidebar-header {
    justify-content: flex-start;
    padding: 1.25rem 1rem;
}
.sidebar.sidebar-collapsed.sidebar-peek .sidebar-logo {
    justify-content: flex-start;
}
.sidebar.sidebar-collapsed.sidebar-peek .sidebar-logo i {
    font-size: 1.25rem;
}

/* Collapsed-state tooltip (to the right of icons) */
#sidebar-tooltip {
    position: fixed;
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 150ms ease;
    pointer-events: none;
    z-index: 1100;
    white-space: nowrap;
    line-height: 1.3;
}
#sidebar-tooltip.visible {
    opacity: 1;
}

/* Navigation Sections */
.nav-section {
    margin: 0;
    padding-top: 0.5rem;
}

.nav-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem;
    color: #91918E;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    margin-bottom: 2px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-radius: 8px;
    line-height: 1.3;
}

.nav-section-header:hover {
    color: #37352F;
    background-color: #EFEFED;
    transition: background-color 0.15s ease;
}

.nav-section-header i {
    font-size: 1rem;
    width: 16px;
    height: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B4B4B0;
    flex-shrink: 0;
}

.nav-section-header:hover i {
    color: #37352F;
}

.nav-section-header i:first-child {
    font-size: 12px;
    width: 12px;
    height: 12px;
    transition: transform 200ms ease;
}
.nav-section-header.section-expanded i:first-child {
    transform: rotate(90deg);
}

.nav-sub-item {
    padding-left: 2rem !important;
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.3 !important;
    transition: background-color 0.15s ease;
}

.nav-sub-item i {
    font-size: 1rem !important;
    width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.nav-sub-item:hover {
    transition: background-color 0.15s ease;
}

.nav-sub-item.active {
    background-color: #E8E5E0 !important;
    font-weight: 600 !important;
    transition: background-color 0.15s ease;
}

/* Tier 2 Navigation (nav-group) */
.nav-group {
    margin: 2px 0;
}

.nav-group-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.375rem 0.625rem 0.375rem 2rem;
    color: #91918E;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-radius: 8px;
    line-height: 1.3;
}

.nav-group-header:hover {
    color: #37352F;
    background-color: #EFEFED;
    transition: background-color 0.15s ease;
}

.nav-group-header i {
    font-size: 1rem;
    width: 16px;
    height: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B4B4B0;
    flex-shrink: 0;
}

.nav-group-header:hover i {
    color: #37352F;
}

.nav-group-header i:first-child {
    font-size: 12px;
    width: 12px;
    height: 12px;
    transition: transform 200ms ease;
}
.nav-group-header.section-expanded i:first-child {
    transform: rotate(90deg);
}

/* Tier 3 Navigation (nav-sub-item-2) - deepest level */
.nav-sub-item-2 {
    padding-left: 3.25rem !important;
    padding-top: 0.3125rem !important;
    padding-bottom: 0.3125rem !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    color: #787774 !important;
    line-height: 1.3 !important;
    transition: background-color 0.15s ease;
}

.nav-sub-item-2 i {
    font-size: 1rem !important;
    width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.nav-sub-item-2:hover {
    color: #37352F !important;
    transition: background-color 0.15s ease;
}

.nav-sub-item-2.active {
    color: #37352F !important;
    font-weight: 600 !important;
    background-color: #E8E5E0 !important;
    transition: background-color 0.15s ease;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top Bar */
.top-bar {
    background: white;
    border-bottom: 1px solid #E8E5E0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem;
    min-height: 4.5rem;
}

.top-bar-spacer {
    flex: 1;
}

.top-bar-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-title {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: #1A1A1A;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    outline: none;
}

.page-title:focus {
    outline: none;
}

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

.page-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

.top-bar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Top Bar Actions - Jira-style icons */
.top-bar-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.top-bar-actions .top-bar-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #42526e;
    cursor: pointer;
    transition: background-color 0.15s ease;
    position: relative;
    text-decoration: none;
    box-shadow: none;
    outline: none;
}

.top-bar-actions .top-bar-icon-btn:visited {
    color: #42526e;
}

.top-bar-actions .top-bar-icon-btn i {
    font-size: 1.125rem;
    line-height: 1;
}

.top-bar-actions .top-bar-icon-btn:hover {
    background-color: rgba(9, 30, 66, 0.08);
    color: #42526e;
    text-decoration: none;
}

.top-bar-actions .top-bar-icon-btn:active {
    background-color: rgba(9, 30, 66, 0.12);
}

.top-bar-actions .top-bar-icon-btn:focus {
    outline: none;
    box-shadow: none;
}

.top-bar-actions .top-bar-icon-btn.filter-btn {
    position: relative;
    width: auto;
    padding: 0.5rem 1rem;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid #dfe1e6;
    background: white;
    height: auto;
    border-radius: 8px;
}

.top-bar-actions .top-bar-icon-btn.filter-btn .btn-label {
    font-size: 0.8125rem;
}

.top-bar-actions .top-bar-icon-btn.filter-btn:hover {
    background-color: #f4f5f7;
    border-color: #c1c7d0;
}

.top-bar-actions .top-bar-icon-btn.filter-btn.active {
    background-color: #0052cc;
    border-color: #0052cc;
    color: white;
}

.top-bar-actions .icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #de350b;
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    padding: 0 4px;
    border: 2px solid white;
}

/* Filter badge: add 1px rounded border */
.top-bar-actions .icon-badge.filter-badge {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Profile icon uses same styling as other icons - no special styling needed */

.top-bar-actions .top-bar-dropdown {
    position: relative;
    display: inline-flex;
}

.top-bar-actions .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
    z-index: 1000;
    overflow: hidden;
    animation: topBarDropdownFadeIn 0.15s ease;
}

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

.top-bar-actions .dropdown-header {
    padding: 12px 16px 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b778c;
}

.top-bar-actions .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #172b4d;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.1s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
}

.top-bar-actions .dropdown-item:hover {
    background-color: #f4f5f7;
    color: #172b4d;
    text-decoration: none;
}

.top-bar-actions .dropdown-item i {
    width: 20px;
    text-align: center;
    color: #6b778c;
    font-size: 1rem;
}

.top-bar-actions .dropdown-item:hover i {
    color: #42526e;
}

.top-bar-actions .dropdown-item .item-badge {
    margin-left: auto;
    background: #0052cc;
    color: white;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0 6px;
}

.top-bar-actions .dropdown-divider {
    height: 1px;
    margin: 4px 0;
    background: #ebecf0;
}

.top-bar-actions .dropdown-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    color: #6b778c;
    font-size: 0.8125rem;
}

.top-bar-actions .dropdown-empty i {
    font-size: 1.5rem;
    color: #36b37e;
}

.top-bar-actions .dropdown-item.logout-item {
    color: #de350b;
}

.top-bar-actions .dropdown-item.logout-item i {
    color: #de350b;
}

.top-bar-actions .dropdown-item.logout-item:hover {
    background-color: #ffebe6;
}

.top-bar-actions .dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: transparent;
}

/* Tour button pulse effect — high specificity to override :visited colour */
.top-bar-actions a.top-bar-icon-btn.tour-pulse,
.top-bar-actions a.top-bar-icon-btn.tour-pulse:visited,
.top-bar-actions a.top-bar-icon-btn.tour-pulse:hover {
    color: #fff !important;
    background: #5b7cfa;
    border-radius: 50%;
    animation: tour-btn-pulse 1.8s ease-in-out infinite;
}

.top-bar-actions a.top-bar-icon-btn.tour-pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #5b7cfa;
    animation: tour-ring-expand 1.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tour-btn-pulse {
    0%, 100% { background: #5b7cfa; transform: scale(1); box-shadow: 0 0 0 0 rgba(91, 124, 250, 0.5); }
    50% { background: #4f6ef7; transform: scale(1.12); box-shadow: 0 0 12px 4px rgba(91, 124, 250, 0.35); }
}

@keyframes tour-ring-expand {
    0% { opacity: 0.8; transform: scale(0.85); }
    70% { opacity: 0; transform: scale(1.6); }
    100% { opacity: 0; transform: scale(1.6); }
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 16px;
    background-color: #F7F7F5;
}

/* Empty Layout (for Landing page) */
.empty-layout {
    min-height: 100vh;
    background-image: url('/images/LoginBackgrounds/shangrila2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 2rem;
}

/* Landing Page Styles - single source for panel radius/gaps */
.landing-container {
    --landing-panel-radius: 12px;
    --landing-panel-gap: 5px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: var(--landing-panel-gap);
}

/* All landing panels use the same radius (override any other rules) */
.landing-container .welcome-card,
.landing-container .brands-section,
.landing-container .brand-card,
.landing-container .tool-card,
.landing-container .saved-views-section,
.landing-container .footer-note {
    border-radius: var(--landing-panel-radius);
}

/* Vertical spacing is from container gap only - no extra margin between panels */
.landing-container .welcome-card,
.landing-container .brands-section,
.landing-container .saved-views-section,
.landing-container .footer-note {
    margin-bottom: 0;
}

.welcome-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 5px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    text-align: center;
}

.welcome-card.compact-welcome {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 2rem;
    padding: 1.5rem 2rem;
    min-height: 120px;
}

.welcome-card.compact-welcome .welcome-logo {
    flex: 0 0 auto;
}

.welcome-card.compact-welcome .welcome-logo img {
    margin-bottom: 0;
    max-width: 180px;
    height: auto;
}

.welcome-card.compact-welcome .welcome-content {
    flex: 1;
    position: relative;
}

.welcome-divider {
    border-top: 2px solid var(--primary-color);
    width: 60px;
    margin: 0.5rem 0 1rem 0;
    opacity: 1;
}

.welcome-links {
    margin-top: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    cursor: pointer;
}

.contact-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.welcome-links-logout-form {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.welcome-links-logout-btn {
    all: unset;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.welcome-links-logout-btn:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.welcome-links-logout-btn:focus {
    outline: none;
    box-shadow: none;
}

.welcome-card.compact-welcome h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    outline: none;
}

.welcome-card.compact-welcome h1:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 8px;
}

.welcome-card.compact-welcome .lead {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.welcome-logo img {
    max-width: 350px;
    margin-bottom: 1rem;
}

.welcome-card h1 {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    outline: none;
}

.welcome-card h1:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 8px;
}

.welcome-card .lead {
    color: var(--text-light);
    font-size: 1.2rem;
    line-height: 1.8;
}

.welcome-card strong {
    color: var(--primary-color);
}

/* Tools Grid */
.tools-section {
    margin-bottom: 1.5rem;
}

.tools-section h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

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

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 2rem 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.tool-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.tool-card:hover i {
    color: var(--primary-hover);
}

.tool-card span {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
}

/* Brand Selection */
.brands-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    margin-bottom: 5px;
    backdrop-filter: blur(5px);
}

.brands-section h2 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 700;
}

.brands-section p {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 0 auto;
    margin-bottom: 1.5rem;
}

/* First column = exact same width as one brand card: (100% - 3 gaps) / 4 */
.mixed-actions-row {
    display: grid;
    grid-template-columns: calc((100% - 4.5rem) / 4) 1fr;
    gap: 1.5rem;
}

.global-card {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tools-grid-inline {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.tool-card.mini-tool {
    padding: 1.25rem 1rem;
    margin-bottom: 0;
}

.tool-card.mini-tool i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    transition: color 0.2s ease;
}

.tool-card.mini-tool:hover i {
    color: var(--primary-hover);
}

.tool-card.mini-tool span {
    font-size: 0.95rem;
    font-weight: 500;
}

.tool-divider {
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    border: none;
    margin: 0.5rem 0;
}

.tool-desc {
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    color: var(--text-light) !important;
    line-height: 1.2;
}

.brand-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    padding: 1rem;
    text-align: center;
    border: 3px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.brand-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.brand-card img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.brand-card:hover img {
    transform: scale(1.03);
}

.brand-name {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.brand-name i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.brand-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-light);
    padding: 1rem;
    text-align: center;
    border: 2px solid transparent;
}

.brand-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.brand-item img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    border-radius: 8px;
}

.brand-item span {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Footer Note */
.footer-note {
    text-align: center;
    color: white;
    font-size: 0.85rem;
    line-height: 1.8;
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    opacity: 0.85;
}

.footer-note p {
    margin-bottom: 0.5rem;
}

.footer-note em {
    font-style: italic;
}

.footer-note strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Login Display */
.login-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    transition: background-color 0.15s ease;
}

/* Filter Tray */
.filter-tray {
    position: fixed;
    right: -400px;
    top: 0;
    bottom: 0;
    width: 380px;
    background: white;
    box-shadow: -4px 0 16px rgba(0,0,0,0.2);
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.filter-tray.open {
    right: 0;
}

.filter-tray-header {
    padding: 0.5rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.filter-tray-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.filter-tray-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.filter-tray-close:hover {
    transform: scale(1.1);
}

.filter-tray-content {
    padding: 1rem;
}

.filter-section {
    margin-bottom: 0.6rem;
    padding-bottom: 0.45rem;
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-section h4 {
    color: var(--text-dark);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group {
    margin-bottom: 0.45rem;
}

.filter-group.date-range-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.filter-group .form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
}

.filter-group .searchable-dropdown-input,
.filter-group .searchable-dropdown .searchable-dropdown-input,
.searchable-dropdown .form-control.searchable-dropdown-input {
    background-color: white !important;
    background: white !important;
    background-image: none !important;
}

.filter-group .searchable-dropdown-toggle {
    position: relative;
}

.autocomplete-input {
    width: 100%;
}

/* Searchable Dropdown */
.searchable-dropdown {
    position: relative;
    width: 100%;
}

.searchable-dropdown-toggle {
    position: relative;
    display: block;
    width: 100%;
}

.searchable-dropdown-input {
    width: 100% !important;
    cursor: pointer;
    padding-right: 2.5rem !important;
    background-color: white !important;
    background: white !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.searchable-dropdown-input[readonly] {
    background-color: white !important;
    background: white !important;
    cursor: pointer;
}

.searchable-dropdown-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-light);
    transition: transform 0.2s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    line-height: 1;
}

.searchable-dropdown-arrow i {
    font-size: 0.75rem;
    line-height: 1;
    display: block;
}

.searchable-dropdown-arrow.open {
    transform: translateY(-50%) rotate(180deg);
}

/* Ensure arrow is inside the input box - override any other styles */
.searchable-dropdown-toggle .searchable-dropdown-arrow {
    position: absolute !important;
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.searchable-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white !important;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: 0.25rem;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.searchable-dropdown-search {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.searchable-dropdown-search input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background-color: white !important;
}

.searchable-dropdown-options {
    overflow-y: auto;
    max-height: 250px;
}

.searchable-dropdown-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    background-color: white;
}

.searchable-dropdown-option:last-child {
    border-bottom: none;
}

.searchable-dropdown-option:hover {
    background-color: var(--bg-light);
}

.searchable-dropdown-option.selected {
    background-color: rgba(166, 138, 58, 0.1);
    font-weight: 600;
    color: var(--primary-color);
}

.searchable-dropdown-option.no-results {
    color: var(--text-light);
    font-style: italic;
    cursor: default;
}

.searchable-dropdown-option.no-results:hover {
    background-color: transparent;
}

/* Data Table Debug Styles */
.data-table-container {
    max-height: 350px;
    overflow-y: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
}

/* Chart panel data table headers: align with primary accent colour */
.data-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-bottom: 2px solid var(--primary-color);
}

.data-table th {
    padding: 0.5rem 1rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-bottom: 2px solid var(--primary-color);
    line-height: 1.4;
    color: white;
    background: transparent;
}

body[data-ui-theme="minimal"] .data-table th {
    border: 1px solid #e5e7eb;
    border-bottom: 2px solid #d1d5db;
}

/* Sub-headers (wave labels, Count, %) – slightly darker band, still white text */
.data-table th[style*="background: #f8f9fa"],
.data-table th.response-header {
    background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%) !important;
    font-weight: 500;
    font-size: 0.875rem;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.data-table tbody tr {
    border-bottom: 1px solid #d1d5db;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.data-table tbody tr:nth-child(odd) {
    background-color: white;
}

.data-table tbody tr:hover {
    background-color: #f3f4f6;
}

.data-table td {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    color: var(--text-dark);
    line-height: 1.4;
}

.data-table td:first-child {
    font-weight: 500;
}

.data-table td:last-child {
    font-weight: 600;
    color: var(--secondary-color);
}

.data-table .data-table-total-row td {
    border-top: 2px solid #6b7280;
    font-weight: 600;
    background: #f8f9fa;
}

.data-table-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.data-table-debug {
    padding: 1rem;
}

.data-table-debug h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.data-table-debug p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.data-table-debug table {
    width: 100%;
    font-size: 0.875rem;
}

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

.data-table-debug th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.data-table-debug td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

/* Insights Co-pilot Styles – use theme variables to match rest of app */
.copilot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

.copilot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.copilot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

.copilot-toggle.open {
    transform: rotate(90deg);
    background: var(--secondary-color);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background-color: #f56565;
    border-radius: 50%;
    border: 2px solid white;
}

.copilot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
    border: 1px solid rgba(0,0,0,0.1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.copilot-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copilot-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copilot-header .btn-icon {
    color: white;
}

.copilot-header .btn-icon:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
}

.copilot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    align-items: flex-end;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.bot .message-content {
    background: white;
    color: #1f2937;
    border-bottom-left-radius: 2px;
}

.user .message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-time {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    margin-left: 0.5rem;
}

.user .message-time {
    margin-right: 0.5rem;
}

.copilot-options {
    padding: 0.5rem 1rem;
    background: #f8fafc;
}

.options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.option-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.option-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.copilot-input {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.5rem;
}

.copilot-input input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 24px;
    outline: none;
    font-size: 0.95rem;
}

.copilot-input input:focus {
    border-color: var(--primary-color);
}

.send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.send-btn:hover {
    background: var(--primary-hover);
}

.send-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #a0aec0;
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

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

/* Page Feedback Widget – theme-aligned */
.feedback-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1990;
}

.feedback-toggle {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
}

.feedback-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    color: white;
}

.feedback-panel {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 320px;
    background: var(--ds-bg-card, white);
    border-radius: var(--ds-radius-card, 12px);
    box-shadow: var(--ds-shadow-card), 0 8px 32px rgba(0,0,0,0.12);
    padding: 0;
    animation: slideUp 0.3s ease-out;
    border: 1px solid var(--ds-border-default, #E8E5E0);
    overflow: hidden;
}

/* Match Help Chatbot (Co-pilot) popup header styling */
.feedback-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.feedback-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.feedback-panel .feedback-form,
.feedback-panel .feedback-success {
    padding: 1.5rem;
}

.feedback-header .btn-close-custom {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
}

.feedback-header .btn-close-custom:hover {
    color: rgba(255, 255, 255, 0.85);
}

.btn-close-custom {
    background: none;
    border: none;
    color: var(--ds-text-muted, #999);
    cursor: pointer;
    font-size: 1rem;
}

.btn-close-custom:hover {
    color: var(--ds-text-primary, var(--text-dark));
}

.star-rating {
    display: flex;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: var(--ds-border-default, #ddd);
    cursor: pointer;
    margin: 0.5rem 0;
}

.star-rating i.active {
    color: var(--primary-color);
}

.star-rating i:hover {
    color: var(--primary-hover);
}

.feedback-success {
    text-align: center;
    padding: 2rem 0;
    color: var(--primary-color);
}

.feedback-success i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Feedback form buttons – use theme primary */
.feedback-panel .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    color: white;
}

.feedback-panel .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    color: white;
}

.feedback-panel .btn-primary:disabled {
    background: var(--ds-border-default);
    color: var(--ds-text-muted);
}

.feedback-panel .btn-success {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.feedback-panel .btn-success:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.feedback-panel .btn-outline-secondary {
    border-color: var(--ds-border-default);
    color: var(--ds-text-secondary);
}

.feedback-panel .btn-outline-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.feedback-panel .form-control {
    border-color: var(--ds-border-default);
}

.feedback-panel .form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}

/* Fullscreen Chart Styles */
.chart-panels-grid.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
    background-color: white !important;
    padding: 2rem !important;
    overflow: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.chart-panel.fullscreen-chart {
    width: 95% !important;
    height: 90vh !important;
    max-width: none !important;
    margin: 0 !important;
}

.chart-panel.fullscreen-chart .panel-body {
    height: calc(100% - 70px) !important;
}

.chart-panel.fullscreen-chart .panel-body > div {
    height: 100% !important;
}

.chart-panel.fullscreen-chart [id^="chart-"] {
    height: 100% !important;
    min-height: 600px !important;
}

.chart-panel.hidden-chart {
    display: none !important;
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.filter-checkbox:hover {
    background-color: var(--bg-light);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-checkbox span {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.filter-checkbox.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.filter-checkbox.disabled:hover {
    background-color: transparent;
}

.filter-checkbox.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.filter-checkbox.disabled span {
    color: #999;
}

.filter-info-message {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #856404;
}

.filter-info-message i {
    color: #856404;
    font-size: 1rem;
}

.filter-info-message strong {
    font-weight: 600;
}

.filter-actions-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #d1d5db, transparent);
    margin: 1.5rem 0 1rem 0;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0;
}

.filter-action-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.filter-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.filter-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.filter-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transition: background-color 0.15s ease;
}

.filter-actions .btn-secondary {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: var(--text-dark);
    border: 1px solid #d1d5db;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.filter-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    transition: background-color 0.15s ease;
}

.filter-actions .btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    transition: background-color 0.15s ease;
}

.filter-actions .btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transition: background-color 0.15s ease;
}

/* Modal styles for Save Audience */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.modal-container.modal-wide {
    max-width: 1000px;
}

.section-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel-header-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.125rem;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Minimal theme: dark text on light background */
body[data-ui-theme="minimal"] .modal-header {
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

body[data-ui-theme="minimal"] .modal-header h2 {
    color: #374151;
}

body[data-ui-theme="minimal"] .modal-close {
    background: rgba(0, 0, 0, 0.1);
    color: #374151;
}

body[data-ui-theme="minimal"] .modal-close:hover {
    background: rgba(0, 0, 0, 0.15);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f9fafb;
}

.modal-footer .btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.modal-footer .btn-secondary {
    background: #e5e7eb;
    color: #374151;
    transition: background-color 0.15s ease;
}

.modal-footer .btn-secondary:hover {
    background: #d1d5db;
    color: #1f2937;
    transition: background-color 0.15s ease;
}

.modal-footer .btn-primary {
    background: var(--primary-color);
    color: white;
    transition: background-color 0.15s ease;
}

.modal-footer .btn-primary:hover {
    background: var(--primary-hover);
    transition: background-color 0.15s ease;
}

.filter-tray-toggle {
    position: fixed;
    right: 20px;
    top: 100px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.filter-tray-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.filter-tray-toggle.open {
    right: 400px;
}

/* Dashboard Styles */
.dashboard-container {
    padding: 0 0.5rem;
}

.dashboard-header {
    margin-bottom: 1rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.dashboard-header p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.chart-panels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.chart-panel {
    background: #FFFFFF;
    border: 1px solid #E8E5E0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s ease;
}

.chart-panel:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.panel-header {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border-bottom: 1px solid #E8E5E0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    color: #333;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Minimal theme: same styling as default now */
body[data-ui-theme="minimal"] .panel-header h3 {
    color: #37352F;
}

body[data-ui-theme="minimal"] .panel-header .btn-icon {
    color: #999;
}

body[data-ui-theme="minimal"] .panel-header .btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    transition: background-color 0.15s ease;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 8px;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.btn-icon i {
    font-size: 1rem;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    transition: background-color 0.15s ease;
}

.btn-icon.active {
    background: rgba(255, 193, 7, 0.15);
}

.btn-icon.active i {
    color: #ffc107 !important;
    font-size: 1rem;
}

.btn-icon.in-basket {
    color: #999;
}

.btn-icon.in-basket i {
    color: #28a745 !important;
    font-size: 1rem;
}

.panel-body {
    padding: 1.5rem;
    min-height: 300px;
}

/* Highcharts typography - axis labels and data labels */
.panel-body .highcharts-axis-labels text,
.panel-body .highcharts-label text,
.panel-body .highcharts-data-label text,
.panel-body .highcharts-tooltip text {
    font-size: 0.75rem !important;
    fill: #666 !important;
}

.panel-body .highcharts-axis-title text {
    font-size: 0.75rem !important;
    fill: #666 !important;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

.chart-placeholder .chart-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.chart-placeholder p {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.chart-placeholder small {
    color: var(--text-light);
    font-size: 0.875rem;
}

.chart-base {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    font-style: italic;
}

.chart-base-left {
    text-align: left;
}

.chart-base-right {
    text-align: right;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

/* Ranking Table Styles */
.ranking-table-container {
    overflow-x: auto;
    margin-top: 0.5rem;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}

.ranking-table thead {
    background-color: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.ranking-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-table td {
    padding: 0.875rem 1rem;
    border-bottom: 2px solid #d1d5db;
    color: var(--text-dark);
}

.ranking-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Variance row styling */
.ranking-table tbody tr.variance-positive {
    background-color: rgba(40, 167, 69, 0.08);
}

.ranking-table tbody tr.variance-negative {
    background-color: rgba(220, 53, 69, 0.08);
}

.ranking-table tbody tr.variance-positive:hover {
    background-color: rgba(40, 167, 69, 0.15);
}

.ranking-table tbody tr.variance-negative:hover {
    background-color: rgba(220, 53, 69, 0.15);
}

/* Variance cell with bar */
.variance-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.variance-cell.variance-positive-layout {
    justify-content: flex-end;
}

.variance-cell.variance-negative-layout {
    justify-content: flex-start;
}

/* Centered variance cell with balanced bars */
.variance-cell-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 115px; /* Fixed width: 25px left + ~40px center + 25px right */
    margin: 0 auto;
    gap: 0.25rem;
}

.variance-bar-left,
.variance-bar-right {
    width: 25px; /* Max bar width (half of original 50px) */
    display: flex;
    align-items: center;
}

.variance-bar-left {
    justify-content: flex-end; /* Bars align to right edge (toward center) */
}

.variance-bar-right {
    justify-content: flex-start; /* Bars align to left edge (toward center) */
}

.variance-number {
    flex-shrink: 0;
    text-align: center;
    min-width: 40px; /* Enough for "-100%" */
    white-space: nowrap;
}

.variance-bar {
    height: 8px;
    border-radius: 8px;
    min-width: 4px;
}

.variance-bar.positive {
    background: linear-gradient(90deg, #28a745, #34ce57);
}

.variance-bar.negative {
    background: linear-gradient(90deg, #dc3545, #e4606d);
}

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

/* Bolder line between 3rd and 4th place (medal winners vs rest) */
.ranking-table .ranking-divider-row td {
    padding: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
    border: none !important;
    border-bottom: 4px solid #6b7280 !important;
    vertical-align: top;
}

.rank-cell {
    text-align: center !important;
    width: 60px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.rank-badge.rank-other {
    background: var(--primary-color);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.hotel-name {
    font-weight: 500;
    color: var(--text-dark);
}

.ranking-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.ranking-link:hover {
    text-decoration: underline;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.kpi-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.kpi-trend {
    font-size: 0.875rem;
    font-weight: 600;
}

.kpi-trend.positive {
    color: #28a745;
}

.kpi-trend.negative {
    color: #dc3545;
}

/* Verbatim Explorer */
.verbatim-container {
    padding: 0;
}

.verbatim-header {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.verbatim-header h1 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.verbatim-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.verbatim-toolbar {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-box {
    flex: 1;
    position: relative;
    max-width: 500px;
}

.quick-search-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-search-btn {
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    background-color: #f9fafb;
    color: var(--text-dark);
}

.quick-search-btn:hover {
    background-color: #e5e7eb;
}

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

.search-box .form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
}

.toolbar-actions {
    display: flex;
    gap: 0.75rem;
}

.toolbar-actions .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.verbatim-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.verbatim-table {
    width: 100%;
    border-collapse: collapse;
}

.verbatim-table thead {
    background: var(--bg-light);
}

.verbatim-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    border-bottom: 2px solid var(--border-color);
}

.verbatim-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-dark);
}

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

.verbatim-cell-filter-link {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--secondary-color);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
}

.verbatim-cell-filter-link:hover {
    color: var(--primary-color);
}

.quick-filters-container {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.75rem;
}

.quick-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    background-color: #F0EFED;
    color: #555;
    font-size: 0.8rem;
}

.quick-filter-clear {
    border: none;
    background: none;
    padding: 0;
    margin-left: 0.25rem;
    cursor: pointer;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quick-filter-clear:hover {
    color: var(--primary-color);
}

.clear-all-filters {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: underline;
    border: none;
    background: none;
    cursor: pointer;
}

.clear-all-filters:hover {
    color: var(--primary-color);
}

.quick-filter-clear i {
    font-size: 0.7rem;
}

.nps-col {
    text-align: center !important;
}

.nps-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 30px;
}

.nps-green {
    background-color: #d1fae5; /* Muted Green */
    color: #065f46;
}

.nps-yellow {
    background-color: #fef3c7; /* Muted Amber/Yellow */
    color: #92400e;
}

.nps-red {
    background-color: #fee2e2; /* Muted Red */
    color: #991b1b;
}

.nps-unknown {
    background-color: #f3f4f6;
    color: #6b7280;
}

.nps-badge {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.nps-promoter {
    background-color: #c6f6d5; /* Muted Green */
    color: #22543d;
}

.nps-passive {
    background-color: #fefcbf; /* Muted Yellow */
    color: #744210;
}

.nps-detractor {
    background-color: #fed7d7; /* Muted Red */
    color: #742a2a;
}

.verbatim-table td.nps-col {
    text-align: center;
}

/* Respondent ID column - less prominent background variable */
.verbatim-table th.respondent-id-col,
.verbatim-table td.respondent-id-col {
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 400;
    opacity: 0.7;
}

.verbatim-table th.respondent-id-col {
    font-weight: 500;
    opacity: 0.8;
}

/* Verbatim Response column - styled for readability, but keep row background colour */
.verbatim-table td.verbatim-cell {
    font-style: italic;
    color: #4b5563;
    padding-left: 1.5rem;
    padding-right: 1.25rem;
    position: relative;
    line-height: 1.7;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #F0EFED;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #555;
    margin-right: 0.25rem;
}

.verbatim-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.page-info {
    color: var(--text-dark);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-title,
    .sidebar-nav .nav-item span,
    .nav-section-header span {
        display: none;
    }

    .nav-section-header {
        padding: 0.5rem 1.25rem;
    }

    .nav-sub-item {
        padding-left: 1.25rem !important;
    }

    .main-wrapper {
        margin-left: 70px;
    }

    .main-content {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

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

    .chart-panels-grid {
        grid-template-columns: 1fr;
    }

    .filter-tray {
        width: 100%;
        right: -100%;
    }

    .filter-tray-toggle.open {
        right: 20px;
    }

    .verbatim-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Exports Page */
.exports-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.exports-header {
    text-align: center;
    margin-bottom: 3rem;
}

.exports-header h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.exports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.export-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.2s;
}

.export-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.deck-factory-card {
    border: 2px solid #667eea;
}

.deckbuilder-card {
    border: 2px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.deckbuilder-card .card-icon {
    color: #10b981;
}

.deckbuilder-card h2 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.deckbuilder-card p {
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.deckbuilder-card strong {
    color: #10b981;
    font-weight: 600;
    font-size: 1.125rem;
}

.card-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.deck-filters {
    margin: 1.5rem 0;
    text-align: left;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
}

/* Usage Analysis – compact top row (time range selector) */
.time-range-selector .form-control {
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
    line-height: 1.35;
    min-height: unset;
    height: auto;
}
.time-range-selector .btn {
    padding: 0.35rem 1rem;
    font-size: 0.875rem;
    line-height: 1.35;
    min-height: unset;
    height: auto;
}

/* Exports page – align buttons with theme (green / primary) */
.exports-container .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    color: white;
}

.exports-container .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    color: white;
}

.exports-container .btn-primary:disabled {
    background: var(--ds-border-default, #e5e7eb);
    color: var(--ds-text-muted, #9ca3af);
    cursor: not-allowed;
}

.exports-container .btn-secondary {
    background: transparent;
    border: 1px solid var(--ds-border-default, #e5e7eb);
    color: var(--ds-text-secondary, #6b7280);
}

.exports-container .btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Profile Page */
.profile-container {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

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

.profile-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.profile-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    color: white;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.profile-info h2 {
    margin: 0;
    font-size: 1.5rem;
}

.profile-section {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.profile-section:last-child {
    border-bottom: none;
}

.profile-section h3 {
    color: #374151;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Verbatim Explorer Additions */
.flag-icon {
    margin-right: 0.5rem;
    border-radius: 8px;
}

.filter-row th {
    background: #f8fafc;
    padding: 0.5rem;
}

.filter-row input, .filter-row select {
    font-size: 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 100%;
}
.data-explorer-container {
    padding: 0 0.5rem 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.data-explorer-header {
    margin-bottom: 2.5rem;
}

.data-explorer-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.data-explorer-header h1 i {
    color: var(--primary-color);
}

.data-explorer-header p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.data-explorer-controls {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group label i {
    color: var(--primary-color);
}

.cross-tab-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 1rem;
    width: 100%;
}

.cross-tab-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.cross-tab-header-content {
    flex: 1;
}

.cross-tab-header h3 {
    margin: 0 0 1rem 0;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cross-tab-header h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--panel-header-bg);
    border-radius: 8px;
}

body[data-ui-theme="minimal"] .cross-tab-header h3::before {
    background: #d1d5db;
}

.cross-tab-info {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}

.cross-tab-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.cross-tab-info strong {
    color: var(--text-dark);
    font-weight: 600;
}

.cross-tab-table-wrapper {
    overflow-x: auto;
    width: 100%;
    position: relative;
}

.cross-tab-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.875rem !important;
    border: 1px solid #9ca3af !important;
    border-radius: 0 !important; /* Collapse requires removing border-radius on table for cleaner look, or use overflow hidden on container */
    background: white !important;
}

.cross-tab-table thead {
    background: var(--panel-header-bg) !important;
}

body[data-ui-theme="minimal"] .cross-tab-table thead {
    background: #f3f4f6 !important;
}

body[data-ui-theme="minimal"] .cross-tab-table th {
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
}

.cross-tab-table th {
    padding: 1rem 1.25rem !important;
    text-align: center !important;
    font-weight: 700 !important;
    color: white !important;
    white-space: nowrap !important;
    border: 1px solid #5a67d8 !important; /* Darker border for header */
    font-size: 0.8125rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    position: relative !important;
    background: transparent !important;
}

.cross-tab-table th.row-header {
    background: var(--panel-header-bg) !important;
    z-index: 10 !important;
    text-align: left !important;
}

.cross-tab-table th.total-col {
    background: var(--panel-header-bg) !important;
    opacity: 0.9;
}

body[data-ui-theme="minimal"] .cross-tab-table th.row-header,
body[data-ui-theme="minimal"] .cross-tab-table th.total-col {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.cross-tab-table tbody {
    background: white !important;
}

.cross-tab-table td {
    padding: 0.875rem 1.25rem !important;
    border: 1px solid #d1d5db !important; /* Clean light grey border */
    white-space: nowrap !important;
    transition: background-color 0.15s ease !important;
    color: var(--text-dark) !important;
    text-align: center !important;
}

.cross-tab-table td.row-header {
    background: #f9fafb !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 5 !important;
    min-width: 200px !important;
    border-right: 2px solid #9ca3af !important; /* Highlight vertical separation */
    text-align: left !important;
}

.cross-tab-table tbody tr:nth-child(even) td.row-header {
    background: #f3f4f6 !important;
}

.cross-tab-table td.count-cell,
.cross-tab-table td.percentage-cell {
    text-align: center !important;
    padding-right: 1.5rem !important;
}

.cross-tab-table td.percentage-cell {
    font-weight: 600 !important;
    color: #667eea !important;
}

.cross-tab-table td.total-col {
    background: #f3f4f6 !important;
    font-weight: 700 !important;
    text-align: center !important;
    border-left: 2px solid #9ca3af !important; /* Highlight vertical separation for totals */
    padding-right: 1.5rem !important;
}

.cross-tab-table tr.total-row {
    background: #e5e7eb !important;
}

.cross-tab-table tr.total-row td {
    font-weight: 700 !important;
    border-top: 2px solid #667eea !important; /* Highlight total row */
    background: #e5e7eb !important;
}

.cross-tab-table tr.total-row td.row-header {
    background: #d1d5db !important;
    border-top: 2px solid #667eea !important;
}

.cross-tab-table tbody tr {
    background: white !important;
}

.cross-tab-table tbody tr:nth-child(even) {
    background: #f9fafb !important;
}

.cross-tab-table tbody tr:last-child td {
    border-bottom: 2px solid #9ca3af !important;
}

.cross-tab-table tbody tr:hover {
    background: #f0f9ff !important;
}

.cross-tab-table tbody tr:nth-child(even):hover {
    background: #e0f2fe !important;
}

.cross-tab-table tbody tr:hover td.row-header {
    background: #f0f9ff !important;
}

.cross-tab-table tbody tr:nth-child(even):hover td.row-header {
    background: #e0f2fe !important;
}

.controls-toggle-bar {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
}

.insights-panel {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.insights-header h4 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insights-actions {
    display: flex;
    gap: 0.5rem;
}

.insights-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.insights-actions .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.insights-actions .btn-secondary:hover {
    background-color: #5a6268;
}

.insights-actions .btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.insights-actions .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

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

.insights-actions .btn-primary:hover {
    background-color: #34495e;
}

.insights-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}

.insights-textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

.cross-tab-footnote {
    padding: 0.75rem 1.25rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.85rem;
    font-style: italic;
    text-align: right;
}

/* Audience Explorer Styles */
.audience-container {
    padding: 1rem 2rem;
    max-width: 100%;
    margin: 0 auto;
}

.audience-header {
    margin-bottom: 2rem;
}

.audience-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.audience-header h1 i {
    color: var(--primary-color);
}

.audience-header p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

/* Audience Control Bar – now handled by scoped AudienceExplorer.razor.css */

/* Comparisons Dashboard – Apply / Clear buttons use theme colours */
.comparison-selector-panel .btn,
.comparison-selector-panel .btn.btn-primary,
.comparison-selector-panel .btn.btn-secondary {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comparison-selector-panel .form-control {
    border-radius: 8px;
}

.comparison-selector-panel .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.comparison-selector-panel .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.comparison-selector-panel .btn-primary:disabled {
    background: var(--ds-border-default, #e5e7eb);
    color: var(--ds-text-muted, #9ca3af);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.comparison-selector-panel .btn-secondary {
    background: transparent;
    border: 1px solid var(--ds-border-default, #e5e7eb);
    color: var(--ds-text-secondary, #6b7280);
}

.comparison-selector-panel .btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--secondary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--secondary-color);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Audience Save/Load, Summary Panel – now handled by scoped AudienceExplorer.razor.css */

.filters-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.filter-category {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.filter-category-title {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-light);
    font-weight: 600;
}

.filter-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.filter-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
    position: relative;
    text-align: center;
    color: var(--text-dark);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filter-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.filter-button.active {
    background: #eef2ff; /* Light indigo/purple tint */
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Audience theme-gold – now handled by scoped AudienceExplorer.razor.css */

.audience-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.report-results {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

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

.report-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
}

.report-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.question-table-container {
    margin-bottom: 2.5rem;
}

.question-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.question-table-wrapper {
    overflow-x: auto;
}

.question-table {
    width: 100%;
    border-collapse: collapse;
}

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

.question-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.question-table .text-right {
    text-align: right;
}

.question-table .percentage-cell {
    font-weight: 600;
    color: var(--secondary-color);
}

.question-table .total-row td {
    background: var(--bg-light);
    font-weight: 700;
    border-top: 2px solid var(--border-color);
}

/* Comparison Table */
.aud-1-col {
    background-color: #f8f9fa;
    border-right: 1px solid #e5e7eb;
}

.aud-2-col {
    background-color: #fff;
    border-right: 1px solid #e5e7eb;
}

.text-success { color: #28a745; font-weight: 600; }
.text-danger { color: #dc3545; font-weight: 600; }
.text-muted { color: #6c757d; }

/* Scorecard Styles */
.scorecard-controls {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    border-bottom: 2px solid #eef2ff;
}

.benchmark-info, .base-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.benchmark-info .label, .base-info .label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.benchmark-info .value {
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.base-info .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.scorecard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.scorecard-loading-banner {
    margin-bottom: 0.5rem;
}

.scorecard-panel-loading,
.chart-panel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 350px;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    color: var(--text-light);
    font-size: 1rem;
}

.scorecard-panel-loading i,
.chart-panel-loading i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.comparison-loading-banner {
    margin-bottom: 1rem;
}

.comparison-charts-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 3rem;
}

.comparison-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.comparison-loading-content i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.league-table-banner {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.league-table-banner h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.league-table table {
    width: 100%;
    border-collapse: collapse;
}

.league-table thead th {
    text-align: left;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-light);
    border-bottom: 2px solid #e5e7eb;
}

.league-table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.league-table tbody tr.selected-brand {
    background-color: #eff6ff;
    font-weight: 500;
}

.league-table tbody tr.selected-brand td {
    border-bottom-color: #dbeafe;
}

.league-table .rank-cell {
    text-align: center;
}

.league-table .brand-name {
    font-weight: 500;
}

.league-table .score-cell {
    font-weight: 600;
    color: var(--primary-color);
}

.overall-score-card {
    background: var(--panel-header-bg);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Minimal theme: dark text on light scorecard hero */
body[data-ui-theme="minimal"] .overall-score-card {
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

body[data-ui-theme="minimal"] .overall-score-card .league-table-in-banner {
    border-top-color: #d1d5db;
}

body[data-ui-theme="minimal"] .league-table-compact {
    background: rgba(0, 0, 0, 0.04);
}

body[data-ui-theme="minimal"] .league-table-compact thead th {
    color: #6b7280;
    border-bottom-color: #d1d5db;
}

body[data-ui-theme="minimal"] .league-table-compact tbody td {
    color: #374151;
}

body[data-ui-theme="minimal"] .league-table-compact .brand-name,
body[data-ui-theme="minimal"] .league-table-compact .brand-name strong,
body[data-ui-theme="minimal"] .league-table-compact tbody tr:not(.selected-brand) .brand-name {
    color: #374151;
}

body[data-ui-theme="minimal"] .league-table-compact .text-right {
    color: #374151;
}

body[data-ui-theme="minimal"] .league-table-compact .score-cell {
    color: #1f2937;
}

body[data-ui-theme="minimal"] .league-table-compact tbody tr.selected-brand {
    background-color: rgba(0, 0, 0, 0.06);
}

body[data-ui-theme="minimal"] .rank-badge-compact {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

body[data-ui-theme="minimal"] .rank-badge-compact.gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border-color: transparent;
}

body[data-ui-theme="minimal"] .rank-badge-compact.silver {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
    border-color: transparent;
}

body[data-ui-theme="minimal"] .rank-badge-compact.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: white;
    border-color: transparent;
}

body[data-ui-theme="minimal"] .benchmark-comparison {
    background: rgba(0, 0, 0, 0.05);
}

body[data-ui-theme="minimal"] .benchmark-val .label {
    opacity: 0.7;
}

body[data-ui-theme="minimal"] .scorecard-footnote {
    border-top-color: #d1d5db;
}

.league-table-in-banner {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.league-table-in-banner h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.league-table-compact {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.league-table-compact table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.league-table-compact thead th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.league-table-compact thead th[style*="text-align: center"] {
    text-align: center !important;
}

.league-table-compact thead th[style*="text-align: right"],
.league-table-compact thead th.text-right {
    text-align: right !important;
}

.league-table-compact tbody td {
    padding: 0.55rem 0.75rem;
    border: none;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
}

.league-table-compact tbody tr.selected-brand {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.league-table-compact tbody tr.selected-brand td {
    font-weight: 600;
}

.league-table-compact .rank-cell {
    text-align: center;
    width: 50px;
}

.league-table-compact .brand-name {
    font-weight: 400;
    color: white;
    text-align: center;
}

.league-table-compact .brand-name strong {
    font-weight: 600;
    color: white;
}

.league-table-compact tbody tr:not(.selected-brand) .brand-name {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

.league-table-compact .text-right {
    text-align: right;
    color: rgba(255, 255, 255, 0.9);
}

.league-table-compact .score-cell {
    font-weight: 600;
    color: white;
    text-align: right;
}

.rank-badge-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.rank-badge-compact.gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: white;
}

.rank-badge-compact.silver {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: white;
}

.rank-badge-compact.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: white;
}

.scorecard-footnote {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    opacity: 0.9;
}

.score-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.score-subtitle {
    opacity: 0.8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.main-score .score-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.benchmark-comparison {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.benchmark-val {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.benchmark-val .label { opacity: 0.8; }
.benchmark-val .value { font-weight: 600; }

.benchmark-comparison .variance {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    line-height: 1.2;
}

/* Opaque pill backgrounds so coloured text is always readable */
.benchmark-comparison .variance.text-success {
    background: rgba(255, 255, 255, 0.95);
    color: #16a34a;
}

.benchmark-comparison .variance.text-danger {
    background: rgba(255, 255, 255, 0.95);
    color: #dc2626;
}

.benchmark-comparison .variance.text-muted {
    background: rgba(255, 255, 255, 0.95);
    color: #6b7280;
}

/* Minimal theme: slightly different pill bg on light surface */
body[data-ui-theme="minimal"] .benchmark-comparison .variance.text-success {
    background: #dcfce7;
    color: #15803d;
}

body[data-ui-theme="minimal"] .benchmark-comparison .variance.text-danger {
    background: #fee2e2;
    color: #b91c1c;
}

body[data-ui-theme="minimal"] .benchmark-comparison .variance.text-muted {
    background: #f3f4f6;
    color: #6b7280;
}

/* Scorecard Table */
.scorecard-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.scorecard-table {
    width: 100%;
    border-collapse: collapse;
}

.scorecard-table th {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
    border-bottom: 2px solid #e2e8f0;
}

.scorecard-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}

.group-header {
    background: #f1f5f9;
}

.group-header td {
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.metric-name {
    font-weight: 600;
    color: var(--text-dark);
}

.q-id {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
}

.question-col {
    min-width: 200px;
}

.question-text {
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.5;
}

.score-cell {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.chart-col {
    width: 200px;
    padding-left: 2rem !important;
}

.progress-bar-wrapper {
    position: relative;
    height: 8px;
    width: 100%;
    display: flex;
    align-items: center;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background-color: #edf2f7;
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 8px;
}

.benchmark-marker {
    position: absolute;
    top: -4px;
    width: 2px;
    height: 16px;
    background-color: var(--text-dark);
    z-index: 5;
}

/* Clickable KPI Rows */
.scorecard-table .kpi-row {
    transition: background-color 0.2s ease;
}

.scorecard-table .kpi-row:hover {
    background-color: #f8f9fa;
}

/* KPI Drawer */
.kpi-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.kpi-drawer.open ~ .kpi-drawer-overlay,
.kpi-drawer-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.kpi-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kpi-drawer.open {
    right: 0;
}

.kpi-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.kpi-drawer-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    line-height: 1.4;
}

.kpi-drawer-header .btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.kpi-drawer-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transition: background-color 0.15s ease;
}

.kpi-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.kpi-sparkline-section {
    margin-bottom: 2rem;
}

.kpi-sparkline-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kpi-sparkline-section h4 i {
    color: var(--primary-color);
}

.sparkline-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.kpi-actions-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kpi-actions-section .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.kpi-actions-section .btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.kpi-actions-section .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.kpi-actions-section .btn-secondary {
    background: white;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.kpi-actions-section .btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .kpi-drawer {
        width: 100%;
        right: -100%;
    }
    
    .kpi-drawer.open {
        right: 0;
    }
}

/* Save View Button and Modal */
.btn-save-view {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.btn-save-view:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.4);
}

.btn-save-view i {
    font-size: 0.875rem;
}

.save-view-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-view-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.save-view-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.save-view-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.save-view-modal-header .btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.save-view-modal-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transition: background-color 0.15s ease;
}

.save-view-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

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

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

.save-view-modal-body .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease;
}

.save-view-modal-body .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(166, 138, 58, 0.1);
}

.save-view-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.save-view-preview .preview-item {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.save-view-preview .preview-item:last-child {
    margin-bottom: 0;
}

.save-view-preview .preview-item strong {
    color: var(--text-dark);
    margin-right: 0.5rem;
}

.save-view-preview .preview-item span {
    color: var(--text-light);
}

.save-view-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.save-view-modal-footer .btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.save-view-modal-footer .btn-secondary {
    background: #f3f4f6;
    color: var(--text-dark);
}

.save-view-modal-footer .btn-secondary:hover {
    background: #e5e7eb;
}

.save-view-modal-footer .btn-primary {
    background: var(--primary-color);
    color: white;
}

.save-view-modal-footer .btn-primary:hover {
    background: var(--primary-hover);
}

.save-view-modal-footer .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Saved Views Section on Landing */
.saved-views-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    margin-bottom: 5px;
    backdrop-filter: blur(5px);
}

.saved-views-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    line-height: 1.5;
    border-left: 3px solid var(--primary-color);
    padding-left: 0.75rem;
}

.saved-views-label {
    color: var(--text-dark);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.saved-views-label i {
    color: #fbbf24;
    font-size: 0.8125rem;
}

.saved-views-list {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.saved-view-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.saved-view-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    cursor: pointer;
}

.saved-view-link:hover {
    color: #8b6f2e;
    text-decoration: underline;
}

.saved-view-delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.125rem 0.25rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    opacity: 0.6;
    font-size: 0.75rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.saved-view-delete-btn:hover {
    background: #fee;
    opacity: 1;
}

.saved-view-separator {
    color: var(--text-light);
    margin: 0 0.25rem;
    font-size: 0.75rem;
}

.saved-views-empty-text {
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
}

.saved-views-empty-text i {
    color: #fbbf24;
    font-size: 0.75rem;
}

/* Metadata Manager Styles */
.metadata-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metadata-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.metadata-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.metadata-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.metadata-header-main {
    flex: 1;
    min-width: 0;
}

.metadata-header-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.metadata-measure-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-dark);
    flex-shrink: 0;
}

.metadata-header h3.metadata-measure-title {
    display: inline;
}

.metadata-pills {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.metadata-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.metadata-pill-question {
    background: var(--primary-color);
    color: white;
}

.metadata-pill-category {
    background: #e0e7ff;
    color: var(--secondary-color);
}

.metadata-pill-dashboard {
    background: #d1fae5;
    color: #065f46;
}

.metadata-pill-dashboard:hover {
    opacity: 0.9;
}

.measure-id {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.measure-label {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin: 0.5rem 0 0 0;
    width: auto;
    max-width: 100%;
}

.measure-text {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
    font-size: 0.95rem;
    font-style: italic;
    width: auto;
    max-width: 100%;
}

.response-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.responses-table {
    margin-top: 1rem;
}

.responses-table table {
    margin: 0;
}

.responses-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid #e5e7eb;
}

.responses-table td {
    vertical-align: middle;
}

@media (max-width: 768px) {
    .metadata-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .response-count {
        align-self: flex-start;
    }
}

/* Breadcrumb Share button: never show underline (overrides global link styles) */
a.btn-save-view.btn-share-link,
a.btn-save-view.btn-share-link:hover,
a.btn-save-view.btn-share-link:focus,
a.btn-save-view.btn-share-link:visited,
a.btn-save-view.btn-share-link:active {
    text-decoration: none !important;
}
