/**
 * BizFlow Pro - Authentication Page Styles
 * Login, Register, Forgot Password & Reset Password
 *
 * @package BizFlow_Pro
 * @version 1.0.0
 */

/* ============================================
   AUTH PAGE WRAPPER
   ============================================ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    background: var(--gray-50);
}

.auth-page-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
    background: var(--white);
}

/* ============================================
   LEFT PANEL - BRANDING
   ============================================ */

.auth-left-panel {
    position: relative;
    overflow: hidden;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Default gradient (overridden by PHP for theme colors) */
.auth-left-panel:not(.register-left) {
    background: linear-gradient(
        135deg,
        #1E40AF 0%,
        #1D4ED8 40%,
        #0D9488 100%
    );
}

/* Background layers */
.auth-left-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, .1) 0%,
        transparent 50%,
        rgba(0, 0, 0, .08) 100%
    );
}

.auth-bg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

.auth-bg-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-bg-circle-1 {
    width: 450px;
    height: 450px;
    background: rgba(255, 255, 255, .06);
    top: -150px;
    right: -100px;
    animation: circleFloat 8s ease-in-out infinite;
}

.auth-bg-circle-2 {
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, .04);
    bottom: -80px;
    left: -60px;
    animation: circleFloat 10s ease-in-out infinite reverse;
}

@keyframes circleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(12px, -18px) scale(1.04); }
    66%       { transform: translate(-8px, 10px) scale(.97); }
}

/* Left content */
.auth-left-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1.75rem;
}

/* Auth Logo */
.auth-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    width: fit-content;
    transition: opacity .2s ease;
}

.auth-logo:hover {
    opacity: .85;
    text-decoration: none;
}

.auth-logo-icon {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .2s ease;
    flex-shrink: 0;
}

.auth-logo:hover .auth-logo-icon {
    background: rgba(255, 255, 255, .3);
}

.auth-logo-text {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--white);
    font-family: var(--font-heading);
    letter-spacing: -.01em;
}

/* Left Headline */
.auth-left-headline {
    flex: 0;
}

.auth-left-headline h1 {
    font-size: clamp(1.375rem, 2vw, 1.875rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.25;
    margin-bottom: .625rem;
    font-family: var(--font-heading);
}

.auth-left-headline p {
    font-size: .9375rem;
    color: rgba(255, 255, 255, .75);
    margin: 0;
    line-height: 1.6;
}

/* Auth Features */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: .875rem;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--radius-xl);
    padding: .875rem 1.125rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all .2s ease;
}

.auth-feature-item:hover {
    background: rgba(255, 255, 255, .16);
    transform: translateX(4px);
}

.auth-feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 34px;
    text-align: center;
    line-height: 1;
}

.auth-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-feature-text strong {
    font-size: .875rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
}

.auth-feature-text span {
    font-size: .75rem;
    color: rgba(255, 255, 255, .65);
    line-height: 1.3;
}

/* Auth Testimonial */
.auth-testimonial {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-2xl);
    padding: 1.25rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-top: auto;
}

.auth-testimonial-text {
    font-size: .875rem;
    color: rgba(255, 255, 255, .9);
    font-style: italic;
    line-height: 1.65;
    margin-bottom: 1rem;
    position: relative;
}

.auth-testimonial-text::before {
    content: '"';
    font-size: 3rem;
    color: rgba(255, 255, 255, .2);
    position: absolute;
    top: -1rem;
    left: -0.5rem;
    font-family: Georgia, serif;
    line-height: 1;
}

.auth-testimonial-author {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

.auth-testimonial-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 800;
    color: var(--white);
    flex-shrink: 0;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, .3);
}

.auth-testimonial-author strong {
    display: block;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
}

.auth-testimonial-author span {
    font-size: .7rem;
    color: rgba(255, 255, 255, .65);
    line-height: 1.3;
}

.auth-testimonial-stars {
    color: #FCD34D;
    font-size: .9375rem;
    letter-spacing: 3px;
}

/* Auth Stats */
.auth-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.auth-stat {
    text-align: center;
}

.auth-stat strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
    margin-bottom: 3px;
    font-family: var(--font-heading);
}

.auth-stat span {
    font-size: .6875rem;
    color: rgba(255, 255, 255, .6);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}

.auth-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, .2);
    flex-shrink: 0;
}

/* ============================================
   RIGHT PANEL - FORM
   ============================================ */

.auth-right-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2.5rem;
    background: var(--white);
    overflow-y: auto;
    min-height: 100vh;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
    padding: .5rem 0;
}

/* Mobile Logo (hidden on desktop) */
.auth-mobile-logo {
    display: none;
    margin-bottom: 2rem;
}

.auth-mobile-logo a {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}

.auth-mobile-logo a:hover { text-decoration: none; }

/* Form Header */
.auth-form-header {
    margin-bottom: 1.875rem;
}

.auth-form-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: .375rem;
    font-family: var(--font-heading);
    line-height: 1.2;
    letter-spacing: -.01em;
}

.auth-form-subtitle {
    font-size: .9375rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   AUTH FORM FIELDS
   ============================================ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: .125rem;
}

.auth-form .form-group {
    margin-bottom: 1.125rem;
}

/* Form label row */
.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.form-label-row .form-label {
    margin-bottom: 0;
}

/* Forgot password link */
.forgot-password-link {
    font-size: .8125rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
    white-space: nowrap;
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Input with icon */
.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: .875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    z-index: 1;
    transition: color .15s ease;
    flex-shrink: 0;
}

.form-control.with-icon {
    padding-left: 2.75rem;
}

.form-control.with-icon-right {
    padding-right: 2.75rem;
}

/* Icon color on focus */
.input-icon-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

/* Password toggle */
.password-toggle-btn {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: var(--radius-md);
    transition: color .15s ease, background .15s ease;
    z-index: 2;
    line-height: 1;
}

.password-toggle-btn:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

.eye-icon {
    display: block;
    flex-shrink: 0;
}

/* Form inline (checkbox row) */
.form-group-inline {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
}

/* Rate limit warning */
.rate-limit-warning {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .2);
    border-radius: var(--radius-lg);
    color: var(--danger-color);
    font-size: .8125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    animation: fadeIn .3s ease;
}

/* ============================================
   AUTH SUBMIT BUTTON
   ============================================ */

.auth-submit-btn {
    width: 100%;
    height: 52px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
    margin-top: .375rem;
    position: relative;
    overflow: hidden;
    transition: all .25s ease;
}

.auth-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background .2s ease;
}

.auth-submit-btn:hover::after {
    background: rgba(255, 255, 255, .08);
}

.btn-content,
.btn-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

/* Success state */
.auth-submit-btn.btn-success-state {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    transform: none !important;
    pointer-events: none;
}

/* ============================================
   SOCIAL LOGIN
   ============================================ */

.auth-social-section {
    margin-top: 1.5rem;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin-bottom: 1.125rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
    transform: translateY(-50%);
}

.auth-divider span {
    position: relative;
    background: var(--white);
    padding: 0 .875rem;
    font-size: .8125rem;
    color: var(--gray-400);
    font-weight: 500;
}

.auth-social-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .6875rem .75rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    color: var(--gray-700);
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    font-family: var(--font-primary);
    text-decoration: none;
}

.btn-social:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.btn-social:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-social svg {
    flex-shrink: 0;
}

/* Social brand hover colors */
.btn-google:hover  { border-color: #4285F4; color: #4285F4; background: rgba(66, 133, 244, .04); }
.btn-github:hover  { border-color: #333;    color: #333;    background: rgba(51, 51, 51, .04); }
.btn-linkedin:hover { border-color: #0A66C2; color: #0A66C2; background: rgba(10, 102, 194, .04); }

/* ============================================
   AUTH SWITCH LINK
   ============================================ */

.auth-switch-link {
    text-align: center;
    margin-top: 1.75rem;
}

.auth-switch-link p {
    font-size: .9375rem;
    color: var(--gray-500);
    margin: 0;
}

.auth-switch-anchor {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    transition: all .15s ease;
    border-bottom: 1px solid transparent;
}

.auth-switch-anchor:hover {
    color: var(--primary-dark);
    text-decoration: none;
    border-bottom-color: var(--primary-color);
}

.auth-switch-anchor svg {
    transition: transform .2s ease;
}

.auth-switch-anchor:hover svg {
    transform: translateX(3px);
}

/* ============================================
   TRUST BADGES
   ============================================ */

.auth-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.auth-trust-item {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .75rem;
    color: var(--gray-400);
    font-weight: 500;
    white-space: nowrap;
}

.auth-trust-item svg {
    color: var(--secondary-color);
    flex-shrink: 0;
}

/* ============================================
   PLAN BADGE (Register page)
   ============================================ */

.register-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(16, 185, 129, .08));
    border: 1px solid rgba(37, 99, 235, .2);
    border-radius: var(--radius-full);
    padding: .5rem 1.125rem;
    font-size: .875rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.plan-badge-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ============================================
   REGISTER PROGRESS BAR
   ============================================ */

.register-progress {
    margin-bottom: 1.75rem;
}

.progress-steps {
    display: flex;
    align-items: center;
    margin-bottom: .625rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .375rem;
    flex-shrink: 0;
}

.progress-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .35s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    z-index: 1;
}

.progress-step.active .progress-step-circle {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}

.progress-step.completed .progress-step-circle {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}

.step-num {
    font-size: .8125rem;
    font-weight: 700;
    color: var(--gray-400);
    transition: color .3s ease;
    line-height: 1;
}

.progress-step.active .step-num {
    color: var(--white);
}

.progress-step.completed .step-num {
    display: none;
}

.step-check {
    display: none;
    color: var(--white);
}

.progress-step.completed .step-check {
    display: block !important;
}

.progress-step-label {
    font-size: .6875rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    transition: color .3s ease;
}

.progress-step.active .progress-step-label {
    color: var(--primary-color);
}

.progress-step.completed .progress-step-label {
    color: var(--secondary-color);
}

.progress-step-line {
    flex: 1;
    height: 2px;
    background: var(--gray-200);
    margin: 0 .5rem;
    margin-bottom: 1.375rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-full);
}

.progress-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--secondary-color);
    border-radius: var(--radius-full);
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

/* Progress bar track */
.progress-bar-track {
    height: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

/* ============================================
   REGISTER FORM GRID
   ============================================ */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Register container (wider than login) */
.register-form-container {
    max-width: 520px;
    padding: .5rem 0;
}

.register-right {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 2rem;
}

/* ============================================
   REGISTER BENEFITS (Left panel)
   ============================================ */

.register-benefits {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--radius-2xl);
    padding: 1.125rem 1.25rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.register-benefits-title {
    font-size: .875rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: .875rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.register-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    font-size: .8125rem;
    color: rgba(255, 255, 255, .88);
    margin-bottom: .5625rem;
    line-height: 1.4;
}

.register-benefit-item:last-child {
    margin-bottom: 0;
}

.benefit-check {
    color: #6EE7B7;
    font-weight: 800;
    flex-shrink: 0;
    font-size: .9375rem;
    line-height: 1.4;
}

/* ============================================
   STEP PREVIEW (Left panel)
   ============================================ */

.register-step-preview {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step-preview-item {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .75rem;
    border-radius: var(--radius-xl);
    transition: all .25s ease;
    opacity: .45;
}

.step-preview-item.active {
    background: rgba(255, 255, 255, .12);
    opacity: 1;
    transform: translateX(4px);
}

.step-preview-item.completed {
    opacity: .75;
}

.step-preview-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8125rem;
    font-weight: 800;
    color: var(--white);
    flex-shrink: 0;
    transition: all .3s ease;
}

.step-preview-item.active .step-preview-number {
    border-color: var(--white);
    background: rgba(255, 255, 255, .2);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .15);
}

.step-preview-item.completed .step-preview-number {
    border-color: #6EE7B7;
    background: #6EE7B7;
    color: #065F46;
    font-weight: 900;
}

.step-preview-text strong {
    display: block;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
}

.step-preview-text span {
    font-size: .7rem;
    color: rgba(255, 255, 255, .65);
    line-height: 1.3;
}

.step-preview-connector {
    width: 2px;
    height: 18px;
    background: rgba(255, 255, 255, .15);
    margin-left: 15px;
}

/* ============================================
   PASSWORD STRENGTH METER
   ============================================ */

.password-strength-wrapper {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .5rem;
    animation: fadeIn .2s ease;
}

.password-strength-bar {
    display: flex;
    gap: 3px;
    flex: 1;
}

.strength-segment {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    transition: background .3s ease;
}

.password-strength-text {
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    min-width: 52px;
    text-align: right;
    transition: color .3s ease;
}

/* Strength levels */
.strength-weak   .strength-segment:nth-child(1)                     { background: var(--danger-color); }
.strength-fair   .strength-segment:nth-child(-n + 2)               { background: var(--accent-color); }
.strength-good   .strength-segment:nth-child(-n + 3)               { background: var(--primary-color); }
.strength-strong .strength-segment:nth-child(-n + 4)               { background: var(--secondary-color); }

/* Password requirements */
.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .375rem;
    margin-top: .5rem;
    padding: .75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    animation: fadeIn .2s ease;
}

.req-item {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .75rem;
    color: var(--gray-400);
    transition: color .2s ease;
    line-height: 1.3;
}

.req-item.met {
    color: var(--secondary-color);
}

.req-icon {
    font-size: .625rem;
    transition: all .2s ease;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.req-item.met .req-icon {
    font-size: .875rem;
    color: var(--secondary-color);
}

/* ============================================
   EMAIL CHECK INDICATOR
   ============================================ */

.email-check-indicator {
    position: absolute;
    right: .875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.email-check-indicator.checking {
    display: flex;
}

.email-check-indicator.checking::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

.email-check-indicator.valid {
    display: flex;
}

.email-check-indicator.valid::after {
    content: '✓';
    font-size: .875rem;
    font-weight: 800;
    color: var(--secondary-color);
    animation: scaleIn .2s ease;
}

.email-check-indicator.invalid {
    display: flex;
}

.email-check-indicator.invalid::after {
    content: '✕';
    font-size: .875rem;
    font-weight: 800;
    color: var(--danger-color);
    animation: scaleIn .2s ease;
}

/* ============================================
   INVOICE PREFIX PREVIEW
   ============================================ */

.prefix-input-wrapper {
    display: flex;
    align-items: center;
    gap: .875rem;
}

.prefix-input-wrapper .form-control {
    max-width: 130px;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: .05em;
}

.prefix-preview {
    font-size: .8125rem;
    color: var(--gray-500);
    white-space: nowrap;
    flex-shrink: 0;
}

.prefix-preview strong {
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-weight: 700;
}

/* ============================================
   STEP NAV BUTTONS
   ============================================ */

.step-nav-buttons {
    display: flex;
    gap: .875rem;
    margin-top: .625rem;
    align-items: center;
}

.step-nav-buttons .btn-outline-gray {
    flex-shrink: 0;
}

.step-nav-buttons .flex-1 {
    flex: 1;
}

.skip-company-btn {
    font-size: .8125rem;
    color: var(--gray-400);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    transition: color .15s ease;
    font-family: var(--font-primary);
    padding: 0;
    display: block;
    text-align: center;
    width: 100%;
    margin-top: .75rem;
}

.skip-company-btn:hover {
    color: var(--gray-600);
}

/* ============================================
   SUCCESS STEP
   ============================================ */

.register-success {
    text-align: center;
    padding: 1rem 0;
}

/* Success animation */
.success-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
}

.success-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop .55s cubic-bezier(.17, .67, .3, 1.33) forwards;
    transform: scale(0);
}

@keyframes successPop {
    0%   { transform: scale(0);   box-shadow: 0 0 0 0 rgba(37, 99, 235, .4); }
    60%  { transform: scale(1.1); box-shadow: 0 0 0 16px rgba(37, 99, 235, 0); }
    80%  { transform: scale(.95); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.success-checkmark {
    stroke-dasharray: 52;
    stroke-dashoffset: 52;
    animation: checkDraw .45s ease .35s forwards;
}

@keyframes checkDraw {
    to { stroke-dashoffset: 0; }
}

/* Confetti */
.success-confetti {
    position: absolute;
    inset: -24px;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    border-radius: 2px;
    animation: confettiFall var(--duration, 2s) ease forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes confettiFall {
    0%   {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx, 60px), var(--dy, -80px)) rotate(720deg) scale(.4);
    }
}

/* Success content */
.success-content {
    margin-bottom: 2rem;
}

.success-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: .625rem;
    font-family: var(--font-heading);
    letter-spacing: -.01em;
}

.success-subtitle {
    font-size: 1rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.6;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

/* Quick start grid */
.quick-start-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .875rem;
    margin-bottom: 2rem;
    text-align: left;
}

.quick-start-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .875rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all .2s ease;
    color: var(--gray-800);
    cursor: pointer;
}

.quick-start-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-xlight);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-start-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    flex-shrink: 0;
    line-height: 1;
}

.quick-start-text {
    flex: 1;
    min-width: 0;
}

.quick-start-text strong {
    display: block;
    font-size: .8125rem;
    font-weight: 700;
    color: inherit;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-start-text span {
    font-size: .7rem;
    color: var(--gray-500);
    line-height: 1.3;
}

.quick-start-item:hover .quick-start-text span {
    color: var(--primary-color);
    opacity: .75;
}

/* Success CTA */
.success-cta {
    margin-bottom: 1.5rem;
}

.success-redirect-note {
    font-size: .8125rem;
    color: var(--gray-400);
    margin: .75rem 0 0;
}

#redirectCountdown {
    font-weight: 800;
    color: var(--primary-color);
}

/* What's next box */
.whats-next {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 1rem 1.25rem;
    text-align: left;
}

.whats-next h4 {
    font-size: .875rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: .375rem;
}

.whats-next p {
    font-size: .8125rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   FORGOT PASSWORD PAGE
   ============================================ */

.forgot-page .auth-form-header {
    margin-bottom: 1.5rem;
}

.forgot-page .auth-form-title {
    font-size: 1.5rem;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .875rem;
    color: var(--gray-500);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color .15s ease;
    font-weight: 500;
}

.back-to-login:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.back-to-login svg {
    transition: transform .2s ease;
}

.back-to-login:hover svg {
    transform: translateX(-3px);
}

/* Forgot password success state */
.forgot-success {
    text-align: center;
    padding: 2rem 1rem;
}

.forgot-success-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    animation: bounceIn .5s ease;
}

@keyframes bounceIn {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

.forgot-success h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: .625rem;
}

.forgot-success p {
    font-size: .9375rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ============================================
   AUTH FOOTER (Minimal)
   ============================================ */

.auth-footer {
    padding: 1.25rem 0;
    border-top: 1px solid var(--gray-100);
    background: var(--white);
}

.auth-footer-inner {
    max-width: 440px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .625rem;
    text-align: center;
}

.auth-footer-copyright {
    font-size: .75rem;
    color: var(--gray-400);
    margin: 0;
}

.auth-footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.auth-footer-links a {
    font-size: .75rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: color .15s ease;
}

.auth-footer-links a:hover {
    color: var(--primary-color);
}

/* ============================================
   FORM VALIDATION STATES
   ============================================ */

/* Invalid field */
.form-control.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.form-control.is-invalid ~ .input-icon {
    color: var(--danger-color);
}

/* Valid field */
.form-control.is-valid {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
}

.form-control.is-valid ~ .input-icon {
    color: var(--secondary-color);
}

/* Shake animation for form errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-5px); }
    30%, 70% { transform: translateX(5px); }
}

.shake {
    animation: shake .5s cubic-bezier(.36, .07, .19, .97) both;
}

/* Error message text */
.form-error {
    display: block;
    font-size: .75rem;
    color: var(--danger-color);
    margin-top: .3125rem;
    font-weight: 500;
    min-height: 1rem;
    animation: fadeIn .2s ease;
}

/* Hint text */
.form-hint {
    display: block;
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: .3125rem;
    line-height: 1.4;
}

/* ============================================
   INPUT FOCUS ANIMATIONS
   ============================================ */

.auth-form .form-control {
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-form .form-control:focus {
    background: var(--white);
    transform: none;
}

/* Input hover state */
.auth-form .form-control:not(:focus):hover {
    border-color: var(--gray-400);
}

/* Checkbox styling */
.auth-form .form-check {
    padding: .125rem 0;
}

.auth-form .form-check-label {
    font-size: .875rem;
    line-height: 1.5;
}

.auth-form .form-check-label a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-form .form-check-label a:hover {
    text-decoration: underline;
}

/* ============================================
   LOADING OVERLAY (Full page)
   ============================================ */

.auth-page-loading {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Desktop: both panels visible */
@media (min-width: 1025px) {
    .auth-right-panel {
        padding: 2.5rem;
    }
}

/* Tablet: hide left panel */
@media (max-width: 1024px) {
    .auth-page-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-left-panel {
        display: none;
    }

    .auth-right-panel {
        align-items: flex-start;
        padding: 2rem 1.5rem;
        padding-top: 3rem;
        min-height: 100vh;
        justify-content: center;
    }

    .auth-mobile-logo {
        display: flex;
    }

    .auth-form-container {
        max-width: 480px;
        width: 100%;
    }

    .register-form-container {
        max-width: 520px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .auth-right-panel {
        padding: 1.5rem 1rem;
        padding-top: 2rem;
    }

    .auth-form-title {
        font-size: 1.5rem;
    }

    .auth-social-buttons {
        grid-template-columns: 1fr;
    }

    .btn-social {
        justify-content: flex-start;
        padding-left: 1.5rem;
    }

    .auth-trust-badges {
        flex-direction: column;
        gap: .625rem;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .quick-start-grid {
        grid-template-columns: 1fr;
    }

    .prefix-input-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .prefix-input-wrapper .form-control {
        max-width: 100%;
        width: 100%;
    }

    .password-requirements {
        grid-template-columns: 1fr;
    }

    .step-nav-buttons {
        flex-direction: column-reverse;
        gap: .625rem;
    }

    .step-nav-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .register-right {
        padding: 1.5rem 1rem;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .progress-step-label { display: none; }
    .auth-form-title { font-size: 1.25rem; }
    .success-title { font-size: 1.5rem; }
    .auth-submit-btn { height: 48px; font-size: .9375rem; }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Uncomment for dark mode support */
    /*
    .auth-right-panel {
        background: #111827;
    }

    .auth-form-container {
        color: var(--white);
    }

    .auth-form-title {
        color: var(--white);
    }

    .form-control {
        background: #1F2937;
        border-color: #374151;
        color: var(--white);
    }
    */
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    .auth-feature-item,
    .auth-testimonial {
        border-width: 2px;
    }

    .progress-step-circle {
        border-width: 3px;
    }

    .form-control {
        border-width: 2px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .auth-bg-circle-1,
    .auth-bg-circle-2 {
        animation: none;
    }

    .success-circle {
        animation: none;
        transform: scale(1);
    }

    .success-checkmark {
        animation: none;
        stroke-dashoffset: 0;
    }

    .confetti-piece {
        animation: none;
    }

    .auth-feature-item:hover {
        transform: none;
    }

    .auth-switch-anchor svg {
        transition: none;
    }

    .quick-start-item:hover {
        transform: none;
    }
}