html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Custom admin template styles */
.mud-appbar .mud-icon-button {
    color: white !important;
}

.mud-appbar .mud-icon-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Custom hamburger menu button */
.hamburger-menu-btn {
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 12px !important;
    margin-right: 8px;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.hamburger-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.hamburger-menu-btn:active {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hamburger-icon span:nth-child(1) {
    transform-origin: left center;
}

.hamburger-icon span:nth-child(2) {
    transform-origin: center;
}

.hamburger-icon span:nth-child(3) {
    transform-origin: left center;
}

/* Animated hamburger when drawer is open */
.hamburger-menu-btn.drawer-open .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(3px, -1px);
}

.hamburger-menu-btn.drawer-open .hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-menu-btn.drawer-open .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, 1px);
}

/* Mobile specific hamburger styling */
@media (max-width: 959px) {
    .hamburger-menu-btn {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 10px !important;
    }
    
    .hamburger-icon {
        width: 22px;
        height: 16px;
    }
    
    /* Mobile navigation improvements */
    .mud-drawer-temporary {
        z-index: 1300;
    }
    
    .mud-nav-link {
        padding: 16px 20px !important;
        margin: 4px 8px !important;
        border-radius: 8px !important;
        transition: all 0.2s ease !important;
    }
    
    .mud-nav-link:active {
        background-color: rgba(255, 255, 255, 0.3) !important;
        transform: scale(0.98);
    }
    
    /* Add visual feedback for touch */
    .mud-nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
    }
    
    /* Smooth drawer animation on mobile */
    .mud-drawer {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
}

/* Theme and user buttons */
.theme-toggle-btn, .user-account-btn {
    min-width: 48px !important;
    font-size: 20px !important;
    padding: 8px !important;
}

.theme-toggle-btn:hover, .user-account-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.mud-drawer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mud-drawer .mud-nav-link {
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin: 4px 8px;
    transition: all 0.2s ease-in-out;
}

.mud-drawer .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.mud-drawer .mud-nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
}

.mud-appbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dashboard-card {
    transition: transform 0.2s ease-in-out;
}

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

/* Mobile-specific improvements */
@media (max-width: 959px) {
    .mud-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    .mud-grid-item {
        padding: 8px !important;
    }
    
    .mud-card {
        margin-bottom: 16px;
    }
    
    .mud-table {
        font-size: 0.875rem;
    }
    
    .mud-data-grid {
        font-size: 0.875rem;
    }
    
    /* Hide less important columns on mobile */
    .mobile-hidden {
        display: none !important;
    }
}

/* Tablet improvements */
@media (min-width: 960px) and (max-width: 1279px) {
    .mud-drawer-mini .mud-nav-link {
        justify-content: center;
        padding: 12px;
    }
    
    .mud-drawer-mini .mud-nav-link .mud-nav-link-text {
        display: none;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .mud-button, .mud-icon-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .mud-nav-link {
        min-height: 48px;
        padding: 12px 16px;
    }
    
    .mud-table .mud-table-cell {
        padding: 12px 8px;
    }
}

/* PWA specific styles */
@media (display-mode: standalone) {
    body {
        user-select: none;
    }
    
    /* Add safe area padding for devices with notches */
    .mud-appbar {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .mud-main-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Dark theme support */
.mud-theme-dark .mud-drawer {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

.mud-theme-dark .mud-appbar {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

/* Smooth transitions for drawer */
.mud-drawer {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Backdrop for mobile drawer */
@media (max-width: 959px) {
    .mud-overlay {
        backdrop-filter: blur(4px);
        background-color: rgba(0, 0, 0, 0.3);
    }
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.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;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;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uMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* DAWA Autocomplete Styles - Complete implementation */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.dawa-address-container {
    position: relative;
    width: 100%;
}

    .dawa-address-container .mud-input-slot {
        z-index: 1;
    }

/* DAWA specific autocomplete classes from the official library */
.dawa-autocomplete-container {
    position: relative !important;
    width: 100% !important;
}

.dawa-autocomplete-suggestions {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.23) !important;
    border-radius: 4px !important;
    box-shadow: 0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
    margin-top: 4px !important;
}

.dawa-autocomplete-suggestion {
    padding: 12px 16px !important;
    cursor: pointer !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: rgba(0, 0, 0, 0.87) !important;
    font-family: "Roboto", "Helvetica", "Arial", sans-serif !important;
    font-size: 0.875rem !important;
    line-height: 1.43 !important;
    transition: background-color 0.2s !important;
}

    .dawa-autocomplete-suggestion:hover,
    .dawa-autocomplete-suggestion-active {
        background-color: rgba(0, 0, 0, 0.04) !important;
    }

    .dawa-autocomplete-suggestion:last-child {
        border-bottom: none !important;
    }

/* Fix for MudBlazor container positioning issues */
.mud-input-control {
    position: relative !important;
}

/* Ensure MudTextField doesn't interfere with DAWA positioning */
.autocomplete-container .mud-input-control-input-container {
    position: relative !important;
}

/* Dark theme support for DAWA autocomplete */
.mud-theme-dark .dawa-autocomplete-suggestions {
    background: var(--mud-palette-surface, #424242) !important;
    border-color: rgba(255, 255, 255, 0.23) !important;
    box-shadow: 0px 5px 5px -3px rgba(255,255,255,0.2), 0px 8px 10px 1px rgba(255,255,255,0.14), 0px 3px 14px 2px rgba(255,255,255,0.12) !important;
}

.mud-theme-dark .dawa-autocomplete-suggestion {
    color: rgba(255, 255, 255, 0.87) !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

    .mud-theme-dark .dawa-autocomplete-suggestion:hover,
    .mud-theme-dark .dawa-autocomplete-suggestion-active {
        background-color: rgba(255, 255, 255, 0.08) !important;
    }

/* Ensure proper input styling compatibility */
.mud-input-control-input-container input.dawa-autocomplete-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
}

/* Mobile responsive adjustments */
@media (max-width: 600px) {
    .dawa-autocomplete-suggestions {
        max-height: 250px !important;
        font-size: 0.8rem !important;
    }

    .dawa-autocomplete-suggestion {
        padding: 10px 12px !important;
    }
}

/* Override any conflicting z-index issues */
.mud-popover-provider,
.mud-dialog-provider {
    z-index: 1300;
}

.dawa-autocomplete-suggestions {
    z-index: 9999 !important;
}

/* Fix MudBlazor grid container positioning */
.mud-grid-item .autocomplete-container {
    position: relative !important;
    overflow: visible !important;
}

/* Prevent any container clipping */
.mud-container,
.mud-card-content,
.mud-grid,
.mud-grid-item {
    overflow: visible !important;
}

.centered-table th,
.centered-table td {
    text-align: center !important;
    vertical-align: middle !important;
}