/* ReplyFlow auth — glassmorphism mint theme (reference match) */

.rf-auth-body,
.auth-body.rf-auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", system-ui, sans-serif;
    color: #14261f;
    background: #cfe8d8;
    -webkit-font-smoothing: antialiased;
}

.rf-auth {
    --ink: #0f1f19;
    --muted: #5a7268;
    --line: rgba(15, 31, 25, 0.1);
    --teal: #0d5c4d;
    --teal-deep: #084439;
    --mint: #cfe8d8;
    --mint-soft: #e4f3ea;
    --sheet: rgba(255, 255, 255, 0.42);
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* —— Atmospheric canvas —— */
.rf-auth__canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, #eaf7ef 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 15%, #d4edd9 0%, transparent 50%),
        radial-gradient(ellipse 60% 45% at 70% 80%, #b8dfc6 0%, transparent 55%),
        linear-gradient(160deg, #e8f5ec 0%, #c5e4d2 45%, #d7eee3 100%);
}

.rf-auth__blob {
    position: absolute;
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
    filter: blur(28px);
    opacity: 0.7;
    animation: rf-auth-drift 22s ease-in-out infinite;
}

.rf-auth__blob--1 {
    width: 42vw;
    height: 42vw;
    max-width: 560px;
    max-height: 560px;
    top: -12%;
    left: -8%;
    background: #b7e0c6;
    border-radius: 48% 52% 42% 58% / 44% 56% 48% 52%;
}

.rf-auth__blob--2 {
    width: 36vw;
    height: 36vw;
    max-width: 480px;
    max-height: 480px;
    top: 8%;
    right: -6%;
    background: #9fd4b4;
    animation-delay: -6s;
    border-radius: 56% 44% 60% 40% / 50% 45% 55% 50%;
}

.rf-auth__blob--3 {
    width: 28vw;
    height: 28vw;
    max-width: 360px;
    max-height: 360px;
    bottom: 6%;
    left: 22%;
    background: #dff3e6;
    animation-delay: -12s;
    filter: blur(40px);
}

.rf-auth__blob--4 {
    width: 22vw;
    height: 22vw;
    max-width: 280px;
    max-height: 280px;
    top: 42%;
    right: 28%;
    background: rgba(255, 255, 255, 0.55);
    animation-delay: -4s;
    filter: blur(24px);
}

.rf-auth__blob--5 {
    width: 18vw;
    height: 18vw;
    max-width: 220px;
    max-height: 220px;
    bottom: 18%;
    right: 8%;
    background: #a8d9bc;
    animation-delay: -15s;
}

.rf-auth__float {
    position: absolute;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 30px rgba(13, 60, 45, 0.1);
    backdrop-filter: blur(10px);
    animation: rf-auth-bob 9s ease-in-out infinite;
}

.rf-auth__float--a { top: 18%; left: 8%; filter: blur(0.4px); opacity: 0.85; }
.rf-auth__float--b { top: 28%; right: 12%; width: 3.6rem; height: 3.6rem; animation-delay: -2s; filter: blur(1px); opacity: 0.75; }
.rf-auth__float--c { bottom: 28%; left: 14%; width: 2.6rem; height: 2.6rem; animation-delay: -5s; filter: blur(1.5px); opacity: 0.55; }
.rf-auth__float--d { top: 58%; left: 42%; width: 2.8rem; height: 2.8rem; animation-delay: -3.5s; filter: blur(2px); opacity: 0.45; }
.rf-auth__float--e { bottom: 16%; right: 22%; width: 2.4rem; height: 2.4rem; animation-delay: -7s; filter: blur(1.2px); opacity: 0.6; }

/* —— Top bar —— */
.rf-auth__top {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem clamp(1.25rem, 4vw, 2.75rem);
}

.rf-auth__logo-link {
    display: inline-flex;
    text-decoration: none;
}

.rf-auth__logo {
    height: 2.5rem;
    width: auto;
    max-width: 170px;
    object-fit: contain;
}

.rf-auth__top-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.rf-auth__top-hint {
    display: none;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
}

.rf-auth__top-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.45rem;
    padding: 0 1.05rem;
    border-radius: 999px;
    border: 1.5px solid rgba(15, 31, 25, 0.16);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 14px rgba(13, 60, 45, 0.06);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.rf-auth__top-btn:hover {
    background: #fff;
    border-color: rgba(15, 31, 25, 0.28);
    color: var(--ink);
    transform: translateY(-1px);
}

/* —— Stage: form + product —— */
.rf-auth__stage {
    position: relative;
    z-index: 2;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
}

.rf-auth__main {
    width: 100%;
    max-width: 26.5rem;
    justify-self: end;
    animation: rf-auth-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rf-auth__hero {
    text-align: left;
    margin-bottom: 1.35rem;
}

.rf-auth__brand-name {
    margin: 0 0 0.55rem;
    font-family: "Bricolage Grotesque", "Outfit", sans-serif;
    font-weight: 700;
    font-size: clamp(2.6rem, 6vw, 3.6rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    color: var(--ink);
}

.rf-auth__brand-line {
    margin: 0;
    max-width: 22rem;
    font-size: 1.02rem;
    line-height: 1.5;
    color: var(--muted);
    font-weight: 450;
}

/* Glass sheet */
.rf-auth__sheet {
    width: 100%;
    padding: 1.55rem 1.45rem 1.45rem;
    border-radius: 1.65rem;
    background: var(--sheet);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 24px 50px rgba(8, 50, 38, 0.1);
    backdrop-filter: blur(22px) saturate(1.25);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
}

.rf-auth__sheet-head {
    margin-bottom: 1.25rem;
}

.rf-auth__title {
    margin: 0 0 0.25rem;
    font-family: "Bricolage Grotesque", "Outfit", sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.rf-auth__subtitle {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--muted);
}

/* Fields with channel icons */
.rf-field .form-label {
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.rf-field .form-label span {
    color: var(--teal);
}

.rf-field__control {
    position: relative;
}

.rf-field__icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 0.95;
}

.rf-field__control .form-control,
.rf-auth__sheet-body .auth-input,
.rf-auth__sheet-body .form-control {
    min-height: 3.1rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(15, 31, 25, 0.08);
    padding: 0.7rem 2.75rem 0.7rem 2.75rem;
    background: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(8, 50, 38, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rf-auth__sheet-body .form-control:not(.rf-field__control .form-control) {
    padding-left: 0.95rem;
}

.rf-field__control .form-control:focus,
.rf-auth__sheet-body .form-control:focus {
    border-color: rgba(13, 92, 77, 0.45) !important;
    box-shadow: 0 0 0 4px rgba(13, 92, 77, 0.12) !important;
    outline: none;
    background: #fff;
}

.rf-field__control.password-field .password-toggle,
.rf-auth__sheet-body .password-field > span.password-toggle {
    position: absolute;
    right: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--muted);
    z-index: 2;
    line-height: 1;
}

/* When label sits above, password toggle in non-rf-field uses old top offset */
.rf-auth__sheet-body .password-field:not(.rf-field__control) > span.password-toggle {
    top: 2.55rem;
    transform: none;
}

.rf-auth__sheet-body .form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 0.3rem;
    border-color: rgba(15, 31, 25, 0.22);
}

.rf-auth__sheet-body .form-check-input:checked {
    background-color: var(--teal);
    border-color: var(--teal);
}

.rf-auth__sheet-body .form-check-label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-link {
    color: var(--teal) !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-link:hover {
    color: var(--teal-deep) !important;
    text-decoration: underline;
}

/* CTA — pill with channel icons */
.rf-auth__cta,
.rf-auth__sheet-body .auth-submit-btn,
.rf-auth__sheet-body .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 3.2rem;
    width: 100%;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 0.75rem 1.25rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    color: #fff !important;
    background: linear-gradient(135deg, #0a4f42 0%, #0d6b5c 55%, #12806d 100%) !important;
    box-shadow: 0 12px 28px rgba(10, 79, 66, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    cursor: pointer;
}

.rf-auth__cta:hover,
.rf-auth__sheet-body .auth-submit-btn:hover,
.rf-auth__sheet-body .btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(10, 79, 66, 0.34);
    color: #fff !important;
}

.rf-auth__cta-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.rf-auth__cta-slash {
    opacity: 0.7;
    font-weight: 500;
    font-size: 1.05rem;
}

.rf-auth__cta-label {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.rf-auth__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

.rf-auth__social {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
}

/* Product mock */
.rf-auth__product {
    width: min(100%, 420px);
    aspect-ratio: 16 / 11.2;
    justify-self: start;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 28px 60px rgba(8, 50, 38, 0.14);
    backdrop-filter: blur(18px);
    overflow: hidden;
    transform: perspective(1400px) rotateY(-10deg) rotateX(5deg) translateY(8px);
    animation: rf-auth-settle 1.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rf-auth__product-chrome {
    display: flex;
    gap: 0.35rem;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid rgba(15, 31, 25, 0.06);
    background: rgba(255, 255, 255, 0.4);
}

.rf-auth__product-chrome span {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: rgba(15, 31, 25, 0.12);
}

.rf-auth__product-chrome span:nth-child(1) { background: #ff5f57; }
.rf-auth__product-chrome span:nth-child(2) { background: #febc2e; }
.rf-auth__product-chrome span:nth-child(3) { background: #28c840; }

.rf-auth__product-body {
    display: grid;
    grid-template-columns: 3.4rem 1fr;
    height: calc(100% - 2.35rem);
}

.rf-auth__product-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 0;
    border-right: 1px solid rgba(15, 31, 25, 0.06);
    background: rgba(13, 92, 77, 0.05);
}

.rf-auth__product-rail i {
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 0.4rem;
    background: rgba(15, 31, 25, 0.08);
}

.rf-auth__product-rail i.is-wa {
    background: #25d366;
}

.rf-auth__product-rail i.is-gm {
    background: linear-gradient(135deg, #ea4335 0%, #fbbc05 40%, #34a853 70%, #4285f4 100%);
}

.rf-auth__product-feed {
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.rf-auth__row {
    display: grid;
    grid-template-columns: 1.65rem 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.4rem 0.45rem;
    border-radius: 0.6rem;
}

.rf-auth__row.is-active {
    background: rgba(13, 92, 77, 0.09);
}

.rf-auth__row b {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 0.4rem;
    display: block;
}

.rf-auth__row b.wa { background: #25d366; }
.rf-auth__row b.gm { background: linear-gradient(135deg, #ea4335, #4285f4); }

.rf-auth__row em {
    display: block;
    height: 0.36rem;
    border-radius: 999px;
    background: rgba(15, 31, 25, 0.12);
    margin-bottom: 0.26rem;
    width: 70%;
}

.rf-auth__row em.short { width: 40%; margin-bottom: 0; opacity: 0.65; }
.rf-auth__row em.mid { width: 55%; margin-bottom: 0; opacity: 0.65; }
.rf-auth__row em.long { width: 78%; margin-bottom: 0; opacity: 0.65; }

.rf-auth__draft {
    margin-top: auto;
    padding: 0.6rem 0.65rem;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 31, 25, 0.05);
}

.rf-auth__draft span {
    display: block;
    height: 0.38rem;
    width: 88%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(13, 92, 77, 0.3), rgba(37, 211, 102, 0.2));
    margin-bottom: 0.32rem;
}

.rf-auth__draft span.thin {
    width: 52%;
    height: 0.3rem;
    margin-bottom: 0;
    opacity: 0.7;
}

.rf-auth__foot {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 1.25rem 1.35rem;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
}

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

@keyframes rf-auth-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rf-auth-settle {
    from {
        opacity: 0;
        transform: perspective(1400px) rotateY(-10deg) rotateX(5deg) translate3d(30px, 36px, 0);
    }
    to {
        opacity: 1;
        transform: perspective(1400px) rotateY(-10deg) rotateX(5deg) translateY(8px);
    }
}

@keyframes rf-auth-drift {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(16px, -20px, 0) rotate(4deg); }
}

@keyframes rf-auth-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (min-width: 768px) {
    .rf-auth__top-hint { display: inline; }
}

@media (max-width: 991.98px) {
    .rf-auth__stage {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .rf-auth__main {
        justify-self: center;
        max-width: 28rem;
    }

    .rf-auth__hero {
        text-align: center;
    }

    .rf-auth__brand-line {
        margin-left: auto;
        margin-right: auto;
    }

    .rf-auth__product {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .rf-auth__float--c,
    .rf-auth__float--d,
    .rf-auth__float--e {
        display: none;
    }

    .rf-auth__sheet {
        padding: 1.25rem 1.1rem 1.15rem;
        border-radius: 1.35rem;
    }

    .rf-auth__brand-name {
        font-size: 2.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rf-auth__blob,
    .rf-auth__float,
    .rf-auth__product,
    .rf-auth__main {
        animation: none !important;
    }

    .rf-auth__cta:hover,
    .rf-auth__top-btn:hover {
        transform: none;
    }
}
