body, body .ui-widget {
    font-family: merkur-sans-light, sans-serif !important;
}

.login-body {
    background-color: rgb(237 237 237);
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
}

.layout-container {
    display: flex;
    height: 100vh;
    align-items: center;
}

.left-column {
    flex: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 60px;
    background-color: rgb(237 237 237);
    position: relative;
    height: 100vh;
}

.spacer {
    width: 3px; 
    background-color: white;
    height: 70vh; 
    align-self: center; 
}

.right-column {
    flex: 8;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    height: 100vh;
}

.right-column img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-logo {
    text-align: center;
}

.brand-logo img {
    width: 100%
}

.login-container {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.login-title {
    display: none;
}

.input-with-icon {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    right: 0;
    bottom: 1px;
    color: #ffffff;
    background: #022052;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 1.71rem;
}

.ui-inputfield {
    width: 100%;
    padding: 14px 45px 14px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.ui-inputfield:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.ui-button {
    width: 100%;
    padding: 5px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.ui-button:hover {
    background-color: #2980b9;
}

.ui-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.language-selector-left {
    
}

.forgot-password-container {
    text-align: right;
    margin-bottom: 20px;
    margin-top: .5rem;
}

.forgot-password-container a {
    text-decoration: underline;
}

.remove-padding {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.remove-padding-bot {
    padding-bottom: 0 !important;
}

.marg-bot {
    margin-bottom: 5px;
}

.forgot-password-link {
    font-size: 1.2rem !important
}
.ui-dialog .ui-dialog-titlebar-close, .ui-dialog .ui-dialog-titlebar-minimize, .ui-dialog .ui-dialog-titlebar-maximize {
    margin-top:0 !important
}

.ui-messages-info-icon, .ui-messages-warn-icon, .ui-messages-error-icon, .ui-messages-fatal-icon {
    width: auto !important;
    height: auto !important
}

body .ui-dialog .ui-dialog-titlebar .ui-dialog-title {
    font-size: 1.6rem !important
}

.auth-panel {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.input-label {
    display: block;
    margin-bottom: 18px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 1.5rem;
}

.font-config {
    font-size: 1.2rem !important
}

body .ui-inputfield {
    padding: 1.2rem .5rem !important;
}

.ui-inputfield:-webkit-autofill,
.ui-inputfield:-webkit-autofill:hover,
.ui-inputfield:-webkit-autofill:focus,
.ui-inputfield:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #2c3e50 !important;
    background-color: white !important;
}

.forgot-dialog {
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    overflow: hidden;
}

body .ui-dialog .ui-dialog-titlebar {
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 9;
    padding: 1rem 1.5rem !important
}

.forgot-dialog .ui-dialog-content {
    padding: 0 !important;
    background-color: #f8fafc;
}

.forgot-panel {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 24px !important;
}

.forgot-form {
    width: 100%;
}

.forgot-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.forgot-icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.forgot-instructions {
    text-align: center;
    margin-bottom: 25px;
    color: #5a6c7d;
    line-height: 1.5;
    font-size: 15px;
}

.forgot-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
}

.forgot-input-container {
    position: relative;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forgot-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7b8a9a;
    font-size: 16px;
    z-index: 2;
}

.forgot-input {
    width: 100%;
    padding: 14px 14px 14px 42px;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    font-size: 15px;
    background-color: white;
    transition: all 0.3s;
    box-sizing: border-box;
}

.forgot-input-container input {
    padding: .75rem 2.6rem !important;
}

.forgot-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.forgot-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.forgot-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.forgot-button:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    box-shadow: 0 6px 8px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.forgot-button:active {
    transform: translateY(0);
}

.forgot-message {
    margin: 0 !important;
    font-size: 1.2rem !important;
}

.forgot-message > div {
    display: flex;
    align-items: center
}

.success-dialog {
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    overflow: hidden;
}

.success-dialog .ui-dialog-titlebar {
    padding: 16px 20px !important;
    border: none !important;
    border-radius: 0 !important;
    font-weight: 600;
    font-size: 18px;
}

.success-dialog .ui-dialog-content {
    padding: 0 !important;
    background-color: #f8fafc;
}

.success-panel {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 24px !important;
    text-align: center;
}

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.success-icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

.success-message {
    margin-bottom: 25px;
    color: #2c3e50;
    line-height: 1.5;
    font-size: 1.3rem;
}

.success-button {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(46, 204, 113, 0.2);
}

.success-button:hover {
    background: linear-gradient(135deg, #27ae60, #219653);
    box-shadow: 0 6px 8px rgba(46, 204, 113, 0.3);
}

.forgot-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.forgot-header .forgot-icon {
    margin-right: 15px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.forgot-header .forgot-instructions {
    margin-bottom: 0;
    text-align: left;
    flex: 1;
}

/* Message alignment fixes */
body .ui-messages.ui-widget .ui-messages-fatal.ui-corner-all {
    display: flex !important;
    align-items: center !important;
    padding: 1rem 1.5rem !important;
}

body .ui-messages.ui-widget .ui-messages-fatal.ui-corner-all ul {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

body .ui-messages.ui-widget .ui-messages-fatal.ui-corner-all li {
    display: flex !important;
    align-items: center !important;
}

body .ui-messages.ui-widget .ui-messages-fatal.ui-corner-all .ui-messages-fatal-icon {
    margin-top: 0 !important;
    margin-right: 8px !important;
    align-self: center !important;
    width: auto !important;
    height: auto !important;
    color: #ef5350;
    font-size: 16px;
}

#forgotForm .ui-messages>div {
    padding: 1.5rem 1.5rem !important;
}

/* ========== SMALL MOBILE DEVICES (phones under 768px) ========== */
@media (max-width: 767px) {
    .layout-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .left-column {
        flex: 1;
        padding: 30px 10px;
        height: auto;
        justify-content: flex-start;
        min-height: 100vh;
    }

    .spacer {
        display: none;
    }

    .right-column {
        display: none;
    }

    /* Mobile dialog fixes */
    .forgot-dialog, 
    .success-dialog {
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        max-width: none !important;
        max-height: none !important;
    }

    .ui-dialog .ui-dialog-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 60px 0 0 0 !important;
    }

    .forgot-panel,
    .success-panel {
        padding: 20px 15px !important;
        min-height: auto;
    }

    .forgot-input-container {
        margin-bottom: 15px;
    }

    .forgot-input {
        font-size: 16px !important;
        padding: 14px 14px 14px 45px !important;
    }

    .forgot-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 20px;
    }

    .forgot-header .forgot-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .forgot-header .forgot-instructions {
        text-align: center;
        font-size: 14px;
    }

    .forgot-button,
    .success-button {
        padding: 16px;
        font-size: 16px;
        min-height: 50px;
        margin-top: 15px;
    }

    #forgotForm .ui-messages>div {
        padding: 1rem !important;
    }
    body .ui-messages.ui-widget .ui-messages-fatal.ui-corner-all, body .ui-messages>div {
        padding: .8rem 0.4rem !important
    }
    .input-icon {
        bottom: 1pt;
    }
}

/* ========== LANDSCAPE MODE FOR SMALL MOBILES ========== */
@media (max-width: 767px) and (orientation: landscape) {
    .ui-dialog .ui-dialog-content {
        padding: 50px 0 0 0 !important;
    }

    .forgot-panel,
    .success-panel {
        padding: 15px 10px 80px 10px !important;
    }

    .forgot-grid {
        border-spacing: 0 8px;
    }

    .forgot-input-container {
        margin-bottom: 8px;
    }

    .forgot-input {
        padding: 10px 10px 10px 40px !important;
        font-size: 14px !important;
    }

    .forgot-header {
        margin-bottom: 10px;
        flex-direction: row;
    }

    .forgot-header .forgot-icon {
        margin-right: 10px;
        margin-bottom: 0;
    }

    .forgot-header .forgot-instructions {
        font-size: 12px;
        text-align: left;
        line-height: 1.3;
    }

    .forgot-icon-circle {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .forgot-button {
        padding: 12px;
        font-size: 14px;
        min-height: 44px;
        margin-top: 10px;
        position: sticky;
        bottom: 10px;
    }
}

/* ========== TABLET DEVICES (iPads) ========== */
@media (min-width: 768px) and (max-width: 1024px) {
    .forgot-dialog, 
    .success-dialog {
        width: 500px !important;
        max-width: 90% !important;
    }
    
    .ui-dialog .ui-dialog-content {
        position: static !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
    }
    .left-column {
        flex: 10;
    }
    
}

@media only screen 
and (min-device-width: 768px) 
and (max-device-width: 1024px) 
and (orientation: portrait) 
and (-webkit-min-device-pixel-ratio: 1) {
    .right-column {
        display: none;
    }
    
    .spacer {
        display: none;
    }
    
    .layout-container {
        flex-direction: column;
    }
    
    .left-column {
        width: 100%;
        flex: none;
        padding: 50px 30px;
    }
}

body .ui-panel .ui-panel-content {
    border: 2px solid #dee2e6
}
/* ========== FIX PRIMEFACES OVERLAY AND SCROLLING ========== */
.ui-widget-overlay.ui-dialog-mask {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1000 !important;
}

/* Ensure body doesn't scroll when modal is open */
body.ui-dialog-open {
    overflow: hidden !important;
}

/* Fix for dialog positioning */
.ui-dialog {
    position: fixed !important;
    z-index: 1001 !important;
}

/* Specific fix for PrimeFaces dialog content */
.ui-dialog-content {
    box-sizing: border-box !important;
}
body .ui-messages .ui-messages-warn {
    display: flex;
    align-items: center;
}