/* ==========================================================================
   PowerDrop auth pages (login.php, signup.php)
   Dark + orange brand theme, single-card modern mobile-first layout.
   Depends on the CSS custom properties defined in app.css.
   ========================================================================== */

.auth-body {
    min-height: 100dvh;
    margin: 0;
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(255, 183, 101, 0.10), transparent 60%),
        var(--night);
    color: var(--porcelain);
    font-family: var(--body);
    padding-bottom: 0;
}

.auth-shell {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.auth-brand__bolt {
    font-size: 1.5rem;
    line-height: 1;
}

.auth-brand__name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: var(--porcelain);
}

.auth-title {
    font-family: 'Poppins', var(--display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.3rem;
    color: var(--porcelain);
    white-space: nowrap;
}

.auth-subtitle {
    margin: 0 0 0.7rem;
    color: var(--graphite);
    font-size: 0.875rem;
    line-height: 1.35;
}

.auth-alert {
    display: none;
    background: rgba(255, 77, 61, 0.12);
    border: 1px solid rgba(255, 77, 61, 0.35);
    color: var(--sodium-pale);
    padding: 0.75rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

.auth-alert.show { display: block; }

.auth-alert--ok {
    background: rgba(120, 220, 150, 0.12);
    border-color: rgba(120, 220, 150, 0.35);
    color: #bff0cf;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

/* `.auth-form` (a class) overrides the browser's default `[hidden]{display:none}`
   because they have equal specificity and this rule comes later — so a form with
   the `hidden` attribute would otherwise stay visible. Re-assert it here. */
.auth-form[hidden] { display: none; }

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4375rem;
}

.auth-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--porcelain);
    letter-spacing: 0.01em;
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--rail);
    border: 1px solid var(--hairline);
    color: var(--porcelain);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 1rem;
    font-family: var(--body);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--sodium);
    background: var(--rail-high);
    box-shadow: 0 0 0 3px rgba(255, 183, 101, 0.15);
}

.auth-input::placeholder { color: var(--graphite-dim); }

.auth-input-wrap { position: relative; }

.auth-input-wrap .auth-input { padding-right: 3rem; }

.auth-eye {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--graphite);
    padding: 0.375rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.auth-eye:hover { color: var(--sodium); }
.auth-eye:focus-visible { outline: 2px solid var(--sodium); }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--graphite);
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--sodium);
    cursor: pointer;
}

.auth-check--agree {
    align-items: flex-start;
    line-height: 1.4;
    margin-top: -0.125rem;
}

.auth-check--agree input { margin-top: 0.125rem; }

.auth-link {
    color: var(--sodium);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.auth-link:hover { text-decoration: underline; }

/* A full-width, borderless variant used for secondary actions that sit under a
   primary .auth-btn (e.g. "Back to log in" on the set-password form). */
.auth-link--block {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem 0;
    background: none;
    border: 0;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
}

.auth-btn {
    width: 100%;
    background: linear-gradient(180deg, var(--sodium), var(--sodium-deep));
    color: #1a0f02;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-size: 1.02rem;
    font-weight: 600;
    font-family: 'Poppins', var(--body);
    cursor: pointer;
    box-shadow: 0 12px 30px -12px rgba(255, 141, 60, 0.8);
    transition: background 0.15s, transform 0.08s, opacity 0.15s, box-shadow 0.2s;
    margin-top: 0.25rem;
}

.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(255, 141, 60, 0.95); }
.auth-btn:active { transform: scale(0.985); }
.auth-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--graphite);
    font-size: 0.8125rem;
    margin: 0.7rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--hairline);
}

.auth-divider span { padding: 0 0.75rem; }

.auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid var(--hairline);
    padding: 0.8125rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--body);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.08s;
}

.auth-google:hover { background: #f2f2f2; }
.auth-google:active { transform: scale(0.985); }

.auth-google svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.auth-foot {
    margin: 0.7rem 0 0;
    text-align: center;
    color: var(--graphite);
    font-size: 0.9375rem;
}

.auth-foot a {
    color: var(--sodium);
    text-decoration: none;
    font-weight: 600;
}

.auth-foot a:hover { text-decoration: underline; }

@media (max-width: 400px) {
    .auth-shell { padding: 0.75rem; }
    .auth-card { padding: 1.1rem 1.1rem 1.2rem; border-radius: 14px; }
    .auth-title { font-size: 1.15rem; }
}

/* ---- Glowing logo ring (top of the card) ---------------------------------- */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    text-decoration: none;
    background: radial-gradient(circle at 50% 40%, rgba(255, 176, 74, 0.28), rgba(12, 17, 26, 0.9) 72%);
    border: 2px solid var(--sodium);
    box-shadow: 0 0 22px -2px rgba(255, 141, 60, 0.7), inset 0 0 14px -4px rgba(255, 176, 74, 0.8);
}
.auth-logo__bolt { font-size: 1.5rem; line-height: 1; filter: drop-shadow(0 0 6px rgba(255, 141, 60, 0.8)); }

/* ---- Social sign-in row (Google / Facebook / …, easy to extend) ----------- */
.auth-social-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.auth-social {
    flex: 1 1 0;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    font-family: 'Poppins', var(--body);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.08s, background 0.15s, opacity 0.15s;
}
.auth-social svg { width: 20px; height: 20px; flex: none; }
.auth-social:active { transform: scale(0.98); }
.auth-social--google { background: #ffffff; color: #1f1f1f; }
.auth-social--google:hover { background: #f1f1f1; }
.auth-social--facebook { background: #1877f2; color: #ffffff; border-color: #1877f2; }
.auth-social--facebook:hover { background: #1466d6; }
.auth-social--tiktok { background: #010101; color: #ffffff; border-color: #2a2a2a; }
.auth-social[data-soon] { position: relative; }
.auth-social[data-soon]::after {
    content: 'Soon';
    position: absolute;
    top: -8px; right: -6px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: var(--sodium);
    color: #1a0f02;
}

/* ---- Slide-puzzle verification -------------------------------------------- */
.pd-captcha {
    margin-top: 0.25rem;
    -webkit-user-select: none;
    user-select: none;
}
.pd-captcha__stage {
    position: relative;
    width: 100%;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--hairline);
    background: #05080e;
}
.pd-captcha__bg,
.pd-captcha__piece {
    position: absolute;
    inset: 0;
    display: block;
}
.pd-captcha__piece { pointer-events: none; }
.pd-captcha__hint {
    position: absolute;
    left: 0; right: 0; top: 8px;
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}
.pd-captcha__refresh {
    position: absolute;
    top: 6px; right: 6px;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    border: none;
    background: rgba(6, 10, 17, 0.7);
    color: #fff;
    cursor: pointer;
}
.pd-captcha__refresh:hover { color: var(--sodium); }
.pd-captcha__done {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(6, 10, 17, 0.55);
    color: #7ff0a8;
    font-family: 'Poppins', var(--body);
    font-weight: 600;
}
.pd-captcha--ok .pd-captcha__done { display: flex; }
.pd-captcha--ok .pd-captcha__hint { display: none; }

.pd-captcha__slider {
    position: relative;
    margin-top: 0.5rem;
    height: 40px;
}
.pd-captcha__track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--rail);
    border: 1px solid var(--hairline);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pd-captcha__track::after {
    content: 'Slide right to fit the piece';
    font-size: 0.8rem;
    color: var(--graphite);
}
.pd-captcha__fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: rgba(255, 141, 60, 0.28);
    border-right: 1px solid rgba(255, 176, 74, 0.6);
}
.pd-captcha__handle {
    position: absolute;
    left: 0; top: 0;
    width: 46px; height: 100%;
    display: flex; align-items: center; justify-content: center;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--sodium), var(--sodium-deep));
    color: #1a0f02;
    cursor: grab;
    box-shadow: 0 4px 14px -4px rgba(255, 141, 60, 0.8);
    touch-action: none;
    z-index: 2;
}
.pd-captcha--dragging .pd-captcha__handle { cursor: grabbing; }
.pd-captcha--ok .pd-captcha__handle { background: #2fd07a; color: #06210f; }
.pd-captcha--ok .pd-captcha__track { border-color: rgba(47, 208, 122, 0.5); }
.pd-captcha--ok .pd-captcha__fill { background: rgba(47, 208, 122, 0.25); border-right-color: rgba(47, 208, 122, 0.6); }
.pd-captcha--bad .pd-captcha__handle { background: var(--filament); color: #fff; }
.pd-captcha--bad .pd-captcha__stage { animation: pdShake 0.24s; }
@keyframes pdShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


