/* VDM Login — modern layout over background photo */
.vdm-login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Sans', 'Source Sans Pro', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.vdm-login-page #page-container,
.vdm-login-page #main-container {
    min-height: 100vh;
}

.vdm-login-bg {
    position: relative;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: stretch;
}

.vdm-login-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(0, 35, 70, 0.92) 0%,
        rgba(0, 45, 90, 0.78) 42%,
        rgba(0, 30, 60, 0.45) 68%,
        rgba(0, 20, 45, 0.35) 100%
    );
    pointer-events: none;
}

.vdm-login-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 4rem;
    gap: 2rem;
}

/* —— Brand panel (left) —— */
.vdm-login-brand {
    flex: 1;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 4rem);
    padding: 0.5rem 0;
}

.vdm-login-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vdm-login-logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vdm-login-logo-icon img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}

.vdm-login-logo-text .logo-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin: 0;
}

.vdm-login-logo-text .logo-subtitle {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    margin: 4px 0 0;
}

.vdm-login-tagline {
    margin-top: auto;
    padding-bottom: 2rem;
}

.vdm-login-tagline h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    color: #fff;
    line-height: 1.25;
    margin: 0 0 1rem;
}

.vdm-login-tagline h1 strong {
    font-weight: 700;
}

.vdm-login-tagline .powered-by {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: rgba(159, 199, 255, 0.9);
    text-transform: uppercase;
    margin: 0;
}

/* —— Login card (right) —— */
.vdm-login-card-wrap {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vdm-login-card {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.vdm-login-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0058a3;
    padding: 1rem 1.35rem;
}

.vdm-login-card-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
}

.vdm-login-card-header .driver-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}

.vdm-login-card-header .driver-link:hover {
    color: #fff;
    text-decoration: none;
}

.vdm-login-card-body {
    padding: 1.75rem 1.5rem 1.5rem;
}

.vdm-login-field {
    margin-bottom: 1.15rem;
}

.vdm-login-field label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8094ae;
    margin-bottom: 0.45rem;
}

.vdm-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.vdm-login-input-wrap .input-icon {
    position: absolute;
    left: 14px;
    color: #8094ae;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.vdm-login-input-wrap .toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 4px 6px;
    color: #8094ae;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.vdm-login-input-wrap .toggle-password:hover {
    color: #0058a3;
}

.vdm-login-input-wrap input.form-control {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 42px;
    font-size: 0.9rem;
    color: #364152;
    background: #f8f9fc;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.vdm-login-page .vdm-login-input-wrap input.form-control:focus {
    background: #fff;
    border-color: #0058a3;
    box-shadow: 0 0 0 3px rgba(0, 88, 163, 0.12) !important;
    outline: none !important;
}

.vdm-login-input-wrap input.form-control.is-invalid {
    border-color: #e04f1a;
}

.vdm-login-input-wrap input.form-control::placeholder {
    color: #b0bac9;
}

.invalid-feedback {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
}

/* OTP toggle */
.vdm-otp-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8094ae;
    margin-bottom: 0.5rem;
}

.vdm-otp-toggle {
    display: flex;
    gap: 10px;
}

.vdm-otp-toggle input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.vdm-otp-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #526484;
    background: #f5f6fa;
    border: 2px solid #e5e9f2;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
}

.vdm-otp-toggle input:checked + .vdm-otp-option {
    background: #eef4fb;
    border-color: #0058a3;
    color: #0058a3;
}

.vdm-otp-option i {
    font-size: 0.95rem;
}

/* Remember / forgot row */
.vdm-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.35rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vdm-login-options .custom-control-label {
    font-size: 0.875rem;
    color: #526484;
    font-weight: 400;
    cursor: pointer;
}

.vdm-login-options .forgot-link {
    font-size: 0.875rem;
    color: #0058a3;
    text-decoration: none;
    font-weight: 500;
}

.vdm-login-options .forgot-link:hover {
    text-decoration: underline;
    color: #003d72;
}

/* Sign in button */
.vdm-btn-signin {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: #0058a3;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(0, 88, 163, 0.35);
}

.vdm-btn-signin:hover {
    background: #003d72;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 88, 163, 0.4);
}

.vdm-btn-signin:active {
    transform: translateY(1px);
}

/* SSL footer */
.vdm-login-secure {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f2f7;
    font-size: 0.75rem;
    color: #8094ae;
}

.vdm-login-secure i {
    color: #9fc7ff;
    margin-right: 4px;
}

/* Responsive */
@media (max-width: 991px) {
    .vdm-login-layout {
        flex-direction: column;
        justify-content: center;
        padding: 2rem 1.25rem;
        gap: 1.5rem;
    }

    .vdm-login-brand {
        max-width: 100%;
        min-height: auto;
        text-align: center;
        align-items: center;
    }

    .vdm-login-logo {
        justify-content: center;
    }

    .vdm-login-tagline {
        margin-top: 1rem;
        padding-bottom: 0;
    }

    .vdm-login-tagline h1 {
        font-size: 1.5rem;
    }

    .vdm-login-card-wrap {
        max-width: 440px;
    }
}

@media (max-width: 480px) {
    .vdm-login-card-body {
        padding: 1.35rem 1.15rem 1.25rem;
    }

    .vdm-login-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* —— 2FA page —— */
.vdm-2fa-intro {
    font-size: 0.9rem;
    color: #526484;
    line-height: 1.5;
    margin: 0 0 1.5rem;
    text-align: center;
}

.vdm-2fa-intro strong {
    color: #364152;
    font-weight: 600;
}

.vdm-2fa-intro .sent-target {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.95rem;
    color: #0058a3;
    font-weight: 600;
}

.vdm-login-card-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    transition: background 0.2s;
    cursor: pointer;
}

.vdm-login-card-header .back-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    text-decoration: none;
}

.vdm-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.vdm-alert-success {
    background: #e8f8ef;
    color: #1e7e45;
    border: 1px solid #b8e6c8;
}

.vdm-alert-error {
    background: #fdeeed;
    color: #c0392b;
    border: 1px solid #f5c6c6;
}

/* 5-digit OTP boxes */
.vdm-otp-digits {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.vdm-otp-digit {
    width: 52px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #364152;
    background: #f8f9fc;
    border: 2px solid #e5e9f2;
    border-radius: 12px;
    padding: 0;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -moz-appearance: textfield;
}

.vdm-otp-digit::-webkit-outer-spin-button,
.vdm-otp-digit::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.vdm-login-page .vdm-otp-digit:focus {
    background: #fff;
    border-color: #0058a3;
    box-shadow: 0 0 0 3px rgba(0, 88, 163, 0.12) !important;
    outline: none !important;
}

.vdm-otp-digit.filled {
    border-color: #0058a3;
    background: #fff;
}

.vdm-otp-digit.is-invalid {
    border-color: #e04f1a;
    animation: vdm-otp-shake 0.4s ease;
}

@keyframes vdm-otp-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.vdm-otp-error {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: #e04f1a;
    margin-bottom: 0.75rem;
}

.vdm-2fa-resend {
    text-align: center;
    margin-bottom: 1.25rem;
}

.vdm-2fa-resend a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0058a3;
    text-decoration: none;
}

.vdm-2fa-resend a:hover {
    text-decoration: underline;
    color: #003d72;
}

@media (max-width: 400px) {
    .vdm-otp-digits {
        gap: 6px;
    }

    .vdm-otp-digit {
        width: 44px;
        height: 50px;
        font-size: 1.25rem;
        border-radius: 10px;
    }
}
