/* ===== Base Styles - Matching Landing Page ===== */
html, body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Force Inter font throughout MudBlazor */
.mud-typography, .mud-input, .mud-button, .mud-chip, .mud-table, 
.mud-nav-link, .mud-menu-item, .mud-list-item, .mud-card, .mud-paper,
.mud-drawer, .mud-appbar, h1, h2, h3, h4, h5, h6, p, span, div {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* ===== Modern App Layout Styles ===== */

/* Navigation Links */
.mud-nav-link {
    color: #475569 !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    font-family: 'Inter', sans-serif !important;
    transition: all 0.2s ease !important;
}

.mud-nav-link:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.mud-nav-link.active {
    background: #f0f9ff !important;
    color: #0284c7 !important;
    font-weight: 600 !important;
}

.mud-nav-link.active .mud-icon-root {
    color: #0284c7 !important;
}

.mud-nav-link .mud-icon-root {
    color: #64748b !important;
    transition: color 0.2s ease !important;
}

.mud-nav-link:hover .mud-icon-root {
    color: #0f172a !important;
}

/* Modern Cards */
.mud-card {
    border-radius: 1rem !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05) !important;
    transition: all 0.2s ease !important;
}

.mud-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.03) !important;
}

/* Modern Paper */
.mud-paper {
    border-radius: 0.75rem !important;
}

/* Modern Buttons */
.mud-button-filled {
    border-radius: 0.5rem !important;
    text-transform: none !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.mud-button-filled:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important;
}

.mud-button-outlined {
    border-radius: 0.5rem !important;
    text-transform: none !important;
    font-weight: 500 !important;
}

/* Modern Chips */
.mud-chip {
    border-radius: 0.375rem !important;
    font-weight: 500 !important;
    font-family: 'Inter', sans-serif !important;
}

/* Modern Tables */
.mud-table {
    border-radius: 0.75rem !important;
    overflow: hidden;
    font-family: 'Inter', sans-serif !important;
}

.mud-table-head .mud-table-cell {
    background: #f8fafc !important;
    font-weight: 600 !important;
    color: #475569 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-family: 'Inter', sans-serif !important;
}

.mud-table-row:hover {
    background: #f8fafc !important;
}

/* Page Headings - Match Landing Page Style */
.page-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.025em !important;
    line-height: 1.2 !important;
}

.page-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}

/* Section Headings */
.section-heading {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

/* Modern Input Fields */
.mud-input-outlined .mud-input-outlined-border {
    border-radius: 0.5rem !important;
    border-color: #e2e8f0 !important;
}

.mud-input:focus-within .mud-input-outlined-border {
    border-color: #0ea5e9 !important;
}

/* Modern Alerts */
.mud-alert {
    border-radius: 0.75rem !important;
}

/* ===== Landing Page Mobile Responsive ===== */

/* Desktop: show nav and CTA, hide hamburger */
@media (min-width: 769px) {
    .landing-mobile-toggle {
        display: none !important;
    }
    .landing-mobile-menu {
        display: none !important;
    }
}

/* Mobile: hide nav and CTA, show hamburger */
@media (max-width: 768px) {
    .landing-nav-desktop,
    .landing-cta-desktop {
        display: none !important;
    }
    .landing-mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    /* Adjust hero section for mobile */
    .hero-section {
        padding-top: 6rem !important;
        min-height: 0 !important;
    }
    h1.hero-title {
        font-size: 2rem !important;
    }
    h2.section-title {
        font-size: 1.75rem !important;
    }
}

/* Mobile Menu Overlay */
.landing-mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1099;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.landing-mobile-menu a {
    padding: 1rem;
    font-size: 1.063rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.15s ease;
}

.landing-mobile-menu a:hover {
    background: #f8fafc;
}

/* ===== Modern Landing Page Styles ===== */

/* Color Variables - from Superdesign export */
:root {
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-900: #0f172a;
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --blue-600: #2563eb;
    --green-500: #22c55e;
    --green-600: #16a34a;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, var(--sky-600), var(--blue-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Navbar - Fixed Header */
.glass-navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1100 !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 5rem;
    overflow: hidden;
}

.hero-bg-blob-1 {
    position: absolute;
    top: 0;
    right: 0;
    width: 800px;
    height: 800px;
    background: var(--sky-50);
    opacity: 0.5;
    border-radius: 50%;
    filter: blur(80px);
    transform: translate(25%, -50%);
    z-index: -1;
}

.hero-bg-blob-2 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: var(--sky-100);
    opacity: 0.4;
    border-radius: 50%;
    filter: blur(80px);
    transform: translate(-25%, 25%);
    z-index: -1;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--sky-50);
    border: 1px solid var(--sky-100);
    border-radius: 9999px;
    padding: 0.375rem 1rem;
    margin-bottom: 1.5rem;
}

.status-badge-dot {
    position: relative;
    width: 8px;
    height: 8px;
}

.status-badge-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--sky-400);
    border-radius: 50%;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-badge-dot::after {
    content: '';
    position: relative;
    display: block;
    width: 8px;
    height: 8px;
    background: var(--sky-500);
    border-radius: 50%;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Modern Button Styles */
.btn-modern-primary {
    background: var(--slate-900) !important;
    color: white !important;
    padding: 1rem 2rem !important;
    border-radius: 9999px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06) !important;
}

.btn-modern-primary:hover {
    background: var(--slate-800) !important;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04) !important;
}

.btn-modern-secondary {
    background: white !important;
    color: var(--slate-700) !important;
    border: 1px solid var(--slate-200) !important;
    padding: 1rem 2rem !important;
    border-radius: 9999px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.btn-modern-secondary:hover {
    background: var(--slate-50) !important;
    transform: translateY(-2px);
}

/* Feature Cards */
.feature-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--sky-200);
    box-shadow: 0 25px 50px -12px rgba(14, 165, 233, 0.08);
    transform: translateY(-4px);
}

.feature-card-icon {
    width: 48px;
    height: 48px;
    background: var(--slate-50);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-card-icon {
    background: var(--sky-500);
    color: white;
}

.feature-card:hover .feature-card-icon .mud-icon-root {
    color: white !important;
}

/* Stats Cards */
.stat-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    border-radius: 1rem;
    padding: 1.5rem;
}

.stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stat-dot-green { background: var(--green-500); }
.stat-dot-sky { background: var(--sky-500); }

/* Hero Dashboard Preview */
.dashboard-preview {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
    border: 1px solid var(--slate-100);
    padding: 1.5rem 2rem;
}

.chart-bar {
    background: var(--sky-500);
    border-radius: 0.375rem 0.375rem 0 0;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    min-width: 10%;
}

.chart-bar:hover {
    opacity: 1;
}

/* Floating Cards */
.floating-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border: 1px solid var(--slate-100);
    padding: 1rem;
    animation: float 4s ease-in-out infinite;
}

.floating-card-2 {
    animation-delay: 1s;
    animation-direction: reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Integration Section - Dark Theme */
.integration-section {
    background: var(--slate-900);
    position: relative;
    overflow: hidden;
}

.integration-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 1000px;
    background: var(--sky-500);
    opacity: 0.15;
    border-radius: 50%;
    filter: blur(120px);
}

.ehr-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    transition: background 0.2s ease;
}

.ehr-badge:hover {
    background: rgba(255,255,255,0.1);
}

.ehr-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

/* Help Section */
.help-section {
    background: var(--slate-50);
}

.help-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.help-card:hover {
    border-color: var(--sky-200);
}

/* CTA Section */
.cta-section {
    background: white;
    text-align: center;
}

/* Modern Footer */
.modern-footer {
    background: var(--slate-50);
    border-top: 1px solid var(--slate-200);
}

/* Logo Ticker */
.logo-ticker {
    border-bottom: 1px solid var(--slate-100);
    padding: 3rem 0;
}

.logo-ticker-item {
    opacity: 0.5;
    filter: grayscale(100%);
    font-weight: 700;
    color: var(--slate-400);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Text Selection */
::selection {
    background: var(--sky-200);
    color: var(--sky-900);
}

/* ===== Existing App Styles ===== */
a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ===== MudBlazor DatePicker Overrides ===== */

/* Calendar popup - compact size showing all 7 days */
/* Use .mud-picker-paper directly for cross-browser compatibility (Safari < 18 lacks :has()) */
.mud-picker-paper {
    min-width: 280px !important;
    max-width: 300px !important;
}

.mud-picker-container {
    min-width: 260px !important;
}

.mud-picker-calendar,
.mud-picker-calendar-content {
    min-width: 252px !important;
}

/* Compact day cells */
.mud-picker-calendar-day {
    min-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8125rem !important;
}

.mud-picker-calendar-header-day {
    min-width: 32px !important;
    font-size: 0.75rem !important;
}

/* Compact header */
.mud-picker-color-header {
    padding: 12px 16px !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
}

.mud-picker-color-header .mud-typography {
    font-size: 1.25rem !important;
}

.mud-button-year {
    font-size: 0.8125rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Selected day */
.mud-picker-calendar-day.mud-selected {
    background-color: #0284c7 !important;
    color: white !important;
}

/* Today indicator */
.mud-picker-calendar-day.mud-current {
    border-color: #0284c7 !important;
}

/* Hover state */
.mud-picker-calendar-day:hover:not(.mud-selected) {
    background: #f0f9ff !important;
}

/* Calendar navigation */
.mud-picker-calendar-header-switch .mud-icon-button {
    padding: 4px !important;
}

/* Year picker */
.mud-picker-year-container .mud-button.mud-primary {
    background: #0284c7 !important;
    color: white !important;
}

/* Input field styling for date picker */
.mud-picker .mud-input-outlined .mud-input-outlined-border {
    border-color: #e2e8f0 !important;
}

.mud-picker .mud-input:focus-within .mud-input-outlined-border {
    border-color: #0284c7 !important;
}

/* Calendar icon color */
.mud-input-adornment .mud-icon-button .mud-icon-root {
    color: #64748b !important;
}

.mud-input-adornment .mud-icon-button:hover .mud-icon-root {
    color: #0284c7 !important;
}

/* ===== DatePicker Sizing Fixes - Compact Mobile-Friendly Layout ===== */

/* Make the picker dialog compact and properly sized */
.mud-picker .mud-popover-paper {
    max-width: 320px !important;
    width: auto !important;
    overflow: hidden !important;
}

/* Compact the picker container */
.mud-picker-container {
    max-width: 320px !important;
}

/* Compact header to not take too much space */
.mud-picker-color-header {
    padding: 12px 16px !important;
    min-height: auto !important;
}

.mud-picker-color-header .mud-picker-header-text {
    font-size: 1.5rem !important;
}

/* Make year button smaller */
.mud-picker .mud-button-year {
    font-size: 0.875rem !important;
    padding: 4px 8px !important;
}

/* Compact calendar view */
.mud-picker-calendar-container {
    padding: 8px !important;
    max-width: 300px !important;
}

/* Smaller day cells for compact view */
.mud-picker-calendar .mud-picker-calendar-day {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.875rem !important;
}

/* Compact day of week headers */
.mud-picker-calendar .mud-picker-calendar-header-day {
    width: 36px !important;
    font-size: 0.75rem !important;
}

/* Compact calendar header with month/year nav */
.mud-picker-calendar-header-switch {
    padding: 4px 0 !important;
}

.mud-picker-calendar-header-switch .mud-icon-button {
    padding: 6px !important;
}

/* Content area padding */
.mud-picker-content {
    padding: 0 !important;
    overflow: hidden !important;
}

/* Year picker compact sizing */
.mud-picker-year-container {
    max-height: 280px !important;
    padding: 8px !important;
}

.mud-picker-year-container .mud-button {
    min-width: 70px !important;
    padding: 6px 12px !important;
    font-size: 0.875rem !important;
}

/* Action buttons compact */
.mud-picker-actions {
    padding: 8px 12px !important;
}

.mud-picker-actions .mud-button {
    padding: 6px 12px !important;
    font-size: 0.875rem !important;
}

/* ===== Dashboard & Page Consistent Styles ===== */

/* Page Header - Consistent across all pages */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.page-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.page-header .subtitle {
    font-size: 12px;
    color: #64748b;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    transition: box-shadow 0.2s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Data table hover rows */
.hover-row:hover {
    background: #f8fafc !important;
}

.hover-row:hover td {
    background: transparent !important;
}

/* Clickable rows */
tr[style*="cursor: pointer"]:hover,
div[style*="cursor: pointer"]:hover {
    opacity: 0.95;
    transition: opacity 0.15s ease;
}

/* Card section headings */
.section-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* KPI badges */
.kpi-badge {
    text-align: center;
    padding: 6px 12px;
    border-radius: 6px;
    min-width: 70px;
}

.kpi-badge .value {
    font-size: 15px;
    font-weight: 700;
}

.kpi-badge .label {
    font-size: 8px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

/* Status colors */
.status-success { background: #dcfce7; color: #15803d; }
.status-warning { background: #fef3c7; color: #b45309; }
.status-error { background: #fee2e2; color: #dc2626; }
.status-info { background: #dbeafe; color: #1d4ed8; }

/* Pipeline items */
.pipeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-item:hover {
    transform: translateX(2px);
}

/* Financial metric displays */
.metric-value {
    font-size: 18px;
    font-weight: 700;
}

.metric-label {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Compact tables */
.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.compact-table thead th {
    text-align: left;
    padding: 8px 10px;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}

.compact-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.compact-table tbody tr:hover {
    background: #f8fafc;
}

.compact-table tbody td {
    padding: 10px;
}

/* Progress bars */
.progress-bar {
    height: 4px;
    background: #f1f5f9;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f87171 0%, #fca5a5 100%);
}

/* Code/CARC code styling */
.code-badge {
    font-size: 10px;
    font-weight: 700;
    font-family: monospace;
    background: #f1f5f9;
    padding: 2px 5px;
    border-radius: 3px;
}

.code-badge.denial {
    background: #fef2f2;
    color: #dc2626;
}

/* Win probability badges */
.win-badge {
    font-weight: 600;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
}

.win-badge.high { background: #dcfce7; color: #15803d; }
.win-badge.medium { background: #fef3c7; color: #b45309; }
.win-badge.low { background: #fee2e2; color: #dc2626; }

/* Priority dots */
.priority-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.priority-dot.high { background: #ef4444; }
.priority-dot.medium { background: #f59e0b; }
.priority-dot.low { background: #3b82f6; }

/* Action buttons in tables */
.table-action-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.table-action-btn:hover {
    background: #4338ca;
}

/* Follow-up items */
.followup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.followup-item:hover {
    background: #f1f5f9;
}

.followup-item.overdue {
    background: #fef2f2;
    border-left-color: #ef4444;
}

/* Empty state styling */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #94a3b8;
    text-align: center;
}

.empty-state-icon {
    color: #cbd5e1;
    font-size: 32px;
    margin-bottom: 12px;
}

/* Compact Date Picker Styling */
.compact-date-picker {
    max-width: 130px;
}

.compact-date-picker .mud-input-slot {
    padding: 4px 8px !important;
    font-size: 12px !important;
}

.compact-date-picker .mud-input {
    font-size: 12px !important;
}

.compact-date-picker .mud-input-adornment {
    margin: 0 !important;
}

.compact-date-picker .mud-input-adornment .mud-icon-button {
    padding: 4px !important;
}

.compact-date-picker .mud-input-adornment svg {
    width: 18px !important;
    height: 18px !important;
}

/* Always show sort arrow on sortable MudTable columns */
.mud-table-sort-label svg {
    opacity: 0.3 !important;
    display: inline-block !important;
    visibility: visible !important;
    transition: opacity 0.15s;
}

.mud-table-sort-label:hover svg {
    opacity: 1 !important;
}

/* Claims Filter Bar — plain HTML for cross-browser alignment */
.claims-filter-bar {
    display: flex;
    gap: 8px;
    padding: 6px 12px;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.claims-filter-input {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0 8px;
    background: white;
    height: 30px;
}

.claims-filter-input input {
    border: none;
    outline: none;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    width: 150px;
    background: transparent;
}

.claims-filter-input input::placeholder {
    color: #94a3b8;
}

.claims-filter-select {
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0 8px;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background: white;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 22px;
}

.claims-filter-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px #4f46e5;
}

.claims-filter-clear {
    border: none;
    background: none;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.claims-filter-clear:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Ensure date picker popup is properly sized and centered */
.mud-picker-container {
    max-width: 320px !important;
}

.mud-picker-calendar {
    padding: 0 8px !important;
}

.mud-picker-calendar-header {
    padding: 8px 12px !important;
    justify-content: center !important;
}

.mud-picker-calendar-content {
    display: flex !important;
    justify-content: center !important;
}

.mud-picker-calendar-day {
    width: 36px !important;
    height: 36px !important;
    font-size: 13px !important;
}

/* Denial Table - Prevent horizontal scroll */
.denial-table {
    width: 100% !important;
}

.denial-table .mud-table-container {
    overflow-x: auto !important;
}

.denial-table .mud-table-root {
    table-layout: fixed !important;
    width: 100% !important;
}

.denial-table .mud-table-root td,
.denial-table .mud-table-root th {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 6px 8px !important;
}

.denial-table .mud-table-cell {
    font-size: 12px !important;
}

/* Payer Scorecard Table - auto-size columns, no truncation */
.payer-scorecard-table .mud-table-root {
    table-layout: auto !important;
}

.payer-scorecard-table .mud-table-root th {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}

.payer-scorecard-table .mud-table-root td {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    padding: 6px 12px !important;
}

/* ===== Demo Mode Styles ===== */
/* These styles adjust the layout when demo banner is visible */

/* Demo banner at very top of page */
.demo-banner {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1301 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    height: 44px;
    box-sizing: border-box;
}

/* Push MudAppBar down when demo mode is active */
.demo-mode-active .mud-appbar {
    top: 44px !important;
}

.demo-mode-active .mud-appbar-fixed-top {
    top: 44px !important;
}

/* Push MudDrawer down when demo mode is active */
.demo-mode-active .mud-drawer {
    top: 108px !important;
    height: calc(100vh - 108px) !important;
}

.demo-mode-active .mud-drawer-content {
    margin-top: 0 !important;
}

/* Adjust main content area */
.demo-mode-active .mud-main-content {
    padding-top: 44px !important;
}

/* Demo Mode - Body Level Selectors (most reliable) */
body.demo-mode-active .mud-appbar,
body.demo-mode-active .mud-appbar-fixed-top,
body.demo-mode-active header.mud-appbar {
    top: 44px !important;
}

body.demo-mode-active .mud-drawer,
body.demo-mode-active .mud-drawer-fixed {
    top: 108px !important;
    height: calc(100vh - 108px) !important;
}

body.demo-mode-active .mud-main-content {
    padding-top: 44px !important;
}

/* ===== ERA Viewer Styles ===== */

.era-tree-group {
    margin-bottom: 4px;
}

.era-tree-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 4px;
    -webkit-user-select: none;
    user-select: none;
}

.era-tree-header:hover {
    background: #f1f5f9;
}

.era-tree-arrow {
    display: inline-block;
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.15s ease;
    width: 12px;
    text-align: center;
}

.era-tree-arrow.expanded {
    transform: rotate(90deg);
}

.era-tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 24px;
    cursor: pointer;
    font-size: 12px;
    color: #475569;
    border-radius: 4px;
    transition: background 0.1s ease;
}

.era-tree-item:hover {
    background: #f1f5f9;
}

.era-tree-item.selected {
    background: #eff6ff;
    color: #0284c7;
    font-weight: 500;
}

.era-seg-tag {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}

/* EDI line hover effect */
.edi-line-hover:hover {
    background: #1e293b !important;
    border-left-color: #64748b !important;
}
.edi-line-hover:active {
    background: #1e3a5f !important;
}

/* Responsive: stack on small screens */
@media (max-width: 1200px) {
    .era-viewer {
        grid-template-columns: 40px 1fr !important;
    }
}
@media (max-width: 900px) {
    .era-viewer {
        grid-template-columns: 1fr !important;
    }
}
