:root {
    --bg: #ffffff;
    --blue: #2e77c0;
    --body: #3a5163;
    --faint: #93a4b2;
    --grad: linear-gradient(115deg, #2e77c0 0%, #159390 52%, #35a867 100%);
    --green: #35a867;
    --ink: #0e2233;
    --ink-band: #0e2536;
    --ink-band-2: #0a1c2b;
    --line: #e2eaf0;
    --line-dk: #20394c;
    --muted: #697e90;
    --teal: #159390;
    --tint: #f3f8fb;
    --tint-2: #eaf3f6;
    --error: #c23b3b;
    --ok: #2e9e6b;
    --shadow: 0 24px 60px rgba(10, 28, 43, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: Inter, system-ui, sans-serif;
    color: var(--body);
    background: var(--tint);
}

.login-shell {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
}

.brand-panel {
    position: relative;
    background:
        radial-gradient(900px 420px at -10% -10%, rgba(46, 119, 192, 0.28), transparent 55%),
        radial-gradient(700px 380px at 110% 110%, rgba(53, 168, 103, 0.22), transparent 50%),
        linear-gradient(165deg, var(--ink-band) 0%, var(--ink-band-2) 100%);
    color: #fff;
    padding: 28px 40px 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
    pointer-events: none;
}

.brand-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.brand-mark img {
    width: 62px;
    height: 40px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 4px 6px;
}

.brand-name {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 19px;
    line-height: 1.05;
    letter-spacing: -0.19px;
    color: #fff;
}

.brand-tagline {
    display: block;
    margin-top: 4px;
    font-size: 9.5px;
    letter-spacing: 1.05px;
    text-transform: uppercase;
    color: #7fd4d1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #7fd4d1;
    font-weight: 600;
    margin-bottom: 8px;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--grad);
    border-radius: 2px;
}

.brand-panel h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(28px, 3.2vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 700;
    max-width: 16ch;
    margin-bottom: 8px;
}

.lede {
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
    max-width: 48ch;
    margin-bottom: 14px;
}

.growth-tree {
    position: relative;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
    padding: 2px 0 4px;
}

.growth-tree::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 10px;
    bottom: 10px;
    width: 3px;
    transform: translateX(-50%);
    border-radius: 99px;
    background: linear-gradient(180deg, #2e77c0 0%, #159390 48%, #35a867 100%);
    box-shadow: 0 0 16px rgba(53, 168, 103, 0.28);
}

.tree-node {
    display: grid;
    grid-template-columns: 1fr 18px 1fr;
    align-items: center;
    column-gap: 12px;
}

.tree-node--left .tree-leaf {
    grid-column: 1;
    justify-self: end;
    border-radius: 28px 12px 28px 36px;
}

.tree-node--right .tree-leaf {
    grid-column: 3;
    justify-self: start;
    border-radius: 12px 28px 36px 28px;
}

.tree-node--left .tree-bud {
    grid-column: 2;
}

.tree-node--right .tree-bud {
    grid-column: 2;
}

.tree-bud {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #7fd4d1;
    border: 3px solid #0e2536;
    box-shadow: 0 0 0 3px rgba(53, 168, 103, 0.55);
    z-index: 1;
}

.tree-leaf {
    position: relative;
    width: min(100%, 220px);
    padding: 8px 12px;
    background:
        radial-gradient(120px 70px at 0% 0%, rgba(53, 168, 103, 0.18), transparent 70%),
        rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(127, 212, 209, 0.28);
    color: #fff;
}

.tree-node--left .tree-leaf::after,
.tree-node--right .tree-leaf::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 14px;
    height: 2px;
    background: rgba(127, 212, 209, 0.7);
}

.tree-node--left .tree-leaf::after {
    right: -14px;
}

.tree-node--right .tree-leaf::after {
    left: -14px;
}

.tree-num {
    display: inline-block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #7fd4d1;
    margin-bottom: 2px;
}

.tree-leaf h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.tree-leaf p {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.66);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.chip {
    font-size: 11px;
    font-weight: 600;
    color: #d7e8f0;
    border: 1px solid var(--line-dk);
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
}

.brand-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-top: auto;
    padding-top: 12px;
    width: 100%;
}

.brand-location {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.58);
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-align: right;
}

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 28px;
    background: #fff;
    overflow: hidden;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.mobile-brand img {
    width: 54px;
    height: 35px;
    object-fit: contain;
}

.form-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 8px;
}

.login-card h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 26px;
    color: var(--ink);
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.form-copy {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.4;
    margin-bottom: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-weight: 600;
    font-size: 13px;
}

.input-wrap {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 11px 44px 11px 14px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-size: 15px;
    font-family: Inter, system-ui, sans-serif;
    color: var(--ink);
    background: var(--tint);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group input:focus {
    outline: none;
    background: #fff;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(21, 147, 144, 0.12);
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.toggle-password:hover {
    background: var(--tint-2);
    color: var(--ink);
}

.login-btn,
.microsoft-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: Inter, system-ui, sans-serif;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.login-btn {
    margin-top: 4px;
    border: 0;
    color: #fff;
    background: var(--grad);
    box-shadow: 0 10px 24px rgba(46, 119, 192, 0.22);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(21, 147, 144, 0.28);
}

.login-btn:disabled,
.microsoft-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    color: var(--faint);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.microsoft-btn {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.microsoft-btn:hover {
    border-color: var(--blue);
    background: var(--tint);
}

.microsoft-icon {
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjRjI1MDIyIiBkPSJNMSAxLjVoOXYwSDB6Ii8+PHBhdGggZmlsbD0iIzdGQkEwMCIgZD0iTTEwLjUgMS41aDl2OWgtOXoiLz48cGF0aCBmaWxsPSIjMDBBNEVGIiBkPSJNMSAxMC41aDl2OUgxeiIvPjxwYXRoIGZpbGw9IiNGRkI5MDAiIGQ9Ik0xMC41IDEwLjVoOXY5aC05eiIvPjwvZz48L3N2Zz4=") no-repeat center;
    background-size: contain;
}

#message {
    min-height: 0;
    margin-top: 10px;
}

.error-message,
.success-message {
    font-size: 13.5px;
    text-align: center;
    padding: 10px 12px;
    border-radius: 8px;
}

.error-message {
    color: var(--error);
    background: #fdeeee;
}

.success-message {
    color: var(--ok);
    background: #eaf8f1;
}

.form-foot {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.form-foot a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
}

.form-foot a:hover {
    text-decoration: underline;
}

@media (max-width: 980px) {
    html,
    body,
    .login-shell {
        height: auto;
        max-height: none;
        overflow: auto;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .form-panel {
        order: 1;
        padding: 20px 20px 24px;
        align-items: flex-start;
    }

    .brand-panel {
        order: 2;
        padding: 20px 20px 24px;
        min-height: auto;
    }

    .brand-mark {
        margin-bottom: 14px;
    }

    .brand-panel h1 {
        max-width: none;
        font-size: 28px;
    }

    .lede {
        margin-bottom: 12px;
    }

    .growth-tree::before {
        left: 8px;
        transform: none;
    }

    .tree-node,
    .tree-node--left,
    .tree-node--right {
        grid-template-columns: 18px 1fr;
        column-gap: 12px;
    }

    .tree-node--left .tree-bud,
    .tree-node--right .tree-bud {
        grid-column: 1;
        grid-row: 1;
    }

    .tree-node--left .tree-leaf,
    .tree-node--right .tree-leaf {
        grid-column: 2;
        justify-self: stretch;
        width: 100%;
        border-radius: 12px 28px 28px 22px;
    }

    .tree-node--left .tree-leaf::after,
    .tree-node--right .tree-leaf::after {
        left: -14px;
        right: auto;
    }
}

@media (max-width: 640px) {
    .brand-panel {
        padding: 22px 18px 26px;
    }
}
