/* PowerHire - Auth (login + sign-up) design tokens, components and motion.
   Loaded by _AuthLayout before the page stylesheets. Font: Public Sans 400/500/600/700. */

/* ---------- Design tokens ---------- */
:root {
    --ph-coral: #ff5b5b;
    --ph-coral-hover: #e65252;
    --ph-coral-tint: #ffe5e5;
    --ph-coral-wash: #fff8f8;
    --ph-navy: #2f3349;
    --ph-navy-text: #cfd0dc;
    --ph-ink: #2f2b3d;
    --ph-heading: #444050;
    --ph-body: #6d6b77;
    --ph-muted: #8a8893;
    --ph-faint: #a8a6ae;
    --ph-border: #dbdade;
    --ph-divider: #ebeaed;
    --ph-bg: #f8f7fa;
    --ph-success: #28c76f;
    --ph-success-tint: #e8f8ef;
    --ph-error: #ff4c51;
    --ph-error-tint: #ffeded;
    --ph-warning: #ff9f43;
    --ph-warning-tint: #fff4e5;
    --ph-warning-border: #ffd9a8;
    --ph-warning-ink: #8a5300;
    --ph-warning-strong: #6b4100;
    --ph-font: 'Public Sans', sans-serif;
    --ph-radius: 8px;
    --ph-radius-card: 12px;
    --ph-radius-panel: 18px;
    --ph-btn-shadow: 0 4px 12px rgba(255, 91, 91, .25);
}

/* ---------- Keyframes ---------- */
@keyframes ph-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -24px) scale(1.06);
    }

    100% {
        transform: translate(-14px, 26px) scale(.96);
    }
}

@keyframes ph-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes ph-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes ph-slide {
    from {
        opacity: 0;
        transform: translateX(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes ph-word {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes ph-draw {
    from {
        stroke-dashoffset: 24;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes ph-pop {
    0% {
        transform: scale(.4);
        opacity: 0;
    }

    60% {
        transform: scale(1.25);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ph-pulse {
    0% {
        opacity: 0;
        transform: scale(.97);
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(1.03);
    }
}

@keyframes ph-fall {
    0% {
        transform: translate3d(0, -6vh, 0) rotate(0);
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translate3d(var(--dx), 100vh, 0) rotate(var(--rot));
        opacity: 0;
    }
}

/* ---------- Entrance / transitions ---------- */
/* Each screen root */
.ph-anim-in {
    animation: ph-in .45s ease-out both;
}

/* Each sign-up step body */
.ph-anim-slide {
    animation: ph-slide .35s ease-out both;
}

.ph-anim-word {
    display: inline-block;
    animation: ph-word .5s ease-out both;
}

.ph-anim-pop {
    animation: ph-pop .35s ease-out both;
}

.ph-check-draw {
    stroke-dasharray: 24;
    animation: ph-draw .5s ease-out both;
}

.ph-progress span {
    transition: background .4s;
}

.ph-step-line {
    transition: background .4s;
}

/* ---------- Brand panel ---------- */
.ph-brand {
    position: relative;
    overflow: hidden;
    background: var(--ph-navy);
    color: var(--ph-navy-text);
}

.ph-brand > * {
    position: relative;
}

.ph-shape {
    position: absolute !important;
    pointer-events: none;
}

.ph-shape--ring {
    right: -120px;
    top: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 56px solid rgba(255, 91, 91, .08);
    animation: ph-drift 22s ease-in-out infinite alternate;
}

.ph-shape--glow {
    left: -90px;
    bottom: -110px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 91, 91, .14), rgba(255, 91, 91, 0) 70%);
    animation: ph-drift 28s ease-in-out -6s infinite alternate-reverse;
}

.ph-shape--square {
    right: 18%;
    bottom: 22%;
    width: 90px;
    height: 90px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .07);
    transform: rotate(18deg);
    animation: ph-drift 34s ease-in-out -12s infinite alternate;
}

.ph-rotate {
    height: 22px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    color: #ff8a8a;
    margin-bottom: 10px;
}

.ph-preview {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 290px;
}

.ph-preview__card {
    position: absolute;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
    color: var(--ph-ink);
}

.ph-preview__card--candidate {
    left: 0;
    top: 0;
    width: 250px;
    padding: 14px;
    animation: ph-float 6s ease-in-out infinite;
}

.ph-preview__card--score {
    right: 0;
    top: 66px;
    width: 170px;
    padding: 14px;
    animation: ph-float 7s ease-in-out -2.5s infinite;
}

.ph-preview__card--pipeline {
    left: 36px;
    bottom: 0;
    width: 290px;
    padding: 14px 16px;
    animation: ph-float 8s ease-in-out -5s infinite;
}

/* ---------- Right-hand pointer surface ---------- */
.ph-surface {
    position: relative;
    overflow: hidden;
    background: #fff;
}

.ph-surface > .ph-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ph-layer--dots {
    background-image: radial-gradient(#e4e3e8 1px, transparent 1.3px);
    background-size: 22px 22px;
    opacity: .75;
}

.ph-layer--dots-active {
    background-image: radial-gradient(rgba(255, 91, 91, .6) 1.7px, transparent 2.1px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(150px circle at var(--mx, -999px) var(--my, -999px), #000, transparent);
    mask-image: radial-gradient(150px circle at var(--mx, -999px) var(--my, -999px), #000, transparent);
}

.ph-layer--spotlight {
    background: radial-gradient(440px circle at var(--mx, -999px) var(--my, -999px), rgba(255, 91, 91, .06), transparent 70%);
}

.ph-ambient {
    position: absolute;
    right: -170px;
    bottom: -170px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 91, 91, .08), rgba(255, 91, 91, 0) 68%);
    animation: ph-drift 30s ease-in-out infinite alternate;
}

.ph-surface__content {
    position: relative;
    z-index: 1;
}

/* ---------- Form card (shadow follows cursor; no 3D tilt as it blurs text) ---------- */
.ph-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    padding: 36px;
    border-radius: var(--ph-radius-panel);
    background: #fff;
    border: 1px solid #f0eff2;
    box-shadow: var(--sx, 0px) var(--sy, 14px) 44px rgba(47, 43, 61, .08);
    transition: box-shadow .5s ease-out;
}

.ph-card__glow {
    position: absolute;
    inset: -60px;
    z-index: -1;
    pointer-events: none;
    border-radius: 40px;
    background: radial-gradient(closest-side, rgba(255, 91, 91, .13), transparent);
    opacity: 0;
    transition: opacity .5s;
}

.ph-card.is-focused .ph-card__glow {
    opacity: 1;
}

.ph-card__pulse {
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    pointer-events: none;
    box-shadow: 0 0 0 2px rgba(40, 199, 111, .28), 0 0 44px rgba(40, 199, 111, .16);
    opacity: 0;
}

.ph-card__pulse.is-active {
    animation: ph-pulse .9s ease-out both;
}

/* ---------- Magnetic buttons ---------- */
[data-ph-magnetic] {
    transition: transform .25s ease-out, background .2s;
}

/* ---------- Form controls ---------- */
.ph-input {
    height: 44px;
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius);
    padding: 0 14px;
    font: 14px var(--ph-font);
    color: var(--ph-ink);
    background: #fff;
    width: 100%;
}

.ph-input:focus {
    outline: none;
    border-color: var(--ph-coral);
    box-shadow: 0 0 0 3px rgba(255, 91, 91, .15);
}

.ph-input.is-invalid {
    border-color: var(--ph-error);
}

.ph-btn {
    height: 46px;
    padding: 0 26px;
    display: inline-grid;
    place-items: center;
    border-radius: var(--ph-radius);
    font: 600 15px var(--ph-font);
    cursor: pointer;
    border: 0;
}

.ph-btn--primary {
    background: var(--ph-coral);
    color: #fff;
    box-shadow: var(--ph-btn-shadow);
}

.ph-btn--primary:hover {
    background: var(--ph-coral-hover);
}

.ph-btn--outline {
    background: #fff;
    border: 1px solid var(--ph-border);
    color: var(--ph-heading);
}

.ph-btn--outline:hover:not([aria-disabled="true"]) {
    border-color: var(--ph-coral);
}

.ph-btn--primary[aria-disabled="true"] {
    opacity: .5;
}

.ph-btn[aria-disabled="true"],
.ph-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.ph-btn--block {
    width: 100%;
}

.ph-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ph-ink);
}

.ph-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 600;
    color: var(--ph-heading);
}

.ph-link {
    padding: 0;
    border: 0;
    background: none;
    font: 600 13px var(--ph-font);
    color: var(--ph-coral);
    text-decoration: none;
    cursor: pointer;
}

.ph-link:hover {
    color: var(--ph-coral-hover);
    text-decoration: underline;
}

.ph-link:focus-visible {
    outline: 2px solid var(--ph-coral);
    outline-offset: 2px;
}

.ph-input-wrap {
    position: relative;
}

.ph-input-wrap .ph-input {
    padding-right: 44px;
}

.ph-input-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    background: none;
    color: var(--ph-muted);
    cursor: pointer;
}

.ph-input-toggle:hover {
    color: var(--ph-heading);
}

.ph-input-toggle:focus-visible {
    outline: 2px solid var(--ph-coral);
    outline-offset: -2px;
    border-radius: var(--ph-radius);
}

.ph-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ph-body);
    cursor: pointer;
}

.ph-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--ph-coral);
}

.ph-alert--error {
    background: var(--ph-error-tint);
    color: var(--ph-error);
    animation: ph-in .3s ease-out both;
}

.ph-btn:focus-visible {
    outline: 2px solid var(--ph-coral);
    outline-offset: 2px;
}

/* ---------- Password rules ---------- */
.ph-rule {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ph-faint);
    transition: color .25s;
}

.ph-rule__icon {
    width: 14px;
    height: 14px;
    display: grid;
    place-items: center;
}

.ph-rule__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.ph-rule__check {
    display: none;
}

.ph-rule.is-met {
    color: var(--ph-success);
}

.ph-rule.is-met .ph-rule__dot {
    display: none;
}

.ph-rule.is-met .ph-rule__check {
    display: block;
    animation: ph-pop .35s ease-out both;
}

/* ---------- Agreement rows (custom checkbox) ---------- */
.ph-agree {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background .2s;
}

.ph-agree input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ph-agree__box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1.5px solid #c4c2c9;
    background: #fff;
    transition: background .2s, border-color .2s;
}

.ph-agree__box svg {
    display: none;
    color: #fff;
}

.ph-agree input:checked + .ph-agree__box {
    background: var(--ph-coral);
    border-color: var(--ph-coral);
}

.ph-agree input:checked + .ph-agree__box svg {
    display: block;
    animation: ph-pop .3s ease-out both;
}

.ph-agree:has(input:checked) {
    background: var(--ph-coral-wash);
}

.ph-agree input:focus-visible + .ph-agree__box {
    outline: 2px solid var(--ph-coral);
    outline-offset: 2px;
}

/* ---------- Confetti ---------- */
.ph-confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 40;
}

.ph-confetti i {
    position: absolute;
    top: 0;
    opacity: 0;
    animation: ph-fall var(--dur, 2.8s) cubic-bezier(.2, .6, .4, 1) var(--delay, 0s) forwards;
}

/* ---------- Email confirmation (Check your email / Link expired / Unconfirmed notice) ---------- */
.ph-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    animation: ph-in .45s ease-out both;
}

.ph-status__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    animation: ph-pop .5s ease-out .15s both;
}

.ph-status__icon--coral {
    background: var(--ph-coral-tint);
    color: var(--ph-coral);
}

.ph-status__icon--warning {
    background: var(--ph-warning-tint);
    color: var(--ph-warning);
    animation: none;
}

.ph-status__icon--success {
    background: var(--ph-success-tint);
    color: var(--ph-success);
}

.ph-status__icon svg {
    width: 26px;
    height: 26px;
}

.ph-info-box {
    width: 100%;
    background: var(--ph-bg);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ph-alert {
    border-radius: var(--ph-radius);
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.55;
}

.ph-alert--success {
    background: var(--ph-success-tint);
    color: #1f9d57;
    animation: ph-in .3s ease-out both;
}

.ph-alert--warning {
    background: var(--ph-warning-tint);
    border: 1px solid var(--ph-warning-border);
    color: var(--ph-warning-ink);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    animation: ph-in .3s ease-out both;
}

.ph-alert--warning strong {
    color: var(--ph-warning-strong);
}

.ph-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.ph-badge--success {
    background: var(--ph-success-tint);
    color: #1f9d57;
    animation: ph-pop .45s ease-out .1s both;
}

.ph-badge svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .ph-auth {
        grid-template-columns: 1fr !important;
    }

    .ph-brand {
        display: none;
    }

    .ph-card {
        padding: 24px;
        box-shadow: none;
        border: 0;
    }

    .ph-layer--dots-active,
    .ph-layer--spotlight {
        display: none;
    }
}

@media (hover: none), (pointer: coarse) {
    .ph-layer--dots-active,
    .ph-layer--spotlight {
        display: none;
    }
}

/* ---------- Reduced motion (required) ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .ph-confetti {
        display: none;
    }
}

/* ---------- Policy pop-ups (Privacy Policy / Terms and Conditions) ---------- */
.ph-policy-modal .modal-content {
    border-radius: var(--ph-radius-card);
}

.ph-policy-modal .modal-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--ph-border);
}

.ph-policy-modal__meta {
    color: var(--ph-muted);
    font-size: 13px;
}

.ph-policy-modal .modal-footer {
    border-top: 1px solid var(--ph-border);
    gap: 12px;
}

.ph-policy {
    color: var(--ph-ink);
    font-size: 14px;
    line-height: 1.65;
}

.ph-policy h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 8px;
}

.ph-policy h3:first-child {
    margin-top: 0;
}

.ph-policy ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.ph-policy a {
    color: var(--ph-coral);
}
