/* ══════════════════════════════════════════════════════════════════════════
   AUTH.CSS — PiposX Login / Sign-up / Forgot-Password
   Standalone stylesheet; neutralises Bootstrap + style.css conflicts.
   No Bootstrap classes used. Tailwind/DaisyUI utilities available via
   tailwind-compiled.css (already loaded in Home.Master).
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. GLOBAL RESET (auth pages only) ─────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html { height: 100%; }

body,
body.mobile-mode {
    padding-top:    0 !important;
    padding-bottom: 0 !important;
    margin:         0 !important;
    overflow-x:     hidden !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

body {
    background-color: #070c1a !important;
    background-image:
        radial-gradient(ellipse 65% 50% at 12% 88%, rgba(245,158,11,0.11) 0%, transparent 55%),
        radial-gradient(ellipse 50% 45% at 88% 12%, rgba(14,165,233,0.13) 0%, transparent 55%),
        radial-gradient(ellipse 88% 65% at 50% 45%, rgba(37,99,235,0.19) 0%, transparent 70%),
        linear-gradient(158deg, #070c1a 0%, #0c1930 28%, #15223e 60%, #0a0f1e 100%) !important;
    min-height: 100% !important;
}

/* ── 2. MASTER PAGE CHROME — hide everything not needed on auth page ────── */
#header,
.notification-container              { display: none !important; }

#footer,
#footer *                            {
    display:  none     !important;
    height:   0        !important;
    overflow: hidden   !important;
    padding:  0        !important;
    margin:   0        !important;
}

#features, #app-download, #site-facts,
#live-feed, .img-divider             { display: none !important; }

#shortModal                          { display: none !important; }

section#banner,
#banner > .container                 {
    background:       transparent !important;
    background-image: none        !important;
}

/* ── 3. FORM1 — full viewport column ───────────────────────────────────── */
#form1 {
    min-height:     100vh      !important;
    display:        flex       !important;
    flex-direction: column     !important;
    margin:         0          !important;
    padding:        0          !important;
}

/* ── 4. BANNER — centering wrapper ─────────────────────────────────────── */
#banner {
    flex:             1            !important;
    display:          flex         !important;
    align-items:      center       !important;
    justify-content:  center       !important;
    min-height:       100vh        !important;
    width:            100%         !important;
    padding:          2.5rem 1rem  !important;
    background:       transparent  !important;
    background-image: none         !important;
    position:         relative     !important;
}

/* Override Bootstrap .container inside banner */
#banner > .container {
    max-width:        100%    !important;
    width:            100%    !important;
    padding-left:     0       !important;
    padding-right:    0       !important;
    margin:           0       !important;
    display:          flex    !important;
    align-items:      center  !important;
    justify-content:  center  !important;
    min-height:       unset   !important;
}

/* ── 5. BACKGROUND DECORATIONS ─────────────────────────────────────────── */
.auth-stars {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at  7% 11%, rgba(255,255,255,0.50) 0%, transparent 100%),
        radial-gradient(1px   1px   at 21% 37%, rgba(255,255,255,0.32) 0%, transparent 100%),
        radial-gradient(2px   2px   at 37%  6%, rgba(255,255,255,0.62) 0%, transparent 100%),
        radial-gradient(1px   1px   at 53% 61%, rgba(255,255,255,0.38) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 68% 21%, rgba(255,255,255,0.52) 0%, transparent 100%),
        radial-gradient(1px   1px   at 83% 47%, rgba(255,255,255,0.32) 0%, transparent 100%),
        radial-gradient(1px   1px   at 13% 74%, rgba(255,255,255,0.28) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 91%  7%, rgba(255,255,255,0.44) 0%, transparent 100%),
        radial-gradient(1px   1px   at 45% 91%, rgba(255,255,255,0.30) 0%, transparent 100%),
        radial-gradient(1px   1px   at 76% 82%, rgba(255,255,255,0.26) 0%, transparent 100%);
}

@keyframes cap-float-a {
    0%, 100% { transform: translateY(0)     rotate(-8deg) scale(1);    opacity: .55; }
    50%      { transform: translateY(-22px) rotate(5deg)  scale(1.05); opacity: .80; }
}
@keyframes cap-float-b {
    0%, 100% { transform: translateY(0)     rotate(10deg);  opacity: .38; }
    50%      { transform: translateY(-17px) rotate(-5deg);  opacity: .62; }
}

.auth-cap {
    position: fixed; z-index: 0;
    font-size: 2rem; pointer-events: none; user-select: none;
    filter: drop-shadow(0 4px 12px rgba(245,158,11,0.28));
    color: rgba(245,158,11,0.60);
}
.auth-cap--1 { top: 9%;     left:  5%; font-size: 2.75rem; animation: cap-float-a 7s   ease-in-out infinite; }
.auth-cap--2 { top: 7%;     right: 7%; font-size: 1.75rem; animation: cap-float-b 8.5s ease-in-out infinite 1.5s; color: rgba(14,165,233,0.55); }
.auth-cap--3 { bottom: 14%; left:  7%; font-size: 1.5rem;  animation: cap-float-a 6.2s ease-in-out infinite 0.8s; }
.auth-cap--4 { bottom: 10%; right: 5%; font-size: 2rem;    animation: cap-float-b 9.2s ease-in-out infinite 2.5s; color: rgba(14,165,233,0.50); }

.auth-bg-orb {
    position: fixed; z-index: 0; border-radius: 50%; pointer-events: none;
}
.auth-bg-orb--1 {
    width: 700px; height: 700px; top: -200px; left: -200px;
    background: radial-gradient(circle, rgba(37,99,235,0.20) 0%, transparent 65%);
}
.auth-bg-orb--2 {
    width: 550px; height: 550px; bottom: -150px; right: -150px;
    background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 65%);
}
.auth-bg-orb--3 {
    width: 350px; height: 350px; top: 38%; right: 8%;
    background: radial-gradient(circle, rgba(14,165,233,0.12) 0%, transparent 65%);
}

/* ── 6. AUTH CARD ───────────────────────────────────────────────────────── */
.auth-wrap {
    position: relative; z-index: 10;
    width: 100%; max-width: 468px;
}

.auth-card {
    background:    rgba(255,255,255,0.99);
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.14),
        0 4px 16px  rgba(0,0,0,0.18),
        0 20px 50px rgba(0,0,0,0.30),
        0 50px 90px rgba(0,0,0,0.18);
    padding: 2.625rem 2.375rem 2.125rem;
    width:   100%;
    border:  1px solid rgba(255,255,255,0.5);
}

/* ── Logo ── */
.ac-logo { text-align: center; margin-bottom: 1.5rem; }
.ac-logo-link {
    display:         inline-block;
    font-family:     'Poppins', sans-serif;
    font-size:       1.8rem; font-weight: 800; color: #0f172a;
    letter-spacing:  -0.03em; text-decoration: none; line-height: 1;
}
.ac-logo-link em   { font-style: normal; color: #f59e0b; }
.ac-tagline {
    display:        block;        margin-top: 0.25rem;
    font-size:      0.68rem;      color: #94a3b8;
    letter-spacing: 0.06em;       text-transform: uppercase; font-weight: 400;
}

/* ── Tab switcher ── */
.ac-tabs {
    display:        flex; gap: 3px; padding: 3px;
    background:     #f1f5f9; border-radius: 13px;
    margin-bottom:  1.75rem;
}
/* Hide tabs when on forgot-password panel */
.ac-tabs.is-hidden { display: none !important; }

.ac-tab {
    flex: 1; text-align: center;
    padding:         0.5rem; border-radius: 10px;
    font-size:       0.82rem; font-weight: 500; color: #64748b;
    cursor:          pointer; user-select: none;
    transition:      all 0.2s;
    font-family:     'Poppins', sans-serif;
    /* Remove any Bootstrap button/link styles that might bleed in */
    background:      none; border: none; text-decoration: none;
}
.ac-tab:hover { color: #374151; }
.ac-tab.active {
    background:   #fff; color: #2563eb; font-weight: 700;
    box-shadow:   0 1px 6px rgba(0,0,0,0.10);
}

/* ── Kill style.css triangle pseudo-element (border-trick artefact) ─────── */
/* style.css:477 draws a CSS triangle below the form via .sign-in-form:after  */
.sign-in-form::after,
.sign-in-form:after {
    content:  none !important;
    display:  none !important;
    border:   none !important;
    position: static !important;
}

/* ── sign-in-form legacy wrapper reset ─────────────────────────────────── */
.sign-in-form {
    font-family:   'Poppins', sans-serif !important;
    background:    none    !important;
    border:        none    !important;
    box-shadow:    none    !important;
    padding:       0       !important;
    margin:        0       !important;
    min-height:    auto    !important;  /* overrides script.js height injection */
    position:      static  !important;
    width:         100%    !important;
    max-width:     100%    !important;
    border-radius: 0       !important;
}
.sign-in-form .logo { display: none !important; }

/* ── Panel visibility — class-driven, immune to jQuery .show()/.hide() ── */
/*   script.js uses jQuery .show()/.hide() which add display:block/none     */
/*   as inline styles. CSS !important overrides inline styles.               */
.sign-in-form .form-wrapper {
    display: none !important;   /* hidden by default */

    /* Also reset any legacy Bootstrap/style.css panel chrome */
    background:    none    !important;
    border:        none    !important;
    box-shadow:    none    !important;
    padding:       0       !important;
    position:      static  !important;
    width:         100%    !important;
    max-width:     100%    !important;
    border-radius: 0       !important;
}
.sign-in-form .form-wrapper.panel-active {
    display: block !important;  /* show active panel — wins over inline styles */
}

/* ── Panel header ── */
.ac-head { text-align: center; margin-bottom: 1.5rem; }
.ac-head h2 {
    font-family:    'Poppins', sans-serif;
    font-size:      1.275rem; font-weight: 700; color: #0f172a;
    margin:         0 0 0.3rem; letter-spacing: -0.025em; line-height: 1.2;
}
.ac-head p {
    font-size:   0.8rem; color: #64748b; margin: 0;
    font-family: 'Poppins', sans-serif; line-height: 1.55;
}

/* ── Social buttons ── */
.social-stack { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.875rem; }

.soc-btn {
    display:          flex           !important;
    align-items:      center         !important;
    justify-content:  center         !important;
    gap:              0.625rem       !important;
    width:            100%           !important;
    height:           44px           !important;
    border-radius:    10px           !important;
    font-family:      'Poppins', sans-serif !important;
    font-size:        0.855rem       !important;
    font-weight:      500            !important;
    cursor:           pointer        !important;
    transition:       all 0.18s      !important;
    text-decoration:  none           !important;
    border:           1.5px solid transparent !important;
    line-height:      1              !important;
}
.soc-btn i { font-size: 1.25rem !important; }

.soc-btn--google {
    background:   #fff          !important;
    border-color: #e2e8f0       !important;
    color:        #374151       !important;
    box-shadow:   0 1px 4px rgba(0,0,0,0.07) !important;
}
.soc-btn--google:hover {
    border-color:    #cbd5e1    !important;
    background:      #f8fafc    !important;
    box-shadow:      0 2px 10px rgba(0,0,0,0.11) !important;
    text-decoration: none       !important;
    color:           #1e293b    !important;
}
.soc-btn--google i { color: #ea4335 !important; }

.soc-btn--apple {
    background:   #111827 !important;
    color:        #fff    !important;
    border-color: #111827 !important;
}
.soc-btn--apple:hover {
    background:      #1e293b !important;
    text-decoration: none    !important;
    color:           #fff    !important;
}

/* Facebook asp:LinkButton — preserve existing backend class */
.btn.facebook,
.btn.facebook:hover,
.btn.facebook:active,
.btn.facebook:focus {
    display:          flex          !important;
    align-items:      center        !important;
    justify-content:  center        !important;
    gap:              0.625rem      !important;
    width:            100%          !important;
    height:           44px          !important;
    border-radius:    10px          !important;
    background:       #1877f2       !important;
    color:            #fff          !important;
    font-weight:      500           !important;
    font-size:        0.855rem      !important;
    font-family:      'Poppins', sans-serif !important;
    border:           none          !important;
    box-shadow:       none          !important;
    text-decoration:  none          !important;
    padding:          0 1rem        !important;
    line-height:      44px          !important;
    transition:       background 0.18s !important;
}
.btn.facebook:hover { background: #1565d4 !important; }
.btn.facebook .facebook_image {
    display:     flex        !important;
    align-items: center      !important;
    float:       none        !important;
    flex-shrink: 0;
}
.btn.facebook .facebook_image img { width: 18px; height: 18px; display: block !important; }

/* ── OR divider ── */
.ac-or {
    display:         flex; align-items: center; gap: 0.75rem;
    margin:          0.875rem 0;
    font-size:       0.7rem; font-weight: 600; color: #94a3b8;
    font-family:     'Poppins', sans-serif;
    text-transform:  uppercase; letter-spacing: 0.1em;
}
.ac-or::before,
.ac-or::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

/* ── Form fields ── */
.ac-field { margin-bottom: 0.75rem; }

.ac-label {
    display:        flex;
    align-items:    center;
    gap:            0.3rem;
    font-size:      0.72rem;
    font-weight:    600;
    color:          #374151;
    margin-bottom:  0.28rem;
    font-family:    'Poppins', sans-serif;
    letter-spacing: 0.02em;
}
.ac-label i { font-size: 0.95rem; color: #94a3b8; }

/* All inputs — override Bootstrap form-control + style.css */
.ac-field .form-control,
.ac-field select.form-control {
    width:              100%            !important;
    height:             44px            !important;
    border:             1.5px solid #e2e8f0 !important;
    border-radius:      10px            !important;
    padding:            0 0.875rem      !important;
    font-size:          0.875rem        !important;
    font-family:        'Poppins', sans-serif !important;
    background:         #f8fafc         !important;
    box-shadow:         none            !important;
    color:              #1e293b         !important;
    line-height:        44px            !important;
    transition:         border-color 0.18s, box-shadow 0.18s, background 0.18s !important;
    -webkit-appearance: none            !important;
    appearance:         none            !important;
    outline:            none            !important;
    display:            block           !important;
}
.ac-field .form-control:focus,
.ac-field select.form-control:focus {
    border-color: #3b82f6               !important;
    box-shadow:   0 0 0 3.5px rgba(59,130,246,0.14) !important;
    background:   #fff                  !important;
    outline:      none                  !important;
}
.ac-field .form-control::placeholder { color: #94a3b8 !important; font-size: 0.84rem !important; }

/* Server-side error labels */
.ac-field .error {
    display:        block;
    font-size:      0.68rem; color: #ef4444;
    margin-bottom:  0.2rem; min-height: 0.8rem;
    font-family:    'Poppins', sans-serif;
}

/* Password field with eye toggle */
.ac-pw { position: relative; }
.ac-pw .form-control { padding-right: 2.75rem !important; }
.ac-pw-eye {
    position:        absolute; right: 0; top: 0; bottom: 0;
    width:           42px; display: flex; align-items: center; justify-content: center;
    background:      none; border: none; cursor: pointer;
    color:           #94a3b8; padding: 0; transition: color 0.15s;
    z-index:         2;
}
.ac-pw-eye:hover { color: #64748b; }
.ac-pw-eye i     { font-size: 1.1rem; pointer-events: none; }

/* Compact fields in signup panel */
.form-wrapper.signup .ac-field { margin-bottom: 0.625rem; }
.form-wrapper.signup .ac-field .form-control,
.form-wrapper.signup .ac-field select.form-control {
    height:      42px !important;
    line-height: 42px !important;
}

/* ── Forgot link ── */
.ac-forgot-row {
    display:         flex; justify-content: flex-end;
    margin:          -0.125rem 0 0.625rem;
}
.ac-forgot {
    font-size:       0.75rem; color: #3b82f6; font-weight: 500;
    text-decoration: none; cursor: pointer;
    font-family:     'Poppins', sans-serif; transition: color 0.15s;
    background:      none; border: none; padding: 0;
}
.ac-forgot:hover { color: #2563eb; text-decoration: underline; }

/* ── Primary CTA button ── */
.ac-cta,
button.ac-cta,
input[type="submit"].ac-cta {
    display:          flex            !important;
    align-items:      center          !important;
    justify-content:  center          !important;
    gap:              0.5rem          !important;
    width:            100%            !important;
    height:           50px            !important;
    border:           none            !important;
    border-radius:    12px            !important;
    background:       linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color:            #0a0f1e         !important;
    font-weight:      700             !important;
    font-size:        0.92rem         !important;
    font-family:      'Poppins', sans-serif !important;
    cursor:           pointer         !important;
    letter-spacing:   0.025em         !important;
    margin-top:       0.875rem        !important;
    box-shadow:       0 4px 14px rgba(245,158,11,0.40) !important;
    transition:       all 0.2s        !important;
    position:         relative        !important;
    overflow:         hidden          !important;
}
.ac-cta:hover {
    transform:       translateY(-2px)                      !important;
    box-shadow:      0 7px 22px rgba(245,158,11,0.56)      !important;
    color:           #0a0f1e                               !important;
    text-decoration: none                                  !important;
}
.ac-cta:active { transform: translateY(0) !important; }
.ac-cta i      { font-size: 1.1rem !important; }

/* Shimmer sweep on hover */
.ac-cta::after {
    content: ''; position: absolute;
    top: 0; left: -100%; width: 55%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
    transition: left 0.55s ease;
}
.ac-cta:hover::after { left: 160%; }

/* ── Bottom nav links ── */
.ac-nav-links {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    gap:             0.35rem;
    margin-top:      1rem;
    padding-top:     0.875rem;
    border-top:      1px solid #f1f5f9;
}

/* These classes kept exactly — script.js binds to them programmatically */
.signin-link,
.forget-pass,
.create-account {
    font-size:       0.78rem        !important;
    color:           #3b82f6        !important;
    font-weight:     600            !important;
    text-decoration: none           !important;
    font-family:     'Poppins', sans-serif !important;
    cursor:          pointer        !important;
    background:      none;
    border:          none;
    padding:         0;
    display:         inline-flex;
    align-items:     center;
    gap:             0.25rem;
    transition:      color 0.15s    !important;
}
.signin-link:hover,
.forget-pass:hover,
.create-account:hover { color: #2563eb !important; text-decoration: underline !important; }

.ac-nav-row {
    display:     flex; align-items: center; gap: 0.35rem;
    font-size:   0.78rem; color: #64748b;
    font-family: 'Poppins', sans-serif;
}

.ac-hint {
    font-size:   0.72rem; color: #94a3b8; text-align: center;
    line-height: 1.6;     font-family: 'Poppins', sans-serif;
    margin-top:  0.5rem;
}
.ac-signup-note {
    font-size:   0.78rem; color: #64748b; text-align: center;
    margin-bottom: 1rem;  line-height: 1.55;
    font-family: 'Poppins', sans-serif;
}
.ac-signup-note strong { color: #2563eb; }
.ac-reset-note {
    font-size:    0.8rem;  color: #64748b; text-align: center;
    margin-bottom: 1.125rem; line-height: 1.6;
    font-family:  'Poppins', sans-serif;
}

/* ── Toast notification ── */
.cs-toast {
    position:        fixed; bottom: 1.5rem; left: 50%;
    transform:       translateX(-50%) translateY(10px);
    background:      #0f172a; color: #fff;
    font-size:       0.8rem;  font-weight: 500;
    padding:         0.6rem 1.375rem; border-radius: 999px;
    box-shadow:      0 4px 20px rgba(0,0,0,0.45);
    border:          1px solid rgba(255,255,255,0.12);
    font-family:     'Poppins', sans-serif;
    z-index:         9999;  opacity: 0; pointer-events: none;
    transition:      opacity 0.25s, transform 0.25s;
    white-space:     nowrap;
}
.cs-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Language selector (mobile) ── */
.auth-lang {
    position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 100;
}
.auth-lang .btn-primary {
    background:   rgba(255,255,255,0.10) !important;
    border:       1px solid rgba(255,255,255,0.22) !important;
    color:        #fff  !important;
    border-radius: 0.5rem !important;
    font-size:    0.8rem  !important;
    font-family:  'Poppins', sans-serif !important;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-cap--3,
    .auth-cap--4     { display: none; }
    #banner          { padding: 1.5rem 1rem !important; }
    .auth-card       { padding: 2rem 1.625rem 1.75rem; border-radius: 20px; }
}
@media (max-width: 480px) {
    #banner { padding: 1.25rem 0.875rem !important; align-items: flex-start !important; }
}
@media (max-width: 375px) {
    #banner          { padding: 1rem 0.75rem !important; align-items: flex-start !important; }
    .auth-wrap       { max-width: 100%; }
    .auth-card       { padding: 1.75rem 1.25rem 1.5rem; border-radius: 18px; }
    .ac-logo-link    { font-size: 1.55rem; }
    .auth-cap        { display: none; }
}

/* ── REDUCED MOTION ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .auth-cap,
    .ac-cta::after  { animation: none; transition: none; }
}
