/* ============================================================
   signin.css — Premium Clean SaaS Login & Auth Screens
   Palette:
     Background:   #F4F7FC
     Card:         #FFFFFF
     Left Panel:   #F8FAFD
     Primary:      #174EA6
     PPS Navy:     #132649
     Green:        #0ABB87
     Input:        #F8FAFD
     Border:       #E2E8F0
     Input Focus:  #EAF2FF
   ============================================================ */

.signin-container {
    width: 100%;
    max-width: 950px;
    display: flex;
    flex-direction: row-reverse; /* In RTL: right is brand/features, left is form */
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 40px -8px rgba(19, 38, 73, 0.08), 0 0 0 1px #E2E8F0;
    background: #FFFFFF;
    margin: auto;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

/* ============================================================
   BRAND / SHOWCASE PANEL (Right Side in RTL)
   ============================================================ */
.signin-brand {
    flex: 1.05;
    background: #F8FAFD;
    border-right: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 32px 16px;
    position: relative;
    overflow: hidden;
}

/* Top-right decorative swoosh curves */
.brand-corner-decor {
    position: absolute;
    top: 0;
    right: 0;
    width: 130px;
    height: 130px;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.brand-corner-decor svg {
    width: 100%;
    height: 100%;
}

.signin-brand-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
    justify-content: space-between;
}

.signin-brand .brand-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--auth-primary, #174EA6);
    margin: 2px 0 2px;
    letter-spacing: -0.5px;
}

.signin-brand .brand-subtitle {
    font-size: 13.5px;
    font-weight: 700;
    color: #132649;
    margin: 0 0 14px;
}

/* Features List */
.signin-brand .sb-features {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 100%;
    max-width: 380px;
    margin-bottom: 8px;
}

.sb-feature-row {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Text on left, icon badge on right */
    gap: 12px;
    padding: 2px 0;
}

.sb-feature-text {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-align: right;
    line-height: 1.35;
}

.sb-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Distinct pastel badge colors */
.sb-icon-blue {
    background: #EAF2FF;
    color: #174EA6;
}

.sb-icon-teal {
    background: #E6FBF5;
    color: #0ABB87;
}

.sb-icon-indigo {
    background: #EEF2FF;
    color: #4338CA;
}

.sb-icon-green {
    background: #E8F5E9;
    color: #2E7D32;
}

/* Dashboard Artwork - Enlarged and Harmonious */
.sb-illustration-wrap {
    width: 100%;
    max-width: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 8px;
}

.sb-illustration-img {
    width: 100%;
    max-height: 190px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(19, 38, 73, 0.06));
}

/* Brand Footer */
.sb-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
    width: 100%;
    padding-top: 4px;
}

.sb-footer i {
    color: #0ABB87;
    font-size: 14px;
}

/* ============================================================
   FORM PANEL (Left Side in RTL)
   ============================================================ */
.signin-form-panel {
    flex: 1;
    background: #FFFFFF;
    padding: 22px 36px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Top PPS Logo & Simplified Circular Frame */
.signin-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px; /* Reduced gap */
    gap: 4px;
}

.signin-logo-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.signin-logo-circle:hover {
    transform: scale(1.03);
    border-color: var(--auth-primary, #174EA6);
}

.signin-logo-circle img,
.signin-logo-img {
    width: 60px;
    height: 60px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.signin-brand-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.signin-brand-name {
    font-size: 18px;
    font-weight: 900;
    color: #132649;
    letter-spacing: -0.3px;
    line-height: 1.1;
}

.signin-brand-sub {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.2px;
}

/* Greeting */
.signin-greeting {
    margin-bottom: 12px; /* Balanced spacing */
    text-align: center;
}

.signin-greeting h2 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.signin-greeting p {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
}

/* Form Fields - Light #F8FAFD background and #EAF2FF focus */
.signin-field {
    margin-bottom: 11px; /* Balanced spacing */
}

.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #132649;
    margin-bottom: 4px;
    text-align: right;
}

.auth-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.auth-field-wrap:focus-within .auth-field-icon {
    color: var(--auth-primary, #174EA6);
}

.auth-input {
    width: 100%;
    height: 42px !important;
    border: 1.5px solid #E2E8F0 !important;
    border-radius: 10px !important;
    padding: 6px 38px 6px 12px !important;
    font-size: 13px !important;
    color: #0f172a !important;
    background: #F8FAFD !important;
    outline: none !important;
    transition: all 0.2s ease-in-out !important;
    box-sizing: border-box !important;
}

.auth-input.has-left-icon {
    padding-left: 36px !important;
}

.auth-input::placeholder {
    color: #94a3b8;
    font-size: 12.5px;
}

.auth-input:focus {
    background: #EAF2FF !important;
    border-color: var(--auth-primary, #174EA6) !important;
    box-shadow: 0 0 0 3px rgba(23, 78, 166, 0.15) !important;
}

.auth-left-chevron {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #94a3b8;
    pointer-events: none;
}

.auth-toggle-pw {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 17px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s;
}

.auth-toggle-pw:hover {
    color: var(--auth-primary, #174EA6);
}

/* Extras: Remember + Forgot */
.signin-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 12px;
    font-size: 12px;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #334155;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}

.remember-check input {
    accent-color: var(--auth-primary, #174EA6);
    width: 14px;
    height: 14px;
    cursor: pointer;
    border-radius: 3px;
}

.forgot-link {
    font-size: 12px;
    color: var(--auth-primary, #174EA6);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.15s, opacity 0.15s;
}

.forgot-link:hover {
    color: var(--auth-primary-dark, #0d3c89);
    text-decoration: underline;
}

/* Submit Button - #174EA6 with darker hover */
.auth-btn-primary {
    width: 100%;
    height: 44px;
    background: var(--auth-primary, #174EA6);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(23, 78, 166, 0.25);
    transition: all 0.2s ease;
    text-decoration: none;
}

.auth-btn-primary:hover {
    background: var(--auth-primary-dark, #0d3c89);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(23, 78, 166, 0.35);
    color: #ffffff;
}

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

.auth-btn-primary i {
    font-size: 17px;
}

/* Error Alert */
.auth-error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: authShake 0.4s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* Form Footer */
.signin-form-footer {
    margin-top: 10px;
    text-align: center;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    line-height: 1.4;
}

.signin-new-company {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

.signin-new-company a {
    color: var(--auth-primary, #174EA6);
    font-weight: 700;
    text-decoration: none;
    margin-right: 4px;
}

.signin-new-company a:hover {
    text-decoration: underline;
}

/* ============================================================
   OTP & FORGOT PASSWORD COMPONENTS
   ============================================================ */
.otp-digit-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr;
    margin: 18px 0 14px;
}

.otp-digit-inputs input {
    width: 50px;
    height: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    background: #F8FAFD;
    color: #0f172a;
}

.otp-digit-inputs input:focus {
    border-color: var(--auth-primary, #174EA6);
    background: #EAF2FF;
    box-shadow: 0 0 0 3px rgba(23, 78, 166, 0.15);
}

.otp-timer-row {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    text-align: center;
}

.otp-timer-row a {
    color: var(--auth-primary, #174EA6);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.otp-timer-row a:hover {
    text-decoration: underline;
    color: var(--auth-primary-dark, #0d3c89);
}

.fp-step {
    display: none;
}

.fp-step.active {
    display: block;
    animation: authFadeIn 0.3s ease;
}

.fp-success-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ABB87, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 8px 20px rgba(10, 187, 135, 0.25);
}

.fp-success-icon i {
    font-size: 34px;
    color: #ffffff;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE PHONES)
   ============================================================ */
@media (max-width: 900px) {
    .signin-container {
        max-width: 720px;
    }
    .signin-brand {
        padding: 20px 22px 14px;
    }
    .signin-form-panel {
        padding: 20px 26px 16px;
    }
    .sb-illustration-wrap {
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .signin-container {
        flex-direction: column !important;
        max-width: 440px !important;
        width: 100% !important;
        min-height: auto !important;
        border-radius: 20px !important;
        box-shadow: 0 12px 35px rgba(19, 38, 73, 0.08) !important;
        margin: 16px auto !important;
    }

    /* Hide showcase illustration on mobile */
    .signin-brand {
        display: none !important;
    }

    .signin-form-panel {
        padding: 24px 20px 20px !important;
        width: 100% !important;
        border-radius: 20px !important;
    }

    .signin-greeting {
        margin-bottom: 14px !important;
    }

    .signin-greeting h2 {
        font-size: 19px !important;
    }

    .auth-input {
        height: 44px !important;
        font-size: 13.5px !important;
    }

    .auth-btn-primary {
        height: 46px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 380px) {
    .signin-form-panel {
        padding: 18px 14px 16px !important;
    }
}
