﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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;
}







/* LO MIO */

/* Versión en modo claro: 
    Con Variables de Estilo. Como debe ser.
*/
:root {
    /*--sidebar-bg: linear-gradient(to right, #003d82, #4a90e2);*/ /* degradado azul */
    --sidebar-bg: #003d82; /* azul */
    /*--titulo-bg: linear-gradient(135deg, #003d82, #4a90e2); */ /* degradado azul 135º */
    --titulo-bg: #003d82; /* degradado azul 135º */
    --button-bg: linear-gradient(135deg, #4a90e2, #003d82); /* degradado azul 315º */
    --sidebar-hover: #f0f0f0;
    --primary-blue: #0056b3;
    --primary-blue-light: #4a90e2;
    --accent-blue: #003d82;
    --text-white: #ffffff; /* blanco puro para contraste */
    --text-muted: #d0d0d0; /* gris claro para textos secundarios */
    --border-subtle: rgba(255, 255, 255, 0.2); /* borde sutil en claro */
}


/* Versión alternativa en modo claro: 
    Con Variables de Estilo. Como debe ser.
*/
.rootAlternativo {
    --sidebar-bg: linear-gradient(135deg, #00B9D5, #333333, #333333); /* degradado mas gris / celeste */
    --titulo-bg: linear-gradient(135deg, #00B9D5, #333333); /* degradado gris / celeste 135º */
    --button-bg: linear-gradient(135deg, #bbbbbb, #00B9D5); /* degradado gris / celeste 315º */
    --sidebar-hover: #f0f0f0;
    --primary-blue: #0056b3;
    --primary-blue-light: #4a90e2;
    --accent-blue: #003d82;
    --text-white: #ffffff; /* blanco puro para contraste */
    --text-muted: #d0d0d0; /* gris claro para textos secundarios */
    --border-subtle: rgba(255, 255, 255, 0.2); /* borde sutil en claro */
}



/* LOGIN: Contenedor centrado, gradiente */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: var(--titulo-bg);
}

/* Tarjeta */
.login-card {
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    width: 360px;
    max-width: 90%;
}

/* Animación de entrada */
.animate-fadein {
    animation: fadein 0.5s ease-out;
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inputs */
.input-group {
    position: relative;
}

.input-group input {
    padding-left: 36px;
    height: 45px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

/* Botón con degradado */
.btn-gradient {
    background: var(--button-bg);
    border: none;
    color: white;
    font-weight: bold;
    height: 45px;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .btn-gradient:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    }

.btn-blue {
    background: var(--primary-blue);
    color: white;
}

.titulo-tabla {
    background: var(--titulo-bg);
}
/* Mensaje de error */
.alert {
    font-size: 0.9rem;
    text-align: center;
}


/* REDUCIR TAMAÑOS */
:root {
    --bs-body-font-size: 0.875rem;
    --bs-body-line-height: 1.4;
    --bs-border-radius: 0.25rem;
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.75rem;
    --bs-form-label-font-size: 0.875rem;
}

.body-reducido .table-responsive {
    font-size: 13px;
}

    .body-reducido .table-responsive .table td {
        padding: 3px 8px;
        font-size: 13px;
    }

    .body-reducido .table-responsive .table th {
        padding: 6px 8px;
        font-weight: 600;
        font-size: 13px;
    }

    .body-reducido .table-responsive .table tr {
        cursor: pointer;
        user-select: none; /* ← Esto evita que se seleccione el texto */
        -webkit-user-select: none; /* Para Safari */
        -moz-user-select: none; /* Para Firefox */
    }


.modern-sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--sidebar-bg);
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    box-shadow: none;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
    max-width: 160px;
    height: auto;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.5rem;
}

.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 1rem 1.5rem;
}

.nav-item-modern {
    margin: 0.25rem 0.75rem;
}

.nav-link-modern {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.938rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

    .nav-link-modern:hover {
        background-color: var(--sidebar-hover);
        color: var(--accent-blue);
        transform: translateX(4px);
    }

    .nav-link-modern.active {
        background-color: var(--primary-blue-light);
        color: white;
        box-shadow: 0 2px 8px rgba(0, 61, 130, 0.2);
    }

        .nav-link-modern.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            background-color: var(--primary-blue);
        }

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.nav-text {
    flex: 1;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.logout-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(220, 53, 69, 0.05);
    color: white;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    font-size: 0.938rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .logout-button:hover {
        background-color: #dc3545;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
        border-color: #dc3545;
    }

/* Responsive */
@@media (max-width: 768px) {
    .modern-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .navbar-toggler {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        width: 40px;
        height: 40px;
        z-index: 1001;
        background-color: var(--primary-blue);
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }

        .navbar-toggler::before {
            content: '☰';
            color: white;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .navbar-toggler:checked ~ .modern-sidebar {
            transform: translateX(0);
        }

        .navbar-toggler:checked::before {
            content: '×';
            font-size: 2rem;
        }
}

/* Scrollbar */
.modern-sidebar::-webkit-scrollbar {
    width: 6px;
}

.modern-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.modern-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

    .modern-sidebar::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);
    }


.contenedor-cabecera {
    position: relative;
}

    .contenedor-cabecera.desactivado::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(200, 200, 200, 0.5); /* gris semitransparente */
        pointer-events: all; /* bloquea clics */
        cursor: not-allowed;
    }



    /*

        POPUP

    */

/* Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 61, 130, 0.55); /* mismo color que otros overlays */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;

}

/* Card del popup */
.popup-card {
    background: #ffffff;
    border-radius: 16px;
    width: 95%;
    max-width: 450px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease-in-out;
}

/* Cabecera del popup */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    background: var(--titulo-bg);
    color: var(--text-white);
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.btn-close-popup {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-white);
    cursor: pointer;
}

    .btn-close-popup:hover {
        color: #ffcccc;
    }

/* Cuerpo del popup */
.popup-body {
    padding: 1.5rem;
    font-size: 1rem;
    text-align: center;
}

/* Footer del popup con botones */
.popup-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
}

.btn-success-gradient {
    background-color: var(--primary-blue); /* verde */
    color: white;
    border: none;
    padding: 0.75rem 2rem; /* Más alto y más ancho */
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .btn-success-gradient:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    }

.btn-danger-gradient {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 0.75rem 2rem; /* Más alto y más ancho */
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .btn-danger-gradient:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    }


.popup-pedidos {
    position: absolute;
    top: 110%;
    right: 0;
    z-index: 2000;
}

.popup-pedidos-card {
    background: #ffffff;
    width: 650px;
    max-width: 90vw;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: fadeInScale 0.15s ease-in-out;
}

.popup-pedidos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--titulo-bg);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: bold;
}


/*  PEDIDOS SELECCIONADOR */
.popup-pedidos-body {
    padding: 0.5rem;
}

.popup-pedidos-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #eee;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

