/* ============================================================
   BASE / MOBILE FIRST
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container-fluid {
    padding-left: unset !important;
    padding-right: unset !important;
}

/* Overlay on form background */
.logoForm {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1rem;
    background:
        linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
        url('images/loginbg.png') no-repeat center center;
    background-size: cover;
    transition: all 0.35s ease;
}

.logoForm::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.logoForm > * {
    position: relative;
    z-index: 2;
}

/* Left desktop image panel */
.form-right {
    background: url('images/loginbg.png') no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    min-height: 100dvh;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* Form card */
.form-left {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    padding: 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    margin: 0 auto;
    transition: all 0.35s ease;
}

/* Logo / heading */
.login-logo {
    max-height: 50px;
    width: auto;
}

.login-heading {
    font-size: clamp(1rem, 1.5vw + 0.5rem, 1.35rem);
    line-height: 1.2;
    margin-bottom: 0.5rem !important;
    text-align: center;
}

/* Inputs / buttons */
.form-left .form-control,
.form-left .input-group-text {
    min-height: 44px;
}

.form-left .btn {
    min-height: 44px;
    font-weight: 600;
}

.forgot-password {
    text-decoration: none;
    font-size: 13px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.copyright-text p {
    font-size: 12px;
}

/* ============================================================
   SMALL MOBILE: 320px - 480px
   ============================================================ */

@media (max-width: 480px) {
    .logoForm {
        padding: 1rem;
    }

    .form-left {
        padding: 1rem !important;
        border-radius: 10px;
    }

    .login-logo {
        max-height: 48px;
    }

    .form-left .form-control,
    .form-left .input-group-text,
    .form-left .btn {
        min-height: 42px;
    }
}

/* ============================================================
   TABLET / BELOW DESKTOP:
   hide left side completely, form takes full width
   ============================================================ */

@media (min-width: 481px) and (max-width: 991.98px) {
    .logoForm {
        padding: 1.5rem;
        min-height: 100vh;
        min-height: 100dvh;
        background:
            linear-gradient(rgba(0,0,0,0.50), rgba(0,0,0,0.50)),
            url('images/loginbg.png') no-repeat center center;
        background-size: cover;
    }

    .form-left {
        max-width: 600px;
        padding: 1.5rem !important;
    }

    .login-logo {
        max-height: 56px;
    }

    .forgot-password {
        font-size: 14px;
    }

    .copyright-text p {
        font-size: 13px;
    }
}

/* ============================================================
   DESKTOP: 992px - 1400px
   two-column layout stays
   ============================================================ */

@media (min-width: 992px) {
    .logoForm {
        background:
            url('https://static.vecteezy.com/system/resources/thumbnails/059/411/935/small_2x/hrm-or-human-resource-management-strategic-planning-for-success-through-people-business-development-concept-by-choosing-professional-leaders-employee-competency-teamwork-free-photo.jpg')
            no-repeat center center;
        background-size: cover;
        padding: 2rem 1.5rem;
    }

    .form-left {
        max-width: 380px;
        padding: 1.5rem !important;
    }

    .login-logo {
        max-height: 60px;
    }

    .form-left .form-control,
    .form-left .input-group-text {
        min-height: 46px;
    }

    .form-left .btn {
        min-height: 44px;
    }

    .forgot-password {
        font-size: 14px;
    }

    .copyright-text p {
        font-size: 13px;
    }
}

/* ============================================================
   LARGE DESKTOP / 4K
   ============================================================ */

@media (min-width: 1401px) {
    .form-left {
        max-width: 440px;
        padding: 2rem !important;
    }

    .login-logo {
        max-height: 70px;
    }

    .form-left .form-control,
    .form-left .input-group-text {
        min-height: 50px;
    }

    .form-left .btn {
        min-height: 48px;
    }

    .copyright-text p {
        font-size: 14px;
    }
}

/* ============================================================
   EXTRA WIDE SCREENS
   ============================================================ */

@media (min-width: 1920px) {
    .form-left {
        max-width: 460px;
    }

    .logoForm {
        padding: 2.5rem;
    }
}

/* ============================================================
   MODAL STYLING
   ============================================================ */

.modal-header {
    padding: 0.5rem 0.5rem;
}

.modal-content {
    transition: transform 0.3s ease-in-out;
}

.modal-dialog {
    max-width: 380px !important;
}

.modal-content {
    background-color: #571554;
    border-radius: 12px;
    max-height: 30vh;
}

.modal-title {
    font-weight: 600;
    font-size: 18px;
}

#modal-validation-message,
#modal-validation-message5,
#modal-validation-message1 {
    font-size: 13px !important;
    font-weight: bold;
}

.modal-footer .btn-outline-secondary {
    color: #2879CE;
    border-color: #2879CE;
}

.modal-footer .btn-outline-secondary:hover {
    background-color: #2879CE;
    color: white;
}

.modal-footer .btn-danger {
    background-color: #e1297c;
    border: none;
}

.modal-footer .btn-danger:hover {
    background-color: #c51d6b;
}

@media (max-width: 480px) {
    .modal-dialog {
        max-width: calc(100% - 20px) !important;
    }

    .modal-content {
        max-height: none;
    }
}

/* ============================================================
   MODAL STYLING — login.css (Premium Look)
   Works with existing login.jsp modal HTML structure
   ============================================================ */

.modal-backdrop.show {
    background: rgba(15, 23, 42, 0.72);
}

body.modal-open {
    overflow: hidden;
}

.modal-dialog {
    max-width: 340px !important;
    margin: auto !important;
}

.modal-dialog.modal-dialog-centered {
    min-height: calc(100% - 3.5rem) !important;
    display: flex !important;
    align-items: center !important;
    margin: auto !important;
}

.modal-content {
    background: rgba(20, 20, 40, 0.92) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    max-height: none !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.3s ease-in-out;
}

.modal-content > .text-center {
    padding: 1.2rem 1rem 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.modal-content > .text-center .bi-exclamation-triangle-fill {
    font-size: 1.6rem !important;
    color: #ef4444 !important;
    display: block;
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    background: rgba(239, 68, 68, 0.14);
    border-radius: 50%;
    margin: 0 auto;
}

.modal-body {
    flex: unset !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0.55rem 1.2rem 0.75rem !important;
    text-align: center !important;
}

#modal-validation-message1,
#modal-validation-message,
#modal-validation-message5 {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #f1f5f9 !important;
    line-height: 1.5;
    margin: 0;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0.6rem 1rem !important;
    display: flex !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    flex-shrink: 0;
    background: transparent;
}

.modal-footer .btn-outline-secondary {
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 0.35rem 1rem !important;
    border-radius: 8px !important;
    min-width: 80px;
    transition: all 0.2s ease;
}

.modal-footer .btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.12) !important;
    border-color: rgba(148, 163, 184, 0.6) !important;
    color: #cbd5e1 !important;
}

.modal-footer .btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    border: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 0.35rem 1rem !important;
    border-radius: 8px !important;
    min-width: 80px;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.28);
    transition: all 0.2s ease;
}

.modal-footer .btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
    box-shadow: 0 5px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .modal-dialog {
        max-width: calc(100% - 24px) !important;
    }

    .modal-content {
        max-height: none !important;
    }

    #modal-validation-message1 {
        font-size: 12px !important;
    }
}