/* =====================================================
   OPTLYX PRISMA — LOGIN
   Full-screen dark split · Plus Jakarta Sans
   ===================================================== */

:root {
    --bg:      #0f0f0f;
    --border:  rgba(255,255,255,0.06);

    --white:   #ffffff;
    --text:    #ffffff;
    --text-2:  #b0b0b0;
    --text-3:  #707070;
    --text-4:  #484848;

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

/* ══════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════ */
.login-page {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ── Left panel ── */
.panel-left {
    flex: 0 0 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 52px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--bg);
}

.panel-left-inner {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo — forced white */
.logo {
    height: 38px;
    width: auto;
    margin-bottom: 44px;
    filter: brightness(0) invert(1);
    opacity: 0;
    animation: fadeUp 0.5s var(--ease) 0.1s forwards;
}

/* ── Headings ── */
.heading-block {
    text-align: center;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.5s var(--ease) 0.2s forwards;
}

.heading-block h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-3);
    font-weight: 400;
    line-height: 1.6;
}

/* auth.js compat */
.heading-block h2, .card-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 10px;
}
.heading-block p, .card-header p, .card-subtitle {
    font-size: 14px;
    color: var(--text-3);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Error ── */
.error-toast {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: #f87171;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
}
.error-box { display: none; }

/* ══════════════════════════════════════════════
   FORM
   ══════════════════════════════════════════════ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    opacity: 0;
    animation: fadeUp 0.5s var(--ease) 0.3s forwards;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.input-wrap { position: relative; }

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:hover { border-color: rgba(255,255,255,0.18); }

input:focus {
    border-color: rgba(255,255,255,0.35);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

input::placeholder { color: var(--text-4); }

.mono-input {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.eye-toggle {
    position: absolute;
    right: 0; top: 0;
    height: 100%; width: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-4);
    background: none; border: none;
    transition: color 0.15s;
}
.eye-toggle:hover { color: var(--text-2); }

/* ── Primary Button ── */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background: var(--white);
    color: #000;
    border: none;
    border-radius: 9999px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); opacity: 0.8; }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* compat */
.btn-submit {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 48px;
    background: var(--white); color: #000;
    border: none; border-radius: 9999px;
    font-family: var(--font); font-size: 15px; font-weight: 600;
    cursor: pointer; gap: 8px;
    transition: opacity 0.2s, transform 0.15s;
}
.btn-submit:hover { opacity: 0.88; }
.btn-submit:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Legal / GDPR ── */
.legal-text {
    margin-top: 20px;
    width: 100%;
    opacity: 0;
    animation: fadeUp 0.5s var(--ease) 0.4s forwards;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.5;
}

.consent-row input[type="checkbox"] {
    position: absolute;
    opacity: 0; width: 0; height: 0;
    pointer-events: none;
}

.consent-row .tick {
    width: 16px; height: 16px; min-width: 16px;
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03);
    transition: all 0.2s;
    margin-top: 1px;
    flex-shrink: 0;
}

.consent-row input:checked + .tick {
    background: var(--white);
    border-color: var(--white);
}

.consent-row input:checked + .tick::after {
    content: '';
    width: 4px; height: 8px;
    border: solid #111;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.consent-row a {
    color: var(--text-2);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(255,255,255,0.15);
    transition: color 0.15s;
}
.consent-row a:hover { color: var(--white); }

/* ── Field meta (forgot link under password) ── */
.field-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}

.link-subtle {
    background: none; border: none;
    color: var(--text-3);
    font-family: var(--font);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
    transition: color 0.15s;
    padding: 0;
}
.link-subtle:hover { color: var(--text-2); }

.back-row { text-align: center; margin-top: 8px; }

/* ── Bottom ── */
.bottom-action {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    opacity: 0;
    animation: fadeUp 0.5s var(--ease) 0.5s forwards;
}

.link-accent {
    background: none; border: none;
    color: var(--white);
    font-family: var(--font);
    font-size: 13px; font-weight: 700;
    cursor: pointer; padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.15s;
}
.link-accent:hover { opacity: 0.7; }

/* ══════════════════════════════════════════════
   JOIN TEAM
   auth.js sets display:block — gap won't work,
   so spacing is done with margins here.
   ══════════════════════════════════════════════ */
#form-join-team > * + * {
    margin-top: 22px;
}

#form-join-team > .heading-block {
    margin-bottom: 8px;
}

.join-icon-wrap {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2);
    margin: 0 auto 18px;
}

.join-fields-row {
    display: flex;
    gap: 14px;
    width: 100%;
}

#form-join-team .btn-primary,
#btn-join-submit {
    margin-top: 28px;
}

#form-join-team .btn-primary:hover,
#btn-join-submit:hover {
    opacity: 1;
    transform: none;
}

#form-join-team .back-row {
    margin-top: 16px;
}

/* ══════════════════════════════════════════════
   RIGHT — Photo panel
   ══════════════════════════════════════════════ */
.panel-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
}

.panel-right-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    display: block;
}

.panel-right-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.1) 0%,
        rgba(0,0,0,0) 30%,
        rgba(0,0,0,0.35) 60%,
        rgba(0,0,0,0.88) 100%
    );
    pointer-events: none;
}

.panel-right-content {
    position: absolute;
    bottom: 52px;
    left: 52px;
    right: 52px;
    z-index: 2;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.4s forwards;
}

.panel-right-content h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 10px;
}

.panel-right-content p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
    max-width: 480px;
    margin-bottom: 18px;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 9999px;
    letter-spacing: 0.01em;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .panel-left { flex: 0 0 460px; padding: 40px 36px; }
}

@media (max-width: 960px) {
    body { overflow: auto; }

    .login-page {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .panel-left {
        flex: none;
        width: 100%;
        border-right: none;
        padding: 40px 28px;
    }

    .panel-right {
        height: 360px;
        flex: none;
    }

    .panel-right-content { bottom: 32px; left: 28px; right: 28px; }
    .join-fields-row { flex-direction: column; gap: 16px; }
}

@media (max-width: 520px) {
    .panel-left { padding: 32px 20px; }
    .panel-left-inner { max-width: 100%; }
    .heading-block h1 { font-size: 22px; }
    .panel-right { height: 280px; }
    .panel-right-content { bottom: 24px; left: 20px; right: 20px; }
    .panel-right-content h2 { font-size: 20px; }
}

/* ══════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════ */
.hidden { display: none !important; }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
#social-container { display: none !important; }
#btn-google       { display: none !important; }
