/* HR Login — modern split layout with motion */

.auth-login-page {
    --auth-primary: #0d9488;
    --auth-primary-dark: #0f766e;
    --auth-primary-soft: rgba(13, 148, 136, 0.12);
    --auth-accent: #f97316;
    --auth-accent-soft: rgba(249, 115, 22, 0.14);
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-line: #e2e8f0;
    --auth-surface: #ffffff;
    --auth-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --auth-radius: 1.35rem;
    --auth-font: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

.auth-login-page *,
.auth-login-page *::before,
.auth-login-page *::after {
    box-sizing: border-box;
}

.auth-login-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--auth-font);
    color: var(--auth-ink);
    background: #f8fafc;
    overflow-x: hidden;
}

.auth-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-scene__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    animation: authBlobDrift var(--dur, 14s) ease-in-out infinite;
}

.auth-scene__blob--1 {
    width: 420px;
    height: 420px;
    top: -8%;
    right: 8%;
    background: #5eead4;
    --dur: 16s;
}

.auth-scene__blob--2 {
    width: 360px;
    height: 360px;
    bottom: -10%;
    left: 12%;
    background: #fdba74;
    --dur: 18s;
    animation-delay: -4s;
}

.auth-scene__blob--3 {
    width: 280px;
    height: 280px;
    top: 42%;
    left: 38%;
    background: #67e8f9;
    --dur: 20s;
    animation-delay: -8s;
}

@keyframes authBlobDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(24px, -30px) scale(1.06); }
    66% { transform: translate(-18px, 22px) scale(0.94); }
}

.auth-scene__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, #000 35%, transparent 100%);
    animation: authGridShift 24s linear infinite;
}

@keyframes authGridShift {
    from { transform: translateY(0); }
    to { transform: translateY(48px); }
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .auth-shell {
        grid-template-columns: 1.05fr 0.95fr;
    }
}

/* Visual panel */
.auth-visual {
    display: none;
    position: relative;
    padding: 3rem;
    color: #ecfeff;
    background:
        radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.35), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(251, 146, 60, 0.22), transparent 40%),
        linear-gradient(145deg, #042f2e 0%, #0f766e 48%, #134e4a 100%);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .auth-visual {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.auth-visual__inner {
    width: min(100%, 520px);
    animation: authVisualIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes authVisualIn {
    from { opacity: 0; transform: translateX(32px); }
    to { opacity: 1; transform: translateX(0); }
}

.auth-visual__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.82rem;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
}

.auth-visual__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5eead4;
    box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.7);
    animation: authPulse 2.4s ease infinite;
}

@keyframes authPulse {
    0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.55); }
    70% { box-shadow: 0 0 0 12px rgba(94, 234, 212, 0); }
    100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); }
}

.auth-visual__title {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 1rem;
}

.auth-visual__title span {
    display: block;
    background: linear-gradient(90deg, #99f6e4, #fef08a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-visual__desc {
    margin: 0 0 2rem;
    color: rgba(236, 254, 255, 0.78);
    line-height: 1.85;
    font-size: 1rem;
}

.auth-showcase {
    position: relative;
    min-height: 300px;
    margin-bottom: 1.5rem;
}

.auth-showcase__orbit {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 220px;
    height: 220px;
    margin: -110px 0 0 -110px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    animation: authOrbitSpin 18s linear infinite;
}

@keyframes authOrbitSpin {
    to { transform: rotate(360deg); }
}

.auth-showcase__core {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 96px;
    height: 96px;
    margin: -48px 0 0 -48px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: authCoreFloat 4s ease-in-out infinite;
}

@keyframes authCoreFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.auth-showcase__core svg {
    width: 42px;
    height: 42px;
    fill: #ccfbf1;
}

.auth-float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    font-size: 0.82rem;
    white-space: nowrap;
    animation: authCardFloat var(--float-dur, 5s) ease-in-out infinite;
}

.auth-float-card strong {
    display: block;
    font-size: 0.95rem;
}

.auth-float-card span {
    color: rgba(236, 254, 255, 0.72);
    font-size: 0.75rem;
}

.auth-float-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
}

.auth-float-card__icon svg {
    width: 18px;
    height: 18px;
    fill: #ccfbf1;
}

.auth-float-card--1 { top: 8%; right: 4%; --float-dur: 5.5s; animation-delay: 0s; }
.auth-float-card--2 { top: 58%; right: 0; --float-dur: 6.2s; animation-delay: -1.2s; }
.auth-float-card--3 { top: 22%; left: 0; --float-dur: 5.8s; animation-delay: -2.4s; }
.auth-float-card--4 { bottom: 6%; left: 8%; --float-dur: 6.5s; animation-delay: -0.8s; }

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

.auth-highlights {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-highlights__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(236, 254, 255, 0.9);
    font-size: 0.88rem;
    line-height: 1.5;
    animation: authHighlightIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0.3s) both;
}

.auth-highlights__item::before {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(94, 234, 212, 0.2);
    border: 1px solid rgba(94, 234, 212, 0.45);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2399f6e4'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

@keyframes authHighlightIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Form panel */
.auth-form-panel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(1.25rem, 3vh, 2rem) 1.25rem 1.5rem;
    min-height: 100vh;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .auth-form-panel {
        padding-top: clamp(1.5rem, 4vh, 2.25rem);
    }
}

.auth-card {
    width: min(100%, 440px);
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    padding: 1.5rem 1.65rem 1.35rem;
    box-shadow: var(--auth-shadow);
    position: relative;
    overflow: hidden;
    animation: authCardIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    margin-top: 0;
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(28px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-primary), var(--auth-accent), var(--auth-primary));
    background-size: 200% 100%;
    animation: authBarShine 4s ease infinite;
}

@keyframes authBarShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
    animation: authFadeUp 0.7s 0.1s both;
}

.auth-brand__logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: contain;
    background: #f8fafc;
    padding: 0.35rem;
    border: 1px solid var(--auth-line);
}

.auth-brand__fallback {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--auth-primary), #14b8a6);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.35);
    animation: authLogoBob 3.5s ease-in-out infinite;
}

@keyframes authLogoBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.auth-brand__text h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.auth-brand__text p {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--auth-muted);
}

.auth-heading {
    margin-bottom: 1.1rem;
    animation: authFadeUp 0.7s 0.18s both;
}

.auth-heading h2 {
    margin: 0 0 0.25rem;
    font-size: 1.45rem;
    font-weight: 800;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.92rem;
}

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

.auth-alert {
    border-radius: 0.85rem;
    padding: 0.8rem 1rem;
    font-size: 0.86rem;
    margin-bottom: 1rem;
    animation: authShake 0.45s ease;
}

.auth-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.auth-back-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--auth-primary-dark);
    text-decoration: none;
    transition: color 0.2s ease;
    animation: authFadeUp 0.65s 0.52s both;
}

.auth-back-link:hover {
    color: var(--auth-accent);
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.auth-field {
    margin-bottom: 0.95rem;
    animation: authFadeUp 0.65s var(--delay, 0.25s) both;
}

.auth-field__label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
}

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

.auth-input-wrap input {
    width: 100%;
    border: 1.5px solid var(--auth-line);
    border-radius: 0.85rem;
    padding: 0.85rem 2.75rem 0.85rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--auth-ink);
    background: #fff;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

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

.auth-input-wrap input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px var(--auth-primary-soft);
    transform: translateY(-1px);
}

.auth-input-wrap__icon {
    position: absolute;
    top: 50%;
    right: 0.95rem;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.25s ease;
}

.auth-input-wrap input:focus ~ .auth-input-wrap__icon {
    color: var(--auth-primary);
}

.auth-input-wrap__toggle {
    position: absolute;
    top: 50%;
    left: 0.65rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.35rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.auth-input-wrap__toggle:hover {
    color: var(--auth-primary-dark);
    background: var(--auth-primary-soft);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
    animation: authFadeUp 0.65s 0.42s both;
}

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

.auth-check input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    margin: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.auth-check input:checked {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-check input:checked::after {
    content: '';
    position: absolute;
    inset: 3px 5px 5px 3px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-link {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--auth-primary-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--auth-accent);
}

.auth-submit {
    width: 100%;
    border: 0;
    border-radius: 0.9rem;
    padding: 0.95rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    box-shadow: 0 14px 28px rgba(13, 148, 136, 0.32);
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    animation: authFadeUp 0.65s 0.48s both;
}

.auth-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: authBtnSheen 3.5s ease infinite;
}

@keyframes authBtnSheen {
    0%, 70% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(13, 148, 136, 0.38);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit__text,
.auth-submit__loader {
    position: relative;
    z-index: 1;
}

.auth-submit__loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-submit.is-loading .auth-submit__text {
    opacity: 0;
}

.auth-submit.is-loading .auth-submit__loader {
    display: flex;
    position: absolute;
    inset: 0;
}

.auth-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

.auth-footer-note {
    margin-top: 0.9rem;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    animation: authFadeUp 0.65s 0.55s both;
}

.auth-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(13, 148, 136, 0.35);
    animation: authParticleRise var(--rise, 12s) linear infinite;
    animation-delay: var(--delay, 0s);
    left: var(--x, 50%);
    bottom: -8px;
}

@keyframes authParticleRise {
    0% { transform: translateY(0) scale(0.6); opacity: 0; }
    10% { opacity: 0.9; }
    90% { opacity: 0.35; }
    100% { transform: translateY(-105vh) scale(1); opacity: 0; }
}

@media (max-width: 1023.98px) {
    .auth-form-panel {
        min-height: auto;
        padding-top: 1.25rem;
    }

    .auth-card {
        padding: 1.35rem 1.25rem 1.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-login-page *,
    .auth-login-page *::before,
    .auth-login-page *::after {
        animation: none !important;
        transition: none !important;
    }
}
