/* Parent sign-in — full-page scene, distinct from staff login.css */

:root {
    --ps-deep: #062e32;
    --ps-mid: #0b5c56;
    --ps-teal: #0f766e;
    --ps-gold: #c9a227;
    --ps-gold-soft: rgba(201, 162, 39, 0.18);
    --ps-text: #14211f;
    --ps-muted: #64706d;
    --ps-line: #d9e2df;
    --ps-card: rgba(255, 253, 248, 0.94);
    --ps-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html,
body.ps-body {
    margin: 0;
    min-height: 100%;
    font-family: var(--ps-font);
    color: var(--ps-text);
    -webkit-font-smoothing: antialiased;
}

body.ps-body #preloader {
    display: none !important;
}

.ps-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ps-scene {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: linear-gradient(135deg, #041c20 0%, var(--ps-deep) 38%, #0a4a46 100%);
}

.ps-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.ps-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    opacity: 0.4;
    animation: ps-orb-float 18s ease-in-out infinite;
}

.ps-orb--1 {
    width: 420px;
    height: 420px;
    background: #0f766e;
    top: -14%;
    left: -8%;
}

.ps-orb--2 {
    width: 300px;
    height: 300px;
    background: #c9a227;
    bottom: 8%;
    left: 26%;
    animation-delay: -6s;
}

.ps-orb--3 {
    width: 260px;
    height: 260px;
    background: #2dd4bf;
    top: 38%;
    right: -6%;
    animation-delay: -12s;
}

.ps-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 50%, black 20%, transparent 75%);
}

@keyframes ps-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(22px, -18px) scale(1.05); }
    66% { transform: translate(-14px, 14px) scale(0.96); }
}

.ps-brand {
    position: relative;
    z-index: 1;
    flex: 1 1 48%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2.5rem;
    overflow: hidden;
}

.ps-visual {
    position: relative;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 640 / 520;
    animation: ps-fade-up 0.9s ease-out both;
}

.ps-hero-img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.28));
    animation: ps-hero-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes ps-hero-in {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.ps-float {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    animation: ps-float-bob 5s ease-in-out infinite;
}

.ps-float--1 {
    top: 6%;
    left: -3%;
    width: clamp(72px, 18vw, 120px);
    height: auto;
}

.ps-float--2 {
    top: 2%;
    right: -2%;
    width: clamp(68px, 16vw, 110px);
    height: auto;
    animation-delay: -1.6s;
}

.ps-float--3 {
    bottom: 8%;
    right: 6%;
    width: clamp(60px, 14vw, 96px);
    height: auto;
    animation-delay: -3.2s;
}

@keyframes ps-float-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.ps-panel {
    position: relative;
    z-index: 1;
    flex: 1 1 52%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(255, 253, 248, 0.04);
}

.ps-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2.25rem;
    background: var(--ps-card);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 24px 48px -12px rgba(6, 46, 50, 0.32);
    backdrop-filter: blur(20px);
    animation: ps-card-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes ps-card-in {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ps-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.ps-card-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.ps-card-logo {
    display: block;
    width: 88px;
    height: 88px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(11, 92, 86, 0.22);
    animation: ps-logo-glow 3s ease-in-out infinite;
}

@keyframes ps-logo-glow {
    0%, 100% { box-shadow: 0 8px 24px rgba(11, 92, 86, 0.22); transform: scale(1); }
    50% { box-shadow: 0 10px 32px rgba(201, 162, 39, 0.28); transform: scale(1.02); }
}

.ps-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    border-radius: 10px;
}

.ps-alert--error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.ps-alert--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.ps-form .ps-field {
    margin-bottom: 1.25rem;
}

.ps-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ps-text);
}

.ps-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ps-input-wrap > i {
    position: absolute;
    left: 1rem;
    color: var(--ps-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.ps-input-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 2.75rem;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--ps-text);
    background: #f6f8f7;
    border: 1.5px solid var(--ps-line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ps-input-wrap input::placeholder {
    color: #94a3b8;
}

.ps-input-wrap input:focus {
    background: #fff;
    border-color: var(--ps-teal);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16);
}

.ps-toggle-pw {
    position: absolute;
    right: 0.75rem;
    padding: 0.35rem;
    background: none;
    border: none;
    color: var(--ps-muted);
    cursor: pointer;
    border-radius: 6px;
}

.ps-toggle-pw:hover {
    color: var(--ps-mid);
    background: var(--ps-gold-soft);
}

.ps-submit {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--ps-mid) 0%, var(--ps-teal) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 14px rgba(11, 92, 86, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ps-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(11, 92, 86, 0.4);
}

.ps-submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ps-spin 0.7s linear infinite;
}

.ps-submit.is-loading {
    pointer-events: none;
    opacity: 0.88;
}

.ps-submit.is-loading .ps-submit-text {
    visibility: hidden;
}

.ps-submit.is-loading .ps-submit-spinner {
    display: block;
    position: absolute;
}

@keyframes ps-spin {
    to { transform: rotate(360deg); }
}

.ps-foot-link {
    margin: 1.35rem 0 0;
    text-align: center;
    font-size: 0.8rem;
}

.ps-foot-link a {
    color: var(--ps-muted);
    text-decoration: none;
    font-weight: 600;
}

.ps-foot-link a:hover {
    color: var(--ps-teal);
}

@media (max-width: 991px) {
    .ps-scene {
        flex-direction: column;
    }

    .ps-brand {
        flex: 0 0 auto;
        padding: 1.75rem 1.5rem 0.5rem;
    }

    .ps-visual {
        max-width: 380px;
    }

    .ps-panel {
        flex: 1;
        padding: 1.5rem 1.25rem 2.5rem;
        background: transparent;
    }
}

@media (max-width: 479px) {
    .ps-card {
        padding: 2rem 1.5rem;
    }

    .ps-visual {
        max-width: 300px;
    }

    .ps-float--3 {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ps-orb,
    .ps-card-logo,
    .ps-float,
    .ps-hero-img,
    .ps-visual,
    .ps-card {
        animation: none;
    }
}
