/* ═══════════════════════════════════════════════════════════════════════════
   TaskBullet — Auth Pages (sign-in, sign-up, pending-approval)
   Shared styles for a cohesive, premium auth experience.
   ═══════════════════════════════════════════════════════════════════════════ */

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0f0a2e 0%, #2a1f6e 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow: hidden;
    color: #1e293b;
}

/* no texture overlay — keep it clean */

/* ── Ambient glow — static soft blurs ──────────────────────────────────── */
.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,.05) 0%, transparent 70%);
    top: -20%; right: -15%;
    filter: blur(120px);
}
.orb-2 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(129,140,248,.04) 0%, transparent 70%);
    bottom: -15%; left: -12%;
    filter: blur(120px);
}
.orb-3 { display: none; }

/* ── Auth container ────────────────────────────────────────────────────── */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
    animation: pageEnter .3s ease-out both;
}
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Brand header ──────────────────────────────────────────────────────── */
.brand {
    text-align: center;
    margin-bottom: 2.25rem;
}
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    background: rgba(255,255,255,.1);
    border-radius: 14px;
    margin-bottom: .85rem;
    border: 1px solid rgba(255,255,255,.1);
}
.brand-logo i {
    font-size: 1.4rem;
    color: #fff;
    opacity: .95;
}
.brand h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 .3rem;
    letter-spacing: -.02em;
}
.brand p {
    color: rgba(255,255,255,.5);
    font-size: .82rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: .01em;
}

/* ── Auth card ─────────────────────────────────────────────────────────── */
.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,.07);
    padding: 3.25rem 3rem;
}
.auth-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 .25rem;
}
.auth-card .subtitle {
    font-size: .82rem;
    color: #94a3b8;
    margin: 0 0 1.5rem;
    font-weight: 400;
}

/* ── Divider ───────────────────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0;
    color: #cbd5e1;
    font-size: .72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ── Clerk mount ───────────────────────────────────────────────────────── */
#clerk-sign-in,
#clerk-sign-up {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Loading state ─────────────────────────────────────────────────────── */
.clerk-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    color: #94a3b8;
    font-size: .82rem;
    font-weight: 400;
}
.clerk-loading .spinner {
    width: 24px; height: 24px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Fallback admin-token form ─────────────────────────────────────────── */
.fallback-form label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.fallback-form input[type="password"] {
    width: 100%;
    padding: 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
    outline: none;
    margin-bottom: 1.25rem;
    background: #fafbfc;
    color: #1e293b;
}
.fallback-form input[type="password"]:focus {
    border-color: #c7d2fe;
    box-shadow: 0 0 0 3px rgba(199,210,254,.1);
    background: #fff;
}
.fallback-form input[type="password"]::placeholder {
    color: #cbd5e1;
}
.fallback-form button {
    width: 100%;
    padding: .85rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease;
}
.fallback-form button:hover {
    background: #4338ca;
}
.fallback-form button:active {
    background: #3730a3;
}

/* ── Error message ─────────────────────────────────────────────────────── */
.error-msg {
    color: #dc2626;
    font-size: .8rem;
    font-weight: 500;
    margin-bottom: .75rem;
    padding: .5rem .75rem;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* ── Footer link ───────────────────────────────────────────────────────── */
.footer-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .8rem;
    color: rgba(255,255,255,.45);
}
.footer-link a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-weight: 500;
    transition: color .15s ease;
}
.footer-link a:hover {
    color: #fff;
}

/* ── Pending-approval styles ───────────────────────────────────────────── */
.pending-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,.07);
    padding: 3.25rem 3rem;
    text-align: center;
}
.pending-card .icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px; height: 60px;
    background: #f0f0ff;
    border-radius: 50%;
    margin-bottom: 1.25rem;
}
.pending-card .icon-wrap i {
    font-size: 1.4rem;
    color: #6366f1;
}
.pending-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 .5rem;
}
.pending-card p {
    color: #64748b;
    font-size: .88rem;
    line-height: 1.75;
    margin: 0 0 2rem;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}
.contact-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.contact-card .label {
    font-size: .68rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .55rem;
}
.contact-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .4rem;
}
.contact-row:last-child { margin-bottom: 0; }
.contact-row i {
    color: #6366f1;
    width: 16px;
    text-align: center;
    font-size: .82rem;
}
.contact-row span {
    font-size: .85rem;
    color: #334155;
    font-weight: 500;
}
.contact-row a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    font-size: .85rem;
}
.contact-row a:hover { text-decoration: underline; }

/* Contact Wesley button */
.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.25rem;
    padding: .6rem 1.35rem;
    background: transparent;
    color: #4f46e5;
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    font-size: .84rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s ease;
}
.btn-contact:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #4338ca;
}

.user-info {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: .78rem;
    color: #94a3b8;
}
.user-info strong { color: #64748b; font-weight: 600; }

.btn-sign-out {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: 1rem;
    padding: .45rem 1rem;
    background: transparent;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s ease;
}
.btn-sign-out:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #ef4444;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-container { padding: 1rem; }
    .auth-card { padding: 2rem 1.25rem; }
    .pending-card { padding: 2.25rem 1.25rem; }
    .brand h1 { font-size: 1.25rem; }
    .brand-logo { width: 44px; height: 44px; }
    .brand-logo i { font-size: 1.15rem; }
    .btn-contact { width: 100%; justify-content: center; padding: .75rem; font-size: .88rem; }
    .btn-sign-out { width: 100%; justify-content: center; padding: .6rem; }
    .fallback-form button { padding: .85rem; font-size: .92rem; }
    .fallback-form input[type="password"] { padding: 1rem; }
}
