/*
 * Sign-in pages (login, register, forgot/reset password, verify email, two-factor).
 * Markup: resources/views/components/authentication-card.blade.php, loaded by
 * resources/views/layouts/guest.blade.php. The form fields themselves are Jetstream
 * components with Tailwind classes; they are restyled here under .auth-card.
 * Colours: --a-brand* and --a-hero* default to the panel greens; the sign-in card sets them
 * inline from the colours chosen in Admin > Landing Page > Login & sign-up pages.
 * See docs/theme.md and docs/website-editor.md.
 */
:root {
    --a-brand: #00a884;
    --a-brand-2: #25d366;
    --a-brand-dark: #008069;
    --a-ink: #0f172a;
    --a-ink-2: #334155;
    --a-muted: #64748b;
    --a-line: #e2e8f0;
    --a-hero: #0b3d33;
    --a-hero-dark: #062620;
    --a-hero-light: #0e5a4a;
    --a-gradient: linear-gradient(135deg, var(--a-brand-2) 0%, var(--a-brand) 55%, var(--a-brand-dark) 100%);
    --a-ring: color-mix(in srgb, var(--a-brand) 18%, transparent);
}

body { font-family: "Plus Jakarta Sans", "Figtree", "Segoe UI", -apple-system, Roboto, Arial, sans-serif !important; background: #f3f6f8; }

.auth-shell { display: flex; min-height: 100vh; }

/* ---------- Left: brand hero ---------- */
.auth-hero {
    position: relative;
    flex: 0 0 46%;
    max-width: 46%;
    display: flex;
    flex-direction: column;
    padding: 40px 56px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(150deg, var(--a-hero-dark) 0%, var(--a-hero) 50%, var(--a-hero-light) 100%); /* older browsers */
    background:
        radial-gradient(800px 400px at 100% 0%, color-mix(in srgb, var(--a-brand-2) 35%, transparent), transparent 60%),
        radial-gradient(600px 400px at 0% 100%, color-mix(in srgb, var(--a-brand) 35%, transparent), transparent 60%),
        linear-gradient(150deg, var(--a-hero-dark) 0%, var(--a-hero) 50%, var(--a-hero-light) 100%);
}
/* Subtle dot grid */
.auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 85%);
}
.auth-orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; animation: auth-float 12s ease-in-out infinite; }
.auth-orb-1 { width: 320px; height: 320px; right: -80px; top: 18%; background: var(--a-brand-2); opacity: .25; }
.auth-orb-2 { width: 260px; height: 260px; left: -60px; bottom: -60px; background: var(--a-brand); opacity: .3; animation-delay: -6s; }
@keyframes auth-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-20px, 24px); } }

.auth-hero > *:not(.auth-orb) { position: relative; z-index: 1; }
.auth-orb { pointer-events: none; z-index: 0; }
.auth-hero-logo {
    align-self: flex-start;
    display: inline-flex;
    padding: 10px 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.auth-hero-logo img { height: 40px; width: auto; }
.auth-hero-copy { margin-top: auto; padding-top: 48px; }
.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 13px;
    font-weight: 600;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.auth-pill i { color: var(--a-brand-2); }
.auth-hero h2 {
    margin: 20px 0 12px;
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #fff;
}
.auth-hero p { max-width: 460px; color: rgba(255, 255, 255, .75); font-size: 16px; line-height: 1.6; }
.auth-features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.auth-features li { display: flex; align-items: center; gap: 14px; font-weight: 600; color: rgba(255, 255, 255, .92); }
.auth-features .auth-feature-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    color: var(--a-brand-2);
}

/* Chat preview */
.auth-mock { margin: 36px 0 28px; max-width: 380px; display: flex; flex-direction: column; gap: 8px; }
.auth-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    animation: auth-pop .5s ease both;
}
.auth-bubble.in { align-self: flex-start; background: #fff; color: #111b21; border-top-left-radius: 4px; }
.auth-bubble.out { align-self: flex-end; background: #d9fdd3; color: #111b21; border-top-right-radius: 4px; }
.auth-bubble small { color: #53bdeb; font-weight: 700; margin-left: 4px; }
.auth-bubble:nth-child(2) { animation-delay: .25s; }
.auth-bubble:nth-child(3) { animation-delay: .5s; }
@keyframes auth-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.auth-hero-foot { font-size: 13px; color: rgba(255, 255, 255, .5); }

/* ---------- Right: form ---------- */
.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.auth-card {
    width: 100%;
    max-width: 410px;
    padding: 32px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .8);
    border-radius: 24px;
    box-shadow: 0 30px 60px -24px rgba(15, 23, 42, .25), 0 2px 6px rgba(15, 23, 42, .04);
    animation: auth-pop .45s ease both;
}
.auth-mobile-logo { display: none; margin-bottom: 20px; }
.auth-mobile-logo img { height: 44px !important; width: auto; }
.auth-title { margin: 0 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: var(--a-ink); }
.auth-subtitle { margin: 0 0 26px; color: var(--a-muted); font-size: 15px; line-height: 1.5; }

/* Fields */
.auth-card label, .auth-card .block.font-medium { color: var(--a-ink) !important; font-weight: 700 !important; font-size: 13.5px !important; }
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"],
.auth-card input[type="number"],
.auth-card input[type="tel"] {
    width: 100%;
    height: 44px;
    margin-top: 6px;
    padding: 0 16px;
    border: 1.5px solid var(--a-line) !important;
    border-radius: 14px !important;
    background: #f8fafc;
    color: var(--a-ink);
    font-size: 15px;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-card input:hover { border-color: #cbd5e1 !important; }
.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus,
.auth-card input[type="text"]:focus,
.auth-card input[type="number"]:focus,
.auth-card input[type="tel"]:focus {
    outline: none;
    background: #fff;
    border-color: var(--a-brand) !important;
    box-shadow: 0 0 0 4px var(--a-ring) !important;
}
.auth-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 6px !important;
    border-color: #cbd5e1 !important;
    color: var(--a-brand) !important;
    box-shadow: none !important;
}
.auth-card input[type="checkbox"]:checked { background-color: var(--a-brand) !important; }
.auth-card .text-gray-600 { color: var(--a-muted) !important; }

/* Main button: full width gradient */
.auth-card form button[type="submit"],
.auth-card form > div:last-child > button {
    width: 100%;
    height: 46px;
    margin-left: 0 !important;
    justify-content: center;
    border: 0 !important;
    border-radius: 14px !important;
    background: var(--a-gradient) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: .01em !important;
    text-transform: none !important;
    box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--a-brand) 70%, transparent) !important;
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease !important;
}
.auth-card form button[type="submit"]:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 16px 30px -10px color-mix(in srgb, var(--a-brand) 80%, transparent) !important; }
.auth-card form button[type="submit"]:active { transform: scale(.99); }
/* Button row: button on top, "Forgot password?" / "Already registered?" under it */
.auth-card form > .flex.items-center.justify-end:last-child {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 16px;
    margin-top: 24px !important;
}
.auth-card form > .flex.items-center.justify-end:last-child > a {
    text-align: center;
    text-decoration: none !important;
    color: var(--a-brand-dark) !important;
    font-weight: 600;
}
.auth-card form > .flex.items-center.justify-end:last-child > a:hover { text-decoration: underline !important; }

/* Errors and status */
.auth-card .text-red-600 { color: #dc2626 !important; }
.auth-card .mb-4 > .font-medium.text-red-600 + ul,
.auth-card ul.text-red-600 { background: #fef2f2; border-radius: 12px; padding: 10px 14px 10px 28px; }
.auth-card .text-green-600 { background: #ecfdf5; color: #047857 !important; padding: 10px 14px; border-radius: 12px; }

/* Social sign-in buttons (auth/social.blade.php) */
.auth-card a[href*="google"], .auth-card a[href*="facebook"] {
    border-radius: 14px !important;
    border: 1.5px solid var(--a-line) !important;
    transition: background .15s ease, border-color .15s ease;
}
.auth-card a[href*="google"]:hover, .auth-card a[href*="facebook"]:hover { background: #f8fafc; border-color: #cbd5e1 !important; }

.auth-links { margin-top: 22px; text-align: center; }
.auth-links a { opacity: 1 !important; color: var(--a-muted) !important; font-size: 14px; }
.auth-links a span { color: var(--a-brand-dark); font-weight: 700; }

/* Brand side switched off in the editor: form centred on a soft background */
.auth-hero[hidden], .auth-mock[hidden] { display: none !important; }
.auth-no-hero .auth-mobile-logo { display: block; }
.auth-no-hero .auth-main {
    background:
        radial-gradient(600px 360px at 100% 0%, color-mix(in srgb, var(--a-brand-2) 18%, transparent), transparent 60%),
        radial-gradient(500px 360px at 0% 100%, color-mix(in srgb, var(--a-brand) 15%, transparent), transparent 60%),
        #f3f6f8;
}

/* ---------- Phones and tablets ---------- */
@media (max-width: 991.98px) {
    .auth-hero { display: none; }
    .auth-mobile-logo { display: block; }
    .auth-main {
        background:
            radial-gradient(500px 300px at 100% 0%, color-mix(in srgb, var(--a-brand-2) 18%, transparent), transparent 60%),
            radial-gradient(400px 300px at 0% 100%, color-mix(in srgb, var(--a-brand) 15%, transparent), transparent 60%),
            #f3f6f8;
    }
}
@media (max-width: 480px) {
    .auth-card { padding: 28px 22px; border-radius: 20px; }
    .auth-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-shell * { animation: none !important; transition: none !important; }
}
