/* ══════════════════════════════════════════════════════════════
   Identity Auth Layout — Split-screen shell
   Form panel (left) + brand panel (right), gradient hero.
   Reuses ags-id-* primitives from identity-pages.css.
   ══════════════════════════════════════════════════════════════ */

.ags-auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ags-id-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

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

/* ── Form panel (left) ──────────────────────────────────────── */
.ags-auth-form-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.5rem 2.5rem;
    background:
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.05), transparent 45%),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.04), transparent 40%),
        #fff;
    overflow-y: auto;
}

.ags-auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.ags-auth-logo-link {
    display: inline-flex;
    align-items: center;
}

.ags-auth-logo-link img {
    display: block;
    width: auto;
    transition: opacity 0.15s ease;
}

.ags-auth-logo-link:hover img {
    opacity: 0.75;
}

.ags-auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--ags-id-radius-btn);
    color: var(--ags-id-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--ags-id-transition);
}

.ags-auth-back-link:hover {
    background: var(--ags-id-bg-light);
    color: var(--ags-id-text-dark);
    text-decoration: none;
}

.ags-auth-back-link i {
    font-size: 1.15rem;
    line-height: 1;
}

.ags-auth-form-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.ags-auth-form-inner {
    width: 100%;
    max-width: 440px;
    animation: ags-auth-slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ags-auth-slide-in {
    from { opacity: 0; transform: translateY(0.5rem); }
    to   { opacity: 1; transform: translateY(0); }
}

.ags-auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-shrink: 0;
    padding-top: 1rem;
    font-size: 0.78rem;
    color: var(--ags-id-text-light);
}

.ags-auth-footer a {
    color: var(--ags-id-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ags-auth-footer a:hover {
    color: var(--ags-id-primary);
}

.ags-auth-footer-sep {
    opacity: 0.5;
}

/* ── Brand panel (right) ────────────────────────────────────── */
.ags-auth-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 3.5rem;
    color: #fff;
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 35%, #7c3aed 70%, #06b6d4 130%);
}

/* Decorative radial blobs layered over the gradient.
   Borrowed from .ags-my-projects-hero__header (MyProjects overview). */
.ags-auth-brand-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 22%, rgba(167, 139, 250, 0.55), transparent 42%),
        radial-gradient(circle at 82% 75%, rgba(34, 211, 238, 0.45), transparent 38%),
        radial-gradient(circle at 50% 110%, rgba(236, 72, 153, 0.30), transparent 45%);
    mix-blend-mode: screen;
    opacity: 0.85;
}

.ags-auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
    width: 100%;
}

.ags-auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 2.5rem;
    color: #fff;
}

.ags-auth-brand-logo img {
    filter: brightness(0) invert(1);
}

.ags-auth-brand-wordmark {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.ags-auth-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.ags-auth-brand-eyebrow i {
    font-size: 0.85rem;
    color: #fde68a;
}

.ags-auth-brand-title {
    font-size: clamp(1.85rem, 2.3vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    color: #fff;
}

.ags-auth-brand-subtitle {
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 2.25rem;
    max-width: 380px;
}

.ags-auth-value-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.ags-auth-value-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ags-auth-value-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.ags-auth-value-icon--violet { background: rgba(167, 139, 250, 0.85); }
.ags-auth-value-icon--cyan   { background: rgba(34, 211, 238, 0.85); color: #083344; }
.ags-auth-value-icon--emerald{ background: rgba(52, 211, 153, 0.85); color: #064e3b; }

.ags-auth-value-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

.ags-auth-value-sub {
    display: block;
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 0.15rem;
}

/* ══════════════════════════════════════════════════════════════
   Typography lifts inside the form panel
   Make ags-id-card-title feel hero-grade without changing the
   shared identity-pages.css primitives.
   ══════════════════════════════════════════════════════════════ */

.ags-auth-form-inner .ags-id-card-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.ags-auth-form-inner .ags-id-card-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Card icon: switch from flat neutral to subtle violet-tinted gradient
   so it reads as branded, not generic. */
.ags-auth-form-inner .ags-id-card-icon {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #6d28d9;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.18);
    margin-bottom: 1.25rem;
}

.ags-auth-form-inner .ags-id-status-icon {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.ags-auth-form-inner .ags-id-status-icon--success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #047857;
}

.ags-auth-form-inner .ags-id-status-icon--danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
}

.ags-auth-form-inner .ags-id-status-icon--warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.ags-auth-form-inner .ags-id-status-icon--info {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #6d28d9;
}

/* ══════════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════════ */

/* Tablet — narrower brand panel */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .ags-auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    }

    .ags-auth-brand-panel {
        padding: 2.5rem;
    }
}

/* Below 992px — brand panel collapses into a compact header strip on top */
@media (max-width: 991.98px) {
    .ags-auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        min-height: 100vh;
    }

    .ags-auth-brand-panel {
        order: -1;
        padding: 1.5rem 1.5rem 1.75rem;
        text-align: center;
    }

    .ags-auth-brand-content {
        max-width: 600px;
        margin: 0 auto;
    }

    .ags-auth-brand-logo {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .ags-auth-brand-title {
        font-size: clamp(1.5rem, 4vw, 2rem);
        margin-bottom: 0.5rem;
    }

    .ags-auth-brand-subtitle {
        font-size: 0.92rem;
        margin: 0 auto 1rem;
    }

    /* Hide the value-prop list on tablet/mobile to keep the brand
       strip compact — value props live on the marketing site, the
       auth flow's job here is just to anchor the brand. */
    .ags-auth-value-list {
        display: none;
    }

    .ags-auth-form-panel {
        padding: 1.25rem 1.5rem 2rem;
    }
}

/* Mobile — hide brand strip entirely on small phones to maximize form room */
@media (max-width: 575.98px) {
    .ags-auth-brand-panel {
        display: none;
    }

    .ags-auth-shell {
        grid-template-rows: 1fr;
    }

    .ags-auth-form-panel {
        padding: 1rem 1.25rem 1.5rem;
    }

    .ags-auth-form-inner .ags-id-card-title {
        font-size: 1.5rem;
    }

    .ags-auth-topbar {
        margin-bottom: 0.5rem;
    }

    .ags-auth-back-link span {
        display: none;
    }
}
