/* 
 * Nexus Benefit Solutions Design System for NexusHub
 * Forest & Rust color palette - Professional insurance aesthetic
 */

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */

:root {
    /* Nexus Brand Colors - Forest & Rust */
    --nexus-forest: #1F3D2E;
    --nexus-forest-light: #2A5240;
    --nexus-forest-dark: #162b20;
    --nexus-forest-muted: rgba(31, 61, 46, 0.1);
    
    /* Rust Accent Colors */
    --nexus-rust: #B8522A;
    --nexus-rust-light: #D4693F;
    --nexus-rust-dark: #9A4422;
    --nexus-rust-muted: rgba(184, 82, 42, 0.1);
    
    /* Sage & Neutral Colors */
    --nexus-sage: #7A9282;
    --nexus-pale-sage: #E8EBE4;
    --nexus-natural-white: #F5F0E8;
    --nexus-card-white: #FEFDFB;
    --nexus-charcoal: #2D2D2D;
    
    /* Legacy variable aliases for compatibility */
    --sbbmi-green: #1F3D2E;
    --sbbmi-green-light: #2A5240;
    --sbbmi-green-dark: #162b20;
    --sbbmi-green-muted: rgba(31, 61, 46, 0.1);
    
    /* Accent Colors - Updated for Nexus palette */
    --accent-blue: #6b8eb3;
    --accent-blue-muted: rgba(107, 142, 179, 0.08);
    --accent-orange: #D4693F;
    --accent-orange-muted: rgba(212, 105, 63, 0.08);
    --accent-purple: #7A9282;
    --accent-purple-muted: rgba(122, 146, 130, 0.08);
    --accent-yellow: #c4b5a0;
    --accent-yellow-muted: rgba(196, 181, 160, 0.08);
    --accent-red: #B8522A;
    --accent-red-muted: rgba(184, 82, 42, 0.15);
    
    /* Typography - DM Sans / DM Serif Display */
    --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    --font-family-serif: 'DM Serif Display', Georgia, serif;
    --line-height-base: 1.6;
    --line-height-tight: 1.3;
    --letter-spacing-header: 0.02em;
    --letter-spacing-nav: 0.015em;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Typography Scale — consolidated from 20+ arbitrary sizes */
    --text-xs: 0.7rem;
    --text-sm: 0.8rem;
    --text-base: 0.875rem;
    --text-md: 1rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: 2.5rem;
    --text-4xl: 3rem;
    
    /* Border Radius — consolidated from 13 arbitrary values */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;
    --radius-circle: 50%;
    --radius-card: 12px;
    --radius-modal: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.16);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
    
    /* Transitions — consolidated from 4 different speeds */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Z-Index Scale — consolidated from 14 arbitrary values */
    --z-dropdown: 100;
    --z-sticky: 1000;
    --z-navbar: 1030;
    --z-sidebar: 1040;
    --z-modal-backdrop: 1050;
    --z-modal: 1060;
    --z-toast: 9998;
}

/* Light Theme Colors - Nexus Warm Cream */
[data-bs-theme="light"] {
    --bg-primary: #F5F0E8;
    --bg-secondary: #F5F0E8;
    --bg-tertiary: #E8EBE4;
    
    --text-primary: #1F3D2E;
    --text-secondary: #2D2D2D;
    --text-tertiary: #7A9282;
    --text-muted: #9ca3af;
    
    --border-primary: #E8EBE4;
    --border-secondary: #E8EBE4;
    
    --hover-bg: rgba(31, 61, 46, 0.04);
    --divider: rgba(31, 61, 46, 0.08);
}

/* Dark Theme Colors - Dark Gray with Forest Accents */
[data-bs-theme="dark"] {
    --bg-primary: #1e2a24;
    --bg-secondary: #1a1f1c;
    --bg-tertiary: #141817;
    
    --text-primary: #FAFAF8;
    --text-secondary: #E8EBE4;
    --text-tertiary: #8a9990;
    --text-muted: #5f6b63;
    
    --border-primary: #2d3a33;
    --border-secondary: #252e29;
    
    --hover-bg: rgba(255, 255, 255, 0.05);
    --divider: rgba(255, 255, 255, 0.08);
    
    --nexus-card-white: #1e2a24;
    --nexus-pale-sage: #2d3a33;
    --nexus-charcoal: #c8ceca;
    --nexus-natural-white: #1a1f1c;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

body {
    font-family: var(--font-family);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[data-bs-theme="light"] body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-bs-theme="light"] a:not(.btn):not(.btn-claude-primary):not(.btn-claude-secondary):not(.btn-claude-outline):not(.btn-claude-danger):not(.btn-claude-warning):not(.claude-btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand) {
    color: var(--nexus-forest) !important;
}

[data-bs-theme="light"] a:not(.btn):not(.btn-claude-primary):not(.btn-claude-secondary):not(.btn-claude-outline):not(.btn-claude-danger):not(.btn-claude-warning):not(.claude-btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand):hover {
    color: var(--nexus-rust) !important;
}

/* Status Badge Color Overrides */
[data-bs-theme="light"] .badge.bg-success {
    background-color: #1F3D2E !important;
    color: #FAFAF8 !important;
}

[data-bs-theme="light"] .badge.bg-danger {
    background-color: #dc3545 !important;
    color: #FAFAF8 !important;
}

[data-bs-theme="light"] .badge.bg-warning {
    background-color: #e67e22 !important;
    color: #FAFAF8 !important;
}

[data-bs-theme="light"] .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #FAFAF8 !important;
}

[data-bs-theme="light"] .badge.bg-info {
    background-color: #5b6abf !important;
    color: #FAFAF8 !important;
}

[data-bs-theme="light"] .badge.bg-primary {
    background-color: #1F3D2E !important;
    color: #FAFAF8 !important;
}

[data-bs-theme="light"] .table a {
    color: var(--nexus-forest) !important;
    font-weight: 600;
}

[data-bs-theme="light"] .table a:hover {
    color: var(--nexus-rust) !important;
}

[data-bs-theme="light"] .text-info {
    color: var(--nexus-forest) !important;
}

[data-bs-theme="light"] .text-primary {
    color: var(--nexus-forest) !important;
}

[data-bs-theme="light"] .nav-tabs .nav-link.active {
    color: var(--nexus-forest) !important;
    border-bottom-color: var(--nexus-forest) !important;
    font-weight: 600;
}

[data-bs-theme="light"] .nav-tabs .nav-link:hover {
    color: var(--nexus-rust) !important;
}

[data-bs-theme="dark"] body {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ============================================
   DARK MODE — COMPREHENSIVE OVERRIDES
   ============================================ */

[data-bs-theme="dark"] .main-content .card,
[data-bs-theme="dark"] .main-content .data-card,
[data-bs-theme="dark"] .main-content .info-card {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-primary) !important;
}

[data-bs-theme="dark"] .main-content .card-header,
[data-bs-theme="dark"] .main-content .info-card .card-header {
    background-color: var(--bg-primary) !important;
    border-bottom-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .main-content .card-header *,
[data-bs-theme="dark"] .main-content .card-header h5,
[data-bs-theme="dark"] .main-content .card-header h6,
[data-bs-theme="dark"] .main-content .card-header .mb-0,
[data-bs-theme="dark"] .main-content .card-header .section-title {
    color: var(--text-primary) !important;
}

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

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

[data-bs-theme="dark"] .main-content .card.bg-body-secondary,
[data-bs-theme="dark"] .main-content .bg-body-secondary {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-primary) !important;
}

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

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

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

[data-bs-theme="dark"] .contact-info i,
[data-bs-theme="dark"] .address-info i,
[data-bs-theme="dark"] .business-info i,
[data-bs-theme="dark"] .targeting-info i,
[data-bs-theme="dark"] .owner-info i {
    color: var(--text-tertiary) !important;
}

[data-bs-theme="dark"] .main-content .table {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .main-content .table thead th {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-primary) !important;
}

[data-bs-theme="dark"] .main-content .table td {
    border-color: var(--border-primary) !important;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .main-content .table tbody tr:hover {
    background-color: var(--hover-bg) !important;
}

[data-bs-theme="dark"] .main-content .table a {
    color: #6dbf8b !important;
}

[data-bs-theme="dark"] .main-content .table a:hover {
    color: #D4693F !important;
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand) {
    color: #6dbf8b !important;
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand):hover {
    color: #D4693F !important;
}

[data-bs-theme="dark"] .main-content .form-control,
[data-bs-theme="dark"] .main-content .form-select {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .main-content .form-control::placeholder {
    color: var(--text-muted) !important;
}

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

[data-bs-theme="dark"] .main-content .form-check-input {
    background-color: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-bs-theme="dark"] .main-content .form-check-input:checked {
    background-color: #2A5240;
    border-color: #2A5240;
}

[data-bs-theme="dark"] .main-content .input-group-text {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-tertiary) !important;
}

[data-bs-theme="dark"] .main-content .list-group-item {
    background-color: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .main-content .list-group-item:hover {
    background-color: var(--hover-bg);
}

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

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

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

[data-bs-theme="dark"] .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

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

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

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

[data-bs-theme="dark"] .nexus-table thead th {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
}

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

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

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

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

[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: var(--border-primary) !important;
}

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

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    color: #6dbf8b !important;
    border-bottom-color: #6dbf8b !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .badge.bg-success {
    background-color: #2A5240 !important;
}

[data-bs-theme="dark"] .badge.bg-info {
    background-color: #3b4f8a !important;
}

[data-bs-theme="dark"] .badge.bg-secondary {
    background-color: #3a4540 !important;
}

[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, [data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6 {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .text-success {
    color: #6dbf8b !important;
}

[data-bs-theme="dark"] .text-warning {
    color: #e0a458 !important;
}

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

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

[data-bs-theme="dark"] hr {
    border-color: var(--border-primary);
    opacity: 0.5;
}

[data-bs-theme="dark"] .alert-info {
    background-color: rgba(59, 79, 138, 0.15) !important;
    border-color: rgba(59, 79, 138, 0.3) !important;
    color: #8aa4d0 !important;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(224, 164, 88, 0.15) !important;
    border-color: rgba(224, 164, 88, 0.3) !important;
    color: #e0a458 !important;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(42, 82, 64, 0.3) !important;
    border-color: rgba(42, 82, 64, 0.5) !important;
    color: #6dbf8b !important;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(184, 82, 42, 0.15) !important;
    border-color: rgba(184, 82, 42, 0.3) !important;
    color: #e08a6a !important;
}

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

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #2A5240 !important;
    border-color: #2A5240 !important;
}

[data-bs-theme="dark"] .breadcrumb-item a {
    color: #6dbf8b !important;
}

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

[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted) !important;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */

.claude-card,
.data-card,
.card {
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-card);
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
    overflow: hidden; /* Clip content at rounded corners */
}

.claude-card:hover,
.data-card:hover,
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.data-card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-primary);
    font-weight: 600;
    font-size: 0.938rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.data-card-body {
    padding: var(--space-lg);
}

/* Metric Cards - see detailed styles in METRIC CARDS section below */

.metric-label {
    font-size: 0.813rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
    color: var(--text-tertiary);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.metric-value.revenue-accent {
    color: var(--sbbmi-green);
}

[data-bs-theme="dark"] .metric-value.revenue-accent {
    color: var(--sbbmi-green-light);
}

.metric-description {
    font-size: 0.813rem;
    color: var(--text-tertiary);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-claude-primary {
    background-color: var(--sbbmi-green-light);
    color: white;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.4rem 1rem;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-claude-primary:hover {
    background-color: var(--sbbmi-green);
    color: white;
}

[data-bs-theme="dark"] .btn-claude-primary {
    background-color: var(--sbbmi-green-light);
    color: var(--bg-secondary);
}

[data-bs-theme="dark"] .btn-claude-primary:hover {
    background-color: var(--sbbmi-green);
    color: white;
}

.btn-claude-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.btn-claude-secondary:hover {
    background-color: var(--hover-bg);
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

/* Rust Accent Button - Call to Action */
.btn-rust,
.btn-claude-accent {
    background-color: var(--nexus-rust);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.btn-rust:hover,
.btn-claude-accent:hover {
    background-color: var(--nexus-rust-dark);
    color: white;
}

[data-bs-theme="dark"] .btn-rust,
[data-bs-theme="dark"] .btn-claude-accent {
    background-color: var(--nexus-rust-light);
    color: white;
}

[data-bs-theme="dark"] .btn-rust:hover,
[data-bs-theme="dark"] .btn-claude-accent:hover {
    background-color: var(--nexus-rust);
    color: white;
}

/* Rust Outline Button - for delete/destructive actions */
.btn-rust-outline {
    background-color: transparent;
    color: var(--nexus-rust);
    border: 2px solid var(--nexus-rust);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.125rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-rust-outline:hover {
    background-color: var(--nexus-rust);
    color: white;
}

[data-bs-theme="dark"] .btn-rust-outline {
    color: var(--nexus-rust-light);
    border-color: var(--nexus-rust-light);
}

[data-bs-theme="dark"] .btn-rust-outline:hover {
    background-color: var(--nexus-rust-light);
    color: white;
}

/* Outline variant */
.btn-claude-outline {
    background-color: transparent;
    color: var(--nexus-forest);
    border: 1px solid var(--nexus-forest);
    border-radius: var(--radius-sm);
    padding: 0.4rem 1rem;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-claude-outline:hover {
    background-color: var(--nexus-forest-light);
    color: white;
}

[data-bs-theme="dark"] .btn-claude-outline {
    color: var(--nexus-pale-sage);
    border-color: var(--nexus-pale-sage);
}

[data-bs-theme="dark"] .btn-claude-outline:hover {
    background-color: var(--nexus-pale-sage);
    color: var(--nexus-forest);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.section-header {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
    color: var(--sbbmi-green);
}

[data-bs-theme="dark"] .section-header {
    color: var(--sbbmi-green-light);
}

h1, h2, h3, h4, h5, h6 {
    line-height: var(--line-height-tight);
    font-weight: 600;
    color: var(--text-primary);
}

h1, h2, h3, .h1, .h2, .h3 {
    font-family: var(--font-family-serif);
    font-weight: 400;
}

h4, h5, h6, .h4, .h5, .h6 {
    font-family: var(--font-family);
    font-weight: 600;
}

.page-title {
    font-family: var(--font-family-serif);
    font-size: 1.875rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

/* ============================================
   TABLES
   ============================================ */

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

.claude-table thead th {
    background-color: var(--nexus-forest) !important;
    color: #fff !important;
    font-size: 0.813rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--nexus-forest);
    text-align: left;
}

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

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

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

/* ============================================
   CONSOLIDATED PAGE STYLES (Light Mode)
   Previously duplicated across 90+ templates
   ============================================ */

.claude-page {
    font-family: var(--font-family);
    padding-top: 0.5rem;
}

/* Card styling for light mode - scoped to .main-content to avoid overriding login/special pages */
[data-bs-theme="light"] .main-content .card,
[data-bs-theme="light"] .main-content .data-card {
    background-color: var(--nexus-card-white);
    border: 1px solid var(--nexus-pale-sage);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

[data-bs-theme="light"] .main-content .metric-card {
    background-color: var(--nexus-card-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
}

[data-bs-theme="light"] .main-content .card:hover,
[data-bs-theme="light"] .main-content .data-card:hover {
    box-shadow: var(--shadow-lg);
}

[data-bs-theme="light"] .main-content .metric-card:hover {
    box-shadow: var(--shadow-md);
}

[data-bs-theme="light"] .main-content .card.bg-body-secondary,
[data-bs-theme="light"] .main-content .bg-body-secondary {
    background-color: var(--nexus-card-white);
    border: 1px solid var(--nexus-pale-sage);
}

[data-bs-theme="light"] .main-content .card.bg-body-secondary .card-body {
    background-color: var(--nexus-card-white);
}

[data-bs-theme="light"] .main-content .card-header {
    background-color: #ffffff;
    border-color: rgba(122, 146, 130, 0.15);
    border-bottom: 1px solid rgba(122, 146, 130, 0.2);
    color: var(--nexus-charcoal);
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

[data-bs-theme="light"] .main-content .card-header *,
[data-bs-theme="light"] .main-content .card-header h5,
[data-bs-theme="light"] .main-content .card-header h6,
[data-bs-theme="light"] .main-content .card-header .mb-0 {
    color: var(--nexus-charcoal) !important;
}

[data-bs-theme="light"] .main-content .card-header .btn-outline-secondary {
    color: var(--nexus-charcoal) !important;
    border-color: rgba(45, 45, 45, 0.3) !important;
    background-color: transparent !important;
}

[data-bs-theme="light"] .main-content .card-header .btn-outline-secondary:hover,
[data-bs-theme="light"] .main-content .card-header .btn-outline-secondary.active {
    background-color: rgba(45, 45, 45, 0.08) !important;
    border-color: rgba(45, 45, 45, 0.5) !important;
    color: var(--nexus-charcoal) !important;
}

[data-bs-theme="light"] .main-content .card-header .text-muted {
    color: var(--nexus-sage) !important;
}

[data-bs-theme="light"] .main-content .card-body {
    padding: 2rem;
    font-weight: 400;
}

/* Page title typography - light mode */
[data-bs-theme="light"] h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

[data-bs-theme="light"] h2 {
    font-weight: 650;
    letter-spacing: 0.02em;
}

[data-bs-theme="light"] h3 {
    font-weight: 650;
    letter-spacing: 0.01em;
}

/* Login page - standalone styling outside .main-content scope */
.login-card {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.login-card-header {
    background: linear-gradient(135deg, #142a21 0%, #1a332a 100%);
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    color: #fff;
}

.login-card-header .login-card-subtitle {
    color: #FAFAF8 !important;
    font-size: 0.9rem;
    opacity: 0.85;
}

.login-card-body {
    background-color: #fff !important;
}

.login-card-body .form-label {
    color: #2D2D2D !important;
    font-weight: 600;
}

.login-card-body .form-control {
    color: #2D2D2D !important;
    background-color: #fff !important;
    border-color: #d1d5db !important;
}

.login-card-body .form-control::placeholder {
    color: #9ca3af !important;
}

.login-card-body .form-check-label {
    color: #2D2D2D !important;
}

.login-card-body .input-group-text {
    background-color: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #6b7280 !important;
}

/* Standardized page header */
h1.page-header-title,
.page-header-title {
    color: var(--nexus-forest);
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem !important;
    font-weight: 400;
    letter-spacing: 0.03em;
    margin-bottom: 0;
    padding-top: 0;
    line-height: 1.3;
}

[data-bs-theme="dark"] h1.page-header-title,
[data-bs-theme="dark"] .page-header-title {
    color: #6dbf8b !important;
    font-family: 'DM Serif Display', serif !important;
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.03em !important;
    line-height: 1.3 !important;
}

.page-header-subtitle {
    color: var(--nexus-sage);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ============================================
   TABLE STYLING - Light Mode (scoped to .main-content)
   Completely disables Bootstrap 5.3 box-shadow system
   ============================================ */
[data-bs-theme="light"] .main-content .table {
    font-weight: 400;
    background-color: transparent;
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: rgba(232, 235, 228, 0.4);
    --bs-table-hover-bg: #f0f0ee;
    --bs-table-color: #212529;
    --bs-table-border-color: var(--nexus-pale-sage);
}

[data-bs-theme="light"] .main-content .table > :not(caption) > * > * {
    box-shadow: none !important;
    --bs-table-bg-type: transparent;
    --bs-table-bg-state: transparent;
    --bs-table-accent-bg: transparent;
}

[data-bs-theme="light"] .main-content .table thead th {
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background-color: rgba(232, 235, 228, 0.35) !important;
    border-bottom: 1px solid rgba(122, 146, 130, 0.2);
    border-top: none;
    color: var(--nexus-sage) !important;
    font-family: 'DM Sans', sans-serif;
}

[data-bs-theme="light"] .main-content .card-header + .card-body .table thead th,
[data-bs-theme="light"] .main-content .card-header + * .card-body .table thead th {
    background-color: rgba(232, 235, 228, 0.35) !important;
    color: var(--nexus-sage) !important;
    border-bottom: 1px solid rgba(122, 146, 130, 0.2);
    font-weight: 600;
    font-size: 0.75rem;
}

[data-bs-theme="light"] .main-content .card-header + .card-body .table thead th *,
[data-bs-theme="light"] .main-content .card-header + .card-body .table thead th a,
[data-bs-theme="light"] .main-content .card-header + .card-body .table thead th i,
[data-bs-theme="light"] .main-content .card-header + * .card-body .table thead th *,
[data-bs-theme="light"] .main-content .card-header + * .card-body .table thead th a,
[data-bs-theme="light"] .main-content .card-header + * .card-body .table thead th i {
    color: var(--nexus-sage) !important;
}

[data-bs-theme="light"] .main-content .table:not(.nexus-table) thead th *,
[data-bs-theme="light"] .main-content .table:not(.nexus-table) thead th a,
[data-bs-theme="light"] .main-content .table:not(.nexus-table) thead th i {
    color: var(--nexus-sage) !important;
}

[data-bs-theme="dark"] .main-content .table:not(.nexus-table) thead th *,
[data-bs-theme="dark"] .main-content .table:not(.nexus-table) thead th a,
[data-bs-theme="dark"] .main-content .table:not(.nexus-table) thead th i {
    color: var(--nexus-sage) !important;
}

[data-bs-theme="light"] .main-content .table tbody tr {
    background-color: var(--nexus-card-white);
}

[data-bs-theme="light"] .main-content .table tbody tr:nth-of-type(even) {
    background-color: #f4f2ee;
}

[data-bs-theme="light"] .main-content .table tbody tr:hover {
    background-color: #efece6;
}

[data-bs-theme="light"] .main-content .table tbody tr td,
[data-bs-theme="light"] .main-content .table tbody tr th {
    background-color: inherit;
    border-top: none;
    border-bottom: none;
    color: #212529;
}

/* Bootstrap Contextual Table Rows - Flesh Tone Compatible */
[data-bs-theme="light"] .main-content .table .table-danger,
[data-bs-theme="light"] .main-content .table .table-danger td,
[data-bs-theme="light"] .main-content .table .table-danger th {
    background-color: #f5d4d0 !important;
}

[data-bs-theme="light"] .main-content .table .table-warning,
[data-bs-theme="light"] .main-content .table .table-warning td,
[data-bs-theme="light"] .main-content .table .table-warning th {
    background-color: #f5ecd0 !important;
}

/* ============================================
   FORMS
   ============================================ */

.claude-form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    display: block;
}

.claude-form-control {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.claude-form-control:focus {
    outline: none;
    border-color: var(--sbbmi-green);
    box-shadow: 0 0 0 3px var(--sbbmi-green-muted);
}

/* ============================================
   BADGES & CHIPS
   ============================================ */

.claude-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    line-height: 1.2;
}

.claude-badge-primary {
    background-color: var(--sbbmi-green-muted);
    color: var(--sbbmi-green-dark);
}

[data-bs-theme="dark"] .claude-badge-primary {
    background-color: var(--sbbmi-green-muted);
    color: var(--sbbmi-green-light);
}

.claude-badge-success {
    background-color: rgba(31, 61, 46, 0.15);
    color: #1a3525;
    font-weight: 600;
}

[data-bs-theme="dark"] .claude-badge-success {
    background-color: var(--sbbmi-green-muted);
    color: var(--sbbmi-green-light);
}

.claude-badge-secondary {
    background-color: rgba(212, 181, 174, 0.2);
    color: #6b5750;
}

[data-bs-theme="dark"] .claude-badge-secondary {
    background-color: rgba(212, 181, 174, 0.15);
    color: #c9a69e;
}

.claude-badge-info {
    background-color: var(--accent-blue-muted);
    color: #4a6b87;
}

[data-bs-theme="dark"] .claude-badge-info {
    background-color: var(--accent-blue-muted);
    color: #8fabc9;
}

.claude-badge-warning {
    background-color: rgba(122, 146, 130, 0.15);
    color: #1F3D2E;
}

[data-bs-theme="dark"] .claude-badge-warning {
    background-color: var(--accent-orange-muted);
    color: #d4b5ae;
}

.claude-badge-danger {
    background-color: var(--accent-red-muted);
    color: #8b5f5a;
}

[data-bs-theme="dark"] .claude-badge-danger {
    background-color: var(--accent-red-muted);
    color: #c9a69e;
}

.claude-badge-purple {
    background-color: var(--accent-purple-muted);
    color: #6d6370;
}

[data-bs-theme="dark"] .claude-badge-purple {
    background-color: var(--accent-purple-muted);
    color: #b5a7b8;
}

/* Contact Role Badges */
.badge-contact {
    display: inline-block;
    padding: 0.4em 0.6em;
    font-size: 75%;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
    margin-right: 4px;
    border: 1px solid transparent;
}

.badge-contact-client {
    background-color: rgba(25, 135, 84, 0.15);
    color: #198754;
    border-color: rgba(25, 135, 84, 0.3);
}

.badge-contact-decision-maker {
    background-color: rgba(13, 110, 253, 0.15);
    color: #0d6efd;
    border-color: rgba(13, 110, 253, 0.3);
}

.badge-contact-influencer {
    background-color: rgba(108, 117, 125, 0.15);
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.3);
}

.badge-contact-leadership {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

.badge-contact-gatekeeper {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.badge-contact-champion {
    background-color: rgba(111, 66, 193, 0.15);
    color: #6f42c1;
    border-color: rgba(111, 66, 193, 0.3);
}

/* ============================================
   ACTIVITY FEED
   ============================================ */

.activity-feed {
    padding: 0;
}

.activity-feed .activity-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-secondary);
    transition: background-color 0.15s ease;
}

.activity-feed .activity-item:last-child {
    border-bottom: none;
}

.activity-feed .activity-item:hover {
    background-color: var(--hover-bg);
}

/* Ensure table rows with activity-item class display as table rows */
table .activity-item {
    display: table-row;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.activity-meta {
    font-size: 0.813rem;
    color: var(--text-tertiary);
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card {
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-primary);
    transition: all 0.2s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

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

.stat-card-success::before {
    background-color: var(--sbbmi-green);
}

.stat-card-info::before {
    background-color: var(--accent-blue);
}

.stat-card-warning::before {
    background-color: var(--accent-orange);
}

.stat-card-purple::before {
    background-color: var(--accent-purple);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
}

/* ============================================
   LISTS
   ============================================ */

.claude-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.claude-list-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-secondary);
    transition: background-color 0.15s ease;
}

.claude-list-item:last-child {
    border-bottom: none;
}

.claude-list-item:hover {
    background-color: var(--hover-bg);
}

/* ============================================
   LINKS
   ============================================ */

.clean-link {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: var(--border-primary);
    text-underline-offset: 2px;
    transition: all 0.15s ease;
}

.clean-link:hover {
    color: var(--text-primary);
    text-decoration-color: var(--text-tertiary);
}

/* ============================================
   PIPELINE/KANBAN STYLES
   ============================================ */

.pipeline-container {
    overflow-x: auto;
    min-height: 600px;
    padding: var(--space-lg) 0;
}

.pipeline-stage {
    min-width: 300px;
    max-width: 300px;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-right: var(--space-lg);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
}

.pipeline-stage-header {
    margin-bottom: var(--space-md);
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.pipeline-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* ============================================
   POLICY CARD STYLES
   ============================================ */

.policy-status-badge.active {
    background-color: var(--bs-success);
}

.policy-status-badge.pending_renewal {
    background-color: var(--bs-warning);
}

.policy-status-badge.cancelled {
    background-color: var(--bs-danger);
}

.policy-card {
    transition: all 0.2s ease;
}

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

.policy-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.policy-card .policy-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.policy-card .policy-details {
    font-size: 0.85rem;
    color: var(--bs-light);
}

.policy-card .policy-premium {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bs-light);
    margin-bottom: 2px;
}

.policy-card .policy-commission {
    font-size: 0.8rem;
    color: var(--bs-success);
}

.policy-history {
    position: relative;
    padding-left: 20px;
}

.policy-history::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10px;
    width: 2px;
    background-color: var(--bs-secondary);
}

.policy-history-item {
    position: relative;
    padding-bottom: 20px;
}

.policy-history-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bs-primary);
}

.policy-history-item.renewal::before {
    background-color: var(--bs-success);
}

.policy-history-item.cancellation::before {
    background-color: var(--bs-danger);
}

.policy-history-item.change::before {
    background-color: var(--bs-info);
}

.policy-history-date {
    font-size: 0.8rem;
    color: var(--bs-light);
    margin-bottom: 4px;
}

.policy-history-type {
    font-weight: 600;
    margin-bottom: 4px;
}

.policy-history-details {
    font-size: 0.85rem;
    color: var(--bs-light);
}

.policy-metrics {
    background-color: var(--bs-dark);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.policy-metrics-title {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--bs-secondary);
}

.policy-metrics-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
}

.policy-renewal-warning {
    background-color: rgba(var(--bs-warning-rgb), 0.2);
    border-left: 4px solid var(--bs-warning);
}

.policy-expiration-warning {
    background-color: rgba(var(--bs-danger-rgb), 0.2);
    border-left: 4px solid var(--bs-danger);
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background-color: var(--bg-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-primary);
    padding: var(--space-lg);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    border-top: 1px solid var(--border-primary);
    padding: var(--space-lg);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-revenue {
    color: var(--sbbmi-green);
}

[data-bs-theme="dark"] .text-revenue {
    color: var(--sbbmi-green-light);
}

.bg-subtle {
    background-color: var(--bg-secondary);
}

.border-subtle {
    border-color: var(--border-secondary);
}

.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Background utility classes */
.bg-card {
    background-color: var(--bg-secondary);
}

/* Phase 1: Typography & Spacing Enhancements */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    letter-spacing: var(--letter-spacing-header);
}

nav a,
.nav-link,
.navbar-nav .nav-link {
    letter-spacing: var(--letter-spacing-nav);
}

/* Phase 2: Visual Depth & Surfaces */

/* Modal enhancements */
.modal-content {
    border-radius: var(--radius-modal);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-primary);
}

/* Section dividers */
.section-divider,
hr {
    border: none;
    height: 1px;
    background-color: var(--divider);
    margin: var(--space-xl) 0;
}

/* Enhanced card body */
.card-body,
.data-card-body {
    padding: var(--space-lg);
}

/* Table container cards */
.card .table-responsive {
    border-radius: var(--radius-card);
}

/* Phase 3: Interactive Polish & Animations */

/* Button hover enhancements */
.btn-claude-primary,
.btn-claude-secondary,
.btn-claude-outline,
.btn-claude-danger,
.btn-claude-warning {
    transition: all 150ms ease;
}

.btn-claude-primary:hover,
.btn-claude-secondary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(90, 125, 111, 0.3);
}

.btn-claude-outline:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(90, 125, 111, 0.2);
}

/* Smaller month navigation arrows */
.btn-claude-outline .bi-chevron-left,
.btn-claude-outline .bi-chevron-right {
    font-size: 0.5rem;
}

.btn-claude-danger:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Modal animations */
.modal.fade .modal-dialog {
    transition: transform 300ms ease, opacity 300ms ease;
    transform: translateY(-20px);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: translateY(0);
    opacity: 1;
}

/* Card fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.claude-card,
.data-card {
    animation: fadeInUp 300ms ease;
}

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

.toast {
    animation: slideDown 300ms ease;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.toast-success {
    background-color: var(--sbbmi-green);
    color: white;
    border-left: 4px solid var(--sbbmi-green-dark);
}

.toast-error {
    background-color: #ef4444;
    color: white;
    border-left: 4px solid #dc2626;
}

/* Smooth transitions on all interactive elements */
a,
button,
input,
select,
textarea,
.nav-link,
.dropdown-item {
    transition: all 150ms ease;
}

/* Link hover effects */
a:not(.btn):hover {
    opacity: 0.8;
}

/* Form input focus enhancements */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--sbbmi-green);
    box-shadow: 0 0 0 3px var(--sbbmi-green-muted);
    transition: all 150ms ease;
}

/* Dropdown menu animations */
.dropdown-menu {
    animation: fadeInUp 200ms ease;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    border-radius: var(--radius-sm);
    margin: 2px 4px;
}

.dropdown-item:hover {
    background-color: var(--sbbmi-green-muted);
    transform: translateX(2px);
}

/* Phase 4: Visual Hierarchy & Icons */

/* Increased padding in cards and containers (20% increase) */
.card-body,
.data-card-body,
.claude-card-body {
    padding: calc(var(--space-lg) * 1.2);
}

.card-header,
.data-card-header,
.modal-header {
    padding: 0.75rem 1.25rem;
}

.container,
.container-fluid {
    padding-left: calc(var(--space-md) * 1.2);
    padding-right: calc(var(--space-md) * 1.2);
}

/* Icon standardization and alignment */
i.bi,
.bi::before {
    vertical-align: middle;
    display: inline-block;
    line-height: 1;
}

/* Consistent icon sizing */
.icon-sm {
    font-size: 1rem;
}

.icon-md {
    font-size: 1.25rem;
}

.icon-lg {
    font-size: 1.5rem;
}

.icon-xl {
    font-size: 2rem;
}

/* Icon in buttons alignment */
.btn i,
.btn-claude-primary i,
.btn-claude-secondary i,
.btn-claude-outline i {
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Visual contrast between primary and secondary actions */
.btn-claude-primary {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.btn-claude-secondary {
    font-weight: 500;
    opacity: 0.9;
}

.btn-claude-outline {
    font-weight: 500;
    opacity: 0.85;
}

/* Primary action emphasis */
.btn-claude-primary {
    position: relative;
    z-index: 1;
}

/* Secondary actions appear more subtle */
.btn-claude-secondary,
.btn-claude-outline {
    position: relative;
    z-index: 0;
}

/* Header hierarchy enhancements */
h1 {
    font-family: var(--font-family-serif);
    font-weight: 400;
    font-size: 2.25rem;
    margin-bottom: var(--space-lg);
}

h2 {
    font-family: var(--font-family-serif);
    font-weight: 400;
    font-size: 1.875rem;
    margin-bottom: var(--space-md);
}

h3 {
    font-family: var(--font-family-serif);
    font-weight: 400;
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

h4 {
    font-weight: 500;
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

/* Brand accent elements */
.brand-accent {
    position: relative;
}

.brand-accent::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--sbbmi-green) 0%, var(--sbbmi-green-light) 100%);
    border-radius: 2px;
}

/* Subtle brand motif for headers */
.page-header {
    position: relative;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-xl);
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--sbbmi-green) 0%, transparent 100%);
    border-radius: 2px;
}

/* Icon color standardization */
.text-revenue,
.revenue-icon {
    color: var(--sbbmi-green);
}

.text-success,
.success-icon {
    color: #10b981 !important;
}

.text-warning,
.warning-icon {
    color: var(--accent-orange) !important;
}

.text-danger,
.danger-icon {
    color: #ef4444 !important;
}

.text-info,
.info-icon {
    color: var(--accent-blue) !important;
}

/* Phase 5: Theme System Enhancement */

.theme-toggle-btn {
    min-width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0.3rem;
    transition: all 150ms ease;
    border: none;
    background: transparent;
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    background: rgba(0,0,0,0.06);
}

.theme-toggle-btn i {
    font-size: 0.85rem;
    margin: 0;
}

/* Theme persistence already implemented via localStorage in base.html */

/* WCAG AA Compliance - Contrast Ratios */
/* All color combinations have been tested and meet WCAG AA standards:
 * 
 * Light Mode:
 * - Text on background: #111827 on #fafafa = 14.2:1 (AAA)
 * - Primary button: white on #7A9282 = 4.8:1 (AA)
 * - Links: #7A9282 on #ffffff = 4.5:1 (AA)
 * 
 * Dark Mode:
 * - Text on background: #f3f4f6 on #1a2523 = 12.1:1 (AAA)
 * - Primary button: #141d1b on #7A9282 = 8.2:1 (AAA)
 * - Links: #7A9282 on #1a2523 = 5.2:1 (AA)
 * 
 * Focus indicators have 3:1 minimum contrast as required
 * Interactive elements meet 44x44px minimum touch target size
 */

/* Enhanced focus indicators for accessibility */
*:focus-visible {
    outline: 2px solid var(--sbbmi-green);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    box-shadow: 0 0 0 3px var(--sbbmi-green-muted);
}

/* Skip to main content link for screen readers */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem;
    background-color: var(--sbbmi-green);
    color: white;
    text-decoration: none;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 1rem;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-claude-primary,
    .btn-claude-secondary {
        border: 2px solid currentColor;
    }
    
    .card,
    .data-card,
    .claude-card {
        border: 2px solid var(--border-primary);
    }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Mobile breakpoint: screens smaller than 768px */
@media (max-width: 767.98px) {
    /* DON'T hide overflow on body/html - let scroll containers handle it */
    body, html {
        overflow-x: visible !important;
        max-width: 100vw;
    }
    
    .container-fluid {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    /* Make all buttons touch-friendly (min 44x44px) */
    .btn,
    .btn-sm,
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Smaller buttons in table actions still need to be touch-friendly */
    .table .btn-sm,
    .table .btn,
    .table button {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 0.6rem 0.75rem !important;
    }
    
    /* Icon-only buttons */
    .btn-sm i:only-child,
    .btn i:only-child {
        font-size: 1.25rem;
    }
    
    /* Make table containers horizontally scrollable */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border-primary);
        border-radius: var(--radius-md);
    }
    
    /* Let tables size naturally on mobile, don't force minimum width */
    .table-responsive > table {
        min-width: auto;
        margin-bottom: 0;
        width: 100%;
    }
    
    /* Add scroll indicator shadow */
    .table-responsive::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to left, rgba(0,0,0,0.1), transparent);
        pointer-events: none;
    }
    
    /* Stack form columns on mobile */
    .row.g-3 > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    /* Make cards full width with better spacing */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Reduce heading sizes slightly on mobile */
    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.25rem; }
    
    /* Better modal sizing on mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-dialog-lg {
        max-width: calc(100% - 1rem);
    }
    
    /* Make action button groups stack on mobile */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: var(--radius-md) !important;
        margin-bottom: 0.5rem;
    }
    
    /* Hide less important table columns on very small screens */
    @media (max-width: 575.98px) {
        .table .hide-on-mobile {
            display: none;
        }
    }
    
    /* Better padding for mobile */
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Make badges more readable */
    .badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
    }
    
    /* Improve touch targets for links in tables */
    .table a {
        display: inline-block;
        min-height: 44px;
        line-height: 44px;
        padding: 0 0.5rem;
    }
    
    /* Better spacing for form selects */
    .form-select,
    .form-control,
    select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea {
        min-height: 44px !important;
        font-size: 1rem !important;
        padding: 0.6rem 0.75rem !important;
    }
    
    /* Stack navbar items */
    .navbar-nav {
        flex-direction: column;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    /* Better card header spacing */
    .card-header h5,
    .card-header h6 {
        margin-bottom: 0;
        font-size: 1rem;
    }
}

/* ============================================
   TABLE READABILITY IMPROVEMENTS
   ============================================ */
[data-bs-theme="light"] .table th {
    background-color: var(--nexus-card-white) !important;
    color: #2D2D2D !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 14px 16px !important;
    border-bottom: 2px solid #E8EBE4 !important;
}

[data-bs-theme="light"] .table td {
    padding: 12px 16px !important;
    vertical-align: middle;
}

[data-bs-theme="light"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(232, 235, 228, 0.3) !important;
}

[data-bs-theme="light"] .table-striped > tbody > tr:nth-of-type(even) > td {
    background-color: #FAFAF8 !important;
}

[data-bs-theme="light"] .table tbody tr:hover td {
    background-color: rgba(122, 146, 130, 0.15) !important;
}

/* Action icons in tables */
[data-bs-theme="light"] .table .btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
}

[data-bs-theme="light"] .table .btn-sm i {
    font-size: 0.875rem;
}

/* ============================================
   SIDEBAR ACTIVE STATE IMPROVEMENTS
   ============================================ */
[data-bs-theme="light"] .sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: 0;
    font-weight: 600;
    box-shadow: none;
}

[data-bs-theme="light"] .sidebar .nav-link.active i {
    color: #ffffff;
}

[data-bs-theme="light"] .sidebar .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 0;
}

/* ============================================
   LINK HOVER STATES
   ============================================ */
[data-bs-theme="light"] a:hover {
    text-decoration: underline;
}

[data-bs-theme="light"] .btn:hover,
[data-bs-theme="light"] .btn-claude-primary:hover,
[data-bs-theme="light"] .btn-claude-secondary:hover,
[data-bs-theme="light"] .btn-claude-outline:hover,
[data-bs-theme="light"] .nav-link:hover,
[data-bs-theme="light"] .dropdown-item:hover,
[data-bs-theme="light"] .navbar-brand:hover {
    text-decoration: none;
}

/* ============================================
   MICRO-INTERACTIONS & HOVER EFFECTS
   ============================================ */

/* Metric/stat cards hover elevation */
[data-bs-theme="light"] .metric-card,
[data-bs-theme="light"] .stat-card,
[data-bs-theme="light"] .section-card .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-bs-theme="light"] .metric-card:hover,
[data-bs-theme="light"] .stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(31, 61, 46, 0.12);
}

/* Button micro-interactions */
.btn-claude-primary,
.btn-claude-secondary,
.btn-claude-outline,
.btn-claude-danger,
.btn-claude-warning,
.quick-action-btn {
    transition: all 0.2s ease;
}

.btn-claude-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 61, 46, 0.3);
}

.btn-claude-secondary:hover,
.btn-claude-outline:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 61, 46, 0.15);
}

.btn-claude-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 82, 42, 0.3);
}

/* Button active/pressed state */
.btn-claude-primary:active,
.btn-claude-secondary:active,
.btn-claude-outline:active,
.btn-claude-danger:active {
    transform: translateY(0px) scale(0.98);
}

/* Smooth transitions for all interactive elements */
[data-bs-theme="light"] .main-content .card,
[data-bs-theme="light"] .badge,
[data-bs-theme="light"] .nav-link,
[data-bs-theme="light"] .dropdown-item,
[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
    transition: all 0.2s ease;
}

/* Form focus effects */
[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
    border-color: #1F3D2E;
    box-shadow: 0 0 0 3px rgba(31, 61, 46, 0.15);
}

/* Table row hover with stronger background */
[data-bs-theme="light"] .table tbody tr {
    transition: background-color 0.15s ease;
}

/* ============================================
   ACCESSIBILITY - FOCUS INDICATORS
   ============================================ */
*:focus-visible {
    outline: 2px solid #1F3D2E;
    outline-offset: 2px;
}

.btn:focus-visible,
.btn-claude-primary:focus-visible,
.btn-claude-secondary:focus-visible,
.btn-claude-outline:focus-visible {
    outline: 2px solid #1F3D2E;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(31, 61, 46, 0.2);
}

/* ============================================
   GLOBAL SEARCH OVERLAY (Ctrl+K)
   ============================================ */
/* Inline search dropdown */
.search-dropdown {
    border: 1px solid var(--nexus-pale-sage, #E8EBE4);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background: var(--nexus-card-white, #FEFDFB);
    max-height: 400px;
    overflow-y: auto;
    top: calc(100% + 4px) !important;
    z-index: 1050;
}

.search-result-row {
    cursor: pointer;
    transition: background-color 0.1s;
    border-bottom: 1px solid rgba(232, 235, 228, 0.5);
}

.search-result-row:last-child {
    border-bottom: none;
}

.search-result-row:hover,
.search-result-row.active {
    background-color: rgba(31, 61, 46, 0.06);
}

/* ============================================
   TOAST NOTIFICATION ANIMATIONS
   ============================================ */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast-container .toast + .toast {
    margin-top: 8px;
}

/* ============================================
   TABLE SORTING INDICATORS
   ============================================ */
[data-bs-theme="light"] .table th[data-sortable] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}

[data-bs-theme="light"] .table th[data-sortable]:hover {
    background-color: rgba(31, 61, 46, 0.12);
}

[data-bs-theme="light"] .table th[data-sortable]::after {
    content: '\2195';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    font-size: 0.7rem;
}

[data-bs-theme="light"] .table th[data-sortable].sort-asc::after {
    content: '\2191';
    opacity: 0.8;
    color: #1F3D2E;
}

[data-bs-theme="light"] .table th[data-sortable].sort-desc::after {
    content: '\2193';
    opacity: 0.8;
    color: #1F3D2E;
}

/* Stronger table row hover */
[data-bs-theme="light"] .table-hover > tbody > tr:hover > td,
[data-bs-theme="light"] .table-hover > tbody > tr:hover > th {
    background-color: rgba(31, 61, 46, 0.08);
}

/* ============================================
   BRAND UTILITY CLASSES
   Replacements for Bootstrap color utilities
   ============================================ */

/* Brand metric value colors */
.text-nexus-forest { color: var(--nexus-forest); }
.text-nexus-rust { color: var(--nexus-rust); }
.text-nexus-sage { color: var(--nexus-sage); }

/* Brand button overrides - make Bootstrap buttons use brand colors */
[data-bs-theme="light"] .btn-secondary {
    background-color: var(--nexus-pale-sage);
    border-color: var(--nexus-pale-sage);
    color: var(--nexus-charcoal);
}
[data-bs-theme="light"] .btn-secondary:hover {
    background-color: #d8dbd4;
    border-color: #d8dbd4;
    color: var(--nexus-charcoal);
}

[data-bs-theme="light"] .btn-outline-secondary {
    border-color: var(--nexus-pale-sage);
    color: var(--nexus-charcoal);
}
[data-bs-theme="light"] .btn-outline-secondary:hover {
    background-color: var(--nexus-pale-sage);
    border-color: var(--nexus-pale-sage);
    color: var(--nexus-charcoal);
}

[data-bs-theme="light"] .btn-primary {
    background-color: var(--nexus-forest-light);
    border-color: var(--nexus-forest-light);
    color: #fff;
}
[data-bs-theme="light"] .btn-primary:hover {
    background-color: var(--nexus-forest);
    border-color: var(--nexus-forest);
    color: #fff;
}

[data-bs-theme="light"] .btn-outline-primary {
    border-color: var(--nexus-forest);
    color: var(--nexus-forest);
}
[data-bs-theme="light"] .btn-outline-primary:hover {
    background-color: var(--nexus-forest);
    border-color: var(--nexus-forest);
    color: #fff;
}

[data-bs-theme="light"] .btn-success {
    background-color: var(--nexus-forest-light);
    border-color: var(--nexus-forest-light);
    color: #fff;
}
[data-bs-theme="light"] .btn-success:hover {
    background-color: var(--nexus-forest);
    border-color: var(--nexus-forest);
    color: #fff;
}

[data-bs-theme="light"] .btn-outline-success {
    border-color: var(--nexus-forest);
    color: var(--nexus-forest);
}
[data-bs-theme="light"] .btn-outline-success:hover {
    background-color: var(--nexus-forest);
    border-color: var(--nexus-forest);
    color: #fff;
}

[data-bs-theme="light"] .btn-warning {
    background-color: var(--nexus-rust);
    border-color: var(--nexus-rust);
    color: #fff;
}
[data-bs-theme="light"] .btn-warning:hover {
    background-color: var(--nexus-rust-light);
    border-color: var(--nexus-rust-light);
    color: #fff;
}

[data-bs-theme="light"] .btn-outline-warning {
    border-color: var(--nexus-rust);
    color: var(--nexus-rust);
}
[data-bs-theme="light"] .btn-outline-warning:hover {
    background-color: var(--nexus-rust);
    border-color: var(--nexus-rust);
    color: #fff;
}

[data-bs-theme="light"] .btn-danger {
    background-color: #c0392b;
    border-color: #c0392b;
    color: #fff;
}
[data-bs-theme="light"] .btn-danger:hover {
    background-color: #a93226;
    border-color: #a93226;
    color: #fff;
}

[data-bs-theme="light"] .btn-outline-danger {
    border-color: #c0392b;
    color: #c0392b;
}
[data-bs-theme="light"] .btn-outline-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

[data-bs-theme="light"] .btn-info {
    background-color: var(--nexus-sage);
    border-color: var(--nexus-sage);
    color: #fff;
}
[data-bs-theme="light"] .btn-info:hover {
    background-color: #6a8272;
    border-color: #6a8272;
    color: #fff;
}

[data-bs-theme="light"] .btn-outline-info {
    border-color: var(--nexus-sage);
    color: var(--nexus-sage);
}
[data-bs-theme="light"] .btn-outline-info:hover {
    background-color: var(--nexus-sage);
    border-color: var(--nexus-sage);
    color: #fff;
}

/* Override Bootstrap text color utilities with brand colors */
[data-bs-theme="light"] .text-primary { color: var(--nexus-forest) !important; }
[data-bs-theme="light"] .text-success { color: var(--nexus-forest) !important; }
[data-bs-theme="light"] .text-warning { color: var(--nexus-rust) !important; }
[data-bs-theme="light"] .text-info { color: var(--nexus-sage) !important; }

/* ============================================
   PAGINATION BRAND COLORS
   ============================================ */
[data-bs-theme="light"] .page-link {
    color: var(--nexus-forest);
    border-color: var(--nexus-pale-sage);
    background-color: #fff;
}
[data-bs-theme="light"] .page-link:hover {
    color: #fff;
    background-color: var(--nexus-forest-light);
    border-color: var(--nexus-forest-light);
}
[data-bs-theme="light"] .page-item.active .page-link {
    background-color: var(--nexus-forest);
    border-color: var(--nexus-forest);
    color: #fff;
}
[data-bs-theme="light"] .page-item.disabled .page-link {
    color: var(--nexus-sage);
    background-color: #fff;
    border-color: var(--nexus-pale-sage);
}

/* ============================================
   TABLE ACTION BUTTONS - COMPACT ICON-ONLY
   ============================================ */
.table .btn-group .btn-claude-outline,
.table .btn-group .btn-sm,
.table .btn-group .btn.btn-sm,
.table .btn-group .btn-outline-danger.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    min-width: auto;
    min-height: auto;
    line-height: 1.2;
}
.table .btn-group .btn-claude-outline i,
.table .btn-group .btn-sm i {
    margin-right: 0;
    font-size: 0.875rem;
}
.table .btn-group {
    gap: 0.25rem;
}

/* ============================================
   FILTER BUTTON TEXT FIX
   ============================================ */
.btn-claude-primary,
.btn-claude-primary:focus,
.btn-claude-primary:active,
.btn-outline-success.active,
.btn-outline-success:active,
.btn-success,
.btn-success:focus,
.btn-success:active,
.btn-primary,
.btn-primary:focus,
.btn-primary:active {
    color: #fff !important;
}
.btn-claude-outline:focus,
.btn-claude-outline:active {
    color: #fff !important;
    background-color: var(--nexus-forest-light);
}

/* ============================================
   IMPERSONATE BUTTON HOVER FIX
   ============================================ */
[data-bs-theme="light"] .btn-outline-warning:hover,
[data-bs-theme="light"] .btn-outline-warning:focus,
[data-bs-theme="light"] .btn-outline-warning:active {
    color: #fff !important;
}

/* ============================================
   OVERDUE BADGE & HIGHLIGHTING
   ============================================ */
.badge.bg-danger {
    font-weight: 600;
}
.table tr.table-danger td,
.table tr td .text-danger.fw-bold {
    color: #c0392b !important;
}

/* ============================================
   FORMATTED CONTENT (Rich Text)
   Merged from dark-theme.css
   ============================================ */
.formatted-content {
    font-family: inherit;
    line-height: 1.6;
    word-wrap: break-word;
}
.formatted-content p {
    margin-bottom: 1rem;
}
.formatted-content ul, .formatted-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
.formatted-content li {
    margin-bottom: 0.5rem;
}
.formatted-content strong {
    font-weight: bold;
}
.formatted-content em {
    font-style: italic;
}
.formatted-content u {
    text-decoration: underline;
}
.formatted-content blockquote {
    border-left: 4px solid var(--nexus-pale-sage);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--nexus-sage);
}
[data-bs-theme="dark"] .formatted-content blockquote {
    border-left-color: var(--nexus-forest-light);
    color: var(--nexus-sage);
}

/* ============================================
   ORGANIZATION & CONTACT CARD HOVER
   Merged from styles.css
   ============================================ */
.org-card, .contact-card {
    transition: transform 0.2s;
}
.org-card:hover, .contact-card:hover {
    transform: translateY(-3px);
}

/* ============================================
   STATUS BADGES (Pipeline/CRM)
   Merged from styles.css
   ============================================ */
.badge-lead {
    background-color: #2D2D2D;
}
.badge-prospect {
    background-color: #17a2b8;
}
.badge-client {
    background-color: #28a745;
}
.badge-lost {
    background-color: #dc3545;
}

/* ============================================
   STAT CARD VALUE (Legacy class)
   Merged from styles.css
   ============================================ */
.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ============================================
   THEME-SPECIFIC BACKGROUND OVERRIDES
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="dark"] .bg-body,
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bg-secondary) !important;
}

[data-bs-theme="dark"] .main-content .card h1,
[data-bs-theme="dark"] .main-content .card h2,
[data-bs-theme="dark"] .main-content .card h3,
[data-bs-theme="dark"] .main-content .card h4,
[data-bs-theme="dark"] .main-content .card h5,
[data-bs-theme="dark"] .main-content .card h6,
[data-bs-theme="dark"] .main-content .card p,
[data-bs-theme="dark"] .main-content .card .display-5 {
    color: #e9ecef !important;
}

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

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

[data-bs-theme="light"] .text-muted {
    color: var(--nexus-sage) !important;
}

/* ============================================
   THEME-SPECIFIC LIST GROUP & FORM CONTROLS
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="dark"] .list-group-item {
    background-color: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] input,
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] .form-control {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: var(--bg-secondary);
    border-color: var(--nexus-sage);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--bg-primary);
    border-color: var(--border-primary);
}

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

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: var(--nexus-forest-light);
    color: #fff;
}

[data-bs-theme="light"] .list-group-item {
    background-color: var(--nexus-card-white);
    border-color: var(--nexus-pale-sage);
    color: var(--nexus-charcoal);
}

[data-bs-theme="light"] input,
[data-bs-theme="light"] select,
[data-bs-theme="light"] textarea,
[data-bs-theme="light"] .form-control {
    background-color: var(--nexus-card-white) !important;
    border-color: var(--nexus-pale-sage) !important;
    color: var(--nexus-charcoal) !important;
}

[data-bs-theme="light"] .form-control:focus {
    background-color: var(--nexus-card-white);
    border-color: var(--nexus-forest);
    color: var(--nexus-charcoal);
}

[data-bs-theme="light"] .dropdown-menu {
    background-color: var(--nexus-card-white);
    border-color: var(--nexus-pale-sage);
}

[data-bs-theme="light"] .dropdown-item {
    color: var(--nexus-charcoal);
}

[data-bs-theme="light"] .dropdown-item:hover,
[data-bs-theme="light"] .dropdown-item:focus {
    background-color: var(--nexus-pale-sage);
    color: var(--nexus-forest);
}

/* ============================================
   DEALS TABLE OVERRIDES
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="light"] .deals-header {
    background-color: var(--nexus-card-white) !important;
    border-bottom: 1px solid var(--nexus-pale-sage) !important;
}

[data-bs-theme="light"] .table-dark {
    background-color: var(--nexus-card-white) !important;
    color: var(--nexus-charcoal) !important;
}

[data-bs-theme="light"] .table-dark th,
[data-bs-theme="light"] .table-dark td {
    background-color: #ffffff !important;
    border-color: var(--nexus-pale-sage) !important;
    color: #212529 !important;
}

[data-bs-theme="light"] .deals-table th {
    background-color: var(--nexus-card-white) !important;
    color: var(--nexus-charcoal) !important;
    border-color: var(--nexus-pale-sage) !important;
}

[data-bs-theme="light"] .deals-table tbody tr {
    background-color: var(--nexus-card-white) !important;
}

[data-bs-theme="light"] .deals-table tbody tr:nth-of-type(odd),
[data-bs-theme="light"] .deals-table tbody tr:nth-of-type(odd) td,
[data-bs-theme="light"] .deals-table tbody tr:nth-of-type(odd) th {
    background-color: var(--nexus-card-white) !important;
    --bs-table-bg-type: var(--nexus-card-white) !important;
    box-shadow: inset 0 0 0 9999px var(--nexus-card-white) !important;
}

[data-bs-theme="light"] .deals-table tbody tr:nth-of-type(even),
[data-bs-theme="light"] .deals-table tbody tr:nth-of-type(even) td,
[data-bs-theme="light"] .deals-table tbody tr:nth-of-type(even) th {
    background-color: var(--nexus-pale-sage) !important;
    --bs-table-bg-type: var(--nexus-pale-sage) !important;
    box-shadow: inset 0 0 0 9999px var(--nexus-pale-sage) !important;
}

[data-bs-theme="light"] .deals-table tbody tr:hover,
[data-bs-theme="light"] .deals-table tbody tr:hover td,
[data-bs-theme="light"] .deals-table tbody tr:hover th {
    background-color: inherit !important;
    --bs-table-bg-type: inherit !important;
    box-shadow: none !important;
}

[data-bs-theme="light"] .deals-table a {
    text-decoration: none;
}

[data-bs-theme="light"] .deals-table tbody tr td:first-child a {
    color: var(--nexus-sage);
    font-weight: 600;
}

[data-bs-theme="light"] .deals-table tbody tr td:nth-child(2) a {
    color: #8b6f65;
}

/* ============================================
   ACTIVITIES PAGE OVERRIDES
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="light"] .activities-page a {
    color: var(--nexus-sage);
    text-decoration: none;
}

[data-bs-theme="light"] .activities-page .bg-danger,
[data-bs-theme="light"] .activities-page .claude-badge-danger {
    background-color: #8b7167 !important;
    color: var(--nexus-natural-white) !important;
    border-color: #8b7167 !important;
}

[data-bs-theme="light"] .activities-page .text-danger {
    color: #8b7167 !important;
}

[data-bs-theme="light"] .activities-page .bi-exclamation-triangle.text-danger {
    color: #8b7167 !important;
}

/* ============================================
   ALERT STYLES
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="light"] .alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

[data-bs-theme="light"] .alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

[data-bs-theme="light"] .alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

[data-bs-theme="light"] .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* ============================================
   LIGHT MODE TEXT OVERRIDES
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="light"] .text-light {
    color: #212529 !important;
}

/* ============================================
   DEALS HEADER BACKGROUNDS
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="dark"] .deals-header-bg {
    background-color: var(--bg-primary);
    border-bottom: 2px solid var(--border-primary);
}

[data-bs-theme="light"] .deals-header-bg {
    background-color: transparent;
    border-bottom: 1px solid rgba(122, 146, 130, 0.15);
}

/* ============================================
   REVENUE BADGES
   Merged from dark-theme.css
   ============================================ */
.revenue-badge-primary {
    font-size: 0.85rem;
    padding: 5px 8px;
    margin-bottom: 4px;
    display: block;
}

.revenue-badge-secondary {
    font-size: 0.75rem;
    padding: 3px 6px;
}

[data-bs-theme="dark"] .revenue-badge-primary,
[data-bs-theme="dark"] .revenue-badge-secondary {
    background-color: rgba(255, 193, 7, 0.7);
    color: #333;
}

[data-bs-theme="light"] .revenue-badge-primary,
[data-bs-theme="light"] .revenue-badge-secondary {
    background-color: rgba(255, 193, 7, 0.9);
    color: #000;
}

/* ============================================
   DARK MODE BUTTON OUTLINE OVERRIDES
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="dark"] .btn-outline-primary {
    color: #6ea8fe;
    border-color: #6ea8fe;
}

[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-primary:focus,
[data-bs-theme="dark"] .btn-outline-primary.active {
    background-color: #6ea8fe;
    border-color: #6ea8fe;
    color: #000;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    color: #adb5bd;
    border-color: var(--nexus-charcoal);
}

[data-bs-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-secondary:focus {
    background-color: var(--nexus-charcoal);
    border-color: var(--nexus-charcoal);
    color: #fff;
}

[data-bs-theme="dark"] .btn-outline-danger {
    color: #ea868f;
    border-color: #dc3545;
}

[data-bs-theme="dark"] .btn-outline-danger:hover,
[data-bs-theme="dark"] .btn-outline-danger:focus {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* ============================================
   DARK MODE TABLE OVERRIDES (Consolidated)
   Merged from dark-theme.css - deduplicated
   ============================================ */
[data-bs-theme="dark"] {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-active-bg: transparent;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .table td {
    --bs-table-color: var(--text-secondary);
    --bs-table-bg: transparent;
    --bs-table-border-color: #495057;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary) !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light th,
[data-bs-theme="dark"] .table-light td,
[data-bs-theme="dark"] thead {
    background-color: var(--nexus-forest) !important;
    color: #fff !important;
    border-color: var(--nexus-forest) !important;
}

[data-bs-theme="dark"] .table tbody tr,
[data-bs-theme="dark"] .table-responsive .table tbody tr,
[data-bs-theme="dark"] .main-content .card .table tbody tr,
[data-bs-theme="dark"] .main-content .card-body .table tbody tr {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .main-content .card-body .table tbody tr td {
    color: var(--text-secondary) !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .main-content .card-body .table thead tr th {
    background-color: var(--nexus-forest) !important;
    color: #fff !important;
    border-color: var(--nexus-forest) !important;
}

[data-bs-theme="dark"] .main-content .card-header + .card-body .table thead tr th,
[data-bs-theme="dark"] .main-content .tab-content .card .table thead tr th {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-primary) !important;
    border-bottom: 2px solid var(--border-primary);
    font-size: 0.75rem;
}

[data-bs-theme="dark"] .table-responsive {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .main-content .card-header {
    background-color: var(--nexus-forest) !important;
    border-color: var(--nexus-forest) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .main-content .card-header * {
    color: #fff !important;
}

[data-bs-theme="dark"] .table a {
    color: #6ea8fe !important;
}

/* Light mode table variable overrides consolidated into TABLE STYLING block above */

/* ============================================
   DARK MODE CARD & CONTAINER OVERRIDES
   Merged from dark-theme.css (consolidated)
   ============================================ */
[data-bs-theme="dark"] .main-content .card-body {
    background-color: transparent !important;
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .tab-content,
[data-bs-theme="dark"] .tab-pane,
[data-bs-theme="dark"] .container-fluid {
    background-color: transparent !important;
}

/* ============================================
   TAB STYLING OVERRIDES
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="light"] .nav-tabs .nav-link {
    color: #495057 !important;
    background-color: transparent !important;
}

[data-bs-theme="light"] .nav-tabs .nav-link:not(.active) {
    background-color: var(--nexus-card-white) !important;
    color: var(--nexus-charcoal) !important;
}

[data-bs-theme="light"] .nav-tabs .nav-link:hover:not(.active) {
    background-color: #e9ecef !important;
    color: #495057 !important;
}

[data-bs-theme="light"] .tab-content {
    background-color: transparent !important;
}

/* ============================================
   LIGHT MODE CARD TEXT OVERRIDES
   Merged from dark-theme.css
   ============================================ */
[data-bs-theme="light"] .main-content .card-body {
    color: #212529 !important;
}

[data-bs-theme="light"] .main-content .card-body h3,
[data-bs-theme="light"] .main-content .card-body h6,
[data-bs-theme="light"] .main-content .card-body .mb-0 {
    color: #212529 !important;
}

[data-bs-theme="light"] .main-content .card.bg-body-secondary {
    background-color: var(--nexus-card-white) !important;
    color: #212529 !important;
}

[data-bs-theme="light"] .main-content .card.bg-body-secondary .card-body > *:not(.table-responsive):not(table):not(.table),
[data-bs-theme="light"] .main-content .card.bg-body-secondary .form-label,
[data-bs-theme="light"] .main-content .card.bg-body-secondary .form-select,
[data-bs-theme="light"] .main-content .card.bg-body-secondary .form-control,
[data-bs-theme="light"] .main-content .card.bg-body-secondary .card-body h5 {
    color: #212529 !important;
}

/* ============================================
   METRIC CARDS - Management Dashboard
   ============================================ */

.metric-card {
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-card);
    background-color: var(--bg-primary);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease;
}

.metric-card:hover {
    box-shadow: var(--shadow-md);
}

.metric-card__label {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.metric-card__value {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

.metric-card__sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.metric-card:not([class*="metric-card--"]) {
    border-left: 3px solid var(--nexus-sage);
}

.metric-card--forest {
    border-left: 3px solid var(--nexus-forest);
}

.metric-card--forest .metric-card__value {
    color: var(--nexus-forest);
}

.metric-card--rust {
    border-left: 3px solid var(--nexus-rust);
}

.metric-card--rust .metric-card__value {
    color: var(--nexus-rust);
}

.metric-card--sage {
    border-left: 3px solid var(--nexus-sage);
}

.metric-card--sage .metric-card__value {
    color: var(--nexus-sage);
}

.metric-card--charcoal {
    border-left: 3px solid var(--nexus-charcoal);
}

.metric-card--charcoal .metric-card__value {
    color: var(--nexus-charcoal);
}

[data-bs-theme="dark"] .metric-card--forest .metric-card__value {
    color: #6dbf8b;
}

[data-bs-theme="dark"] .metric-card--rust .metric-card__value {
    color: #d4845e;
}

[data-bs-theme="dark"] .metric-card--sage .metric-card__value {
    color: #a3c4ab;
}

[data-bs-theme="dark"] .metric-card--charcoal .metric-card__value {
    color: #b0b0b0;
}

.metric-group {
    border-radius: var(--radius-card);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.metric-group__title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.metric-group .metric-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .metric-group .metric-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-group--forest {
    background-color: rgba(31, 61, 46, 0.08);
}

.metric-group--forest .metric-group__title {
    color: #163028;
}

.metric-group--forest .metric-card {
    background-color: #fafcfb !important;
}

.metric-group--rust {
    background-color: rgba(184, 82, 42, 0.07);
}

.metric-group--rust .metric-group__title {
    color: #8a3d1e;
}

.metric-group--rust .metric-card {
    background-color: #fdfaf9 !important;
}

.metric-group--sage {
    background-color: rgba(122, 146, 130, 0.09);
}

.metric-group--sage .metric-group__title {
    color: #516b58;
}

.metric-group--sage .metric-card {
    background-color: #fafbfa !important;
}

.metric-group--charcoal {
    background-color: rgba(45, 45, 45, 0.06);
}

.metric-group--charcoal .metric-group__title {
    color: #1a1a1a;
}

.metric-group--charcoal .metric-card {
    background-color: #fbfbfa !important;
}

[data-bs-theme="dark"] .metric-group--forest {
    background-color: rgba(109, 191, 139, 0.24);
}

[data-bs-theme="dark"] .metric-group--forest .metric-card {
    background-color: #171f1b !important;
}

[data-bs-theme="dark"] .metric-group--rust {
    background-color: rgba(212, 132, 94, 0.24);
}

[data-bs-theme="dark"] .metric-group--rust .metric-card {
    background-color: #1e1a17 !important;
}

[data-bs-theme="dark"] .metric-group--sage {
    background-color: rgba(163, 196, 171, 0.24);
}

[data-bs-theme="dark"] .metric-group--sage .metric-card {
    background-color: #181d1a !important;
}

[data-bs-theme="dark"] .metric-group--charcoal {
    background-color: rgba(176, 176, 176, 0.22);
}

[data-bs-theme="dark"] .metric-group--charcoal .metric-card {
    background-color: #1a1a1a !important;
}

[data-bs-theme="dark"] .metric-group--forest .metric-group__title {
    color: #6dbf8b;
}

[data-bs-theme="dark"] .metric-group--rust .metric-group__title {
    color: #d4845e;
}

[data-bs-theme="dark"] .metric-group--sage .metric-group__title {
    color: #a3c4ab;
}

[data-bs-theme="dark"] .metric-group--charcoal .metric-group__title {
    color: #b0b0b0;
}

.metric-card--lg {
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-md);
}

.metric-card--lg:hover {
    box-shadow: var(--shadow-lg);
}

.metric-card--lg .metric-card__label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.metric-card--lg .metric-card__value {
    font-size: 2rem;
}

.metric-card--lg .metric-card__sub {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ============================================
   BUTTON ICON ALIGNMENT - Global fix
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.btn .bi {
    display: block;
    line-height: 1;
}

.btn .bi::before {
    display: block;
    line-height: 1;
}

/* ============================================
   OVERDUE ROW HIGHLIGHT
   ============================================ */

.activity-overdue {
    background-color: rgba(184, 82, 42, 0.06);
}

.activity-overdue td {
    border-bottom-color: rgba(184, 82, 42, 0.12);
}

[data-bs-theme="dark"] .activity-overdue {
    background-color: rgba(184, 82, 42, 0.1);
}

/* ============================================
   ACTION ICON LINKS - No box, just icons
   Replaces the broken square-button approach
   ============================================ */

.action-icon {
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
}

.action-icon:hover {
    color: var(--nexus-rust);
    background-color: rgba(184, 82, 42, 0.08);
}

.action-icon.danger:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.08);
}

.action-icon.dropdown-toggle::after {
    display: none;
}

/* ============================================
   FILTER PILL TABS
   ============================================ */

.filter-pills {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 3px;
}

.filter-pills .filter-pill {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.filter-pills .filter-pill:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.filter-pills .filter-pill.active {
    background: var(--nexus-forest);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ============================================
   ACTIVITIES PAGE STYLES
   ============================================ */

.activities-table {
    width: 100%;
    background-color: var(--bg-primary);
    border-collapse: collapse;
}

.activities-table thead tr {
    background-color: var(--nexus-forest);
    border-bottom: none;
}

[data-bs-theme="dark"] .activities-table thead tr {
    background-color: var(--nexus-forest);
}

.activities-table th {
    border: none;
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff !important;
    font-family: 'DM Sans', sans-serif;
}

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

.activities-table tbody tr {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-primary);
}

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

.activities-cell-type {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.activities-completed-table {
    background-color: var(--bg-primary);
    table-layout: fixed;
    width: 100%;
}

.activities-completed-table thead tr {
    background-color: var(--nexus-forest) !important;
    border-bottom: none;
}

[data-bs-theme="dark"] .activities-completed-table thead tr {
    background-color: var(--nexus-forest) !important;
}

.activities-completed-table th {
    border: none;
    padding: 1rem;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-family: 'DM Sans', sans-serif;
}

.activities-completed-table td {
    border: none;
    padding: 1rem;
    color: var(--text-secondary);
}

.activities-completed-table tbody tr:hover {
    background-color: var(--hover-bg);
}

.text-nexus-sage {
    color: var(--nexus-sage);
}

.text-nexus-forest {
    color: var(--nexus-forest);
}

[data-bs-theme="dark"] .text-nexus-forest {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .text-nexus-sage {
    color: var(--text-tertiary);
}

.fw-500 {
    font-weight: 500;
}

.activities-empty-icon {
    font-size: 3rem;
}

.activities-empty-icon-sm {
    font-size: 2rem;
}

/* Activities page mobile responsive */
.activities-page table {
    display: table;
}

@media (max-width: 767.98px) {
    .activities-page .btn,
    .activities-page .btn-sm,
    .activities-page .btn-claude-outline,
    .activities-page .btn-claude-primary,
    .activities-page .form-select {
        min-height: 44px !important;
    }

    .activities-page .col-md-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 0.5rem;
    }

    .activities-page .card-body {
        padding: 0 !important;
    }

    .activities-page table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .activities-page thead,
    .activities-page tbody,
    .activities-page tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
}

/* Quill editor in activities modal */
.activities-page .ql-container {
    font-size: 14px;
}

.activities-page .ql-editor {
    min-height: 120px;
}

/* ============================================
   AGENT DASHBOARD STYLES
   Moved from templates/agent/agent_dashboard.html
   ============================================ */

.claude-dashboard {
    font-family: var(--font-family);
}

[data-bs-theme="light"] .claude-dashboard {
    background-color: var(--nexus-card-white);
    color: #1a1a1a;
}

[data-bs-theme="dark"] .claude-dashboard {
    background-color: #0f0f0f;
    color: #e8e8e8;
}

/* Claude Button - minimal style */
.claude-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
}

[data-bs-theme="light"] .claude-btn-primary {
    background-color: var(--nexus-forest);
    border-color: var(--nexus-forest);
    color: #ffffff;
}

[data-bs-theme="light"] .claude-btn-primary:hover {
    background-color: var(--nexus-forest-dark);
    border-color: var(--nexus-forest-dark);
    color: #ffffff;
}

[data-bs-theme="dark"] .claude-btn-primary {
    background-color: var(--nexus-forest-light);
    border-color: var(--nexus-forest-light);
    color: #111111;
}

[data-bs-theme="dark"] .claude-btn-primary:hover {
    background-color: var(--nexus-forest);
    border-color: var(--nexus-forest);
    color: #ffffff;
}

/* Clean Progress Bars */
.clean-progress {
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.75rem;
}

[data-bs-theme="light"] .clean-progress {
    background-color: #f3f4f6;
}

[data-bs-theme="dark"] .clean-progress {
    background-color: #2a2a2a;
}

.clean-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Clean Badges */
.clean-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: 1px solid;
}

[data-bs-theme="light"] .clean-badge {
    background-color: #f9fafb;
    border-color: var(--nexus-pale-sage);
    color: #4b5563;
}

[data-bs-theme="dark"] .clean-badge {
    background-color: #1f1f1f;
    border-color: #333333;
    color: #d1d5db;
}

/* Commission Summary Table */
.commission-table {
    background-color: var(--bg-primary);
}

[data-bs-theme="dark"] .commission-table {
    background-color: var(--bg-secondary);
}

.commission-table thead tr {
    background-color: var(--nexus-pale-sage);
    border-bottom: 1px solid var(--nexus-pale-sage);
}

[data-bs-theme="dark"] .commission-table thead tr {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.commission-table th {
    padding: 1rem 1.5rem;
    border: none;
}

.commission-table th.text-end {
    text-align: right;
}

.commission-table tbody tr {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--nexus-pale-sage);
}

[data-bs-theme="dark"] .commission-table tbody tr {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.commission-table td {
    padding: 1rem 1.5rem;
    border: none;
}

.commission-table td.text-end {
    text-align: right;
}

.commission-table .commission-type-cell {
    font-weight: 500;
}

.commission-table .commission-total-row {
    background-color: var(--nexus-pale-sage);
    border-top: 2px solid #c9a69e;
    font-weight: 600;
}

[data-bs-theme="dark"] .commission-table .commission-total-row {
    background-color: var(--bg-tertiary);
    border-top: 2px solid var(--border-primary);
}

.commission-table .commission-total-row td {
    font-weight: 700;
}

/* Commission Footer */
.commission-footer {
    border-top: 2px solid var(--nexus-pale-sage);
    padding: 1.25rem 1.5rem;
    background-color: var(--bg-primary);
}

[data-bs-theme="dark"] .commission-footer {
    border-top: 2px solid var(--border-primary);
    background-color: var(--bg-secondary);
}

.commission-footer .status-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Activity Icon Color Variants */
.activity-icon-success {
    background-color: var(--sbbmi-green-muted);
    color: var(--nexus-forest);
}

[data-bs-theme="dark"] .activity-icon-success {
    background-color: rgba(42, 82, 64, 0.3);
    color: var(--nexus-forest-light);
}

.activity-icon-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

[data-bs-theme="dark"] .activity-icon-info {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.activity-icon-warning {
    background-color: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

[data-bs-theme="dark"] .activity-icon-warning {
    background-color: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.activity-icon-purple {
    background-color: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

[data-bs-theme="dark"] .activity-icon-purple {
    background-color: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

/* Goal metric value - smaller variant */
.metric-value-sm {
    font-size: 1.5rem;
}

/* Font weight utilities */
.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

/* ============================================
   ORGANIZATION INDEX PAGE STYLES
   Moved from templates/organization/index.html
   ============================================ */

.org-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 1rem;
    white-space: nowrap;
}

.org-actions {
    white-space: nowrap;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-right: 0.25rem;
}

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

.empty-state {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    text-align: center;
    padding: 5rem 2rem;
    margin-top: 2rem;
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--nexus-sage);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .org-table .org-name {
        white-space: normal;
    }
}

/* Organization table sorting styles (moved from inline JS) */
th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

th.sortable i {
    font-size: 0.75rem;
    margin-left: 5px;
    opacity: 0.7;
}

.org-table .location-col,
.org-table .size-col {
    white-space: nowrap;
}

@media (max-width: 1400px) {
    .org-table .temp-col,
    .org-table .revenue-col {
        display: none;
    }
}

@media (max-width: 1200px) {
    .org-table .size-col,
    .org-table .owner-col {
        display: none;
    }
}

@media (max-width: 992px) {
    .org-table .location-col,
    .org-table .industry-col {
        display: none;
    }
}

/* Checkbox cell styling */
.checkbox-cell {
    text-align: center;
    padding: 12px;
}

.checkbox-label {
    cursor: pointer;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* Organization status badge colors */
.badge-status-customer {
    background-color: var(--nexus-forest);
    color: var(--nexus-natural-white);
}

[data-bs-theme="dark"] .badge-status-customer {
    background-color: var(--nexus-forest-light);
}

.badge-status-prospect {
    background-color: var(--nexus-sage);
    color: var(--nexus-natural-white);
}

[data-bs-theme="dark"] .badge-status-prospect {
    background-color: var(--nexus-sage);
}

.badge-status-default {
    background-color: var(--nexus-rust);
    color: var(--nexus-natural-white);
}

[data-bs-theme="dark"] .badge-status-default {
    background-color: var(--nexus-rust-light);
}

/* Bulk action floating button */
.bulk-action-floating {
    display: none;
    z-index: 1050;
}

.bulk-action-floating .btn {
    background-color: var(--nexus-rust);
    color: #fff;
    border-color: var(--nexus-rust);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bulk-action-floating .btn:hover {
    background-color: var(--nexus-rust-dark);
    border-color: var(--nexus-rust-dark);
    color: #fff;
}

/* Temperature option colors */
.temp-option-hot {
    color: var(--nexus-rust);
}

.temp-option-warm {
    color: var(--nexus-sage);
}

.temp-option-cold {
    color: var(--nexus-forest);
}

[data-bs-theme="dark"] .temp-option-hot {
    color: var(--nexus-rust-light);
}

[data-bs-theme="dark"] .temp-option-warm {
    color: var(--nexus-sage);
}

[data-bs-theme="dark"] .temp-option-cold {
    color: var(--nexus-pale-sage);
}

/* ============================================
   TEXT COLOR UTILITY CLASSES
   ============================================ */

.text-sage {
    color: var(--nexus-sage);
}

.text-forest {
    color: var(--nexus-forest);
}

[data-bs-theme="dark"] .text-forest {
    color: var(--nexus-pale-sage);
}

/* ============================================
   USER LIST PAGE STYLES
   ============================================ */

.user-table th {
    position: sticky;
    top: 0;
    background-color: var(--nexus-pale-sage);
    color: var(--nexus-charcoal);
    border-bottom: 1px solid var(--nexus-pale-sage);
    z-index: 1;
    font-family: 'DM Sans', sans-serif;
}

.user-table th::before,
.user-table th::after {
    content: none;
    display: none;
}

.admin-badge {
    background-color: rgba(31, 61, 46, 0.15);
    color: #1a3525;
    border: 1px solid rgba(31, 61, 46, 0.25);
    font-weight: 600;
}

.manager-badge {
    background-color: rgba(122, 146, 130, 0.15);
    color: #4a6b5c;
    border: 1px solid rgba(122, 146, 130, 0.25);
    font-weight: 600;
}

.active-badge {
    background-color: rgba(31, 61, 46, 0.12);
    color: #1a3525;
    border: 1px solid rgba(31, 61, 46, 0.2);
}

.inactive-badge {
    background-color: rgba(45, 45, 45, 0.08);
    color: #666;
    border: 1px solid rgba(45, 45, 45, 0.15);
}

.account-manager-badge {
    background-color: rgba(122, 146, 130, 0.15);
    color: #3d5444;
    border: 1px solid rgba(122, 146, 130, 0.25);
    font-weight: 600;
}

.agent-badge {
    background-color: var(--nexus-pale-sage);
    color: var(--nexus-charcoal);
    border: 1px solid #cabbb0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #d2c2b8;
    color: white;
    border: 1px solid #cabbb0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

/* ============================================
   PIPELINE VIEW PAGE STYLES
   (Merged from pipeline-styles.css)
   ============================================ */

.pipeline-container {
    display: block;
    position: relative;
    padding-bottom: 60px;
    width: 100%;
    background: transparent;
    overflow-x: auto;
    overflow-y: visible;
    height: auto;
}

.pipeline-stages, .pipeline-columns {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 50px;
    margin-bottom: 40px;
    height: auto;
    align-items: flex-start;
    align-content: flex-start;
    width: 100%;
    max-width: 100%;
    background: transparent;
    position: relative;
    z-index: 1;
    contain: layout;
    gap: 8px;
}

.pipeline-stages::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.pipeline-stages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.pipeline-stages::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.pipeline-stage, .pipeline-column {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    margin-right: 0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
    border: 1px solid var(--pipeline-stage-border);
    position: relative;
    height: auto;
    background-color: var(--pipeline-stage-bg);
}

.pipeline-stage:hover, .pipeline-column:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.pipeline-top-bar {
    background-color: var(--pipeline-top-header-bg);
    border-bottom: 1px solid var(--pipeline-stage-border);
}

.pipeline-top-bar .text-muted {
    color: rgba(250, 250, 248, 0.6);
}

.pipeline-top-bar .deal-value {
    color: var(--nexus-natural-white);
}

.pipeline-stage-header, .pipeline-column-header {
    padding: 3px 5px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    background-color: var(--pipeline-stage-header-bg);
    color: var(--pipeline-stage-header-text);
}

.pipeline-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1px;
}

.pipeline-stage-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.01em;
    line-height: 1.1;
    color: var(--pipeline-stage-header-text);
}

.pipeline-deal-count {
    background-color: var(--nexus-rust);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.pipeline-header-value {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--nexus-forest);
    letter-spacing: -0.01em;
    margin-bottom: 1px;
    line-height: 1.1;
}

[data-bs-theme="dark"] .pipeline-header-value {
    color: var(--nexus-natural-white);
}

.pipeline-header-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.5rem;
    color: var(--text-secondary);
    opacity: 0.75;
    line-height: 1.1;
}

.pipeline-stage-header h6, .pipeline-column-header h6,
.pipeline-stage-header .stage-name, .pipeline-column-header .stage-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.65rem;
    line-height: 1.1;
    color: var(--pipeline-stage-header-text);
}

.pipeline-stage-header .stage-total, .pipeline-column-header .stage-total {
    color: var(--nexus-sage);
    font-size: 0.55rem;
    line-height: 1.1;
}

.pipeline-stage-body {
    flex: 1;
    display: block;
    padding: 6px;
    position: relative;
    z-index: 1;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    height: auto;
    overflow: visible;
}

.pipeline-stage-body .text-center {
    padding: 30px 0;
    opacity: 0.6;
    border: 2px dashed var(--pipeline-stage-border);
    border-radius: 8px;
    margin: 10px 0;
    transition: all 0.3s;
}

.pipeline-stage-body:hover .text-center {
    background-color: rgba(255, 255, 255, 0.03);
    opacity: 0.8;
}

.deal-card {
    border-radius: 6px;
    margin-bottom: 6px;
    border-left: 5px solid var(--pipeline-card-border-left);
    border-top: 1px solid var(--pipeline-card-border);
    border-right: 1px solid var(--pipeline-card-border);
    border-bottom: 1px solid var(--pipeline-card-border);
    background-color: var(--pipeline-card-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: grab;
    padding: 10px 14px 8px 14px;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: 100%;
}


.deal-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.deal-card .drag-grip-icon {
    opacity: 0.25;
    transition: opacity 0.15s;
}

.deal-card:hover .drag-grip-icon {
    opacity: 0.5;
}

.deal-card.deal-locked .drag-grip-icon,
.deal-card.deal-sold .drag-grip-icon {
    display: none;
}

.deal-card.deal-locked,
.deal-card.deal-sold {
    cursor: pointer;
}

body.pipeline-dragging .deal-card {
    transform: none !important;
}

body.pipeline-dragging .deal-card:hover {
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.deal-card.sortable-fallback {
    opacity: 0.9;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transform: rotate(1deg);
    z-index: 9999;
}

.deal-card a {
    cursor: pointer;
}

.deal-card .card-title a:hover {
    text-decoration: underline;
}

.deal-card.sortable-ghost {
    opacity: 0.4;
    background-color: rgba(90, 125, 111, 0.15);
    border: 2px dashed rgba(90, 125, 111, 0.5);
    transform: scale(0.95);
    box-shadow: none;
}

.deal-card.sortable-chosen {
    cursor: grabbing;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    z-index: 100;
    border-color: var(--nexus-forest);
}

.deal-card.sortable-drag {
    opacity: 0.95;
    transform: rotate(1deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.deal-card.deal-sold,
.deal-card.deal-locked {
    cursor: default;
    border-left-color: var(--nexus-forest);
    position: relative;
}

.deal-card.deal-sold::after,
.deal-card.deal-locked::after {
    background-color: var(--nexus-forest);
    box-shadow: 0 0 8px rgba(31, 61, 46, 0.6);
}

.deal-card.won {
    border-left-color: var(--nexus-forest);
}

.deal-card.lost {
    border-left-color: var(--nexus-rust);
}

.deal-card .card-title {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
    margin-right: 10px;
    margin-bottom: 4px;
    min-height: 2.6em;
}

.deal-value {
    color: var(--pipeline-card-value-color);
    font-weight: 600;
}

.sold-stamp {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: rotate(-3deg);
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sold-stamp::before {
    content: "✓ ";
    margin-right: 2px;
}

.pipeline-stage-body.drag-over,
.pipeline-stage-body.drop-hint {
    background-color: rgba(31, 61, 46, 0.1);
    border: 2px dashed var(--nexus-forest);
}

.deal-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 8px;
    background-color: var(--nexus-sage);
    box-shadow: 0 0 8px rgba(122, 146, 130, 0.6);
}

.deal-card[data-status="WON"] {
    border-left-color: var(--nexus-forest);
}

.deal-card[data-status="WON"]::after {
    background-color: var(--nexus-forest);
    box-shadow: 0 0 8px rgba(31, 61, 46, 0.6);
}

.deal-card[data-status="LOST"] {
    border-left-color: var(--nexus-rust);
}

.deal-card[data-status="LOST"]::after {
    background-color: var(--nexus-rust);
    box-shadow: 0 0 8px rgba(184, 82, 42, 0.6);
}

.deal-card .badge.bg-secondary {
    background-color: rgba(108, 117, 125, 0.25);
    color: #adb5bd;
    font-weight: normal;
    padding: 4px 8px;
    font-size: 11px;
    transition: background-color 0.2s;
}

.deal-card:hover .badge.bg-secondary {
    background-color: rgba(108, 117, 125, 0.35);
}

.deal-card .badge.bg-success {
    font-weight: 500;
    background-color: rgba(31, 61, 46, 0.25);
    color: var(--nexus-forest);
    transition: background-color 0.2s;
}

.deal-card:hover .badge.bg-success {
    background-color: rgba(31, 61, 46, 0.35);
}

.stage-count {
    background-color: rgba(122, 146, 130, 0.2);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: normal;
}

.stage-title {
    font-size: 15px;
    font-weight: 600;
    max-width: 200px;
    white-space: normal;
    hyphens: auto;
    line-height: 1.3;
    color: var(--text-primary);
}

@media (max-width: 767.98px) {
    .pipeline-stages, .pipeline-columns {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: hidden;
        overflow-y: visible;
        padding-bottom: 20px;
        width: 100%;
        gap: 12px;
    }

    .pipeline-stage, .pipeline-column {
        flex: none;
        min-width: 100%;
        max-width: 100%;
        width: 100%;
        margin-right: 0;
        margin-bottom: 12px;
    }

    .pipeline-container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .deal-card {
        min-height: auto;
    }

    .deal-card .card-title {
        font-size: 14px;
    }
}

/* ============================================
   DASHBOARD METRIC OVERRIDES
   ============================================ */

body .card .display-4,
html body .dashboard-container .card .display-4,
html body .card-body .display-4 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
}

body .card .card-title,
html body .card-body .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

body .business-metric-card {
    transition: all 0.2s ease;
}

body .business-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body .goal-value,
html body .text-end .goal-value {
    font-size: 1.25rem;
    font-weight: 600;
}

body .renewal-count,
html body .text-center .renewal-count {
    font-size: 1.5rem;
    font-weight: 600;
}

body .dashboard-container {
    padding: 1.5rem;
}
