html, body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: var(--mud-palette-background, #F3F4F6);
    color: var(--mud-palette-text-primary, #1F2933);
}

.auth-checking {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.mud-layout .mud-main-content {
    background-color: var(--mud-palette-background, #F3F4F6);
}

.app-layout .app-shell-appbar,
.app-layout .app-shell-drawer,
.app-layout .app-shell-main {
    transition:
        transform 0.32s ease,
        opacity 0.24s ease,
        margin 0.32s ease,
        padding 0.32s ease;
}

.app-layout .app-shell-appbar,
.app-layout .app-shell-drawer {
    will-change: transform, opacity;
}

.app-layout--leaving-form-focus .app-shell-appbar,
.app-layout--leaving-form-focus .app-shell-drawer,
.app-layout--leaving-form-focus .app-shell-main {
    transition-duration: 0.46s;
    transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-layout--form-focus .app-shell-appbar {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.app-layout--form-focus .app-shell-drawer {
    transform: translateX(-100%) !important;
    opacity: 0;
    pointer-events: none;
}

.app-layout--form-focus .app-shell-main {
    margin-left: 0 !important;
    padding-top: 1rem !important;
}

.app-layout--form-focus .app-shell-reveal-zone {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 2.75rem;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.62;
    transition: opacity 0.24s ease, width 0.24s ease;
}

.app-layout--form-focus .app-shell-reveal-zone--left {
    left: 0;
    background: linear-gradient(90deg, color-mix(in srgb, var(--mud-palette-primary, #2F3A45) 28%, transparent 72%), transparent);
}

.app-layout--form-focus .app-shell-reveal-zone--top {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 2.75rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--mud-palette-primary, #2F3A45) 22%, transparent 78%), transparent);
}

.app-layout--form-focus .app-shell-reveal-zone:hover {
    width: 4.5rem;
    opacity: 1;
}

.app-layout--form-focus:has(.app-shell-reveal-zone:hover) .app-shell-reveal-zone {
    opacity: 0;
}

.app-layout--form-focus .app-shell-reveal-zone--top:hover {
    width: auto;
    height: 4.5rem;
}

.app-shell-reveal-hint {
    display: block;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--mud-palette-primary, #2F3A45) 88%, transparent 12%);
    box-shadow: 0 6px 18px rgba(31, 41, 51, 0.16);
    position: relative;
    animation: app-shell-hint-pulse 1.8s ease-in-out infinite;
    transition: opacity 0.16s ease;
}

.app-shell-reveal-hint::before {
    content: '';
    position: absolute;
    inset: 0.25rem;
    border-top: 2px solid var(--mud-palette-primary-text, #F8FAFC);
    border-right: 2px solid var(--mud-palette-primary-text, #F8FAFC);
}

.app-shell-reveal-zone--left .app-shell-reveal-hint::before {
    transform: translateX(-0.1rem) rotate(45deg);
}

.app-shell-reveal-zone--top .app-shell-reveal-hint::before {
    transform: translateY(-0.1rem) rotate(135deg);
}

.app-shell-reveal-zone:hover .app-shell-reveal-hint {
    animation: none;
    opacity: 0;
}

.app-layout--form-focus:has(.app-shell-reveal-zone:hover) .app-shell-reveal-hint {
    animation: none;
    opacity: 0;
}

@keyframes app-shell-hint-pulse {
    0%, 100% {
        opacity: 0.72;
    }

    50% {
        opacity: 1;
    }
}

.app-layout--form-focus:has(.app-shell-reveal-zone:hover) .app-shell-appbar,
.app-layout--form-focus:has(.app-shell-appbar:hover) .app-shell-appbar,
.app-layout--form-focus:has(.app-shell-drawer:hover) .app-shell-appbar {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.app-layout--form-focus:has(.app-shell-reveal-zone:hover) .app-shell-drawer,
.app-layout--form-focus:has(.app-shell-appbar:hover) .app-shell-drawer,
.app-layout--form-focus:has(.app-shell-drawer:hover) .app-shell-drawer {
    transform: translateX(0) !important;
    opacity: 1;
    pointer-events: auto;
}

.app-page-stage {
    animation: app-page-enter 0.32s ease-out both;
}

.app-layout--leaving-form-focus .app-page-stage {
    animation: app-page-enter-from-form 0.46s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes app-page-enter {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes app-page-enter-from-form {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-layout .app-shell-appbar,
    .app-layout .app-shell-drawer,
    .app-layout .app-shell-main,
    .app-page-stage {
        transition: none;
        animation: none;
    }
}

@media (hover: none), (pointer: coarse) {
    .app-layout--form-focus .app-shell-appbar,
    .app-layout--form-focus .app-shell-drawer {
        transform: none !important;
        opacity: 1;
        pointer-events: auto;
    }

    .app-layout--form-focus.app-layout--mobile-chrome-hidden .app-shell-appbar {
        transform: translateY(-100%) !important;
        opacity: 0;
        pointer-events: none;
    }

    .app-layout--form-focus.app-layout--mobile-chrome-hidden .app-shell-drawer {
        transform: translateX(-100%) !important;
        opacity: 0;
        pointer-events: none;
    }

    .app-layout--form-focus .app-shell-main {
        padding-top: inherit !important;
    }

    .app-layout--form-focus .app-shell-reveal-zone {
        display: none;
    }
}

.app-nav-menu .nav-link-active-highlight {
    background: linear-gradient(
        90deg,
        var(--mud-palette-primary) 0%,
        color-mix(in srgb, var(--mud-palette-primary) 70%, white 30%) 100%);
    color: var(--mud-palette-primary-text, #F8FAFC) !important;
    border-left: 4px solid color-mix(in srgb, var(--mud-palette-primary) 65%, black 35%);
    border-radius: 10px;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent 65%);
    font-weight: 600;
}

.app-nav-menu .nav-link-active-highlight .mud-nav-link-icon,
.app-nav-menu .nav-link-active-highlight .mud-nav-link-text,
.app-nav-menu .nav-link-active-highlight .mud-icon-root {
    color: var(--mud-palette-primary-text, #F8FAFC) !important;
}

.app-nav-menu .app-nav-group-section > .mud-nav-link {
    font-weight: 600;
    padding: 4px 16px;
    justify-content: flex-start;
}

.app-nav-menu .app-nav-group-section .mud-collapse-container .mud-nav-link {
    padding-inline-start: 2.75rem;
}

.login-page-atv {
    min-height: 100vh;
    padding: 2rem 1rem;
    box-sizing: border-box;
    background: linear-gradient(
        135deg,
        var(--mud-palette-primary) 0%,
        var(--mud-palette-info) 50%,
        var(--mud-palette-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page-atv .login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
}

.login-page-atv .login-card-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.primer-login-shell {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    position: relative;
}

.primer-login-page.login-page-atv {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    padding: 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

.primer-login-page {
    position: relative;
}

.primer-login-page::before,
.primer-login-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
}

.primer-login-page::before {
    width: 360px;
    height: 360px;
    top: -120px;
    right: -100px;
}

.primer-login-page::after {
    width: 280px;
    height: 280px;
    bottom: -100px;
    left: -80px;
}

.primer-login-stack {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    margin: 0;
    max-height: calc(100dvh - 2rem);
}

.primer-login-logout {
    position: fixed;
    left: 1.25rem;
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    z-index: 20;
}

.primer-login-logout-btn {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
}

.primer-login-logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
}

.primer-login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
}

.primer-login-card-header {
    text-align: center;
}

.primer-login-card-header .login-card-logo {
    margin-bottom: 0.5rem;
}

.primer-login-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, white 88%);
    color: var(--mud-palette-primary);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.primer-login-info {
    border-radius: 10px;
}

.primer-login-requirements {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--mud-palette-primary) 6%, white 94%);
    display: grid;
    gap: 0.2rem;
}

.primer-login-requirements li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--mud-palette-text-secondary);
}

.primer-login-requirements li::before {
    content: "○";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}

.primer-login-requirements li.is-met {
    color: var(--mud-palette-success);
    font-weight: 600;
}

.primer-login-requirements li.is-met::before {
    content: "✓";
}

.login-form-loading {
    pointer-events: none;
}

.direccion-calle-mudtextfield-host {
    width: 100%;
}

.pac-container {
    z-index: 2600 !important;
    font-family: var(--mud-typography-default-family, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif);
    background-color: var(--mud-palette-surface, #FFFFFF);
    border: 1px solid var(--mud-palette-lines-default, #D6DCE3);
    border-radius: var(--mud-default-borderradius, 4px);
    box-shadow: 0 4px 16px rgba(31, 41, 51, 0.12);
    margin-top: 2px;
    box-sizing: border-box;
}

.pac-item {
    font-size: 0.9375rem;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    color: var(--mud-palette-text-primary, #1F2933);
    cursor: pointer;
    border-top: 1px solid var(--mud-palette-lines-default, #D6DCE3);
}

.pac-item:first-child {
    border-top: none;
}

.pac-item:hover,
.pac-item-selected {
    background-color: color-mix(in srgb, var(--mud-palette-primary, #2F3A45) 10%, white 90%);
}

.pac-item-query {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary, #1F2933);
}

.pac-matched {
    font-weight: 600;
}

.pac-icon {
    display: none;
}

.mud-layout .mud-main-content {
    background-color: var(--mud-palette-background, #F3F4F6);
}

.app-nav-menu .nav-link-active-highlight {
    background: linear-gradient(
        90deg,
        var(--mud-palette-primary) 0%,
        color-mix(in srgb, var(--mud-palette-primary) 70%, white 30%) 100%);
    color: var(--mud-palette-primary-text, #F8FAFC) !important;
    border-left: 4px solid color-mix(in srgb, var(--mud-palette-primary) 65%, black 35%);
    border-radius: 10px;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent 65%);
    font-weight: 600;
}

.app-nav-menu .nav-link-active-highlight .mud-nav-link-icon,
.app-nav-menu .nav-link-active-highlight .mud-nav-link-text,
.app-nav-menu .nav-link-active-highlight .mud-icon-root {
    color: var(--mud-palette-primary-text, #F8FAFC) !important;
}

.app-nav-menu .app-nav-group-section > .mud-nav-link {
    font-weight: 600;
    padding: 4px 16px;
    justify-content: flex-start;
}

.app-nav-menu .app-nav-group-section .mud-collapse-container .mud-nav-link {
    padding-inline-start: 2.75rem;
}

.login-page-atv {
    min-height: 100vh;
    padding: 2rem 1rem;
    box-sizing: border-box;
    background: linear-gradient(
        135deg,
        var(--mud-palette-primary) 0%,
        var(--mud-palette-info) 50%,
        var(--mud-palette-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page-atv .login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
}

.direccion-calle-mudtextfield-host {
    width: 100%;
}

.pac-container {
    z-index: 2600 !important;
    font-family: var(--mud-typography-default-family, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif);
    background-color: var(--mud-palette-surface, #FFFFFF);
    border: 1px solid var(--mud-palette-lines-default, #D6DCE3);
    border-radius: var(--mud-default-borderradius, 4px);
    box-shadow: 0 4px 16px rgba(31, 41, 51, 0.12);
    margin-top: 2px;
    box-sizing: border-box;
}

.pac-item {
    font-size: 0.9375rem;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    color: var(--mud-palette-text-primary, #1F2933);
    cursor: pointer;
    border-top: 1px solid var(--mud-palette-lines-default, #D6DCE3);
}

.pac-item:first-child {
    border-top: none;
}

.pac-item:hover,
.pac-item-selected {
    background-color: color-mix(in srgb, var(--mud-palette-primary, #2F3A45) 10%, white 90%);
}

.pac-item-query {
    font-size: 0.9375rem;
    color: var(--mud-palette-text-primary, #1F2933);
}

.pac-matched {
    font-weight: 600;
}

.pac-icon {
    display: none;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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;
    top: 0.5rem;
}

#app > .loading-progress,
#app > .loading-progress-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #3E5C76;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Cargando…");
}

.app-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2F3A45 0%, #3E5C76 50%, #5F6B77 100%);
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.app-splash--hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.app-splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    animation: app-splash-enter 0.6s ease-out both;
}

@keyframes app-splash-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-splash-logo {
    width: min(160px, 45vw);
    height: auto;
    margin-bottom: 1.5rem;
    animation: app-splash-logo-pulse 2.4s ease-in-out infinite;
}

@keyframes app-splash-logo-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.88;
        transform: scale(1.03);
    }
}

.app-splash-brand {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #F8FAFC;
}

.app-splash-tagline {
    margin: 0 0 2rem;
    font-size: 1rem;
    color: rgba(248, 250, 252, 0.75);
}

.app-splash-track {
    width: min(220px, 60vw);
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.app-splash-fill {
    height: 100%;
    width: var(--splash-load-percentage, 0%);
    border-radius: inherit;
    background: #F8FAFC;
    transition: width 0.08s linear;
}

.app-splash-status {
    margin: 0;
    min-height: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(248, 250, 252, 0.7);
}
