/**
 * Recruitz Solution - Enterprise SaaS Authentication
 * Clean, minimal, distraction-free authentication system (Stripe / Linear / Supabase style)
 */

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: #F8FAFC;
    font-family: var(--font-body, -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif);
    color: #0F172A;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-viewport {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: radial-gradient(circle at 50% 0%, #FFFFFF 0%, #F1F5F9 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.auth-container-register {
    max-width: 460px;
}

/* Header & Brand */
.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand-logo {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.auth-brand-logo:hover {
    opacity: 0.88;
}

.auth-brand-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Auth Card */
.auth-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03), 0 20px 25px -5px rgba(15, 23, 42, 0.04);
    padding: 36px 32px;
}

.auth-card-title {
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Plus Jakarta Sans', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.025em;
    margin: 0 0 6px 0;
    text-align: center;
}

.auth-card-subtitle {
    font-size: 0.9rem;
    color: #64748B;
    margin: 0 0 24px 0;
    text-align: center;
    line-height: 1.5;
}

/* Google OAuth Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 42px;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1E293B;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-google:hover {
    background-color: #F8FAFC;
    border-color: #94A3B8;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
    color: #0F172A;
}

.btn-google svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background-color: #E2E8F0;
}

.auth-divider-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Segmented Control / Role Switcher */
.role-segmented-control {
    display: flex;
    background-color: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 20px;
}

.role-segment-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.role-segment-btn.active {
    background-color: #FFFFFF;
    color: #0D72D6;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Form Controls */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.form-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: #0D72D6;
    text-decoration: none;
    transition: color 0.15s ease;
}

.forgot-link:hover {
    color: #0959A8;
    text-decoration: underline;
}

/* Clean Input Styling (No icons inside inputs) */
.form-control,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100% !important;
    height: 42px !important;
    padding: 9px 12px !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 0.92rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #0F172A !important;
    background-color: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    outline: none !important;
}

.auth-form input::placeholder {
    color: #94A3B8 !important;
    font-weight: 400 !important;
}

.auth-form input:hover {
    border-color: #94A3B8 !important;
}

.auth-form input:focus {
    border-color: #0D72D6 !important;
    box-shadow: 0 0 0 3px rgba(13, 114, 214, 0.12) !important;
    background-color: #FFFFFF !important;
}

/* Password Input with show/hide toggle */
.password-input-wrap {
    position: relative;
    width: 100%;
}

.password-input-wrap input {
    padding-right: 40px !important;
}

.toggle-password-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.toggle-password-btn:hover {
    color: #334155;
}

.toggle-password-btn svg {
    width: 16px;
    height: 16px;
}

/* Remember me row */
.auth-remember-row {
    display: flex;
    align-items: center;
}

.remember-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.remember-checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #0D72D6;
    border-radius: 4px;
    margin: 0;
    cursor: pointer;
}

/* reCAPTCHA container */
.auth-recaptcha-wrap {
    display: flex;
    justify-content: center;
    margin: 4px 0;
}

/* Submit Button */
.btn-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    background-color: #0D72D6;
    border: 1px solid #0D72D6;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(13, 114, 214, 0.2);
    margin-top: 4px;
}

.btn-auth-submit:hover {
    background-color: #0959A8;
    border-color: #0959A8;
    box-shadow: 0 2px 4px rgba(13, 114, 214, 0.3);
}

.btn-auth-submit:active {
    transform: translateY(1px);
}

/* Terms note */
.auth-terms-note {
    font-size: 0.76rem;
    color: #64748B;
    line-height: 1.45;
    text-align: center;
    margin-top: 2px;
}

.auth-terms-note a {
    color: #0D72D6;
    text-decoration: underline;
}

.auth-terms-note a:hover {
    color: #0959A8;
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 18px;
    line-height: 1.4;
}

.auth-alert-error {
    background-color: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
}

.auth-alert-success {
    background-color: #ECFDF5;
    border: 1px solid #6EE7B7;
    color: #065F46;
}

/* Card Footer switch */
.auth-card-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.88rem;
    color: #64748B;
}

.auth-card-footer a {
    color: #0D72D6;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.auth-card-footer a:hover {
    text-decoration: underline;
}

/* Outer Back Link */
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    font-size: 0.84rem;
    font-weight: 500;
    color: #64748B;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-back-link:hover {
    color: #0D72D6;
}

.auth-back-link svg {
    width: 15px;
    height: 15px;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-viewport {
        padding: 24px 16px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 12px;
    }

    .auth-card-title {
        font-size: 1.35rem;
    }
}
