:root{
    --celeste: #0092db;
    --celeste-texto: #0080c0;
    --text: #000;
    --titulo: #333;
    --muted: #6a6a6a;
    --border: #ddd;
    --border-strong: #aaa;
    --border-soft: #ebebeb;
    --bg-soft: #f7f7f7;
    --bg-chip: #f2f2f2;
    --hover: #efefef;
    --accent: #ff385c;
    --shadow: 0 8px 24px rgba(0,0,0,.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --header-height: 65px;
    --sidebar-width: 400px;
}

*{
    box-sizing: border-box;
}

html,
body{
    margin: 0;
    padding: 0;
    height: 100%;
    background: #ffffff;
    color: var(--text);
    font-family: 'Airbnb Cereal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: clip;
}

a{
    color: inherit;
    text-decoration: none;
}

.app-shell{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* layout principal */

.page-layout{
    display: grid;
    flex: 1;
    grid-template-columns: 1fr;
}

.page-main{
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 40px 30px 40px;
}

/* header */

.topbar{
    height: var(--header-height);
    background: var(--celeste);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 0 30px;
}

.brand{
    display: flex;
    align-items: center;
    min-width: max-content;
}

.brand a{
    display: flex;
    align-items: center;
}

.brand img{
    display: block;
    width: 180px;
    height: auto;
}

.topnav{
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    overflow: visible;
    flex-wrap: nowrap;
}

.topnav a{
    position: relative;
    color: #fff;
    white-space: nowrap;
    font-weight: 300;
    font-size: 16px;
    line-height: 1;
    padding: 6px 0;
}

.topnav a.is-active,
.topnav .nav-item.is-active > a{
    font-weight: 400;
}

.topnav a.is-active:after,
.topnav .nav-item.is-active > a:after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #fff;
}

.topnav span {
    color: #73c5ee;
}

.topbar-actions{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: max-content;
}

.menu-button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255,255,255,.14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    transition: background .15s ease;
}

.menu-button:hover {
    background: rgba(255,255,255,.22);
}

.menu-button i{
    color: #fff;
    font-size: 18px;
    line-height: 1;
}

.menu-button img {
    width: 40px;
    height: 40px;
}

.enlaces-retorno{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 24px;
    row-gap: 8px;
    margin-bottom: 22px;
    font-size: 16px;
}

.enlaces-retorno a{
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: var(--celeste-texto);
}

.enlaces-retorno .retorno-icon{
    display: inline-block;
    flex: none;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.enlaces-retorno .retorno-icon-volver{
    -webkit-mask-image: url('/img/svg/volver.svg');
    mask-image: url('/img/svg/volver.svg');
}

.enlaces-retorno .retorno-icon-cama{
    -webkit-mask-image: url('/img/svg/cama.svg');
    mask-image: url('/img/svg/cama.svg');
}

.enlaces-retorno a:hover,
.enlaces-retorno a:focus-visible{
    color: var(--titulo);
}

.cabecera{
    display: flex;
    align-items: center;
}

.cabecera h1{
    margin: 0 0 25px 0;
    font-size: 30px;
    font-weight: 500;
    color: #444;
    letter-spacing: -0.03em;
}

.cabecera h1 span{
    font-size: 20px;
    font-weight: 400;
}

@media (max-width: 768px){

    .cabecera h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }
}

@media (max-width: 640px){

    .topbar {
        padding: 0 25px;
    }

    .cabecera h1 {
        font-size: 25px;
        margin-bottom: 15px;
    }
}

/* campanita */

.campana {
    width: 24px;
    height: 24px;
    display: block;
    transform-origin: 50% 12%;
    animation: campana .7s ease-in-out infinite;
}

@keyframes campana {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(13deg); }
    30%  { transform: rotate(-13deg); }
    45%  { transform: rotate(9deg); }
    60%  { transform: rotate(-9deg); }
    75%  { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}


/* modales */

.backdrop{
    position:fixed;
    inset:0;
    z-index:40;
    background:rgba(0,0,0,.6);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .3s ease, visibility 0s linear .3s;
}

#backdrop.backdrop-salida-lenta{
    transition-duration: 1s;
}

.backdrop.is-active{
    opacity:1;
    visibility:visible;
    transition: opacity .3s ease, visibility 0s;
    pointer-events:auto;
}

.modal-loading{
    text-align: center;
    margin-top: 17px;
}

.spinner{
    width: 40px;
    height: 40px;
    border: 3px solid #ddd;
    border-top-color: var(--celeste);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin{
    to { transform: rotate(360deg); }
}

.modal{
    position: fixed;
    inset: 0;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 60;
}


.modal.is-open{
    opacity: 1;
    visibility: visible;
}

.modal-dialog{
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    box-shadow: var(--shadow);
    transform: translateY(20px) scale(.96);
    opacity: 0;
    transition: all .25s ease;
    margin: auto 0;
    max-height: none;
    overflow: visible;
    border-radius: 18px;
}

.modal.is-open .modal-dialog{
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-close,
.drawer-close {
    width:40px;
    height:40px;
    border:none;
    cursor:pointer;
    background:transparent;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.modal-close::before,
.drawer-close::before {
    content:"";
    width:18px;
    height:18px;
    background-color:#444;
    -webkit-mask: url('/img/svg/cancel.svg') center/contain no-repeat;
            mask: url('/img/svg/cancel.svg') center/contain no-repeat;
}

.modal-close:hover {
    background:#ddd;
}

.modal-close:hover::before,
.drawer-close:hover::before{
    background-color:#000;
}

.modal-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background-color: #f5f5f5;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom: 1px solid #ddd;
}

.modal-title{
    margin: 0;
    font-size: 28px;
    font-weight: 400;
    color: var(--text);
}

.modal-body{
    padding: 25px;
}

.modal-body.codigo-verificacion {
    padding: 25px 25px 25px 25px;
}

/* errores en la carga del modal */
.modal-body.error{
    padding-bottom: 25px;
    color: #e00;
}

.modal-body.error .icon-attention{
    color: #f00;
}

.modal-footer{
    padding: 20px 25px;
    border-top: 1px solid #ddd;
    background-color: #f5f5f5;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;    
    display: flex;
    justify-content: flex-end;
}

.modal-footer.login {
    display: block;
    font-size: 12px;
    text-align: center;
}

.modal-footer.login a {
    color: #007cbb;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-check-row{
    margin-bottom: 20px;
}

.modal-links{
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-links a{
    font-size: 14px;
    color: var(--celeste);
}

.modal-links a:hover{
    text-decoration: underline;
}

#modalBorrarTexto {
    margin: 5px 0 25px 0;
    line-height: 25px;
}


/* login */

.modal-dialog.login{
    max-width: 400px;
}

.modal-submit{
    width: 100%;
}

.login-social-separador{
    position:relative;
    margin:25px 0 20px;
    text-align:center;
}

.login-social-separador::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:50%;
    border-top:1px solid #e3e3e3;
}

.login-social-separador span{
    position:relative;
    background:#fff;
    padding:0 14px;
    color:#888;
    font-size:14px;
}

.login-social{
    display:flex;
    gap:12px;
    margin-bottom:20px;
}

.login-social-btn{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:15px;
    border:1px solid #ddd;
    border-radius:10px;
    background:#fff;
    transition:.15s;
}

.login-social-btn:hover{
    border-color:#0092db;
    background:#f7fbff;
}

.login-social-btn svg{
    width:24px;
    height:24px;
}

/* drawers */

.drawer{
    position: fixed;
    top: 0;
    bottom: 0;
    width: 290px;
    background: #fff;
    z-index: 50;
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
}

.drawer-header{
    display: flex;
    justify-content: flex-end;
    padding: 16px 16px 0 16px;
}

.drawer-close{
    width: 36px;
    height: 36px;
    display: inline-flex;
    transition: background .15s ease;
}

.drawer-close:hover{
    background: rgba(0,0,0,.06);
}

.drawer-close i{
    font-size: 18px;
}

.drawer-right{
    right: 0;
    transform: translateX(100%);
}

.drawer-right.is-open{
    transform: translateX(0);
}

.drawer-content{
    padding: 28px;
    overflow-y: auto;
}

.drawer-content h3{
    margin: 0 0 18px 0;
    font-size: 20px;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.drawer-content > a{
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    font-weight: 300;
}

.drawer-content a:last-child{
    border-bottom: none;
}

.drawer-content a.logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.drawer-content a.logout img {
    width: 24px;
    height: 24px;
    display: block;
    transform: translateY(3px);
}


/* toast */

.toast {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 99999;
    transform: translate(-50%, -20px);
    min-width: 260px;
    max-width: 90vw;
    padding: 15px 30px 20px 30px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    background-color: #effaff;
    color: #007cba;
    border: 5px solid #0092db;
    border-top: 0;
    font-size: 18px;
    line-height: 1.35;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast.ok {
    background-color: #e3fddf;
    border-color: #027000;
    color: #026400;
}

.toast.error {
    background-color: #ffd2d2;
    border-color: #bf0000;
    color: #bf0000;
}


/* tooltips */

.tooltip {
    position: relative;
}

/* base común */
.tooltip::after,
.tooltip::before{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
}

/* tooltip simple (usa atributo dtat-tooltip) */
.tooltip::after {
    content: attr(data-tooltip);
    bottom: calc(90% + 12px);
    background: #f8fbfd;;
    color: #666;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4em;
    letter-spacing: -0.03em;
    white-space: pre-line;
    width: max-content;
    max-width: 250px;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    z-index:1002;
}

/* tooltip html */
.tooltip-html{
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(90% + 12px);
    transform: translateX(-50%);
    background: #f8fbfd;
    color: #666;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4em;
    letter-spacing: -.03em;
    width: max-content;
    max-width: 250px;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0,0,0,.5);
    z-index: 1002;
}

/* si existe tooltip html, oculta el clásico */
.tooltip.has-html::after{
    display: none;
}

/* cuadrado rotado 45 grados para armar el piquito */
.tooltip::before{
    content:"";
    position: absolute;
    left:50%;
    bottom:calc(90% + 6px);
    width:12px;
    height:12px;
    background:#f8fbfd;
    border-left:2px solid #ccc;
    border-bottom:1px solid #ccc;
    transform: translateX(-50%) rotate(-45deg);
    opacity: 0;
    transition: .2s;
    z-index:1003;

}

/* hover */
.tooltip:hover::before{
    opacity:1;
    transform: translateX(-50%) translateY(-5px) rotate(-45deg);
}

.tooltip:hover::after{
    opacity:1;
    transform: translateX(-50%) translateY(-5px);
}

.tooltip:hover > .tooltip-html{
    display: block;
    transform: translateX(-50%) translateY(-5px);
}

.tooltip-precio-fila {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    white-space: nowrap;
    margin-top: 3px;
}

.tooltip-precio-fila .tooltip-fecha {
    font-size: 13px !important;
}
.tooltip-precio-fila .tooltip-precio {
    font-size: 13px !important;
    font-weight: 500;
    color: #666;
}

.tooltip-titulo {
    font-size: 18px !important;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.precio-ayuda {
    cursor: pointer;
}

.precio-ayuda img {
    width: 18px;
    height: 18px;
    margin: -4px 1px;
}




/* footer */

.footer {
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    height: 200px;
    padding: 0;
    margin-top: 30px;

    display: flex;
    flex-direction: column;

    font-size: 16px;
    color: #444;
}

.footer .info {
    padding: 15px 40px;


}

.footer .copy {
    background-color: #fff;
    margin-top: auto;
    padding: 15px 40px;
    display: flex;
    border-top: 1px solid #ddd;
    justify-content: space-between;
    align-items: center;
}

.footer .copy .izq,
.footer .copy .der {
    margin: 0;
}

@media (max-width: 900px){

    .footer .info {
        padding: 15px 25px;
    }

    .footer .copy {
        padding: 15px 25px;
    }
}

@media (max-width: 640px){

    .footer .info {
        padding: 15px 15px;
        font-size: 12px;
    }

    .footer .copy {
        padding: 15px 15px;
        font-size: 13px;
    }
}





