/* ═══════════════════════════════════════
   CBRE Login — Stylesheet
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --cbre-green: #003F2D;
    --cbre-accent: #17E88F;
    --cbre-dark: #012A2D;
    --cbre-grey: #435254;
    --cbre-sage: #96B3B6;
    --cbre-celadon: #C0D4CB;
    --cbre-light-grey: #CAD1D3;
    --cbre-white: #FFFFFF;
    --cbre-off-white: #f8faf9;
}

html, body {
    height: 100%;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--cbre-off-white);
    color: var(--cbre-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    display: flex;
    min-height: 100vh;
}

a {
    color: var(--cbre-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: color .15s;
}

a:hover {
    color: var(--cbre-accent);
    text-decoration: underline;
}


/* ─────────────────────────────────────
   LEFT BRAND PANEL
───────────────────────────────────── */

.brand-panel {
    flex: 0 0 42%;
    background: var(--cbre-dark);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 52px;
    overflow: hidden;
}

.brand-panel .grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(23,232,143,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23,232,143,.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(23,232,143,.07) 0%, transparent 70%);
    pointer-events: none;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 1px solid rgba(23,232,143,.08);
    pointer-events: none;
}

.brand-logo {
    position: relative;
    z-index: 2;
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--cbre-accent);
}

.brand-headline {
    position: relative;
    z-index: 2;
    max-width: 340px;
}

.brand-headline h1 {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.08;
    color: var(--cbre-white);
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.brand-headline h1 em {
    font-style: normal;
    color: var(--cbre-accent);
}

.brand-headline p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--cbre-sage);
    font-weight: 400;
}

.brand-copyright {
    position: relative;
    z-index: 2;
    font-size: 12px;
    color: rgba(150,179,182,.4);
    letter-spacing: .3px;
}


/* ─────────────────────────────────────
   RIGHT LOGIN PANEL
───────────────────────────────────── */

.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    overflow-y: auto;
}

.login-container {
    width: 100%;
    max-width: 400px;
    animation: fadeUp .5s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-container h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--cbre-dark);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--cbre-grey);
    margin-bottom: 32px;
}


/* ── Error ─────────────────────────── */

.login-error {
    background: #fef2f2;
    border-left: 3px solid #dc2626;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 24px;
    font-size: 13px;
    color: #991b1b;
    line-height: 1.5;
}


/* ─────────────────────────────────────
   SSO CARD (PRIMARY ACTION)
───────────────────────────────────── */

.sso-card {
    position: relative;
    background: var(--cbre-white);
    border: 1.5px solid var(--cbre-celadon);
    border-radius: 14px;
    padding: 26px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,63,45,.05);
    animation: fadeUp .5s ease .08s both;
}

.sso-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cbre-green), var(--cbre-accent));
    border-radius: 14px 14px 0 0;
}

.sso-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--cbre-green);
    color: var(--cbre-white);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 4px 12px 4px 8px;
    border-radius: 100px;
    margin-bottom: 14px;
}

.sso-badge svg {
    width: 14px;
    height: 14px;
}

.sso-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--cbre-dark);
    margin-bottom: 4px;
}

.sso-card p {
    font-size: 13px;
    color: var(--cbre-grey);
    line-height: 1.55;
    margin-bottom: 18px;
}

.btn-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--cbre-green);
    color: var(--cbre-white);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s ease;
    letter-spacing: .01em;
}

.btn-sso:hover {
    background: var(--cbre-dark);
    box-shadow: 0 6px 24px rgba(0,63,45,.18);
    transform: translateY(-1px);
}

.btn-sso:active {
    transform: translateY(0);
}

.btn-sso svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}


/* ─────────────────────────────────────
   DIVIDER
───────────────────────────────────── */

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cbre-light-grey);
}

.divider span {
    font-size: 11px;
    font-weight: 600;
    color: var(--cbre-sage);
    letter-spacing: .6px;
    text-transform: uppercase;
    white-space: nowrap;
}


/* ─────────────────────────────────────
   GUEST SECTION (SECONDARY ACTION)
───────────────────────────────────── */

.guest-section {
    animation: fadeUp .5s ease .16s both;
}

.guest-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--cbre-dark);
    margin-bottom: 2px;
}

.guest-subtitle {
    font-size: 13px;
    color: var(--cbre-grey);
    margin-bottom: 20px;
}


/* ─────────────────────────────────────
   FORM FIELDS
───────────────────────────────────── */

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

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--cbre-dark);
    letter-spacing: .3px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--cbre-dark);
    background: var(--cbre-white);
    border: 1.5px solid var(--cbre-light-grey);
    border-radius: 8px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus {
    border-color: var(--cbre-green);
    box-shadow: 0 0 0 3px rgba(0,63,45,.08);
}

.form-group input::placeholder {
    color: #a0aead;
}

.field-aux {
    text-align: right;
    margin-top: 5px;
    margin-bottom: 4px;
}


/* ─────────────────────────────────────
   REMEMBER ME
───────────────────────────────────── */

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--cbre-green);
    cursor: pointer;
}

.remember-row label {
    font-size: 13px;
    color: var(--cbre-grey);
    cursor: pointer;
    user-select: none;
}


/* ─────────────────────────────────────
   GUEST SUBMIT BUTTON
───────────────────────────────────── */

.btn-guest {
    display: block;
    width: 100%;
    padding: 13px 20px;
    background: transparent;
    color: var(--cbre-green);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    border: 1.5px solid var(--cbre-green);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
}

.btn-guest:hover {
    background: var(--cbre-green);
    color: var(--cbre-white);
}

.btn-guest:active {
    transform: translateY(1px);
}


/* ─────────────────────────────────────
   CHALLENGE SECTION
───────────────────────────────────── */

.challenge-card {
    background: var(--cbre-white);
    border: 1.5px solid var(--cbre-light-grey);
    border-radius: 14px;
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    animation: fadeUp .5s ease both;
}

.challenge-card legend {
    font-size: 18px;
    font-weight: 700;
    color: var(--cbre-dark);
    padding: 0 8px;
}

.challenge-card p {
    margin-bottom: 20px;
    color: var(--cbre-grey);
    font-size: 14px;
    line-height: 1.55;
}

.challenge-card input[type="submit"],
.challenge-card button {
    padding: 11px 28px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    border: 1.5px solid var(--cbre-green);
    background: var(--cbre-green);
    color: var(--cbre-white);
    transition: all .2s;
    margin-right: 8px;
}

.challenge-card input[type="submit"]:hover,
.challenge-card button:hover {
    background: var(--cbre-dark);
    border-color: var(--cbre-dark);
}

.challenge-card input[name="no"] {
    background: var(--cbre-white);
    color: var(--cbre-green);
}

.challenge-card input[name="no"]:hover {
    background: var(--cbre-off-white);
}

.challenge-card input[type="password"] {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    border: 1.5px solid var(--cbre-light-grey);
    border-radius: 8px;
    margin-bottom: 16px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.challenge-card input[type="password"]:focus {
    border-color: var(--cbre-green);
    box-shadow: 0 0 0 3px rgba(0,63,45,.08);
}


/* ─────────────────────────────────────
   NOSCRIPT
───────────────────────────────────── */

.script-required {
    background: #FEF3C7;
    color: #92400E;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
}

.hidden-old-client-checkbox {
    display: none;
}


/* ─────────────────────────────────────
   RESPONSIVE
───────────────────────────────────── */

@media (max-width: 860px) {
    body {
        flex-direction: column;
    }
    .brand-panel {
        flex: none;
        padding: 32px 28px 24px;
    }
    .brand-headline h1 {
        font-size: 30px;
    }
    .brand-copyright {
        display: none;
    }
    .login-panel {
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .brand-panel {
        padding: 24px 20px 20px;
    }
    .brand-headline h1 {
        font-size: 26px;
    }
    .brand-headline p {
        font-size: 13px;
    }
    .login-panel {
        padding: 24px 16px;
    }
    .sso-card {
        padding: 22px 18px;
    }
}
