/* ============================================================
 * ANSOFTIO Premium Auth Pages 2026
 * ============================================================
 * Wraps the existing .asf-auth-card in a split-screen layout
 * with brand panel on the left + glass-morphism card on the right.
 *
 * Non-destructive — works with the existing markup.
 * ============================================================ */

body.asf-auth-page{
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 0% 0%, rgba(59,130,246,0.18), transparent 55%),
        radial-gradient(900px 600px at 100% 100%, rgba(139,92,246,0.20), transparent 55%),
        linear-gradient(135deg, #050816 0%, #0B1426 60%, #0F1B33 100%);
    color: #fff;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    overflow-x: hidden;
}

/* LEFT BRAND PANEL */
body.asf-auth-page::before{
    content: "";
    grid-column: 1;
    grid-row: 1;
    background:
        radial-gradient(600px 400px at 30% 20%, rgba(139,92,246,0.35), transparent 60%),
        radial-gradient(500px 400px at 70% 80%, rgba(6,182,212,0.30), transparent 60%),
        linear-gradient(135deg, #1E1B4B 0%, #0F1B33 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    min-height: 100vh;
    position: relative;
    z-index: 0;
}

/* Brand panel content — injected via ::before is text-only friendly,
   but we use a real overlay element for accessibility */
body.asf-auth-page .asf-auth-brand{
    position: fixed;
    left: 0;
    top: 0;
    width: 50vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
}
body.asf-auth-page .asf-auth-brand-logo{
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
body.asf-auth-page .asf-auth-brand-logo span{ color: #06b6d4; -webkit-text-fill-color: #06b6d4; }

body.asf-auth-page .asf-auth-brand-headline{
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 32px 0 16px;
    background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 110%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
body.asf-auth-page .asf-auth-brand-sub{
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    max-width: 440px;
}

body.asf-auth-page .asf-auth-brand-stats{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
    max-width: 440px;
}
body.asf-auth-page .asf-auth-brand-stat{
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 18px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
body.asf-auth-page .asf-auth-brand-stat-num{
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.asf-auth-page .asf-auth-brand-stat-label{
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

body.asf-auth-page .asf-auth-brand-quote{
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 18px 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-width: 440px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
}
body.asf-auth-page .asf-auth-brand-quote-author{
    margin-top: 10px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

/* Floating shapes on the brand panel */
body.asf-auth-page .asf-auth-brand-shape{
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.4;
}
body.asf-auth-page .asf-auth-brand-shape-1{
    width: 380px; height: 380px;
    top: -120px; left: -100px;
    background: conic-gradient(from 0deg, #3b82f6, #8b5cf6, #06b6d4, #3b82f6);
    animation: asf-auth-spin 28s linear infinite;
}
body.asf-auth-page .asf-auth-brand-shape-2{
    width: 320px; height: 320px;
    bottom: -100px; right: -80px;
    background: conic-gradient(from 90deg, #8b5cf6, #06b6d4, #3b82f6, #8b5cf6);
    animation: asf-auth-spin 36s linear infinite reverse;
}
@keyframes asf-auth-spin{ to { transform: rotate(360deg); } }

/* RIGHT CARD AREA */
body.asf-auth-page > .asf-auth-card,
body.asf-auth-page .asf-auth-page-wrap{
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    box-shadow:
        0 50px 100px -20px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.06);
    padding: 44px 40px;
    color: #fff;
    align-self: center;
    justify-self: center;
    width: min(100%, 460px);
    margin: 40px;
    position: relative;
    z-index: 2;
}

/* Auth title polish */
body.asf-auth-page .asf-auth-title{
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 8px;
    background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 110%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.asf-auth-page .asf-auth-sub{
    color: rgba(255,255,255,0.6);
    font-size: 0.9375rem;
    margin: 0 0 28px;
    line-height: 1.55;
}

/* Logo inside card (reduce — brand is now on left) */
body.asf-auth-page .asf-auth-logo{ display: none; }
@media (max-width: 900px){
    body.asf-auth-page .asf-auth-logo{ display: block; }
}

/* Inputs polish */
body.asf-auth-page .asf-form-input,
body.asf-auth-page input[type="email"],
body.asf-auth-page input[type="password"],
body.asf-auth-page input[type="text"],
body.asf-auth-page input[type="tel"]{
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 13px 16px !important;
    font-size: 0.9375rem !important;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease !important;
}
body.asf-auth-page .asf-form-input:focus,
body.asf-auth-page input:focus{
    border-color: #3b82f6 !important;
    background: rgba(255,255,255,0.08) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.18) !important;
    outline: 0 !important;
}
body.asf-auth-page .asf-form-input::placeholder{ color: rgba(255,255,255,0.35); }

body.asf-auth-page .asf-form-label{
    color: rgba(255,255,255,0.85);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.01em;
}

/* Role tabs polish */
body.asf-auth-page .asf-role-tabs{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}
body.asf-auth-page .asf-role-tab{
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.6);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.25s ease;
}
body.asf-auth-page .asf-role-tab:hover{ color: #fff; background: rgba(255,255,255,0.04); }
body.asf-auth-page .asf-role-tab[aria-selected="true"]{
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(59,130,246,0.5);
}
body.asf-auth-page .asf-role-tab-icon{ font-size: 1rem; }

/* Submit button */
body.asf-auth-page button[type="submit"],
body.asf-auth-page .asf-btn-primary{
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4) !important;
    background-size: 200% 200% !important;
    border: 0 !important;
    color: #fff !important;
    padding: 13px 22px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.9375rem !important;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease, background-position 0.4s ease !important;
    box-shadow: 0 12px 28px -8px rgba(59,130,246,0.5) !important;
}
body.asf-auth-page button[type="submit"]:hover{
    transform: translateY(-2px);
    background-position: 100% 50% !important;
    box-shadow: 0 18px 36px -8px rgba(59,130,246,0.65) !important;
}
body.asf-auth-page button[type="submit"]:active{ transform: translateY(0); }

/* Error message */
body.asf-auth-page .asf-auth-error,
body.asf-auth-page .asf-form-error{
    background: rgba(220,38,38,0.12);
    border: 1px solid rgba(220,38,38,0.3);
    color: #fca5a5;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

/* Forgot password / register link area */
body.asf-auth-page a{ color: #60a5fa; transition: color 0.2s ease; }
body.asf-auth-page a:hover{ color: #93c5fd; }

/* Bottom switch link (e.g. "Don't have an account?") */
body.asf-auth-page .asf-auth-switch{
    text-align: center;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
}
body.asf-auth-page .asf-auth-switch a{ font-weight: 600; }

/* Show-password toggle button */
body.asf-auth-page .asf-pwd-toggle{
    color: rgba(255,255,255,0.5) !important;
}
body.asf-auth-page .asf-pwd-toggle:hover{ color: #fff !important; }

/* Loading spinner inside submit btn */
body.asf-auth-page button[type="submit"].is-loading{
    color: transparent !important;
    pointer-events: none;
}
body.asf-auth-page button[type="submit"].is-loading::after{
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 18px; height: 18px;
    margin-top: -9px; margin-left: -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: asf-auth-spin-ring 0.7s linear infinite;
}
body.asf-auth-page button[type="submit"]{ position: relative; }
@keyframes asf-auth-spin-ring{ to { transform: rotate(360deg); } }

/* Mobile — stack to single column, hide brand panel content */
@media (max-width: 900px){
    body.asf-auth-page{
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }
    body.asf-auth-page::before,
    body.asf-auth-page .asf-auth-brand{ display: none; }
    body.asf-auth-page > .asf-auth-card,
    body.asf-auth-page .asf-auth-page-wrap{
        grid-column: 1;
        margin: 24px auto;
        padding: 32px 28px;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
    body.asf-auth-page .asf-auth-brand-shape-1,
    body.asf-auth-page .asf-auth-brand-shape-2{ animation: none; }
}
