/* ===================================================================
   Antigravity Lab — Auth Pages CSS (Centered, Landing-Page Matched)
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --g: #00c853;
    --gd: #00a344;
    --gl: #69f0ae;
    --bg: #050507;
    --s1: #0a0a0f;
    --s2: #101018;
    --s3: #16161f;
    --s4: #1e1e28;
    --t1: #eeeef5;
    --t2: #9898a8;
    --t3: #5c5c70;
    --bd: rgba(255,255,255,0.06);
    --grad: linear-gradient(135deg, #00c853, #00e676, #69f0ae);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: var(--bg);
    color: var(--t1);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* ── Ambient Background ── */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 200, 83, 0.06) 0%, transparent 65%);
    pointer-events: none;
    animation: breathe 8s ease-in-out infinite;
}
body::after {
    content: '';
    position: fixed;
    bottom: -200px;
    right: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 65%);
    pointer-events: none;
}

/* Grid pattern */
.auth-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Nav Bar (matching landing) ── */
.auth-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 56px;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--bd);
}
.auth-nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.auth-nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--t1);
}
.auth-nav-brand img {
    height: 28px;
    width: auto;
    border-radius: 7px;
}
.auth-nav-brand em {
    font-style: normal;
    color: var(--g);
}
.auth-nav-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--t2);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--bd);
    transition: all 0.2s;
}
.auth-nav-link:hover {
    color: var(--g);
    border-color: rgba(0, 200, 83, 0.3);
}

/* ── Centered Card ── */
.auth-center {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 24px;
    margin-top: 80px;
}

.auth-card {
    background: var(--s2);
    border: 1px solid var(--bd);
    border-radius: 20px;
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.5s ease;
}

/* Top gradient line */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad);
}

/* Card Header */
.auth-card-header {
    text-align: center;
    margin-bottom: 32px;
}
.auth-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin: 0 auto 20px;
    display: block;
}
.auth-card-header h1 {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}
.auth-card-header p {
    font-size: 14px;
    color: var(--t2);
}

/* ── Form ── */
.auth-form-group {
    margin-bottom: 18px;
}
.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--t2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 7px;
}
.auth-input-wrap {
    position: relative;
}
.auth-input {
    width: 100%;
    background: var(--s1);
    border: 1px solid var(--bd);
    color: var(--t1);
    border-radius: 11px;
    padding: 12px 14px 12px 40px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    outline: none;
}
.auth-input:focus {
    border-color: rgba(0, 200, 83, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.08);
    background: var(--s2);
}
.auth-input::placeholder {
    color: var(--t3);
    font-weight: 400;
}
.auth-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--t3);
    pointer-events: none;
    transition: color 0.2s;
}
.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--g);
}

/* Options row */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.auth-check {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}
.auth-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--g);
    cursor: pointer;
}
.auth-check label {
    font-size: 13px;
    color: var(--t2);
    cursor: pointer;
}

/* Submit Button */
.auth-submit {
    width: 100%;
    padding: 13px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--grad);
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.2);
    transition: all 0.3s;
}
.auth-submit:hover {
    box-shadow: 0 8px 32px rgba(0, 200, 83, 0.35);
    transform: translateY(-2px);
}
.auth-submit:active {
    transform: translateY(0);
}

/* Error */
.auth-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #f87171;
}
.auth-error i { font-size: 15px; flex-shrink: 0; }

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--t3);
}
.auth-footer a {
    color: var(--g);
    text-decoration: none;
    font-weight: 700;
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* Trust strip */
.auth-trust {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.auth-trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--t3);
    font-weight: 600;
}
.auth-trust-item i {
    font-size: 12px;
    color: var(--g);
}

/* ── Client Auth (Success/Error) ── */
.client-auth-card {
    text-align: center;
    background: var(--s2);
    border: 1px solid var(--bd);
    border-radius: 20px;
    padding: 48px 36px;
    max-width: 420px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.5s ease;
}
.client-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad);
}
.ca-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
}
.ca-ring.ok {
    background: rgba(0, 200, 83, 0.08);
    border: 2px solid rgba(0, 200, 83, 0.2);
    color: var(--g);
}
.ca-ring.err {
    background: rgba(239, 68, 68, 0.08);
    border: 2px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}
.client-auth-card h2 {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.client-auth-card .ca-desc {
    font-size: 14px;
    color: var(--t2);
    margin-bottom: 24px;
}
.ca-user {
    background: var(--s1);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    margin-bottom: 20px;
}
.ca-user-av {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #000;
    flex-shrink: 0;
}
.ca-user-name { font-weight: 700; font-size: 14px; }
.ca-user-email { font-size: 12px; color: var(--t3); margin-top: 1px; }
.ca-hint {
    font-size: 12px;
    color: var(--t3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes breathe {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.1); opacity: 0.7; }
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-center { padding: 16px; margin-top: 70px; }
    .auth-card { padding: 32px 24px; border-radius: 16px; }
    .auth-card-header h1 { font-size: 20px; }
    .auth-trust { gap: 12px; }
    .auth-trust-item { font-size: 10px; }
    .auth-nav-link { font-size: 12px; padding: 6px 12px; }
}
