/* ==========================================================================
   invoiceDiary - Modern Authentication Suite Stylesheet
   Matches exact brand design mockup (Smart Billing. Better Business.)
   Optimized compact scale (zoom-out) so the entire page & desk are visible
   ========================================================================== */

:root {
    --auth-primary: #0052cc;
    --auth-primary-hover: #0747a6;
    --auth-primary-light: #e9f2ff;
    --auth-text-main: #0f172a;
    --auth-text-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-border-focus: #0052cc;
    --auth-bg-input: #ffffff;
    --auth-shadow-card: 0 20px 45px -10px rgba(15, 23, 42, 0.14), 0 0 1px rgba(15, 23, 42, 0.08);
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    background-color: #f8fafc;
    -webkit-font-smoothing: antialiased;
}

/* Fullscreen Canvas showing desk background with split brand pane & card */
.auth-page-wrapper {
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 10% 30px 16%; /* shifted more towards the center-right */
    box-sizing: border-box;
    background-color: #f1f5f9;
    background-image: url('/images/auth-bg.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%; /* Complete clean office desk canvas */
    overflow-x: hidden;
}

/* ==========================================================================
   Brand Left Panel (Fully customizable HTML/CSS: Logo, Headings, Bullets)
   Shifted upwards and rightwards into the clean open white area
   ========================================================================== */
.auth-brand-pane {
    max-width: 480px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding-right: 20px;
    align-self: flex-start;
    margin-top: clamp(20px, 4.5vh, 48px); /* shifted to upper white background */
    margin-left: clamp(35px, 5vw, 80px); /* shifted further rightwards */
    animation: authFadeIn 0.4s ease-out;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
}

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

.auth-brand-title {
    font-size: 2.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 0 0 0.6rem 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.auth-brand-subtitle {
    font-size: 0.95rem;
    font-weight: 450;
    color: #475569;
    line-height: 1.45;
    margin: 0 0 1rem 0;
    max-width: 420px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.65rem; /* compact spacing */
}

.auth-feature-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-feature-icon-box {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0066cc;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.auth-feature-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}

/* Large Screens */
@media (min-width: 1500px) {
    .auth-page-wrapper {
        padding: 30px 12% 30px 10%;
    }

    .auth-brand-title {
        font-size: 2.9rem;
    }
}

/* Tablet / Mid-screen adjustments */
@media (min-width: 992px) and (max-width: 1250px) {
    .auth-page-wrapper {
        padding: 20px 5% 20px 5%;
    }

    .auth-brand-pane {
        max-width: 440px;
    }

    .auth-brand-title {
        font-size: 2.2rem;
    }

    .auth-brand-subtitle {
        font-size: 0.95rem;
    }
}

/* Mobile & Small Screens (< 992px) */
@media (max-width: 991px) {
    .auth-page-wrapper {
        background-image: none;
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
        justify-content: center;
        padding: 24px 14px;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .auth-brand-pane {
        display: none;
    }
}

/* Mobile Branding Header */
.auth-mobile-header {
    display: none;
    text-align: center;
    margin-bottom: 16px;
}

@media (max-width: 991px) {
    .auth-mobile-header {
        display: block;
    }
}

.auth-mobile-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    margin-bottom: 6px;
}

.auth-mobile-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.auth-mobile-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 3px;
}

/* Floating White Authentication Card (Unified Fixed Size matching Create Account) */
.auth-card,
.auth-card.auth-card-wide {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.14), 0 0 1px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 26px 26px 22px 26px;
    width: 440px !important;
    max-width: 100% !important;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    animation: authFadeIn 0.35s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Top Centered Logo (Clean, unclipped, no border box) */
.auth-logo-badge {
    width: auto;
    height: auto;
    border: none !important;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
    padding: 0;
    box-sizing: border-box;
}

    .auth-logo-badge img {
        width: auto;
        height: 80px;
        max-width: 100%;
        object-fit: contain;
        display: block;
    }

/* Titles */
.auth-title {
    font-size: 1.38rem;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    text-align: center;
    margin: 0 0 18px 0;
    font-weight: 400;
}

/* Form Groups */
.auth-form-group {
    margin-bottom: 12px;
    position: relative;
}

.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

    .auth-label .required-star {
        color: #ef4444;
        margin-left: 2px;
    }

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

@media (max-width: 500px) {
    .auth-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Input Wrapper with Left/Right Icons */
.auth-input-wrapper {
    position: relative;
    width: 100%;
}

.auth-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input {
    width: 100%;
    height: 40px;
    padding: 8px 12px 8px 36px;
    border: 1.5px solid var(--auth-border);
    border-radius: 8px;
    font-size: 0.86rem;
    color: var(--auth-text-main);
    background-color: var(--auth-bg-input);
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

    .auth-input::placeholder {
        color: #94a3b8;
        font-weight: 400;
    }

    .auth-input:focus {
        outline: none;
        border-color: #0052cc;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
    }

.auth-input-wrapper:focus-within .auth-input-icon {
    color: #0052cc;
}

/* Fix Chrome Autofill blue background */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Password Visibility Toggle Eye */
.auth-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 3px;
    transition: color 0.15s ease;
}

    .auth-password-toggle:hover {
        color: #0f172a;
    }

/* Remember Me & Forgot Password Row */
.auth-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 16px;
    font-size: 0.8rem;
}

.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.auth-checkbox {
    width: 15px;
    height: 15px;
    accent-color: #0052cc;
    cursor: pointer;
    border-radius: 4px;
    margin: 0;
}

.auth-link {
    color: #0052cc;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

    .auth-link:hover {
        color: #0747a6;
        text-decoration: underline;
    }

/* Primary Action Button (Sign In / Create Account) */
.auth-btn-primary {
    width: 100%;
    height: 42px;
    background: #0052cc !important;
    background-color: #0052cc !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.25);
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
}

    .auth-btn-primary:hover {
        background: #0747a6 !important;
        background-color: #0747a6 !important;
        color: #ffffff !important;
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(0, 82, 204, 0.32);
    }

    .auth-btn-primary:active {
        transform: translateY(0);
    }

    .auth-btn-primary:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        transform: none;
    }

/* Secondary Button */
.auth-btn-secondary {
    width: 100%;
    height: 38px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
    margin-top: 8px;
    font-family: inherit;
}

    .auth-btn-secondary:hover {
        background: #e2e8f0;
        color: #1e293b;
    }

/* Card Footer Link */
.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 0.82rem;
    color: #64748b;
}

    .auth-footer a {
        color: #0052cc;
        font-weight: 700;
        text-decoration: none;
        margin-left: 4px;
    }

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

/* Alert Notification Styling */
.auth-alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.auth-alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.auth-alert-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

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

/* Validation Feedback */
.field-validation-error {
    color: #dc2626;
    font-size: 0.76rem;
    font-weight: 500;
    margin-top: 3px;
    display: block;
}

/* OTP Verification UI */
.otp-container {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px 14px;
    margin: 14px 0;
    text-align: center;
}

.otp-inputs-grid {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 10px 0 8px 0;
}

.otp-box {
    width: 38px;
    height: 46px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0052cc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .otp-box:focus {
        outline: none;
        border-color: #0052cc;
        box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15);
        background: #ffffff;
    }

.otp-timer-text {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 8px;
}

.otp-timer-count {
    color: #0052cc;
    font-weight: 700;
}

.hidden {
    display: none !important;
}
