/* ==================================================
   StayEase Pro - Enhanced Auth Pages
   File: css/auth.css
   ================================================== */

html {
    scroll-behavior: smooth;
}

/* Page Shell */
.auth-page {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(212, 165, 116, 0.24), transparent 34%),
        radial-gradient(circle at bottom right, rgba(45, 90, 107, 0.16), transparent 36%),
        linear-gradient(135deg, #f9f7f4 0%, #f3eee8 100%);
}

.auth-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(12px);
    pointer-events: none;
    opacity: 0.5;
    animation: authFloatOrb 8s ease-in-out infinite;
}

.auth-bg-orb-1 {
    width: 260px;
    height: 260px;
    left: -90px;
    top: 10%;
    background: rgba(212, 165, 116, 0.28);
}

.auth-bg-orb-2 {
    width: 300px;
    height: 300px;
    right: -120px;
    bottom: 6%;
    background: rgba(45, 90, 107, 0.18);
    animation-delay: 1.5s;
}

.auth-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.78fr);
    min-height: calc(100vh - var(--nav-height));
}

.auth-shell-signup {
    grid-template-columns: minmax(0, 0.9fr) minmax(520px, 0.95fr);
}

/* Visual Panel */
.auth-visual-panel {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - var(--nav-height));
    padding: clamp(2rem, 5vw, 4.5rem);
    display: flex;
    align-items: flex-end;
    isolation: isolate;
}

.auth-login-visual {
    background-image: url('https://images.unsplash.com/photo-1566073771259-6a8506099945?q=80&w=1400&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.auth-signup-visual {
    background-image: url('https://images.unsplash.com/photo-1578683010236-d716f9a3f461?q=80&w=1400&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.auth-visual-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(45, 90, 107, 0.78), rgba(31, 63, 79, 0.42)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.52));
}

.auth-visual-content {
    position: relative;
    max-width: 640px;
    color: white;
    animation: authFadeUp 0.8s ease both;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    margin-bottom: 1.25rem;
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-kicker .material-symbols-outlined {
    font-size: 1.05rem;
}

.auth-visual-content h1 {
    color: white;
    font-size: clamp(2.3rem, 5vw, 4.7rem);
    line-height: 1;
    letter-spacing: -0.06em;
    margin-bottom: 1.25rem;
}

.auth-visual-content p {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.8;
    max-width: 560px;
}

/* Floating Cards */
.auth-floating-card {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: min(290px, 78%);
    padding: 1rem;
    border-radius: 1.2rem;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-floating-card .material-symbols-outlined {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 0.9rem;
    color: var(--primary);
    background: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-floating-card strong {
    display: block;
    font-size: 0.95rem;
}

.auth-floating-card small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.35;
    margin-top: 0.15rem;
}

.auth-floating-card-top {
    top: 12%;
    right: 8%;
    animation: authFloatCard 4.5s ease-in-out infinite;
}

.auth-floating-card-bottom {
    left: 7%;
    bottom: 22%;
    animation: authFloatCard 4.5s ease-in-out infinite 0.9s;
}

/* Visual Stats */
.auth-visual-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.auth-visual-stats div {
    min-width: 120px;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.auth-visual-stats strong {
    display: block;
    color: white;
    font-family: 'Sora', sans-serif;
    font-size: 1.45rem;
    line-height: 1;
}

.auth-visual-stats span {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    margin-top: 0.35rem;
    font-weight: 600;
}

/* Form Panel */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 4rem);
}

.auth-form-card {
    width: 100%;
    max-width: 470px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 1.7rem;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.76);
    box-shadow: 0 26px 78px rgba(45, 90, 107, 0.14);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    animation: authFadeScale 0.8s ease both;
}

.signup-form-card {
    max-width: 620px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-form-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 1rem;
    border-radius: 1.1rem;
    color: var(--primary);
    background: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(45, 90, 107, 0.08);
}

.auth-form-icon .material-symbols-outlined {
    font-size: 1.9rem;
}

.auth-form-header h2 {
    margin-bottom: 0.55rem;
    font-size: clamp(1.8rem, 4vw, 2.45rem);
    letter-spacing: -0.04em;
}

.auth-form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 420px;
    margin: 0 auto;
}

/* Demo Credentials */
.auth-demo-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    margin-bottom: 1.75rem;
    border-radius: 1.1rem;
    background:
        linear-gradient(135deg, rgba(45, 90, 107, 0.08), rgba(212, 165, 116, 0.14));
    border: 1px solid rgba(45, 90, 107, 0.1);
}

.auth-demo-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 0.9rem;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.74);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-demo-label {
    margin: 0 0 0.2rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-demo-value {
    margin: 0;
    color: var(--primary);
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Forms */
.auth-form {
    width: 100%;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.auth-form-group {
    margin-bottom: 1.15rem;
}

.auth-form-group .form-label {
    font-weight: 700;
    color: var(--text-main);
}

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

.auth-input-wrap>.material-symbols-outlined {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.22rem;
    pointer-events: none;
}

.auth-input-wrap .form-control {
    min-height: 48px;
    padding-left: 2.8rem;
    background: rgba(255, 255, 255, 0.86);
}

.auth-input-wrap select.form-control {
    cursor: pointer;
}

.auth-help-text {
    margin-top: 0.42rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-terms-box {
    padding: 1rem;
    margin-top: 0.4rem;
    border-radius: 1rem;
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
}

.auth-terms-box label {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.auth-terms-box input {
    margin-top: 0.25rem;
    accent-color: var(--primary);
}

.auth-terms-box a {
    color: var(--primary);
    font-weight: 700;
}

.auth-submit-btn {
    min-height: 52px;
    margin-top: 0.65rem;
    padding: 1rem;
    border-radius: 0.95rem;
    font-weight: 800;
}

.auth-switch-text {
    margin-top: 1.35rem;
    text-align: center;
}

.auth-switch-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.auth-switch-text a {
    color: var(--primary);
    font-weight: 800;
}

/* Header specific auth polish */
.auth-site-header {
    box-shadow: 0 8px 28px rgba(45, 90, 107, 0.06);
}

.auth-nav-link {
    font-weight: 700;
}

/* Animations */
@keyframes authFloatOrb {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-18px) scale(1.04);
    }
}

@keyframes authFloatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

@keyframes authFadeScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

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

/* Responsive */
@media (max-width: 1100px) {

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

    .auth-visual-panel {
        min-height: 460px;
    }

    .auth-form-panel {
        padding: 2rem var(--space-md) 3rem;
    }

    .auth-floating-card-top {
        right: 1rem;
    }

    .auth-floating-card-bottom {
        left: 1rem;
        bottom: 16%;
    }
}

@media (max-width: 768px) {
    .auth-site-header .nav-actions {
        gap: 0.5rem;
    }

    .auth-site-header .nav-actions .btn {
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }

    .auth-visual-panel {
        min-height: 430px;
        padding: 2rem 1.25rem;
    }

    .auth-visual-content h1 {
        font-size: clamp(2rem, 11vw, 3.4rem);
    }

    .auth-visual-content p {
        font-size: 0.98rem;
    }

    .auth-floating-card {
        width: 84%;
        padding: 0.9rem;
    }

    .auth-floating-card small {
        display: none;
    }

    .auth-visual-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .auth-form-card,
    .signup-form-card {
        max-width: 100%;
        border-radius: 1.35rem;
    }

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

@media (max-width: 520px) {
    .auth-site-header .brand-logo {
        font-size: 1.2rem;
    }

    .auth-site-header .nav-actions .btn span.material-symbols-outlined {
        display: none;
    }

    .auth-visual-panel {
        min-height: 380px;
    }

    .auth-floating-card-top {
        top: 1rem;
        right: 0.75rem;
    }

    .auth-floating-card-bottom {
        left: 0.75rem;
        bottom: 1.25rem;
    }

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

    .auth-form-panel {
        padding: 1.25rem var(--space-sm) 2.25rem;
    }

    .auth-form-card {
        padding: 1.25rem;
    }

    .auth-form-header {
        margin-bottom: 1.35rem;
    }

    .auth-demo-card {
        align-items: flex-start;
    }
}

/* ==================================================
   Auth Floating Card Overlap Fix
   ================================================== */

.auth-visual-content {
    padding-bottom: 7.5rem;
}

.auth-floating-card-bottom {
    left: 7%;
    bottom: 2rem;
}

@media (max-width: 1100px) {
    .auth-visual-content {
        padding-bottom: 7rem;
    }

    .auth-floating-card-bottom {
        left: 1rem;
        bottom: 1.5rem;
    }
}

@media (max-width: 520px) {
    .auth-visual-content {
        padding-bottom: 6.5rem;
    }

    .auth-floating-card-bottom {
        left: 0.75rem;
        bottom: 0.9rem;
    }
}