:root {
    --hb-primary: #0f766e;
    --hb-primary-dark: #0a5a54;
    --hb-primary-soft: #e6f7f4;
    --hb-secondary: #2563eb;
    --hb-accent: #b45309;
    --hb-bg: #f3f6f5;
    --hb-surface: #ffffff;
    --hb-text: #18201f;
    --hb-text-muted: #687471;
    --hb-border: #dfe7e4;
}

.hb-portal-body {
    margin: 0;
    min-height: 100vh;
    background: var(--hb-bg);
}

.hb-portal-body *, .hb-portal-shell * { box-sizing: border-box; }

.hb-portal-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, .95fr) minmax(430px, 1.05fr);
    color: var(--hb-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--hb-bg);
}

.hb-portal-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 5vw, 76px);
    color: #fff;
    background:
        radial-gradient(circle at 12% 12%, rgba(255,255,255,.17), transparent 27%),
        radial-gradient(circle at 85% 80%, rgba(255,255,255,.1), transparent 33%),
        linear-gradient(145deg, var(--hb-primary-dark), var(--hb-primary));
}

.hb-portal-brand-panel::after {
    content: "";
    position: absolute;
    right: -135px;
    bottom: -135px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    box-shadow: 0 0 0 50px rgba(255,255,255,.035), 0 0 0 100px rgba(255,255,255,.025);
}

.hb-portal-brand, .hb-portal-intro, .hb-portal-access-list { position: relative; z-index: 1; }
.hb-portal-brand { display: flex; align-items: center; gap: 13px; }
.hb-portal-brand img { width: 56px; height: 56px; object-fit: contain; border-radius: 14px; background: #fff; padding: 6px; }
.hb-portal-monogram { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 15px; background: rgba(255,255,255,.13); font-weight: 800; letter-spacing: -.04em; }
.hb-portal-brand div { display: flex; flex-direction: column; gap: 3px; }
.hb-portal-brand strong { font-size: 16px; }
.hb-portal-brand span { color: rgba(255,255,255,.74); font-size: 12px; }
.hb-portal-intro { max-width: 610px; padding: 80px 0; }
.hb-portal-kicker, .hb-login-eyebrow { margin: 0 0 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.hb-portal-kicker { color: rgba(255,255,255,.72); }
.hb-portal-intro h1 { max-width: 620px; margin: 0 0 18px; color: #fff; font-size: clamp(40px, 6vw, 72px); line-height: .98; letter-spacing: -.055em; }
.hb-portal-intro > p:last-child { max-width: 570px; margin: 0; color: rgba(255,255,255,.78); font-size: clamp(16px, 2vw, 20px); line-height: 1.6; }
.hb-portal-access-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-portal-access-list span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: rgba(255,255,255,.86); background: rgba(255,255,255,.08); font-size: 12px; font-weight: 650; }

.hb-portal-login-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 72px);
    background: var(--hb-bg);
}

.hb-login-card { width: min(100%, 480px); padding: clamp(28px, 4vw, 44px); border: 1px solid var(--hb-border); border-radius: 24px; background: var(--hb-surface); box-shadow: 0 24px 70px rgba(19, 44, 39, .11); }
.hb-login-eyebrow { color: var(--hb-primary); }
.hb-login-card h2 { margin: 0 0 9px; color: var(--hb-text); font-size: 31px; line-height: 1.15; letter-spacing: -.035em; }
.hb-login-card > p:not(.hb-login-eyebrow) { margin: 0 0 25px; color: var(--hb-text-muted); line-height: 1.55; }
.hb-login-error { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 10px; color: #991b1b; background: #fff1f2; font-size: 13px; line-height: 1.45; }
.hb-login-form { display: flex; flex-direction: column; }
.hb-login-form > label:not(.hb-login-remember) { margin: 0 0 7px; color: var(--hb-text); font-size: 13px; font-weight: 700; }
.hb-login-form input[type="text"], .hb-login-form input[type="password"] { width: 100%; min-height: 48px; margin: 0 0 17px; padding: 11px 13px; border: 1px solid var(--hb-border); border-radius: 10px; outline: 0; color: var(--hb-text); background: var(--hb-surface); font: inherit; }
.hb-login-form input[type="text"]:focus, .hb-login-form input[type="password"]:focus { border-color: var(--hb-primary); box-shadow: 0 0 0 4px var(--hb-primary-soft); }
.hb-login-remember { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 20px; color: var(--hb-text-muted); font-size: 13px; line-height: 1.4; }
.hb-login-remember input { margin-top: 2px; accent-color: var(--hb-primary); }
.hb-login-submit { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--hb-primary-dark); border-radius: 10px; color: #fff; background: var(--hb-primary); font-size: 15px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.hb-login-submit:hover { color: #fff; background: var(--hb-primary-dark); transform: translateY(-1px); }
.hb-login-help, .hb-login-secondary { display: block; margin-top: 18px; color: var(--hb-primary-dark); font-size: 13px; font-weight: 650; text-align: center; text-decoration: none; }
.hb-portal-security { width: min(100%, 480px); margin: 20px 0 0; color: var(--hb-text-muted); font-size: 11px; line-height: 1.5; text-align: center; }

/* El mismo componente puede insertarse dentro de una página con shortcode. */
body:not(.hb-portal-body) .hb-portal-shell { min-height: 720px; border-radius: 22px; overflow: hidden; }
body:not(.hb-portal-body) .hb-portal-brand-panel, body:not(.hb-portal-body) .hb-portal-login-panel { min-height: 720px; }

@media (max-width: 880px) {
    .hb-portal-shell { grid-template-columns: 1fr; }
    .hb-portal-brand-panel { min-height: auto; padding: 30px 24px 34px; }
    .hb-portal-intro { padding: 55px 0 40px; }
    .hb-portal-intro h1 { font-size: clamp(38px, 12vw, 58px); }
    .hb-portal-login-panel { min-height: auto; padding: 35px 20px 52px; }
    body:not(.hb-portal-body) .hb-portal-brand-panel, body:not(.hb-portal-body) .hb-portal-login-panel { min-height: auto; }
}

@media (max-width: 520px) {
    .hb-portal-brand-panel { padding: 24px 20px 28px; }
    .hb-portal-intro { padding: 44px 0 32px; }
    .hb-portal-access-list { display: none; }
    .hb-login-card { padding: 26px 21px; border-radius: 18px; }
    .hb-login-card h2 { font-size: 27px; }
}
