/* Enhanced Gallery-Inspired Design with Systematic Untitled UI Patterns */
/* Design System 2.0 - Sophisticated Art Investment Platform Aesthetic */

/* Light Theme (Default) */
:root {
    /* Bootstrap Primary Color Override - Replace default blue (#0d6efd) */
    --bs-primary: #0f0f0f;
    --bs-primary-rgb: 15, 15, 15;
    --bs-link-color: #6b8e7f;
    --bs-link-hover-color: #5a7a6e;

    /* Bootstrap Button Variables - Override blue buttons */
    --bs-btn-bg: #0f0f0f;
    --bs-btn-border-color: #0f0f0f;
    --bs-btn-hover-bg: #2a2a2a;
    --bs-btn-hover-border-color: #2a2a2a;
    --bs-btn-active-bg: #2a2a2a;
    --bs-btn-active-border-color: #2a2a2a;
    --bs-btn-color: #ffffff;

    /* Base Colors - Light Theme */
    --bg-primary: #ffffff;                /* Main background */
    --bg-secondary: #f8f9fa;              /* Elevated surfaces (cards, modals) */
    --bg-tertiary: #e9ecef;               /* Subtle backgrounds */

    --text-primary: #0f0f0f;              /* Main text */
    --text-secondary: #4a4a4a;            /* Secondary text */
    --text-tertiary: #8a8a8a;             /* Muted text */

    --border-primary: rgba(0,0,0,0.08);   /* Subtle borders */
    --border-secondary: rgba(0,0,0,0.05); /* Very subtle borders */

    /* Navbar - Always Dark */
    --navbar-bg: #0f0f0f;                 /* Always dark */
    --navbar-text: rgba(255,255,255,0.9); /* Always light text */
    --navbar-border: rgba(255,255,255,0.08);

    /* PRESERVED: Sophisticated Gallery Color Palette */
    --gallery-obsidian: #0f0f0f;           /* Deep black for text */
    --gallery-charcoal: #2a2a2a;          /* Rich charcoal */
    --gallery-slate: #4a4a4a;             /* Medium slate */
    --gallery-dove: #8a8a8a;              /* Sophisticated gray */
    --gallery-pearl: #f8f9fa;             /* Warm off-white */
    --gallery-cream: #ffffff;             /* Pure white */

    /* PRESERVED: Refined Accent Colors */
    --gallery-bronze: #8b6f47;            /* Warm bronze (muted) */
    --gallery-rose-gold: #c9a86a;         /* Antique gold */
    --gallery-sage: #6b8e7f;              /* Muted sage green */
    --gallery-burgundy: #722f37;          /* Deep burgundy */
    --gallery-navy: #2c3e50;              /* Refined navy */
    --gallery-amber: #c9a86a;             /* Antique gold */

    /* Investment Tier Colors - Light Theme */
    --tier-blueChip: #1a1a2e;             /* Deep navy-black (prestige) */
    --tier-value: #2d4a3e;                /* Forest green (stability) */
    --tier-growth: #8b6f47;               /* Warm bronze (momentum) */
    --tier-discovery: #4a4e69;            /* Slate-purple (emerging) */

    /* Status Colors - Light Theme */
    --status-positive: #6b8e7f;           /* Muted sage */
    --status-caution: #c9a86a;            /* Antique gold */
    --status-risk: #9b6b6b;               /* Dusty rose */
    --status-neutral: #8a8d93;            /* Warm gray */

    /* 3D Visualization Background - Light Theme (dark for contrast) */
    --viz-bg: #1e1e2e;                    /* Dark navy for light mode contrast */
}

/* Dark Theme - Bloomberg Terminal Inspired */
[data-theme="dark"] {
    /* Bootstrap Primary Color Override - Dark Theme */
    --bs-primary: #7a9d8e;
    --bs-primary-rgb: 122, 157, 142;
    --bs-link-color: #7a9d8e;
    --bs-link-hover-color: #8ab09e;

    /* Bootstrap Button Variables - Dark Theme */
    --bs-btn-bg: #7a9d8e;
    --bs-btn-border-color: #7a9d8e;
    --bs-btn-hover-bg: #5a7a6e;
    --bs-btn-hover-border-color: #5a7a6e;
    --bs-btn-active-bg: #5a7a6e;
    --bs-btn-active-border-color: #5a7a6e;
    --bs-btn-color: #ffffff;

    /* Base Colors - Dark Theme */
    --bg-primary: #0f0f0f;                /* Warm black (not pure #000) */
    --bg-secondary: #1a1a1a;              /* Elevated surfaces (cards, modals) */
    --bg-tertiary: #242424;               /* Subtle backgrounds */

    --text-primary: #e8e8e8;              /* Main text (reduced contrast) */
    --text-secondary: #b0b0b0;            /* Secondary text */
    --text-tertiary: #808080;             /* Muted text */

    --border-primary: rgba(255,255,255,0.1);   /* Subtle borders */
    --border-secondary: rgba(255,255,255,0.05); /* Very subtle borders */

    /* Navbar - Stays Dark (no change needed) */
    --navbar-bg: #0f0f0f;
    --navbar-text: rgba(255,255,255,0.9);
    --navbar-border: rgba(255,255,255,0.08);

    /* Gallery Colors - Dark Theme Overrides */
    --gallery-obsidian: #e8e8e8;          /* Light text on dark */
    --gallery-charcoal: #d0d0d0;          /* Lighter charcoal */
    --gallery-slate: #b0b0b0;             /* Medium gray */
    --gallery-dove: #808080;              /* Muted gray */
    --gallery-pearl: #1a1a1a;             /* Dark surface */
    --gallery-cream: #0f0f0f;             /* Dark background */

    /* Accent Colors - Dark Theme (slightly desaturated) */
    --gallery-bronze: #a08560;            /* Lighter bronze */
    --gallery-rose-gold: #d4b87a;         /* Lighter antique gold */
    --gallery-sage: #7a9d8e;              /* Lighter sage */
    --gallery-burgundy: #9a5259;          /* Lighter burgundy */
    --gallery-navy: #4a6580;              /* Lighter navy */
    --gallery-amber: #d4b87a;             /* Lighter gold */

    /* Investment Tier Colors - Dark Theme */
    --tier-blueChip: #3a3a5e;             /* Lighter navy (prestige) */
    --tier-value: #4a6a5a;                /* Lighter forest green */
    --tier-growth: #a08560;               /* Lighter bronze */
    --tier-discovery: #6a6e89;            /* Lighter slate-purple */

    /* Status Colors - Dark Theme */
    --status-positive: #7a9d8e;           /* Lighter sage */
    --status-caution: #d4b87a;            /* Lighter gold */
    --status-risk: #b88888;               /* Lighter dusty rose */
    --status-neutral: #9a9da3;            /* Lighter warm gray */

    /* 3D Visualization Background - Dark Theme */
    --viz-bg: #0a0a12;                    /* Very dark for dark mode */
}

/* ========================================
   DARK MODE BOOTSTRAP CLASS OVERRIDES
   Ensures Bootstrap utility classes respect theme
   ======================================== */

/* Background Color Overrides */
[data-theme="dark"] .bg-white {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .bg-light {
    background-color: var(--bg-tertiary) !important;
}

/* Text Color Overrides */
[data-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-tertiary) !important;
}

[data-theme="dark"] .text-body {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-secondary {
    color: var(--text-secondary) !important;
}

/* Border Color Overrides */
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .border-light {
    border-color: var(--border-secondary) !important;
}

/* Card Component Overrides */
[data-theme="dark"] .card-header.bg-white,
[data-theme="dark"] .card-header.bg-light {
    background-color: var(--bg-tertiary) !important;
}

[data-theme="dark"] .card-body.bg-white,
[data-theme="dark"] .card-body.bg-light {
    background-color: var(--bg-secondary) !important;
}

/* List Group Overrides */
[data-theme="dark"] .list-group-item {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .list-group-item.active {
    background-color: var(--gallery-sage) !important;
    border-color: var(--gallery-sage) !important;
}

/* Alert Overrides */
[data-theme="dark"] .alert-light {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}

/* Modal Overrides */
[data-theme="dark"] .modal-content {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--border-primary) !important;
}

/* Dropdown Overrides */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: var(--bg-tertiary) !important;
}

/* Form Overrides */
[data-theme="dark"] .form-text {
    color: var(--text-tertiary) !important;
}

/* ========================================
   THEME-AWARE UTILITY CLASSES
   For replacing inline styles in templates
   ======================================== */

/* Text Colors */
.theme-text-primary { color: var(--text-primary); }
.theme-text-secondary { color: var(--text-secondary); }
.theme-text-muted { color: var(--text-tertiary); }

/* Background Colors */
.theme-bg-primary { background-color: var(--bg-primary); }
.theme-bg-elevated { background-color: var(--bg-secondary); }
.theme-bg-subtle { background-color: var(--bg-tertiary); }

/* Gradient Backgrounds */
.theme-gradient-subtle {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.theme-gradient-card-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

/* Border Utilities */
.theme-border { border-color: var(--border-primary); }

/* Status Colors */
.theme-status-positive { color: var(--status-positive); }
.theme-status-caution { color: var(--status-caution); }
.theme-status-risk { color: var(--status-risk); }

/* Error/Warning Backgrounds */
.theme-bg-error-light {
    background: rgba(155, 107, 107, 0.1);
}

[data-theme="dark"] .theme-bg-error-light {
    background: rgba(184, 136, 136, 0.15);
}

/* ========================================
   DARK MODE - ANALYSIS DISPLAY OVERRIDES
   For dynamically generated analysis content
   ======================================== */

/* Alert Info (analysis date notice, expected impact) */
[data-theme="dark"] .alert-info {
    background-color: rgba(102, 126, 153, 0.15) !important;
    border-color: rgba(102, 126, 153, 0.3) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .alert-info strong {
    color: var(--text-primary) !important;
}

/* Stoplight indicators for Risk Level & Diversification */
[data-theme="dark"] .indicator-label {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .indicator-row small.text-muted {
    color: var(--text-tertiary) !important;
}

/* Progress bar text visibility */
[data-theme="dark"] .progress-bar {
    color: #ffffff !important;
}

/* Timeline milestones */
[data-theme="dark"] .timeline-item {
    color: var(--text-primary);
}

/* Follow-on action headings */
[data-theme="dark"] .follow-on-actions h2 {
    color: var(--text-primary) !important;
}

/* Card headers and bodies */
[data-theme="dark"] .card {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .card-header {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .card-header h5 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .card-body {
    color: var(--text-primary);
}

[data-theme="dark"] .card-body p {
    color: var(--text-secondary);
}

[data-theme="dark"] .card-title {
    color: var(--text-primary) !important;
}

/* Opportunity cards */
[data-theme="dark"] .opportunity-card {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .opportunity-header {
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .opportunity-body p {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .metric-card {
    background-color: var(--bg-tertiary) !important;
}

[data-theme="dark"] .metric-card h6 {
    color: var(--text-tertiary) !important;
}

[data-theme="dark"] .price-value,
[data-theme="dark"] .amount-value {
    color: var(--text-primary) !important;
}

/* Artwork link containers */
[data-theme="dark"] .artwork-link-container strong {
    color: var(--text-primary) !important;
}

/* Action cards in portfolio analysis */
[data-theme="dark"] .action-card {
    background: var(--bg-tertiary) !important;
}

[data-theme="dark"] .action-card h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .action-card p {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .actions-list h6 span {
    color: var(--text-primary) !important;
}

/* Target cards */
[data-theme="dark"] .target-card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .target-card h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .target-card p {
    color: var(--text-secondary) !important;
}

/* Timeline item text */
[data-theme="dark"] .timeline .timeline-item {
    color: var(--text-primary) !important;
}

/* Representative works card titles */
[data-theme="dark"] .card-title,
[data-theme="dark"] .work-card .card-title,
[data-theme="dark"] .representative-works-container h6,
[data-theme="dark"] .representative-works-container .card-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .representative-works-container .card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .representative-works-container .card p,
[data-theme="dark"] .representative-works-container .card small {
    color: var(--text-secondary) !important;
}

/* Artwork caption */
[data-theme="dark"] .artwork-caption small {
    color: var(--text-tertiary) !important;
}

/* Artwork cards in representative works */
[data-theme="dark"] .artwork-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .artwork-details,
[data-theme="dark"] .artwork-location {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .artwork-significance {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .artwork-info {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .museum-indicator {
    color: var(--text-tertiary) !important;
}

/* Artwork link cards */
[data-theme="dark"] .artwork-link-card {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .artwork-link-label {
    color: var(--text-secondary) !important;
}

/* Theme-Independent Variables */
:root {
    /* Premium Typography Stack */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', Monaco, monospace;

    /* Sophisticated Shadows & Effects */
    --gallery-shadow-subtle: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.08);
    --gallery-shadow-soft: 0 4px 8px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06);
    --gallery-shadow-elegant: 0 8px 25px rgba(0,0,0,0.12), 0 3px 10px rgba(0,0,0,0.08);
    --gallery-shadow-dramatic: 0 20px 40px rgba(0,0,0,0.15), 0 8px 16px rgba(0,0,0,0.1);

    /* Typography Scale */
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    
    /* ENHANCED: Systematic Spacing Scale (Untitled UI Pattern) */
    --space-1: 0.25rem;   /* 4px - Fine adjustments */
    --space-2: 0.5rem;    /* 8px - Small spacing */
    --space-3: 0.75rem;   /* 12px - Compact spacing */
    --space-4: 1rem;      /* 16px - Base unit */
    --space-5: 1.25rem;   /* 20px - Medium spacing */
    --space-6: 1.5rem;    /* 24px - Comfortable spacing */
    --space-8: 2rem;      /* 32px - Section spacing */
    --space-10: 2.5rem;   /* 40px - Large spacing */
    --space-12: 3rem;     /* 48px - Hero spacing */
    --space-16: 4rem;     /* 64px - Major sections */
    --space-20: 5rem;     /* 80px - Layout spacing */
    --space-24: 6rem;     /* 96px - Page spacing */
    
    /* ENHANCED: Systematic Typography Scale (Untitled UI Pattern) */
    --text-xs: 0.75rem;     /* 12px - Fine print */
    --text-sm: 0.875rem;    /* 14px - Secondary text */
    --text-base: 1rem;      /* 16px - Body text */
    --text-lg: 1.125rem;    /* 18px - Emphasis */
    --text-xl: 1.25rem;     /* 20px - Subheadings */
    
    /* Stoplight Colors - Softer, Gallery-Inspired Palette */
    --stoplight-green: #87a96b;    /* Using gallery sage - more sophisticated */
    --stoplight-yellow: #d4af37;   /* Using gallery amber - warmer, less jarring */
    --stoplight-red: #c4a484;      /* Muted terracotta/clay - informational, not alarming */
    --text-2xl: 1.5rem;     /* 24px - Section titles */
    --text-3xl: 1.875rem;   /* 30px - Page headings */
    --text-4xl: 2.25rem;    /* 36px - Display text */
    --text-5xl: 3rem;       /* 48px - Hero text */
    
    /* ENHANCED: Systematic Border Radius (Untitled UI Pattern) */
    --radius-xs: 0.125rem;  /* 2px - Subtle rounding */
    --radius-sm: 0.375rem;  /* 6px - Small components */
    --radius-md: 0.5rem;    /* 8px - Standard radius */
    --radius-lg: 0.75rem;   /* 12px - Cards, modals */
    --radius-xl: 1rem;      /* 16px - Large surfaces */
    --radius-2xl: 1.5rem;   /* 24px - Hero components */
    --radius-full: 9999px;  /* Full rounding */
    
    /* ENHANCED: Systematic Shadow Scale (Based on existing gallery shadows) */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: var(--gallery-shadow-subtle);    /* Preserve existing */
    --shadow-md: var(--gallery-shadow-soft);      /* Preserve existing */
    --shadow-lg: var(--gallery-shadow-elegant);   /* Preserve existing */
    --shadow-xl: var(--gallery-shadow-dramatic);  /* Preserve existing */
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    
    /* ENHANCED: Focus and Interaction States */
    --focus-ring: 0 0 0 3px rgba(212, 175, 55, 0.15);
    --focus-ring-sage: 0 0 0 3px rgba(135, 169, 107, 0.15);
    --focus-ring-navy: 0 0 0 3px rgba(44, 62, 80, 0.15);
    
    /* ENHANCED: Component-Specific Tokens */
    --button-padding-sm: var(--space-2) var(--space-3);
    --button-padding-md: var(--space-3) var(--space-5);
    --button-padding-lg: var(--space-4) var(--space-6);
    --input-height-sm: 2rem;
    --input-height-md: 2.5rem;
    --input-height-lg: 3rem;
    
    /* ENHANCED: Animation & Transition Tokens */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: 0.5s ease;
}

/* Base Typography & Layout - Theme-Aware */
body {
    background: var(--bg-primary);  /* Theme-aware background */
    font-family: var(--font-ui);
    font-weight: 400;
    letter-spacing: -0.011em;
    line-height: 1.6;
    color: var(--text-primary);  /* Theme-aware text */
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;  /* Smooth theme transitions */
}

/* Demo Mode - Add top padding for fixed banner */
body.demo-mode {
    padding-top: 52px;  /* Height of demo banner */
}

/* Demo banner is position:fixed, so content flows naturally below with body padding */
/* No navbar positioning needed since navbar is position:relative */

/* ========================================
   DEMO MODE - DISABLED ELEMENTS STYLING
   Elements with .demo-disabled class show as unavailable in demo mode
   ======================================== */

/* Base disabled state for buttons and links */
.demo-disabled,
button.demo-disabled,
a.demo-disabled,
.btn.demo-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;  /* Allow click to show message */
    position: relative;
    filter: grayscale(30%);
}

/* Prevent actual button actions */
.demo-disabled:active,
.demo-disabled:focus {
    transform: none !important;
    box-shadow: none !important;
}

/* Lock icon indicator on hover */
.demo-disabled::after {
    content: '\f023';  /* Font Awesome lock icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font-size: 0.7em;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--gallery-amber);
}

.demo-disabled:hover::after {
    opacity: 1;
}

/* For smaller buttons, show lock on left */
.demo-disabled.btn-sm::after {
    right: auto;
    left: 8px;
}

/* Input fields in demo mode */
input.demo-disabled,
select.demo-disabled,
textarea.demo-disabled {
    background-color: var(--bg-tertiary) !important;
    cursor: not-allowed !important;
}

/* Cards/sections that are disabled */
.demo-disabled-section {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.demo-disabled-section::before {
    content: 'Demo Mode - View Only';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    z-index: 10;
    white-space: nowrap;
}

/* Hide lock icon for icon-only buttons */
.demo-disabled.btn-icon::after,
.demo-disabled[data-bs-toggle]::after {
    display: none;
}

/* Tooltip style for demo-disabled elements */
.demo-disabled[title] {
    cursor: not-allowed;
}

/* Subtle background texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(212, 175, 55, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(135, 169, 107, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Refined Typography Hierarchy - Display Serif for Impact */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;  /* Cormorant Garamond renders lighter than Playfair at same weight */
    letter-spacing: -0.015em;  /* Slightly looser for readability */
    color: var(--gallery-obsidian);
}

/* Refined Typography Hierarchy - Sophisticated Restraint */
h1 {
    font-size: clamp(2rem, 1.5rem + 1.5vw, 2.5rem);  /* Fluid responsive scaling */
    line-height: 1.3;    /* Better breathing room */
    margin-bottom: 1rem; /* Proper spacing */
    margin-top: 0;
    position: relative;
    color: var(--text-primary);
}

/* Accent bar is now opt-in - use .h1-accent class or specific contexts */
h1.h1-accent::after,
.card-header h1::after,
.modal-header h1::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60px;  /* Refined accent */
    height: 2px;  /* Thinner, more elegant */
    background: var(--gallery-sage);
}

/* Page headers use ::before for accent bar - see unified header section */

h2 {
    font-size: clamp(1.625rem, 1.25rem + 1.1vw, 2rem);  /* Fluid responsive scaling */
    line-height: 1.4;
    margin-bottom: 1.25rem;
    margin-top: 0;
}

h3 {
    font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.625rem);  /* Fluid responsive scaling */
    line-height: 1.4;
    margin-bottom: 1rem;
    margin-top: 0;
}

/* UI-level headings use clean sans with lighter weight */
h4, h5, h6 {
    font-family: var(--font-ui);
    font-weight: 500;  /* Lighter for sophistication */
    letter-spacing: -0.01em;
    color: var(--gallery-obsidian);
    margin-top: 0;
}

h4 {
    font-size: 1.125rem;  /* Slightly smaller */
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

h5 {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

h6 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* Data & Metrics Typography - Monospace for Financial Credibility */
.metric-value,
.price,
.percentage,
.currency,
.portfolio-value,
[class*="amount"],
[class*="-score"],
.investment-grade {
    font-family: var(--font-mono);
    font-weight: 500;
    font-variant-numeric: tabular-nums;  /* Fixed-width numbers */
    letter-spacing: -0.01em;
}

/* ========================================
   CUSTOM SELECTION COLORS
   On-brand amber highlight instead of browser blue
   ======================================== */
::selection {
    background: rgba(201, 168, 106, 0.25);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(201, 168, 106, 0.25);
    color: var(--text-primary);
}

/* ========================================
   CUSTOM SCROLLBAR STYLING
   Themed scrollbars for premium feel
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-primary) var(--bg-primary);
}

/* ========================================
   GALLERY-PALETTE LINK COLORS
   Sage/amber palette instead of Bootstrap blue
   ======================================== */
a {
    color: var(--gallery-sage);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--gallery-amber);
}

/* Underlined links in content areas for accessibility */
.prose a:not(.btn),
.card-body a:not(.btn) {
    text-decoration: underline;
    text-decoration-color: rgba(107, 142, 127, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
}

.prose a:not(.btn):hover,
.card-body a:not(.btn):hover {
    text-decoration-color: var(--gallery-amber);
    color: var(--gallery-amber);
}

/* ========================================
   PROSE CLASS - READING OPTIMIZATION
   Optimal measure for long-form content
   ======================================== */
.prose {
    max-width: 72ch;
}

.prose p {
    margin-bottom: 1.25em;
}

.prose h2, .prose h3, .prose h4 {
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.prose ul, .prose ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

.prose blockquote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.125rem;
    border-left: 3px solid var(--gallery-sage);
    padding-left: 1.5rem;
    margin: 1.5em 0;
    color: var(--text-secondary);
}

/* ========================================
   REFINED TABLE STYLING
   Uppercase tracked headers, clean rows
   ======================================== */
.table {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.table thead th {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    border-bottom: 2px solid var(--border-primary);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem;
    border-color: var(--border-secondary);
    vertical-align: middle;
}

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

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

/* ========================================
   OVERLINE / LABEL TYPOGRAPHY PATTERN
   Gallery-standard small category labels
   ======================================== */
.overline,
.text-overline {
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    display: block;
}

/* Navigation Refinements - Always Dark in Both Themes */
.navbar {
    background: var(--navbar-bg) !important;  /* Always dark */
    border-bottom: 1px solid var(--navbar-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1rem 0;
    z-index: 1030;
    position: relative;
}

/* Fix dropdown menu z-index to appear above all page content */
.navbar .dropdown-menu {
    z-index: 1050 !important;
}

/* Dropdown Menu - Theme-Aware */
.dropdown-menu {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-elegant);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dropdown-divider {
    border-color: var(--border-primary);
}

/* Theme Toggle Button - Elegant Integration */
#theme-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    color: var(--gallery-amber);
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
}

#theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 168, 106, 0.3);
    border-radius: var(--radius-md);
}

#theme-toggle i {
    transition: transform 0.3s ease;
}

#theme-toggle:hover i {
    transform: rotate(20deg);
}

.navbar-brand {
    font-family: var(--font-ui);  /* Inter - clean geometry */
    font-weight: 300;             /* Light for luxury feel */
    font-size: 1.75rem;           /* Slightly larger for presence */
    letter-spacing: 0.25em;       /* Wide tracking like gallery signage */
    text-transform: uppercase;
    color: var(--navbar-text) !important;
    text-shadow: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--gallery-amber) !important;
    transform: translateY(-1px);
}

.navbar-brand i {
    color: var(--gallery-amber);
    margin-right: 10px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
}

.nav-link {
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.5px;
    color: rgba(245, 245, 243, 0.9) !important;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.75rem 1.25rem !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gallery-amber);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--gallery-amber) !important;
    transform: translateY(-1px);
}

.nav-link:hover::before {
    width: 80%;
}

.navbar-text {
    color: rgba(245, 245, 243, 0.7) !important;
    font-weight: var(--font-weight-regular);
    font-style: italic;
    letter-spacing: 0.3px;
}

/* Enhanced Card Design with Systematic Tokens - Theme-Aware */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-8);
    transition: var(--transition-smooth);
    background: var(--bg-secondary);  /* Theme-aware elevated surface */
    position: relative;
    overflow: hidden;
}

/* NOTE: Removed global .card::before amber bar effect - was too visually busy
   Cards now have clean hover with shadow/lift only. Use .card-accent-bar class
   if you need the accent bar on specific cards. */

.card:hover {
    box-shadow: var(--shadow-xl);              /* Systematic shadow (preserves dramatic effect) */
    transform: translateY(-4px);               /* Preserved transform */
}

/* Opt-in accent bar for cards that want it */
.card.card-accent-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--tier-growth);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card.card-accent-bar:hover::before {
    opacity: 1;
}

.card-header {
    background: var(--bg-tertiary);  /* Theme-aware background */
    border-bottom: 1px solid var(--border-primary);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.5px;
    padding: 1.75rem 2rem;
    color: var(--text-primary);
    position: relative;
}

.card-header h5 {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.card-header i {
    color: var(--gallery-bronze);
    margin-right: 8px;
}

.card-body {
    padding: 2.5rem;
    color: var(--text-primary);
}

/* Enhanced Button Design with Systematic Tokens */
.btn {
    border-radius: var(--radius-md);           /* Systematic radius */
    font-weight: var(--font-weight-regular);    /* Preserved */
    font-size: var(--text-base);              /* Systematic typography */
    letter-spacing: 0.4px;                    /* Preserved */
    text-transform: none;                      /* Preserved */
    transition: var(--transition-smooth);      /* Systematic transition */
    border: 2px solid transparent;            /* Preserved */
    padding: var(--button-padding-md);        /* Systematic padding */
    position: relative;                       /* Preserved */
    overflow: hidden;                         /* Preserved */
    line-height: 1.5;                        /* Better text alignment */
}

/* Button Size Variants (Enhanced with systematic tokens) */
.btn-sm {
    padding: var(--button-padding-sm);
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: var(--button-padding-lg);
    font-size: var(--text-lg);
    border-radius: var(--radius-lg);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary,
.btn-primary:link,
.btn-primary:visited {
    background: var(--gallery-obsidian) !important;  /* Flat, not gradient */
    background-color: var(--gallery-obsidian) !important;
    border: none !important;
    border-color: var(--gallery-obsidian) !important;
    color: var(--gallery-cream) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--gallery-charcoal) !important;
    background-color: var(--gallery-charcoal) !important;
    border-color: var(--gallery-charcoal) !important;
    color: var(--gallery-cream) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.btn-primary:focus {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15),
                0 0 0 3px rgba(15,15,15,0.1) !important;
    outline: none !important;
}

.btn-primary:active,
.btn-primary:active:focus {
    background: var(--gallery-charcoal) !important;
    background-color: var(--gallery-charcoal) !important;
    border-color: var(--gallery-charcoal) !important;
    color: var(--gallery-cream) !important;
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
    transition: all 0.1s ease;
}

/* Dark mode btn-primary */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:link,
[data-theme="dark"] .btn-primary:visited {
    background: var(--gallery-sage) !important;
    background-color: var(--gallery-sage) !important;
    border-color: var(--gallery-sage) !important;
    color: var(--gallery-cream) !important;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus {
    background: #5a7a6e !important;
    background-color: #5a7a6e !important;
    border-color: #5a7a6e !important;
}

.btn-outline-primary {
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background: var(--gallery-sage) !important;
    border-color: var(--gallery-sage) !important;
    color: var(--gallery-cream) !important;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--status-positive);  /* Flat muted sage */
    border: none;
    color: var(--gallery-cream);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-success:hover, .btn-success:focus {
    background: var(--tier-value);  /* Slightly darker forest green */
    transform: translateY(-1px);  /* Subtle lift */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--gallery-cream);
}

.btn-light {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.btn-light:hover, .btn-light:focus {
    background: var(--bg-tertiary);
    border-color: var(--gallery-sage);
    color: var(--text-primary);
}

.btn-info {
    background: var(--tier-discovery);  /* Flat slate-purple */
    border: none;
    color: var(--gallery-cream);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-info:hover, .btn-info:focus {
    background: var(--tier-blueChip);  /* Deeper navy-black */
    transform: translateY(-1px);  /* Subtle lift */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--gallery-cream);
}

.btn-warning {
    background: var(--status-caution);  /* Flat antique gold */
    border: none;
    color: var(--gallery-obsidian);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-warning:hover, .btn-warning:focus {
    background: var(--tier-growth);  /* Warm bronze */
    transform: translateY(-1px);  /* Subtle lift */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--gallery-obsidian);
}

/* Refined Badge System - Flat + Elevated */
.badge {
    font-size: 0.75rem;
    font-weight: 400;  /* Normal weight for sophistication (was medium) */
    letter-spacing: 0.3px;  /* Less aggressive tracking */
    padding: 0.5rem 0.875rem;  /* Slightly more compact */
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);  /* Subtle elevation */
}

/* Status-based badge colors (flat, muted) */
.bg-success {
    background: var(--status-positive) !important;  /* Muted sage */
    color: var(--gallery-cream) !important;
}

.bg-info {
    background: var(--tier-discovery) !important;  /* Slate-purple */
    color: var(--gallery-cream) !important;
}

.bg-warning {
    background: var(--status-caution) !important;  /* Antique gold */
    color: var(--gallery-obsidian) !important;
}

.bg-danger {
    background: var(--status-risk) !important;  /* Dusty rose */
    color: var(--gallery-cream) !important;
}

.bg-primary {
    background: var(--gallery-sage) !important;  /* Sage green instead of blue */
    color: var(--gallery-cream) !important;
}

.bg-secondary {
    background: var(--status-neutral) !important;  /* Warm gray */
    color: var(--gallery-cream) !important;
}

/* Override Bootstrap text-primary blue color */
.text-primary {
    color: var(--gallery-sage) !important;  /* Sage green instead of blue */
}

[data-theme="dark"] .text-primary {
    color: var(--gallery-sage) !important;  /* Consistent in dark mode */
}

/* ========================================
   SWEETALERT2 DARK MODE STYLING
   ======================================== */
[data-theme="dark"] .swal2-popup {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .swal2-title {
    color: var(--text-primary);
}

[data-theme="dark"] .swal2-html-container,
[data-theme="dark"] .swal2-content {
    color: var(--text-secondary);
}

[data-theme="dark"] .swal2-input,
[data-theme="dark"] .swal2-textarea,
[data-theme="dark"] .swal2-select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .swal2-input:focus,
[data-theme="dark"] .swal2-textarea:focus {
    border-color: var(--gallery-sage);
    box-shadow: 0 0 0 3px rgba(122, 157, 142, 0.25);
}

[data-theme="dark"] .swal2-validation-message {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

[data-theme="dark"] .swal2-footer {
    border-top-color: var(--border-primary);
    color: var(--text-tertiary);
}

[data-theme="dark"] .swal2-footer a {
    color: var(--gallery-sage);
}

[data-theme="dark"] .swal2-close {
    color: var(--text-tertiary);
}

[data-theme="dark"] .swal2-close:hover {
    color: var(--text-primary);
}

[data-theme="dark"] .swal2-timer-progress-bar {
    background: var(--gallery-sage);
}

[data-theme="dark"] .swal2-icon.swal2-info {
    border-color: var(--gallery-sage);
    color: var(--gallery-sage);
}

[data-theme="dark"] .swal2-icon.swal2-warning {
    border-color: var(--gallery-amber);
    color: var(--gallery-amber);
}

[data-theme="dark"] .swal2-icon.swal2-error {
    border-color: #b88888;
    color: #b88888;
}

[data-theme="dark"] .swal2-icon.swal2-success {
    border-color: var(--gallery-sage);
    color: var(--gallery-sage);
}

[data-theme="dark"] .swal2-icon.swal2-success .swal2-success-line-tip,
[data-theme="dark"] .swal2-icon.swal2-success .swal2-success-line-long {
    background-color: var(--gallery-sage);
}

[data-theme="dark"] .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(122, 157, 142, 0.3);
}

[data-theme="dark"] .swal2-icon.swal2-question {
    border-color: var(--gallery-sage);
    color: var(--gallery-sage);
}

/* Toast styling for dark mode */
[data-theme="dark"] .swal2-popup.swal2-toast {
    background: var(--bg-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Z-INDEX FIXES FOR DEMO MODE BANNER
   Demo banner uses z-index: 1040 (between navbar 1030 and modals 1050+)
   These overrides ensure proper layering of UI elements
   ======================================== */
.swal2-container {
    z-index: 100000 !important;  /* Highest priority for alerts */
}

/* Shepherd.js tour above everything except SweetAlert */
.shepherd-modal-overlay-container {
    z-index: 10001 !important;
}

.shepherd-element {
    z-index: 10002 !important;
}

/* Override Bootstrap border-primary */
.border-primary {
    border-color: var(--gallery-sage) !important;
}

/* Override spinner-border text-primary */
.spinner-border.text-primary {
    color: var(--gallery-sage) !important;
}

/* Elegant Table Design - Theme-Aware */
.table {
    font-weight: var(--font-weight-regular);
    background: var(--bg-primary);  /* Theme-aware background */
}

.table th {
    border-top: none;
    border-bottom: 2px solid var(--border-primary);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-primary);  /* Theme-aware text */
    background: var(--bg-tertiary);  /* Theme-aware header */
    font-size: 0.85rem;
    padding: 1.2rem 1rem;
}

.table td {
    border-color: var(--border-secondary);
    vertical-align: middle;
    padding: 1rem;
    color: var(--text-primary);  /* Theme-aware text */
}

.table-hover tbody tr:hover {
    background: var(--bg-tertiary);  /* Theme-aware hover */
}

.table-hover tbody tr:hover td {
    color: var(--text-primary);  /* Ensure text visibility on hover */
}

/* Enhanced Form Elements with Systematic Tokens - Theme-Aware */
.form-control, .form-select {
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-regular);
    font-size: var(--text-base);
    transition: var(--transition-smooth);
    background: var(--bg-secondary);  /* Theme-aware background */
    color: var(--text-primary);  /* Theme-aware text */
    padding: var(--space-3) var(--space-4);
    line-height: 1.5;
}

/* Apply fixed height only to input and select, not textarea */
.form-control:not(textarea), .form-select {
    min-height: var(--input-height-md);
    height: auto;
}

/* Ensure textareas have proper minimum height and can grow */
textarea.form-control {
    min-height: var(--input-height-md);
    resize: vertical;
}

.form-control:focus, .form-select:focus {
    border-color: var(--gallery-amber);
    box-shadow: var(--shadow-sm), var(--focus-ring);
    background: var(--bg-secondary);  /* Keep same background on focus */
    color: var(--text-primary);  /* Theme-aware text */
    outline: none;
}

/* Form size variants */
.form-control-sm, .form-select-sm {
    height: var(--input-height-sm);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
}

.form-control-lg, .form-select-lg {
    height: var(--input-height-lg);
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-lg);
    border-radius: var(--radius-lg);
}

.form-control::placeholder {
    color: var(--gallery-dove);
    opacity: 0.8;
}

.form-label {
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.3px;
    color: var(--text-primary);  /* Theme-aware text */
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

/* Sophisticated Progress Bars */
.progress {
    height: 6px;
    border-radius: 3px;
    background: var(--gallery-pearl);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-bar {
    background: var(--tier-growth);  /* Flat warm bronze */
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(139, 111, 71, 0.2);
}

/* Enhanced Analysis Content - Flat + Elevated - Theme-Aware */
.analysis-content {
    background: var(--bg-secondary);  /* Theme-aware elevated surface */
    padding: 2.5rem;
    border-left: 4px solid var(--status-caution);
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
    font-weight: var(--font-weight-regular);
    line-height: 1.7;
    color: var(--text-primary);  /* Theme-aware text */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
}

.analysis-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 30px;
    background: var(--tier-growth);  /* Flat warm bronze accent */
    border-radius: 0 2px 2px 0;
}

/* Artwork Image Enhancements */
.artwork-image {
    max-width: 100px;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--gallery-pearl);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--gallery-shadow-subtle);
}

.artwork-image:hover {
    transform: scale(1.08);
    box-shadow: var(--gallery-shadow-elegant);
    border-color: var(--gallery-amber);
}

/* Portfolio Segment Styling - Investment Tier System */
.segment-blue-chip {
    border-left: 4px solid var(--tier-blueChip);
    background: rgba(26, 26, 46, 0.04);  /* Flat navy-black tint */
}

.segment-value {
    border-left: 4px solid var(--tier-value);
    background: rgba(45, 74, 62, 0.04);  /* Flat forest green tint */
}

.segment-growth {
    border-left: 4px solid var(--tier-growth);
    background: rgba(139, 111, 71, 0.04);  /* Flat bronze tint */
}

.segment-discovery {
    border-left: 4px solid var(--tier-discovery);
    background: rgba(74, 78, 105, 0.04);  /* Flat slate-purple tint */
}

.segment-indicator {
    border-radius: 50%;
    box-shadow: var(--gallery-shadow-subtle);
}

/* Alert Refinements */
.alert {
    border: none;
    border-radius: 12px;
    border-left: 4px solid;
    font-weight: var(--font-weight-regular);
    background: var(--gallery-cream);
    color: var(--gallery-obsidian);
    box-shadow: var(--gallery-shadow-soft);
}

.alert-success {
    border-left-color: var(--status-positive);
    background: rgba(107, 142, 127, 0.06);  /* Flat muted sage tint */
}

.alert-info {
    border-left-color: var(--tier-discovery);
    background: rgba(74, 78, 105, 0.06);  /* Flat slate-purple tint */
}

.alert-warning {
    border-left-color: var(--status-caution);
    background: rgba(201, 168, 106, 0.06);  /* Flat antique gold tint */
}

.alert-danger {
    border-left-color: var(--status-risk);
    background: rgba(155, 107, 107, 0.06);  /* Flat dusty rose tint */
}

/* Tab Styling Enhancements */
.nav-tabs {
    border-bottom: 2px solid var(--gallery-rose-gold);
    background: none;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--gallery-dove) !important;
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.4px;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    margin-right: 0.5rem;
    position: relative;
}

.nav-tabs .nav-link.active {
    background: var(--gallery-pearl);  /* Flat light background */
    border-bottom: 2px solid var(--status-caution);
    color: var(--gallery-obsidian) !important;
    font-weight: var(--font-weight-medium);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);  /* Subtle elevation */
}

.nav-tabs .nav-link:hover:not(.active) {
    background: rgba(212, 175, 55, 0.05);
    color: var(--gallery-obsidian) !important;
}

/* =====================================================================
   MODAL SYSTEM - Gallery-Quality Theme-Aware Modals
   Unified modal styling with refined aesthetics
   ===================================================================== */
.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;  /* Larger radius for elegance */
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.08);  /* Dramatic but refined shadow */
    overflow: hidden;
}

.modal-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    border-radius: 16px 16px 0 0;
    padding: 1.5rem 1.75rem;
}

.modal-title {
    font-family: var(--font-display), serif;  /* Gallery elegance */
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.modal-title i {
    color: var(--gallery-bronze);  /* Bronze accent for icons */
    margin-right: 0.625rem;
}

.modal-body {
    padding: 1.75rem;  /* Generous whitespace */
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border-primary);
    padding: 1.25rem 1.75rem;
    background: var(--bg-secondary);
    border-radius: 0 0 16px 16px;
    gap: 0.75rem;
}

/* Close button dark mode fix */
[data-theme="dark"] .modal-header .btn-close {
    filter: invert(1);
}

/* Sage header variant (for acquisition, important actions) */
.modal-header.bg-sage {
    background: var(--gallery-sage) !important;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.modal-header.bg-sage .modal-title,
.modal-header.bg-sage .btn-close {
    color: white !important;
    filter: none;
}

/* Acquisition Modal Specifics */
.acquisition-summary {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
}

.acquisition-summary h6 {
    color: var(--text-tertiary);
}

.acquisition-summary h5 {
    color: var(--text-primary);
}

/* Form elements in modals - refined styling */
.modal-body .form-control {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.modal-body .form-control:focus {
    background: var(--bg-primary);
    border-color: var(--gallery-sage);
    box-shadow: 0 0 0 3px rgba(107, 142, 127, 0.12);  /* Subtle sage focus ring */
    color: var(--text-primary);
}

.modal-body .form-control::placeholder {
    color: var(--text-tertiary);
}

.modal-body .form-control:read-only {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.modal-body .form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-body .form-text {
    color: var(--text-tertiary);
}

/* Alert styling in modals */
.modal-body .alert {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 1rem 1.25rem;
}

.modal-body .alert-info {
    background: rgba(107, 142, 127, 0.08);  /* Sage-tinted info */
    color: var(--text-primary);
    border-color: rgba(107, 142, 127, 0.2);
}

.modal-body .alert-info i {
    color: var(--gallery-sage);
}

.modal-body .alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.modal-body .alert-success i {
    color: #22c55e;
}

/* Negotiation feedback box */
.negotiation-feedback {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
}

/* Modal buttons */
.modal-footer .btn {
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: 8px;
}

.modal-footer .btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

.modal-footer .btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.modal-footer .btn-primary {
    background: var(--gallery-sage);
    border-color: var(--gallery-sage);
    color: white;
}

.modal-footer .btn-primary:hover {
    background: #5a7a6c;
    border-color: #5a7a6c;
}

/* Dark mode modal enhancements */
[data-theme="dark"] .modal-content {
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 10px 20px rgba(0, 0, 0, 0.2);  /* Deeper shadow for dark mode */
}

[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .acquisition-summary {
    background: var(--bg-tertiary) !important;
}

[data-theme="dark"] .modal-body .form-control {
    background: var(--bg-primary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .modal-body .form-control:focus {
    box-shadow: 0 0 0 3px rgba(122, 157, 142, 0.15);  /* Lighter sage in dark mode */
    border-color: var(--gallery-sage);
}

[data-theme="dark"] .modal-body .alert-info {
    background: rgba(107, 142, 127, 0.12);
    border-color: rgba(107, 142, 127, 0.25);
}

[data-theme="dark"] .modal-body .alert-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.spinner-border {
    color: var(--gallery-amber);
}

/* Bootstrap Utility Class Overrides - Theme-Aware */
.bg-white {
    background-color: var(--bg-primary) !important;
}

.bg-light {
    background-color: var(--bg-secondary) !important;
}

.bg-secondary-theme {
    background-color: var(--bg-secondary) !important;
}

.bg-tertiary-theme {
    background-color: var(--bg-tertiary) !important;
}

.text-dark {
    color: var(--text-primary) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.border {
    border-color: var(--border-primary) !important;
}

.border-top, .border-bottom, .border-start, .border-end {
    border-color: var(--border-primary) !important;
}

.list-group-item {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}

.list-group-item:hover {
    background-color: var(--bg-secondary) !important;
}

/* Pagination Styles */
.pagination {
    margin-top: 1.5rem;
}

.page-item .page-link {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

.page-item.active .page-link {
    background-color: var(--gallery-sage) !important;
    border-color: var(--gallery-sage) !important;
    color: white !important;
}

.page-item.disabled .page-link {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

.page-item .page-link:hover:not(.disabled) {
    background-color: var(--bg-secondary) !important;
    border-color: var(--gallery-sage) !important;
    color: var(--text-primary) !important;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    /* h1/h2/h3 sizes now handled by clamp() in base rules */

    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

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

.table-responsive table {
    min-width: 600px;
}

.table-responsive td {
    white-space: normal;
    word-wrap: break-word;
    max-width: 300px;
}

@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table-responsive td,
    .table-responsive th {
        padding: 0.5rem;
    }
}

/* Chart Container Styling */
.chart-container {
    position: relative;
    height: 150px;
    margin: 0rem 0;
    padding: 0.5rem;
    background: var(--gallery-cream);
    border-radius: 12px;
    box-shadow: var(--gallery-shadow-subtle);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gallery-pearl);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--tier-growth);  /* Flat warm bronze */
    border-radius: 4px;
    box-shadow: var(--gallery-shadow-subtle);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--status-caution);  /* Antique gold on hover */
}

/* Elegant Focus Styles */
*:focus {
    outline: none;
}

.btn:focus, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Status Card Enhancements */
.card.bg-primary, .card.bg-success, .card.bg-info, .card.bg-warning {
    position: relative;
    overflow: hidden;
}

.card.bg-primary .card-body, 
.card.bg-success .card-body, 
.card.bg-info .card-body, 
.card.bg-warning .card-body {
    position: relative;
    z-index: 2;
}

.card.bg-primary::after, 
.card.bg-success::after, 
.card.bg-info::after, 
.card.bg-warning::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.card.bg-primary:hover::after, 
.card.bg-success:hover::after, 
.card.bg-info:hover::after, 
.card.bg-warning:hover::after {
    animation: shine 1.5s ease-in-out;
}

@keyframes shine {
    0% {
        top: -50%;
        right: -50%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 50%;
        right: 50%;
        opacity: 0;
    }
}

/* Utility Color Classes */
.text-obsidian { color: var(--gallery-obsidian) !important; }
.text-charcoal { color: var(--gallery-charcoal) !important; }
.text-slate { color: var(--gallery-slate) !important; }
.text-dove { color: var(--gallery-dove) !important; }
.text-bronze { color: var(--gallery-bronze) !important; }
.text-rose-gold { color: var(--gallery-rose-gold) !important; }
.text-sage { color: var(--gallery-sage) !important; }
.text-burgundy { color: var(--gallery-burgundy) !important; }
.text-navy { color: var(--gallery-navy) !important; }
.text-amber { color: var(--gallery-amber) !important; }

/* Background Color Utilities */
.bg-obsidian { background-color: var(--gallery-obsidian) !important; }
.bg-charcoal { background-color: var(--gallery-charcoal) !important; }
.bg-slate { background-color: var(--gallery-slate) !important; }
.bg-dove { background-color: var(--gallery-dove) !important; }
.bg-pearl { background-color: var(--gallery-pearl) !important; }
.bg-cream { background-color: var(--gallery-cream) !important; }
.bg-bronze { background-color: var(--gallery-bronze) !important; }
.bg-rose-gold { background-color: var(--gallery-rose-gold) !important; }
.bg-sage { background-color: var(--gallery-sage) !important; }
.bg-burgundy { background-color: var(--gallery-burgundy) !important; }
.bg-navy { background-color: var(--gallery-navy) !important; }
.bg-amber { background-color: var(--gallery-amber) !important; }

/* Investment Tier Background Utilities */
.bg-tier-bluechip { background-color: var(--tier-blueChip) !important; }
.bg-tier-value { background-color: var(--tier-value) !important; }
.bg-tier-growth { background-color: var(--tier-growth) !important; }
.bg-tier-discovery { background-color: var(--tier-discovery) !important; }

/* Sage Button Utilities */
.btn-sage {
    background-color: var(--gallery-sage);
    border-color: var(--gallery-sage);
    color: #fff;
}
.btn-sage:hover {
    background-color: #5a7a6c;
    border-color: #5a7a6c;
    color: #fff;
}
.btn-sage:focus {
    box-shadow: 0 0 0 0.25rem rgba(107, 142, 127, 0.5);
}
.btn-outline-sage {
    color: var(--gallery-sage);
    border-color: var(--gallery-sage);
    background-color: transparent;
}
.btn-outline-sage:hover {
    background-color: var(--gallery-sage);
    border-color: var(--gallery-sage);
    color: #fff;
}
.btn-outline-sage:focus {
    box-shadow: 0 0 0 0.25rem rgba(107, 142, 127, 0.5);
}

/* Sage Border Utilities */
.border-sage {
    border-color: var(--gallery-sage) !important;
}

/* Opacity Utilities */
.opacity-75 { opacity: 0.75 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-25 { opacity: 0.25 !important; }

/* Font Weight Utilities */
.fw-light { font-weight: var(--font-weight-light) !important; }
.fw-normal { font-weight: var(--font-weight-regular) !important; }
.fw-medium { font-weight: var(--font-weight-medium) !important; }
.fw-semibold { font-weight: var(--font-weight-semibold) !important; }

/* Enhanced CSS for Improved Analysis Formatting */

/* Enhanced Analysis Content Styling - Flat + Elevated */
.analysis-content {
    background: var(--gallery-pearl);  /* Flat elegant background */
    padding: 2.5rem;
    border-left: 4px solid var(--status-caution);
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
    font-weight: var(--font-weight-regular);
    line-height: 1.7;
    color: var(--gallery-obsidian);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);  /* Subtle elevation */
    position: relative;
}

/* Enhanced Header Styling within Analysis */
.analysis-content h2 {
    color: var(--gallery-obsidian);
    font-weight: var(--font-weight-light);
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gallery-amber);
    position: relative;
}

.analysis-content h2:first-child {
    margin-top: 0;
}

.analysis-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gallery-bronze);
}

.analysis-content h3 {
    color: var(--gallery-obsidian);
    font-weight: var(--font-weight-regular);
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--gallery-sage);
    padding-left: 1rem;
}

.analysis-content h4 {
    color: var(--gallery-bronze);
    font-weight: var(--font-weight-medium);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.analysis-content h5 {
    color: var(--gallery-slate);
    font-weight: var(--font-weight-medium);
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Enhanced Paragraph Styling */
.analysis-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--gallery-obsidian);
}

.analysis-content p:last-child {
    margin-bottom: 0;
}

/* Enhanced Strong/Bold Text */
.analysis-content strong {
    color: var(--gallery-obsidian);
    font-weight: var(--font-weight-semibold);
}

/* Enhanced Bullet Points */
.analysis-content .bullet-point {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.analysis-content .bullet-point i {
    color: var(--gallery-bronze);
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    font-size: 0.8rem;
}

/* Enhanced Recommendation Sections */
.recommendation-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(135, 169, 107, 0.04) 100%);
    border: 2px solid var(--gallery-amber);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.recommendation-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--tier-growth);  /* Flat warm bronze accent */
}

.recommendation-section .badge {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: var(--gallery-shadow-subtle);
    margin-left: 0.5rem;
}

/* Market Data Cards */
.market-data-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--gallery-shadow-subtle);
}

.market-data-card h6 {
    color: var(--gallery-bronze);
    font-weight: var(--font-weight-medium);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.auction-result {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--gallery-sage);
    padding: 1rem;
    margin: 0.75rem 0;
    border-radius: 0 6px 6px 0;
}

.auction-result .artwork-title {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.auction-result .sale-details {
    font-size: 0.85rem;
    color: var(--gallery-dove);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auction-result .price {
    font-weight: var(--font-weight-semibold);
    color: var(--gallery-bronze);
}

.auction-result .source {
    color: var(--gallery-slate);
    font-style: italic;
}

/* Enhanced Alert Styling for Recommendations */
.alert.border-start {
    border-left-width: 4px !important;
    border-radius: 0 8px 8px 0;
    background: var(--bg-secondary);
    box-shadow: var(--gallery-shadow-subtle);
}

.alert.border-primary {
    border-left-color: var(--gallery-amber) !important;
}

.alert.border-success {
    border-left-color: var(--gallery-sage) !important;
}

.alert.border-info {
    border-left-color: var(--gallery-navy) !important;
}

.alert.border-warning {
    border-left-color: var(--gallery-bronze) !important;
}

/* Confidence and Trend Indicators - Flat + Muted */
.confidence-indicator {
    display: inline-flex;
    align-items: center;
    background: var(--tier-discovery);  /* Flat slate-purple */
    color: var(--gallery-cream);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 400;  /* Lighter weight */
    margin-left: 0.5rem;
}

.trend-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 400;  /* Lighter weight */
    margin-left: 0.5rem;
}

.trend-rising {
    background: var(--status-positive);  /* Flat muted sage */
    color: var(--gallery-cream);
}

.trend-stable {
    background: var(--status-caution);  /* Flat antique gold */
    color: var(--gallery-obsidian);
}

.trend-declining {
    background: var(--status-risk);  /* Flat dusty rose */
    color: var(--gallery-cream);
}

/* Enhanced Table Styling for Analysis Data */
.analysis-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--gallery-cream);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--gallery-shadow-subtle);
}

.analysis-content table th {
    background: var(--gallery-obsidian);  /* Flat black header */
    color: var(--gallery-cream);
    padding: 1rem;
    text-align: left;
    font-weight: 400;  /* Lighter weight */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.analysis-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);  /* Subtler borders */
    color: var(--gallery-obsidian);
}

.analysis-content table tr:last-child td {
    border-bottom: none;
}

.analysis-content table tr:hover {
    background: rgba(201, 168, 106, 0.03);  /* Flat antique gold tint */
}

/* Performance Indicators - Muted Colors, Lighter Weight */
.performance-positive {
    color: var(--status-positive);  /* Muted sage */
    font-weight: 500;  /* Medium weight for sophistication */
}

.performance-positive::before {
    content: '↗';
    margin-right: 0.25rem;
}

.performance-negative {
    color: var(--status-risk);  /* Dusty rose */
    font-weight: 500;  /* Medium weight */
}

.performance-negative::before {
    content: '↘';
    margin-right: 0.25rem;
}

.performance-neutral {
    color: var(--status-neutral);  /* Warm gray */
    font-weight: 500;  /* Medium weight */
}

.performance-neutral::before {
    content: '→';
    margin-right: 0.25rem;
}

/* Portfolio Allocation Visual */
.allocation-bar {
    height: 8px;
    background: var(--gallery-pearl);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
    position: relative;
}

.allocation-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.allocation-blue-chip {
    background: var(--tier-blueChip);  /* Flat deep navy-black */
}

.allocation-value {
    background: var(--tier-value);  /* Flat forest green */
}

.allocation-growth {
    background: var(--tier-growth);  /* Flat warm bronze */
}

.allocation-discovery {
    background: var(--tier-discovery);  /* Flat slate-purple */
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .analysis-content {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .analysis-content h2 {
        font-size: 1.4rem;
        margin-top: 2rem;
    }
    
    .analysis-content h3 {
        font-size: 1.2rem;
        margin-top: 1.5rem;
    }
    
    .recommendation-section {
        padding: 1.5rem;
    }
    
    .market-data-card {
        padding: 1rem;
    }
    
    .auction-result .sale-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
/* Enhanced CSS for Fixed Market Data Display and Image Integration */

/* Fixed Market Data Display */
.market-intelligence-summary {
    background: linear-gradient(135deg, var(--gallery-pearl) 0%, var(--gallery-cream) 100%);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid var(--gallery-sage);
    box-shadow: var(--gallery-shadow-soft);
}

.market-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    .market-data-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Enhanced Auction Results Display */
.auction-results-container {
    background: var(--gallery-cream);
    border: 1px solid var(--gallery-rose-gold);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.auction-results-container h6 {
    color: var(--gallery-bronze);
    font-weight: var(--font-weight-medium);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gallery-rose-gold);
    padding-bottom: 0.5rem;
}

.auction-result-item {
    background: linear-gradient(135deg, var(--gallery-pearl) 0%, var(--gallery-cream) 100%);
    border-left: 3px solid var(--gallery-sage);
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
    border-radius: 0 6px 6px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auction-result-item:hover {
    transform: translateX(2px);
    box-shadow: var(--gallery-shadow-soft);
}

.auction-result-item::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--gallery-sage) 0%, var(--gallery-bronze) 100%);
    transition: width 0.3s ease;
}

.auction-result-item:hover::before {
    width: 6px;
}

.auction-artwork-title {
    font-weight: var(--font-weight-medium);
    color: var(--gallery-obsidian);
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.auction-sale-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.auction-price {
    font-weight: var(--font-weight-semibold);
    color: var(--gallery-bronze);
    font-size: 0.95rem;
}

.auction-source {
    color: var(--gallery-slate);
    font-style: italic;
}

.auction-date {
    color: var(--gallery-dove);
    font-size: 0.8rem;
}

/* Market Statistics Cards */
.market-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.market-stat-card {
    background: var(--gallery-cream);
    border: 1px solid var(--gallery-rose-gold);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.market-stat-label {
    font-size: 0.8rem;
    color: var(--gallery-dove);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.market-stat-value {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--gallery-obsidian);
    margin-bottom: 0.25rem;
}

.market-stat-trend {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: var(--font-weight-medium);
}

.trend-rising .market-stat-trend {
    background: linear-gradient(135deg, var(--gallery-sage) 0%, #5a7c42 100%);
    color: var(--gallery-cream);
}

.trend-stable .market-stat-trend {
    background: linear-gradient(135deg, var(--gallery-amber) 0%, var(--gallery-bronze) 100%);
    color: var(--gallery-obsidian);
}

.trend-declining .market-stat-trend {
    background: linear-gradient(135deg, var(--gallery-burgundy) 0%, #8b2635 100%);
    color: var(--gallery-cream);
}

/* Enhanced Representative Works Display */
.representative-works-container {
    background: var(--gallery-cream);
    border: 1px solid var(--gallery-rose-gold);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--gallery-shadow-soft);
}

.representative-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.artwork-showcase {
    background: var(--gallery-pearl);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.artwork-showcase:hover {
    border-color: var(--gallery-amber);
    box-shadow: var(--gallery-shadow-elegant);
    transform: translateY(-4px);
}

.artwork-image-container {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--gallery-shadow-soft);
}

.artwork-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.artwork-showcase:hover .artwork-image {
    transform: scale(1.05);
}

.artwork-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gallery-dove) 0%, var(--gallery-slate) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gallery-cream);
    font-size: 3rem;
}

.artwork-title {
    font-weight: var(--font-weight-medium);
    color: var(--gallery-obsidian);
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.artwork-details {
    font-size: 0.85rem;
    color: var(--gallery-dove);
    margin-bottom: 0.75rem;
}

.artwork-description {
    font-size: 0.9rem;
    color: var(--gallery-slate);
    line-height: 1.5;
    text-align: left;
}

/* Image Attribution */
.image-attribution {
    font-size: 0.7rem;
    color: var(--gallery-dove);
    font-style: italic;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gallery-rose-gold);
}

/* Enhanced Price Display */
.price-display {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: var(--font-weight-semibold);
    color: var(--gallery-bronze);
    letter-spacing: 0.5px;
}

.price-range {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range::before {
    content: '$';
    color: var(--gallery-slate);
    font-weight: normal;
}

.price-separator {
    color: var(--gallery-slate);
    font-weight: normal;
    margin: 0 0.25rem;
}

/* Market Activity Indicators */
.market-activity-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.activity-high {
    background: linear-gradient(135deg, var(--gallery-sage) 0%, #5a7c42 100%);
    color: var(--gallery-cream);
}

.activity-moderate {
    background: linear-gradient(135deg, var(--gallery-amber) 0%, var(--gallery-bronze) 100%);
    color: var(--gallery-obsidian);
}

.activity-low {
    background: linear-gradient(135deg, var(--gallery-dove) 0%, var(--gallery-slate) 100%);
    color: var(--gallery-cream);
}

.activity-high::before {
    content: '●';
    color: #5a7c42;
    font-size: 1.2rem;
}

.activity-moderate::before {
    content: '●';
    color: var(--gallery-bronze);
    font-size: 1.2rem;
}

.activity-low::before {
    content: '●';
    color: var(--gallery-slate);
    font-size: 1.2rem;
}

/* Gallery Information Display */
.gallery-info-card {
    background: linear-gradient(135deg, var(--gallery-pearl) 0%, var(--gallery-cream) 100%);
    border-left: 4px solid var(--gallery-navy);
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.gallery-name {
    font-weight: var(--font-weight-medium);
    color: var(--gallery-navy);
    margin-bottom: 0.5rem;
}

.gallery-exhibitions {
    font-size: 0.9rem;
    color: var(--gallery-slate);
    line-height: 1.5;
}

/* Enhanced Responsive Design */
@media (max-width: 992px) {
    .representative-works-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .market-data-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .auction-sale-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 576px) {
    .market-intelligence-summary {
        padding: 1.5rem;
    }
    
    .auction-results-container {
        padding: 1rem;
    }
    
    .artwork-showcase {
        padding: 1rem;
    }
    
    .artwork-image {
        height: 150px;
    }
    
    .market-stats-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Loading States for Images */
.artwork-image-loading {
    background: linear-gradient(90deg, var(--gallery-pearl) 0%, var(--gallery-dove) 50%, var(--gallery-pearl) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Error States */
.market-data-error {
    background: linear-gradient(135deg, rgba(114, 47, 55, 0.1) 0%, var(--gallery-cream) 100%);
    border-left: 4px solid var(--gallery-burgundy);
    padding: 1rem;
    border-radius: 0 6px 6px 0;
    color: var(--gallery-burgundy);
    font-style: italic;
}

.image-error {
    background: var(--gallery-pearl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gallery-dove);
    font-size: 0.9rem;
    padding: 2rem;
    text-align: center;
}

/* Enhanced Typography for Market Data */
.market-data-container h4 {
    color: var(--gallery-bronze);
    font-weight: var(--font-weight-medium);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    border-bottom: 2px solid var(--gallery-amber);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.market-data-container p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.market-data-container strong {
    color: var(--gallery-obsidian);
    font-weight: var(--font-weight-semibold);
}

/* Price Validation Indicators */
.price-validated {
    position: relative;
}

.price-validated::after {
    content: '✓';
    color: var(--gallery-sage);
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.price-estimated {
    position: relative;
    opacity: 0.8;
}

.price-estimated::after {
    content: '~';
    color: var(--gallery-amber);
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

/* Improved Visual Hierarchy */
.analysis-section {
    margin-bottom: 3rem;
}

.analysis-subsection {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--gallery-rose-gold);
}

.highlight-metric {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(135, 169, 107, 0.05) 100%);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--gallery-amber);
    margin: 0.5rem 0;
    font-weight: var(--font-weight-medium);
}

/* Enhanced Table Styling for Market Data */
.market-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--gallery-cream);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--gallery-shadow-subtle);
}

.market-data-table th {
    background: linear-gradient(135deg, var(--gallery-charcoal) 0%, var(--gallery-slate) 100%);
    color: var(--gallery-cream);
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.market-data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--gallery-rose-gold);
    color: var(--gallery-obsidian);
    vertical-align: top;
}

.market-data-table tr:last-child td {
    border-bottom: none;
}

.market-data-table tr:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.04) 0%, rgba(135, 169, 107, 0.02) 100%);
}

/* Performance Indicators for Market Data */
.performance-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: var(--font-weight-medium);
}

.performance-positive {
    color: var(--gallery-sage);
}

.performance-positive::before {
    content: '↗';
    font-size: 0.9rem;
}

.performance-negative {
    color: var(--gallery-burgundy);
}

.performance-negative::before {
    content: '↘';
    font-size: 0.9rem;
}

.performance-neutral {
    color: var(--gallery-slate);
}

.performance-neutral::before {
    content: '→';
    font-size: 0.9rem;
}

/* PART 3: Add these CSS rules to your style.css file */

/* Fixed Market Intelligence Summary Display */
.market-intelligence-summary {
    background: linear-gradient(135deg, var(--gallery-pearl) 0%, var(--gallery-cream) 100%);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid var(--gallery-sage);
    box-shadow: var(--gallery-shadow-soft);
}

.market-intelligence-summary h4 {
    color: var(--gallery-bronze);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gallery-amber);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Market Statistics Cards */
.market-stats-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.market-stat-card {
    background: var(--gallery-cream);
    border: 1px solid var(--gallery-rose-gold);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.market-stat-card:hover {
    box-shadow: var(--gallery-shadow-soft);
    transform: translateY(-1px);
}

.market-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gallery-sage);
}

.market-stat-label {
    font-size: 0.75rem;
    color: var(--gallery-dove);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-medium);
}

.market-stat-value {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--gallery-obsidian);
    margin-bottom: 0.5rem;
}

.market-stat-trend {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}

.trend-rising {
    background: linear-gradient(135deg, var(--gallery-sage) 0%, #5a7c42 100%);
    color: var(--gallery-cream);
}

.trend-stable {
    background: linear-gradient(135deg, var(--gallery-amber) 0%, var(--gallery-bronze) 100%);
    color: var(--gallery-obsidian);
}

.trend-declining {
    background: linear-gradient(135deg, var(--gallery-burgundy) 0%, #8b2635 100%);
    color: var(--gallery-cream);
}

/* Market Activity Indicators */
.market-activity-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.activity-high {
    background: linear-gradient(135deg, var(--gallery-sage) 0%, #5a7c42 100%);
    color: var(--gallery-cream);
}

.activity-moderate {
    background: linear-gradient(135deg, var(--gallery-amber) 0%, var(--gallery-bronze) 100%);
    color: var(--gallery-obsidian);
}

.activity-low {
    background: linear-gradient(135deg, var(--gallery-dove) 0%, var(--gallery-slate) 100%);
    color: var(--gallery-cream);
}

.activity-unknown {
    background: linear-gradient(135deg, var(--gallery-slate) 0%, var(--gallery-charcoal) 100%);
    color: var(--gallery-cream);
}

/* Auction Results Display */
.auction-results-container {
    background: var(--gallery-cream);
    border: 1px solid var(--gallery-rose-gold);
    border-radius: 8px;
    padding: 1.5rem;
}

.auction-results-container h6 {
    color: var(--gallery-bronze);
    font-weight: var(--font-weight-medium);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gallery-rose-gold);
    padding-bottom: 0.5rem;
}

.auction-result-item {
    background: linear-gradient(135deg, var(--gallery-pearl) 0%, var(--gallery-cream) 100%);
    border-left: 3px solid var(--gallery-sage);
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
    border-radius: 0 6px 6px 0;
    transition: all 0.3s ease;
    position: relative;
}

.auction-result-item:hover {
    transform: translateX(3px);
    box-shadow: var(--gallery-shadow-soft);
}

.auction-result-item::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--gallery-sage) 0%, var(--gallery-bronze) 100%);
    transition: width 0.3s ease;
}

.auction-result-item:hover::before {
    width: 6px;
}

.auction-artwork-title {
    font-weight: var(--font-weight-medium);
    color: var(--gallery-obsidian);
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.auction-sale-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.auction-price {
    font-weight: var(--font-weight-semibold);
    color: var(--gallery-bronze);
    font-size: 0.95rem;
    font-family: 'Monaco', 'Menlo', monospace;
}

.auction-source {
    color: var(--gallery-slate);
    font-style: italic;
    font-weight: var(--font-weight-regular);
}

.auction-date {
    color: var(--gallery-dove);
    font-size: 0.8rem;
}

/* Enhanced Price Display */
.price-display {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.5px;
}

/* Representative Works Section */
.representative-works-container {
    background: var(--gallery-cream);
    border: 1px solid var(--gallery-rose-gold);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--gallery-shadow-soft);
}

.representative-works-container h4 {
    color: var(--gallery-bronze);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gallery-amber);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.representative-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.artwork-showcase {
    background: var(--gallery-pearl);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.artwork-showcase:hover {
    border-color: var(--gallery-amber);
    box-shadow: var(--gallery-shadow-elegant);
    transform: translateY(-4px);
}

.artwork-showcase::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.artwork-showcase:hover::before {
    animation: shine 1.5s ease-in-out;
}

@keyframes shine {
    0% {
        top: -50%;
        right: -50%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 50%;
        right: 50%;
        opacity: 0;
    }
}

.artwork-image-container {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--gallery-shadow-soft);
    background: var(--gallery-dove);
}

.artwork-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 6px;
}

.artwork-showcase:hover .artwork-image {
    transform: scale(1.05);
}

.artwork-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gallery-dove) 0%, var(--gallery-slate) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gallery-cream);
    font-size: 3rem;
    border-radius: 6px;
}

.artwork-title {
    font-weight: var(--font-weight-medium);
    color: var(--gallery-obsidian);
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.artwork-details {
    font-size: 0.85rem;
    color: var(--gallery-dove);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.image-attribution {
    font-size: 0.7rem;
    color: var(--gallery-dove);
    font-style: italic;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gallery-rose-gold);
}

/* Market Data Error States */
.market-data-error {
    background: linear-gradient(135deg, rgba(114, 47, 55, 0.1) 0%, var(--gallery-cream) 100%);
    border-left: 4px solid var(--gallery-burgundy);
    padding: 1rem;
    border-radius: 0 6px 6px 0;
    color: var(--gallery-burgundy);
    font-style: italic;
    text-align: center;
}

/* Market Data Items */
.market-data-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gallery-rose-gold);
}

.market-data-item:last-child {
    border-bottom: none;
}

/* Enhanced Loading States */
.artwork-image-loading {
    background: linear-gradient(90deg, var(--gallery-pearl) 0%, var(--gallery-dove) 50%, var(--gallery-pearl) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Progress Bar Enhancements */
.progress {
    height: 6px;
    border-radius: 3px;
    background: var(--gallery-pearl);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--gallery-amber) 0%, var(--gallery-bronze) 50%, var(--gallery-rose-gold) 100%);
    border-radius: 3px;
    background-size: 200% 100%;
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .representative-works-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .market-intelligence-summary {
        padding: 1.5rem;
    }
    
    .auction-sale-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 576px) {
    .market-intelligence-summary {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .auction-results-container {
        padding: 1rem;
    }
    
    .artwork-showcase {
        padding: 1rem;
    }
    
    .artwork-image,
    .artwork-image-placeholder {
        height: 150px;
    }
    
    .market-stats-container {
        gap: 0.75rem;
    }
    
    .market-stat-card {
        padding: 1rem;
    }
}
/* Add this CSS to your style.css file for image loading states */

.artwork-image-container {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--gallery-shadow-soft);
    background: var(--gallery-dove);
}

.artwork-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
    border-radius: 6px;
}

.image-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    z-index: 10;
}

.artwork-showcase:hover .artwork-image {
    transform: scale(1.05);
}

.artwork-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gallery-dove) 0%, var(--gallery-slate) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gallery-cream);
    border-radius: 6px;
    text-align: center;
    padding: 1rem;
}

.artwork-image-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

/* Enhanced debugging styles */
.debug-market-data {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, var(--gallery-cream) 100%);
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
}

.debug-image-extraction {
    background: var(--bg-secondary);
    border-left: 4px solid var(--tier-discovery);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
}

/* Enhanced Acquisition Strategy Section - Theme-Aware */
.acquisition-strategy-section {
    background: var(--bg-secondary);
    border: 2px solid var(--gallery-amber);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
    position: relative;
    overflow: hidden;
}

.acquisition-strategy-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gallery-amber) 0%, var(--gallery-bronze) 50%, var(--gallery-rose-gold) 100%);
}

.acquisition-strategy-section h5 {
    color: var(--gallery-bronze);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.acquisition-strategy-section .strategy-item {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--gallery-sage);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.acquisition-strategy-section .strategy-item h6 {
    color: var(--gallery-bronze);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Follow-on Analysis Sections */
.follow-on-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--gallery-dove);
    border-radius: 8px;
    margin-top: 2rem;
}

.followup-content {
    margin-top: 2rem;
}

.followup-content .card {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-width: 2px;
}

.followup-content-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gallery-obsidian);
}

.followup-content-text p {
    margin-bottom: 1rem;
}

.followup-content-text strong {
    color: var(--gallery-bronze);
    font-weight: 600;
}

/* Toast container */
.toast-container {
    z-index: 1090;
}

/* Toast visibility fixes */
.toast {
    min-width: 250px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast.bg-success {
    background-color: #28a745 !important;
}

.toast.bg-danger {
    background-color: #dc3545 !important;
}

.toast.bg-info {
    background-color: var(--tier-discovery) !important;
}

.toast .toast-body {
    color: white !important;
    font-weight: 500;
}

.toast .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.toast .btn-close-white:hover {
    opacity: 1;
}

/* ============================================================================
   TASK NOTIFICATION SYSTEM — Cross-page analysis tracking
   Uses Egon design tokens: --radius-*, --shadow-*, --transition-*, --font-ui
   ============================================================================ */

/* Toast container — fixed top-right, below navbar */
.task-notification-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 12px);
    max-width: 380px;
    pointer-events: none;
}

/* Individual toast notification — matches Ask Egon panel elevation */
.task-notification-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3, 12px);
    padding: var(--space-4, 16px);
    border-radius: var(--radius-xl, 16px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--gallery-shadow-elegant, 0 8px 25px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08));
    font-family: var(--font-ui, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity var(--transition-smooth, 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)),
                transform var(--transition-smooth, 0.3s cubic-bezier(0.25, 0.8, 0.25, 1));
}

.task-notification-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.task-notification-toast--exiting {
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Success variant — sage accent */
.task-notification-toast--success {
    border-left: 3px solid var(--status-positive);
}

.task-notification-toast--success .task-notification-toast__icon {
    color: var(--status-positive);
}

/* Error variant — dusty rose accent */
.task-notification-toast--error {
    border-left: 3px solid var(--status-risk);
}

.task-notification-toast--error .task-notification-toast__icon {
    color: var(--status-risk);
}

/* Toast icon */
.task-notification-toast__icon {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Toast content */
.task-notification-toast__content {
    flex: 1;
    min-width: 0;
}

.task-notification-toast__title {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 2px;
}

.task-notification-toast__message {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary);
    line-height: 1.5;
}

.task-notification-toast__message strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Toast action buttons */
.task-notification-toast__actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    margin-top: 2px;
}

.task-notification-toast__btn {
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: var(--text-xs, 0.75rem);
    font-weight: 500;
    padding: 5px 12px;
    border-radius: var(--radius-sm, 6px);
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: all var(--transition-fast, 0.15s ease);
    line-height: 1.5;
}

.task-notification-toast__btn--primary {
    background: var(--gallery-obsidian, #0f0f0f);
    color: var(--gallery-cream, #ffffff);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.05));
}

.task-notification-toast__btn--primary:hover {
    background: var(--gallery-charcoal, #2a2a2a);
    color: var(--gallery-cream, #ffffff);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.task-notification-toast__btn--dismiss {
    background: transparent;
    color: var(--text-tertiary);
    padding: 4px 12px;
}

.task-notification-toast__btn--dismiss:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Slim banner below navbar — active task indicator */
.task-banner {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    overflow: hidden;
    animation: taskBannerSlideDown 0.25s ease;
}

@keyframes taskBannerSlideDown {
    from { max-height: 0; opacity: 0; }
    to { max-height: 40px; opacity: 1; }
}

.task-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
}

.task-banner__spinner {
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: var(--status-positive);
    border-right-color: var(--status-positive);
    border-radius: var(--radius-full, 9999px);
    animation: taskSpinner 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes taskSpinner {
    to { transform: rotate(360deg); }
}

.task-banner__text {
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: var(--text-xs, 0.75rem);
    font-weight: 500;
    color: var(--status-positive);
    letter-spacing: 0.02em;
}

/* ---- Dark theme refinements ---- */

[data-theme="dark"] .task-notification-toast {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .task-notification-toast__btn--primary {
    background: var(--gallery-sage);
    color: #fff;
}

[data-theme="dark"] .task-notification-toast__btn--primary:hover {
    background: #5a7a6e;
    color: #fff;
}

/* ---- Mobile adjustments ---- */

@media (max-width: 768px) {
    .task-notification-container {
        top: auto;
        bottom: 90px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .task-notification-toast {
        border-radius: var(--radius-lg, 12px);
    }
}

/* Watchlist buttons */
.watchlist-actions {
    border-top: 1px solid var(--gallery-dove);
    padding-top: 1rem;
}

.watchlist-actions .btn {
    font-size: 0.875rem;
}

/* Edit modal enhancements */
#editArtworkModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Opportunities Section Redesign */
.opportunities-container {
    max-width: 1200px;
    margin: 0 auto;
}

.opportunity-card {
    background: var(--bg-secondary);  /* Theme-aware elevated surface */
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

/* Stoplight Indicators */
.stoplight-indicators {
    padding: 0.5rem 0;
}

.indicator-row {
    margin-bottom: 1rem;
}

.indicator-row:last-child {
    margin-bottom: 0;
}

.indicator-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gallery-obsidian);
}

.stoplight {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: #f8f9fa;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

.stoplight .light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e9ecef;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.stoplight.green .light:nth-child(1).active {
    background: var(--stoplight-green);
    border-color: var(--stoplight-green);
    box-shadow: 0 0 8px rgba(135, 169, 107, 0.4);
}

.stoplight.yellow .light:nth-child(2).active {
    background: var(--stoplight-yellow);
    border-color: var(--stoplight-yellow);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.stoplight.red .light:nth-child(3).active {
    background: var(--stoplight-red);
    border-color: var(--stoplight-red);  
    box-shadow: 0 0 8px rgba(196, 164, 132, 0.4);
}

.opportunity-card.featured {
    border: 2px solid var(--gallery-amber);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.2);
}

.opportunity-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.opportunity-header {
    background: var(--gallery-pearl);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--gallery-dove);
}

.rank-badge {
    background: var(--gallery-bronze);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.rank-badge.primary {
    background: var(--gallery-amber);
    color: var(--gallery-obsidian);
}

.artist-name {
    flex-grow: 1;
    margin: 0;
    color: var(--gallery-obsidian);
}

.segment-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.segment-badge.blue-chip { background: var(--gallery-burgundy); color: white; }
.segment-badge.value { background: var(--gallery-sage); color: white; }
.segment-badge.growth { background: var(--gallery-amber); color: var(--gallery-obsidian); }
.segment-badge.discovery { background: var(--gallery-navy); color: white; }

.opportunity-body {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .opportunity-body {
        grid-template-columns: 1fr;
    }
}

.opportunity-details h6 {
    color: var(--gallery-bronze);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.availability-info {
    background: var(--gallery-pearl);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.works-count {
    margin-left: auto;
    background: var(--gallery-amber);
    color: var(--gallery-obsidian);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.investment-rationale,
.market-analysis {
    margin-bottom: 1.5rem;
}

.investment-rationale p,
.market-analysis p {
    margin: 0;
    line-height: 1.6;
}

.opportunity-metrics {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric-card {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

.metric-card h6 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.price-value,
.amount-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gallery-bronze);
    font-family: 'Monaco', 'Menlo', monospace;
}

.urgency-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

.urgency-badge.danger { background: var(--status-risk); color: white; }
.urgency-badge.warning { background: var(--status-caution); color: var(--text-primary); }
.urgency-badge.info { background: var(--tier-discovery); color: white; }
.urgency-badge.secondary { background: var(--status-neutral); color: white; }

.metric-card.scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
}

.score-item {
    text-align: center;
}

.score-item small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

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

.watchlist-actions .btn {
    flex: 1;
    font-size: 0.75rem;
}

/* Representative Works Section - Single Column Side Layout - Theme-Aware */
.representative-works-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.representative-works-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

/* Individual artwork card - horizontal layout */
.artwork-showcase {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    min-height: 140px;
}

.artwork-showcase:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #dee2e6;
}

/* Image/Preview container - fixed width for artwork-showcase context ONLY */
.artwork-showcase .artwork-image-container {
    position: relative;
    background: var(--bg-tertiary);
    width: 180px;
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-primary);
}

/* For smaller screens */
@media (max-width: 576px) {
    .artwork-showcase {
        flex-direction: column;
    }

    .artwork-showcase .artwork-image-container {
        width: 100%;
        height: 180px;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
}

/* Link cards for museum pages */
.artwork-link-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
    text-align: center;
    padding: 1rem;
    position: relative;
}

.artwork-link-card i.artwork-icon {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.artwork-link-card:hover i.artwork-icon {
    opacity: 1;
    color: var(--gallery-amber);
}

.artwork-link-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Artwork information section - flexible width */
.artwork-info {
    padding: 1rem 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.artwork-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.artwork-title {
    font-weight: 600;
    font-style: italic;
    color: #212529;
    font-size: 1.05rem;
    line-height: 1.3;
}

.artwork-details {
    font-size: 0.875rem;
    color: #6c757d;
}

.artwork-location {
    font-size: 0.8125rem;
    color: #868e96;
    font-style: italic;
}

.artwork-significance {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #495057;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

/* Action button */
.artwork-action {
    margin-left: auto;
    flex-shrink: 0;
}

.artwork-action .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Actual image preview */
.artwork-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.artwork-showcase:hover .artwork-preview {
    transform: scale(1.05);
}

/* Clickable image styles */
.artwork-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.clickable-image {
    cursor: pointer;
}

/* Hover overlay for clickable images */
.image-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.image-hover-overlay i {
    color: white;
    font-size: 2rem;
}

.artwork-image-link:hover .image-hover-overlay {
    opacity: 1;
}

.artwork-image-link:hover .artwork-preview {
    transform: scale(1.05);
}

/* Museum indicators */
.museum-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.museum-indicator i {
    font-size: 0.875rem;
}

/* Error/fallback state */
.artwork-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
}

/* Loading state */
.preview-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.preview-loading i {
    font-size: 1.5rem;
    color: #6c757d;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Clean Single Column Follow-up Analysis Styles */

/* Main container - no nested cards */
.followup-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Remove card-within-card appearance */
.followup-card {
    border: none;
    box-shadow: none;
    background: transparent;
}

.followup-card .card-body {
    padding: 0;
}

/* Add proper title to main card header */
.followup-card .card-header {
    background: #f8f9fa;
    border-bottom: 2px solid #D4AF37;
    padding: 1rem;
}

.followup-card .card-header h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.followup-card .card-header h5 i {
    color: #D4AF37;
    margin-right: 0.5rem;
}

/* Simple sections without card styling */
.followup-content .section {
    background: transparent;
    border: none;
    border-top: 1px solid #e9ecef;
    border-radius: 0;
    padding: 1rem 0;
    margin-bottom: 0;
    box-shadow: none;
}

.followup-content .section:first-child {
    border-top: none;
    padding-top: 0.5rem;
}

/* Compact section headers */
.followup-content h3 {
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.followup-content h3 i {
    display: none; /* Remove icons for cleaner look */
}

.followup-content h4 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: #495057;
}

/* Elevator Pitch - Simple highlight box */
.pitch-card {
    background: #f8f9fa;
    border-left: 3px solid #D4AF37;
    border-radius: 0;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.pitch-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #495057;
    font-style: normal;
    margin: 0;
}

/* Single copy button at the end of pitch */
.pitch-card .copy-btn {
    position: static;
    margin-top: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* Talking Points - Simple list */
.points-grid {
    display: block;
}

.point-card {
    background: transparent;
    border: none;
    border-left: 2px solid #69B578;
    border-radius: 0;
    padding: 0.5rem 0 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.point-card h4 {
    color: #495057;
    margin-bottom: 0.25rem;
}

.point-card p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    color: #6c757d;
}

.example-phrase {
    background: #f8f9fa;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    margin-top: 0.25rem;
}

.example-phrase small {
    display: none; /* Remove "Try saying:" label */
}

.example-phrase em {
    color: #495057;
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 500;
}

/* Email Templates - Streamlined */
.template-card {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 1rem;
}

.template-card h4 {
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.25rem;
    margin-bottom: 0.5rem;
}

.email-template {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.subject-line {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.email-body {
    font-size: 0.85rem;
}

.email-body p {
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

/* Only one copy button per template */
.email-template .copy-btn {
    margin-top: 0.5rem;
}

.template-notes {
    background: transparent;
    border: none;
    padding: 0.5rem 0 0;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

/* Questions - Simple list */
.questions-list {
    display: block;
}

.question-item {
    background: transparent;
    border: none;
    border-left: 2px solid var(--tier-discovery);
    padding: 0.375rem 0 0.375rem 0.75rem;
    margin-bottom: 0.5rem;
}

.question-item .question {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.125rem;
    font-size: 0.85rem;
}

.question-item .context {
    color: #6c757d;
    font-style: normal;
    font-size: 0.75rem;
}

/* Anecdotes - Simple blocks */
.anecdote-carousel {
    display: block;
}

.anecdote-card {
    background: transparent;
    border: none;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
}

.anecdote-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.anecdote-card p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.375rem;
    color: #495057;
}

.conversation-starter {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Common Mistakes - Simple alerts */
.mistakes-grid {
    display: block;
}

.mistake-card {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.mistake-card strong {
    display: inline;
    font-size: 0.85rem;
}

/* Negotiation Tactics - Vertical list */
.tactics-grid {
    display: block;
}

.tactic-card {
    background: transparent;
    border: none;
    border-left: 2px solid #69B578;
    padding: 0.5rem 0 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.tactic-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.tactic-card p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.375rem;
}

.do-dont {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.do-dont span {
    display: block;
    margin-bottom: 0.125rem;
}

/* Timeline - Vertical compact list */
.timeline-card {
    display: block;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-card::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    display: block;
    margin-bottom: 0.75rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 0.25rem;
    width: 8px;
    height: 8px;
    background: #D4AF37;
    border-radius: 50%;
}

.timeline-marker {
    display: inline-block;
    background: transparent;
    color: #6c757d;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.timeline-content {
    font-size: 0.85rem;
}

.timeline-content strong {
    display: inline;
    font-size: 0.85rem;
    color: #495057;
}

.timeline-content p {
    margin: 0;
    color: #6c757d;
}

/* Collection sections - simplified */
.thesis-statement {
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.75rem;
    background: #f8f9fa;
    border-left: 3px solid #D4AF37;
    margin-bottom: 0.75rem;
}

.elevator-versions {
    display: block;
}

.version-card {
    background: transparent;
    padding: 0.5rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 0.5rem;
}

.version-card strong {
    font-size: 0.85rem;
    color: #6c757d;
}

.version-card p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 0.25rem;
}

/* Works showcase - simple list */
.works-showcase {
    display: block;
}

.work-story-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.work-story-card:last-child {
    border-bottom: none;
}

/* Phone scripts */
.script-card {
    background: transparent;
}

.script-sections {
    background: transparent;
    padding: 0;
}

.script-part {
    margin-bottom: 0.75rem;
    padding-bottom: 0;
    border-bottom: none;
}

.script-text {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    font-style: normal;
    font-size: 0.85rem;
}

/* Market context - inline stats */
.market-card {
    display: block;
}

.market-card p {
    background: transparent;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}

.market-card p:last-child {
    border-bottom: none;
}

/* Remove all hover effects for cleaner look */
.point-card:hover,
.anecdote-card:hover,
.tactic-card:hover,
.work-story-card:hover {
    box-shadow: none;
    transform: none;
}

/* Hide redundant elements */
.followup-content .section > button.copy-btn {
    display: none; /* Remove section-level copy buttons */
}

/* Ensure single copy button per major content block */
.pitch-card .copy-btn:not(:first-of-type),
.email-template .copy-btn:not(:first-of-type),
.thesis-card .copy-btn:not(:first-of-type) {
    display: none;
}

/* Comparable Artist Cards in Peer Comparison Section */
.comparable-artist-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.comparable-artist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--gallery-sage, #87a96b) !important;
}

.comparable-artist-card a:hover strong {
    color: var(--gallery-sage, #87a96b) !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .followup-content {
        font-size: 0.875rem;
    }
    
    .followup-content .section {
        padding: 0.75rem 0;
    }
}

/* Print optimization */
@media print {
    .copy-btn {
        display: none;
    }
    
    .followup-content .section {
        break-inside: avoid;
    }
}

/* Enhanced loading states */
.analysis-loading {
    position: relative;
    min-height: 200px;
}

.analysis-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--sage);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Educational content styling */
.educational-content .metric-preview {
    text-align: center;
    padding: 1rem;
}

.educational-content .metric-icon {
    font-size: 2rem;
    color: var(--sage);
    margin-bottom: 0.5rem;
}

/* Insights styling */
.collection-insights {
    animation: fadeIn 0.5s ease-in;
}

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

/* ========================================
   UNTITLED UI SYSTEMATIC UTILITY CLASSES
   (Gallery-Themed Implementation)
   ======================================== */

/* Spacing Utilities (Systematic Scale) */
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-5 { padding: var(--space-5) !important; }
.p-6 { padding: var(--space-6) !important; }
.p-8 { padding: var(--space-8) !important; }

.m-1 { margin: var(--space-1) !important; }
.m-2 { margin: var(--space-2) !important; }
.m-3 { margin: var(--space-3) !important; }
.m-4 { margin: var(--space-4) !important; }
.m-5 { margin: var(--space-5) !important; }
.m-6 { margin: var(--space-6) !important; }
.m-8 { margin: var(--space-8) !important; }

/* Typography Utilities (Systematic Scale) */
.text-xs { font-size: var(--text-xs) !important; }
.text-sm { font-size: var(--text-sm) !important; }
.text-base { font-size: var(--text-base) !important; }
.text-lg { font-size: var(--text-lg) !important; }
.text-xl { font-size: var(--text-xl) !important; }
.text-2xl { font-size: var(--text-2xl) !important; }
.text-3xl { font-size: var(--text-3xl) !important; }

/* Shadow Utilities (Systematic Scale) */
.shadow-xs { box-shadow: var(--shadow-xs) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }
.shadow-none { box-shadow: none !important; }

/* Border Radius Utilities (Systematic Scale) */
.rounded-xs { border-radius: var(--radius-xs) !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Gallery Color Utilities (Preserved Palette) */
.text-gallery-obsidian { color: var(--gallery-obsidian) !important; }
.text-gallery-charcoal { color: var(--gallery-charcoal) !important; }
.text-gallery-slate { color: var(--gallery-slate) !important; }
.text-gallery-dove { color: var(--gallery-dove) !important; }
.text-gallery-sage { color: var(--gallery-sage) !important; }
.text-gallery-amber { color: var(--gallery-amber) !important; }
.text-gallery-bronze { color: var(--gallery-bronze) !important; }

.bg-gallery-cream { background-color: var(--gallery-cream) !important; }
.bg-gallery-pearl { background-color: var(--gallery-pearl) !important; }
.bg-gallery-sage { background-color: var(--gallery-sage) !important; }
.bg-gallery-amber { background-color: var(--gallery-amber) !important; }
.bg-gallery-bronze { background-color: var(--gallery-bronze) !important; }

/* Enhanced Focus Utilities */
.focus-ring:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

.focus-ring-sage:focus {
    outline: none;
    box-shadow: var(--focus-ring-sage);
}

/* Transition Utilities */
.transition-fast { transition: var(--transition-fast) !important; }
.transition-smooth { transition: var(--transition-smooth) !important; }
.transition-slow { transition: var(--transition-slow) !important; }

/* Gallery-Specific Component Utilities */
.gallery-card {
    background: var(--gallery-cream);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

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

.gallery-button {
    background: linear-gradient(135deg, var(--gallery-sage) 0%, #6a7568 100%);
    border: 2px solid var(--gallery-sage);
    color: var(--gallery-cream);
    border-radius: var(--radius-md);
    padding: var(--button-padding-md);
    transition: var(--transition-smooth);
    font-weight: var(--font-weight-regular);
}

.gallery-button:hover {
    background: linear-gradient(135deg, #6a7568 0%, var(--gallery-sage) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.gallery-input {
    border: 2px solid var(--gallery-pearl);
    border-radius: var(--radius-md);
    background: var(--gallery-cream);
    color: var(--gallery-obsidian);
    padding: var(--space-3) var(--space-4);
    transition: var(--transition-smooth);
}

.gallery-input:focus {
    border-color: var(--gallery-amber);
    box-shadow: var(--shadow-sm), var(--focus-ring);
    outline: none;
}

/* ========================================
   PREFERENCES PAGE STYLES
   ======================================== */

/* Preferences Page Stats Cards */
.preferences-stats .card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.preferences-stats .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--gallery-shadow-soft);
}

.preferences-stats .rounded-circle {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Segment description - full text with responsive truncation */
.segment-description {
    display: block;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* On narrow screens, use line clamping if needed */
@media (max-width: 768px) {
    .segment-description {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Preferences Artist Cards */
.preferences-container .artist-card {
    transition: all 0.3s ease;
}

/* Artist Grid and Chip Styling for Consolidated View */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.artist-chip {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.artist-chip:hover {
    background: var(--bg-secondary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.artist-chip .artist-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.artist-chip .artist-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.artist-chip .artist-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.artist-chip .btn-action {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preferences-container .artist-card .card {
    height: 100%;
    transition: all 0.3s ease;
}

.preferences-container .artist-card:hover .card {
    transform: translateY(-2px);
    box-shadow: var(--gallery-shadow-soft);
}

/* Preference Type Borders */
.preferences-container .border-primary {
    border-color: var(--gallery-amber) !important;
}

.preferences-container .border-success {
    border-color: var(--gallery-sage) !important;
}

.preferences-container .border-info {
    border-color: var(--gallery-navy) !important;
}

.preferences-container .border-danger {
    border-color: var(--gallery-burgundy) !important;
}

/* Preference Badges */
.preferences-container .badge {
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

.preferences-container .badge.bg-secondary {
    background-color: var(--gallery-dove) !important;
}

/* Preference Search */
.preferences-container .input-group {
    box-shadow: var(--gallery-shadow-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.preferences-container .input-group-text {
    border: none;
    background: var(--bg-secondary);
}

.preferences-container .form-control {
    border: none;
}

.preferences-container .form-control:focus {
    box-shadow: none;
    border-color: transparent;
}

/* Preference Dropdown Actions */
.preferences-container .dropdown-menu {
    box-shadow: var(--gallery-shadow-elegant);
    border: 1px solid rgba(0,0,0,0.08);
}

.preferences-container .dropdown-item {
    transition: all 0.2s ease;
}

.preferences-container .dropdown-item:hover {
    background-color: var(--gallery-pearl);
    padding-left: 1.5rem;
}

.preferences-container .dropdown-item i {
    width: 20px;
}

/* Artist Search Results */
#artistSearchResults .list-group-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

#artistSearchResults .list-group-item:hover:not([disabled]) {
    background-color: var(--gallery-pearl);
    transform: translateX(4px);
}

#artistSearchResults .list-group-item[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal Enhancements */
.preferences-container .modal-header {
    background: linear-gradient(135deg, var(--gallery-pearl) 0%, var(--gallery-cream) 100%);
    border-bottom: 2px solid var(--gallery-amber);
}

.preferences-container .modal-title {
    color: var(--gallery-obsidian);
    font-weight: var(--font-weight-medium);
}

/* Empty State Styling */
.preferences-container .text-muted.text-center {
    padding: 2rem;
    background: var(--gallery-pearl);
    border-radius: var(--radius-md);
    font-style: italic;
}

/* Reference Artists Segment Headers */
.preferences-container h6.text-muted {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    color: var(--gallery-bronze) !important;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gallery-rose-gold);
}

/* Card Animation on Filter */
.preferences-container .artist-card[style*="display: none"] {
    animation: fadeOut 0.3s ease;
}

.preferences-container .artist-card[style*="display: block"] {
    animation: fadeIn 0.3s ease;
}

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

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

/* Toast Notifications for Preferences */
.preferences-toast .toast {
    min-width: 250px;
}

.preferences-toast .toast-body {
    font-weight: 500;
}

/* Loading Spinner Enhancement */
.preferences-container .spinner-border {
    color: var(--gallery-amber);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .preferences-container .artist-card {
        margin-bottom: 0.5rem;
    }

    .preferences-container .dropdown-menu {
        font-size: 0.9rem;
    }

    .preferences-stats .card-body {
        padding: 1rem;
    }
}

/* ============================================
   ANALYSIS PROGRESS TIMELINE
   ============================================ */

/* Analysis Progress Timeline Container */
.analysis-timeline {
    padding: 1rem 0;
    border-top: 1px solid var(--gallery-sage);
    border-bottom: 1px solid var(--gallery-sage);
}

/* Individual Timeline Stage */
.timeline-stage {
    flex: 1;
    transition: all 0.3s ease;
}

.timeline-stage i {
    transition: all 0.3s ease;
}

/* Active Stage Pulse Animation */
.timeline-stage.text-primary i.fa-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Enhanced Progress Bar Styles */
#progress-bar {
    transition: width 0.5s ease, background-color 0.3s ease;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Detailed Status Message Styling */
#async-status {
    background: linear-gradient(to right, rgba(135, 169, 107, 0.1), transparent);
    border-left: 3px solid var(--gallery-sage);
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    border-radius: 0.25rem;
}

/* Loading Spinner for Async Processing */
.loading-spinner {
    border: 3px solid rgba(135, 169, 107, 0.1);
    border-top: 3px solid var(--gallery-sage);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   UTILITY CLASSES (Bootstrap-style)
   ======================================== */

/* Spacing Utilities - Using systematic design tokens */
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-5 { padding: var(--space-5) !important; }
.p-6 { padding: var(--space-6) !important; }
.p-8 { padding: var(--space-8) !important; }
.p-10 { padding: var(--space-10) !important; }

.pt-1 { padding-top: var(--space-1) !important; }
.pt-2 { padding-top: var(--space-2) !important; }
.pt-3 { padding-top: var(--space-3) !important; }
.pt-4 { padding-top: var(--space-4) !important; }
.pt-6 { padding-top: var(--space-6) !important; }
.pt-8 { padding-top: var(--space-8) !important; }

.pb-1 { padding-bottom: var(--space-1) !important; }
.pb-2 { padding-bottom: var(--space-2) !important; }
.pb-3 { padding-bottom: var(--space-3) !important; }
.pb-4 { padding-bottom: var(--space-4) !important; }
.pb-6 { padding-bottom: var(--space-6) !important; }
.pb-8 { padding-bottom: var(--space-8) !important; }

.px-1 { padding-left: var(--space-1) !important; padding-right: var(--space-1) !important; }
.px-2 { padding-left: var(--space-2) !important; padding-right: var(--space-2) !important; }
.px-3 { padding-left: var(--space-3) !important; padding-right: var(--space-3) !important; }
.px-4 { padding-left: var(--space-4) !important; padding-right: var(--space-4) !important; }
.px-6 { padding-left: var(--space-6) !important; padding-right: var(--space-6) !important; }

.py-1 { padding-top: var(--space-1) !important; padding-bottom: var(--space-1) !important; }
.py-2 { padding-top: var(--space-2) !important; padding-bottom: var(--space-2) !important; }
.py-3 { padding-top: var(--space-3) !important; padding-bottom: var(--space-3) !important; }
.py-4 { padding-top: var(--space-4) !important; padding-bottom: var(--space-4) !important; }
.py-6 { padding-top: var(--space-6) !important; padding-bottom: var(--space-6) !important; }

.m-1 { margin: var(--space-1) !important; }
.m-2 { margin: var(--space-2) !important; }
.m-3 { margin: var(--space-3) !important; }
.m-4 { margin: var(--space-4) !important; }
.m-6 { margin: var(--space-6) !important; }
.m-8 { margin: var(--space-8) !important; }

.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }

.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Typography Utilities */
.text-xs { font-size: var(--text-xs) !important; }
.text-sm { font-size: var(--text-sm) !important; }
.text-base { font-size: var(--text-base) !important; }
.text-lg { font-size: var(--text-lg) !important; }
.text-xl { font-size: var(--text-xl) !important; }
.text-2xl { font-size: var(--text-2xl) !important; }
.text-3xl { font-size: var(--text-3xl) !important; }

/* Border Radius Utilities */
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded { border-radius: var(--radius-md) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Shadow Utilities */
.shadow-xs { box-shadow: var(--shadow-xs) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* Gap Utilities (for flexbox/grid) */
.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-6 { gap: var(--space-6) !important; }

/* ========================================
   BASE.HTML INLINE STYLES
   (Moved from template for consolidation)
   ======================================== */

/* ========================================
   IMPROVED MOBILE RESPONSIVENESS
   ======================================== */

/* Enhanced Mobile Table Patterns */
@media (max-width: 768px) {
    /* Better table spacing */
    .table-responsive {
        font-size: 0.8125rem; /* Slightly larger for readability */
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    .table-responsive table {
        min-width: 500px; /* Reduced from 600px */
    }

    .table-responsive th,
    .table-responsive td {
        padding: 0.625rem 0.5rem; /* Better touch targets */
        white-space: nowrap;
    }

    /* Card mobile improvements */
    .card-body {
        padding: 1.25rem; /* More generous than 1.5rem */
    }

    .card-header {
        padding: 1.25rem 1.5rem;
    }

    /* Better chart sizing on mobile */
    .chart-container {
        height: 200px; /* Increased from 150px */
        margin: 1rem 0;
    }

    /* Improved form spacing */
    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-label {
        font-size: 0.9375rem; /* 15px - better readability */
        margin-bottom: 0.625rem;
    }

    /* Better button sizing for touch */
    .btn {
        padding: 0.75rem 1.5rem; /* Larger touch targets */
        font-size: 0.9375rem;
        min-height: 44px; /* iOS touch target guideline */
    }

    .btn-sm {
        padding: 0.5rem 1rem;
        min-height: 38px;
    }

    .btn-lg {
        padding: 1rem 2rem;
        min-height: 52px;
    }

    /* Navigation improvements */
    .navbar {
        padding: 0.75rem 0;
    }

    .navbar-brand {
        font-size: 1.5rem; /* Scale down slightly on mobile */
    }

    .nav-link {
        padding: 0.875rem 1rem !important; /* Better touch targets */
        font-size: 1rem;
    }

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

    .modal-body {
        padding: 1.5rem 1.25rem;
    }

    .modal-header {
        padding: 1.25rem;
    }

    /* h1/h2/h3 sizes now handled by clamp() in base rules */
    h4 { font-size: 1.125rem; }

    /* Better spacing for content */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Stack columns better on mobile */
    .row > [class*='col-'] {
        margin-bottom: 1rem;
    }

    /* Improved badge sizing */
    .badge {
        font-size: 0.6875rem; /* 11px */
        padding: 0.5rem 0.875rem;
    }
}

/* Tablet-specific adjustments (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 720px;
    }

    .card-body {
        padding: 2rem;
    }

    .table-responsive {
        font-size: 0.9rem;
    }

    /* Better grid for tablets */
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Large desktop optimizations (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    .card-body {
        padding: 3rem;
    }

    /* h1/h2/h3 sizes now handled by clamp() in base rules */
}

/* ========================================
   ANALYSIS REPORT VISUAL DESIGN SYSTEM
   Premium styling for investment reports
   ======================================== */

/* Analysis Report Container */
.analysis-report {
    max-width: 900px;
    margin: 0 auto;
}

/* ----------------------------------------
   TL;DR SUMMARY - Premium Highlight Box
   ---------------------------------------- */
.tldr-summary {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-left: 4px solid var(--gallery-sage);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.tldr-summary.tldr-portfolio {
    border-left-color: var(--gallery-navy);
}

.tldr-summary.tldr-artist {
    border-left-color: var(--gallery-sage);
}

.tldr-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}

.tldr-label {
    font-weight: 600;
}

.tldr-headline,
.tldr-summary .headline {
    font-family: var(--font-display), serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.tldr-takeaways {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.tldr-takeaways li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.tldr-takeaways li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--gallery-sage);
    font-weight: bold;
}

.tldr-insight {
    font-style: italic;
}

.tldr-bottom-line,
.tldr-summary .bottom-line {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.tldr-bottom-line i,
.tldr-summary .bottom-line i {
    color: var(--gallery-sage);
}

/* Dark mode adjustments */
[data-theme="dark"] .tldr-summary {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* ----------------------------------------
   ANALYSIS SECTION CARDS - Clean, Spacious
   ---------------------------------------- */
.analysis-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.analysis-section-header {
    background: var(--bg-tertiary);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.analysis-section-header h5 {
    font-family: var(--font-display), serif;
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.analysis-section-header h5 i {
    color: var(--gallery-sage);
}

.analysis-section-body {
    padding: 1.25rem;
}

[data-theme="dark"] .analysis-section {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .analysis-section-header {
    background: var(--bg-tertiary);
}

/* ----------------------------------------
   VERDICT CARD - Bold, Confident
   ---------------------------------------- */
.verdict-card {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.verdict-card.verdict-buy,
.verdict-card.verdict-strong-buy {
    border: 2px solid var(--gallery-sage);
}

.verdict-card.verdict-avoid,
.verdict-card.verdict-sell,
.verdict-card.verdict-pass {
    border: 2px solid var(--gallery-bronze);
}

.verdict-card.verdict-hold,
.verdict-card.verdict-watch {
    border: 2px solid var(--gallery-amber);
}

.verdict-header {
    padding: 1.5rem;
    text-align: center;
}

.verdict-header.verdict-buy,
.verdict-header.verdict-strong-buy {
    background: linear-gradient(135deg, rgba(107, 142, 127, 0.1), rgba(107, 142, 127, 0.05));
}

.verdict-header.verdict-avoid,
.verdict-header.verdict-sell,
.verdict-header.verdict-pass {
    background: linear-gradient(135deg, rgba(139, 111, 71, 0.1), rgba(139, 111, 71, 0.05));
}

.verdict-header.verdict-hold,
.verdict-header.verdict-watch {
    background: linear-gradient(135deg, rgba(201, 168, 106, 0.1), rgba(201, 168, 106, 0.05));
}

.verdict-title {
    font-family: var(--font-display), serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.verdict-confidence {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Dark mode verdict styling */
[data-theme="dark"] .verdict-card {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .verdict-header.verdict-buy {
    background: linear-gradient(135deg, rgba(122, 157, 142, 0.15), rgba(122, 157, 142, 0.08));
}

[data-theme="dark"] .verdict-header.verdict-avoid {
    background: linear-gradient(135deg, rgba(160, 133, 96, 0.15), rgba(160, 133, 96, 0.08));
}

/* ----------------------------------------
   METRICS GRID - Data Visualization Polish
   ---------------------------------------- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.metric-description {
    font-size: 0.6875rem;
    line-height: 1.3;
    color: var(--text-muted);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light, rgba(0, 0, 0, 0.05));
}

/* Metric with caveat styling (young portfolios) */
.metric-card.has-caveat {
    opacity: 0.8;
}

.metric-card.has-caveat .metric-value::after {
    content: '*';
    font-size: 0.75rem;
    vertical-align: super;
    color: var(--gallery-amber);
    margin-left: 2px;
}

.metric-caveat {
    font-size: 0.875rem;
}

[data-theme="dark"] .metric-card {
    background: var(--bg-tertiary);
}

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

/* ----------------------------------------
   COLLAPSIBLE SECTIONS - Elegant Interaction
   ---------------------------------------- */
.section-toggle {
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.section-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.collapsible-content.show,
.collapsible-content.expanded {
    max-height: none;
}

[data-theme="dark"] .section-toggle {
    border-color: var(--border-primary);
}

[data-theme="dark"] .section-toggle:hover {
    background: var(--bg-tertiary);
}

/* ----------------------------------------
   ALTERNATIVE ARTIST CARDS (AVOID verdicts)
   ---------------------------------------- */
.redirect-guidance {
    border-left: 4px solid var(--gallery-bronze);
}

.redirect-guidance .redirect-header {
    background: linear-gradient(135deg, rgba(139, 111, 71, 0.08), rgba(139, 111, 71, 0.04));
}

[data-theme="dark"] .redirect-guidance .redirect-header {
    background: linear-gradient(135deg, rgba(160, 133, 96, 0.12), rgba(160, 133, 96, 0.06));
}

.redirect-explanation {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.alternative-artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.alternative-artist-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.alternative-artist-card:hover {
    border-color: var(--gallery-sage);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.alternative-artist-card .artist-name {
    font-family: var(--font-display), serif;
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.alternative-artist-card .artist-rationale {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.alternative-artist-card .artist-price {
    margin-bottom: 0.75rem;
}

.alternative-artist-card .research-btn,
.research-btn {
    width: 100%;
    background: var(--gallery-sage);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.alternative-artist-card .research-btn:hover,
.research-btn:hover {
    background: var(--gallery-navy);
}

.reconsideration-note {
    border-top: 1px solid var(--border-primary);
    padding-top: 1rem;
}

[data-theme="dark"] .alternative-artist-card {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .alternative-artist-card:hover {
    border-color: var(--gallery-sage);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ----------------------------------------
   PORTFOLIO HEALTH INDICATOR
   ---------------------------------------- */
.health-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
    margin-left: auto;
}

.health-indicator.excellent {
    background: rgba(107, 142, 127, 0.15);
    color: var(--gallery-sage);
}

.health-indicator.strong {
    background: rgba(107, 142, 127, 0.1);
    color: var(--gallery-sage);
}

.health-indicator.good {
    background: rgba(201, 168, 106, 0.15);
    color: var(--gallery-amber);
}

.health-indicator.needs-attention {
    background: rgba(139, 111, 71, 0.15);
    color: var(--gallery-bronze);
}

.health-indicator.critical {
    background: rgba(155, 107, 107, 0.15);
    color: var(--status-risk);
}

[data-theme="dark"] .health-indicator.excellent,
[data-theme="dark"] .health-indicator.strong {
    background: rgba(122, 157, 142, 0.2);
    color: var(--gallery-sage);
}

[data-theme="dark"] .health-indicator.good {
    background: rgba(212, 184, 122, 0.2);
    color: var(--gallery-amber);
}

[data-theme="dark"] .health-indicator.needs-attention {
    background: rgba(160, 133, 96, 0.2);
    color: var(--gallery-bronze);
}

[data-theme="dark"] .health-indicator.critical {
    background: rgba(184, 136, 136, 0.2);
    color: var(--status-risk);
}

/* ----------------------------------------
   ACQUISITION MENTIONS (Portfolio slim view)
   ---------------------------------------- */
.acquisition-mentions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.acquisition-mention-card {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.acquisition-mention-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.acquisition-mention-card h6 {
    font-family: var(--font-display), serif;
    font-weight: 500;
    color: var(--text-primary);
}

[data-theme="dark"] .acquisition-mention-card {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .acquisition-mention-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Market Opportunities Link */
.market-opportunities-link {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-color: var(--border-primary) !important;
}

.market-opportunities-link .btn-primary {
    background: var(--gallery-sage);
    border-color: var(--gallery-sage);
}

.market-opportunities-link .btn-primary:hover {
    background: var(--gallery-navy);
    border-color: var(--gallery-navy);
}

/* ----------------------------------------
   TIMELINE SUMMARY
   ---------------------------------------- */
.timeline-summary {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--gallery-sage);
}

[data-theme="dark"] .timeline-summary {
    background: var(--bg-tertiary);
}

/* ----------------------------------------
   IMMEDIATE ACTIONS LIST
   ---------------------------------------- */
.immediate-actions-list {
    padding-left: 1.5rem;
}

.immediate-actions-list li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.immediate-actions-list li::marker {
    color: var(--gallery-sage);
    font-weight: bold;
}

/* ----------------------------------------
   RESPONSIVE ADJUSTMENTS FOR ANALYSIS
   ---------------------------------------- */
@media (max-width: 768px) {
    .tldr-summary {
        padding: 1.25rem;
    }

    .tldr-headline,
    .tldr-summary .headline {
        font-size: 1.125rem;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .metric-card {
        padding: 0.75rem;
    }

    .metric-value {
        font-size: 1.25rem;
    }

    .alternative-artists-grid {
        grid-template-columns: 1fr;
    }

    .acquisition-mentions-grid {
        grid-template-columns: 1fr;
    }

    .verdict-title {
        font-size: 1.5rem;
    }

    .analysis-section-body {
        padding: 1rem;
    }

    .health-indicator {
        display: none; /* Hide on mobile to reduce clutter */
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

/* ============================================
   DARK MODE - Follow-Up Analysis Styles
   ============================================ */

/* Modern follow-up container */
[data-theme="dark"] .followup-modern {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

/* Follow-up header */
[data-theme="dark"] .followup-header {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .followup-header h4,
[data-theme="dark"] .followup-header h5 {
    color: var(--text-primary);
}

/* Follow-up sections */
[data-theme="dark"] .followup-section {
    border-color: var(--border-primary);
}

[data-theme="dark"] .followup-section h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .section-body {
    color: var(--text-secondary);
}

[data-theme="dark"] .section-body h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .section-body p {
    color: var(--text-secondary);
}

/* Follow-up card (main container) */
[data-theme="dark"] .followup-card .card-header {
    background: var(--bg-tertiary);
    border-color: var(--gallery-amber);
}

[data-theme="dark"] .followup-card .card-header h5 {
    color: var(--text-primary);
}

/* Follow-up content sections */
[data-theme="dark"] .followup-content .section {
    border-color: var(--border-primary);
}

[data-theme="dark"] .followup-content h3 {
    color: var(--text-tertiary);
}

[data-theme="dark"] .followup-content h4 {
    color: var(--text-secondary);
}

/* Pitch card (elevator pitch box) */
[data-theme="dark"] .pitch-card {
    background: var(--bg-tertiary);
    border-left-color: var(--gallery-amber);
}

[data-theme="dark"] .pitch-text {
    color: var(--text-secondary);
}

[data-theme="dark"] .pitch-wrapper {
    background: transparent;
}

/* Conversation cards */
[data-theme="dark"] .conversation-card {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .conversation-card h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .conversation-card p {
    color: var(--text-secondary);
}

[data-theme="dark"] .conversation-cards {
    background: transparent;
}

/* Script text */
[data-theme="dark"] .script-text {
    background: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-secondary);
}

[data-theme="dark"] .script-text small.text-muted {
    color: var(--text-tertiary) !important;
}

/* Point cards */
[data-theme="dark"] .point-card {
    border-left-color: var(--gallery-sage);
}

[data-theme="dark"] .point-card h4 {
    color: var(--text-secondary);
}

[data-theme="dark"] .point-card p {
    color: var(--text-tertiary);
}

/* Example phrase boxes */
[data-theme="dark"] .example-phrase {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .example-phrase em {
    color: var(--text-secondary);
}

[data-theme="dark"] .example-response {
    color: var(--text-secondary);
}

/* Email wrapper and templates */
[data-theme="dark"] .email-wrapper {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .email-header {
    background: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .email-content {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

[data-theme="dark"] .email-template {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .subject-line {
    border-color: var(--border-primary);
    color: var(--text-secondary);
}

[data-theme="dark"] .email-body {
    color: var(--text-secondary);
}

[data-theme="dark"] .email-body p {
    color: var(--text-secondary);
}

[data-theme="dark"] .template-card h4 {
    color: var(--text-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .template-notes {
    color: var(--text-tertiary);
}

/* Pro tip boxes */
[data-theme="dark"] .pro-tip {
    background: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-secondary);
}

/* Timeline (acquisition steps) */
[data-theme="dark"] .timeline-horizontal {
    background: transparent;
}

[data-theme="dark"] .timeline-step {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .timeline-marker {
    background: var(--gallery-amber);
    color: var(--bg-primary);
}

[data-theme="dark"] .timeline-content {
    color: var(--text-secondary);
}

[data-theme="dark"] .timeline-content h6 {
    color: var(--text-primary);
}

/* Strategy grid and cards */
[data-theme="dark"] .strategy-grid {
    background: transparent;
}

[data-theme="dark"] .strategy-card {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .strategy-card h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .strategy-card p {
    color: var(--text-secondary);
}

[data-theme="dark"] .strategy-tip {
    color: var(--text-secondary);
}

/* Market info grid and cards */
[data-theme="dark"] .market-info-grid {
    background: transparent;
}

[data-theme="dark"] .market-info-card {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .market-info-card h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .market-info-card p {
    color: var(--text-secondary);
}

/* Market narrative boxes */
[data-theme="dark"] .market-narrative {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
    color: var(--text-secondary);
}

[data-theme="dark"] .connection-narrative {
    color: var(--text-secondary);
}

/* Questions list */
[data-theme="dark"] .questions-list {
    color: var(--text-secondary);
}

[data-theme="dark"] .questions-list li {
    color: var(--text-secondary);
}

[data-theme="dark"] .questions-list small.text-muted {
    color: var(--text-tertiary) !important;
}

/* Copy buttons */
[data-theme="dark"] .copy-btn {
    background: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-secondary);
}

[data-theme="dark"] .copy-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Icon colors in dark mode */
[data-theme="dark"] .icon-amber,
[data-theme="dark"] .icon-bronze {
    color: var(--gallery-amber);
}

[data-theme="dark"] .text-amber {
    color: var(--gallery-amber) !important;
}

[data-theme="dark"] .text-bronze {
    color: var(--gallery-bronze) !important;
}


/* ==========================================================================
   COLLECTION PAGE - COMPLETE REDESIGN
   Hybrid: Robinhood Investment Dashboard + Tier-1 Gallery Aesthetic
   ========================================================================== */

/* ---------------------------------------------------------------------
   COLLECTION COLOR SYSTEM
   --------------------------------------------------------------------- */
:root {
    /* Collection-specific accent colors */
    --accent-positive: #00c853;
    --accent-negative: #ff1744;
    --accent-positive-light: rgba(0, 200, 83, 0.1);
    --accent-negative-light: rgba(255, 23, 68, 0.1);

    /* Tier colors */
    --tier-bluechip: #1a1a2e;
    --tier-value: #6b8e7f;
    --tier-growth: #d4a853;
    --tier-discovery: #7c5295;
}

[data-theme="dark"] {
    --accent-positive: #00e676;
    --accent-negative: #ff5252;
    --accent-positive-light: rgba(0, 230, 118, 0.15);
    --accent-negative-light: rgba(255, 82, 82, 0.15);
}

/* ---------------------------------------------------------------------
   COLLECTION PAGE LAYOUT
   --------------------------------------------------------------------- */
.collection-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* NOTE: Collection header styles moved to unified page-header section below */

/* Help button inline with text */
.btn-help {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-help:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

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

/* =====================================================================
   UNIFIED PAGE HEADER - Premium Gallery Aesthetic

   Inspired by Gagosian, Pace, David Zwirner gallery websites combined
   with Bloomberg/Robinhood investment platforms.

   DESIGN PHILOSOPHY:
   - Dramatic scale: Large titles command attention like gallery wall text
   - Sophisticated spacing: Generous margins create luxury feel
   - Refined accents: Subtle gold/sage touches without garishness
   - Absolute positioning consistency: Title ALWAYS in same spot
   ===================================================================== */

/* Shared base for all page headers */
.page-header,
.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding: 1.5rem 0 2rem 0;
    background: transparent;
    border: none;
    position: relative;
}

/* Elegant bottom border with gradient fade */
.page-header::after,
.collection-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        var(--gallery-sage) 0%,
        var(--border-primary) 20%,
        var(--border-primary) 80%,
        transparent 100%);
    opacity: 0.6;
}

/* Title styling - dramatic gallery scale */
.page-header h1,
.collection-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 1.75rem + 1.75vw, 3rem);  /* Fluid gallery-scale heading */
    font-weight: 600;    /* Cormorant Garamond needs more weight for impact */
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.03em;  /* Tight tracking for elegance */
    line-height: 1.15;
    position: relative;
    padding-bottom: 0.75rem;
}

/* Signature sage accent bar - refined and proportional */
.page-header h1::before,
.collection-header h1::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gallery-sage), var(--gallery-amber));
    border-radius: 1.5px;
    opacity: 0.85;
}

/* Subtitle - gallery catalogue italic treatment */
.page-header .page-subtitle,
.collection-header p {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0.625rem 0 0 0;
    line-height: 1.6;
    max-width: 100%;  /* Allow full width within flex container */
    letter-spacing: 0.01em;
}

/* Utility: display font italic */
.text-display-italic {
    font-family: var(--font-display);
    font-style: italic;
}

/* Title container positioning */
.page-header > div:first-child,
.collection-header > div:first-child {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* Action buttons area - aligned to top right */
.page-header .page-actions,
.page-header .page-info,
.collection-header .header-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    flex-shrink: 0;
    padding-top: 0.5rem;  /* Align with title cap-height */
}

.page-header .page-info {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.625rem;
}

/* Info text styling */
.page-header .info-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* Premium button styling for headers */
.page-header .page-actions .btn,
.page-header .page-info .btn,
.collection-header .header-actions .btn {
    padding: 0.75rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Primary button - sage with subtle glow */
.page-header .page-actions .btn-primary,
.page-header .page-info .btn-primary,
.collection-header .header-actions .btn-primary {
    background: linear-gradient(135deg, var(--gallery-sage) 0%, #5a7d6e 100%);
    color: white;
    border: none;
    box-shadow:
        0 2px 4px rgba(107, 142, 127, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.08);
}

.page-header .page-actions .btn-primary:hover,
.page-header .page-info .btn-primary:hover,
.collection-header .header-actions .btn-primary:hover {
    background: linear-gradient(135deg, #5a7d6e 0%, #4a6d5e 100%);
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(107, 142, 127, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Outline button - sophisticated border */
.page-header .page-actions .btn-outline-primary,
.page-header .page-info .btn-outline-primary,
.collection-header .header-actions .btn-outline-primary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.page-header .page-actions .btn-outline-primary:hover,
.page-header .page-info .btn-outline-primary:hover,
.collection-header .header-actions .btn-outline-primary:hover {
    background: var(--bg-tertiary);
    border-color: var(--gallery-sage);
    color: var(--gallery-sage);
}

/* Secondary outline button */
.page-header .page-actions .btn-outline-secondary,
.collection-header .header-actions .btn-outline-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.page-header .page-actions .btn-outline-secondary:hover,
.collection-header .header-actions .btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

/* Title with inline badge support */
.page-header .page-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.page-header .page-title-wrapper h1 {
    padding-bottom: 0;
}

.page-header .page-title-wrapper h1::before {
    display: none;
}

/* Accent bar moves to wrapper when using title-wrapper */
.page-header .page-title-wrapper::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gallery-sage), var(--gallery-amber));
    border-radius: 1.5px;
    opacity: 0.85;
}

/* Small inline badges - refined with subtle gradients */
.page-header .title-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.4rem 0.875rem;
    border-radius: 100px;  /* Pill shape */
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.page-header .title-badge i {
    font-size: 0.625rem;
}

.page-header .title-badge.badge-success {
    background: linear-gradient(135deg, rgba(107, 142, 127, 0.1), rgba(107, 142, 127, 0.18));
    color: var(--gallery-sage);
    border: 1px solid rgba(107, 142, 127, 0.3);
}

.page-header .title-badge.badge-info {
    background: linear-gradient(135deg, rgba(201, 168, 106, 0.1), rgba(201, 168, 106, 0.18));
    color: var(--gallery-amber);
    border: 1px solid rgba(201, 168, 106, 0.3);
}

/* Responsive: elegant stacking on mobile */
@media (max-width: 768px) {
    .page-header,
    .collection-header {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
        padding: 1rem 0 1.5rem 0;
    }

    /* .page-header h1 size now handled by clamp() in base rule */

    .page-header .page-actions,
    .page-header .page-info,
    .collection-header .header-actions {
        align-self: flex-start;
        padding-top: 0;
    }

    .page-header .page-subtitle,
    .collection-header p {
        max-width: 100%;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .page-header {
    border-bottom-color: var(--border-primary);
}

[data-theme="dark"] .page-header .title-badge.badge-success {
    background: linear-gradient(135deg, rgba(122, 157, 142, 0.15), rgba(122, 157, 142, 0.25));
    color: #7a9d8e;
}

[data-theme="dark"] .page-header .title-badge.badge-info {
    background: linear-gradient(135deg, rgba(211, 178, 116, 0.15), rgba(211, 178, 116, 0.25));
    color: #d3b274;
}

/* =====================================================================
   VISION ANALYSIS CARDS - Gallery-Quality Grid
   Inspired by Artsy and 1stDibs artwork presentation
   ===================================================================== */

/* Grid layout for vision analysis */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Individual vision card - premium gallery aesthetic */
.vision-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--gallery-sage) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vision-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04);
    border-color: var(--gallery-sage);
}

.vision-card:hover::before {
    opacity: 0.8;
}

/* Thumbnail container - gallery-style presentation */
.vision-card .vision-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: linear-gradient(145deg,
        var(--bg-tertiary) 0%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 100%);
}

.vision-card .vision-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.vision-card:hover .vision-thumbnail img {
    transform: scale(1.04);
}

/* Placeholder icon when no image */
.vision-card .vision-thumbnail .placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--text-tertiary);
    opacity: 0.4;
}

/* Card body - refined information layout */
.vision-card .vision-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Artist name - uppercase gallery style */
.vision-card .vision-artist,
.vision-card h5.vision-artist {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.625rem 0;
    line-height: 1.3;
}

/* Confidence badge - refined pill design */
.vision-card .confidence-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.3rem 0.625rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.vision-card .confidence-badge.high {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.18));
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.vision-card .confidence-badge.medium {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(234, 179, 8, 0.18));
    color: #ca8a04;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.vision-card .confidence-badge.low {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.18));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Meta information */
.vision-card .vision-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-bottom: 0.875rem;
    line-height: 1.5;
}

/* Investment data - monospace for precision */
.vision-card .vision-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Badges row for investment grade and tier */
.vision-card .badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

/* Footer with date and actions */
.vision-card .vision-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vision-card .vision-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

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

.vision-card .vision-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

/* Dark mode refinements for vision cards */
[data-theme="dark"] .vision-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .vision-card:hover {
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .vision-card .confidence-badge.high {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.25));
    color: #4ade80;
}

[data-theme="dark"] .vision-card .confidence-badge.medium {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.25));
    color: #facc15;
}

[data-theme="dark"] .vision-card .confidence-badge.low {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.25));
    color: #f87171;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .vision-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .vision-card .vision-body {
        padding: 1.25rem;
    }
}

/* =====================================================================
   ENHANCED GLOBAL CARDS - Premium Elevation
   ===================================================================== */

/* Override Bootstrap cards with premium styling */
.card {
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    background: var(--bg-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    padding: 1.25rem 1.5rem;
    font-family: 'Inter', sans-serif;
}

.card-header h5,
.card-header .card-title {
    font-family: var(--font-display), Georgia, serif;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.card-header h5 i,
.card-header .card-title i {
    color: var(--gallery-sage);
    margin-right: 0.625rem;
}

.card-body {
    padding: 1.5rem;
}

/* Text utility classes for branded colors */
.text-sage { color: var(--gallery-sage) !important; }
.text-amber { color: var(--gallery-amber) !important; }
.text-bronze { color: var(--gallery-bronze) !important; }

/* =====================================================================
   DASHBOARD FEATURE CARDS - Enhanced hover for key dashboard sections
   Must use .card.dashboard-feature-card for higher specificity over .card
   ===================================================================== */
.card.dashboard-feature-card {
    border: 1px solid var(--border-primary) !important;
    border-radius: 12px !important;
    background: var(--bg-secondary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden;
}

.card.dashboard-feature-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--gallery-sage) !important;
}

/* Dark mode enhancement */
[data-theme="dark"] .card.dashboard-feature-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .card.dashboard-feature-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3) !important;
    border-color: var(--gallery-sage) !important;
}

/* =====================================================================
   DARK MODE UTILITY OVERRIDES - Fix bg-light in dark mode
   ===================================================================== */
/* Override Bootstrap bg-light for dark mode compatibility */
[data-theme="dark"] .bg-light {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Ensure all .card elements with bg-light sidebars work in dark mode */
[data-theme="dark"] .card .bg-light {
    background: var(--bg-tertiary) !important;
}

/* Fix inline bg-light backgrounds in modals */
[data-theme="dark"] .modal-body .bg-light {
    background: var(--bg-tertiary) !important;
}

/* =====================================================================
   MARKET TRENDS MODAL - Comprehensive Dark Mode Fixes
   The modal uses bg-light and text-muted which don't adapt to dark mode
   ===================================================================== */

/* Fix the sidebar card (col-md-3 with bg-light) */
[data-theme="dark"] #marketTrendsModal .card.bg-light {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

[data-theme="dark"] #marketTrendsModal .card.bg-light .card-body {
    background: transparent !important;
}

/* Fix ALL text-muted inside the modal */
[data-theme="dark"] #marketTrendsModal .text-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] #marketTrendsModal .small.text-muted {
    color: var(--text-tertiary) !important;
}

/* Fix headings inside bg-light containers */
[data-theme="dark"] #marketTrendsModal .bg-light h5,
[data-theme="dark"] #marketTrendsModal .bg-light h6 {
    color: var(--text-primary) !important;
}

/* Fix the dynamically generated stat cards (bg-light.rounded) */
[data-theme="dark"] #marketTrendsModal .bg-light.rounded {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-primary) !important;
}

[data-theme="dark"] #marketTrendsModal .bg-light.rounded .h4,
[data-theme="dark"] #marketTrendsModal .bg-light.rounded .h5 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] #marketTrendsModal .bg-light.rounded small {
    color: var(--text-secondary) !important;
}

/* Fix card headers with bg-transparent */
[data-theme="dark"] #marketTrendsModal .card-header.bg-transparent {
    background: transparent !important;
    border-bottom-color: var(--border-primary) !important;
}

[data-theme="dark"] #marketTrendsModal .card-header h6 {
    color: var(--text-primary) !important;
}

/* Fix list-group items in trending artists */
[data-theme="dark"] #marketTrendsModal .list-group-item {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] #marketTrendsModal .list-group-item h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] #marketTrendsModal .list-group-item small {
    color: var(--text-secondary) !important;
}

/* Fix progress bars */
[data-theme="dark"] #marketTrendsModal .progress {
    background: var(--bg-tertiary) !important;
}

/* Fix border classes */
[data-theme="dark"] #marketTrendsModal .border-top {
    border-top-color: var(--border-primary) !important;
}

[data-theme="dark"] #marketTrendsModal .border {
    border-color: var(--border-primary) !important;
}

/* Fix ALL h5/h6 elements - plain ones without color classes */
[data-theme="dark"] #marketTrendsModal h5,
[data-theme="dark"] #marketTrendsModal h6,
[data-theme="dark"] #marketTrendsModal .h5,
[data-theme="dark"] #marketTrendsModal .h6 {
    color: var(--text-primary) !important;
}

/* Fix card-title headings */
[data-theme="dark"] #marketTrendsModal .card-title {
    color: var(--text-primary) !important;
}

/* Fix segment analysis cards - the .border.rounded containers */
[data-theme="dark"] #marketTrendsModal .border.rounded {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] #marketTrendsModal .border.rounded small {
    color: var(--text-secondary) !important;
}

/* Fix dynamically generated cards in the modal */
[data-theme="dark"] #marketTrendsModal .card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] #marketTrendsModal .card .card-body {
    background: transparent !important;
}

[data-theme="dark"] #marketTrendsModal .card small {
    color: var(--text-secondary) !important;
}

/* Fix hover states for interactive elements that use hardcoded colors */
[data-theme="dark"] .list-group-item {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .list-group-item:hover {
    background: var(--bg-tertiary);
}

/* Fix list-group-item headings and text */
[data-theme="dark"] .list-group-item h4,
[data-theme="dark"] .list-group-item h5,
[data-theme="dark"] .list-group-item h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .list-group-item small {
    color: var(--text-secondary) !important;
}

/* =====================================================================
   MARKET ANALYSIS PAGE - Dark Mode Fixes
   Fix the default state welcome section and tool cards
   ===================================================================== */

/* Fix the welcome heading and subtitle */
[data-theme="dark"] #defaultState h4 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] #defaultState .text-muted {
    color: var(--text-secondary) !important;
}

/* Fix Quick Tips section */
[data-theme="dark"] #defaultState .border-top {
    border-top-color: var(--border-primary) !important;
}

[data-theme="dark"] #defaultState small.text-muted {
    color: var(--text-tertiary) !important;
}

/* Fix border class in dark mode */
[data-theme="dark"] .border {
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .border-0 {
    border-color: transparent !important;
}

/* Card headers with bg-transparent in dark mode */
[data-theme="dark"] .card-header.bg-transparent {
    background: transparent !important;
    border-bottom-color: var(--border-primary);
}

/* Progress bars in dark mode */
[data-theme="dark"] .progress {
    background: var(--bg-tertiary);
}

/* Form selects in dark mode */
[data-theme="dark"] .form-select {
    background-color: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .form-select:focus {
    background-color: var(--bg-primary);
    border-color: var(--gallery-sage);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(122, 157, 142, 0.15);
}

/* ---------------------------------------------------------------------
   PORTFOLIO DASHBOARD - Robinhood Style
   --------------------------------------------------------------------- */
.portfolio-dashboard {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-primary);
}

.coherence-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
    border: 1px solid var(--border-primary);
}

/* Hero Portfolio Value */
.portfolio-hero {
    margin-bottom: 2rem;
}

.portfolio-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.portfolio-value,
.coherence-card h3.portfolio-value {
    display: block;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.portfolio-change {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.125rem;
    font-weight: 500;
}

.portfolio-change.positive {
    color: var(--accent-positive);
}

.portfolio-change.negative {
    color: var(--accent-negative);
}

.portfolio-change .arrow {
    font-size: 1rem;
}

/* Divider */
.portfolio-divider {
    width: 80%;
    height: 1px;
    background: var(--border-primary);
    margin: 2rem auto;
}

/* Secondary Metrics Row */
.portfolio-metrics,
.coherence-card .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.metric,
.metric-card {
    text-align: center;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.metric-label,
.metric-card h6 {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.metric-value,
.metric-card h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.metric-value.positive {
    color: var(--accent-positive);
}

.metric-value.negative {
    color: var(--accent-negative);
}

/* Secondary metrics row - smaller, more subtle */
.portfolio-metrics.secondary {
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-primary);
}

.portfolio-metrics.secondary .metric-label {
    font-size: 0.6875rem;
}

.portfolio-metrics.secondary .metric-value {
    font-size: 1.125rem;
}

/* Remove old colored metric card backgrounds */
.metric-card.bg-sage,
.metric-card.bg-amber,
.metric-card.bg-bronze,
.metric-card.bg-rose-gold {
    background: transparent !important;
    color: var(--text-primary) !important;
}

.metric-card.bg-sage h3,
.metric-card.bg-amber h3,
.metric-card.bg-bronze h3,
.metric-card.bg-rose-gold h3,
.metric-card.bg-sage h6,
.metric-card.bg-amber h6,
.metric-card.bg-bronze h6,
.metric-card.bg-rose-gold h6 {
    color: inherit !important;
}

/* Allocation Bar */
.allocation-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    overflow: hidden;
    display: flex;
    margin-bottom: 1rem;
}

.allocation-segment {
    height: 100%;
    transition: width 0.5s ease;
}

.allocation-segment.bluechip { background: var(--tier-bluechip); }
.allocation-segment.value { background: var(--tier-value); }
.allocation-segment.growth { background: var(--tier-growth); }
.allocation-segment.discovery { background: var(--tier-discovery); }

.allocation-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.allocation-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.allocation-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Old allocation item styles - simplified */
.allocation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-primary);
    background: transparent;
    margin: 0;
}

.allocation-item:last-child {
    border-bottom: none;
}

/* Performance Cards - Minimal */
.performance-card {
    background: transparent;
    border: none;
    border-left: 3px solid var(--border-primary);
    padding: 1rem 1.25rem;
    text-align: left;
}

.performance-card.gains {
    border-left-color: var(--accent-positive);
}

.performance-card.losses {
    border-left-color: var(--accent-negative);
}

.performance-header {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.performance-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
}

.performance-value.text-success { color: var(--accent-positive); }
.performance-value.text-danger { color: var(--accent-negative); }

/* Top Performers - Minimal */
.performer-card {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    border: none;
    transition: all 0.2s ease;
}

.performer-card:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

/* ---------------------------------------------------------------------
   FILTER BAR - Minimal Text-Based
   --------------------------------------------------------------------- */
.filter-section,
.smart-filters {
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border: none;
}

/* ---------------------------------------------------------------------
   FILTER BAR - Modern Tab Style
   --------------------------------------------------------------------- */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-primary);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.filter-tab.active {
    color: var(--text-primary);
    background: var(--bg-primary);
    border-color: var(--border-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-tab .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.filter-tab .status-indicator.acquired {
    background: var(--accent-positive);
}

.filter-tab .status-indicator.watching {
    background: #f59e0b;
}

.filter-tab .status-indicator.sold {
    background: var(--gallery-sage);
}

.filter-tab .status-indicator.archived {
    background: var(--text-tertiary);
}

.tab-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    min-width: 1.5rem;
    text-align: center;
}

.filter-tab.active .tab-count {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* Segment chips */
.filter-segments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-primary);
}

.segment-chip {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.segment-chip:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 1px var(--border-primary);
}

.segment-chip.active {
    color: var(--bg-primary);
    background: var(--text-primary);
}

/* Legacy support */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.filter-pill,
.filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover,
.filter-btn:hover {
    color: var(--text-primary);
}

.filter-pill.active,
.filter-btn.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---------------------------------------------------------------------
   ARTWORK GRID - Gallery Style
   --------------------------------------------------------------------- */
.collection-grid,
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .collection-grid,
    .artwork-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------------
   ARTWORK CARD - Gallery Aesthetic
   --------------------------------------------------------------------- */
.artwork-item,
.artwork-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.artwork-item:hover,
.artwork-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Image Container - More specific selectors to override earlier global styles */
.artwork-card .artwork-image,
.artwork-card .artwork-image-wrapper,
.artwork-card .artwork-image-container,
.artwork-item .artwork-image,
.artwork-item .artwork-image-wrapper,
.artwork-item .artwork-image-container {
    position: relative;
    width: 100% !important;
    max-width: none !important;
    aspect-ratio: 4/5;
    min-height: 350px;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.artwork-card .artwork-image img,
.artwork-card .artwork-image-wrapper img,
.artwork-card .artwork-image-container img,
.artwork-item .artwork-image img,
.artwork-item .artwork-image-wrapper img,
.artwork-item .artwork-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.artwork-card:hover .artwork-image img,
.artwork-card:hover .artwork-image-wrapper img,
.artwork-card:hover .artwork-image-container img {
    transform: scale(1.03);
}

/* ====================================================================
   UNIFIED IMAGE PLACEHOLDER — .egon-placeholder
   Gallery-label-style fallback for missing artwork images.
   Fills parent container (never sets own height).
   ==================================================================== */

.egon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg,
        var(--bg-tertiary) 0%,
        var(--bg-secondary) 40%,
        var(--bg-tertiary) 100%);
    color: var(--text-tertiary);
    position: relative;
    overflow: hidden;
    text-align: center;
    gap: 0;
    z-index: 1; /* Below badges (z-index: 2) but above background */
}

/* Decorative radial gradient overlay — sage/amber gallery tints */
.egon-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(107, 142, 127, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 168, 83, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(150, 150, 150, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0; /* Behind badges/overlays */
}

[data-theme="dark"] .egon-placeholder::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(107, 142, 127, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 168, 83, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(150, 150, 150, 0.05) 0%, transparent 70%);
}

/* Position modifier — for padding-trick containers */
.egon-placeholder--absolute {
    position: absolute;
    inset: 0;
}

/* --- Icon (watermark) --- */
.egon-placeholder__icon {
    z-index: 1;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.egon-placeholder__icon i {
    font-size: 2.5rem;
    opacity: 0.15;
    color: var(--text-secondary);
}

/* --- Museum label --- */
.egon-placeholder__label {
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0 1.5rem;
    max-width: 90%;
}

.egon-placeholder__label-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.3;
    opacity: 0.7;
}

.egon-placeholder__label-artist {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.6;
}

.egon-placeholder__label-meta {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    opacity: 0.5;
}

.egon-placeholder__label-status {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    opacity: 0.4;
    margin-top: 0.25rem;
}

/* --- Size: Small (thumbnails, <=160px containers) --- */
.egon-placeholder--sm .egon-placeholder__icon {
    margin-bottom: 0.25rem;
}

.egon-placeholder--sm .egon-placeholder__icon i {
    font-size: 1.5rem;
}

.egon-placeholder--sm .egon-placeholder__label {
    display: none;
}

/* --- Size: Large (hero images, >=350px containers) --- */
.egon-placeholder--lg .egon-placeholder__icon i {
    font-size: 3.5rem;
}

.egon-placeholder--lg .egon-placeholder__label {
    padding: 0.5rem 2rem;
    gap: 0.35rem;
}

.egon-placeholder--lg .egon-placeholder__label-title {
    font-size: 1.05rem;
}

.egon-placeholder--lg .egon-placeholder__label-artist {
    font-size: 0.8rem;
}

.egon-placeholder--lg .egon-placeholder__label-meta {
    font-size: 0.75rem;
}

/* ====================================================================
   END UNIFIED IMAGE PLACEHOLDER
   ==================================================================== */

/* Old placeholder styles removed — now handled by unified .egon-placeholder component */

/* No-image state for container */
.artwork-card .artwork-image.no-image,
.artwork-item .artwork-image.no-image {
    position: relative;
    overflow: hidden;
}

.artwork-image.no-image img {
    display: none;
}

/* Discrete image info overlay (for images with content) */
.image-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.artwork-card:hover .image-info-overlay {
    opacity: 1;
}

.overlay-details {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.overlay-details span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Status Badge (top-left) - Acquisition status, fades in on hover */
/* IMPORTANT: Badge is now child of .artwork-card (not .artwork-image) to avoid overflow:hidden clipping */
.status-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 15;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.3s ease;
}

.artwork-card:hover .status-badge {
    opacity: 1;
    transform: translateY(0);
}

.status-badge i {
    font-size: 0.625rem;
}

.status-badge.status-acquired {
    background: linear-gradient(135deg, #dcfce7, #86efac);
    color: #166534;
}

.status-badge.status-watching {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    color: #92400e;
}

.status-badge.status-sold {
    background: linear-gradient(135deg, #e0e7ff, #a5b4fc);
    color: #3730a3;
}

/* Verdict Indicator (top-right) - Investment recommendation, fades in on hover */
/* IMPORTANT: Badge is now child of .artwork-card (not .artwork-image) to avoid overflow:hidden clipping */
.verdict-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 15;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.3s ease;
}

.artwork-card:hover .verdict-indicator {
    opacity: 1;
    transform: translateY(0);
}

.verdict-indicator i {
    font-size: 0.625rem;
}

/* Use attribute selectors to match compound verdicts like "buy-opportunistically" */
.verdict-indicator.verdict-buy,
.verdict-indicator.verdict-strong-buy,
.verdict-indicator[class*="verdict-buy"] {
    background: linear-gradient(135deg, #dcfce7, #86efac);
    color: #166534;
}

.verdict-indicator.verdict-hold,
.verdict-indicator[class*="verdict-hold"],
.verdict-indicator[class*="verdict-watch"] {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    color: #92400e;
}

.verdict-indicator.verdict-pass,
.verdict-indicator.verdict-sell,
.verdict-indicator.verdict-avoid,
.verdict-indicator[class*="verdict-pass"],
.verdict-indicator[class*="verdict-sell"],
.verdict-indicator[class*="verdict-avoid"] {
    background: linear-gradient(135deg, #fee2e2, #fca5a5);
    color: #991b1b;
}

.verdict-indicator.verdict-review,
.verdict-indicator[class*="verdict-review"] {
    background: linear-gradient(135deg, #e0e7ff, #a5b4fc);
    color: #3730a3;
}

/* Info Section Enhancements */
.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.artwork-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Price Row - Just price and change */
.price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

/* Segment + Actions Row - Actions left, segment badge right */
.segment-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
    min-height: 26px;
}

/* Inline Action Buttons - Hidden by default, slide in from left on hover */
.inline-actions {
    display: flex;
    gap: 0.375rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.artwork-card:hover .inline-actions {
    opacity: 1;
    transform: translateX(0);
}

.segment-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
    margin: 0;
}

/* Action Buttons - Icon + Text style */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 26px;
    padding: 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 5px;
    border: 1px solid var(--border-primary);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.action-btn i {
    font-size: 0.625rem;
}

/* Icon-only button (for delete) */
.action-btn-danger {
    width: 26px;
    padding: 0;
}

.action-btn-primary:hover {
    background: var(--gallery-sage);
    color: white;
    border-color: var(--gallery-sage);
}

.action-btn-success {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.action-btn-success:hover {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.action-btn-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.action-btn-warning:hover {
    background: var(--gallery-amber);
    color: white;
    border-color: var(--gallery-amber);
}

.action-btn-danger {
    margin-left: auto;
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.action-btn-danger:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Hover Overlay - Now removed from image area since actions moved to info section */
.artwork-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.artwork-card:hover .artwork-overlay {
    opacity: 1;
    pointer-events: auto;
}

.artwork-overlay .btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 11;
}

.artwork-overlay .btn-icon:hover {
    transform: scale(1.1);
    background: white;
}

/* Info Section */
.artwork-info,
.artwork-header-content {
    padding: 1.5rem;
}

.artist-name,
.artwork-artist {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    margin-bottom: 0.375rem;
}

.artwork-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.artwork-title {
    font-family: var(--font-display), Georgia, serif;
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.35;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.artwork-source-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.artwork-source-btn i {
    font-size: 0.625rem;
    margin-right: 0.25rem;
}

/* Price Row */
.artwork-meta,
.price-section {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.price,
.price-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.change,
.gain-loss-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.change.positive,
.gain-loss-badge.positive {
    color: var(--accent-positive);
    background: var(--accent-positive-light);
}

.change.negative,
.gain-loss-badge.negative {
    color: var(--accent-negative);
    background: var(--accent-negative-light);
}

/* Status Indicator - Small Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.acquired { background: var(--tier-value); }
.status-dot.watching { background: var(--tier-growth); }
.status-dot.sold { background: var(--accent-positive); }
.status-dot.archived { background: var(--text-tertiary); }

/* Archived State */
.artwork-card[data-status="archived"],
.artwork-card.archived {
    opacity: 0.5;
    filter: grayscale(0.5);
}

.artwork-card[data-status="archived"]:hover,
.artwork-card.archived:hover {
    opacity: 1;
    filter: grayscale(0);
}

/* Sold State */
.artwork-card[data-status="sold"] .price,
.artwork-card.sold .price-value {
    text-decoration: line-through;
    opacity: 0.6;
}

/* ---------------------------------------------------------------------
   HIDE OLD COMPLEX ELEMENTS (but keep new simplified ones)
   --------------------------------------------------------------------- */
.artwork-card-header,
.artwork-card-body,
.artwork-card-footer,
.analysis-insights,
.insight-row,
.quality-bar,
.quality-fill,
.alignment-badges,
.preference-matches,
.strategic-indicator {
    display: none !important;
}

/* ---------------------------------------------------------------------
   EMPTY STATE
   --------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-family: var(--font-display), serif;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ---------------------------------------------------------------------
   ANIMATIONS
   --------------------------------------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.artwork-card {
    animation: fadeInUp 0.4s ease-out both;
}

.artwork-card:nth-child(1) { animation-delay: 0.05s; }
.artwork-card:nth-child(2) { animation-delay: 0.1s; }
.artwork-card:nth-child(3) { animation-delay: 0.15s; }
.artwork-card:nth-child(4) { animation-delay: 0.2s; }
.artwork-card:nth-child(5) { animation-delay: 0.25s; }
.artwork-card:nth-child(6) { animation-delay: 0.3s; }

/* Number count up animation placeholder */
@keyframes countUp {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------------------------------------------------------------------
   COLLAPSIBLE ANALYTICS SECTION - Collection Page
   --------------------------------------------------------------------- */
.analytics-section {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.analytics-section .card-header.analytics-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 1rem 1.25rem;
    transition: background 0.2s ease;
}

.analytics-section .analytics-header:hover {
    background: var(--bg-tertiary);
}

.analytics-section .analytics-header h5 {
    font-family: var(--font-display), serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.analytics-section .analytics-toggle {
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.analytics-section [aria-expanded="true"] .analytics-toggle {
    transform: rotate(180deg);
}

.analytics-section .card-body.p-0 {
    padding: 0 !important;
}

/* Remove default card-body padding for analytics section to let inner content manage spacing */
.analytics-section > #analyticsContent > .card-body {
    padding: 0;
}

/* Text color for sage icon */
.text-sage {
    color: var(--gallery-sage) !important;
}

/* Dark mode adjustments */
[data-theme="dark"] .analytics-section {
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .analytics-section .analytics-header {
    background: var(--bg-tertiary);
}

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

/* ---------------------------------------------------------------------
   COHERENCE SECTION - Condensed & Balanced
   --------------------------------------------------------------------- */
.coherence-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-primary);
}

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

.coherence-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Coherence results layout */
.coherence-results .row {
    margin: 0 -0.5rem;
}

.coherence-results .row > [class*="col-"] {
    padding: 0 0.5rem;
}

/* Overall score - stacked layout with large score */
.overall-score-section {
    margin-bottom: 1rem;
}

.overall-score-section .coherence-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.overall-score-section .coherence-card h4 {
    font-size: 0.75rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.overall-score-section .score-display {
    margin: 0;
}

.overall-score-section .score-large {
    font-size: 3.5rem !important;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    line-height: 1;
}

.overall-score-section .coherence-card p {
    display: none;
}

/* Coherence cards - compact */
.coherence-card {
    padding: 1rem !important;
    margin-bottom: 0.75rem !important;
    border-radius: 10px !important;
}

.coherence-card h5,
.coherence-card h6 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Radar chart - sized for balance without vertical stretch */
.coherence-radar {
    max-width: 360px;
    margin: 0 auto;
    padding: 0.75rem 0;
}

.coherence-radar canvas {
    width: 100% !important;
    height: auto !important;
    min-height: 300px;
    max-height: 340px;
    aspect-ratio: 1 / 1;
}

/* Metrics - compact rows */
.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-row {
    display: grid;
    grid-template-columns: 120px 1fr 50px;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

.metric-row > span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.metric-row > span:first-child i {
    font-size: 0.625rem;
    opacity: 0.5;
    margin-left: 0.25rem;
}

.metric-visual {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

/* Smooth progress bar that accurately represents percentages */
.metric-progress-bar {
    width: var(--progress, 0%);
    height: 100%;
    background: var(--gallery-sage);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* Themes - compact */
.themes-section .coherence-card {
    padding: 0.75rem 1rem !important;
}

.theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.theme-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
}

.themes-section p {
    font-size: 0.6875rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
}

/* Next focus - compact */
.next-focus {
    margin-top: 0.75rem !important;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-primary);
}

.next-focus h6 {
    font-size: 0.6875rem !important;
    margin-bottom: 0.5rem !important;
}

.next-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.next-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.next-step-item i {
    margin-top: 0.125rem;
    color: var(--gallery-sage);
}

/* Loading state - compact */
.analysis-loading {
    padding: 1.5rem;
    text-align: center;
}

.analysis-loading p {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin: 0.5rem 0 0;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-primary);
    border-top-color: var(--gallery-sage);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Analysis status badge - compact */
.analysis-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.analysis-status .badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
}

/* Empty state for coherence */
.coherence-section.coherence-empty {
    padding: 1rem 1.5rem;
}

.coherence-empty .empty-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-tertiary);
}

.coherence-empty .empty-message i {
    font-size: 1.5rem;
    opacity: 0.4;
}

.coherence-empty .empty-message strong {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.coherence-empty .empty-message p {
    font-size: 0.75rem;
    margin: 0.125rem 0 0;
}

/* ---------------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   --------------------------------------------------------------------- */
@media (max-width: 992px) {
    .portfolio-metrics,
    .coherence-card .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .collection-page {
        padding: 1rem;
    }

    /* collection-header responsive handled in unified page-header section */

    .portfolio-value,
    .coherence-card h3.portfolio-value {
        font-size: 2.5rem;
    }

    .portfolio-metrics,
    .coherence-card .row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .collection-grid,
    .artwork-grid {
        gap: 1rem;
    }

    .artwork-info,
    .artwork-header-content {
        padding: 1rem;
    }

    .price,
    .price-value {
        font-size: 1.125rem;
    }

    .filter-row {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* ---------------------------------------------------------------------
   VISUALIZER METRICS - Prevent text wrapping in collection analytics
   --------------------------------------------------------------------- */
#visualizerMetrics .col-md-3 {
    min-width: 0;
}

#visualizerMetrics .h4 {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#visualizerMetrics .text-muted.small {
    white-space: nowrap;
}

/* On smaller screens, stack the metrics */
@media (max-width: 992px) {
    #visualizerMetrics .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    #visualizerMetrics .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ---------------------------------------------------------------------
   DARK MODE REFINEMENTS
   --------------------------------------------------------------------- */
[data-theme="dark"] .portfolio-dashboard,
[data-theme="dark"] .coherence-card,
[data-theme="dark"] .coherence-section {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .artwork-card {
    background: var(--bg-secondary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .artwork-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .artwork-overlay {
    background: rgba(0, 0, 0, 0.75);
}

[data-theme="dark"] .artwork-overlay .btn-icon {
    background: rgba(255, 255, 255, 0.9);
}

/* Dark mode badge adjustments handled by gradient backgrounds */

[data-theme="dark"] .performer-card {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .performer-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ---------------------------------------------------------------------
   NEXT ACTION BAR - Minimal
   --------------------------------------------------------------------- */
.next-action-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.next-action-bar .action-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.next-action-bar .action-content {
    flex: 1;
}

.next-action-bar .action-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.next-action-bar .action-description {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* NOTE: Modal styles consolidated into single section above (line ~1433) */

/* =====================================================================
   VISION ANALYSIS CARDS - Collection-Inspired with Compact Thumbnails
   Gallery-quality card aesthetics for image analysis results
   ===================================================================== */
.vision-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);  /* Subtle elevation */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.vision-card:hover {
    transform: translateY(-4px);  /* Gentle lift */
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);  /* Enhanced depth */
    border-color: var(--gallery-sage);  /* Sage accent on hover */
}

/* Compact thumbnail - optimized for browsing */
.vision-card .vision-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;  /* Compact landscape ratio */
    min-height: 180px;
    max-height: 220px;
    overflow: hidden;
    background: linear-gradient(160deg,
        var(--bg-tertiary) 0%,
        var(--bg-secondary) 40%,
        var(--bg-tertiary) 100%);  /* Collection-style gradient */
}

.vision-card .vision-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vision-card:hover .vision-thumbnail img {
    transform: scale(1.03);  /* Subtle zoom like Collection */
}

/* Image placeholder/loading state */
.vision-card .vision-thumbnail .placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--text-tertiary);
    opacity: 0.5;
}

/* Info section with investment data styling */
.vision-card .vision-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vision-card .vision-artist {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.vision-card .vision-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.vision-card .vision-meta {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

.vision-card .vision-value {
    font-family: 'JetBrains Mono', monospace;  /* Financial data styling */
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.vision-card .vision-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

/* Confidence badge with gradient like Collection status badges */
.vision-card .confidence-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.vision-card .confidence-badge.high {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.2));
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.vision-card .confidence-badge.medium {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.2));
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.vision-card .confidence-badge.low {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.2));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Action buttons in vision cards */
.vision-card .vision-actions {
    display: flex;
    gap: 0.5rem;
}

.vision-card .vision-actions .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Vision card date stamp */
.vision-card .vision-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Dark mode enhancements */
[data-theme="dark"] .vision-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .vision-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .vision-card .confidence-badge.high {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.25));
    color: #4ade80;
}

[data-theme="dark"] .vision-card .confidence-badge.medium {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.25));
    color: #fbbf24;
}

[data-theme="dark"] .vision-card .confidence-badge.low {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.25));
    color: #f87171;
}

/* Vision card grid layout */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .vision-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .vision-card .vision-thumbnail {
        min-height: 160px;
        max-height: 180px;
    }
}


/* ============================================
   VERDICT HERO - Information First Design
   Phase 2 Market Analysis Redesign
   ============================================ */

.verdict-hero {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* Full-width verdict banner */
.verdict-banner {
    padding: 2rem 2.5rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.verdict-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.verdict-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.verdict-badge i {
    font-size: 2rem;
}

.verdict-label {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-display), Georgia, serif;
    letter-spacing: 0.5px;
    color: inherit;
}

.verdict-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.confidence-pill,
.score-pill {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.confidence-pill i,
.score-pill i {
    font-size: 0.75rem;
    opacity: 1;
}

/* Summary Section */
.verdict-summary {
    padding: 2rem 2.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
}

/* No artwork image: collapse to single column and hide placeholder at all sizes */
.summary-grid.no-artwork-image {
    grid-template-columns: 1fr;
}
.summary-grid.no-artwork-image .summary-artwork > .egon-placeholder {
    display: none;
}
.summary-grid.no-artwork-image .quick-metrics-compact {
    max-width: 480px;
}

@media (max-width: 991px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    .summary-artwork {
        order: -1; /* Move artwork above on mobile */
    }
    .summary-grid.no-artwork-image .summary-artwork {
        order: 0; /* Don't reorder — keep below text */
    }
}

.summary-headline {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: var(--font-display), Georgia, serif;
    line-height: 1.4;
}

.summary-rationale {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.summary-rationale p {
    margin: 0;
}

/* Takeaways */
.verdict-takeaways {
    margin-bottom: 1.5rem;
}

.verdict-takeaways .takeaway-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.verdict-takeaways .takeaway-bullet {
    color: var(--gallery-sage);
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.verdict-takeaways .takeaway-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Bottom line */
.verdict-bottom-line {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(135, 169, 107, 0.2);
}

.verdict-bottom-line i {
    color: var(--gallery-sage);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.verdict-bottom-line span {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
}

/* Investment Callout */
.investment-callout {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(135, 169, 107, 0.1);
    border-left: 4px solid var(--gallery-sage);
    border-radius: 0 8px 8px 0;
    margin-top: 1.5rem;
}

.investment-callout i {
    color: var(--gallery-sage);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.investment-callout div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.investment-callout strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.investment-callout span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gallery-sage);
}

.investment-callout.investment-avoid {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: #ef4444;
}

.investment-callout.investment-avoid i {
    color: #ef4444;
}

.investment-callout.investment-avoid span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Featured Artwork Card */
.featured-artwork-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.artwork-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-tertiary);
}

.artwork-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-artwork-card:hover .artwork-image-wrapper img {
    transform: scale(1.03);
}

.artwork-overlay {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
}

.artwork-label {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.artwork-caption {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.artwork-caption strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.artwork-caption span {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

/* artwork-placeholder removed — now handled by .egon-placeholder */

/* Quick Metrics Compact */
.quick-metrics-compact {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

/* Verdict Actions */
.verdict-actions {
    padding: 1rem 2.5rem 1.5rem;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
    border-top: 1px solid var(--border-primary);
}

/* Verdict Action Groups - organized button groups */
.verdict-action-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.verdict-action-group .action-group-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.verdict-action-group .action-group-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.verdict-action-group .action-group-hint {
    color: var(--text-tertiary);
    opacity: 0.6;
    cursor: help;
    position: relative;
    font-size: 0.7rem;
    transition: opacity 0.2s ease;
}

.verdict-action-group .action-group-hint:hover {
    opacity: 1;
    color: var(--gallery-sage);
}

/* Fast-appearing tooltip for info hints */
.verdict-action-group .action-group-hint::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.95);
    color: white;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    white-space: normal;
    width: 220px;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.verdict-action-group .action-group-hint::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(30, 30, 30, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 1001;
}

.verdict-action-group .action-group-hint:hover::after,
.verdict-action-group .action-group-hint:hover::before {
    opacity: 1;
    visibility: visible;
}

.verdict-action-group .action-group-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Divider between action groups */
.action-group-divider {
    width: 1px;
    height: 48px;
    background: var(--border-primary);
    margin: 0 0.5rem;
    align-self: center;
}

/* Aesthetic Like/Dislike Buttons - More prominent styling */
.verdict-like-btn,
.verdict-dislike-btn,
.verdict-watchlist-btn,
.verdict-not-collecting-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border-width: 2px;
}

.verdict-like-btn i,
.verdict-dislike-btn i,
.verdict-watchlist-btn i,
.verdict-not-collecting-btn i {
    font-size: 0.9rem;
}

/* Hover states for better feedback */
.verdict-like-btn:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

.verdict-dislike-btn:hover {
    background: rgba(107, 114, 128, 0.1);
}

.verdict-watchlist-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gallery-amber);
}

.verdict-not-collecting-btn:hover {
    background: rgba(107, 114, 128, 0.1);
}

/* Active states for verdict buttons */
.verdict-like-btn.btn-success {
    background: var(--gallery-sage);
    border-color: var(--gallery-sage);
    color: white;
}

.verdict-dislike-btn.btn-secondary,
.verdict-not-collecting-btn.btn-secondary {
    background: var(--text-tertiary);
    border-color: var(--text-tertiary);
    color: white;
}

.verdict-watchlist-btn.btn-warning {
    background: var(--gallery-amber);
    border-color: var(--gallery-amber);
    color: white;
}

/* Track artwork button styling */
.verdict-track-btn {
    margin-left: auto;
}

.btn-outline-sage {
    border: 1px solid var(--gallery-sage);
    color: var(--gallery-sage);
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-outline-sage:hover {
    background: var(--gallery-sage);
    color: white;
    border-color: var(--gallery-sage);
}

.btn-outline-sage i {
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .verdict-banner {
        padding: 1.5rem;
        text-align: center;
    }

    .verdict-banner-content {
        flex-direction: column;
        align-items: center;
    }

    .verdict-badge {
        flex-direction: column;
        gap: 0.5rem;
    }

    .verdict-badge i {
        font-size: 1.75rem;
    }

    .verdict-label {
        font-size: 1.5rem;
    }

    .verdict-meta {
        justify-content: center;
    }

    .confidence-pill,
    .score-pill {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .verdict-summary {
        padding: 1.5rem;
    }

    .verdict-actions {
        padding: 1rem 1.5rem;
        justify-content: center;
        gap: 1rem;
        flex-direction: column;
    }

    .verdict-action-group {
        align-items: center;
        width: 100%;
    }

    .verdict-action-group .action-group-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .action-group-divider {
        width: 80%;
        height: 1px;
        margin: 0.5rem 0;
    }

    .verdict-track-btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    /* Hide tooltips on mobile - they don't work well */
    .verdict-actions [data-tooltip]::before,
    .verdict-actions [data-tooltip]::after {
        display: none;
    }

    .summary-headline {
        font-size: 1.2rem;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .verdict-hero {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .featured-artwork-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .investment-callout {
    background: rgba(135, 169, 107, 0.15);
}

[data-theme="dark"] .investment-callout.investment-avoid {
    background: rgba(239, 68, 68, 0.12);
}

/* ============================================
   GALLERY-STYLE REPRESENTATIVE WORKS
   Phase 3 Market Analysis Redesign
   ============================================ */

/* Section Header - Unified across all sections */
.section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gallery-sage), #5a7c42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(135, 169, 107, 0.25);
    flex-shrink: 0;
}

.section-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-family: var(--font-display), Georgia, serif;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0.25rem 0 0;
}

/* Representative Works Section */
.representative-works-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Works Grid */
.works-grid {
    display: grid;
    gap: 1.5rem;
}

.works-single {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin: 0 auto;
}

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

.works-multi {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

@media (max-width: 768px) {
    .works-double,
    .works-multi {
        grid-template-columns: 1fr;
    }

    .representative-works-section {
        padding: 1.5rem;
    }
}

/* Artwork Card - Scoped to Representative Works section (Market Analysis page)
   IMPORTANT: These styles are scoped to avoid conflict with collection page .artwork-card */
.representative-works-section .artwork-card {
    display: block;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid var(--border-primary);
}

.representative-works-section .artwork-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Image Container - Larger images for representative works
   IMPORTANT: Override generic .artwork-image-container { width: 180px } from line ~3860 */
.representative-works-section .artwork-card .artwork-image-container {
    position: relative;
    width: 100% !important;
    min-width: 100% !important;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--bg-primary);
    margin-bottom: 0;
    border-right: none;
}

/* Single work gets even larger display */
.works-single .artwork-card .artwork-image-container {
    aspect-ratio: 4/3;
    max-height: 450px;
}

.representative-works-section .artwork-card .artwork-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.representative-works-section .artwork-card:hover .artwork-image {
    transform: scale(1.05);
}

/* Hover Overlay */
.representative-works-section .artwork-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.representative-works-section .artwork-card:hover .artwork-hover-overlay {
    opacity: 1;
}

.expand-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 1.25rem;
    color: var(--gallery-obsidian);
    cursor: pointer;
    transition: all 0.2s ease;
}

.expand-btn:hover {
    transform: scale(1.1);
    background: white;
}

/* artwork-placeholder-elegant removed — now handled by .egon-placeholder */

/* Museum Badge */
.museum-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(4px);
}

/* Artwork Info - Scoped to Representative Works */
.representative-works-section .artwork-card .artwork-info {
    padding: 1.25rem;
}

.representative-works-section .artwork-card .artwork-title {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-display), Georgia, serif;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.representative-works-section .artwork-card .artwork-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.representative-works-section .artwork-card .artwork-location {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.representative-works-section .artwork-card .artwork-location i {
    font-size: 0.7rem;
}

.representative-works-section .artwork-card .artwork-significance {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-primary);
}

.representative-works-section .artwork-card .artwork-significance p {
    margin: 0;
}

/* ============================================
   LIGHTBOX
   ============================================ */

.artwork-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.artwork-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin-top: 1rem;
    text-align: center;
    color: white;
}

.lightbox-title {
    font-size: 1.1rem;
    font-family: var(--font-display), Georgia, serif;
    display: block;
    margin-bottom: 0.25rem;
}

.lightbox-year {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Dark mode adjustments - Scoped to Representative Works */
[data-theme="dark"] .representative-works-section .artwork-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .representative-works-section .artwork-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .representative-works-section {
    border-color: var(--border-secondary);
}

/* ============================================
   Investment Tier Badges - Gradient styling
   ============================================ */

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge.tier-blue-chip {
    background: linear-gradient(135deg, #1a1a2e, #2d3748);
    color: #e2e8f0;
}

.tier-badge.tier-value {
    background: linear-gradient(135deg, #2d4a3e, #3d6a4e);
    color: #d1fae5;
}

.tier-badge.tier-growth {
    background: linear-gradient(135deg, #8b6f47, #a67c52);
    color: #fef3c7;
}

.tier-badge.tier-discovery {
    background: linear-gradient(135deg, #4a4e69, #5c617a);
    color: #e9d5ff;
}

/* Tier badge variants for smaller contexts */
.tier-badge-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 4px;
}

/* Dark mode tier badge adjustments */
[data-theme="dark"] .tier-badge.tier-blue-chip {
    background: linear-gradient(135deg, #2d3748, #4a5568);
}

[data-theme="dark"] .tier-badge.tier-value {
    background: linear-gradient(135deg, #3d6a4e, #4a8a5e);
}

[data-theme="dark"] .tier-badge.tier-growth {
    background: linear-gradient(135deg, #a67c52, #c09060);
}

[data-theme="dark"] .tier-badge.tier-discovery {
    background: linear-gradient(135deg, #5c617a, #70758f);
}

/* ============================================
   Analysis History Table - Enhanced Design
   ============================================ */

.analysis-history-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-left i {
    color: var(--gallery-amber);
    font-size: 1.1rem;
}

.header-left h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Filter Chips */
.history-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-chip {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border-primary);
    background: transparent;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--gallery-sage);
    color: var(--gallery-sage);
}

.filter-chip.active {
    background: var(--gallery-sage);
    border-color: var(--gallery-sage);
    color: white;
}

/* Table Container */
.history-table-container {
    overflow-x: auto;
}

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

.history-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    font-weight: 500;
    white-space: nowrap;
}

.history-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-primary);
    font-size: 0.9rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.history-table tbody tr {
    transition: background-color 0.15s ease;
}

.history-table tbody tr:hover {
    background: rgba(135, 169, 107, 0.03);
}

/* Analysis Link Column */
.analysis-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.analysis-link:hover {
    color: var(--gallery-sage);
    text-decoration: none;
}

.analysis-link i {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.analysis-link.type-artist i {
    background: rgba(135, 169, 107, 0.15);
    color: var(--gallery-sage);
}

.analysis-link.type-portfolio i {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.analysis-link.type-opportunities i {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gallery-amber);
}

/* Trend Badges */
.trend-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.trend-badge.rising {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.trend-badge.stable {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.trend-badge.declining {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.trend-badge.opportunities {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gallery-amber);
}

.trend-badge.portfolio {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* Recommendation Badges */
.recommendation-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.recommendation-badge.success,
.recommendation-badge.opportunities {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.recommendation-badge.info,
.recommendation-badge.portfolio {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.recommendation-badge.warning {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.recommendation-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Confidence Bar */
.confidence-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confidence-track {
    width: 60px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.confidence-fill.high {
    background: var(--gallery-sage);
}

.confidence-fill.medium {
    background: #3b82f6;
}

.confidence-fill.low {
    background: var(--gallery-amber);
}

.confidence-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 32px;
}

/* Price Text */
.price-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Action Buttons - Market Analysis History Table (icon-only) */
.action-btns {
    display: flex;
    gap: 0.25rem;
}

.action-btns .action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0;
}

.action-btns .action-btn:hover {
    border-color: var(--gallery-sage);
    color: var(--gallery-sage);
}

.action-btns .action-btn.delete:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Pagination */
.history-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-primary);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-btn,
.page-num {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.page-btn:hover:not(:disabled),
.page-num:hover {
    border-color: var(--gallery-sage);
    color: var(--gallery-sage);
    text-decoration: none;
}

.page-num.active {
    background: var(--gallery-sage);
    border-color: var(--gallery-sage);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 0.5rem;
    color: var(--text-tertiary);
}

/* Empty State */
.history-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-tertiary);
}

.history-empty i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

.history-empty h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.history-empty p {
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .history-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-filters {
        flex-wrap: wrap;
    }

    .history-table .col-trend,
    .history-table .col-price {
        display: none;
    }

    .history-table td,
    .history-table th {
        padding: 0.75rem;
    }

    .history-pagination {
        flex-direction: column;
        align-items: center;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .analysis-history-card {
    border-color: var(--border-secondary);
}

[data-theme="dark"] .history-table tbody tr:hover {
    background: rgba(135, 169, 107, 0.05);
}

/* ===========================================
   Phase 8: Portfolio & Opportunities Styling
   =========================================== */

/* Portfolio Hero Section - flat, no card styling */
.portfolio-hero {
    margin-bottom: 2rem;
}

.portfolio-banner {
    padding: 2rem 2.5rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.portfolio-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.portfolio-badge i {
    font-size: 2rem;
}

.portfolio-status {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-display), serif;
    letter-spacing: 0.5px;
}

.portfolio-snapshot {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 400px;
    text-align: right;
}

.portfolio-summary-content {
    padding: 2rem 2.5rem;
}

.summary-insight h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-family: var(--font-display), serif;
    line-height: 1.4;
}

.summary-priority {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(135, 169, 107, 0.1);
    border-left: 4px solid var(--gallery-sage);
    border-radius: 0 8px 8px 0;
}

.summary-priority i {
    color: var(--gallery-sage);
    font-size: 1.25rem;
    margin-top: 0.15rem;
}

.summary-priority p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Enhanced Opportunities Grid */
.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.opportunity-card {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.opportunity-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.opportunity-card.featured {
    border: 2px solid var(--gallery-amber);
}

.opp-rank {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gallery-amber);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.opportunity-card.featured .opp-rank {
    background: linear-gradient(135deg, #d4af37, #f0c040);
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.opp-image-container {
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    overflow: hidden;
    position: relative;
}

.opp-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.opportunity-card:hover .opp-image-container img {
    transform: scale(1.05);
}

.opp-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.opp-placeholder i {
    font-size: 3.5rem;
    color: var(--text-tertiary);
    opacity: 0.4;
}

.opp-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.opp-artist {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-display), serif;
}

.opp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.urgency-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.urgency-badge.urgency-high,
.urgency-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.urgency-badge.urgency-medium,
.urgency-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.urgency-badge.urgency-low,
.urgency-badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.urgency-badge.secondary {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

/* Old opp-rationale with truncation - moved to opportunities-gallery section */

.opp-scores {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-primary);
}

.opp-scores .score-item {
    text-align: center;
    flex: 1;
}

.opp-scores .score-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.opp-scores .score-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.opp-allocation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: rgba(135, 169, 107, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--gallery-sage);
    font-weight: 500;
}

.opp-allocation i {
    font-size: 0.9rem;
}

.opp-action {
    width: 100%;
    padding: 0.85rem;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
}

.opp-action:hover {
    background: var(--gallery-sage);
    color: white;
}

/* Enhanced Executive Summary Styling */
.executive-summary-hero {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.exec-summary-banner {
    padding: 2rem 2.5rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.exec-banner-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exec-banner-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.exec-banner-title i {
    font-size: 2rem;
}

.exec-banner-title h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-display), Georgia, serif;
    letter-spacing: 0.5px;
    color: inherit;
}

.exec-banner-status {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* Multi-signal verdict meta (matches artist analysis verdict pattern) */
.exec-verdict-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.exec-verdict-pill {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.exec-verdict-pill i {
    font-size: 0.75rem;
    opacity: 1;
}

/* Responsive: stack pills on mobile */
@media (max-width: 768px) {
    .exec-verdict-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .exec-summary-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1rem;
    }

    .exec-banner-title h3 {
        font-size: 1.5rem;
    }

    .exec-banner-title i {
        font-size: 1.75rem;
    }
}

.exec-summary-content {
    padding: 2rem 2.5rem;
}

.exec-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.exec-metrics-3col {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .exec-metrics-3col {
        grid-template-columns: 1fr;
    }

    .exec-summary-content {
        padding: 1.5rem;
    }
}

.exec-metric-card {
    text-align: center;
    padding: 1.5rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.exec-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(107, 142, 127, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: var(--gallery-sage, #6b8e7f);
    font-size: 0.9rem;
}

.exec-metric-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.exec-metric-denominator {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-tertiary);
}

.exec-metric-value.positive {
    color: #22c55e;
}

.exec-metric-value.negative {
    color: #ef4444;
}

.exec-metric-value.neutral {
    color: var(--text-tertiary);
    font-size: 1.25rem;
}

.exec-metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.exec-metric-detail {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin-top: 0.5rem;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.exec-metric-bar {
    width: 80%;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.exec-metric-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.exec-metric-bar-fill.excellent {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.exec-metric-bar-fill.good {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.exec-metric-bar-fill.needs-attention {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.exec-health-bar {
    margin-bottom: 1.5rem;
}

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

.health-bar-header h6 {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
}

.health-score-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.health-bar-track {
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
}

.health-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.health-bar-fill.excellent {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.health-bar-fill.good {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.health-bar-fill.needs-attention {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.exec-findings {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-primary);
}

.exec-findings h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

.exec-findings ul {
    margin: 0;
    padding-left: 1.25rem;
}

.exec-findings li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Responsive adjustments for Portfolio & Opportunities */
@media (max-width: 768px) {
    .portfolio-banner {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    .portfolio-snapshot {
        text-align: center;
        max-width: 100%;
    }

    .portfolio-status {
        font-size: 1.5rem;
    }

    .portfolio-summary-content {
        padding: 1.5rem;
    }

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

}

/* Dark mode adjustments for Portfolio & Opportunities */
[data-theme="dark"] .opportunity-card,
[data-theme="dark"] .executive-summary-hero {
    border-color: var(--border-secondary);
}

[data-theme="dark"] .opp-placeholder {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.8), rgba(45, 45, 45, 0.6));
}

[data-theme="dark"] .summary-priority,
[data-theme="dark"] .opp-allocation {
    background: rgba(135, 169, 107, 0.08);
}

/* ============================================
   Analysis Timestamp Banner - Gallery Style
   ============================================ */
.analysis-timestamp-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    border-left: 3px solid var(--gallery-sage);
}

.analysis-timestamp-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.analysis-timestamp-info i {
    color: var(--gallery-sage);
    font-size: 1rem;
}

.analysis-timestamp-info .timestamp-label {
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    margin-right: 0.25rem;
}

.analysis-timestamp-info .timestamp-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.analysis-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--gallery-sage);
    border-radius: 6px;
    color: var(--gallery-sage);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.analysis-refresh-btn:hover {
    background: var(--gallery-sage);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(135, 169, 107, 0.25);
}

.analysis-refresh-btn i {
    font-size: 0.75rem;
}

/* Footer variant - for artist analysis at bottom of content */
.analysis-timestamp-banner.analysis-timestamp-footer {
    margin-top: 2rem;
    margin-bottom: 0;
    border-top: 1px solid var(--border-primary);
    border-radius: 0 0 10px 10px;
}

/* Dark mode adjustments */
[data-theme="dark"] .analysis-timestamp-banner {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.8) 0%, rgba(40, 40, 40, 0.6) 100%);
    border-color: var(--border-secondary);
}

/* Responsive */
@media (max-width: 576px) {
    .analysis-timestamp-banner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .analysis-timestamp-info {
        flex-direction: column;
        gap: 0.25rem;
    }

    .analysis-refresh-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Web Citations / Sources Section
   ============================================ */

.web-citations-section {
    border-color: var(--border-primary) !important;
}

.web-citations-toggle {
    font-size: 0.85rem;
    text-decoration: none !important;
    color: var(--text-tertiary) !important;
}

.web-citations-toggle:hover {
    color: var(--text-secondary) !important;
}

.web-citations-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.web-citations-section .citation-context {
    font-size: 0.8rem;
}

/* ============================================
   Follow-On Actions - Enhanced Styling
   ============================================ */

.follow-on-actions-enhanced {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

.follow-on-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.follow-on-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    width: 100%;
}

.follow-on-card:hover {
    border-color: var(--gallery-sage);
    background: rgba(135, 169, 107, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.follow-on-card.follow-on-primary {
    background: linear-gradient(135deg, rgba(135, 169, 107, 0.1) 0%, rgba(135, 169, 107, 0.05) 100%);
    border-color: rgba(135, 169, 107, 0.3);
}

.follow-on-card.follow-on-primary:hover {
    background: linear-gradient(135deg, rgba(135, 169, 107, 0.15) 0%, rgba(135, 169, 107, 0.08) 100%);
    border-color: var(--gallery-sage);
}

.follow-on-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gallery-sage), #5a8c42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(135, 169, 107, 0.25);
}

.follow-on-card.follow-on-primary .follow-on-icon {
    background: linear-gradient(135deg, var(--gallery-amber), #b8942a);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.follow-on-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.follow-on-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-display), Georgia, serif;
}

.follow-on-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.follow-on-arrow {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.follow-on-card:hover .follow-on-arrow {
    color: var(--gallery-sage);
    transform: translateX(4px);
}

/* Loading state for follow-on buttons */
.follow-on-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.follow-on-card.loading .follow-on-icon i {
    animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .follow-on-actions-enhanced {
        padding: 1.5rem;
    }

    .follow-on-buttons-grid {
        grid-template-columns: 1fr;
    }

    .follow-on-card {
        padding: 1rem 1.25rem;
    }

    .follow-on-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .follow-on-title {
        font-size: 0.95rem;
    }

    .follow-on-desc {
        font-size: 0.8rem;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .follow-on-actions-enhanced {
    border-color: var(--border-secondary);
}

[data-theme="dark"] .follow-on-card {
    border-color: var(--border-secondary);
}

[data-theme="dark"] .follow-on-card:hover {
    background: rgba(135, 169, 107, 0.08);
}

/* ============================================
   PORTFOLIO ANALYSIS RESTYLING
   Refined gallery meets sophisticated investment advisory
   Matches artist verdict-hero aesthetic
   ============================================ */

/* ============================================
   1. PORTFOLIO HERO SYSTEM
   ============================================ */

.portfolio-hero {
    /* No card styling - sits flat inside portfolio-dashboard container */
    background: transparent;
    margin-bottom: 1.5rem;
    text-align: center;
}

.portfolio-hero-banner {
    background: linear-gradient(135deg, #3d5a4c 0%, #6b8e7f 40%, #4a6b5f 70%, #2d4a3e 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.portfolio-hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.portfolio-hero-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.portfolio-hero-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.portfolio-verdict-badge {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-family: var(--font-display), Georgia, serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.portfolio-hero-metrics {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.portfolio-hero-metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.95;
}

.portfolio-hero-metric-label {
    opacity: 0.8;
}

.portfolio-hero-metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

/* ============================================
   2. SCORE CARDS GRID
   ============================================ */

.portfolio-scores-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

@media (max-width: 991px) {
    .portfolio-scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .portfolio-scores-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-hero-value {
        font-size: 2.25rem;
    }

    .portfolio-hero-metrics {
        gap: 1rem;
    }
}

.portfolio-score-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.portfolio-score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gallery-sage);
}

.portfolio-score-card:nth-child(1)::before { background: var(--gallery-sage, #6b8e7f); }
.portfolio-score-card:nth-child(2)::before { background: var(--gallery-amber, #c9a86a); }
.portfolio-score-card:nth-child(3)::before { background: #1a1a2e; }
.portfolio-score-card:nth-child(4)::before { background: #8b6f47; }

.portfolio-score-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.portfolio-score-card-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.875rem;
    background: rgba(107, 142, 127, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gallery-sage);
    font-size: 1rem;
}

.portfolio-score-card:nth-child(1) .portfolio-score-card-icon { color: var(--gallery-sage); background: rgba(107, 142, 127, 0.1); }
.portfolio-score-card:nth-child(2) .portfolio-score-card-icon { color: var(--gallery-amber); background: rgba(201, 168, 106, 0.1); }
.portfolio-score-card:nth-child(3) .portfolio-score-card-icon { color: #1a1a2e; background: rgba(26, 26, 46, 0.08); }
.portfolio-score-card:nth-child(4) .portfolio-score-card-icon { color: #8b6f47; background: rgba(139, 111, 71, 0.1); }

.portfolio-score-card-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gallery-sage);
    margin-bottom: 0.375rem;
    line-height: 1.2;
}

.portfolio-score-card-value.positive {
    color: var(--gallery-sage);
}

.portfolio-score-card-value.negative {
    color: #dc3545;
}

.portfolio-score-card-value.warning {
    color: var(--gallery-amber);
}

.portfolio-score-card-value.neutral {
    color: var(--text-secondary);
}

.portfolio-score-card-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.portfolio-score-card-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================
   3. SECTION HEADERS
   ============================================ */

.portfolio-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.portfolio-section-header {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--gallery-sage);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.portfolio-section-title {
    font-family: var(--font-display), Georgia, serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.portfolio-section-title i {
    color: var(--gallery-sage);
    font-size: 1rem;
}

.portfolio-section-badge {
    background: rgba(107, 142, 127, 0.12);
    color: var(--gallery-sage);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.portfolio-section-content {
    padding: 1.5rem;
}

.portfolio-section-subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-section-subtitle i {
    color: var(--gallery-sage);
}

/* ============================================
   4. DATA TABLES
   ============================================ */

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

.portfolio-table thead th {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    border-bottom: 2px solid var(--gallery-sage);
    text-align: left;
}

.portfolio-table thead th:first-child {
    border-top-left-radius: 8px;
}

.portfolio-table thead th:last-child {
    border-top-right-radius: 8px;
}

.portfolio-table tbody tr {
    transition: background 0.15s ease;
}

.portfolio-table tbody tr:hover {
    background: rgba(107, 142, 127, 0.04);
}

.portfolio-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    vertical-align: middle;
}

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

.portfolio-table .table-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: var(--text-primary);
}

.portfolio-table .table-value.positive {
    color: var(--gallery-sage);
}

.portfolio-table .table-value.negative {
    color: #dc3545;
}

.portfolio-table .table-segment {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   5. ALLOCATION BARS
   ============================================ */

.portfolio-allocation-cell {
    min-width: 140px;
}

.portfolio-allocation-bar {
    height: 8px;
    background: var(--border-primary);
    border-radius: 4px;
    overflow: visible;
    position: relative;
}

.portfolio-allocation-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.portfolio-allocation-fill.on-target {
    background: linear-gradient(90deg, var(--gallery-sage), #87a96b);
}

.portfolio-allocation-fill.underweight {
    background: linear-gradient(90deg, #dc3545, #e57373);
}

.portfolio-allocation-fill.overweight {
    background: linear-gradient(90deg, var(--gallery-amber), #d4af37);
}

.portfolio-allocation-target {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: var(--text-primary);
    border-radius: 1px;
}

.portfolio-allocation-target::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -3px;
    width: 8px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 50%;
}

.portfolio-allocation-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.375rem;
    font-size: 0.75rem;
}

.portfolio-allocation-target-label {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Works list tags in segment table */
.portfolio-works-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.portfolio-work-tag {
    display: inline-block;
    background: rgba(107, 142, 127, 0.1);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-work-more {
    display: inline-block;
    color: var(--gallery-sage);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.25rem;
}

/* ============================================
   6. AESTHETIC ANALYSIS
   ============================================ */

.portfolio-narrative-card {
    background: linear-gradient(135deg, rgba(107, 142, 127, 0.06), rgba(107, 142, 127, 0.02));
    border-left: 4px solid var(--gallery-sage);
    border-radius: 0 12px 12px 0;
    padding: 1.5rem 1.75rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.portfolio-narrative-card::before {
    content: '\201C';
    font-family: var(--font-display), Georgia, serif;
    font-size: 3.5rem;
    color: rgba(107, 142, 127, 0.2);
    position: absolute;
    top: 0.25rem;
    left: 0.75rem;
    line-height: 1;
}

.portfolio-narrative-text {
    font-family: var(--font-display), Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 1.75rem;
    margin: 0;
}

.portfolio-coherence-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--gallery-sage);
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
}

.portfolio-coherence-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gallery-sage);
}

.portfolio-coherence-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portfolio-theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-theme-tag {
    background: rgba(107, 142, 127, 0.12);
    color: var(--gallery-sage);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.portfolio-theme-tag.strength {
    background: rgba(107, 142, 127, 0.15);
    color: var(--gallery-sage);
}

.portfolio-theme-tag.opportunity {
    background: rgba(201, 168, 106, 0.15);
    color: var(--gallery-amber);
}

.portfolio-coherence-badge .coherence-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gallery-sage);
}

.portfolio-coherence-badge .coherence-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.portfolio-narrative-quote {
    font-family: var(--font-display), Georgia, serif;
    font-size: 4rem;
    color: rgba(107, 142, 127, 0.15);
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    line-height: 1;
}

.portfolio-curatorial-assessment {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

.portfolio-curatorial-assessment p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.portfolio-subsection-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

.portfolio-gap-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portfolio-gap-list li {
    position: relative;
    padding-left: 1.25rem;
    padding-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.portfolio-gap-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: var(--gallery-amber);
    border-radius: 50%;
}

.portfolio-gaps-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portfolio-gaps-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.portfolio-gaps-list li i {
    color: var(--gallery-amber);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* ============================================
   7. OPTIMIZATION PLAN
   ============================================ */

.portfolio-timeline {
    position: relative;
    padding-left: 1.75rem;
}

.portfolio-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--gallery-sage), var(--border-primary));
    border-radius: 1px;
}

.portfolio-timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
}

.portfolio-timeline-item:last-child {
    padding-bottom: 0;
}

.portfolio-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.375rem;
    width: 12px;
    height: 12px;
    background: var(--gallery-sage);
    border-radius: 50%;
    border: 3px solid var(--bg-secondary);
    box-shadow: 0 0 0 2px var(--gallery-sage);
}

.portfolio-timeline-item.immediate::before {
    background: var(--gallery-sage);
    box-shadow: 0 0 0 2px var(--gallery-sage);
}

.portfolio-timeline-item.medium-term::before {
    background: var(--gallery-amber);
    box-shadow: 0 0 0 2px var(--gallery-amber);
}

.portfolio-timeline-item.long-term::before {
    background: var(--gallery-bronze);
    box-shadow: 0 0 0 2px var(--gallery-bronze);
}

.portfolio-action-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.portfolio-action-card:hover {
    border-color: var(--gallery-sage);
    box-shadow: 0 4px 12px rgba(107, 142, 127, 0.1);
}

.portfolio-action-card.priority-high {
    border-left: 4px solid var(--gallery-sage);
}

.portfolio-action-card.priority-medium {
    border-left: 4px solid var(--gallery-amber);
}

.portfolio-action-card.priority-low {
    border-left: 4px solid var(--gallery-bronze);
}

.portfolio-action-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.portfolio-action-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-action-budget {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--gallery-sage);
    background: rgba(107, 142, 127, 0.12);
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.portfolio-action-rationale {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
}

.portfolio-priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    flex-shrink: 0;
}

.portfolio-priority-badge.high {
    background: rgba(107, 142, 127, 0.15);
    color: var(--gallery-sage);
}

.portfolio-priority-badge.medium {
    background: rgba(201, 168, 106, 0.15);
    color: var(--gallery-amber);
}

.portfolio-priority-badge.low {
    background: rgba(139, 111, 71, 0.15);
    color: var(--gallery-bronze);
}

/* Acquisition targets grid */
.portfolio-targets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

/* ============================================
   8. MARKET SIGNALS
   ============================================ */

.portfolio-signals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.portfolio-signal-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.portfolio-signal-card:hover {
    border-color: var(--gallery-sage);
    box-shadow: 0 4px 12px rgba(107, 142, 127, 0.08);
}

/* Artist card with avatar and signals */
.portfolio-signal-artist {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-primary);
}

.portfolio-signal-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--gallery-sage), #4a6b5f);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.portfolio-signal-artist-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.portfolio-signal-artist-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.3;
}

.portfolio-signal-count {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.portfolio-signal-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.portfolio-signal-item {
    padding: 0;
}

.portfolio-signal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.portfolio-signal-strength {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.strength-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-primary);
    transition: background 0.2s ease;
}

.strength-dot.active {
    background: var(--gallery-sage);
}

.portfolio-signal-type {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(107, 142, 127, 0.12);
    color: var(--gallery-sage);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.portfolio-signal-type i {
    font-size: 0.6rem;
}

.portfolio-signal-type.auction { background: rgba(212, 175, 55, 0.15); color: var(--gallery-amber); }
.portfolio-signal-type.museum { background: rgba(107, 142, 127, 0.15); color: var(--gallery-sage); }
.portfolio-signal-type.gallery { background: rgba(139, 111, 71, 0.15); color: var(--gallery-bronze); }
.portfolio-signal-type.show { background: rgba(156, 39, 176, 0.12); color: #9c27b0; }
.portfolio-signal-type.price { background: rgba(76, 175, 80, 0.15); color: #4caf50; }
.portfolio-signal-type.milestone { background: rgba(33, 150, 243, 0.12); color: #2196f3; }
.portfolio-signal-type.market { background: rgba(255, 152, 0, 0.12); color: #ff9800; }

.portfolio-signal-summary {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
}

.portfolio-signals-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-primary);
    text-align: center;
}

.portfolio-view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gallery-sage);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.portfolio-view-all-link:hover {
    color: var(--gallery-sage);
    gap: 0.75rem;
}

.portfolio-view-all-link i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.portfolio-view-all-link:hover i {
    transform: translateX(3px);
}

/* ============================================
   9. PERFORMANCE METRICS
   ============================================ */

.portfolio-performers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.portfolio-performer-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.portfolio-performer-card:hover {
    border-color: var(--gallery-sage);
}

.portfolio-performer-card.top-performer {
    border-left: 4px solid var(--gallery-sage);
}

.portfolio-performer-card.underperformer {
    border-left: 4px solid var(--gallery-amber);
}

.portfolio-performer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.portfolio-performer-artist {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 0;
}

.portfolio-performer-return {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.9rem;
}

.portfolio-performer-return.positive { color: var(--gallery-sage); }
.portfolio-performer-return.negative { color: #dc3545; }

.portfolio-performer-work {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.portfolio-performer-details {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.portfolio-performer-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   10. RISK ANALYSIS
   ============================================ */

.portfolio-risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.portfolio-risk-metric {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.portfolio-risk-metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gallery-sage);
    margin-bottom: 0.25rem;
}

.portfolio-risk-metric-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.portfolio-risk-assessment {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.portfolio-risk-assessment h6 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-risk-assessment h6 i {
    color: var(--gallery-sage);
}

.portfolio-risk-assessment p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   11. COLLECTION TRAJECTORY
   ============================================ */

.portfolio-stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--gallery-sage), #87a96b);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.portfolio-milestones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.portfolio-milestone {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.portfolio-milestone-icon {
    width: 32px;
    height: 32px;
    background: rgba(107, 142, 127, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gallery-sage);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.portfolio-milestone-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ============================================
   12. DARK MODE OVERRIDES
   ============================================ */

[data-theme="dark"] .portfolio-hero {
    /* No card styling - transparent on dark mode too */
    background: transparent;
}

[data-theme="dark"] .portfolio-hero-banner {
    background: linear-gradient(135deg, #5a7a6d, #3d5c4f);
}

[data-theme="dark"] .portfolio-score-card {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .portfolio-score-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .portfolio-narrative-card {
    background: linear-gradient(135deg, rgba(107, 142, 127, 0.1), rgba(107, 142, 127, 0.04));
}

[data-theme="dark"] .portfolio-action-card {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .portfolio-action-card:hover {
    box-shadow: 0 4px 12px rgba(107, 142, 127, 0.15);
}

[data-theme="dark"] .portfolio-signal-card {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .portfolio-signal-card:hover {
    box-shadow: 0 4px 12px rgba(107, 142, 127, 0.12);
}

[data-theme="dark"] .portfolio-table tbody tr:hover {
    background: rgba(107, 142, 127, 0.08);
}

[data-theme="dark"] .portfolio-performer-card,
[data-theme="dark"] .portfolio-risk-metric,
[data-theme="dark"] .portfolio-risk-assessment,
[data-theme="dark"] .portfolio-milestone {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .portfolio-section {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .portfolio-priority-badge.on-target {
    background: rgba(107, 142, 127, 0.2);
    color: #87a96b;
}

[data-theme="dark"] .portfolio-priority-badge.underweight {
    background: rgba(220, 53, 69, 0.2);
    color: #e57373;
}

[data-theme="dark"] .portfolio-priority-badge.overweight {
    background: rgba(201, 168, 106, 0.2);
    color: #d4af37;
}

[data-theme="dark"] .portfolio-allocation-bar {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .portfolio-work-tag {
    background: rgba(107, 142, 127, 0.15);
}

[data-theme="dark"] .strength-dot {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .strength-dot.active {
    background: #87a96b;
}

[data-theme="dark"] .portfolio-theme-tag.strength {
    background: rgba(107, 142, 127, 0.2);
}

[data-theme="dark"] .portfolio-theme-tag.opportunity {
    background: rgba(201, 168, 106, 0.2);
}

[data-theme="dark"] .portfolio-gap-list li::before {
    background: var(--gallery-amber);
}

/* ============================================
   13. PRINT STYLES
   ============================================ */

@media print {
    .portfolio-hero-banner {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .portfolio-score-card:hover,
    .portfolio-action-card:hover,
    .portfolio-signal-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ============================================
   14. MARKET OPPORTUNITIES GALLERY
   Museum catalog-inspired gallery layout
   ============================================ */

/* Gallery container - 2 column grid */
.opportunities-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 767px) {
    .opportunities-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Individual opportunity card */
.opportunity-gallery-card {
    background: var(--bg-secondary, #fff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-primary, #e5e5e5);
    transition: all 0.3s ease;
    position: relative;
}

.opportunity-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Hero image container */
.opp-hero-image-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    background: var(--bg-tertiary, #f8f9fa);
    overflow: hidden;
}

.opp-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.opportunity-gallery-card:hover .opp-hero-image {
    transform: scale(1.03);
}

/* opp-image-placeholder removed — now handled by .egon-placeholder */

/* Rank badge overlay */
.opp-rank-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 10; /* High z-index to ensure visibility above placeholder */
    backdrop-filter: blur(8px);
}

/* Segment tag overlay */
.opp-segment-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10; /* High z-index to ensure visibility above placeholder */
    backdrop-filter: blur(8px);
}

.opp-segment-tag.blue-chip {
    background: rgba(26, 35, 126, 0.9);
    color: #fff;
}

.opp-segment-tag.value {
    background: rgba(46, 125, 50, 0.9);
    color: #fff;
}

.opp-segment-tag.growth {
    background: rgba(245, 124, 0, 0.9);
    color: #fff;
}

.opp-segment-tag.discovery {
    background: rgba(156, 39, 176, 0.9);
    color: #fff;
}

/* Card content section */
.opp-card-content {
    padding: 1.25rem;
}

/* Artist name and title */
.opp-artist-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1e1e1e);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.opp-artwork-title {
    font-size: 0.9rem;
    color: var(--text-muted, #6c757d);
    font-style: italic;
    margin-bottom: 0.75rem;
}

/* Metrics bar */
.opp-metrics-bar {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-primary, #e5e5e5);
    border-bottom: 1px solid var(--border-primary, #e5e5e5);
    margin-bottom: 0.75rem;
}

.opp-metric {
    flex: 1;
    text-align: center;
}

.opp-metric-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1e1e1e);
}

.opp-metric-label {
    font-size: 0.7rem;
    color: var(--text-muted, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Investment score styling */
.opp-score {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.opp-score.score-high { color: #2e7d32; }   /* 8-10: green */
.opp-score.score-medium { color: #f57c00; } /* 6-7: amber */
.opp-score.score-low { color: #757575; }    /* <6: muted gray */

/* Rationale text with expand support */
.opp-rationale {
    font-size: 0.85rem;
    color: var(--text-secondary, #495057);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    position: relative;
}

/* Collapsed state - shows truncated text */
.opportunity-gallery-card:not(.expanded) .opp-rationale {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Auction context section */
.opp-auction-context {
    background: var(--bg-tertiary, #f8f9fa);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.opp-auction-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gallery-sage, #6B8E7B);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opp-auction-lot {
    font-size: 0.8rem;
    color: var(--text-secondary, #495057);
    padding: 0.25rem 0;
    border-bottom: 1px dashed var(--border-primary, #e5e5e5);
}

.opp-auction-lot:last-child {
    border-bottom: none;
}

/* Validation disclaimer */
.opp-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(201, 168, 106, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--gallery-amber, #C9A86A);
    margin-bottom: 1rem;
}

.opp-disclaimer i {
    color: var(--gallery-amber, #C9A86A);
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

.opp-disclaimer-text {
    font-size: 0.75rem;
    color: var(--text-secondary, #495057);
    line-height: 1.4;
}

/* Action buttons */
.opp-actions {
    display: flex;
    gap: 0.5rem;
}

.opp-action-btn {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.opp-action-btn.primary {
    background: var(--gallery-sage, #6B8E7B);
    color: #fff;
}

.opp-action-btn.primary:hover {
    background: #5a7a6a;
    transform: translateY(-1px);
}

.opp-action-btn.secondary {
    background: var(--bg-tertiary, #f8f9fa);
    color: var(--text-primary, #1e1e1e);
    border: 1px solid var(--border-primary, #e5e5e5);
}

.opp-action-btn.secondary:hover {
    background: var(--border-primary, #e5e5e5);
}

/* Dark mode styles */
[data-theme="dark"] .opportunity-gallery-card {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .opportunity-gallery-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .opp-hero-image-container {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .opp-artist-name {
    color: var(--text-primary);
}

[data-theme="dark"] .opp-auction-context {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .opp-disclaimer {
    background: rgba(201, 168, 106, 0.15);
}

[data-theme="dark"] .opp-action-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

/* ===========================================
   Expandable Opportunity Cards
   =========================================== */

/* Expand toggle button - prominent styling */
.opp-expand-toggle {
    background: var(--gallery-amber, #C9A86C);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    margin-top: 0.75rem;
    display: block;
    width: fit-content;
    min-width: 70px;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.opp-expand-toggle i {
    margin-left: 0.3rem;
    font-size: 0.7rem;
}

.opp-expand-toggle:hover {
    background: #b8956a;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Expanded details section - hidden by default */
.opp-expanded-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s ease,
                margin 0.5s ease,
                padding 0.5s ease;
    margin-top: 0;
    padding-bottom: 0;
}

/* Expanded state - increased max-height for full content */
.opportunity-gallery-card.expanded .opp-expanded-details {
    max-height: 1200px;
    overflow-y: auto;
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    padding-bottom: 1.25rem;
    border-top: 1px solid var(--border-primary, #e5e5e5);
}

.opportunity-gallery-card.expanded {
    z-index: 10;
}

/* Expanded section styling */
.opp-expanded-section {
    margin-bottom: 1rem;
}

.opp-expanded-section:last-child {
    margin-bottom: 0;
}

.opp-expanded-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gallery-sage, #6B8E7B);
    margin-bottom: 0.4rem;
}

.opp-investment-case {
    font-size: 0.85rem;
    color: var(--text-secondary, #495057);
    line-height: 1.6;
}

.opp-catalysts-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #495057);
}

.opp-catalysts-list li {
    margin-bottom: 0.3rem;
}

.opp-catalysts-list li:last-child {
    margin-bottom: 0;
}

.opp-availability-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #495057);
}

.opp-availability-details i {
    color: var(--gallery-sage, #6B8E7B);
    margin-right: 0.3rem;
}

.opp-target-allocation {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gallery-sage, #6B8E7B);
}

.opp-urgency {
    font-size: 0.85rem;
    color: var(--text-secondary, #495057);
    font-style: italic;
}

/* Dark mode for expanded content */
[data-theme="dark"] .opp-expanded-details {
    border-top-color: var(--border-primary);
}

[data-theme="dark"] .opp-expand-toggle {
    background: var(--gallery-amber, #C9A86C);
    color: #fff;
}

[data-theme="dark"] .opp-expand-toggle:hover {
    background: #d4b57a;
}

[data-theme="dark"] .opp-action-btn.secondary:hover {
    background: var(--border-primary);
}

/* ============================================
   GLOBAL AUTOCOMPLETE STYLING
   Applies to all jQuery UI autocomplete instances
   ============================================ */

/* Base autocomplete dropdown */
.ui-autocomplete {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-primary, rgba(0,0,0,0.08));
    border-radius: 12px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 6px;
    z-index: 10000 !important;
    margin-top: 4px;
    font-family: inherit;
    list-style: none;
}

/* Scrollbar styling for autocomplete */
.ui-autocomplete::-webkit-scrollbar {
    width: 6px;
}

.ui-autocomplete::-webkit-scrollbar-track {
    background: transparent;
}

.ui-autocomplete::-webkit-scrollbar-thumb {
    background: var(--border-primary, rgba(0,0,0,0.15));
    border-radius: 3px;
}

.ui-autocomplete::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary, #8a8a8a);
}

/* Individual menu items */
.ui-autocomplete .ui-menu-item {
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Menu item wrapper (the clickable area) */
.ui-autocomplete .ui-menu-item-wrapper {
    display: block;
    padding: 10px 14px 10px 32px;
    margin: 2px 0;
    border-radius: 8px;
    color: var(--text-primary, #0f0f0f);
    font-size: 0.9rem;
    font-weight: 450;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    position: relative;
}

/* Hover and active states */
.ui-autocomplete .ui-menu-item-wrapper.ui-state-active,
.ui-autocomplete .ui-menu-item-wrapper:hover {
    background: var(--bg-tertiary, #e9ecef);
    color: var(--text-primary, #0f0f0f);
    border: none;
    margin: 2px 0;
}

/* Highlight matched text */
.ui-autocomplete .ui-menu-item-wrapper strong {
    color: var(--gallery-sage, #6b8e7f);
    font-weight: 600;
}

/* No results message */
.ui-autocomplete .ui-state-disabled {
    padding: 12px 14px;
    text-align: center;
    color: var(--text-tertiary, #8a8a8a);
    font-size: 0.85rem;
    font-style: italic;
    cursor: default;
    opacity: 0.8;
}

.ui-autocomplete .ui-state-disabled:hover {
    background: transparent;
}

/* Artist icon indicator (optional enhancement) */
.ui-autocomplete .ui-menu-item-wrapper::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gallery-sage, #6b8e7f);
    opacity: 0.4;
    transition: opacity 0.15s ease;
}

.ui-autocomplete .ui-menu-item-wrapper.ui-state-active::before,
.ui-autocomplete .ui-menu-item-wrapper:hover::before {
    opacity: 1;
}

/* Loading indicator for input */
.artist-autocomplete.searching,
input.searching {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cstyle%3E.spinner %7B animation: rotate 1s linear infinite; transform-origin: center; %7D @keyframes rotate %7B from %7B transform: rotate(0deg); %7D to %7B transform: rotate(360deg); %7D %7D%3C/style%3E%3Ccircle class='spinner' cx='12' cy='12' r='8' fill='none' stroke='%236b8e7f' stroke-width='2' stroke-dasharray='40 60' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    padding-right: 40px !important;
}

/* Dark theme autocomplete styles */
[data-theme="dark"] .ui-autocomplete {
    background: var(--bg-secondary, #1a1a1a);
    border-color: var(--border-primary, rgba(255,255,255,0.1));
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .ui-autocomplete .ui-menu-item-wrapper {
    color: var(--text-primary, #e8e8e8);
}

[data-theme="dark"] .ui-autocomplete .ui-menu-item-wrapper.ui-state-active,
[data-theme="dark"] .ui-autocomplete .ui-menu-item-wrapper:hover {
    background: var(--bg-tertiary, #242424);
    color: var(--text-primary, #e8e8e8);
}

[data-theme="dark"] .ui-autocomplete .ui-menu-item-wrapper strong {
    color: #8ab09e;
}

[data-theme="dark"] .ui-autocomplete .ui-state-disabled {
    color: var(--text-tertiary, #808080);
}

[data-theme="dark"] .ui-autocomplete .ui-menu-item-wrapper::before {
    background: #8ab09e;
}

/* Rail-specific autocomplete overrides (market analysis sidebar) */
.artist-autocomplete-dropdown {
    min-width: 220px;
}

/* ============================================================================
   Phase 2 UI Enhancements - Museum Tier, Verdict Badges, Peer Positioning, Risk
   ============================================================================ */

/* Museum Tier Badges */
.badge.museum-tier1 {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

.badge.museum-tier2 {
    background: linear-gradient(135deg, #2d4a3e 0%, #3d5a4e 100%);
    color: white;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

.badge.museum-regional {
    background: linear-gradient(135deg, #4a4e69 0%, #5a5e79 100%);
    color: white;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

/* Alignment Verdict Badges */
.verdict-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.verdict-badge.verdict-corefit {
    background: rgba(107, 142, 127, 0.2);
    color: var(--gallery-sage);
    border: 2px solid var(--gallery-sage);
}

.verdict-badge.verdict-strongfit {
    background: rgba(201, 168, 106, 0.2);
    color: var(--gallery-amber);
    border: 2px solid var(--gallery-amber);
}

.verdict-badge.verdict-adjacent {
    background: rgba(74, 78, 105, 0.2);
    color: #6b7280;
    border: 2px solid #9ca3af;
}

.verdict-badge.verdict-aspirational {
    background: rgba(201, 168, 106, 0.15);
    color: var(--gallery-bronze);
    border: 2px solid var(--gallery-bronze);
}

.verdict-badge.verdict-misaligned {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 2px solid #dc2626;
}

/* Peer Comparison Section */
.peer-comparison-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
}

.peer-comparison-section h5 {
    color: var(--text-primary);
    font-weight: 600;
}

.peer-comparison-section .positioning-banner {
    border-radius: 8px;
    transition: all 0.2s ease;
}

.peer-comparison-section .comparable-artists .badge {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    font-weight: 500;
    padding: 0.4rem 0.8rem;
}

.peer-comparison-section .differentiation-note {
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Risk Assessment Section */
.risk-assessment-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
}

.risk-assessment-section h5 {
    color: var(--text-primary);
    font-weight: 600;
}

.risk-assessment-section .risk-score-display {
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.risk-assessment-section .risk-factors li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.risk-assessment-section .exit-strategy {
    border-radius: 8px;
}

/* Key Insights Quick Section */
.key-insights-quick {
    background: rgba(201, 168, 106, 0.08);
    border: 1px solid rgba(201, 168, 106, 0.2);
}

.key-insights-quick ul li {
    color: var(--text-secondary);
    line-height: 1.6;
}

.key-insights-quick .text-amber {
    color: var(--gallery-amber);
}

/* Dark Theme Overrides */
[data-theme="dark"] .museum-tier1,
[data-theme="dark"] .museum-tier2,
[data-theme="dark"] .museum-regional {
    opacity: 0.95;
}

[data-theme="dark"] .verdict-badge.verdict-corefit {
    background: rgba(107, 142, 127, 0.25);
}

[data-theme="dark"] .verdict-badge.verdict-strongfit {
    background: rgba(201, 168, 106, 0.25);
}

[data-theme="dark"] .verdict-badge.verdict-adjacent {
    background: rgba(74, 78, 105, 0.25);
}

[data-theme="dark"] .peer-comparison-section,
[data-theme="dark"] .risk-assessment-section {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .key-insights-quick {
    background: rgba(201, 168, 106, 0.12);
    border-color: rgba(201, 168, 106, 0.25);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .verdict-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .museum-tier1,
    .museum-tier2,
    .museum-regional {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}
