/* ============================================
   MODERN LOGIN PAGE WITH ORIGINAL FORM CONTROLS
   Fully responsive with enhanced visual design
   ============================================ */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    color: #fff;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    font-family: 'opensans-regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    width: 100vw;
    max-width: 100vw;
}

/* Container - Modern Flexbox with Slide Animation Support */
.container {
    width: 100%;
    max-width: 100%;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Forms Container - Wrapper for slide animation */
.forms-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    min-height: auto;
    margin: 0 auto;
}

/* Ensure all panels stay within bounds */
.forms-container > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Login Form Wrapper - Complete Panel with Glassmorphism */
#login-form-wrapper {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%),
        rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    -moz-border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 16px 0 rgba(0, 0, 0, 0.37),
        0 2px 4px 0 rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
    padding: 30px 50px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, box-shadow 0.3s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

#login-form-wrapper:hover {
    box-shadow:
        0 6px 16px 0 rgba(0, 0, 0, 0.45),
        0 4px 6px 0 rgba(0, 0, 0, 0.25),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
}

#login-form-wrapper.slide-out-left {
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
}

#login-form-wrapper.slide-in-right {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* Login Form Container - Inner wrapper */
.form-signin {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Forgot Password Panel - Enterprise Design */
.forgot-password-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%),
        rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    -moz-border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 16px 0 rgba(0, 0, 0, 0.37),
        0 2px 4px 0 rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
    padding: 30px 50px;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Hide header elements when showing messages */
.forgot-password-panel.showing-message .forgot-icon-wrapper,
.forgot-password-panel.showing-message .forgot-title,
.forgot-password-panel.showing-message .forgot-subtitle {
    display: none;
}

.forgot-password-panel.slide-in {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.forgot-password-panel.slide-out {
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* SSO Redirecting Panel - Subtle Design */
.sso-redirecting-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.sso-redirecting-panel.slide-in {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sso-redirecting-panel.slide-out {
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Redirecting Form Elements */
.redirecting-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.redirecting-icon-wrapper .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.25em;
    border-color: #007bff;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.redirecting-title {
    color: #333;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.2px;
    margin-bottom: 8px;
    text-align: center;
}

.redirecting-subtitle {
    color: #666;
    line-height: 1.5;
    font-size: 13px;
    margin-bottom: 0;
    text-align: center;
}

/* SSO Callback Panel - Similar to redirecting but for callback processing */
.sso-callback-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.sso-callback-panel.slide-in {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sso-callback-panel.slide-out {
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Callback Form Elements */
.callback-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.callback-icon-wrapper .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.25em;
    border-color: #28a745;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

.callback-title {
    color: #333;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.2px;
    margin-bottom: 8px;
    text-align: center;
}

.callback-subtitle {
    color: #666;
    line-height: 1.5;
    font-size: 13px;
    margin-bottom: 0;
    text-align: center;
}

/* Processing state for input fields */
.form-control.processing {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Password Reset Icons with Animation */
.reset-icon-success {
    font-size: 64px;
    color: #28a745;
    animation: iconPulse 0.6s ease;
}

.reset-icon-error {
    font-size: 64px;
    color: #dc3545;
    animation: iconShake 0.5s ease;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes iconShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Enterprise Button Styles for Forms */
.btn-primary {
    background: linear-gradient(135deg, #1174c3 0%, #0d5fa3 100%);
    border: none;
    padding: 7px 24px;
    font-size: 13px;
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(17, 116, 195, 0.3);
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(17, 116, 195, 0.4);
    background: linear-gradient(135deg, #1584d8 0%, #1174c3 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 7px 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
    transform: translateY(0);
}

.form-signin label {
    font-size: 14px;
    display: block;
}

.form-signin .form-group {
    margin-bottom: 15px;
}

.form-signin .form-group label {
    margin-bottom: 6px;
}

/* Enterprise Form Controls */
.form-control {
    color: #2c3e50;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.95);
    height: 30px;
    width: 100%;
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.form-control::placeholder {
    color: #95a5a6;
    font-weight: 400;
}

.form-control:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    outline: none;
}

.form-control:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

/* Enterprise Button Styles */
.btn-login.btn-success,
.btn-login.btn-success:hover {
    background: linear-gradient(135deg, #68c739 0%, #5ab82e 100%);
    border: none;
    margin-top: 4px;
    padding: 7px 18px;
    width: 100%;
    font-size: 13px;
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(104, 199, 57, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-login.btn-success::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-login.btn-success:hover::before {
    width: 350px;
    height: 350px;
}

.btn-login.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(104, 199, 57, 0.4);
}

.btn-login.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(104, 199, 57, 0.3);
}

.btn-login-ex.btn-info {
    background: linear-gradient(135deg, #1174c3 0%, #0d5fa3 100%);
    border: none;
    padding: 7px 18px;
    width: 100%;
    font-size: 13px;
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(17, 116, 195, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-login-ex.btn-info::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-login-ex.btn-info:hover::before {
    width: 350px;
    height: 350px;
}

.btn-login-ex.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(17, 116, 195, 0.4);
}

.btn-login-ex.btn-info:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(17, 116, 195, 0.3);
}

/* Login Icons - Modern Styling */
.ico-login-pmi-auth,
.ico-login-sso-auth {
    display: inline-block;
    vertical-align: middle;
}

/* Spinner Animation */
.login-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes login-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Divider with Modern Look */
.login-divider {
    color: #bbb;
    margin-top: 7px;
    font-size: 13px;
}

h4.heading-border {
    overflow: hidden;
    text-align: center;
    margin: 15px 0;
    font-size: 13px;
    font-weight: normal;
    position: relative;
}

h4.heading-border:before,
h4.heading-border:after {
    background: linear-gradient(90deg, transparent, #6b6b6b, transparent);
    content: "";
    display: inline-block;
    height: 1px;
    position: relative;
    vertical-align: middle;
    width: 35%;
}

h4.heading-border:before {
    right: 0.5em;
    margin-left: -35%;
}

h4.heading-border:after {
    left: 0.5em;
    margin-right: -35%;
}

/* Logo Wrapper with Animation */
.logo-wrapper {
    margin-bottom: 25px;
    text-align: center;
    animation: fadeInDown 0.6s ease;
}

.logo-wrapper.pmi-logo {
    margin-top: 0;
    margin-bottom: 20px;
}

.logo-wrapper img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.pmi-logo img {
    max-width: 240px;
}

/* Quotation styling inside login panel */
#login-form-wrapper .quotation-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    font-style: italic;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#login-form-wrapper .quotation-author {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#login-form-wrapper #quotationHolder {
    margin-bottom: 25px;
}

/* Chain Name */
.chain-name {
    font-size: 26px;
    padding: 0px 0px 30px;
    text-align: center;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Links with Modern Hover Effect */
a.forgot-pass {
    color: #3b7daf;
    text-decoration: none;
    transition: color 0.3s ease;
}

a.forgot-pass:hover {
    color: #68c739;
    text-decoration: underline;
}

.forgot-password-text {
    margin-top: 10px;;
    margin-bottom: 24px;
    animation: fadeIn 0.8s ease;
}

.forgot-password-text a {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 5px 20px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}

.forgot-password-text a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.forgot-password-text a:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Login Wrapper */
.login-wrapper {
    width: 100%;
    animation: fadeInUp 0.6s ease;
}

.login-form-inner {
    max-width: 320px;
    margin: 0 auto;
}

.login-buttons {
    margin-bottom: 40px;
}

/* SSO Table */
.sso-table {
    width: 100%;
    margin-top: 10px;
}

/* Quotation with Modern Typography */
#quotationHolder {
    margin-bottom: 30px;
}

.quotation-wrapper {
    margin-bottom: 45px;
    text-align: center;
    padding: 0 20px;
    animation: fadeIn 1s ease;
}

.quotation-text {
    font-size: 16px;
    font-style: italic;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.quotation-author {
    font-style: italic;
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.9;
}

/* Logos */
.logos .logo-item {
    border: none;
    margin-right: 10px;
    display: inline-block;
}

.logos .logo-item img {
    border: none;
}

/* Copyright Text */
.copyright-text {
    font-family: 'opensans-light', sans-serif;
    line-height: 22px;
    text-align: center;
    opacity: 0.9;
    font-size: 12px;
}

.copyright-text a {
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright-text a:hover {
    color: #68c739;
    text-decoration: underline;
}

/* Messages with Modern Alert Styles */
.flash-message {
    color: #000;
    margin: 10px 30px;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.failure-text {
    color: #ffffff;
    background: linear-gradient(135deg, #f56c6c 0%, #e85d5d 100%);
    border: 2px solid #ff9999;
    margin-bottom: 25px;
    padding: 7px 10px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(245, 108, 108, 0.4), 0 0 15px rgba(255, 153, 153, 0.3);
    text-align: center;
    font-size: 13px;
    font-weight: normal;
    float: left;
    animation: errorPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.failure-text::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: errorShine 3s linear infinite;
}

@keyframes errorPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(245, 108, 108, 0.4), 0 0 15px rgba(255, 153, 153, 0.3);
    }
    50% {
        box-shadow: 0 6px 30px rgba(245, 108, 108, 0.6), 0 0 25px rgba(255, 153, 153, 0.5);
    }
}

@keyframes errorShine {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

/* Maintenance Banner - Modern Design */
.maintenance .message {
    background: linear-gradient(135deg, #f29b2d 0%, #e88d1f 100%);
    color: #fff;
    padding: 15px 15px 35px 15px;
    font-size: 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 4px 12px rgba(242, 155, 45, 0.3);
}

.maintenance .message h4 {
    margin-top: 22px;
    font-weight: bold;
}

.maintenance .message .info-icon {
    display: none;
}

.maintenance.info .message .info-icon {
    display: block;
    float: left;
    margin-right: 10px;
}

.maintenance.danger .message {
    background: linear-gradient(135deg, #d72c24 0%, #b91f18 100%);
    color: #fff;
}

.maintenance.warning .message {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.maintenance.info .message {
    background: linear-gradient(135deg, #68c739 0%, #5ab82e 100%);
    color: #fff;
    padding-bottom: 15px;
}

.maintenance.info .message .maintenance-date {
    display: none;
}

/* Countdown */
.maintenance .count-down {
    position: absolute;
    bottom: 0;
    right: 30px;
    width: 70px;
    height: 100px;
}

.maintenance .count-down .warning-icon {
    position: relative;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 35px 55px 35px;
    border-color: transparent transparent #ffffff transparent;
}

.maintenance .count-down .warning-icon-inner {
    position: absolute;
    left: -32px;
    top: 21px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0px 32px 50.6px 32px;
    border-color: transparent transparent #d72c24 transparent;
}

.maintenance.warning .count-down .warning-icon {
    border-color: transparent transparent #FF0000 transparent;
}

.maintenance.warning .count-down .warning-icon-inner {
    border-color: transparent transparent #faffbd transparent;
}

.maintenance.info .count-down .warning-icon-inner {
    border-color: transparent transparent #68c739 transparent;
}

.maintenance .count-down .count-down-text {
    position: absolute;
    bottom: 10px;
    right: 0;
    width: 100%;
    font-size: 14px;
    padding-top: 5px;
}

/* Video Background with Modern Overlay */
#loginVideo {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    opacity: 0.8;
    z-index: -1;
    object-fit: cover;
}

/* Password Reset Modal */
#reset-password-modal .modal-content {
    background: #ffffff;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#reset-password-modal .modal-header {
    background: linear-gradient(135deg, #1174c3 0%, #0d5fa3 100%);
    color: #ffffff;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

#reset-password-modal .modal-header .modal-title {
    font-weight: 600;
}

#reset-password-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#reset-password-modal .modal-body {
    padding: 2rem;
}

#reset-password-modal input[type="email"] {
    background-color: #fff;
    color: #333;
    border: 1px solid #ced4da;
}

#reset-password-modal input[type="email"]:focus {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    outline: none;
}

/* Input Group Styling for Password Reset */
.input-group {
    position: relative;
}

.input-group-text {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: #1174c3;
    padding: 4px 12px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 6px 6px 0;
}

.input-group:focus-within .input-group-text {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #1174c3;
}

/* Forgot Password Panel - Modern UX Design */

/* Icon Wrappers */
.forgot-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.5);
}

.forgot-icon-wrapper i {
    font-size: 36px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.4);
    animation: scaleIn 0.5s ease;
}

.success-icon-wrapper i {
    font-size: 40px;
    color: #ffffff;
}

.error-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.4);
    animation: shake 0.5s ease;
}

.error-icon-wrapper i {
    font-size: 40px;
    color: #ffffff;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-8px);
    }
    75% {
        transform: translateX(8px);
    }
}

/* Typography */
.forgot-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.forgot-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.forgot-password-panel h4 {
    color: #ffffff;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.forgot-password-panel p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

/* Form Label */
.form-label-forgot {
    color: #ffffff;
    font-size: 12px;
    font-weight: normal;
    margin-bottom: 10px;
    display: block;
    text-transform: none;
    letter-spacing: 0px;
    text-align: center;
}

/* Email Display */
.email-display {
    color: #1565C0;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 18px;
    border-radius: 8px;
    display: inline-block;
    border: 2px solid rgba(33, 150, 243, 0.3);
    font-weight: 600;
}

/* Info Box */
.info-box {
    background: rgba(33, 150, 243, 0.12);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 12px;
    padding: 18px;
    backdrop-filter: blur(10px);
}

.info-box p {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 14px;
    font-size: 14px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    padding: 7px 0;
    padding-left: 26px;
    position: relative;
    line-height: 1.5;
}

.info-list li:before {
    content: "✓";
    position: absolute;
    left: 6px;
    color: #2196F3;
    font-weight: bold;
    font-size: 14px;
}

/* Link Button */
.btn-link-back {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 7px 20px;
    border-radius: 6px;
}

.btn-link-back:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-4px);
}

.btn-link-back:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Footer */
.forgot-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 20px;
    margin-top: 28px;
}

.support-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 6px;
}

.support-link i {
    opacity: 0.8;
}

.support-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.support-link:active {
    background: rgba(255, 255, 255, 0.15);
}

/* Reset Password Buttons */
#thank-you-close-btn,
#no-user-close-btn,
#error-close-btn {
    min-width: 120px;
    padding: 10px 30px;
    margin: 15px auto 0;
    display: inline-block;
}

/* Modal close button (Bootstrap 5) */
.modal-header .btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    padding: 0.5rem;
    width: 1em;
    height: 1em;
    opacity: 0.5;
}

.modal-header .btn-close:hover {
    opacity: 0.75;
}

.modal-header .btn-close:focus {
    opacity: 1;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Error Title */
.error-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 0;
}

/* Error Message Box */
.error-message-box {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 10px;
    padding: 16px 20px;
    backdrop-filter: blur(10px);
    text-align: left;
}

.error-message-text {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
}

/* Message Text Colors */
#thank-you-message p {
    color: rgba(255, 255, 255, 0.9);
    margin: 10px 0;
}

/* Privacy Policy */
#privacy-policy {
    color: #000;
    font-size: 12px;
    text-align: left;
    padding: 0px 15px 0px 0px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#privacy-policy ul {
    list-style-type: disc;
}

#privacy-policy h1 {
    color: #17365d;
    font-size: 22px;
    border-bottom: 1px solid #4f81bd;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#privacy-policy h2 {
    color: #345a8a;
    font-size: 16px;
    margin-top: 10px;
}

/* General Popup Dialog */
#general-popup-dialog {
    color: #333;
    max-width: 400px;
}

#general-popup-dialog h1 {
    font-size: 18px;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1055 !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-dialog {
    position: relative;
    margin: 1.75rem auto;
    max-width: 500px;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050 !important;
}

.modal-backdrop.show {
    opacity: 0.5;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-header .modal-title {
    margin: 0;
    flex: 1;
}

.modal-footer {
    display: none;
    clear: both;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.mb-3 {
    margin-bottom: 1rem!important;
    margin-top: 20px!important;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.full-width {
    width: 100%;
}

/* Modern Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* iPhone 12 Pro and similar (390px width) */
@media (max-width: 400px) {
    .container {
        padding: 15px 10px;
        min-height: 100vh;
        justify-content: center;
        align-items: center;
    }

    .forms-container {
        max-width: 100%;
        padding: 0;
    }

    #login-form-wrapper {
        padding: 20px 15px;
        margin: 0;
    }

    .logo-wrapper.pmi-logo {
        margin-top: 0;
        margin-bottom: 15px;
    }

    .sso-redirecting-panel,
    .sso-callback-panel {
        padding: 20px 15px;
    }

    /* Match textbox height to buttons */
    .form-control {
        height: 30px;
        padding: 4px 12px;
        font-size: 14px;
    }

    .input-group-text {
        height: 30px;
        padding: 4px 12px;
    }

    /* Forgot password form - match icon height */
    .forgot-password-panel .form-control {
        height: 30px;
        padding: 4px 12px;
        font-size: 14px;
    }

    .forgot-password-panel .input-group-text {
        height: 30px;
        padding: 4px 12px;
    }

    /* Balanced bottom spacing */
    .d2o-logo {
        margin-bottom: 5px;
    }

    .forgot-password-text {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .login-wrapper {
        margin-bottom: 10px;
    }
}

/* Mobile phones - Balanced approach */
@media (max-width: 450px) {
    .container {
        padding: 20px 15px;
        min-height: 100vh;
        justify-content: center;
        align-items: center;
    }

    .forms-container {
        max-width: 100%;
        padding: 0;
    }

    #login-form-wrapper {
        padding: 25px 20px;
        margin: 0;
    }

    .logo-wrapper.pmi-logo {
        margin-top: 0;
        margin-bottom: 20px;
    }

    .sso-redirecting-panel,
    .sso-callback-panel {
        padding: 25px 20px;
    }

    /* Match textbox height to buttons */
    .form-control {
        height: 30px;
        padding: 4px 12px;
        font-size: 14px;
    }

    .input-group-text {
        height: 30px;
        padding: 4px 12px;
    }

    /* Balanced bottom spacing */
    .d2o-logo {
        margin-bottom: 10px;
    }

    .login-wrapper {
        margin-bottom: 15px;
    }
}

/* Tablet and medium screens */
@media (max-width: 768px) {
    .container {
        padding: 15px 20px;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 20px;
    }

    .forms-container {
        max-width: 100%;
        padding: 0 20px;
    }

    #login-form-wrapper {
        padding: 25px 30px;
    }

    .sso-redirecting-panel,
    .sso-callback-panel {
        padding: 25px 30px;
    }

    /* Match textbox height to buttons */
    .form-control {
        height: 30px;
        padding: 4px 12px;
        font-size: 14px;
    }

    .input-group-text {
        height: 30px;
        padding: 4px 12px;
    }
}

@media (max-width: 1000px) {
    .logo-wrapper.pmi-logo {
        margin-top: 25px;
    }

    .form-signin {
        padding: 25px 30px;
    }

    #login-form-wrapper {
        padding: 25px 30px;
    }
}

@media screen and (orientation:portrait) {
    @media (max-width: 800px) {
        body {
            font-size: 12px;
        }

        .form-signin input, .form-signin button {
            font-size: 12px;
        }
    }

    @media (max-width: 420px) {
        body {
            background-size: inherit;
        }

        .container {
            padding: 15px 10px;
            min-height: 100vh;
            justify-content: center;
            align-items: center;
        }

        .forms-container {
            padding: 0;
        }

        .form-signin {
            padding: 20px 15px;
            max-width: 100%;
            border-radius: 8px;
        }

    #login-form-wrapper {
        padding: 20px 15px;
        border-radius: 8px !important;
        margin: 0;
    }

    .forgot-password-panel {
        border-radius: 8px !important;
    }

        .form-signin input, .form-signin button {
            font-size: 12px;
        }

        .quotation-wrapper {
            margin-top: 0px;
        }

        .login-wrapper {
            margin-bottom: 20px;
        }

        .form-group {
            margin-bottom: 10px;
        }

        .login-buttons {
            margin-bottom: 30px;
        }

        .d2o-logo {
            display: none;
        }

        /* SSO Panels responsive */
        .sso-redirecting-panel,
        .sso-callback-panel {
            padding: 20px 15px;
        }

        .redirecting-title,
        .callback-title {
            font-size: 18px;
        }

        .redirecting-subtitle,
        .callback-subtitle {
            font-size: 12px;
        }

        /* Forgot Password Form responsive */
        .forgot-password-panel {
            padding: 20px 15px;
        }

        .forgot-title {
            font-size: 18px;
        }

        .forgot-subtitle {
            font-size: 12px;
        }

        .input-group-text {
            padding: 8px 12px;
        }

        .form-control {
            font-size: 12px;
            padding: 8px 12px;
        }
    }

    @media (max-width: 320px) {
        .form-signin {
            max-width: 95%;
        }
    }
}

@media (orientation:landscape) {
    @media (max-width: 400px) {
        .form-signin {
            max-width: 70%;
        }

        .form-signin input, .form-signin button {
            font-size: 12px;
        }
    }

    @media (max-width: 990px) {
        .form-signin {
            max-width: 60%;
        }

        .form-signin input, .form-signin button {
            font-size: 12px;
        }
    }

    @media (max-width: 800px) {
        body {
            background-size: inherit;
            font-size: 11px;
        }

        .logo-wrapper.pmi-logo {
            margin-top: 20px;
        }

        .form-signin input, .form-signin button {
            font-size: 12px;
        }

        .form-signin {
            padding-top: 0px;
        }

        .form-signin {
            padding-top: 10px;
            max-width: 60%;
        }

        .quotation-wrapper {
            margin-top: 0px;
        }

        .login-wrapper {
            margin-top: 10px;
            margin-bottom: 20px;
        }

        .form-group {
            margin-bottom: 10px;
        }

        .d2o-logo {
            display: none;
        }

        /* SSO Panels responsive for landscape */
        .sso-redirecting-panel,
        .sso-callback-panel {
            padding: 15px 20px;
        }

        .redirecting-title,
        .callback-title {
            font-size: 16px;
        }

        .redirecting-subtitle,
        .callback-subtitle {
            font-size: 11px;
        }
    }
}

/* ============================================
   ACCESSIBILITY & MODERN ENHANCEMENTS
   ============================================ */

/* Focus visible for keyboard navigation */
.form-control:focus-visible {
    outline: none;
}

.btn-login:focus-visible,
.btn-login-ex:focus-visible,
a:focus-visible {
    outline: 3px solid #68c739;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .form-signin:hover {
        transform: none;
    }

    .btn-login.btn-success:hover,
    .btn-login-ex.btn-info:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-control {
        border: 2px solid #000;
    }

    .btn-login.btn-success {
        border: 2px solid #000;
    }

    .btn-login-ex.btn-info {
        border: 2px solid #000;
    }
}

/* Print styles */
@media print {
    #loginVideo {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .form-signin {
        background: white;
        box-shadow: none;
    }
}

/* Force border-radius for login panels */
#login-form-wrapper,
.forgot-password-panel {
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    -moz-border-radius: 12px !important;
}

/* Mobile border-radius override */
@media (max-width: 420px) {
    #login-form-wrapper,
    .forgot-password-panel {
        border-radius: 8px !important;
        -webkit-border-radius: 8px !important;
        -moz-border-radius: 8px !important;
    }
}
