html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.descuento-img {
    max-height: 80px; /* la imagen nunca será más alta de 80px */
    max-width: 80%; /* opcional: limitar también el ancho */
    object-fit: contain;
    display: block; /* necesario para que margin auto funcione */
    margin: 0 auto; /* centra horizontalmente */
}

.descuento-card {
    border-left: 6px solid #28a745;
    background: #f3fff6;
    transition: transform .15s ease-in-out;
}

    .descuento-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    }

.descuentos-wrapper {
    border: 2px dashed #28a745;
    padding: 1rem;
    border-radius: 10px;
    background: #f8fff8;
}

.titulo-descuentos {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    color: #1f7a1f;
    position: relative;
    padding-bottom: .5rem;
}

    .titulo-descuentos::after {
        content: "";
        width: 80px;
        height: 3px;
        background: #28a745;
        display: block;
        margin: 0.5rem auto 0;
        border-radius: 2px;
    }

.descuento-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ================================
   SIDEBAR OSCURO PROFESIONAL
   ================================ */

.sidebar {
    background-color: #1f1f1f; /* gris oscuro elegante */
    color: white;
    min-width: 240px; /* tamaño cómodo */
    padding-top: 1rem;
}

    .sidebar a,
    .sidebar .nav-link {
        color: #e0e0e0 !important;
        font-weight: 500;
        padding: 0.65rem 1rem;
        display: block;
        border-radius: 6px;
        transition: background-color .2s ease, color .2s ease;
    }

        .sidebar .nav-link:hover {
            background-color: #2a2a2a;
            color: white !important;
        }

        .sidebar .nav-link.active {
            background-color: #0d6efd; /* azul corporativo */
            color: white !important;
        }

    .sidebar .mud-icon-root,
    .sidebar i,
    .sidebar svg {
        color: #e0e0e0 !important;
    }

    /* Separadores o títulos dentro del menú */
    .sidebar .menu-section-title {
        color: #bbbbbb;
        font-size: 0.85rem;
        text-transform: uppercase;
        margin: 1rem 1rem 0.5rem;
        opacity: 0.8;
    }

/* Encabezado del sidebar */
.sidebar-header {
    background-color: #1f1f1f; /* mismo color que el sidebar */
    border-bottom: 1px solid #2a2a2a;
}

    .sidebar-header img {
        max-height: 60px;
        width: auto;
    }

/* Eliminar la franja clara que aparece encima del logo en el sidebar */ .sidebar .top-row {
    background: transparent !important;
    border: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

nav.sidebar {
    padding: 0 !important;
    margin: 0 !important;
}

/* Card layout: limit overall card height and image size so images don't appear too large */
.card.h-100 {
    max-height: 320px; /* aumenta si necesitas más espacio total */
    display: flex;
    flex-direction: column;
}

    .card.h-100 .card-img-top {
        height: 140px; /* el recuadro mide siempre 140px */
        width: 100%;
        display: flex; /* para poder centrar la imagen dentro */
        align-items: center;
        justify-content: center;
        background-color: #f9f9f9; /* opcional, color de fondo */
    }

.card-clickable {
    cursor: pointer; /* Cambia el cursor */
    transition: transform 0.2s, box-shadow 0.2s;
}

    .card-clickable:hover {
        transform: translateY(-5px); /* Se eleva un poco */
        box-shadow: 0 8px 20px rgba(0,0,0,0.2); /* Sombra más marcada */
    }

.card.h-100 .card-body {
    /* dejar que el cuerpo ocupe el resto y evitar overflow violento */
    flex: 1 1 auto;
    overflow: hidden;
    padding: 0.75rem;
}

.logo-nav {
    height: 150px;
}

/* Asegurar que el contenedor de la marca no cambie de altura y centre el logo */
.navbar .navbar-brand {
    display: flex;
    align-items: center;
    height: auto; /* ? LIBERA EL TAMAÑO */
    padding: 10px 0; /* opcional, para centrar */
}


.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 {
    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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg2Ny4wMTgzIDI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

.cookie-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 9998;
}

.cookie-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffefef;
    border: 3px solid #ff4d4d;
    padding: 30px;
    width: 90%;
    max-width: 480px;
    border-radius: 12px;
    z-index: 9999;
    text-align: center;
    animation: popIn 0.3s ease-out;
}

    .cookie-modal h3 {
        color: #c40000;
        font-weight: bold;
    }

    .cookie-modal button {
        width: 100%;
        padding: 12px;
        font-size: 1.1rem;
        margin-top: 10px;
    }

.cookie-accept {
    background: #28a745;
    border: none;
    color: white;
    font-weight: bold;
}

.cookie-reject {
    background: #6c757d;
    border: none;
    color: white;
}

@keyframes popIn {
    from {
        transform: translate(-50%, -60%) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 350px;
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 25px;
    cursor: pointer;
}

.association-logo {
    width: 80px;
    margin-bottom: 10px;
}

.qr-container img {
    width: 180px;
    height: 180px;
    margin-top: 15px;
}

.modal-superwide {
    max-width: 90vw !important;
    margin: auto !important;
}

/* Modal hermano: más ancho, centrado y alto con scroll interno */
.modal.fade.show.d-block .modal-dialog.modal-xl {
    max-width: 1400px !important;
    width: 92% !important;
    margin: 1.5rem auto !important; /* fuerza centrado */
}

/* Fix modal hermano: forzar ancho del contenido y evitar romper letras */
.modal.fade.show.d-block .modal-content {
    width: auto !important;        /* anula width:350px global */
    max-width: 1200px !important;  /* límite razonable */
    box-sizing: border-box;
    max-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Cuerpo con scroll (no rompe el footer/header) */
.modal.fade.show.d-block .modal-body {
    overflow: auto !important;
    flex: 1 1 auto !important;
    padding: 1rem !important;
}

/* Asegura que la tabla use todo el ancho disponible y no fuerce celdas muy estrechas */
.modal.fade.show.d-block .table-responsive table {
    width: 100% !important;
    table-layout: auto !important;
}

/* Evitar romper por carácter: usar overflow-wrap (más seguro) */
.modal.fade.show.d-block td,
.modal.fade.show.d-block th {
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
    vertical-align: middle;
}

/* Permitir que las celdas se reduzcan correctamente en flex containers */
.modal.fade.show.d-block .table-responsive td,
.modal.fade.show.d-block .table-responsive th {
    min-width: 0;
}

/* Mantener botones en una sola línea */
.modal.fade.show.d-block table .btn {
    white-space: nowrap;
}