html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    overflow-y: auto;
}


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;
}

/* ================================
   CONTENEDORES Y LAYOUTS
   ================================ */

.container-page {
    max-width: 900px;
    margin: auto;
    padding: 0px;
    font-family: Arial;
}

.scroll-container {
    max-height: 220px;
    overflow-y: auto;
}

/* ================================
   TÍTULOS
   ================================ */

.page-title {
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #0d47a1;
}

/* ================================
   TABLAS
   ================================ */

.table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
}

    table td,
    table th {
        text-align: center;
    }

thead {
    background: #1976d2;
    color: white;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
}

tbody tr:hover {
    background: #e3f2fd;
    cursor: pointer;
}

/* ================================
   INPUTS
   ================================ */

.input-standard {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin: 10px 0px;
}

.input-quantity {
    width: 90px !important;
    text-align: center;
    font-size: 16px;
    padding: 10px;
}

/* ================================
   BOTONES BASE (Bootstrap override)
   ================================ */

.btn-primary-gradient {
    width: 100%;
    padding: 16px;
    background: #0d47a1;
    border: none;
    color: white;
    border-radius: 12px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease;
}

    .btn-primary-gradient:hover {
        opacity: 0.9;
        transform: scale(1.02);
    }

    .btn-primary-gradient:active {
        transform: scale(0.97);
    }

.btn-success-gradient {
    width: 100%;
    padding: 10px;
    background: #006f05;
    border: none;
    color: white;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease;
}

    .btn-success-gradient:hover {
        opacity: 0.9;
        transform: scale(1.02);
    }

    .btn-success-gradient:active {
        transform: scale(0.97);
    }

.btn-danger-gradient {
    background: #d32f2f;
    border: none;
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease;
}

    .btn-danger-gradient:hover {
        opacity: 0.9;
        transform: scale(1.02);
    }

/* Variantes para botones del mismo tamaño en grupos */
.button-group-centered .btn-success-gradient,
.button-group-centered .btn-danger-gradient {
    width: auto;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 10px;
}
.btn-comprimido-sin-nada {
    width: auto;
    height: auto;
    border:none;
    background: transparent;
    text-align: center;
    justify-content: center;
    
    
}


.btn-sm-edit {
    background: #0d47a1;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: opacity 0.2s ease;
}

    .btn-sm-edit:hover {
        opacity: 0.85;
    }
.btn-sm-danger {
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: opacity 0.2s ease;
}

    .btn-sm-danger:hover {
        opacity: 0.85;
    }

.btn-icon-danger {
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 6px;
    margin: 15px;
    padding: 0px 10px;
    height: 32px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: opacity 0.2s ease;
}

    .btn-icon-danger:hover {
        opacity: 0.85;
    }

.btn-action {
    margin-top: 10px;
    width: 100%;
    padding: 12px;
    height: 50px;
    background: #0d47a1;
    border: none;
    color: white;
    border-radius: 12px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease;
}

    .btn-action:hover {
        opacity: 0.9;
        transform: scale(1.02);
    }

    .btn-action:active {
        transform: scale(0.97);
    }

/* ================================
   GRUPOS DE ACCIONES
   ================================ */

.action-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 15px 0;
}

.button-group-centered {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* ================================
   CARDS Y POPUPS
   ================================ */

.card-content {
    margin-top: 25px;
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header h3 {
    margin: 10px 0px;
    color: #0d47a1;
    font-size: 22px;
    font-weight: bold;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    overflow-y: auto;
    z-index: 1000;
}

.popup-overlay-high {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    z-index: 1100;
}

.popup-content {
    background: white;
    width: 95%;
    max-width: 450px;
    border-radius: 14px;
    padding: 20px 20px 20px 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: fadeIn 0.2s ease-in-out;
}

.btn-close-popup {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 22px;
    font-weight: bold;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #444;
}

    .btn-close-popup:hover {
        color: #000;
    }

.btn-close-form {
    position: absolute;
    right: 30px;
    font-size: 22px;
    font-weight: bold;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #444;
}

    .btn-close-form:hover {
        color: #000;
    }

/* ================================
   BUSCADORES Y DROPDOWNS
   ================================ */

.search-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 5px;
}

/* ================================
   LISTAS
   ================================ */

.list-scroll {
    max-height: 180px;
    overflow-y: auto;
    margin-top: 15px;
    padding: 0;
    list-style: none;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

    .list-item:last-child {
        border-bottom: none;
    }

/* ================================
   MENSAJES Y ALERTAS
   ================================ */

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
}

.alert-error-sm {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-top: 5px;
    text-align: center;
    font-size: 12px;
}

/* ================================
   LOGIN (ya existentes)
   ================================ */

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: white;
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: fadeIn 0.4s ease-in-out;
}

    .login-card img {
        width: 150px;
        margin-bottom: 15px;
    }

.input-group {
    margin-bottom: 15px;
}

    .input-group input {
        width: 100%;
        padding: 12px 14px;
        border: 1px solid #ccc;
        border-radius: 10px;
        font-size: 16px;
        outline: none;
        transition: border-color 0.2s;
    }

        .input-group input:focus {
            border-color: #1976d2;
        }

.btn-gradient {
    background: #1e88e5;
    border: none;
    color: white;
    padding: 12px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.25s;
}

    .btn-gradient:hover {
        opacity: 0.9;
    }

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
}

.divBase {
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-menu {
    width: 260px;
    padding: 18px;
    font-size: 20px;
    text-align: center;
    background: #1e88e5;
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, opacity 0.2s ease;
    display: block;
    margin: 1em auto;
}

    .btn-menu:hover {
        opacity: 0.9;
        transform: scale(1.03);
    }

    .btn-menu:active {
        transform: scale(0.97);
    }

.btn-menu-cerrar {
    background: #b32121;
}

/* ================================
   ANIMACIONES
   ================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================================
   RESPONSIVE - MÓVIL
   ================================ */

@media (max-width: 480px) {
    th,
    td {
        padding: 12px;
        font-size: 15px;
    }

    .action-group {
        align-items: stretch !important;
        width: 100%;
        gap: 12px;
    }

    .input-quantity {
        width: 100% !important;
        font-size: 18px;
    }

    .btn-action {
        width: 100% !important;
        font-size: 16px !important;
    }

    .btn-success-gradient {
        width: 100% !important;
        margin-top: 15px;
        font-size: 16px !important;
    }
    .btn-danger-gradient{
        width: 100% !important;
        margin-top: 15px;
        font-size: 16px !important;
    }

    .login-card {
        padding: 20px;
        border-radius: 14px;
    }

        .login-card img {
            width: 120px;
        }

    .btn-menu {
        width: 85%;
        font-size: 18px;
        padding: 16px;
    }
}
/* ================================ 
   SELECCIONADOR PEDIDOS - MOBILE CARDS 
   ================================ */

.popup-pedidos {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    width: 95%;
    max-width: 500px;
}

.popup-pedidos-card {
    background: #ffffff;
    width: 100%;
    border-radius: 1em;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: fadeInScale 0.2s ease-in-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-pedidos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0d47a1;
    color: white;
    padding: 0.8rem 1rem;
    font-weight: bold;
    font-size: 1rem;
}

    .popup-pedidos-header .btn-close-popup {
        color: white;
        font-size: 1.5rem;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.popup-pedidos-body {
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.pedidos-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pedido-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 0.75rem;
    padding: 0.75rem;
    padding-right: 2.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

    .pedido-card:active {
        transform: scale(0.98);
    }

    .pedido-card.selected {
        border-color: #1976d2;
        background: #e3f2fd;
        box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
    }

.pedido-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.pedido-numero {
    font-size: 1.1rem;
    font-weight: bold;
    color: #0d47a1;
    flex-shrink: 0;
}

.pedido-estado {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    background: #e0e0e0;
    color: #333;
    font-weight: 600;
    white-space: nowrap;
}

.pedido-card.selected .pedido-estado {
    background: #1976d2;
    color: white;
}

.pedido-distribuidor {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.3;
    word-wrap: break-word;
}

    .pedido-distribuidor strong {
        color: #000;
    }

.pedido-checkbox {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 20px;
    height: 20px;
    accent-color: #1976d2;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

.popup-pedidos-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.btn-add-pedidos {
    width: 100%;
    padding: 0.9rem;
    background: #006f05;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

    .btn-add-pedidos:active {
        opacity: 0.8;
    }

    .btn-add-pedidos:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

.popup-pedidos-body::-webkit-scrollbar {
    width: 6px;
}

.popup-pedidos-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.popup-pedidos-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}
.checkbox-app {

    width: 2.3em;
    height: 2.3em;
    accent-color: #1976d2;
    cursor: pointer;
}
