﻿:root {
    --azul-tec: #1B3589;
    --azul-claro: #1976D2;
    --azul-transparente: rgba(0, 51, 102, 0.19);
    --azul-resalte: #f5faff;
    --azul-resalte-borde: #d9e8fc;
    --blanco: #fff;
    --gris-claro: #F5F6FA;
    --gris-sombra: #E7EAF6;
    --gris-medio: #D1D5DB;
    --gris-fondo: #f2f6fc;
    --verde-acento: #43A047;
    --rojo-acento: #D32F2F;
    --amarillo-acento: #FFB300;
    --sombra-modal: 0 8px 40px rgba(0,0,0,0.14);
    --fuente: 'Montserrat', 'Roboto', Arial, sans-serif;
}

.font-weight-500 {
    font-weight: 500 !important;
}

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

a {
    color: var(--azul-claro);
}

.btn-primary {
    background-color: var(--azul-claro) !important;
    border-color: var(--azul-claro);
}

    .btn-primary:hover {
        background-color: var(--azul-tec) !important;
        border-color: var(--azul-tec);
    }

.btn-secondary {
    background-color: var(--gris-medio) !important;
    color: var(--azul-tec) !important;
    border: none;
}

    .btn-secondary:hover {
        background-color: var(--azul-tec) !important;
        color: var(--blanco) !important;
    }

html {
    font-size: 16px;
}

.form-control:focus {
    border-color: var(--azul-claro);
    box-shadow: none;
}

html, body {
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    background-color: var(--gris-fondo);
    font-family: 'Inter', Arial, sans-serif;
}

.body-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 100%;
}

.container {
    max-width: 700px;
    flex: 1 0 auto;
}

.footer-copyright {
    text-align: center;
    width: 100%;
    background-color: var(--azul-tec);
    padding: 1rem;
    color: var(--blanco);
}

.header-bar {
    background-color: var(--azul-tec);
}

    .header-bar div {
        width: 700px;
    }

@media (max-width:768px) {
    .container {
        margin-bottom: 1em;
    }
}

.flex-container {
    display: flex;
}

li {
    list-style: none;
}

.card-bienvenido {
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--gris-sombra);
}

.card-referencias {
    border-radius: 13px;
    background-color: var(--gris-sombra);
    padding-top: 2rem;
    padding-bottom: 1rem;
}

.btn-copiar-referencia {
    border-radius: 20px;
    position: absolute;
    right: 5px;
    top: 5px;
    cursor: pointer;
}

    .btn-copiar-referencia > h6 {
        font-size: 13px;
        margin: 0px;
        padding: 3px 10px;
    }

.modal-content {
    border-radius: 0.8rem;
    border: none;
}

.modal-header {
    border: none;
    display: grid;
    grid-template-columns: 1fr auto;
}

    .modal-header h5 {
        margin-bottom: 0;
        line-height: 1.5;
        text-align: center;
        margin-right: -1em;
    }

.modal-body {
    padding-bottom: 0;
}

.modal-footer {
    border-top: none !important;
    /*display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;*/
}

.btn-close:focus {
    box-shadow: none;
}

.btn-close:hover {
    background-color: var(--azul-transparente);
}

@media (min-width:768px) {
    .modal-footer {
        justify-content: space-between;
    }
}

@media (max-width:768px) {
    .modal-footer {
        justify-content: center;
    }
}

/* width */
::-webkit-scrollbar {
    width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px var(--gris-medio);
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: var(--azul-tec);
}

    /* Handle on hover */
    ::-webkit-scrollbar-thumb:hover {
        background: var(--azul-tec);
    }

/* Spinner */
.spinner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--azul-transparente, rgba(0, 51, 102, 0.19));
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1070;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 6px solid var(--gris-claro);
    border-top: 6px solid var(--azul-claro);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    background: transparent;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Toast container */
.toast-container {
    position: fixed;
    top: 1.5em;
    right: 1.5em;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    pointer-events: none;
}

.toast {
    min-width: 240px;
    max-width: 370px;
    background: var(--blanco);
    color: var(--azul-tec);
    padding: 1em 1.6em 1em 1em;
    border-radius: 8px;
    box-shadow: var(--sombra);
    font-size: 1em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1em;
    border-left: 6px solid var(--azul-claro);
    opacity: 0;
    transform: translateX(30px);
    animation: toastIn 0.5s forwards;
    pointer-events: auto;
    position: relative;
}

    .toast.success {
        border-left-color: var(--verde-acento);
    }

    .toast.error {
        border-left-color: var(--rojo-acento);
    }

    .toast.warning {
        border-left-color: var(--amarillo-acento);
    }

    .toast .toast-icon {
        font-size: 1.3em;
        min-width: 1.3em;
        text-align: center;
    }

    .toast .toast-close {
        background: none;
        border: none;
        color: #555;
        font-size: 1.2em;
        position: absolute;
        right: 0.7em;
        top: 0.8em;
        cursor: pointer;
        opacity: 0.7;
        transition: opacity 0.2s;
        pointer-events: auto;
    }

        .toast .toast-close:hover {
            opacity: 1;
        }

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}
/* Responsive */
@media (max-width: 500px) {
    .toast-container {
        right: 0.5em;
        top: 0.5em;
    }

    .toast {
        min-width: 180px;
        max-width: 95vw;
        font-size: 0.99em;
    }
}

/* Overlay de fondo */
.alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 51, 102, 0.19);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    animation: overlayIn 0.19s;
}

@keyframes overlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
/* Alerta tipo SweetAlert2 */
.alert-card {
    background: var(--blanco);
    border-radius: 16px;
    box-shadow: var(--sombra-alerta);
    min-width: 320px;
    max-width: 98vw;
    width: 100%;
    max-width: 400px;
    position: relative;
    padding: 2em 2.5em 2em 2.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: alertIn 0.37s cubic-bezier(.31,.93,.42,1.2);
}

@keyframes alertIn {
    from {
        opacity: 0;
        transform: scale(.85);
    }

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

.alert-icon {
    font-size: 3em;
    margin-bottom: 0.3em;
    margin-top: -0.3em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

    .alert-icon.success {
        color: var(--verde-acento);
    }

    .alert-icon.error {
        color: var(--rojo-acento);
    }

    .alert-icon.warning {
        color: var(--amarillo-acento);
    }

    .alert-icon.info {
        color: var(--azul-claro);
    }

.alert-title {
    font-size: 1.35em;
    font-weight: 700;
    color: var(--azul-tec);
    margin-bottom: 0.3em;
    text-align: center;
    letter-spacing: 1px;
}

.alert-text {
    color: #222;
    font-size: 1.05em;
    text-align: center;
    margin-bottom: 1.5em;
    margin-top: 0.2em;
    line-height: 1.5;
}

.alert-actions {
    display: flex;
    gap: 1em;
    justify-content: center;
    width: 100%;
}

.alert-btn {
    padding: 0.75em 1.6em;
    border: none;
    border-radius: 7px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.alert-btn-primary {
    background: var(--azul-claro);
    color: var(--blanco);
}

    .alert-btn-primary:hover {
        background: var(--azul-tec);
    }

.alert-btn-secondary {
    background: var(--gris-medio);
    color: var(--azul-tec);
}

    .alert-btn-secondary:hover {
        background: var(--azul-claro);
        color: var(--blanco);
    }

.alert-close {
    position: absolute;
    top: 1.1em;
    right: 1.1em;
    font-size: 1.3em;
    color: var(--gris-medio);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 1;
}

    .alert-close:hover {
        opacity: 1;
        color: var(--azul-claro);
    }

@media (max-width: 500px) {
    .alert-card {
        padding: 1.1em 0.6em;
        margin: 0 0.3em;
    }

    .alert-icon {
        margin-top: 0.1em;
    }
}

.success-div span {
    font-size: 2.5em;
    color: var(--verde-acento);
}

.warning-div span {
    font-size: 2.5em;
    color: var(--amarillo-acento);
}

.expired-div span {
    font-size: 2.5em;
    color: var(--rojo-acento);
}

.success-detail {
    background-color: var(--azul-resalte);
    border: 1px solid var(--azul-resalte-borde);
    border-radius: 10px;
}

    .success-detail .list-group-item {
        display: flex;
        justify-content: space-between;
        border: none;
        background-color: transparent;
        padding-left: 0;
        padding-right: 0;
    }

        .success-detail .list-group-item b {
            color: var(--azul-tec);
        }

.success-info > img {
    width: 90%;
}
