/* SiteReply AI — Auth pages (standalone, no Vite build required) */
:root {
    --brand-navy: #061B3A;
    --brand-deep-navy: #020B1F;
    --brand-blue: #087CFF;
    --brand-bright-blue: #1292FF;
    --brand-electric: #005BFF;
    --brand-purple: #5145FF;
    --brand-cyan: #19D7FF;
    --brand-light: #F8FBFF;
    --brand-card: #FFFFFF;
    --brand-dark: #1F2D3D;
    --brand-muted: #64748B;
    --brand-border: #E5ECF6;
    --brand-success: #16A34A;
    --brand-warning: #F59E0B;
    --brand-danger: #DC2626;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    height: 100%;
    background: var(--brand-light);
}

body.auth-body {
    margin: 0;
    min-height: 100%;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--brand-dark) !important;
    background: var(--brand-light) !important;
}

/* ── Shell layout ── */
.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .auth-shell {
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-height: 100dvh;
        align-items: stretch;
    }
}

/* ── Left branding panel ── */
.auth-brand-panel {
    display: none;
    position: relative;
    overflow: hidden;
    padding: 2.5rem 2rem;
    background: var(--brand-deep-navy);
}

@media (min-width: 1024px) {
    .auth-brand-panel {
        display: grid;
        place-items: center;
        min-height: 100%;
        align-self: stretch;
    }
}

/* Background decoration */
.auth-brand-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-brand-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
}

.auth-brand-orb--1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -80px;
    background: radial-gradient(circle, #087CFF 0%, transparent 70%);
    animation: auth-orb-drift 18s ease-in-out infinite;
}

.auth-brand-orb--2 {
    width: 360px;
    height: 360px;
    bottom: -60px;
    right: -40px;
    background: radial-gradient(circle, #5145FF 0%, transparent 70%);
    animation: auth-orb-drift 22s ease-in-out infinite reverse;
}

.auth-brand-orb--3 {
    width: 280px;
    height: 280px;
    top: 45%;
    left: 55%;
    background: radial-gradient(circle, #19D7FF 0%, transparent 70%);
    opacity: 0.35;
    animation: auth-orb-drift 14s ease-in-out infinite 2s;
}

.auth-brand-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 75%);
}

@keyframes auth-orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(24px, -16px) scale(1.05); }
    66% { transform: translate(-16px, 20px) scale(0.95); }
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    gap: 1.125rem;
}

.auth-brand-logo {
    display: inline-block;
    margin-bottom: 0.25rem;
}

.auth-brand-logo img {
    height: 2rem;
    width: auto;
}

.auth-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.auth-brand-eyebrow svg {
    color: #FFD666;
    flex-shrink: 0;
}

.auth-brand-title {
    margin: 0;
    font-size: clamp(1.625rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    letter-spacing: -0.03em;
}

.auth-brand-title-accent {
    display: block;
    margin-top: 0.125rem;
    background: linear-gradient(90deg, #19D7FF 0%, #087CFF 50%, #A78BFA 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-brand-desc {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.62);
    max-width: 22rem;
}

/* Chat widget showcase */
.auth-brand-showcase {
    width: 100%;
    margin-top: 0.5rem;
    perspective: 800px;
}

.auth-showcase-card {
    text-align: left;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: auth-showcase-float 6s ease-in-out infinite;
}

@keyframes auth-showcase-float {
    0%, 100% { transform: translateY(0) rotateX(2deg); }
    50% { transform: translateY(-6px) rotateX(0deg); }
}

.auth-showcase-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.auth-showcase-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #087CFF, #5145FF);
    color: #fff;
    flex-shrink: 0;
}

.auth-showcase-avatar svg {
    width: 1.125rem;
    height: 1.125rem;
}

.auth-showcase-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.auth-showcase-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.auth-showcase-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.5);
}

.auth-showcase-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}

.auth-showcase-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
}

.auth-showcase-msg {
    max-width: 88%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.5;
}

.auth-showcase-msg--user {
    align-self: flex-end;
    background: linear-gradient(135deg, #087CFF, #005BFF);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.auth-showcase-msg--bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
    border-bottom-left-radius: 0.25rem;
}

.auth-showcase-msg--bot strong {
    color: #19D7FF;
    font-weight: 600;
}

.auth-showcase-msg--typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.625rem 0.875rem;
    width: auto;
}

.auth-showcase-msg--typing span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    animation: auth-typing 1.4s ease-in-out infinite;
}

.auth-showcase-msg--typing span:nth-child(2) { animation-delay: 0.2s; }
.auth-showcase-msg--typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes auth-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.auth-showcase-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 1rem 1rem;
    padding: 0.5rem 0.5rem 0.5rem 0.875rem;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.35);
}

.auth-showcase-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 0.375rem;
    background: linear-gradient(135deg, #087CFF, #5145FF);
    color: #fff;
    flex-shrink: 0;
}

.auth-showcase-send svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* Channel badges */
.auth-brand-channels {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    margin-top: 0.25rem;
}

.auth-brand-channel {
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.4375rem 0.75rem;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    transition: background 0.2s, border-color 0.2s;
}

.auth-brand-channel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.auth-brand-channel-icon svg {
    width: 0.8125rem;
    height: 0.8125rem;
}

.auth-brand-channel-icon--messenger {
    background: rgba(0, 132, 255, 0.25);
    color: #60A5FA;
}

.auth-brand-channel-icon--whatsapp {
    background: rgba(37, 211, 102, 0.2);
    color: #4ADE80;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
}

.auth-brand-footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-brand-footer a:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* ── Right form panel ── */
.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 2.5rem 1.5rem;
    background:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(8, 124, 255, 0.06) 0%, transparent 60%),
        var(--brand-light);
}

@media (min-width: 640px) {
    .auth-form-panel { padding: 2.5rem 2rem; }
}

@media (min-width: 1024px) {
    .auth-form-panel { padding: 2.5rem 3rem 2.5rem 2.5rem; }
}

@media (min-width: 1280px) {
    .auth-form-panel { padding: 2.5rem 5rem; }
}

.auth-mobile-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .auth-mobile-logo { display: none; }
}

.auth-mobile-logo img,
.auth-logo-img {
    height: 2rem;
    width: auto;
}

/* Mobile / dark logo mark */
.auth-logo-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}

.auth-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, #061B3A 0%, #087CFF 55%, #5145FF 100%);
    color: #fff;
    flex-shrink: 0;
}

.auth-logo-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.auth-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.auth-logo-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-navy);
}

.auth-logo-reply { color: var(--brand-blue); }
.auth-logo-ai    { color: var(--brand-purple); }

.auth-logo-tagline {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--brand-muted);
    margin-top: 0.125rem;
}

.auth-form-wrap {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
}

.auth-card {
    background: var(--brand-card);
    border: 1px solid var(--brand-border);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow:
        0 4px 24px -4px rgba(6, 27, 58, 0.08),
        0 8px 16px -8px rgba(6, 27, 58, 0.06);
}

@media (min-width: 640px) {
    .auth-card { padding: 2rem; border-radius: 1.25rem; }
}

.auth-page-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--brand-muted);
}

/* ── Typography helpers ── */
.text-brand-navy { color: var(--brand-navy); }
.text-brand-blue { color: var(--brand-blue); }
.text-brand-purple { color: var(--brand-purple); }
.text-brand-cyan { color: var(--brand-cyan); }
.text-brand-dark { color: var(--brand-dark); }
.text-brand-muted { color: var(--brand-muted); }
.text-brand-danger { color: var(--brand-danger); }
.text-brand-success { color: var(--brand-success); }
.text-brand-electric { color: var(--brand-electric); }

.bg-brand-light { background-color: var(--brand-light); }
.bg-brand-card { background-color: var(--brand-card); }

/* ── Form components ── */
.auth-header { margin-bottom: 1.5rem; }

.auth-header h1 {
    margin: 0;
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--brand-navy);
    letter-spacing: -0.02em;
}

.auth-header p {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--brand-muted);
}

.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }

.auth-field { display: flex; flex-direction: column; gap: 0.375rem; }

.auth-field label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-dark);
}

.auth-field label .req { color: var(--brand-danger); }

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

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 0.875rem;
    transform: translateY(-50%);
    color: var(--brand-muted);
    pointer-events: none;
    display: flex;
}

.auth-input-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-input-field {
    display: block;
    width: 100%;
    border-radius: 0.75rem;
    border: 1.5px solid var(--brand-border);
    background: #fff;
    padding: 0.8125rem 1rem 0.8125rem 2.75rem;
    font-size: 0.9375rem;
    color: var(--brand-dark);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input-field:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(8, 124, 255, 0.12);
}

.auth-input-field.has-error {
    border-color: var(--brand-danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.auth-input-field.pr-toggle {
    padding-right: 2.75rem;
}

.auth-toggle-pw {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    color: var(--brand-muted);
    cursor: pointer;
    display: flex;
    transition: color 0.15s;
}

.auth-toggle-pw:hover { color: var(--brand-dark); }

.auth-field-error {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--brand-danger);
    margin: 0;
}

.auth-field-hint {
    font-size: 0.75rem;
    color: var(--brand-muted);
    margin: 0;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--brand-muted);
}

.auth-checkbox input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--brand-blue);
    border-radius: 0.25rem;
}

.auth-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.15s;
}

.auth-link:hover { color: var(--brand-electric); }

.auth-footer-text {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--brand-muted);
}

.auth-gradient-btn {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #061B3A 0%, #087CFF 55%, #5145FF 100%);
    box-shadow: 0 4px 14px rgba(8, 124, 255, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-gradient-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(8, 124, 255, 0.45);
}

.auth-gradient-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand-blue);
}

.auth-gradient-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-alert {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.auth-alert-success {
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.25);
    color: var(--brand-success);
}

.auth-alert-error {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--brand-danger);
}

.auth-alert-info {
    background: rgba(8, 124, 255, 0.06);
    border: 1px solid rgba(8, 124, 255, 0.2);
    color: var(--brand-blue);
}

.auth-note-box {
    margin-top: 1.25rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: rgba(248, 251, 255, 0.9);
    border: 1px solid var(--brand-border);
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--brand-muted);
}

.auth-secondary-btn {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--brand-border);
    background: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.auth-secondary-btn:hover {
    border-color: rgba(8, 124, 255, 0.3);
    color: var(--brand-dark);
}

.auth-stack { display: flex; flex-direction: column; gap: 1rem; }

@keyframes auth-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

[x-cloak] { display: none !important; }

/* Force layout — prevent external CSS overrides */
.auth-shell {
    width: 100%;
}

.auth-brand-panel,
.auth-form-panel,
.auth-card,
.auth-form,
.auth-field,
.auth-input-field,
.auth-gradient-btn {
    visibility: visible !important;
    opacity: 1 !important;
}

@media (min-width: 1024px) {
    .auth-brand-panel {
        display: grid !important;
        place-items: center !important;
        min-height: 100% !important;
        align-self: stretch !important;
    }
}

.auth-form-panel {
    display: flex !important;
    flex-direction: column !important;
    background: var(--brand-light) !important;
}

.auth-card {
    background: #ffffff !important;
    display: block !important;
}

.auth-brand-panel {
    background: var(--brand-deep-navy) !important;
}
