/* Add this enhanced Montserrat typography to your existing app.css */

/* ==========================================
   ENHANCED MONTSERRAT TYPOGRAPHY
   ========================================== */

/* Global Montserrat Font Application */
html, body {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-display: swap; /* Improves font loading performance */
}

/* Ensure all elements inherit Montserrat */
*, *::before, *::after {
    font-family: inherit;
}

/* MudBlazor Component Font Overrides */
.mud-typography,
.mud-typography-default,
.mud-typography-h1,
.mud-typography-h2,
.mud-typography-h3,
.mud-typography-h4,
.mud-typography-h5,
.mud-typography-h6,
.mud-typography-subtitle1,
.mud-typography-subtitle2,
.mud-typography-body1,
.mud-typography-body2,
.mud-typography-caption,
.mud-typography-overline,
.mud-button,
.mud-input,
.mud-select,
.mud-text-field,
.mud-nav-link,
.mud-breadcrumb,
.mud-chip,
.mud-badge,
.mud-tooltip,
.mud-snackbar,
.mud-dialog,
.mud-card,
.mud-paper,
.mud-list-item,
.mud-menu-item {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
}

/* Professional Font Weights for Montserrat */
.montserrat-light {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-weight: 300;
}

.montserrat-regular {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-weight: 400;
}

.montserrat-medium {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-weight: 500;
}

.montserrat-bold {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-weight: 700;
}

/* Enhanced Professional Portal Title */
.professional-portal-title {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.75rem !important;
    letter-spacing: -0.02em;
    position: relative;
}

/* Enhanced Navigation with Montserrat */
.professional-nav-link,
.mud-nav-link {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    display:flex;
    justify-content: center
}

/* Professional Drawer Header Typography */
.professional-drawer-header .mud-typography {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
}

.professional-drawer-header .mud-typography-subtitle1 {
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}

.professional-drawer-header .mud-typography-caption {
    font-weight: 400 !important;
    letter-spacing: 0.03em;
    opacity: 0.8;
}

/* Professional Content Card Typography */
.professional-content-card {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
}

    .professional-content-card .mud-typography {
        font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    }

/* Button Typography Enhancement */
.mud-button {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    text-transform: none !important; /* Keep normal case for professional look */
}

.professional-floating-btn {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
}

/* Form Elements Typography */
.mud-input,
.mud-input input,
.mud-select,
.mud-text-field input,
.mud-text-field textarea {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
}

.mud-input-label,
.mud-input-helper-text {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-weight: 500 !important;
}

/* Menu and Dropdown Typography */
.mud-menu .mud-list-item,
.mud-menu .mud-menu-item,
.professional-menu-item {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0.01em;
}

/* Notification and Badge Typography */
.mud-badge,
.mud-chip {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

/* Responsive Typography Adjustments */
@media (max-width: 768px) {
    .professional-portal-title {
        font-size: 1.5rem !important;
    }

    .professional-nav-link {
        font-size: 0.875rem !important;
    }
}

/* High DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles with Montserrat */
@media print {
    * {
        font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    }
}

/* ==========================================
   PROFESSIONAL QUANTUM ANIMATION SYSTEM
   ========================================== */

/* CSS Custom Properties for Dynamic Theming */
:root {
    --primary-color: rgba(244, 129, 33, 1);
    --primary-rgb: 244, 129, 33;
    --quantum-glow: 0 0 20px var(--primary-color);
    --quantum-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.15);
    --morphing-speed: 0.6s;
    --float-animation: 3s ease-in-out infinite alternate;
}

/* Professional Animated Body Background */
body {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, rgba(33, 150, 243, 0.02) 25%, rgba(156, 39, 176, 0.02) 50%, rgba(76, 175, 80, 0.02) 75%, rgba(var(--primary-rgb), 0.04) 100%) !important;
    background-size: 400% 400% !important;
    background-attachment: fixed !important;
    animation: professionalBodyFlow 25s ease infinite !important;
    position: relative;
    overflow-x: hidden;
}

@keyframes professionalBodyFlow {
    0% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 100% 50%;
    }

    50% {
        background-position: 100% 100%;
    }

    75% {
        background-position: 0% 100%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Subtle Background Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(var(--primary-rgb), 0.04) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(33, 150, 243, 0.03) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(156, 39, 176, 0.02) 0%, transparent 50%);
    animation: professionalOrbs 30s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes professionalOrbs {
    0%, 100% {
        background: radial-gradient(circle at 20% 80%, rgba(var(--primary-rgb), 0.04) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(33, 150, 243, 0.03) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(156, 39, 176, 0.02) 0%, transparent 50%);
    }

    33% {
        background: radial-gradient(circle at 70% 30%, rgba(var(--primary-rgb), 0.05) 0%, transparent 50%), radial-gradient(circle at 30% 70%, rgba(33, 150, 243, 0.04) 0%, transparent 50%), radial-gradient(circle at 60% 60%, rgba(156, 39, 176, 0.03) 0%, transparent 50%);
    }

    66% {
        background: radial-gradient(circle at 90% 60%, rgba(var(--primary-rgb), 0.03) 0%, transparent 50%), radial-gradient(circle at 10% 40%, rgba(33, 150, 243, 0.02) 0%, transparent 50%), radial-gradient(circle at 50% 20%, rgba(156, 39, 176, 0.04) 0%, transparent 50%);
    }
}

/* Professional Particle System Container */
.quantum-particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Professional Enhanced Cards and Components */
.mud-card,
.mud-paper,
.mud-dialog,
.mud-popover {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(var(--primary-rgb), 0.1) !important;
    position: relative;
    overflow: hidden;
    transition: all var(--morphing-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

    .mud-card::before,
    .mud-paper::before,
    .mud-dialog::before,
    .mud-popover::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(var(--primary-rgb), 0.01) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(var(--primary-rgb), 0.02) 100%);
        pointer-events: none;
        z-index: -1;
    }

    .mud-card:hover,
    .mud-paper:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(var(--primary-rgb), 0.15) !important;
        border-color: rgba(var(--primary-rgb), 0.2) !important;
    }

/* Professional Enhanced Buttons */
.mud-button {
    position: relative;
    overflow: hidden;
    transition: all var(--morphing-speed) cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2) !important;
}

    .mud-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }

    .mud-button:hover::before {
        left: 100%;
    }

    .mud-button:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.3) !important;
    }

/* Professional Enhanced Form Elements */
.mud-input-control,
.mud-select,
.mud-autocomplete {
    background: rgba(255, 255, 255, 0.95) !important;
  /*  border: 1px solid rgba(var(--primary-rgb), 0.15) !important;*/
    border-radius: 8px !important;
    transition: all var(--morphing-speed);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

    .mud-input-control:hover,
    .mud-select:hover,
    .mud-autocomplete:hover {
        border-color: rgba(var(--primary-rgb), 0.3) !important;
        box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1) !important;
    }

    .mud-input-control:focus-within,
    .mud-select:focus-within,
    .mud-autocomplete:focus-within {
        border-color: var(--primary-color) !important;
        box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1), 0 4px 12px rgba(var(--primary-rgb), 0.2) !important;
    }

/* Professional Enhanced Tables */
.mud-table {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

.mud-table-head {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--primary-rgb), 0.02) 100%) !important;
}

.mud-table-row:hover {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, rgba(var(--primary-rgb), 0.01) 100%) !important;
    transform: scale(1.005);
}

/* Professional Text Effects */
.quantum-title {
    background: linear-gradient(45deg, var(--primary-color) 30%, rgba(33, 150, 243, 0.8) 50%, var(--primary-color) 70%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: professionalTextFlow 4s ease-in-out infinite;
    font-weight: 700;
}



.mud-container--gutters {
    padding-bottom: 2em !important;
}

@keyframes professionalTextFlow {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.quantum-subtitle {
    color: rgba(var(--primary-rgb), 0.8);
    text-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.1);
}

/* Professional Enhanced Chips and Badges */
/*.mud-chip {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9) 0%, rgba(var(--primary-rgb), 1) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2) !important;
    transition: all var(--morphing-speed);
}*/

    .mud-chip:hover {
        transform: translateY(-1px) scale(1.05);
        box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3) !important;
    }

.mud-badge {
    background: linear-gradient(135deg, #ff4444 0%, #ff6666 100%) !important;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3) !important;
    animation: var(--float-animation);
}

.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(150%) !important;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

    .loader-container.visible {
        opacity: 1;
        visibility: visible;
    }

    .loader-container.hidden {
        opacity: 0;
        visibility: hidden;
    }

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 32px rgba(var(--primary-rgb), 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.loader-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.loader-text {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.loader-subtext {
    font-size: 0.875rem;
    opacity: 0.7;
    color: rgba(55, 71, 79, 0.8);
    margin-top: 0.5rem;
}

.blazor-loaded .loader-container {
    opacity: 0;
    visibility: hidden;
}

/* ==========================================
   FIX 2: PROFESSIONAL SNACKBAR STYLING
   ========================================== */
/*.mud-snackbar {
    background: rgba(255, 255, 255, 0.98) !important;
    color: rgba(55, 71, 79, 0.9) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(var(--primary-rgb), 0.1) !important;
    border-radius: 12px !important;
}*/

    /*.mud-snackbar .mud-snackbar-content-message {
        color: rgba(55, 71, 79, 0.9) !important;
        font-weight: 500 !important;
    }

    .mud-snackbar .mud-snackbar-content-action .mud-button {
        color: var(--primary-color) !important;
    }

    .mud-snackbar .mud-icon-button {
        color: rgba(55, 71, 79, 0.7) !important;
    }*/

    /* Snackbar variants */
    /*.mud-snackbar.mud-snackbar-severity-success {
        background: rgba(76, 175, 80, 0.95) !important;
        color: white !important;
        border-color: rgba(76, 175, 80, 0.8) !important;
    }

        .mud-snackbar.mud-snackbar-severity-success .mud-snackbar-content-message {
            color: white !important;
        }

    .mud-snackbar.mud-snackbar-severity-error {
        background: rgba(244, 67, 54, 0.95) !important;
        color: white !important;
        border-color: rgba(244, 67, 54, 0.8) !important;
    }

        .mud-snackbar.mud-snackbar-severity-error .mud-snackbar-content-message {
            color: white !important;
        }

    .mud-snackbar.mud-snackbar-severity-warning {
        background: rgba(255, 152, 0, 0.95) !important;
        color: white !important;
        border-color: rgba(255, 152, 0, 0.8) !important;
    }

        .mud-snackbar.mud-snackbar-severity-warning .mud-snackbar-content-message {
            color: white !important;
        }

    .mud-snackbar.mud-snackbar-severity-info {
        background: rgba(33, 150, 243, 0.95) !important;
        color: white !important;
        border-color: rgba(33, 150, 243, 0.8) !important;
    }

        .mud-snackbar.mud-snackbar-severity-info .mud-snackbar-content-message {
            color: white !important;
        }*/

/* ==========================================
   FIX 3: NARROWER NAVIGATION DRAWER
   ========================================== */
.professional-drawer.mud-drawer {
    width: 200px !important; /* Reduced from default 320px */
}

.professional-drawer .mud-drawer-content {
  /*  width: 280px !important;*/
}

/* Adjust main content margin for narrower drawer */
.professional-main-content.mud-main-content {
 /*   margin-left: 200px !important;*/
    transition: margin-left 0.3s ease;
}

/* When drawer is closed */
.mud-layout:has(.mud-drawer-close-hidden) .professional-main-content.mud-main-content {
    margin-left: 0 !important;
}

/* Mobile adjustments */
@media (max-width: 960px) {
    .professional-drawer.mud-drawer {
        width: 260px !important;
    }

    .professional-main-content.mud-main-content {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .professional-drawer.mud-drawer {
        width: 240px !important;
    }
}

/* Professional Enhanced Alerts */
.mud-alert {
    background: rgba(255, 255, 255, 0.98) !important;
    color: rgba(55, 71, 79, 0.9) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(var(--primary-rgb), 0.1) !important;
}

/* Professional Progress Indicators */
.mud-progress-circular .mud-progress-circle,
.mud-progress-linear .mud-progress-line {
    background: linear-gradient(45deg, var(--primary-color) 0%, rgba(33, 150, 243, 0.8) 50%, var(--primary-color) 100%) !important;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3) !important;
}

/* Professional Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.6) 0%, rgba(var(--primary-rgb), 0.8) 100%);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.2);
    transition: all var(--morphing-speed);
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.8) 0%, rgba(var(--primary-rgb), 1) 100%);
        box-shadow: 0 4px 8px rgba(var(--primary-rgb), 0.3);
    }

/* Professional Animation Classes */
.quantum-fade-in {
    animation: professionalFadeIn 0.8s ease-out forwards;
}

@keyframes professionalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quantum-slide-in {
    animation: professionalSlideIn 0.6s ease-out forwards;
}

@keyframes professionalSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.quantum-pulse {
    animation: professionalPulse 3s ease-in-out infinite;
}

@keyframes professionalPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.3);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(var(--primary-rgb), 0);
    }
}

/* Professional Responsive Design */
@media (max-width: 1024px) {
    .mud-card:hover,
    .mud-paper:hover {
        transform: translateY(-2px) scale(1.005);
    }

    .mud-button:hover {
        transform: translateY(-1px) scale(1.01);
    }
}

@media (max-width: 768px) {
    body::before {
        animation-duration: 40s;
    }

    .mud-card:hover,
    .mud-paper:hover,
    .mud-button:hover {
        transform: none;
    }
}

/* Professional Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    body,
    body::before,
    .mud-badge,
    .quantum-title {
        animation: none !important;
    }

    .mud-card:hover,
    .mud-paper:hover,
    .mud-button:hover {
        transform: none !important;
    }
}

/* Professional Dark Mode Support */
/*@media (prefers-color-scheme: dark) {
    .mud-card,
    .mud-paper,
    .mud-dialog,
    .mud-popover {
        background: rgba(30, 30, 30, 0.95) !important;
        border-color: rgba(var(--primary-rgb), 0.2) !important;
    }

    .mud-input-control,
    .mud-select,
    .mud-autocomplete {
        background: rgba(40, 40, 40, 0.95) !important;
        border-color: rgba(var(--primary-rgb), 0.2) !important;
    }

    .loader-content {
        background: rgba(30, 30, 30, 0.95);
        color: white;
    }

    .loader-subtext {
        color: rgba(255, 255, 255, 0.8);
    }
}*/

/* Professional Accessibility Enhancements */
@media (prefers-contrast: high) {
    .mud-card,
    .mud-paper,
    .mud-button {
        border: 2px solid currentColor !important;
    }

    .quantum-title {
        background: none !important;
        -webkit-text-fill-color: var(--primary-color) !important;
        color: var(--primary-color) !important;
    }
}

.page-transition {
    animation: pageSlideIn 0.4s ease-out;
}

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced focus states for accessibility */
.mud-button:focus,
.mud-input:focus,
.mud-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Professional loading states */
.loading-skeleton {
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.1) 25%, rgba(var(--primary-rgb), 0.05) 50%, rgba(var(--primary-rgb), 0.1) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.mud-drawer .mud-drawer-content {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    width: 200px !important;
}
/* Add this to your CSS to fix autocomplete warnings */
input[type="password"] {
    autocomplete: current-password;
}

input[type="email"] {
    autocomplete: email;
}

input[type="text"][name*="user"],
input[type="text"][name*="email"] {
    autocomplete: username;
}