/* ==========================================================================
   WaYouKiss authentication — mobile first
   Loaded after the global theme to keep login/register predictable.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:ital,wght@0,400..800&display=swap');

body.auth-page {
    --auth-ink: #17201e;
    --auth-muted: #687673;
    --auth-line: rgba(53, 84, 78, 0.18);
    --auth-surface: rgba(255, 255, 255, 0.94);
    --auth-accent: #b34f32;
    --auth-accent-dark: #8f3824;
    --auth-sage: #465f59;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: block;
    overflow-x: hidden;
    color: var(--auth-ink) !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(83, 156, 145, 0.22), transparent 34rem),
        radial-gradient(circle at 90% 88%, rgba(87, 133, 184, 0.2), transparent 32rem),
        linear-gradient(135deg, #e8f4f1 0%, #f6fafb 46%, #e7f0fa 100%) !important;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body.auth-page,
body.auth-page * {
    box-sizing: border-box;
}

body.auth-page::before,
body.auth-page::after {
    content: "";
    position: fixed;
    z-index: 0;
    width: clamp(14rem, 34vw, 31rem);
    aspect-ratio: 1;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 50%;
    filter: blur(1px);
}

body.auth-page::before {
    display: block !important;
}

body.auth-page::before {
    top: -17%;
    right: -9%;
    background: rgba(255, 255, 255, 0.18);
}

body.auth-page::after {
    bottom: -24%;
    left: -10%;
    background: rgba(70, 95, 89, 0.05);
}

.auth-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100% !important;
    max-width: none !important;
    min-height: 100dvh;
    margin: 0 !important;
    padding: clamp(1.15rem, 4vw, 3rem) 0.9rem !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.auth-logo {
    width: 100%;
    margin: 0 !important;
    text-align: center;
}

.auth-page .auth-logo .wayoukiss-logo-auth {
    display: inline-flex;
    max-width: 100%;
    padding: 0.65rem 0.85rem;
    align-items: center;
    gap: 0.7rem;
    color: var(--auth-ink) !important;
    text-align: left;
    text-decoration: none;
    border: 1px solid rgba(53, 84, 78, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 36px rgba(34, 67, 72, 0.1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.auth-page .auth-logo .wayoukiss-logo-auth:hover {
    color: var(--auth-ink) !important;
    box-shadow: 0 18px 42px rgba(34, 67, 72, 0.14);
    transform: translateY(-1px);
}

.wayoukiss-logo-auth .wayoukiss-logo-mark {
    display: grid !important;
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px;
    place-items: center;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.58) !important;
    border-radius: 13px !important;
    background: linear-gradient(145deg, #c26343 0%, #a44a31 48%, #465f59 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 22px rgba(77, 60, 45, 0.18) !important;
}

.wayoukiss-logo-auth .wayoukiss-logo-letter {
    color: #fff;
    font-size: 1.9rem;
}

.wayoukiss-logo-auth .wayoukiss-logo-dot {
    right: 6px;
    bottom: 6px;
}

.wayoukiss-logo-auth .wayoukiss-logo-copy {
    gap: 0.22rem;
}

.wayoukiss-logo-auth .wayoukiss-logo-text,
.wayoukiss-logo-auth .wayoukiss-logo-name {
    color: var(--auth-ink) !important;
    font-size: clamp(1.35rem, 5vw, 1.65rem) !important;
    line-height: 0.88;
}

.wayoukiss-logo-auth .wayoukiss-logo-kiss {
    color: var(--auth-accent) !important;
}

.wayoukiss-logo-auth .wayoukiss-logo-domain {
    color: var(--auth-sage) !important;
}

.wayoukiss-logo-auth .wayoukiss-logo-tagline {
    color: var(--auth-muted) !important;
    font-size: 0.5rem;
    letter-spacing: 0.1em;
}

.auth-container {
    width: min(100%, 460px) !important;
    margin: 0 !important;
    padding: clamp(1.35rem, 5vw, 2.25rem) !important;
    overflow: hidden;
    color: var(--auth-ink) !important;
    border: 1px solid var(--auth-line) !important;
    border-radius: 24px !important;
    background: var(--auth-surface) !important;
    box-shadow: 0 28px 72px rgba(35, 72, 78, 0.16), 0 2px 8px rgba(35, 72, 78, 0.06) !important;
    backdrop-filter: blur(22px) saturate(1.08);
    -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

.auth-container--register {
    width: min(100%, 660px) !important;
}

.auth-header {
    margin: 0 0 1.4rem !important;
    text-align: left !important;
}

.auth-kicker {
    display: inline-flex;
    margin-bottom: 0.65rem;
    padding: 0.35rem 0.6rem;
    color: var(--auth-sage);
    border: 1px solid rgba(70, 95, 89, 0.18);
    border-radius: 999px;
    background: rgba(224, 239, 235, 0.76);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
}

.auth-header h2 {
    margin: 0 0 0.38rem;
    color: var(--auth-ink) !important;
    font-family: "Instrument Serif", Georgia, serif;
    font-size: clamp(2rem, 8vw, 2.7rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1;
}

.auth-header p {
    max-width: 34rem;
    margin: 0;
    color: var(--auth-muted) !important;
    font-size: 0.92rem;
    line-height: 1.55;
}

.auth-page .form-group {
    margin: 0 0 1rem !important;
}

.auth-page .form-label {
    display: block;
    margin: 0 0 0.42rem;
    color: #2d3b38 !important;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.auth-page .form-control {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 0.78rem 0.9rem;
    color: var(--auth-ink) !important;
    border: 1px solid rgba(53, 84, 78, 0.24) !important;
    border-radius: 13px !important;
    outline: none;
    background: rgba(248, 251, 250, 0.92) !important;
    box-shadow: inset 0 1px 2px rgba(35, 72, 78, 0.04) !important;
    font: inherit;
    font-size: 1rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-page .form-control:hover {
    border-color: rgba(53, 84, 78, 0.4) !important;
}

.auth-page .form-control:focus {
    border-color: #4f8278 !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(79, 130, 120, 0.14) !important;
}

.auth-page .help-text {
    margin-top: 0.45rem;
    color: var(--auth-muted) !important;
    font-size: 0.72rem;
    line-height: 1.45;
}

.auth-page .help-text ul {
    margin: 0;
    padding: 0.65rem 0.75rem 0.65rem 1.7rem;
    border: 1px solid rgba(53, 84, 78, 0.1);
    border-radius: 10px;
    background: rgba(231, 241, 239, 0.48);
}

.auth-page .help-text li + li {
    margin-top: 0.18rem;
}

.password-requirements {
    margin-top: 0.45rem;
    color: var(--auth-muted);
    font-size: 0.7rem;
}

.password-requirements summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--auth-sage);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    text-underline-offset: 3px;
}

.password-requirements summary::-webkit-details-marker {
    display: none;
}

.password-requirements summary::before {
    content: "+";
    display: grid;
    width: 17px;
    height: 17px;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: var(--auth-sage);
    font-size: 0.72rem;
    line-height: 1;
}

.password-requirements[open] summary::before {
    content: "−";
}

.password-requirements[open] .help-text {
    margin-top: 0.5rem;
}

.auth-page .error-message {
    display: flex;
    margin-top: 0.5rem;
    padding: 0.62rem 0.72rem;
    align-items: flex-start;
    gap: 0.45rem;
    color: #8b2f22;
    border: 1px solid rgba(179, 79, 50, 0.2);
    border-radius: 10px;
    background: rgba(255, 235, 229, 0.82);
    font-size: 0.76rem;
    line-height: 1.4;
}

.auth-page .error-message::before {
    content: "!";
    display: grid;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: var(--auth-accent);
    font-size: 0.68rem;
    font-weight: 800;
}

.auth-page .btn-primary {
    width: 100%;
    min-height: 50px;
    margin: 0.25rem 0 0;
    padding: 0.8rem 1rem;
    color: #fff !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%) !important;
    box-shadow: 0 12px 26px rgba(143, 56, 36, 0.22) !important;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.auth-page .btn-primary:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #a8432b 0%, #762d1e 100%) !important;
    box-shadow: 0 16px 30px rgba(143, 56, 36, 0.28) !important;
    filter: saturate(1.08);
    transform: translateY(-1px);
}

.auth-page .btn-primary:active {
    transform: translateY(0);
}

.auth-link {
    margin-top: 1.2rem;
    color: var(--auth-muted) !important;
    text-align: center;
    font-size: 0.82rem;
}

.auth-link p {
    display: flex;
    margin: 0;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.45rem;
}

.auth-link a {
    color: var(--auth-accent-dark) !important;
    font-weight: 800;
    text-underline-offset: 3px;
}

.auth-assurance {
    display: flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: #536964;
    font-size: 0.69rem;
    font-weight: 700;
}

.auth-assurance span {
    display: inline-flex;
    padding: 0.42rem 0.6rem;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(53, 84, 78, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
}

.auth-assurance i {
    color: #39756a;
    font-size: 0.82rem;
}

@media (min-width: 700px) {
    .auth-container--register {
        padding: 1.5rem 2rem !important;
    }

    .auth-container--register .auth-header {
        margin-bottom: 1rem !important;
    }

    .auth-container--register form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 1rem;
        align-items: start;
    }

    .auth-container--register .form-group {
        margin-bottom: 0 !important;
    }

    .auth-container--register .btn-primary {
        grid-column: 1 / -1;
    }

    .auth-container--register .auth-link {
        margin-top: 0.85rem;
    }
}

@media (min-width: 700px) and (max-height: 800px) {
    .auth-wrapper {
        padding-block: 0.75rem !important;
        gap: 0.65rem;
    }

    .auth-page .auth-logo .wayoukiss-logo-auth {
        padding-block: 0.48rem;
    }

    .auth-container--register .form-control {
        min-height: 46px;
        padding-block: 0.65rem;
    }

    .auth-container--register .help-text {
        font-size: 0.67rem;
    }
}

@media (max-width: 699.98px) {
    .auth-wrapper {
        justify-content: flex-start;
    }

    .auth-container {
        border-radius: 20px !important;
    }

    .wayoukiss-logo-auth .wayoukiss-logo-tagline {
        display: none;
    }
}

@media (max-width: 390px) {
    .auth-wrapper {
        padding-inline: 0.7rem !important;
    }

    .auth-page .auth-logo .wayoukiss-logo-auth {
        padding: 0.55rem 0.68rem;
    }

    .wayoukiss-logo-auth .wayoukiss-logo-mark {
        width: 40px !important;
        height: 40px !important;
        flex-basis: 40px;
    }

    .auth-container {
        padding: 1.2rem !important;
        border-radius: 18px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
