@charset "UTF-8";

:root {
    --login-accent: #34ddb2;
    --login-accent-bright: #43e2bc;
    --login-accent-dark: #19bd91;
    --login-text: #f4f8fb;
    --login-muted: #9cacbb;
    --login-panel: rgba(5, 17, 28, .88);
    --login-border: rgba(131, 160, 179, .27);
}

* { box-sizing: border-box; }

html,
body { min-width: 320px; min-height: 100%; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--login-text);
    background: #061522;
    font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select { font: inherit; }

.login-page {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(2, 14, 25, .08) 0%, rgba(2, 14, 25, .05) 45%, rgba(2, 14, 25, .38) 100%),
        url("../images/auth/fleet-login-night-v2.png") center center / cover no-repeat;
    isolation: isolate;
}

.login-page::before,
.login-page::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.login-page::before {
    background:
        linear-gradient(180deg, rgba(2, 13, 23, .30) 0%, rgba(2, 13, 23, .02) 47%, rgba(2, 13, 23, .54) 100%),
        radial-gradient(circle at 27% 27%, rgba(8, 29, 45, .12), rgba(2, 13, 23, .16) 46%, rgba(2, 13, 23, .3) 100%);
}

.login-page::after {
    opacity: .13;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

.login-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(25px, 3.3vw, 46px) clamp(28px, 5.2vw, 86px) clamp(24px, 3vw, 42px);
    flex-direction: column;
}

.login-topbar {
    z-index: 2;
    display: flex;
    min-height: 52px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.fleet-wordmark,
.login-brand { display: inline-flex; align-items: center; gap: 17px; }

.fleet-mark {
    position: relative;
    display: block;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    transform: rotate(-45deg);
}

.fleet-mark i {
    position: absolute;
    display: block;
    width: 9px;
    height: 35px;
    background: linear-gradient(180deg, #42e5b9, #24caa1);
    border-radius: 8px;
    box-shadow: 0 0 14px rgba(52, 221, 178, .15);
}

.fleet-mark i:nth-child(1) { top: 0; left: 5px; height: 29px; }
.fleet-mark i:nth-child(2) { top: 8px; left: 17px; height: 38px; }
.fleet-mark i:nth-child(3) { top: 16px; left: 29px; height: 38px; }
.fleet-mark i:nth-child(4) { top: 25px; left: 41px; height: 27px; }

.fleet-wordmark-copy { display: flex; flex-direction: column; }

.fleet-wordmark-copy strong {
    color: #f5f7f9;
    font-family: Arial, sans-serif;
    font-size: clamp(1.1rem, 1.55vw, 1.48rem);
    font-weight: 700;
    letter-spacing: .18em;
    line-height: 1.15;
}

.fleet-wordmark-copy small {
    margin-top: 6px;
    color: #8797a8;
    font-family: Arial, sans-serif;
    font-size: .57rem;
    font-weight: 600;
    letter-spacing: .25em;
}

.login-system-label {
    display: flex;
    align-items: center;
    gap: 19px;
    padding-top: 2px;
    color: #b0bdc8;
    font-size: .79rem;
    font-weight: 600;
    white-space: nowrap;
}

.login-system-label span {
    display: block;
    width: 31px;
    height: 2px;
    background: var(--login-accent);
    border-radius: 99px;
    box-shadow: 0 0 10px rgba(52, 221, 178, .55);
}

.login-topbar-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.login-theme-picker {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #b0bdc8;
}

.login-theme-picker > label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: .75rem;
    font-weight: 650;
    white-space: nowrap;
}

.login-theme-picker > label i {
    color: var(--login-accent);
    font-size: 1rem;
}

.login-theme-select-wrap {
    position: relative;
}

.login-theme-select-wrap select {
    width: 112px;
    height: 38px;
    padding: 0 34px 0 13px;
    color: #e8f0f4;
    background: rgba(8, 25, 37, .76);
    border: 1px solid rgba(119, 154, 170, .34);
    border-radius: 9px;
    outline: none;
    font-size: .76rem;
    font-weight: 650;
    cursor: pointer;
    appearance: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-theme-select-wrap select:hover,
.login-theme-select-wrap select:focus {
    background: rgba(10, 31, 43, .94);
    border-color: var(--login-accent);
    box-shadow: 0 0 0 3px rgba(52, 221, 178, .1);
}

.login-theme-select-wrap > i {
    position: absolute;
    top: 50%;
    right: 10px;
    color: #8193a1;
    font-size: 1.05rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.login-layout {
    z-index: 1;
    display: grid;
    width: 100%;
    max-width: 1540px;
    margin: auto;
    padding: 16px 0 26px;
    grid-template-columns: minmax(0, 1fr) minmax(405px, 515px);
    gap: clamp(42px, 8vw, 125px);
    align-items: center;
}

.login-story {
    max-width: 790px;
    padding-left: clamp(16px, 1.5vw, 28px);
    transform: translateY(-14px);
}

.login-story h1 {
    margin: 0;
    color: #f5f7f9;
    font-size: clamp(2.7rem, 4.25vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.12;
    text-shadow: 0 5px 25px rgba(0, 0, 0, .38);
}

.login-story h1 strong {
    display: block;
    color: var(--login-accent-bright);
    font-weight: 800;
    white-space: nowrap;
}

.login-story > p {
    margin: 22px 0 27px;
    color: #b4c0cc;
    font-size: clamp(1rem, 1.35vw, 1.32rem);
    font-weight: 400;
    line-height: 1.48;
    text-shadow: 0 3px 15px rgba(0, 0, 0, .6);
}

.login-benefits { display: flex; flex-wrap: wrap; gap: clamp(22px, 3.5vw, 52px); }
.login-benefit { display: flex; align-items: center; gap: 14px; }

.login-benefit > span {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    color: var(--login-accent);
    background: rgba(7, 31, 43, .4);
    border: 1px solid rgba(109, 145, 157, .28);
    border-radius: 50%;
    box-shadow: inset 0 0 18px rgba(52, 221, 178, .04);
    place-items: center;
}

.login-benefit > span i { font-size: 1.65rem; }

.login-benefit p {
    margin: 0;
    color: #c2ccd4;
    font-size: .83rem;
    line-height: 1.5;
}

.login-benefit p strong { color: #eef3f6; font-weight: 650; }

.login-card {
    width: min(100%, 515px);
    padding: clamp(31px, 3vw, 46px) clamp(30px, 3.2vw, 48px) 29px;
    background: linear-gradient(150deg, rgba(14, 31, 43, .92), rgba(5, 16, 27, .9));
    border: 1px solid rgba(86, 211, 177, .36);
    border-radius: 24px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, .44), 0 0 31px rgba(29, 209, 159, .08), inset 0 1px 0 rgba(255, 255, 255, .035);
    backdrop-filter: blur(18px) saturate(115%);
    -webkit-backdrop-filter: blur(18px) saturate(115%);
}

.login-brand {
    min-height: 74px;
    padding: 0 3px 25px;
    border-bottom: 1px solid rgba(132, 154, 169, .22);
}

.fleet-mark-sm { width: 56px; height: 56px; }
.login-brand .fleet-wordmark-copy strong { font-size: 1.32rem; }

.login-brand .fleet-wordmark-copy small {
    color: #8f9dac;
    font-family: inherit;
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: 0;
}

.login-form { padding-top: 28px; }
.login-heading { margin-bottom: 26px; }

.login-heading h2 {
    margin: 0 0 7px;
    color: #f3f6f8;
    font-size: 1.62rem;
    font-weight: 750;
    line-height: 1.3;
}

.login-heading p { margin: 0; color: #93a3b2; font-size: .86rem; }
.login-field { margin-bottom: 18px; }

.login-field label {
    display: block;
    margin-bottom: 8px;
    color: #d4dde3;
    font-size: .83rem;
    font-weight: 650;
}

.login-control { position: relative; }

.login-control > i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    color: #8292a2;
    font-size: 1.12rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.login-control input {
    width: 100%;
    height: 55px;
    padding: 0 50px 0 46px;
    color: #f2f6f8;
    background: rgba(12, 27, 40, .7);
    border: 1px solid rgba(119, 143, 160, .37);
    border-radius: 11px;
    outline: none;
    font-size: .88rem;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-control input::placeholder { color: #778897; }

.login-control input:focus {
    background: rgba(11, 29, 40, .88);
    border-color: var(--login-accent);
    box-shadow: 0 0 0 2px rgba(52, 221, 178, .08), 0 0 20px rgba(52, 221, 178, .08);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #8697a7;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    place-items: center;
    transform: translateY(-50%);
    transition: color .16s ease, background .16s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible { color: var(--login-accent); background: rgba(52, 221, 178, .08); outline: none; }

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 23px;
    color: #a5b2be;
    font-size: .79rem;
    cursor: pointer;
}

.login-remember input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--login-accent-dark);
}

.login-submit {
    display: flex;
    width: 100%;
    height: 59px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #03251c;
    background: linear-gradient(100deg, #35ddb2 0%, #42dfb8 55%, #28cda3 100%);
    border: 1px solid rgba(91, 247, 204, .38);
    border-radius: 11px;
    box-shadow: 0 12px 30px rgba(21, 200, 148, .19), inset 0 1px 0 rgba(255, 255, 255, .28);
    font-size: .94rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.login-submit:hover {
    box-shadow: 0 15px 35px rgba(21, 200, 148, .28), inset 0 1px 0 rgba(255, 255, 255, .3);
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.login-submit:focus-visible { outline: 3px solid rgba(52, 221, 178, .25); outline-offset: 3px; }
.login-submit .btn-text { display: inline-flex; align-items: center; gap: 15px; }
.login-submit .btn-text i { font-size: 1.15rem; }
.login-submit .btn-loading { display: none; align-items: center; gap: 8px; }
.login-submit.is-loading .btn-text { display: none; }
.login-submit.is-loading .btn-loading { display: inline-flex; }
.login-submit:disabled { cursor: wait; opacity: .82; transform: none; }

.login-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(3, 37, 28, .25);
    border-top-color: #03251c;
    border-radius: 50%;
    animation: login-spin .72s linear infinite;
}

.login-help {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 3px;
    color: #8e9eab;
    font-size: .74rem;
    text-align: center;
}

.login-help i { color: var(--login-accent); font-size: 1.25rem; }

.login-footer {
    margin-top: 2px;
    padding-top: 18px;
    color: #687986;
    border-top: 1px solid rgba(132, 154, 169, .2);
    font-size: .67rem;
    text-align: center;
}

.login-forward {
    z-index: 1;
    display: flex;
    height: 16px;
    align-items: center;
    gap: 9px;
    color: #7b8b99;
    font-family: Arial, sans-serif;
    font-size: .49rem;
    font-weight: 600;
    letter-spacing: .28em;
}

.login-forward span,
.login-forward i {
    display: block;
    width: 38px;
    height: 3px;
    background: var(--login-accent);
    border-radius: 99px;
}

.login-forward i { width: 26px; background: #687786; }

/* New visitors start here. The stored choice switches these surfaces back to dark. */
html[data-dashboard-theme="light"] body {
    color: #17324a;
    background: #edf5fa;
}

html[data-dashboard-theme="light"] .login-page {
    background:
        linear-gradient(90deg, rgba(244, 250, 253, .16) 0%, rgba(239, 248, 252, .05) 52%, rgba(235, 245, 250, .32) 100%),
        url("../images/auth/fleet-dashboard-day-v1.png") center center / cover no-repeat;
}

html[data-dashboard-theme="light"] .login-page::before {
    background:
        linear-gradient(90deg, rgba(246, 251, 254, .9) 0%, rgba(242, 249, 252, .7) 34%, rgba(237, 247, 251, .12) 61%, rgba(231, 243, 248, .26) 100%),
        linear-gradient(180deg, rgba(247, 252, 254, .16), rgba(227, 240, 247, .32));
}

html[data-dashboard-theme="light"] .login-page::after {
    opacity: .035;
    mix-blend-mode: multiply;
}

html[data-dashboard-theme="light"] .fleet-wordmark-copy strong,
html[data-dashboard-theme="light"] .login-story h1 {
    color: #12314a;
    text-shadow: none;
}

html[data-dashboard-theme="light"] .fleet-wordmark-copy small,
html[data-dashboard-theme="light"] .login-system-label,
html[data-dashboard-theme="light"] .login-theme-picker {
    color: #607b90;
}

html[data-dashboard-theme="light"] .login-story h1 strong {
    color: #079b83;
}

html[data-dashboard-theme="light"] .login-story > p {
    color: #4e6b80;
    text-shadow: none;
}

html[data-dashboard-theme="light"] .login-benefit > span {
    color: #079b83;
    background: rgba(255, 255, 255, .74);
    border-color: rgba(33, 115, 138, .17);
    box-shadow: 0 8px 22px rgba(31, 79, 105, .08);
}

html[data-dashboard-theme="light"] .login-benefit p { color: #526d80; }
html[data-dashboard-theme="light"] .login-benefit p strong { color: #173b55; }

html[data-dashboard-theme="light"] .login-theme-select-wrap select {
    color: #173b55;
    background: rgba(255, 255, 255, .84);
    border-color: rgba(40, 105, 132, .2);
    box-shadow: 0 5px 16px rgba(38, 79, 103, .06);
}

html[data-dashboard-theme="light"] .login-theme-select-wrap select:hover,
html[data-dashboard-theme="light"] .login-theme-select-wrap select:focus {
    background: #fff;
    border-color: #0ba88d;
}

html[data-dashboard-theme="light"] .login-theme-select-wrap > i { color: #607b90; }

html[data-dashboard-theme="light"] .login-card {
    background: linear-gradient(150deg, rgba(255, 255, 255, .95), rgba(248, 252, 254, .91));
    border-color: rgba(58, 128, 151, .22);
    box-shadow: 0 28px 70px rgba(40, 81, 107, .18), 0 0 0 1px rgba(255, 255, 255, .62) inset;
}

html[data-dashboard-theme="light"] .login-brand { border-bottom-color: #dce8ee; }
html[data-dashboard-theme="light"] .login-brand .fleet-wordmark-copy small { color: #6c8293; }
html[data-dashboard-theme="light"] .login-heading h2 { color: #17324a; }
html[data-dashboard-theme="light"] .login-heading p { color: #6d8394; }
html[data-dashboard-theme="light"] .login-field label { color: #28465d; }
html[data-dashboard-theme="light"] .login-control > i { color: #6d8495; }

html[data-dashboard-theme="light"] .login-control input {
    color: #17324a;
    background: #fff;
    border-color: #cbdbe4;
    box-shadow: 0 4px 14px rgba(29, 76, 104, .035);
}

html[data-dashboard-theme="light"] .login-control input::placeholder { color: #91a3b0; }

html[data-dashboard-theme="light"] .login-control input:focus {
    background: #fff;
    border-color: #0ca88e;
    box-shadow: 0 0 0 3px rgba(12, 168, 142, .11);
}

html[data-dashboard-theme="light"] .password-toggle { color: #718899; }
html[data-dashboard-theme="light"] .login-remember { color: #5e7688; }
html[data-dashboard-theme="light"] .login-help { color: #697f90; }

html[data-dashboard-theme="light"] .login-footer {
    color: #8496a3;
    border-top-color: #dce8ee;
}

html[data-dashboard-theme="light"] .login-forward { color: #55758b; }
html[data-dashboard-theme="light"] .login-forward i { background: #8aa1af; }

@keyframes login-spin { to { transform: rotate(360deg); } }

@media (max-width: 1350px) and (min-width: 981px) {
    .login-benefits { gap: 17px; }
    .login-benefit { gap: 8px; }
    .login-benefit > span { width: 46px; height: 46px; }
    .login-benefit > span i { font-size: 1.4rem; }
    .login-benefit p { font-size: .72rem; }
}

@media (max-width: 1220px) {
    .login-shell { padding-right: 44px; padding-left: 44px; }
    .login-layout { grid-template-columns: minmax(0, 1fr) minmax(390px, 450px); gap: 48px; }
    .login-story { padding-left: 0; }
    .login-story h1 { font-size: clamp(2.55rem, 4.2vw, 3.6rem); }
    .login-story > p { font-size: 1rem; }
    .login-benefits { gap: 20px; }
    .login-benefit { gap: 10px; }
    .login-benefit > span { width: 48px; height: 48px; }
}

@media (max-width: 980px) {
    .login-page { background-position: 36% center; }
    .login-page::before { background: linear-gradient(90deg, rgba(2, 13, 23, .44), rgba(2, 13, 23, .55)); }
    .login-shell { padding: 26px; }
    .login-layout { grid-template-columns: minmax(0, 1fr) minmax(365px, 430px); gap: 28px; }
    .login-story h1 { font-size: clamp(2.25rem, 4.5vw, 3rem); }
    .login-story h1 strong { white-space: normal; }
    .login-story > p br { display: none; }
    .login-benefits { gap: 11px; }
    .login-benefit > span { width: 44px; height: 44px; }
    .login-benefit p { font-size: .74rem; }
    .login-card { padding: 30px; }
}

@media (max-width: 760px) {
    .login-page { overflow-y: auto; background-position: 42% center; }
    .login-page::before { background: rgba(2, 13, 23, .64); }
    .login-shell { min-height: 100svh; padding: 22px 18px; }
    .login-topbar { align-items: center; }
    .fleet-wordmark { gap: 11px; }
    .fleet-wordmark > .fleet-mark { width: 43px; height: 43px; transform: rotate(-45deg) scale(.78); transform-origin: left center; }
    .fleet-wordmark-copy strong { font-size: 1rem; }
    .fleet-wordmark-copy small { margin-top: 4px; font-size: .47rem; }
    .login-system-label { display: none; }
    .login-topbar-actions { gap: 0; }
    .login-layout { display: block; margin: auto; padding: 24px 0; }
    .login-story { display: none; }
    .login-card { width: min(100%, 460px); margin: 0 auto; }
    .login-forward { display: none; }
}

@media (max-width: 480px) {
    .login-shell { padding: 18px 14px; }
    .login-layout { padding: 17px 0 5px; }
    .login-card { padding: 27px 21px 22px; border-radius: 19px; }
    .login-brand { min-height: auto; padding-bottom: 20px; gap: 12px; }
    .fleet-mark-sm { width: 49px; height: 49px; transform: rotate(-45deg) scale(.85); transform-origin: center; }
    .login-brand .fleet-wordmark-copy strong { font-size: 1.1rem; }
    .login-form { padding-top: 23px; }
    .login-heading { margin-bottom: 22px; }
    .login-heading h2 { font-size: 1.42rem; }
    .login-control input { height: 52px; }
    .login-submit { height: 55px; }
    .login-theme-picker > label span { display: none; }
    .login-theme-picker { gap: 5px; }
    .login-theme-select-wrap select { width: 98px; padding-left: 10px; }
}

@media (max-height: 800px) and (min-width: 761px) {
    .login-shell { padding-top: 22px; padding-bottom: 20px; }
    .fleet-mark { transform: rotate(-45deg) scale(.84); }
    .login-layout { padding-top: 8px; padding-bottom: 12px; }
    .login-card { padding-top: 28px; padding-bottom: 22px; }
    .login-brand { min-height: 63px; padding-bottom: 18px; }
    .login-form { padding-top: 21px; }
    .login-heading { margin-bottom: 20px; }
    .login-field { margin-bottom: 14px; }
    .login-control input { height: 50px; }
    .login-remember { margin-bottom: 17px; }
    .login-submit { height: 52px; }
    .login-help { min-height: 45px; }
    .login-footer { padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
