﻿/* --- 1. Configuración Global y Layout --- */
html {
    scroll-behavior: smooth;
}

:root {
    /* Negro Principal para el Admin */
    --mud-palette-primary: #000000 !important;
    --mud-palette-primary-rgb: 0, 0, 0 !important;
    --mud-palette-primary-darken: #333333 !important;
    --mud-palette-primary-lighten: #666666 !important;
    --mud-palette-info: #2196F3 !important;
    --mud-palette-info-rgb: 33, 150, 243 !important;
    --mud-palette-text-primary: #18181b !important;
    --mud-palette-text-secondary: #52525b !important;
    --mud-palette-background: #ffffff !important;
    --mud-palette-surface: #ffffff !important;
    --devcloud-gradient: linear-gradient(90deg, #000000 0%, #666666 100%);
}

.mud-layout {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

.mud-main-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    padding-top: 64px !important;
}

footer {
    margin-top: auto;
    flex-shrink: 0;
}

/* --- 2. Navegación y Capas (Z-Index) --- */
.mud-drawer {
    z-index: 1401 !important;
}

.mud-drawer-overlay {
    z-index: 1400 !important;
}

/* --- 3. Login Admin --- */
.registration-page {
    min-height: calc(100vh - 40px); /* Antes era 100vh */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Antes era center */
    padding-top: 40px; /* Antes era 20px */
    padding-bottom: 20px;
}

/* --- 4. Botones y Efectos --- */
.btn-glow {
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(var(--mud-palette-primary-rgb), 0.3);
    transition: all 0.3s ease;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0.5px;
}

    .btn-glow:hover:not(:disabled) {
        box-shadow: 0 8px 25px rgba(var(--mud-palette-primary-rgb), 0.5);
        transform: translateY(-2px);
    }

    .btn-glow:disabled {
        box-shadow: none;
        background-color: #f1f5f9 !important;
        color: #94a3b8 !important;
    }

    /* Forzar texto blanco en TODO el contenido del botón */
    .btn-glow .mud-button-label,
    .btn-glow .mud-typography,
    .btn-glow span {
        color: #ffffff !important;
    }

    .btn-glow:disabled .mud-button-label,
    .btn-glow:disabled .mud-typography,
    .btn-glow:disabled span {
        color: #94a3b8 !important;
    }




/* --- 5. Tarjetas --- */
.glass-card-compact {
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-muted-custom {
    color: #71717a !important;
    font-size: 0.85rem;
    line-height: 1.4;
}

.border-1 {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- 6. Animaciones --- */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.plan-animate {
    animation: fadeInScale 0.6s ease-out forwards;
}

/* --- 7. Modales y Formularios --- */
.glass-dialog {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
    border-radius: 24px !important;
    border: 1px solid rgba(var(--mud-palette-primary-rgb), 0.15) !important;
    min-width: 400px;
}

    .glass-dialog input.mud-input-slot {
        color: #334155 !important;
        -webkit-text-fill-color: #334155 !important;
        font-weight: 400 !important;
        font-size: 1rem !important;
    }

.bg-light-input {
    background-color: #ffffff !important;
    border-radius: 12px !important;
}

.glass-dialog .mud-input-label {
    color: #71717a !important;
    font-weight: 500 !important;
}

/* Borde negro al enfocar inputs */
.mud-input-outlined.mud-input-outlined-info:focus-within .mud-input-outlined-border,
.mud-input-outlined.mud-input-outlined-primary:focus-within .mud-input-outlined-border {
    border-color: #000000 !important;
}

/* --- 8. Modal de Reconexión de Blazor --- */
#components-reconnect-modal {
    display: none !important;
}

    #components-reconnect-modal.components-reconnect-show {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 6px !important;
        background: #000000 !important;
        z-index: 20000 !important;
        overflow: hidden;
    }

        #components-reconnect-modal.components-reconnect-show::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 50%;
            height: 100%;
            background: rgba(255,255,255,0.5);
            animation: bar-loading 1.5s infinite ease-in-out;
        }

@keyframes bar-loading {
    0% {
        left: -50%;
    }

    100% {
        left: 100%;
    }
}

/* --- 9. FORZADO DE COLOR NEGRO SOBRE MUDBLAZOR --- */
.mud-primary-text {
    color: #000000 !important;
}

.mud-chip-filled.mud-chip-color-info,
.mud-button-filled.mud-button-filled-primary,
.mud-progress-linear-bar,
.mud-button-group-root .mud-button-filled.mud-button-filled-primary {
    background-color: #000000 !important;
}

.mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: rgba(0, 0, 0, 0.1) !important;
    color: #000000 !important;
}

    .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
        color: #000000 !important;
    }

.mud-menu-list .mud-list-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #000000 !important;
}


/* ============================================
   10. Colores de Snackbars (Alertas)
============================================ */
/* 🔵 Azul - Info (campos vacíos) */
.mud-snackbar.mud-alert-filled-info,
.mud-snackbar.mud-alert-text-info,
.mud-snackbar.mud-theme-info,
.mud-snackbar.mud-alert-outlined-info {
    background-color: #2196F3 !important;
    color: #ffffff !important;
    border-color: #2196F3 !important;
}

/* 🟢 Verde - Success (login exitoso) */
.mud-snackbar.mud-alert-filled-success,
.mud-snackbar.mud-alert-text-success,
.mud-snackbar.mud-theme-success,
.mud-snackbar.mud-alert-outlined-success {
    background-color: #4CAF50 !important;
    color: #ffffff !important;
    border-color: #4CAF50 !important;
}

/* 🟡 Amarillo - Warning (advertencias) */
.mud-snackbar.mud-alert-filled-warning,
.mud-snackbar.mud-alert-text-warning,
.mud-snackbar.mud-theme-warning,
.mud-snackbar.mud-alert-outlined-warning {
    background-color: #FF9800 !important;
    color: #ffffff !important;
    border-color: #FF9800 !important;
}

/* 🔴 Rojo - Error (credenciales incorrectas) */
.mud-snackbar.mud-alert-filled-error,
.mud-snackbar.mud-alert-text-error,
.mud-snackbar.mud-theme-error,
.mud-snackbar.mud-alert-outlined-error {
    background-color: #F44336 !important;
    color: #ffffff !important;
    border-color: #F44336 !important;
}

/* ⚪ Gris - Normal (info neutral) */
.mud-snackbar.mud-alert-filled-normal,
.mud-snackbar.mud-alert-text-normal,
.mud-snackbar.mud-theme-normal,
.mud-snackbar.mud-alert-outlined-normal {
    background-color: #607D8B !important;
    color: #ffffff !important;
    border-color: #607D8B !important;
}

/* Fuerza color en cualquier variante de snackbar por Severity */
.mud-snackbar[class*="info"] {
    background-color: #2196F3 !important;
    color: #ffffff !important;
}

.mud-snackbar[class*="success"] {
    background-color: #4CAF50 !important;
    color: #ffffff !important;
}

.mud-snackbar[class*="warning"] {
    background-color: #FF9800 !important;
    color: #ffffff !important;
}

.mud-snackbar[class*="error"] {
    background-color: #F44336 !important;
    color: #ffffff !important;
}

/* Íconos y botón de cierre en blanco */
.mud-snackbar .mud-icon-root,
.mud-snackbar .mud-snackbar-action button,
.mud-snackbar .mud-button-root {
    color: #ffffff !important;
}
