@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap');

/**
 * NaviHR - Authentication Pages Styles
 * Modern SaaS-optimized styling for login, registration, and verification pages
 * 
 * Font: Montserrat - A geometric sans-serif typeface
 * - Modern and professional appearance
 * - Excellent readability at all sizes
 * - Perfect for headings and body text
 * - Clean and contemporary design
 */

/* ============================================
   CSS Variables - Design Tokens
   ============================================ */
:root {
    /* Primary Colors */
    --auth-primary: #8c479b;
    --auth-primary-hover: #702f7e;
    --auth-primary-ring: rgba(140, 71, 155, 0.15);
    --auth-primary-light: rgba(140, 71, 155, 0.1);

    /* Text Colors */
    --auth-text-primary: #0f172a;
    --auth-text-secondary: #64748b;
    --auth-text-muted: #94a3b8;

    /* Border Colors */
    --auth-border: #e2e8f0;
    --auth-border-hover: #cbd5e1;

    /* Background Colors */
    --auth-background: #f8fafc;
    --auth-surface: #ffffff;

    /* Success/Error Colors */
    --auth-error: #ef4444;
    --auth-error-bg: #fef2f2;
    --auth-error-border: #fecaca;
    --auth-success: #22c55e;
    --auth-success-bg: #f0fdf4;
    --auth-success-border: #bbf7d0;
    --auth-info: #3b82f6;
    --auth-info-bg: #eff6ff;
    --auth-info-border: #bfdbfe;
}

/* ============================================
   Base Styles
   ============================================ */
.auth-page {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-page * {
    font-family: inherit;
    box-sizing: border-box;
}

/* ============================================
   Auth Wrapper & Card
   ============================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    box-shadow:
        0 1px 3px 0 rgba(0, 0, 0, 0.04),
        0 4px 6px -1px rgba(0, 0, 0, 0.04);
    animation: authFadeIn 0.3s ease-out;
}

.auth-card.auth-card-wide {
    max-width: 440px;
}

.auth-card-body {
    padding: 2.5rem;
}

@media (max-width: 480px) {
    .auth-card-body {
        padding: 1.75rem;
    }
}

/* ============================================
   Logo
   ============================================ */
.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 44px;
    width: auto;
}

.auth-logo.auth-logo-lg img {
    height: 50px;
}

/* ============================================
   Auth Icon (for verification pages)
   ============================================ */
.auth-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-icon-circle {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--auth-primary-light) 0%, rgba(242, 101, 34, 0.05) 100%);
    border-radius: 50%;
    animation: authPulse 2s ease-in-out infinite;
}

.auth-icon-circle i {
    font-size: 1.75rem;
    color: var(--auth-primary);
}

/* ============================================
   Header
   ============================================ */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header.auth-header-lg {
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    letter-spacing: -0.025em;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.auth-title.auth-title-lg {
    font-size: 1.75rem;
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: var(--auth-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Form Elements
   ============================================ */
.auth-form-group {
    margin-bottom: 1.25rem;
}

.auth-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text-primary);
    margin-bottom: 0.5rem;
}

/* Input Wrapper */
.auth-input-wrapper {
    position: relative;
}

.auth-input-icon-left {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    pointer-events: none;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-input-icon-left i {
    font-size: 1.125rem;
}

.auth-input-wrapper:focus-within .auth-input-icon-left {
    color: var(--auth-primary);
}

/* Toggle Password */
.auth-toggle-password {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    cursor: pointer;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
}

.auth-toggle-password:hover {
    color: var(--auth-primary);
}

.auth-toggle-password i {
    font-size: 1.125rem;
}

/* Form Inputs */
.auth-form-input {
    width: 100%;
    height: 44px;
    padding: 0 0.875rem;
    padding-left: 2.75rem;
    font-size: 0.9375rem;
    color: var(--auth-text-primary);
    background-color: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form-input.has-toggle {
    padding-right: 2.75rem;
}

.auth-form-input::placeholder {
    color: var(--auth-text-muted);
}

.auth-form-input:hover {
    border-color: var(--auth-border-hover);
}

.auth-form-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px var(--auth-primary-ring);
}

.auth-form-input.is-invalid {
    border-color: var(--auth-error);
}

.auth-form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Field Error */
.auth-field-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--auth-error);
}

.auth-field-error i {
    font-size: 0.875rem;
}

/* ============================================
   Remember Me & Forgot Password Row
   ============================================ */
.auth-remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.auth-remember-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.5rem;
}

.auth-remember-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-primary);
    border-radius: 4px;
    cursor: pointer;
}

.auth-remember-text {
    color: var(--auth-text-secondary);
}

.auth-forgot-link {
    font-weight: 500;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-forgot-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* ============================================
   Buttons
   ============================================ */
.auth-btn-primary {
    width: 100%;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--auth-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    margin-bottom: 0.75rem;
}

.auth-btn-primary:hover {
    background-color: var(--auth-primary-hover);
}

.auth-btn-primary:active {
    transform: scale(0.99);
}

.auth-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--auth-primary-ring);
}

.auth-btn-secondary {
    width: 100%;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--auth-text-secondary);
    background-color: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auth-btn-secondary:hover {
    background-color: #f9fafb;
    border-color: var(--auth-border-hover);
    color: var(--auth-text-primary);
}

.auth-btn-secondary:active {
    transform: scale(0.99);
}

.auth-btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* ============================================
   Alert Messages
   ============================================ */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    border: 1px solid;
}

.auth-alert-icon {
    flex-shrink: 0;
    font-size: 1.125rem;
    margin-top: 0.0625rem;
}

.auth-alert-success {
    color: #166534;
    background-color: var(--auth-success-bg);
    border-color: var(--auth-success-border);
}

.auth-alert-success .auth-alert-icon {
    color: var(--auth-success);
}

.auth-alert-error {
    color: #991b1b;
    background-color: var(--auth-error-bg);
    border-color: var(--auth-error-border);
}

.auth-alert-error .auth-alert-icon {
    color: var(--auth-error);
}

.auth-alert-info {
    color: #1e40af;
    background-color: var(--auth-info-bg);
    border-color: var(--auth-info-border);
}

.auth-alert-info .auth-alert-icon {
    color: var(--auth-info);
}

/* ============================================
   Validation Errors Block
   ============================================ */
.auth-validation-errors {
    background-color: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
}

.auth-validation-errors-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #991b1b;
    margin-bottom: 0.5rem;
}

.auth-validation-errors-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-validation-errors-list li {
    font-size: 0.8125rem;
    color: #991b1b;
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.25rem;
}

.auth-validation-errors-list li:last-child {
    margin-bottom: 0;
}

.auth-validation-errors-list li::before {
    content: "•";
    position: absolute;
    left: 0;
}

/* ============================================
   Info Box
   ============================================ */
.auth-info-box {
    background-color: var(--auth-info-bg);
    border: 1px solid var(--auth-info-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.auth-info-box p {
    font-size: 0.875rem;
    color: #1e40af;
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   OTP Input Group
   ============================================ */
.auth-otp-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    background-color: var(--auth-surface);
    border: 2px solid var(--auth-border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-otp-input:hover {
    border-color: var(--auth-border-hover);
}

.auth-otp-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px var(--auth-primary-ring);
}

@media (max-width: 400px) {
    .auth-otp-input {
        width: 42px;
        height: 50px;
        font-size: 1.125rem;
    }

    .auth-otp-group {
        gap: 0.375rem;
    }
}

/* ============================================
   Helper Text
   ============================================ */
.auth-helper-text {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    margin-bottom: 1.25rem;
}

/* ============================================
   Links
   ============================================ */
.auth-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.15s ease;
    width: 100%;
}

.auth-back-link:hover {
    color: var(--auth-primary-hover);
}

.auth-back-link i {
    font-size: 1rem;
}

.auth-switch-link {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-primary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: color 0.15s ease;
    background: none;
    border: none;
    width: 100%;
}

.auth-switch-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* ============================================
   Action Links (for verify email page)
   ============================================ */
.auth-action-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-action-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.auth-action-link:hover {
    color: var(--auth-primary);
}

.auth-action-link i {
    font-size: 1rem;
}

.auth-link-separator {
    width: 1px;
    height: 16px;
    background-color: var(--auth-border);
}

.auth-btn-logout {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
}

.auth-btn-logout:hover {
    color: var(--auth-error);
}

.auth-btn-logout i {
    font-size: 1rem;
}

/* ============================================
   Footer
   ============================================ */
.auth-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    text-align: center;
}

.auth-copyright {
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    margin: 0;
}

/* ============================================
   Utility - Hidden
   ============================================ */
.auth-hidden {
    display: none !important;
}

/* ============================================
   Animations
   ============================================ */
@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}