/* ================================================================
   Rajawali HRIS - Login
   Standalone: tidak memakai sb-admin-2 / Bootstrap / jQuery.
   Token warna disamakan dengan public/themes.css.
   ================================================================ */

:root {
    --auth-accent: #ff7b00;
    --auth-accent-deep: #c2410c;
    --auth-ink: #1f2937;
    --auth-muted: #6b7280;
    --auth-line: #e3e7ee;
    --auth-panel: #fbfbfc;
    --auth-navy-top: #1c2a47;
    --auth-navy-bottom: #16223a;
    --auth-navy-text: #e7ecf5;
    --auth-navy-muted: #a9b6cc;
    --auth-danger: #b42318;
    --auth-danger-bg: #fef3f2;
    --auth-danger-line: #fecdca;
}

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

.auth {
    margin: 0;
    min-height: 100vh;
    background: var(--auth-panel);
    color: var(--auth-ink);
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.auth__shell {
    display: grid;
    grid-template-columns: minmax(0, 48fr) minmax(0, 52fr);
    min-height: 100vh;
}

/* ----------------------------------------------------------------
   Brand panel
   ---------------------------------------------------------------- */
.auth__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(40px, 5.5vw, 88px);
    background-image: linear-gradient(160deg, var(--auth-navy-top) 0%, var(--auth-navy-bottom) 100%);
    color: var(--auth-navy-text);
    isolation: isolate;
}

/* Glow hangat di sudut atas + bawah */
.auth__brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(58% 46% at 18% 8%, rgba(255, 123, 0, 0.20), transparent 65%),
        radial-gradient(52% 46% at 104% 100%, rgba(255, 123, 0, 0.12), transparent 65%);
    pointer-events: none;
}

/* Cincin halus, mengacu ke radar/pemantauan */
.auth__brand::after {
    content: "";
    position: absolute;
    right: -170px;
    bottom: -190px;
    z-index: -1;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    box-shadow:
        0 0 0 70px rgba(255, 255, 255, 0.025),
        0 0 0 150px rgba(255, 255, 255, 0.018);
    pointer-events: none;
}

.auth__brand-inner {
    width: 100%;
    max-width: 440px;
    margin-block: auto;
    animation: auth-rise 0.45s ease-out both;
}

.auth__logo-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    margin-bottom: 30px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 22px 45px -18px rgba(0, 0, 0, 0.55);
}

.auth__logo-chip img {
    display: block;
    width: 150px;
    height: auto;
}

.auth__brand-title {
    margin: 0 0 12px;
    font-size: clamp(26px, 2.4vw, 32px);
    font-weight: 800;
    letter-spacing: -0.015em;
}

.auth__brand-tagline {
    margin: 0 0 34px;
    max-width: 34ch;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--auth-navy-muted);
}

.auth__points {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth__points li {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
}

.auth__point-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 123, 0, 0.16);
    color: #ffa34d;
}

.auth__point-icon svg {
    width: 19px;
    height: 19px;
}

.auth__copyright {
    margin: 0;
    padding-top: 40px;
    font-size: 12.5px;
    color: rgba(231, 236, 245, 0.5);
}

/* ----------------------------------------------------------------
   Form panel
   ---------------------------------------------------------------- */
.auth__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth__form-wrap {
    width: 100%;
    max-width: 400px;
    animation: auth-rise 0.45s ease-out 0.06s both;
}

.auth__mobile-brand {
    display: none;
}

.auth__heading {
    margin-bottom: 28px;
}

.auth__heading h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 2.2vw, 28px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-ink);
}

.auth__heading p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--auth-muted);
}

/* Alert ---------------------------------------------------------- */
.auth__alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 22px;
    background: var(--auth-danger-bg);
    border: 1px solid var(--auth-danger-line);
    border-radius: 12px;
    color: var(--auth-danger);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
}

.auth__alert svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

/* Form ---------------------------------------------------------- */
.auth__field {
    margin-bottom: 18px;
}

.auth__field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #374151;
}

.auth__input-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--auth-line);
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth__input-wrap:hover {
    border-color: #ccd3de;
}

.auth__input-wrap:focus-within {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(255, 123, 0, 0.15);
}

.auth__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 50px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--auth-ink);
    font: inherit;
    font-size: 15px;
}

.auth__input::placeholder {
    color: #9aa3b2;
}

.auth__input:focus {
    outline: none;
}

.auth__input--password {
    padding-right: 4px;
    letter-spacing: 0.02em;
}

.auth__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin-right: 5px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8b95a5;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.auth__toggle:hover {
    background: #f3f5f8;
    color: var(--auth-ink);
}

.auth__toggle svg {
    width: 20px;
    height: 20px;
}

.auth__eye-off {
    display: none;
}

.auth__toggle[aria-pressed="true"] .auth__eye {
    display: none;
}

.auth__toggle[aria-pressed="true"] .auth__eye-off {
    display: block;
}

.auth__field--error .auth__input-wrap {
    border-color: var(--auth-danger);
}

.auth__field--error .auth__input-wrap:focus-within {
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12);
}

.auth__field-error {
    margin: 8px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--auth-danger);
}

/* Submit -------------------------------------------------------- */
.auth__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    margin-top: 10px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: var(--auth-accent);
    color: var(--auth-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.auth__submit:hover {
    background: #ff8c1a;
    box-shadow: 0 12px 24px -12px rgba(255, 123, 0, 0.8);
}

.auth__submit:active {
    transform: translateY(1px);
    box-shadow: none;
}

.auth__submit:focus-visible {
    outline: 2px solid var(--auth-accent-deep);
    outline-offset: 3px;
}

.auth__submit:disabled {
    cursor: progress;
    opacity: 0.8;
}

.auth__submit-arrow {
    width: 19px;
    height: 19px;
    transition: transform 0.15s ease;
}

.auth__submit:hover .auth__submit-arrow {
    transform: translateX(3px);
}

.auth__submit.is-loading .auth__submit-arrow {
    animation: auth-pulse 0.9s ease-in-out infinite;
}

.auth__help {
    margin: 22px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--auth-muted);
}

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .auth__shell {
        grid-template-columns: 1fr;
    }

    .auth__brand {
        display: none;
    }

    .auth__panel {
        min-height: 100vh;
        padding: 40px 24px;
    }

    .auth__form-wrap {
        max-width: 420px;
    }

    .auth__mobile-brand {
        display: inline-flex;
        margin-bottom: 30px;
        padding: 10px 16px;
        background: #ffffff;
        border: 1px solid var(--auth-line);
        border-radius: 14px;
        box-shadow: 0 14px 30px -22px rgba(15, 23, 42, 0.45);
    }

    .auth__mobile-brand img {
        display: block;
        width: 132px;
        height: auto;
    }
}

@media (max-width: 420px) {
    .auth__panel {
        padding: 28px 20px;
    }

    .auth__heading h2 {
        font-size: 23px;
    }
}

/* ----------------------------------------------------------------
   Motion
   ---------------------------------------------------------------- */
@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth__brand-inner,
    .auth__form-wrap {
        animation: none;
    }

    .auth *,
    .auth *::before,
    .auth *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
