:root {
    --cb-primary: #2483e5;
    --cb-primary-dark: #1768b8;
    --cb-success: #34c6a3;
    --cb-ink: #18233a;
    --cb-muted: #738097;
    --cb-line: #e8edf3;
}

* { box-sizing: border-box; }

body.cb-login-page {
    min-height: 100vh;
    margin: 0;
    color: var(--cb-ink);
    background: #f4f7fb;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.cb-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(420px, .82fr);
}

.cb-login-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #17243a url('../img/comebuy/login-hero.jpg') center / cover no-repeat;
}

.cb-login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(16, 31, 55, .91) 0%, rgba(23, 53, 86, .72) 50%, rgba(20, 63, 88, .35) 100%),
        linear-gradient(0deg, rgba(13, 30, 52, .68), transparent 58%);
}

.cb-login-visual::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -170px;
    bottom: -190px;
    border: 70px solid rgba(52, 198, 163, .12);
    border-radius: 50%;
}

.cb-visual-content {
    position: relative;
    z-index: 1;
    min-height: 100%;
    padding: clamp(42px, 6vw, 88px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
}

.cb-wordmark {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 13px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 50px rgba(10, 34, 62, .22);
}

.cb-wordmark img { width: 190px; height: auto; display: block; }

.cb-visual-copy { max-width: 650px; padding: 80px 0; }

.cb-eyebrow {
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #8ed8ff;
}

.cb-visual-copy h1 {
    max-width: 610px;
    margin: 0 0 22px;
    font-size: clamp(42px, 5.4vw, 78px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.04em;
    text-shadow: 0 6px 35px rgba(9, 29, 52, .32);
}

.cb-visual-copy p {
    max-width: 530px;
    margin: 0;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .84);
}

.cb-visual-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
}

.cb-visual-footer::before {
    content: "";
    width: 38px;
    height: 2px;
    background: var(--cb-success);
}

.cb-login-panel {
    position: relative;
    min-height: 100vh;
    padding: 56px clamp(34px, 6vw, 88px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(36, 131, 229, .1), transparent 34%),
        #f4f7fb;
}

.cb-login-panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 100%;
    background: linear-gradient(180deg, var(--cb-primary), var(--cb-success));
}

.cb-login-card {
    width: min(100%, 500px);
    padding: clamp(34px, 4vw, 48px);
    border: 1px solid var(--cb-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 42px rgba(34, 52, 80, .09);
}

.cb-mobile-logo { display: none; margin-bottom: 34px; }
.cb-mobile-logo img { width: 170px; }

.cb-login-card .cb-kicker {
    margin-bottom: 12px;
    color: var(--cb-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
}

.cb-login-card h2 {
    margin: 0 0 12px;
    font-size: clamp(32px, 3vw, 44px);
    font-weight: 800;
    letter-spacing: -.035em;
}

.cb-login-intro {
    margin-bottom: 34px;
    color: var(--cb-muted);
    font-size: 15px;
    line-height: 1.7;
}

.cb-field { position: relative; margin-bottom: 18px; }

.cb-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}

.cb-input-wrap { position: relative; }

.cb-input-wrap i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a49a94;
}

.cb-input-wrap .form-control {
    height: 58px;
    padding: 0 18px 0 48px;
    border: 1px solid #dce4ee;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 15px;
    transition: .2s ease;
}

.cb-input-wrap .form-control:focus {
    border-color: var(--cb-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(36, 131, 229, .11);
}

.cb-login-button {
    width: 100%;
    min-height: 58px;
    margin-top: 8px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--cb-primary), #2d8cff 55%, #28aa8d);
    box-shadow: 0 14px 32px rgba(36, 131, 229, .24);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .08em;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cb-login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(36, 131, 229, .3);
}

.cb-login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    color: var(--cb-muted);
    font-size: 12px;
}

.cb-company-code {
    padding: 7px 11px;
    border-radius: 999px;
    color: #247cc7;
    background: #eaf4ff;
    font-weight: 800;
    letter-spacing: .06em;
}

.cb-security-note { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--cb-line); color: #8390a4; font-size: 12px; line-height: 1.6; }

@media (max-width: 991.98px) {
    .cb-login-shell { grid-template-columns: 1fr; }
    .cb-login-visual { display: none; }
    .cb-login-panel { min-height: 100vh; padding: 40px 24px; background: linear-gradient(155deg, #eef5fc, #f8fbff 55%, #edf9f6); }
    .cb-login-panel::before { width: 100%; height: 7px; }
    .cb-mobile-logo { display: block; }
}

@media (max-width: 575.98px) {
    .cb-login-panel { align-items: flex-start; padding-top: 58px; }
    .cb-login-card { padding: 28px 22px; }
    .cb-login-card h2 { font-size: 34px; }
    .cb-login-meta { align-items: flex-start; flex-direction: column; }
}
