/* =====================================================
   TVS CLAIM PORTAL — COMPLETE LOGIN CSS
   File: assets/css/login.css
   Optimized for laptop, desktop and mobile
===================================================== */

:root {
    --tvs-blue: #012471;
    --tvs-blue-light: #16479a;
    --tvs-navy: #041633;
    --tvs-red: #dc4226;
    --text-main: #172033;
    --text-muted: #788397;
    --border: #e1e7f0;
    --page-bg: #f3f6fb;
}

/* ---------------- RESET ---------------- */

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    font-family: "Inter", Arial, sans-serif;
    color: var(--text-main);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

/* ---------------- MAIN LAYOUT ---------------- */

.login-layout {
    display: grid;
    grid-template-columns: 56% 44%;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* =====================================================
   LEFT PANEL
===================================================== */

.brand-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 100vh;
    padding: 40px clamp(28px, 5vw, 72px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(
            circle at 12% 15%,
            rgba(73, 121, 207, .25),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #041536 0%,
            #012471 53%,
            #061b42 100%
        );
}

.brand-panel::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .22;
    background-image:
        linear-gradient(
            rgba(255,255,255,.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.035) 1px,
            transparent 1px
        );
    background-size: 44px 44px;
    pointer-events: none;
}

.brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 420px;
    height: 420px;
    top: -210px;
    right: -230px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 50%;
    box-shadow:
        0 0 0 45px rgba(255,255,255,.025),
        0 0 0 90px rgba(255,255,255,.018);
    pointer-events: none;
}

.brand-glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.brand-glow-one {
    width: 220px;
    height: 220px;
    left: -150px;
    bottom: -100px;
    background: rgba(65,120,220,.15);
    filter: blur(5px);
}

.brand-glow-two {
    width: 150px;
    height: 150px;
    right: 10%;
    bottom: 8%;
    background: rgba(220,66,38,.07);
    filter: blur(5px);
}

.brand-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
}

/* Badge */

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 23px;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 30px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.94);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
    backdrop-filter: blur(8px);
}

.brand-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #45d483;
    box-shadow: 0 0 10px rgba(69,212,131,.45);
}

/* Heading */

.brand-content h1 {
    margin: 0;
    max-width: 600px;
    color: #fff;
    font-size: clamp(34px, 3.4vw, 53px);
    font-weight: 800;
    line-height: 1.09;
    letter-spacing: -1.8px;
}

.brand-content h1 span {
    color: #a9c9ff;
}

.brand-description {
    max-width: 480px;
    margin: 19px 0 0;
    color: rgba(255,255,255,.72);
    font-size: 12px;
    line-height: 1.85;
}

/* Feature cards */

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 570px;
    margin-top: 27px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    min-height: 59px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 11px;
    background: rgba(255,255,255,.055);
    transition: background .2s ease, transform .2s ease;
}

.feature-item:hover {
    background: rgba(255,255,255,.10);
    transform: translateY(-2px);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    border-radius: 9px;
    background: rgba(255,255,255,.09);
    color: #d2e2ff;
    font-size: 12px;
}

.feature-item strong {
    display: block;
    margin-bottom: 4px;
    color: rgba(255,255,255,.95);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
}

.feature-item span {
    display: block;
    color: rgba(255,255,255,.60);
    font-size: 8px;
    line-height: 1.55;
}

/* Security indicators */

.brand-security {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 17px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.13);
}

.brand-security span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,.72);
    font-size: 9px;
}

.brand-security i {
    color: #55d991;
    font-size: 10px;
}

/* =====================================================
   RIGHT LOGIN PANEL
===================================================== */

.login-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-width: 0;
    min-height: 100vh;
    padding: 32px 30px 46px;
    background:
        radial-gradient(
            circle at 85% 10%,
            rgba(1,36,113,.055),
            transparent 32%
        ),
        #f4f7fb;
}

/* Card */

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 390px;
    padding: 27px 31px 22px;
    border: 1px solid #e4e9f1;
    border-radius: 17px;
    background: #fff;
    box-shadow:
        0 20px 55px rgba(15,23,42,.075),
        0 3px 10px rgba(15,23,42,.025);
}

/* =====================================================
   TVS LOGO
===================================================== */

.portal-brand {
    margin: 0 0 19px;
    text-align: center;
}

.tvs-login-logo {
    display: block;
    width: 145px;
    max-width: 100%;
    height: 48px;
    margin: 0 auto 7px;
    object-fit: contain;
    object-position: center;
}
.portal-brand-name {
    color: var(--tvs-blue);
    font-size: 21px;
    font-weight: 500;
    line-height: 2.35;
    letter-spacing: -.5px;
}

.portal-brand-tagline {
    margin-top: 5px;
    color: #7a879a;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.6px;
}
/* =====================================================
   LOGIN HEADER
===================================================== */

.login-header {
    margin-bottom: 21px;
}

.login-eyebrow {
    margin-bottom: 7px;
    color: var(--tvs-blue);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.login-header h2 {
    margin: 0;
    color: #17233d;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.7px;
}

.login-header p {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.7;
}

/* =====================================================
   FORM
===================================================== */

#loginForm {
    width: 100%;
}

.form-group {
    margin-bottom: 14px;
}

.form-group > label {
    display: block;
    margin-bottom: 7px;
    color: #344054;
    font-size: 10px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper > i {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    transform: translateY(-50%);
    color: #98a2b3;
    font-size: 12px;
    pointer-events: none;
}

.input-wrapper input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 12px 0 38px;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    outline: none;
    background: #f9fbfe;
    color: #172033;
    font-family: inherit;
    font-size: 11px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-wrapper input::placeholder {
    color: #a0a9b8;
}

.input-wrapper input:hover {
    border-color: #c5cfdd;
}

.input-wrapper input:focus {
    border-color: #315fa6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(49,95,166,.09);
}

.input-wrapper:focus-within > i {
    color: var(--tvs-blue);
}

/* Lock / validation message */

.login-lock-message {
    display: none;
    margin-top: 7px;
    color: #c62828;
    font-size: 10px;
    line-height: 1.5;
}

.login-lock-message:not(:empty) {
    display: block;
}

/* =====================================================
   REMEMBER ME
===================================================== */

.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 3px 0 18px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #667085;
    font-size: 9px;
    font-weight: 500;
    cursor: pointer;
}

.remember input {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: var(--tvs-blue);
}

.remember-row > a {
    color: var(--tvs-blue);
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
}

.remember-row > a:hover {
    color: var(--tvs-red);
}

/* =====================================================
   SIGN IN BUTTON
===================================================== */

.login-btn,
#loginBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 45px;
    padding: 0 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(110deg, #012471, #174a9b);
    color: #fff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 7px 16px rgba(1,36,113,.17);
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.login-btn:hover,
#loginBtn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(1,36,113,.22);
}

.login-btn:active,
#loginBtn:active {
    transform: translateY(0);
}

.login-btn:disabled,
#loginBtn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

/* =====================================================
   SECURITY NOTE
===================================================== */

.login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 17px;
    padding: 10px 9px;
    border: 1px solid #e4eee8;
    border-radius: 8px;
    background: #f5faf7;
    color: #557563;
    font-size: 8px;
    line-height: 1.6;
    text-align: center;
}

.login-security i {
    flex: 0 0 auto;
    color: #218653;
    font-size: 11px;
}

/* Version */

.version-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid #edf0f4;
    color: #929bab;
    font-size: 8px;
}

.version-dot {
    color: #c4cad3;
}

/* Footer */

.developer-footer {
    position: absolute;
    right: 10px;
    bottom: 14px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    color: #8d98a8;
    font-size: 8px;
    text-align: center;
}

.developer-footer strong {
    color: #53627a;
    font-weight: 700;
}

.footer-divider {
    color: #c6ccd5;
}

/* =====================================================
   LAPTOP SCREEN-FIT
===================================================== */

@media (min-width: 761px) and (max-height: 820px) {
    .brand-panel {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .brand-badge {
        margin-bottom: 15px;
        padding: 7px 12px;
    }

    .brand-content h1 {
        font-size: clamp(31px, 3vw, 43px);
        letter-spacing: -1.3px;
    }

    .brand-description {
        margin-top: 13px;
        font-size: 11px;
        line-height: 1.7;
    }

    .feature-list {
        gap: 8px;
        margin-top: 19px;
    }

    .feature-item {
        min-height: 49px;
        padding: 9px;
        gap: 8px;
    }

    .feature-icon {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
        font-size: 10px;
    }

    .feature-item strong {
        font-size: 9px;
    }

    .feature-item span {
        font-size: 7.5px;
    }

    .brand-security {
        gap: 13px;
        margin-top: 17px;
        padding-top: 14px;
    }

    .login-panel {
        padding: 16px 25px 38px;
    }

    .login-card {
        padding: 20px 28px 17px;
    }

    .portal-brand {
        margin-bottom: 13px;
    }

    .tvs-login-logo {
        width: 130px;
        height: 39px;
        margin-bottom: 5px;
    }

    .portal-brand-name {
        font-size: 19px;
    }

    .portal-brand-tagline {
        margin-top: 3px;
        font-size: 7px;
    }

    .login-header {
        margin-bottom: 14px;
    }

    .login-header h2 {
        font-size: 23px;
    }

    .login-header p {
        margin-top: 5px;
    }

    .form-group {
        margin-bottom: 11px;
    }

    .input-wrapper input {
        height: 40px;
    }

    .remember-row {
        margin-bottom: 13px;
    }

    .login-btn,
    #loginBtn {
        min-height: 42px;
    }

    .login-security {
        margin-top: 12px;
        padding: 8px;
    }

    .version-info {
        margin-top: 10px;
        padding-top: 9px;
    }

    .developer-footer {
        bottom: 8px;
    }
}

/* =====================================================
   NARROW DESKTOP / SMALL LAPTOP
===================================================== */

@media (min-width: 761px) and (max-width: 1100px) {
    .login-layout {
        grid-template-columns: 52% 48%;
    }

    .brand-panel {
        padding-right: 25px;
        padding-left: 30px;
    }

    .brand-content h1 {
        font-size: 36px;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .feature-item {
        min-height: 43px;
    }

    .login-panel {
        padding-right: 18px;
        padding-left: 18px;
    }

    .login-card {
        max-width: 365px;
        padding-right: 24px;
        padding-left: 24px;
    }
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 760px) {
    html,
    body {
        min-height: 100%;
    }

    .login-layout {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .brand-panel {
        min-height: auto;
        padding: 34px 22px 30px;
    }

    .brand-content h1 {
        font-size: clamp(30px, 7vw, 37px);
        letter-spacing: -1px;
    }

    .brand-description {
        font-size: 11px;
    }

    .feature-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 20px;
    }

    .feature-item {
        min-height: 53px;
        padding: 10px;
    }

    .brand-security {
        gap: 12px;
        margin-top: 19px;
        padding-top: 15px;
    }

    .login-panel {
        flex: 1;
        min-height: auto;
        padding: 25px 15px 58px;
    }

    .login-card {
        max-width: 420px;
        padding: 26px 23px 21px;
    }

    .developer-footer {
        bottom: 12px;
    }
}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 420px) {
    .brand-panel {
        padding: 28px 18px;
    }

    .brand-content h1 {
        font-size: 29px;
    }

    .feature-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .feature-item {
        min-height: 48px;
    }

    .brand-security {
        gap: 10px;
    }

    .login-panel {
        padding: 20px 12px 55px;
    }

    .login-card {
        padding: 24px 19px 20px;
    }

    .tvs-login-logo {
        width: 130px;
        height: 43px;
    }

    .portal-brand-name {
        font-size: 20px;
    }

    .login-header h2 {
        font-size: 23px;
    }

    .remember-row {
        gap: 8px;
    }
}

/* =====================================================
   OPTIONAL LOGIN NOTIFICATION
===================================================== */

#loginSuccessToast {
    position: fixed;
    z-index: 9999;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(360px, calc(100vw - 30px));
    padding: 15px;
    border: 1px solid #e3e9f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 15px 45px rgba(15,23,42,.15);
}

#loginSuccessToast:empty {
    display: none;
}

.login-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: #eaf8f0;
    color: #159957;
}

.login-toast-content {
    min-width: 0;
    flex: 1;
}

.login-toast-title {
    color: #172b4d;
    font-size: 12px;
    font-weight: 700;
}

.login-toast-message {
    margin-top: 4px;
    color: #667085;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.login-toast-close {
    border: 0;
    background: transparent;
    color: #8995a7;
    cursor: pointer;
}

.login-error .login-toast-icon {
    background: #fff0ef;
    color: #d92d20;
}

.login-warning .login-toast-icon {
    background: #fff6e5;
    color: #b7791f;
}

/* LOGIN POPUP BOTTOM ANIMATED PROGRESS LINE */

#loginSuccessToast {
    position: fixed;
    overflow: hidden;
}

#loginSuccessToast::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        #012471,
        #2878df,
        #dc4226
    );
    transform: scaleX(0);
    transform-origin: left;
    animation: loginPopupProgress 3s linear forwards;
}

@keyframes loginPopupProgress {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* SMOOTH LOGIN POPUP PROGRESS LINE */

#loginSuccessToast::after {
    animation: loginPopupProgress 1.2s linear forwards;
    will-change: transform;
}

@keyframes loginPopupProgress {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Prevent Mobile Auto-Zoom While Typing */
@media screen and (max-width: 768px) {

    #userId,
    #password,
    #loginForm input[type="text"],
    #loginForm input[type="password"] {
        font-size: 16px !important;
    }

}
