/* ════════════════════════════════════════════════════════════════
   StockEasy — Auth Page (matches landing page dark theme)
   ════════════════════════════════════════════════════════════════ */

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

.auth-body-modern {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 55%, #24243e 100%);
    position: relative;
    overflow-x: clip;   /* clip horizontal blobs only — vertical scroll still works */
}

/* Ambient glow blobs — use % sizes so they scale with viewport */
.auth-bg-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.auth-bg-shape-1 {
    width: 60vw; height: 60vw;
    max-width: 600px; max-height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,.22) 0%, transparent 65%);
    top: -15vw; right: -10vw;
}

.auth-bg-shape-2 {
    width: 50vw; height: 50vw;
    max-width: 480px; max-height: 480px;
    background: radial-gradient(circle, rgba(16,185,129,.12) 0%, transparent 65%);
    bottom: -15vw; left: -10vw;
}

/* ── Page wrapper ────────────────────────────────────────────── */
.auth-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

/* ── Two-panel card ──────────────────────────────────────────── */
.auth-layout {
    width: 100%;
    max-width: 1160px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    border-radius: 28px;
    overflow: clip;          /* clips border-radius visually but does NOT block scrolling */
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 40px 100px rgba(0,0,0,.50);
}

/* ── Left: Showcase ──────────────────────────────────────────── */
.auth-showcase {
    position: relative;
    padding: 48px 56px 48px 48px;
    background: linear-gradient(145deg, rgba(99,102,241,.18) 0%, rgba(99,102,241,.06) 100%);
    border-right: 1px solid rgba(255,255,255,.08);
    color: white;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

/* Subtle grid pattern overlay */
.auth-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.auth-showcase-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    position: relative;
    z-index: 1;
}

/* ── Brand ───────────────────────────────────────────────────── */
.auth-brand-modern {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-brand-logo {
    width: 190px; height: 54px;
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(15,23,42,.24);
    padding: 6px 12px;
}

.auth-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.auth-brand-subtitle {
    color: rgba(255,255,255,.60);
    font-size: 0.85rem;
}

/* ── Badge ───────────────────────────────────────────────────── */
.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(99,102,241,.20);
    border: 1px solid rgba(99,102,241,.35);
    font-weight: 600;
    font-size: 0.83rem;
    color: #a5b4fc;
    margin-bottom: 14px;
}

/* ── Showcase text ───────────────────────────────────────────── */
.auth-showcase-text h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.12;
    margin: 0 0 16px;
    color: #fff;
}

.auth-showcase-text p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: rgba(255,255,255,.72);
    margin: 0;
}

.auth-headline-accent {
    background: linear-gradient(90deg, #a5b4fc 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

/* ── Feature list ────────────────────────────────────────────── */
.auth-feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    transition: background .2s;
}

.auth-feature-item:hover { background: rgba(255,255,255,.09); }

.auth-feature-icon {
    width: 42px; height: 42px;
    border-radius: 13px;
    background: rgba(99,102,241,.22);
    border: 1px solid rgba(99,102,241,.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #a5b4fc;
    flex-shrink: 0;
}

.auth-feature-title {
    font-weight: 700;
    font-size: 0.93rem;
    margin-bottom: 3px;
    color: #fff;
}

.auth-feature-text {
    color: rgba(255,255,255,.65);
    font-size: 0.85rem;
    line-height: 1.55;
}

/* ── Trust strip ─────────────────────────────────────────────── */
.auth-trust-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.80rem;
    color: rgba(255,255,255,.55);
    font-weight: 600;
}

.auth-trust-strip i { color: #6ee7b7; font-size: 0.80rem; margin-right: 3px; }
.auth-trust-sep { color: rgba(255,255,255,.25); }

/* ── Decorative floating cards ───────────────────────────────── */
.auth-deco-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 10px 16px;
    z-index: 2;
    pointer-events: none;
    animation: authFloat 4s ease-in-out infinite;
}

.auth-deco-card--1 { top: 16%; right: 20px; animation-delay: 0s;   }
.auth-deco-card--2 { top: 43%; right: 14px; animation-delay: 1.4s; }
.auth-deco-card--3 { top: 67%; right: 20px; animation-delay: 2.8s; }

@keyframes authFloat {
    0%, 100% { transform: translateY(0);    }
    50%       { transform: translateY(-6px); }
}

.auth-deco-icon {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
}

.auth-deco-icon--green { background: rgba(52,211,153,.18); color: #34d399; }
.auth-deco-icon--amber { background: rgba(251,191,36,.18);  color: #fbbf24; }

.auth-deco-val { font-size: 0.88rem; font-weight: 800; color: #fff; line-height: 1.2; }
.auth-deco-val-green { color: #34d399; }
.auth-deco-val-amber { color: #fbbf24; }
.auth-deco-lbl { font-size: 0.66rem; color: rgba(255,255,255,.55); font-weight: 500; }

/* ── Right: Form panel ───────────────────────────────────────── */
.auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    background: rgba(255,255,255,.03);
    gap: 16px;
}

.auth-panel-compact {
    max-width: 440px;
    width: 100%;
}

.auth-panel-narrow {
    max-width: 480px;
    width: 100%;
}

/* Back to home link */
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.55);
    transition: color .2s;
    align-self: flex-start;
}

.auth-back-link:hover { color: rgba(255,255,255,.90); }
.auth-back-link i { font-size: 0.85rem; }

/* ── Form card ───────────────────────────────────────────────── */
.auth-card-modern {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,.30);
}

.auth-card-header { margin-bottom: 26px; }

.auth-card-header h2 {
    margin: 0 0 7px;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
}

.auth-card-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ── Avatar icon ─────────────────────────────────────────────── */
.auth-card-avatar {
    width: 50px; height: 50px;
    border-radius: 15px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #6366f1;
    margin-bottom: 14px;
}

.auth-card-avatar-danger {
    background: #fee2e2;
    color: #dc2626;
}

.auth-card-avatar-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

/* ── Form ────────────────────────────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-validation {
    border-radius: 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    padding: 10px 14px;
    font-size: 0.88rem;
}

.auth-validation-warning {
    margin-bottom: .5rem;
    background: rgba(251,191,36,.12);
    border-color: #fbbf24;
    color: #fbbf24;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-label {
    font-weight: 600;
    color: #334155;
    font-size: 0.88rem;
}

.auth-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 0 14px;
    transition: border-color .18s, box-shadow .18s;
}

.auth-input-wrap:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    background: #fff;
}

.auth-input-wrap > i {
    color: #94a3b8;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.auth-input {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 13px 0 !important;
    font-size: 0.94rem;
    color: #0f172a;
    flex: 1;
    min-width: 0;
}

.auth-input::placeholder { color: #94a3b8; }

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-check { margin: 0; }

.auth-link {
    color: #6366f1;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
}

.auth-link:hover { text-decoration: underline; color: #4f46e5; }

.auth-submit-link {
    text-decoration: none;
}

/* ── Submit button ───────────────────────────────────────────── */
.auth-submit-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 13px 18px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(99,102,241,.38);
    cursor: pointer;
    transition: transform .18s, box-shadow .18s;
}

.auth-submit-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(99,102,241,.46);
}

.auth-submit-btn-secondary {
    background: linear-gradient(135deg, #475569, #64748b);
    box-shadow: 0 14px 30px rgba(71,85,105,.22);
}

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

/* ── Password toggle ─────────────────────────────────────────── */
.auth-toggle-pw {
    background: none;
    border: none;
    padding: 0 2px;
    color: #94a3b8;
    font-size: 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .15s;
}

.auth-toggle-pw:hover { color: #6366f1; }

/* ── Card footer ─────────────────────────────────────────────── */
.auth-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.75rem;
    color: #94a3b8;
}

.auth-card-footer i { color: #6ee7b7; font-size: 0.78rem; }

.auth-page-centered {
    justify-content: center;
    align-items: center;
}

.auth-icon-violet {
    color: #7c3aed;
}

.auth-icon-success-lg {
    color: #059669;
    font-size: 2rem;
}

.auth-copy-spaced {
    color: #64748b;
    margin-top: 8px;
}

.auth-form-compact-top {
    padding-top: 0;
}

.auth-remember-label {
    font-size: .88rem;
    color: #64748b;
}

.auth-panel-feature-required {
    max-width: 520px;
    width: 100%;
}

.auth-card-centered {
    text-align: center;
}

.feature-required-header {
    margin-bottom: 1.5rem;
}

.feature-required-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
}

.feature-required-title {
    margin-bottom: .5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #f1f5f9;
}

.feature-required-highlight {
    color: #818cf8;
}

.feature-required-copy {
    margin-bottom: 1.8rem;
    color: #94a3b8;
    font-size: .93rem;
    line-height: 1.6;
}

.feature-required-strong {
    color: #e2e8f0;
}

.feature-required-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-bottom: 1.8rem;
}

.feature-required-plan-card {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 1rem .75rem;
    background: rgba(255,255,255,.05);
}

.feature-required-plan-card-featured {
    border: 2px solid #6366f1;
    background: rgba(99,102,241,.12);
}

.feature-required-plan-name {
    margin-bottom: .3rem;
    font-size: .9rem;
    font-weight: 700;
    color: #f1f5f9;
}

.feature-required-plan-price {
    margin-bottom: .5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #818cf8;
}

.feature-required-plan-period {
    font-size: .75rem;
    color: #64748b;
}

.feature-required-plan-copy {
    font-size: .78rem;
    line-height: 1.5;
    color: #94a3b8;
}

.feature-required-note {
    margin-bottom: 1.5rem;
    font-size: .85rem;
    color: #64748b;
}

.feature-required-note-link {
    color: #818cf8;
}

.feature-required-back-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.4rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.08);
    color: #e2e8f0;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
}

.feature-required-back-link:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */

/* ── Tablet: stack vertically, allow natural scroll ─────────── */
@media (max-width: 1100px) {
    .auth-deco-card { display: none; }

    /* Single column — stacks showcase on top, form below */
    .auth-layout {
        grid-template-columns: 1fr;
        max-width: 640px;
        /* Remove fixed min-height so content determines height */
    }

    .auth-showcase { padding: 36px 32px; }
    .auth-showcase-text h1 { font-size: 2rem; }

    /* Page: top-align so card can grow naturally + be scrolled */
    .auth-page {
        align-items: flex-start;
        padding-top: 24px;
        padding-bottom: 24px;
    }
    .auth-panel { padding: 32px 28px; }
}

/* ── Large phone ─────────────────────────────────────────────── */
@media (max-width: 700px) {
    .auth-page { padding: 16px; }
    .auth-layout { border-radius: 20px; }

    .auth-showcase { padding: 28px 20px; }
    .auth-showcase-text h1 { font-size: 1.75rem; }
    .auth-feature-list { gap: 10px; }
    .auth-feature-item { padding: 12px; border-radius: 14px; }

    .auth-panel { padding: 24px 20px; }
    .auth-card-modern { padding: 26px 22px; }
}

/* ── Small phone ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-page { padding: 12px; }

    .auth-showcase { padding: 22px 16px; }
    .auth-showcase-text h1 { font-size: 1.5rem; }

    /* Trim the feature list on very small screens */
    .auth-feature-list .auth-feature-item:last-child { display: none; }

    .auth-card-modern { border-radius: 18px; padding: 22px 16px; }
    .auth-input-wrap  { border-radius: 12px; }
    .auth-submit-btn  { border-radius: 12px; }
    .auth-panel { padding: 20px 16px; }
}
