/* ========================================
   HOTEL MASTER - Telas de Autenticação
   Estilos compartilhados entre os 5 templates
   ======================================== */

:root {
    --auth-primary: #333889;
    --auth-primary-hover: #2a2e72;
    --auth-dark: #111a35;
    --auth-teal: #14b8a6;
    --auth-red: #f43f5e;
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-form-wide {
    max-width: 560px;
}

.auth-form-head {
    margin-bottom: 1.5rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.auth-brand {
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--auth-primary);
}

/* Inputs */
.auth-input {
    background: #f1f5f9;
    border: 1.5px solid transparent;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
    background: #fff;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.2rem rgba(51, 56, 137, 0.12);
}

.auth-input-group {
    position: relative;
}

.auth-input-group .auth-input {
    padding-left: 2.5rem;
}

.auth-input-group .auth-input:not([type="password"]):only-child {
    padding-left: 2.5rem;
}

.auth-input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 5;
}

/* Campo senha sem ícone à esquerda (formulário de cadastro) */
#form-register .auth-input-group .auth-input {
    padding-left: 0.9rem;
    padding-right: 2.5rem;
}

.auth-toggle-pass {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #9ca3af;
    padding: 0.25rem 0.4rem;
    z-index: 5;
}

.auth-toggle-pass:hover {
    color: var(--auth-primary);
}

/* Botões */
.auth-btn-primary {
    background: var(--auth-primary);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-btn-primary:hover {
    background: var(--auth-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(51, 56, 137, 0.35);
}

.auth-btn-dark {
    background: var(--auth-dark);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-btn-dark:hover {
    background: #1c2b52;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(17, 26, 53, 0.35);
}

.auth-btn-search {
    background: var(--auth-teal);
    color: #fff;
    border-radius: 8px;
    min-width: 52px;
    transition: all 0.2s ease;
}

.auth-btn-search:hover {
    background: #0f9488;
    color: #fff;
}

.auth-btn-search:disabled {
    opacity: 0.7;
}

.auth-btn-registered {
    background: var(--auth-red);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    transition: all 0.2s ease;
}

.auth-btn-registered:hover {
    background: #e11d48;
    color: #fff;
}

.auth-alt-action {
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 1.25rem;
}

.auth-link {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Toggle Jurídica/Física */
.auth-person-toggle .form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-person-toggle .form-check-label {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Card base usado pelos templates */
.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    padding: 2.5rem;
}

/* ============ TEMPLATE: AURORA (gradiente glass) ============ */
.tpl-aurora {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(-45deg, #1e1b4b, #333889, #0e7490, #312e81);
    background-size: 400% 400%;
    animation: aurora-shift 14s ease infinite;
}

@keyframes aurora-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.tpl-aurora .auth-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    animation: auth-rise 0.5s ease;
}

/* ============ TEMPLATE: SPLIT (painel lateral) ============ */
.tpl-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.tpl-split-brand {
    background: linear-gradient(160deg, var(--auth-primary) 0%, #1a1d4a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem;
    position: relative;
    overflow: hidden;
}

.tpl-split-brand::before,
.tpl-split-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.tpl-split-brand::before {
    width: 380px;
    height: 380px;
    top: -120px;
    right: -120px;
}

.tpl-split-brand::after {
    width: 260px;
    height: 260px;
    bottom: -80px;
    left: -80px;
}

.tpl-split-brand h2 {
    font-weight: 700;
    line-height: 1.3;
}

.tpl-split-brand .feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.92;
}

.tpl-split-brand .feature-item i {
    color: #6ee7b7;
}

.tpl-split-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: #f8fafc;
    overflow-y: auto;
}

@media (max-width: 991px) {
    .tpl-split {
        grid-template-columns: 1fr;
    }

    .tpl-split-brand {
        display: none;
    }
}

/* ============ TEMPLATE: MINIMAL (claro centrado) ============ */
.tpl-minimal {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 1.5rem;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 22px 22px;
}

.tpl-minimal .auth-card {
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    animation: auth-rise 0.5s ease;
}

.tpl-minimal-footer {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ============ TEMPLATE: MIDNIGHT (dark) ============ */
.tpl-midnight {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #0b1120;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(51, 56, 137, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 100%, rgba(20, 184, 166, 0.18) 0%, transparent 55%);
}

.tpl-midnight .auth-card {
    background: #101a33;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: auth-rise 0.5s ease;
}

.tpl-midnight .auth-title { color: #f1f5f9; }
.tpl-midnight .auth-subtitle { color: #94a3b8; }
.tpl-midnight .form-label { color: #cbd5e1; }
.tpl-midnight .form-check-label { color: #94a3b8; }
.tpl-midnight .auth-alt-action { color: #94a3b8; }
.tpl-midnight .auth-link { color: #7dd3fc; }

.tpl-midnight .auth-input {
    background: #0b1120;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.tpl-midnight .auth-input:focus {
    background: #0b1120;
    border-color: #7dd3fc;
    box-shadow: 0 0 0 0.2rem rgba(125, 211, 252, 0.15);
}

.tpl-midnight .auth-input::placeholder { color: #475569; }

/* ============ TEMPLATE: RESORT (panorama ilustrado) ============ */
.tpl-resort {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem clamp(1rem, 8vw, 8rem) 2rem 1rem;
    background:
        linear-gradient(rgba(13, 27, 62, 0.55), rgba(13, 27, 62, 0.75)),
        linear-gradient(180deg, #38bdf8 0%, #0ea5e9 35%, #fbbf24 78%, #f59e0b 100%);
    position: relative;
    overflow: hidden;
}

/* "Prédio do hotel" ilustrado em CSS puro */
.tpl-resort::before {
    content: "";
    position: absolute;
    left: 6%;
    bottom: 0;
    width: 220px;
    height: 62vh;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 233, 156, 0.85) 0 14px,
            rgba(17, 26, 53, 0.95) 14px 34px
        );
    border-radius: 10px 10px 0 0;
    box-shadow: 260px 8vh 0 -30px rgba(17, 26, 53, 0.85),
                140px 20vh 0 -10px rgba(30, 41, 82, 0.9);
    opacity: 0.8;
}

.tpl-resort .auth-card {
    position: relative;
    z-index: 2;
    animation: auth-rise 0.5s ease;
}

@media (max-width: 991px) {
    .tpl-resort {
        justify-content: center;
        padding: 1.5rem;
    }

    .tpl-resort::before {
        opacity: 0.35;
    }
}

/* Animação comum */
@keyframes auth-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 1.5rem;
    }
}
