/* =========================================================
   VARIABLES GLOBALES
   ========================================================= */

:root {
    --brand: #8a0f68;
    --brand2: #b451c6;
    --ink: #152044;
    --muted: #667085;
    --line: #e7eaf2;
    --bg: #f6f8fc;
    --card: #fff;
    --success: #16a36b;
    --warn: #f5a000;
    --danger: #e5485d;
    --maint: #64748b;
    --radius: 16px;
    --shadow: 0 8px 28px rgba(22,34,68,.08);
}


/* =========================================================
   RESET Y ESTILOS BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    font-family: Inter,Segoe UI,Arial,sans-serif;
    color: var(--ink);
    background: var(--bg);
}

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

button, input, select, textarea {
    font: inherit;
}


/* =========================================================
   MENSAJES FLASH
   ========================================================= */

.flash {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.flash.ok {
    background: #eaf8f1;
    color: #116b49;
}

.flash.err {
    background: #fff0f2;
    color: #a21d36;
}


/* =========================================================
   MARCA / LOGOTIPO
   ========================================================= */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: Georgia,serif;
    color: var(--brand);
    font-weight: 800;
    letter-spacing: .5px;
}

.brand .mark {
    font-size: 28px;
}

.brand .stars {
    display: block;
    font-size: 11px;
    letter-spacing: 3px;
    margin-top: -2px;
}


/* =========================================================
   ESTRUCTURA GENERAL DEL PANEL ADMINISTRATIVO
   ========================================================= */

.admin-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 268px;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 18px 14px 14px;
    display: flex;
    flex-direction: column;
    z-index: 40;
}

.sidebar .brand {
    padding: 4px 12px 18px;
    font-size: 23px;
}

.nav-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #34405f;
    margin: 2px 0;
    font-size: 15px;
}

.nav-link:hover {
    background: #f7eff9;
    color: var(--brand);
}

.nav-link.active {
    background: linear-gradient(90deg
                                                                    ,#8a0f68,#a5287d);
    color: #fff;
}

.ico {
    width: 22px;
    text-align: center;
    font-size: 17px;
}

.sidebar-foot {
    border-top: 1px solid var(--line);
    padding: 12px 10px 0;
    font-size: 12px;
    color: var(--muted);
}


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

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 76px;
    margin-left: 268px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 24px;
}

.hamb {
    display: none;
    border: 0;
    background: #f4f6fb;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.search {
    max-width: 520px;
    flex: 1;
    position: relative;
}

.search input {
    width: 100%;
    border: 1px solid var(--line);
    background: #f8f9fd;
    border-radius: 10px;
    padding: 11px 14px 11px 38px;
    outline: none;
}

.search span {
    position: absolute;
    left: 13px;
    top: 11px;
}

.top-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--brand);
}


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

.admin-main {
    margin-left: 268px;
    padding: 20px 24px 40px;
}

.hero {
    min-height: 225px;
    border-radius: 16px;
    background: linear-gradient(90deg,
                                                                                                                rgba(7,15,31,.85),rgba(7,15,31,.16),
                                                                                                                rgba(7,15,31,.82)),
                                                                                                                url("../img/hotel-hero.jpg") center/cover;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 38px;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 38px;
    margin: 0 0 4px;
}

.hero .quote {
    font-style: italic;
    font-size: 17px;
    margin-top: 22px;
    max-width: 430px;
}

.hero-info {
    border-left: 1px solid
                                                                                                                             rgba(255,255,255,.5);
    padding-left: 25px;
    line-height: 1.7;
}


/* =========================================================
   TARJETAS KPI
   ========================================================= */

.grid-kpi {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 12px;
    margin-top: 14px;
}

.kpi {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.kpi .bubble {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 24px;
}

.kpi b {
    font-size: 26px;
    display: block;
    margin-top: 3px;
}

.kpi.blue {
    background: #f5f9ff;
}

.kpi.green {
    background: #f2fbf7;
}

.kpi.orange {
    background: #fff9ec;
}

.kpi.red {
    background: #fff4f6;
}

.kpi.gray {
    background: #f6f8fb;
}


/* =========================================================
   TARJETAS DE INGRESOS
   ========================================================= */

.income-row {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
    margin: 12px 0;
}

.income-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 17px 20px;
    display: flex;
    gap: 14px;
    align-items: center;
}

.income-card .money {
    font-size: 24px;
    font-weight: 800;
}


/* =========================================================
   GRÁFICAS Y PANELES
   ========================================================= */

.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 14px;
}

.panel-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 10px
                                                                                                                                                                                     rgba(22,34,68,.03);
}

.panel-card h2, .panel-card h3 {
    margin: 0 0 15px;
}

.chart-box {
    height: 310px;
    position: relative;
}

.room-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    height: 310px;
}

.legend {
    display: grid;
    gap: 10px;
    min-width: 240px;
}

.legend-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}


/* =========================================================
   TÍTULOS DE PÁGINA Y BOTONES
   ========================================================= */

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.page-title h1 {
    margin: 0;
    font-size: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-light {
    background: #f1f3f8;
    color: #27324f;
}

.btn-danger {
    background: #fff0f2;
    color: #b4233d;
}


/* =========================================================
   TABLAS
   ========================================================= */

.table-wrap {
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

.table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}


/* =========================================================
   BADGES / ESTADOS
   ========================================================= */

.badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.available, .badge.paid, .badge.completed, .badge.checked_out {
    background: #e9f8f1;
    color: #11724c;
}

.badge.reserved, .badge.pending, .badge.open {
    background: #fff7df;
    color: #8c6500;
}

.badge.occupied, .badge.checked_in, .badge.urgent {
    background: #fff0f2;
    color: #af2840;
}

.badge.maintenance, .badge.cancelled, .badge.void {
    background: #eef1f5;
    color: #566176;
}


/* =========================================================
   FORMULARIOS
   ========================================================= */

.form-card {
    max-width: 900px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px;
}

.field {
    display: grid;
    gap: 6px;
}

.field.full {
    grid-column: 1/-1;
}

.field label {
    font-weight: 600;
    font-size: 14px;
}

.field input, .field select, .field textarea {
    width: 100%;
    border: 1px solid #d9deea;
    border-radius: 10px;
    padding: 11px 12px;
    background: #fff;
    outline: none;
}

.field textarea {
    min-height: 100px;
    resize: vertical;
}

.field input:focus, .field select:focus, .field textarea:focus {
    border-color: #b255a1;
    box-shadow: 0 0 0 3px rgba(138,15,104,.08);
}


/* =========================================================
   AUTENTICACIÓN
   ========================================================= */

.auth-shell {
    min-height: 100vh;
    display: grid;

    /* La imagen ocupa el espacio restante
       y el formulario solo 460px */
    grid-template-columns: minmax(0, 1fr) 460px;

    background: #fff;
}


.auth-art {
    background: linear-gradient(rgba(12,17,35,.45),rgba(12,17,35,.58)),url("../img/hotel-hero.jpg") center/cover;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    color: #fff;
}

.auth-art .brand {
    color: #fff;
    font-size: 28px;
}

.auth-card-wrap {
    display: grid;
    place-items: center;
    padding: 12px;
}

/* La imagen ocupa el espacio restante.auth-card {
    width: min(400px,100%);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
}
*/

.auth-card {
    width: 100%;
    max-width: 410px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
    box-sizing: border-box;
    }

.auth-card h1 {
    margin: 0 0 8px;
}

.auth-card p {
    color: var(--muted);
    line-height: 1.55;
}

.otp-row {
    display: flex;
    gap: 9px;
    margin: 20px 0;
}

.otp-row input {
    width: 100%;
    font-size: 30px;
    letter-spacing: 14px;
    text-align: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}


/* =========================================================
   SITIO PÚBLICO
   ========================================================= */

.public-head {
    height: 76px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 6%;
    gap: 30px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.public-head .brand {
    font-size: 24px;
}

.public-nav {
    display: flex;
    gap: 24px;
    margin-left: auto;
}

.public-hero {
    min-height: 520px;
    background: linear-gradient(90deg,rgba(13,17,33,.75),rgba(13,17,33,.2)),url("../img/hotel-hero.jpg") center/cover;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 8%;
}

.public-hero h1 {
    font: 700 56px/1.02 Georgia,serif;
    max-width: 720px;
    margin: 0 0 18px;
}

.public-hero p {
    font-size: 20px;
    max-width: 620px;
}

.public-section {
    padding: 50px 7%;
    max-width: 1400px;
    margin: auto;
}


/* =========================================================
   TARJETAS DE HABITACIONES
   ========================================================= */

.room-cards {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
}

.room-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
/* =========================================================
   tamaño de fotos
   ========================================================= */
/* Ajuste final de tarjetas de habitaciones */
.room-card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    overflow:hidden;
}

/* Imagen con una pequeña separación del marco */
.room-photo{
    width:calc(100% - 0px);
    height:300px;
    margin:1px 1px 0 1px;
    overflow:hidden;
    border-radius:1px;
}

.room-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* Posición del texto */
.room-body{
    padding:5px 0px 10px 20px;
    background:#fff;
}

.room-body h3{
    margin:0 0 10px 0;
}

.room-body p{
    margin:0 0 10px 0;
}

.room-body .price{
    margin:4px 0 10px 0;
}

.price {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand);
}

.room-body .price small{
    color:#020c20;
    font-size:15px;
    font-weight:900;
}
.mobile-overlay {
    display: none;
}



/* =========================================================
   DISEÑO RESPONSIVE
   ========================================================= */

@media (max-width:1150px) {
    .grid-kpi {
        grid-template-columns: repeat(3,1fr);
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .room-cards {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width:860px) {
    .sidebar {
        transform: translateX(-100%);
        transition: .25s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.45);
        z-index: 35;
    }

    .topbar, .admin-main {
        margin-left: 0;
    }

    .hamb {
        display: block;
    }

    .grid-kpi {
        grid-template-columns: repeat(2,1fr);
    }

    .income-row {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 240px;
        padding: 25px;
    }

    .hero-info {
        display: none;
    }

    .hero h1 {
        font-size: 31px;
    }

    .room-chart {
        flex-direction: column;
        height: auto;
    }

    .chart-box {
        height: 280px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-art {
        display: none;
    }

    .public-nav {
        display: none;
    }

    .room-cards {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }
}

@media (max-width:520px) {
    .admin-main {
        padding: 12px;
    }

    .topbar {
        padding: 0 12px;
    }

    .top-user .name {
        display: none;
    }

    .grid-kpi {
        grid-template-columns: 1fr 1fr;
    }

    .kpi {
        padding: 13px;
        gap: 9px;
    }

    .kpi .bubble {
        width: 40px;
        height: 40px;
    }

    .kpi b {
        font-size: 22px;
    }

    .hero {
        min-height: 210px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .public-hero h1 {
        font-size: 42px;
    }


    .login-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}


}


/* =========================================================
   COMPONENTES ADICIONALES DE AUTENTICACIÓN
   ========================================================= */

.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--brand);
    font-family: Georgia,serif;
    font-weight: 800;
    font-size: 20px;
}

.auth-logo span {
    font-size: 11px;
    letter-spacing: 3px;
}

.auth-main-btn {
    width: 100%;
    margin-top: 18px;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

.remember-row input {
    width: auto;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 18px;
}

/* Evita que el estilo anterior de remember-row
   agregue espacio extra dentro de login-options */
.login-options .remember-row {
    margin-top: 0;
}

.forgot-password {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    white-space: nowrap;
}

.forgot-password:hover {
    text-decoration: underline;
}


.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #98a2b3;
    margin: 20px 0;
}

.auth-divider:before, .auth-divider:after {
    content: "";
    height: 1px;
    background: var(--line);
    flex: 1;
}

.google-btn {
    width: 100%;
    background: #fff;
    color: #26324a;
    border: 1px solid #d9deea;
}

.google-btn:hover:not(:disabled) {
    background: #f7f8fb;
}

.google-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.google-g {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    font-weight: 900;
    color: #4285f4;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.auth-note {
    display: block;
    text-align: center;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.4;
}

.auth-links {
    text-align: center;
}

.auth-links a {
    color: var(--brand);
    font-weight: 700;
}

.verify-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 14px;
}
