@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: light;
    --brand-deep: #0d47a1;
    --brand-blue: #1565c0;
    --brand-sky: #4f8cff;
    --ink: #172b4d;
    --muted: #68778d;
    --line: #e3eaf3;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    padding: 26px clamp(16px, 4vw, 56px);
    overflow-x: hidden;
    color: var(--ink);
    font-family: 'Be Vietnam Pro', 'Segoe UI', Arial, sans-serif;
    background:
        radial-gradient(ellipse at 8% 4%, rgba(79, 140, 255, .12), transparent 34%),
        radial-gradient(ellipse at 95% 96%, rgba(13, 71, 161, .08), transparent 32%),
        #eef3fb;
}

.page-shell {
    width: min(100%, 1190px);
    min-height: calc(100vh - 52px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.brand-bar {
    min-height: 70px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: #fff;
    border: 1px solid rgba(218, 228, 241, .9);
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(23, 55, 96, .055);
}

.brand-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-identity img { width: 44px; height: 44px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { color: var(--brand-deep); font-size: 13px; letter-spacing: .035em; }
.brand-copy span { color: var(--muted); font-size: 11px; }
.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    color: var(--brand-deep);
    background: #edf4ff;
    border: 1px solid #d9e8ff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.brand-badge i { font-size: 15px; }

.index-main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.13fr) minmax(360px, .87fr);
    align-items: center;
    gap: 28px;
}

.welcome-panel {
    position: relative;
    min-height: 525px;
    padding: clamp(34px, 5vw, 58px);
    overflow: hidden;
    display: flex;
    align-items: center;
    color: #fff;
    background: linear-gradient(140deg, #0b3d88 0%, #0d55ae 54%, #2877db 100%);
    border-radius: 26px;
    box-shadow: 0 22px 52px rgba(13, 71, 161, .20);
}

.welcome-content { position: relative; z-index: 1; width: min(100%, 560px); }
.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 19px;
    color: #d8e8ff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
}
.welcome-eyebrow i { font-size: 14px; }
.welcome-panel h1 {
    max-width: 570px;
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.24;
    font-weight: 800;
    letter-spacing: -.045em;
}
.welcome-description {
    max-width: 490px;
    margin: 16px 0 27px;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    line-height: 1.8;
}
.role-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-item {
    min-height: 66px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .105);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 13px;
    backdrop-filter: blur(5px);
}
.role-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border-radius: 10px;
    font-size: 15px;
}
.role-item > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.role-item strong { font-size: 11px; font-weight: 700; }
.role-item small { color: rgba(255, 255, 255, .75); font-size: 9px; line-height: 1.4; }
.role-hint {
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #e0edff;
    font-size: 10px;
    line-height: 1.6;
}
.role-hint i { flex: 0 0 auto; margin-top: 1px; font-size: 13px; }
.welcome-decoration { position: absolute; right: -68px; bottom: -96px; width: 265px; height: 265px; pointer-events: none; }
.welcome-decoration span { position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, .10); border-radius: 50%; }
.welcome-decoration span:nth-child(2) { inset: 28px; }
.welcome-decoration span:nth-child(3) { inset: 58px; background: rgba(255, 255, 255, .035); }

.login-card {
    width: 100%;
    padding: clamp(28px, 4vw, 42px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(23, 55, 96, .105);
}
.login-heading { display: flex; align-items: center; gap: 14px; }
.login-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-blue), var(--brand-sky));
    border-radius: 15px;
    box-shadow: 0 8px 18px rgba(21, 101, 192, .22);
    font-size: 20px;
}
.login-kicker { color: #7d8da4; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.login-heading h2 { margin: 3px 0 0; color: var(--ink); font-size: 24px; font-weight: 800; letter-spacing: -.035em; }
.login-intro { margin: 17px 0 25px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.field-group { margin-bottom: 17px; }
.index-login .form-label { margin-bottom: 7px; color: #344563; font-size: 10px; font-weight: 700; }
.field-wrap { position: relative; }
.index-login .form-control {
    min-height: 48px;
    padding: 11px 14px 11px 42px;
    color: var(--ink);
    background: #fbfcfe;
    border: 1px solid #dce5f0;
    border-radius: 11px;
    box-shadow: none;
    font: inherit;
    font-size: 11px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.index-login .form-control::placeholder { color: #9aa8ba; }
.index-login .form-control:focus { background: #fff; border-color: #5b9af0; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.field-icon { position: absolute; z-index: 1; top: 50%; left: 15px; transform: translateY(-50%); color: #8a9ab0; font-size: 14px; }
.password-wrap .form-control { padding-right: 47px; }
.toggle-eye {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 30px;
    height: 30px;
    padding: 0;
    transform: translateY(-50%);
    color: #7d8da4;
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-size: 15px;
    cursor: pointer;
}
.toggle-eye:hover { color: var(--brand-blue); background: #edf4ff; }
.toggle-eye:focus-visible { outline: 2px solid #5b9af0; outline-offset: 1px; }
.btn-login {
    min-height: 47px;
    margin-top: 3px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    background: linear-gradient(100deg, var(--brand-deep), var(--brand-blue));
    border: 0;
    border-radius: 11px;
    box-shadow: 0 8px 17px rgba(13, 71, 161, .19);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-login:hover { color: #fff; filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 11px 20px rgba(13, 71, 161, .23); }
.btn-login:active { color: #fff !important; transform: translateY(0); }
.btn-login > i { font-size: 17px; }
.login-error {
    margin: -2px 0 14px;
    padding: 10px 12px;
    color: #b42332;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
}
.secure-note { margin-top: 20px; padding-top: 15px; display: flex; align-items: flex-start; gap: 8px; color: #77869b; border-top: 1px solid #edf1f6; font-size: 9px; line-height: 1.6; }
.secure-note i { color: var(--brand-blue); font-size: 13px; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; color: #7e8da1; font-size: 9px; }
.footer-dot { padding: 0 4px; color: #aab6c6; }

.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(8, 16, 32, .96);
}
.scan { position: relative; width: 90px; height: 90px; border: 3px solid #3b82f6; border-radius: 50%; animation: pulse .9s infinite; }
.scan::after { position: absolute; inset: 0; content: ''; border: 2px solid rgba(59, 130, 246, .3); border-radius: 50%; animation: rotate .7s linear infinite; }
.boot-text { max-width: 92%; margin-top: 14px; font-size: 13px; opacity: .9; text-align: center; }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .45); } 100% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); } }

@media (max-width: 920px) {
    .index-main { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .login-card { order: -1; max-width: 540px; justify-self: center; }
    .welcome-panel { min-height: 0; padding: 34px; }
    .welcome-panel h1 { font-size: clamp(29px, 5vw, 40px); }
    .welcome-description { margin-bottom: 20px; }
    .welcome-content { width: 100%; }
}

@media (max-width: 560px) {
    body { padding: 12px; }
    .page-shell { min-height: calc(100vh - 24px); gap: 14px; }
    .brand-bar { min-height: 62px; padding: 9px 12px; border-radius: 13px; }
    .brand-identity { gap: 9px; }
    .brand-identity img { width: 38px; height: 38px; }
    .brand-copy strong { font-size: 10px; }
    .brand-copy span { max-width: 205px; font-size: 8px; }
    .brand-badge { padding: 7px 9px; gap: 5px; font-size: 9px; }
    .brand-badge i { font-size: 12px; }
    .index-main { gap: 14px; }
    .login-card { padding: 25px 21px; border-radius: 19px; }
    .login-intro { margin: 13px 0 21px; }
    .welcome-panel { padding: 27px 21px; border-radius: 19px; }
    .welcome-eyebrow { font-size: 8px; }
    .welcome-panel h1 { font-size: 29px; }
    .welcome-description { font-size: 10px; }
    .role-list { gap: 8px; }
    .role-item { min-height: 60px; padding: 8px; gap: 7px; border-radius: 10px; }
    .role-icon { width: 29px; height: 29px; flex-basis: 29px; border-radius: 8px; font-size: 12px; }
    .role-item strong { font-size: 9px; }
    .role-item small { font-size: 7px; }
    .role-hint { margin-top: 14px; font-size: 8px; }
    .page-footer { flex-direction: column; align-items: center; gap: 3px; padding: 2px 0; font-size: 8px; text-align: center; }
    .scan { width: 64px; height: 64px; }
    .boot-text { margin-top: 10px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
