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

:root {
    --hr-bg: #0b0e1a;
    --hr-bg-2: #131a30;
    --hr-primary: #667eea;
    --hr-primary-2: #22d3ee;
    --hr-card: rgba(255, 255, 255, 0.06);
    --hr-card-border: rgba(255, 255, 255, 0.12);
    --hr-text: #f4f5fb;
    --hr-text-dim: #a6adc8;
    --hr-error: #ff5470;
    --hr-success: #2ee6a6;
    --hr-radius: 20px;
}

html {
    font-size: 16px;
}

body.hr-login {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    width: 100%;
    color: var(--hr-text);
    background: var(--hr-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    padding: 24px;
}

.hr-login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at 20% 20%, #1b2140 0%, var(--hr-bg) 55%);
    overflow: hidden;
}

.hr-login-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: 42px 42px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}

.hr-login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    animation: hrOrbFloat 18s ease-in-out infinite;
}

.hr-login-orb-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, var(--hr-primary), transparent 70%);
    animation-delay: 0s;
}

.hr-login-orb-2 {
    width: 380px;
    height: 380px;
    bottom: -140px;
    right: -80px;
    background: radial-gradient(circle, var(--hr-primary-2), transparent 70%);
    animation-delay: -6s;
}

.hr-login-orb-3 {
    width: 260px;
    height: 260px;
    bottom: 10%;
    left: 8%;
    background: radial-gradient(circle, #ff5fae, transparent 70%);
    animation-delay: -11s;
    opacity: 0.35;
}

@keyframes hrOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.08); }
}

.hr-login-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.hr-login-card {
    width: 100%;
    background: var(--hr-card);
    border: 1px solid var(--hr-card-border);
    border-radius: var(--hr-radius);
    padding: 40px 32px 32px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    animation: hrCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hr-login-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin-bottom: 24px;
}

.hr-login-logo {
    width: 66px;
    height: 66px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--hr-primary), var(--hr-primary-2));
    box-shadow: 0 10px 30px rgba(124, 92, 255, 0.4);
}
.hr-login-logo img{
    width: 55px;
    height: 55px;
}

.hr-login-logo-accent {
    background: linear-gradient(135deg, #2ee6a6, var(--hr-primary-2));
    box-shadow: 0 10px 30px rgba(46, 230, 166, 0.35);
}

.hr-login-head h2 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hr-login-head p {
    font-size: 13.5px;
    color: var(--hr-text-dim);
    max-width: 300px;
}

.hr-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #ffd7de;
    background: rgba(255, 84, 112, 0.12);
    border: 1px solid rgba(255, 84, 112, 0.3);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
}

.hr-login-alert i {
    margin-top: 1px;
    color: var(--hr-error);
}

.hr-login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-fgroup label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hr-text-dim);
    margin-bottom: 7px;
}

.hr-req {
    color: var(--hr-error);
}

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

.hr-input-wrap i {
    position: absolute;
    left: 14px;
    color: var(--hr-text-dim);
    font-size: 16px;
    pointer-events: none;
}

.hr-input-wrap input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hr-card-border);
    border-radius: 12px;
    padding: 13px 14px 13px 42px;
    color: var(--hr-text);
    font-size: 14.5px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.hr-input-wrap input::placeholder {
    color: #767d99;
}

.hr-input-wrap input:focus {
    border-color: var(--hr-primary);
    background: rgba(124, 92, 255, 0.08);
}

.hr-fgroup.error .hr-input-wrap input {
    border-color: var(--hr-error);
    background: rgba(255, 84, 112, 0.08);
}

.hr-show-pass {
    position: absolute;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    opacity: 1;
    top: 7px;
    transition: all 300ms ease;
}
.hr-show-pass i{
    position: unset;
    left: unset;
}

.hr-error-msg {
    display: none;
    margin-top: 6px;
    font-size: 12.5px;
    color: #ffb3c0;
}

.hr-fgroup.error .hr-error-msg {
    display: block;
}

.hr-btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--hr-primary), var(--hr-primary-2));
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 12px 28px rgba(124, 92, 255, 0.35);
    margin-top: 4px;
}

.hr-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(124, 92, 255, 0.45);
}

.hr-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.hr-login-footnote {
    font-size: 12px;
    color: var(--hr-text-dim);
    opacity: 0.75;
    text-align: center;
}

.hr-2fa-qr-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.hr-2fa-qr {
    background: #ffffff;
    padding: 14px;
    border-radius: 16px;
    line-height: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hr-2fa-manual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    margin-bottom: 22px;
}

.hr-2fa-manual span {
    font-size: 12.5px;
    color: var(--hr-text-dim);
}

.hr-2fa-manual code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--hr-card-border);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    letter-spacing: 1.5px;
    color: var(--hr-primary-2);
}

.hr-2fa-otp-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.hr-otp-box {
    width: 46px;
    height: 54px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--hr-text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hr-card-border);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.hr-otp-box:focus {
    border-color: var(--hr-primary);
    background: rgba(124, 92, 255, 0.1);
    transform: translateY(-2px);
}

.hr-otp-box:disabled {
    opacity: 0.4;
}

.hr-2fa-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--hr-text-dim);
    margin-bottom: 20px;
    cursor: pointer;
}

.hr-2fa-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--hr-primary);
    cursor: pointer;
}

.hr-2fa-cancel {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--hr-text-dim);
    text-decoration: none;
}

.hr-2fa-cancel:hover {
    color: var(--hr-text);
    text-decoration: underline;
}

.hr-toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hr-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(20, 24, 42, 0.95);
    border: 1px solid var(--hr-card-border);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    color: var(--hr-text);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 320px;
}

.hr-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.hr-toast-success i { color: var(--hr-success); }
.hr-toast-error i { color: var(--hr-error); }
.hr-toast-info i { color: var(--hr-primary-2); }

@media (max-width: 480px) {
    .hr-login-card {
        /* padding: 32px 22px 26px; */
    }

    .hr-otp-box {
        width: 40px;
        height: 48px;
        font-size: 19px;
    }
    .hr-login-card {
        background: transparent;
        border: 0px solid transparent;
        border-radius: 0px;
        padding: 10px 0px;
        backdrop-filter: unset;
        -webkit-backdrop-filter: unset;
        box-shadow: unset;
        animation: hrCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
}
