input[type='password']::-ms-reveal,
input[type='password']::-ms-clear {
    display: none;
}

body.login-page {
    min-height: 100vh;
    margin: 0;
    background: #fff;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
}

.login-premium {
    width: 100%;
    max-width: none;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    overflow: hidden;
    border: none;
    box-shadow: none;
    background: #fff;
    backdrop-filter: none;
}

.login-premium-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    height: 100%;
}

/* ---------------------------------------------------------------
   BRAND PANEL
   Changed from a single centered icon to a stacked brand group
   (logo -> wordmark -> tagline -> points) so the panel doesn't
   read as "empty" with the mark floating alone in space.
------------------------------------------------------------------ */
.login-brand-panel {
    height: 100%;
    padding: 3.5rem 3rem;
    color: #fff;
    background: linear-gradient(160deg, #0b2038 0%, #113a63 50%, #1f6db1 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
}

/* Dark overlay so content stays readable over a custom background image */
.login-brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(11, 32, 56, 0.82) 0%, rgba(17, 58, 99, 0.72) 50%, rgba(31, 109, 177, 0.62) 100%);
    z-index: 0;
    pointer-events: none;
}

/* All direct children sit above the overlay */
.login-brand-panel > * {
    position: relative;
    z-index: 1;
}

/* wrapper for logo + wordmark, sits as one visual unit */
.login-brand-group {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.login-brand-logo {
    display: inline-flex;
    max-width: 160px;
    max-height: 72px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}

.login-brand-logo img,
.login-brand-logo svg {
    max-width: 160px;
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* "RMS" wordmark next to the logo */
.login-brand-wordmark {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.15;
    margin: 0;
}

.login-brand-wordmark span {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.login-brand-title {
    position: relative;
    z-index: 1;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    max-width: 22ch;
}

.login-brand-subtitle {
    position: relative;
    z-index: 1;
    margin-top: 0.85rem;
    color: rgba(255, 255, 255, 0.84);
    max-width: 30ch;
}

.login-brand-points {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    padding-left: 1.1rem;
    color: rgba(255, 255, 255, 0.92);
}

.login-brand-points li {
    margin-bottom: 0.65rem;
}

/* ---------------------------------------------------------------
   FORM PANEL (unchanged from original)
------------------------------------------------------------------ */
.login-form-panel {
    height: 100%;
    padding: 2.35rem 2.35rem 2rem;
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}

/* Keep the form content at its original compact width and
   center it inside the (now much wider) white panel, instead
   of letting inputs/buttons stretch full panel width. */
.login-form-panel > * {
    width: 100%;
    max-width: 460px;
}

.login-form-header {
    text-align: center;
}

.login-form-header h1 {
    margin-bottom: 0.35rem;
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
}

.login-form-logo {
    display: block;
    max-width: 170px;
    max-height: 70px;
    width: auto;
    height: auto;
    margin: 0 auto 0.9rem;
    object-fit: contain;
}

.login-form-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin: 0 0 0.9rem;
    background: #0d6efd;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}

.login-form-header p {
    display: none;
    margin-bottom: 1.35rem;
    color: #64748b;
}

.login-field {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #dbe1e8;
    border-radius: 0.55rem;
    background: #f8fafc;
    padding: 0.35rem 0.6rem;
}

.login-field-icon {
    color: #64748b;
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.login-premium .login-field .form-control {
    border: 0;
    background: transparent;
    min-height: 40px;
    padding: 0.2rem 0;
}

.login-premium .form-control:focus {
    box-shadow: none;
    background: transparent;
}

.login-field:focus-within {
    border-color: #b6c5d6;
    background: #fff;
}

.login-premium .form-control:-webkit-autofill,
.login-premium .form-control:-webkit-autofill:hover,
.login-premium .form-control:-webkit-autofill:focus,
.login-premium .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f8fafc inset !important;
    -webkit-text-fill-color: #0f172a !important;
    transition: background-color 5000s ease-in-out 0s;
}

.login-premium .form-check-label {
    color: #475569;
}

.login-premium .btn-login {
    min-height: 46px;
    border: 0;
    background: linear-gradient(135deg, #0d6efd 0%, #1558b0 100%);
    box-shadow: 0 8px 22px rgba(13, 110, 253, 0.32);
    font-weight: 600;
    letter-spacing: 0.015em;
}

.login-premium .btn-login:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #134993 100%);
}

.login-premium .login-forgot-btn {
    margin-top: 0.9rem;
    border-color: #cbd5e1;
    color: #334155;
}

.login-premium .login-forgot-btn:hover {
    border-color: #94a3b8;
    color: #1e293b;
    background: #f8fafc;
}

.otp-timer {
    margin-bottom: 1rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    border-radius: 0.55rem;
    color: #1e3a8a;
    font-size: 0.92rem;
}

.otp-timer.expired {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.otp-inputs {
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
}

.otp-input {
    width: 3rem;
    height: 3.25rem;
    border: 1px solid #dbe1e8;
    border-radius: 0.55rem;
    background: #f8fafc;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
}

.otp-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    background: #fff;
}

.otp-inputs.is-complete .otp-input {
    border-color: #198754;
    background: #e9f7ef;
    color: #146c43;
}

.password-hint {
    color: #64748b;
    font-size: 0.82rem;
}

@media (max-width: 992px) {
    .login-premium {
        height: 100vh;
    }

    .login-premium-grid {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }

    .login-brand-panel,
    .login-form-panel {
        height: auto;
        padding: 1.7rem;
    }

    .login-brand-panel {
        align-items: center;
        text-align: center;
    }

    .login-brand-group {
        flex-direction: column;
        text-align: center;
    }

    .login-brand-subtitle {
        max-width: none;
    }
}

@media (max-width: 420px) {
    .otp-inputs {
        gap: 0.35rem;
    }

    .otp-input {
        width: 2.55rem;
        height: 3rem;
    }
}

[data-bs-theme="dark"] body.login-page,
[data-bs-theme="dark"] .login-premium,
[data-bs-theme="dark"] .login-form-panel {
    background: #0f172a !important;
}

[data-bs-theme="dark"] .login-form-header h1 {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .login-form-header p {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .login-field {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .login-field:focus-within {
    background: #1e293b !important;
    border-color: #60a5fa !important;
}

[data-bs-theme="dark"] .login-field-icon {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .login-premium .login-field .form-control {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .login-premium .login-field .form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 0.8;
}

[data-bs-theme="dark"] #toggle-password-btn {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .login-premium .login-forgot-btn {
    border-color: #334155 !important;
    color: #cbd5e1 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .login-premium .login-forgot-btn:hover {
    background: #1e293b !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .otp-input {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .otp-input:focus {
    border-color: #60a5fa !important;
    background: #1e293b !important;
}

[data-bs-theme="dark"] .login-premium .form-control:-webkit-autofill,
[data-bs-theme="dark"] .login-premium .form-control:-webkit-autofill:hover,
[data-bs-theme="dark"] .login-premium .form-control:-webkit-autofill:focus,
[data-bs-theme="dark"] .login-premium .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    transition: background-color 5000s ease-in-out 0s;
}