/* =========================================================
   HOTEL & TERMAS QUINAMÁVIDA
   CENTRO DE CONTROL ADMINISTRATIVO
   ========================================================= */

:root {
    --verde-oscuro: #173b29;
    --verde-medio: #2f6b4e;
    --verde-claro: #eaf3ed;
    --dorado: #b99754;
    --texto: #111827;
    --texto-secundario: #667085;
    --borde: #e4e7ec;
    --blanco: #ffffff;
    --peligro: #b42318;
    --radio-grande: 28px;
    --radio-medio: 18px;
    --radio-pequeno: 12px;
    --sombra-grande: 0 28px 80px rgba(7, 24, 15, 0.25);
    --sombra-tarjeta: 0 12px 30px rgba(7, 24, 15, 0.16);
}

/* RESET */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    background-color: var(--verde-oscuro);
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
    color: var(--texto);
    font-family: "Montserrat", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-image 0.45s ease;
}

body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    content: "";
    transition: background 0.45s ease;
}

button,
input {
    font: inherit;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
.card:focus-visible {
    outline: 3px solid rgba(185, 151, 84, 0.75);
    outline-offset: 4px;
}

/* =========================================================
   INICIO DE SESIÓN
   ========================================================= */

.login-wrapper {
    display: grid;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    flex: 1;
    padding: 32px 20px;
    place-items: center;
}

.login-container {
    position: relative;
    display: flex;
    width: min(100%, 450px);
    flex-direction: column;
    align-items: center;
    padding: 42px 40px 38px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radio-grande);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--sombra-grande);
    text-align: center;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: entrada-login 450ms ease both;
}

.login-container::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(
        90deg,
        var(--verde-oscuro),
        var(--dorado),
        var(--verde-medio)
    );
    content: "";
}

.login-logo {
    width: auto;
    max-width: 155px;
    height: auto;
    max-height: 100px;
    margin-bottom: 28px;
    object-fit: contain;
    filter: drop-shadow(0 7px 14px rgba(16, 24, 40, 0.12));
}

.login-container .title-login {
    margin-bottom: 8px;
    color: var(--verde-oscuro);
    font-family: "Playfair Display", serif;
    font-size: clamp(1.85rem, 5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: none;
    white-space: normal;
}

.login-container .subtitle-login {
    margin-bottom: 30px;
    color: var(--texto-secundario);
    font-size: 0.91rem;
    font-weight: 500;
    line-height: 1.5;
}

.login-container form {
    width: 100%;
}

.input-group {
    width: 100%;
    margin-bottom: 19px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #344054;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.035em;
}

.login-input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid #d0d5dd;
    border-radius: var(--radio-pequeno);
    outline: none;
    background: var(--blanco);
    color: var(--texto);
    font-family: "Montserrat", sans-serif;
    font-size: 0.94rem;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.login-input::placeholder {
    color: #98a2b3;
}

.login-input:hover {
    border-color: #b8c0cc;
}

.login-input:focus {
    border-color: var(--verde-medio);
    background: var(--blanco);
    box-shadow: 0 0 0 4px rgba(47, 107, 78, 0.11);
}

.btn-login {
    width: 100%;
    min-height: 54px;
    margin-top: 5px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--radio-pequeno);
    background: linear-gradient(
        135deg,
        #2f6b4e,
        #173b29
    );
    box-shadow: 0 10px 22px rgba(23, 59, 41, 0.23);
    color: var(--blanco);
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    cursor: pointer;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(23, 59, 41, 0.3);
    filter: brightness(1.07);
}

.btn-login:active {
    transform: translateY(0);
}

.error-msg {
    width: 100%;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #fecdca;
    border-radius: 11px;
    background: #fef3f2;
    color: var(--peligro);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

/* =========================================================
   BARRA SUPERIOR CLARA
   ========================================================= */

.header {
    position: sticky;
    z-index: 100;
    top: 0;
    display: flex;
    width: 100%;
    min-height: 96px;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    padding: 13px 24px;
    border-bottom: 1px solid rgba(23, 59, 41, 0.14);
    background: rgba(250, 249, 245, 0.96);
    box-shadow: 0 6px 24px rgba(16, 38, 26, 0.12);
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

#logoAdmin {
    display: flex;
    align-items: center;
    justify-content: center;
}

#logoAdmin img {
    width: auto;
    height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(16, 38, 26, 0.12));
}

/* =========================================================
   CONTENIDO DEL PANEL
   ========================================================= */

.dashboard-container {
    display: flex;
    width: 100%;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px 58px;
}

.title {
    margin-bottom: 10px;
    color: var(--blanco);
    font-family: "Playfair Display", serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
    text-align: center;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
    text-transform: none;
}

.subtitle {
    margin-bottom: 38px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* =========================================================
   TARJETAS DE ÁREAS
   ========================================================= */

.grid-container {
    display: grid;
    width: 100%;
    max-width: 1120px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 40px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radio-grande);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--sombra-grande);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.card {
    position: relative;
    display: flex;
    min-height: 205px;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radio-medio);
    background-color: var(--verde-oscuro);
    background-position: center;
    background-size: cover;
    box-shadow: var(--sombra-tarjeta);
    color: var(--blanco);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    isolation: isolate;
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease;
}

.card::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(7, 18, 12, 0.08) 12%,
            rgba(7, 21, 13, 0.85) 100%
        ),
        linear-gradient(
            90deg,
            rgba(12, 32, 21, 0.23),
            transparent 65%
        );
    content: "";
    transition: background 220ms ease;
}

.card::after {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 18px;
    display: grid;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: var(--blanco);
    content: "↗";
    font-size: 1rem;
    place-items: center;
    backdrop-filter: blur(8px);
    transition:
        transform 220ms ease,
        background 220ms ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 20px 38px rgba(5, 18, 10, 0.3);
}

.card:hover::before {
    background:
        linear-gradient(
            180deg,
            rgba(7, 18, 12, 0.02) 8%,
            rgba(7, 21, 13, 0.72) 100%
        ),
        linear-gradient(
            90deg,
            rgba(12, 32, 21, 0.14),
            transparent 65%
        );
}

.card:hover::after {
    transform: translate(2px, -2px);
    background: rgba(255, 255, 255, 0.22);
}

.card h2 {
    position: relative;
    z-index: 2;
    max-width: calc(100% - 30px);
    color: var(--blanco);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.035em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.card-spa,
.card-hab,
.card-comedor {
    grid-column: span 2;
}

.card-recep,
.card-recreacion {
    grid-column: span 3;
}

.card-spa {
    border-bottom: 4px solid #73a994;
    background-image: url("images/spa.png");
}

.card-hab {
    border-bottom: 4px solid #74899b;
    background-image: url("images/habitaciones.png");
}

.card-comedor {
    border-bottom: 4px solid #d79d58;
    background-image: url("images/comedor.png");
}

.card-recep {
    border-bottom: 4px solid #5fa3ad;
    background-image: url("images/recepcion.png");
}

.card-recreacion {
    width: auto;
    grid-column: span 3;
    justify-self: stretch;
    border-bottom: 4px solid #ac846d;
    background-image: url("images/recreacion.png");
}

/* =========================================================
   CERRAR SESIÓN
   ========================================================= */

.btn-logout {
    position: fixed;
    z-index: 110;
    top: 27px;
    right: 28px;
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 1px solid rgba(23, 59, 41, 0.18);
    border-radius: 11px;
    background: rgba(23, 59, 41, 0.07);
    color: var(--verde-oscuro);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.btn-logout:hover {
    transform: translateY(-1px);
    border-color: var(--peligro);
    background: var(--peligro);
    color: var(--blanco);
}

/* =========================================================
   SELECTOR DE SPA
   ========================================================= */

.swal2-popup {
    width: min(92vw, 510px) !important;
    padding: 32px 28px 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.72) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 28px 80px rgba(7, 24, 15, 0.3) !important;
    font-family: "Montserrat", sans-serif !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
}

.swal2-title {
    padding: 0 0 6px !important;
    color: var(--verde-oscuro) !important;
    font-family: "Playfair Display", serif !important;
    font-size: 1.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.015em !important;
    text-shadow: none !important;
}

.swal2-actions {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    margin: 24px 0 0 !important;
    padding: 0 !important;
}

.swal2-btn-custom {
    position: relative !important;
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    height: 124px !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding: 18px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 15px !important;
    box-shadow: 0 9px 22px rgba(16, 24, 40, 0.16) !important;
    color: var(--blanco) !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 0.91rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.025em !important;
    text-align: left !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.52) !important;
    cursor: pointer !important;
    transition:
        transform 170ms ease,
        box-shadow 170ms ease !important;
}

.swal2-btn-custom:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 14px 26px rgba(16, 24, 40, 0.22) !important;
}

.swal2-btn-custom:active {
    transform: translateY(0) scale(0.99) !important;
}

.swal2-btn-andres {
    background:
        linear-gradient(
            180deg,
            rgba(8, 24, 16, 0.06),
            rgba(8, 24, 16, 0.78)
        ),
        url("images/spaandes.png") center / cover no-repeat !important;
}

.swal2-btn-andres:hover {
    background:
        linear-gradient(
            180deg,
            rgba(8, 24, 16, 0),
            rgba(8, 24, 16, 0.66)
        ),
        url("images/spaandes.png") center / cover no-repeat !important;
}

.swal2-btn-magnolias {
    background:
        linear-gradient(
            180deg,
            rgba(24, 10, 28, 0.06),
            rgba(24, 10, 28, 0.78)
        ),
        url("images/spamagnolias.png") center / cover no-repeat !important;
}

.swal2-btn-magnolias:hover {
    background:
        linear-gradient(
            180deg,
            rgba(24, 10, 28, 0),
            rgba(24, 10, 28, 0.66)
        ),
        url("images/spamagnolias.png") center / cover no-repeat !important;
}

.swal2-btn-cerrar {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    height: 46px !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 2px !important;
    padding: 0 18px !important;
    border: 1px solid var(--borde) !important;
    border-radius: 11px !important;
    background: #f7f9f8 !important;
    box-shadow: none !important;
    color: #344054 !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-shadow: none !important;
}

.swal2-btn-cerrar:hover {
    transform: none !important;
    background: #eef1f0 !important;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 980px) {
    .grid-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-spa,
    .card-hab,
    .card-comedor,
    .card-recep {
        grid-column: auto;
    }

    .card-recreacion {
        grid-column: 1 / -1;
    }
}

/* =========================================================
   CELULARES
   ========================================================= */

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    .header {
        min-height: 78px;
        padding: 10px 18px;
    }

    #logoAdmin img {
        height: 56px;
    }

    .dashboard-container {
        padding: 36px 16px 44px;
    }

    .title {
        font-size: clamp(2.25rem, 11vw, 3rem);
    }

    .subtitle {
        margin-bottom: 28px;
        font-size: 0.88rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
        border-radius: 22px;
    }

    .card,
    .card-recreacion {
        width: 100%;
        min-height: 175px;
        grid-column: auto;
        padding: 22px;
        border-radius: 16px;
    }

    .btn-logout {
        position: relative;
        top: auto;
        right: auto;
        width: min(100%, 280px);
        min-height: 48px;
        margin: 4px auto 0;
        padding: 0 20px;
        border-color: rgba(255, 255, 255, 0.25);
        background: rgba(255, 255, 255, 0.14);
        color: var(--blanco);
        font-size: 0.9rem;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .btn-logout:hover {
        transform: none;
        border-color: var(--peligro);
        background: var(--peligro);
    }
}

@media (max-width: 520px) {
    .login-wrapper {
        padding: 18px 14px;
    }

    .login-container {
        padding: 34px 22px 30px;
        border-radius: 23px;
    }

    .login-logo {
        max-width: 135px;
        max-height: 90px;
        margin-bottom: 24px;
    }

    .swal2-popup {
        padding: 26px 18px 20px !important;
    }

    .swal2-title {
        font-size: 1.65rem !important;
    }

    .swal2-actions {
        grid-template-columns: 1fr !important;
    }

    .swal2-btn-custom {
        height: 108px !important;
    }

    .swal2-btn-cerrar {
        grid-column: auto !important;
        height: 46px !important;
    }
}

/* ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ANIMACIÓN DEL LOGIN */

@keyframes entrada-login {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

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