/* ==========================================================================
   Nevvon ATS — HHAeXchange-branded auth pages
   Implements the "ATS Demo Login" design (Claude Design import).
   Loaded only by resources/views/auth/layouts/app.blade.php.
   Token values lifted verbatim from the HHAeXchange design system.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,400&display=swap');

:root {
    /* Brand blue */
    --hhax-primary-light: #C3D1F2;
    --hhax-primary: #2752B4;
    --hhax-primary-dark: #002447;
    --hhax-blue-500: #1F4290;   /* hover */
    --hhax-blue-400: #5880DB;   /* focus ring */

    /* Neutrals */
    --hhax-gray-200: #E6E6E6;   /* canvas */
    --color-surface: #FEFEFE;
    --color-border: #E6E6E6;
    --color-border-strong: #C0C0C0;
    --text-strong: #202020;
    --text-body: #3E3E3E;
    --text-muted: #757575;

    /* Status */
    --hhax-alert: #CD2027;
    --hhax-alert-light: #F9DCDD;
    --hhax-alert-dark: #90161B;
    --hhax-success: #2E8540;
    --hhax-success-light: #DAF2DF;
    --hhax-success-dark: #205D2D;

    /* Shape & type */
    --font-sans: 'Lato', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
    --radius-sm: 3px;
    --radius-card: 16px;
    --shadow-card: 0 1px 3px rgba(10, 10, 10, .08);
    --focus-ring: 0 0 0 2px rgba(88, 128, 219, .35);
    --transition-fast: 120ms ease;
}

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

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */
.ats-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    font-family: var(--font-sans);
    color: var(--text-body);
    background-color: var(--hhax-gray-200);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.ats-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Co-branded logo row */
.ats-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}
.ats-logos img { display: block; width: auto; }
.ats-logo-nevvon { height: 30px; }
.ats-logo-hhax { height: 32px; }
.ats-logo-divider {
    width: 1px;
    height: 34px;
    background: var(--color-border-strong);
}

/* Card */
.ats-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 36px 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ats-footer {
    margin: 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Card header
   -------------------------------------------------------------------------- */
.ats-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.ats-badge {
    white-space: nowrap;
    background: var(--hhax-primary-light);
    color: var(--hhax-primary-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 5px 13px;
    border-radius: var(--radius-sm);
}
.ats-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-strong);
}
.ats-subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */
.ats-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.ats-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ats-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong);
}
.ats-input {
    width: 100%;
    height: 40px;
    padding: 8px 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-body);
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.ats-input::placeholder { color: var(--text-muted); }
.ats-input:focus {
    outline: none;
    border-color: var(--hhax-blue-400);
    box-shadow: var(--focus-ring);
}
.ats-input--error {
    border-color: var(--hhax-alert);
}
.ats-input--error:focus {
    box-shadow: 0 0 0 2px rgba(205, 32, 39, .25);
}
.ats-error {
    font-size: 12px;
    color: var(--hhax-alert);
}

/* Password field + toggle */
.ats-password { position: relative; }
.ats-password .ats-input { padding-right: 44px; }
.view-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    line-height: 0;
}
.view-password img { width: 18px; height: auto; }
.d-none { display: none !important; }
.d-block { display: block !important; }

/* Remember / forgot row */
.ats-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.ats-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    color: var(--text-body);
    cursor: pointer;
}
.ats-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--hhax-primary);
    cursor: pointer;
}
.ats-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--hhax-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.ats-link:hover { color: var(--hhax-blue-500); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.ats-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 9px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    background: var(--hhax-primary);
    border: 1px solid var(--hhax-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.ats-btn:hover {
    background: var(--hhax-blue-500);
    border-color: var(--hhax-blue-500);
}
.ats-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}
.ats-btn--hollow {
    color: var(--hhax-primary);
    background: transparent;
}
.ats-btn--hollow:hover {
    color: var(--hhax-blue-500);
    background: rgba(39, 82, 180, .06);
    border-color: var(--hhax-blue-500);
}

/* SSO divider (design "OR") */
.ats-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
}
.ats-or::before,
.ats-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* --------------------------------------------------------------------------
   Feedback callouts
   Class names kept for common_function.js (loader/notification) + 422 handler.
   -------------------------------------------------------------------------- */
.success-message,
.error-message,
.ats-callout {
    position: relative;
    padding: 12px 36px 12px 14px;
    border-radius: var(--radius-sm);
    border-left: 4px solid transparent;
    font-size: 13px;
    line-height: 1.5;
}
.error-message {
    background: var(--hhax-alert-light);
    border-left-color: var(--hhax-alert);
    color: var(--hhax-alert-dark);
}
.success-message,
.ats-callout--success {
    background: var(--hhax-success-light);
    border-left-color: var(--hhax-success);
    color: var(--hhax-success-dark);
}
.success-message-close,
.error-message-close {
    position: absolute;
    top: 10px;
    right: 12px;
    color: inherit;
    opacity: .7;
    cursor: pointer;
    text-decoration: none;
}
.success-message-close:hover,
.error-message-close:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Loader (driven by loader()/clearloader() in common_function.js)
   -------------------------------------------------------------------------- */
.loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(230, 230, 230, .7);
}
.loader lottie-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
}

/* --------------------------------------------------------------------------
   2-step verification (OTP) panel
   -------------------------------------------------------------------------- */
.two-step-verification-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}
.two-step-verification-container .ats-title { text-align: center; }
.message-2FA {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}
.message-2FA .sendEmail { color: var(--text-strong); }
.otp-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
.otp-container > span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong);
}
.otp-input {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.otp-input input {
    width: 44px;
    height: 48px;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-strong);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    -moz-appearance: textfield;
}
.otp-input input::-webkit-outer-spin-button,
.otp-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.otp-input input:focus {
    outline: none;
    border-color: var(--hhax-blue-400);
    box-shadow: var(--focus-ring);
}
.btn-row { display: flex; }
#otperrorMessages {
    font-size: 12px;
    color: var(--hhax-alert);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 420px) {
    .ats-card { padding: 28px 22px 24px; }
    .ats-logos { gap: 16px; }
    .otp-input { gap: 7px; }
    .otp-input input { width: 40px; height: 44px; }
}
