/* ============================================================
   UGAHARI HRIS — Auth Styles  (ported from BPR-HRIS React)
   ============================================================ */

/* ── Metropolis local font ───────────────────────────────── */
@font-face {
    font-family: 'Metropolis';
    src: url('../template/dist/assets/fonts/metropolis/Metropolis-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../template/dist/assets/fonts/metropolis/Metropolis-RegularItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../template/dist/assets/fonts/metropolis/Metropolis-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../template/dist/assets/fonts/metropolis/Metropolis-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../template/dist/assets/fonts/metropolis/Metropolis-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../template/dist/assets/fonts/metropolis/Metropolis-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../template/dist/assets/fonts/metropolis/Metropolis-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand:        #335ef7;
    --brand-hover:  #2549d8;
    --c-text:       #111827;
    --c-text-2:     #6b7280;
    --c-text-3:     #9ca3af;
    --c-border:     #d1d5db;
    --radius-input: 0.75rem;
    --radius-btn:   0.75rem;
    --transition:   0.18s ease;
}

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

body.auth-page {
    font-family: 'Metropolis', system-ui, sans-serif;
    margin: 0;
    min-height: 100dvh;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    color: var(--c-text);
}

/* ── Outer shell ─────────────────────────────────────────── */
.auth-page #layoutAuthentication {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.auth-page #layoutAuthentication_content {
    display: flex;
    flex: 1;
}

.auth-main {
    display: flex;
    flex: 1;
    min-height: 100dvh;
    overflow: hidden;
}

/* ── Left — form side ────────────────────────────────────── */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    background: #fff;
    padding: 3rem 2rem;
}

.auth-form-inner {
    width: 100%;
    max-width: 22rem;       /* tight like the reference */
    margin: 0 auto;
}

/* ── Right — illustration side ───────────────────────────── */
.auth-visual-side {
    display: none;
    position: relative;
    flex: 1;
    background: var(--brand);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .auth-visual-side { display: flex; }
}

/* ── Headings ────────────────────────────────────────────── */
.auth-heading {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--c-text);
    margin: 0 0 0.4rem;
}

.auth-subheading {
    font-size: 0.85rem;
    color: var(--c-text-2);
    margin: 0 0 2rem;
}

/* ── Mobile logo ─────────────────────────────────────────── */
.auth-mobile-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.auth-mobile-logo img {
    height: 3rem;
    width: auto;
    object-fit: contain;
}

/* ── Form labels ─────────────────────────────────────────── */
.auth-label {
    display: block;
    font-size: 0.825rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.4rem;
}

.auth-label .req { color: #ef4444; }

/* ── Input base ──────────────────────────────────────────── */
.auth-input {
    display: block;
    width: 100%;
    height: 3rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-input);
    background: transparent;
    padding: 0 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--c-text);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-input::placeholder { color: var(--c-text-3); }

.auth-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(51, 94, 247, 0.1);
}

/* ── Password wrapper ────────────────────────────────────── */
.auth-pw-wrap {
    position: relative;
}

.auth-pw-wrap .auth-input {
    padding-right: 3rem;
}

.auth-pw-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--c-text-3);
    display: flex;
    align-items: center;
    transition: color var(--transition);
    line-height: 1;
}

.auth-pw-toggle:hover { color: var(--c-text-2); }

.auth-pw-toggle svg {
    width: 1.1rem;
    height: 1.1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Remember / forgot row ───────────────────────────────── */
.auth-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 1.25rem 0;
}

.auth-check-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.825rem;
    color: #4b5563;
    cursor: pointer;
}

.auth-check-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    accent-color: var(--brand);
    cursor: pointer;
}

.auth-forgot {
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--brand);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition);
}

.auth-forgot:hover { color: #a80d26; }

/* ── Submit button ───────────────────────────────────────── */
.auth-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 3rem;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--brand);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
    margin-top: 0.25rem;
}

.auth-btn-submit:hover:not(:disabled) { background: var(--brand-hover); }
.auth-btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Alert ───────────────────────────────────────────────── */
.auth-alert {
    font-size: 0.825rem;
    padding: 0.65rem 0.875rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.auth-alert svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

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

.auth-alert-error svg { stroke: #b91c1c; }

.auth-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.auth-alert-info svg { stroke: #1d4ed8; }

/* ── Node graph ──────────────────────────────────────────── */
.auth-graph {
    position: relative;
    width: 30rem;
    height: 30rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG lines */
.auth-graph-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Center logo circle */
.auth-graph-center {
    position: relative;
    z-index: 10;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.6);
}

.auth-graph-center img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* Node items */
.auth-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.auth-node-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-node-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: #fff;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-node-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

/* Node positions — mirroring the React reference */
.auth-node-employees  { left: 0;    top: calc(50% - 10rem - 1.5rem); }
.auth-node-attendance { left: 0.25rem; top: 50%; transform: translateY(-50%); }
.auth-node-leave      { left: 0;    bottom: calc(50% - 10rem - 1.5rem); }
.auth-node-payroll    { right: 0.25rem; top: calc(50% - 8rem); }
.auth-node-schedule   { right: 0.25rem; bottom: calc(50% - 8rem); }

/* ── Visual caption ──────────────────────────────────────── */
.auth-visual-caption {
    margin-top: 2.5rem;
    text-align: center;
    z-index: 10;
}

.auth-visual-eyebrow {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.6rem;
    display: block;
}

.auth-visual-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
}

.auth-visual-sub {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
    max-width: 18ch;
    margin: 0 auto;
}

/* ── Page footer ─────────────────────────────────────────── */
.auth-footer {
    display: none;        /* hidden — full-screen layout has no separate footer */
}

/* ── Mobile responsive ───────────────────────────────────── */
@media (max-width: 1023px) {
    .auth-main {
        flex-direction: column;
        min-height: 100dvh;
    }

    .auth-form-side {
        flex: unset;
        min-height: 100dvh;
        padding: 2rem 1.25rem;
        justify-content: center;
    }

    .auth-mobile-logo { display: flex; }
}

@media (min-width: 1024px) {
    .auth-mobile-logo { display: none; }
}
