﻿/* ─── Reset & Base ─────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #0B2161;
    --navy-mid: #1a3a8f;
    --blue-accent: #2563EB;
    --blue-light: #3b82f6;
    --sky: #e8eef8;
    --silver: #BDBDBD;
    --white: #ffffff;
    --offwhite: #f7f9fc;
    --text-dark: #1a2340;
    --text-mid: #4b5771;
    --text-light: #8896b3;
    --border: #d1daea;
    --shadow-sm: 0 2px 8px rgba(11,33,97,.08);
    --shadow-md: 0 8px 32px rgba(11,33,97,.14);
    --shadow-lg: 0 20px 60px rgba(11,33,97,.18);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all .25s cubic-bezier(.4,0,.2,1);
}

html, body {
    height: 100%;
    font-family: 'DM Sans', sans-serif;
    background: var(--offwhite);
    color: var(--text-dark);
}

    /* ─── Background Decoration ─────────────────────── */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: radial-gradient(ellipse 80% 60% at 20% -10%, rgba(37,99,235,.13) 0%, transparent 60%), radial-gradient(ellipse 60% 50% at 85% 110%, rgba(11,33,97,.1) 0%, transparent 55%);
        pointer-events: none;
        z-index: 0;
    }

/* ─── Layout ─────────────────────────────────────── */
.l-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.l-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    animation: slideUp .45s cubic-bezier(.4,0,.2,1) both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Card Header ───────────────────────────────── */


    .card-header::after {
        content: '';
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        width: 120%;
        height: 60px;
        background: var(--white);
        border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    }

.card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* left align */
    padding: 20px 24px;
    gap: 12px; /* space between logo & text */
}

    .card-header img {
        max-width: 140px;
        opacity: 0.92;
        margin: 0; /* remove auto center */
        display: block;
    }

    .card-header h2 {
        font-family: 'DM Serif Display', serif;
        font-size: 1.5rem;
        color: var(--white);
        letter-spacing: .01em;
        font-style: italic;
        opacity: .9;
    }

/* ─── Card Body ─────────────────────────────────── */
.card-body {
    padding: 36px 36px 32px;
}

/* ─── Role Selector ─────────────────────────────── */
.selector-label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
    display: block;
}

.container {
    width: 100%;
    margin-bottom: 28px;
}
.otp-info-msg {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 10px;
    display: inline-block;
}

#otpTimer {
    font-weight: bold;
    margin-left: 8px;
    color: #d32f2f;
}
.selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: var(--sky);
    border-radius: 10px;
    padding: 5px;
}

.selector-item {
    position: relative;
}

.selector-item_radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.selector-item_label {
    display: block;
    text-align: center;
    padding: 8px 4px;
    border-radius: 7px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    user-select: none;
}

.selector-item_radio:checked + .selector-item_label {
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}

/* ─── Section Heading ───────────────────────────── */
.login-heading {
    font-family: 'DM Serif Display', serif;
    font-size: 1.35rem;
    color: var(--navy);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .login-heading i {
        font-size: 1rem;
        color: var(--blue-accent);
        background: var(--sky);
        width: 32px;
        height: 32px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

/* ─── Form Fields ───────────────────────────────── */
.field-group {
    position: relative;
    margin-bottom: 16px;
}

    .field-group .field-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
        font-size: .85rem;
        pointer-events: none;
        transition: var(--transition);
    }

    .field-group input[type="text"],
    .field-group input[type="password"],
    .field-group input[type="tel"] {
        width: 100%;
        padding: 12px 14px 12px 40px;
        border: 1.5px solid var(--border);
        border-radius: var(--radius-sm);
        font-family: 'DM Sans', sans-serif;
        font-size: .92rem;
        color: var(--text-dark);
        background: var(--offwhite);
        transition: var(--transition);
        outline: none;
    }

    .field-group input:focus {
        border-color: var(--blue-accent);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    }

        .field-group input:focus + .field-icon,
        .field-group:focus-within .field-icon {
            color: var(--blue-accent);
        }

    .field-group input::placeholder {
        color: var(--text-light);
    }

/* ─── ASP.NET TextBox overrides ─────────────────── */
.form-signin input[type="text"],
.form-signin input[type="password"] {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: .92rem;
    color: var(--text-dark);
    background: var(--offwhite);
    transition: var(--transition);
    outline: none;
}

    .form-signin input[type="text"]:focus,
    .form-signin input[type="password"]:focus {
        border-color: var(--blue-accent);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    }

/* ─── Forgot Password ───────────────────────────── */
.forgot-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
    margin-bottom: 12px;
}

.forgot-link {
    font-size: .78rem;
    color: var(--blue-accent);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0;
}

    .forgot-link:hover {
        color: var(--navy);
        text-decoration: underline;
    }

/* ─── Remember Me ───────────────────────────────── */
.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 18px;
}

    .remember input[type="checkbox"] {
        accent-color: var(--blue-accent);
        width: 15px;
        height: 15px;
        cursor: pointer;
    }

    .remember label {
        font-size: .82rem;
        color: var(--text-mid);
        cursor: pointer;
    }

/* ─── Panels ─────────────────────────────────────── */
#pnl1, #pnl2 {
    animation: fadeIn .3s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OTP panel extras */
.otp-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

    .otp-row input {
        flex: 1;
    }

/* ─── Buttons ───────────────────────────────────── */
.signInBtn {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-accent) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .signInBtn::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, var(--blue-accent) 0%, var(--navy) 100%);
        opacity: 0;
        transition: var(--transition);
    }

    .signInBtn:hover::after {
        opacity: 1;
    }

    .signInBtn:hover {
        box-shadow: 0 6px 20px rgba(37,99,235,.35);
        transform: translateY(-1px);
    }

    .signInBtn:active {
        transform: translateY(0);
        box-shadow: none;
    }

    .signInBtn span {
        position: relative;
        z-index: 1;
    }

.OTPBtn {
    padding: 12px 18px;
    background: var(--sky);
    color: var(--navy);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

    .OTPBtn:hover {
        background: var(--navy);
        color: var(--white);
        border-color: var(--navy);
    }

/* ─── Error/Info Labels ──────────────────────────── */
#lblErrMsg, #lblInvalid {
    display: block;
    font-size: .82rem;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

    #lblErrMsg[style*="display: none"],
    #lblInvalid[style*="display: none"] {
        display: none !important;
    }

.otp-info-msg {
    font-size: .8rem;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: none;
}

/* ─── Modal Overlay ─────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,20,50,.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

    .modal-overlay.active {
        opacity: 1;
        pointer-events: all;
    }

/* ─── Modal Box ─────────────────────────────────── */
.modal-box {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    transform: scale(.93) translateY(12px);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-accent) 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .modal-header h3 {
        font-family: 'DM Serif Display', serif;
        color: var(--white);
        font-size: 1.1rem;
    }

.modal-close {
    background: rgba(255,255,255,.15);
    border: none;
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: .9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .modal-close:hover {
        background: rgba(255,255,255,.3);
    }

.modal-body {
    padding: 24px;
}

.masked-number {
    text-align: center;
    background: var(--sky);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 18px;
}

    .masked-number p {
        font-size: .75rem;
        color: var(--text-light);
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: .08em;
        font-weight: 600;
    }

    .masked-number span {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--navy);
        letter-spacing: .1em;
    }

.modal-field {
    position: relative;
    margin-bottom: 14px;
}

    .modal-field label {
        display: block;
        font-size: .75rem;
        font-weight: 600;
        color: var(--text-mid);
        text-transform: uppercase;
        letter-spacing: .08em;
        margin-bottom: 5px;
    }

    .modal-field input {
        width: 100%;
        padding: 11px 14px 11px 38px;
        border: 1.5px solid var(--border);
        border-radius: var(--radius-sm);
        font-family: 'DM Sans', sans-serif;
        font-size: .9rem;
        color: var(--text-dark);
        background: var(--offwhite);
        transition: var(--transition);
        outline: none;
    }

        .modal-field input:focus {
            border-color: var(--blue-accent);
            background: var(--white);
            box-shadow: 0 0 0 3px rgba(37,99,235,.1);
        }

        .modal-field input:disabled {
            opacity: .5;
            cursor: not-allowed;
        }

    .modal-field .mf-icon {
        position: absolute;
        left: 12px;
        bottom: 12px;
        color: var(--text-light);
        font-size: .8rem;
        pointer-events: none;
    }

.modal-otp-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

    .modal-otp-row .modal-field {
        flex: 1;
        margin-bottom: 0;
    }

.gen-otp-btn {
    align-self: flex-end;
    padding: 11px 14px;
    background: var(--sky);
    color: var(--navy);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

    .gen-otp-btn:hover {
        background: var(--navy);
        color: var(--white);
        border-color: var(--navy);
    }

.modal-otp-sent {
    font-size: .78rem;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 7px 12px;
    margin-bottom: 12px;
    display: none;
    align-items: center;
    gap: 6px;
}

.reset-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-accent) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 6px;
}

    .reset-btn:hover {
        opacity: .9;
        box-shadow: 0 6px 20px rgba(37,99,235,.3);
        transform: translateY(-1px);
    }

    .reset-btn:active {
        transform: translateY(0);
    }

.modal-error {
    font-size: .8rem;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 10px;
    display: none;
}

.modal-success {
    font-size: .8rem;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 10px;
    display: none;
}

/* ─── Divider ────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
    opacity: .5;
}

/* ─── Hidden ─────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 480px) {
    .card-body {
        padding: 28px 20px 24px;
    }

    .card-header {
        padding: 24px 20px 20px;
    }

    .selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .otp-row {
        flex-direction: column;
    }

        .otp-row .OTPBtn {
            width: 100%;
        }
}

@media (max-width: 360px) {
    .card-header img {
        max-width: 110px;
    }

    .login-heading {
        font-size: 1.15rem;
    }
}
.verify-otp-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #ffffff;
    border: none;
    padding: 10px 14px;
    margin-left: 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.25);
}

    .verify-otp-btn i {
        font-size: 13px;
    }

    .verify-otp-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(40, 167, 69, 0.35);
        background: linear-gradient(135deg, #218838, #1aa179);
    }

    .verify-otp-btn:active {
        transform: scale(0.96);
    }

    .verify-otp-btn:disabled {
        background: #cccccc;
        cursor: not-allowed;
        box-shadow: none;
        opacity: 0.7;
    }
@media (max-width: 480px) {
    .verify-otp-btn {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
}

