/*
  PALETA ASMET SALUD
  Verde fuerte : #2E9C9D
  Rojo         : #D92127
  Blanco       : #FFFFFF
  Verde claro  : #CDEEEE
  Verde medio  : #66BBBA
  Rojo claro   : #ED8380
*/

/* ── Reset & neutralizar Bootstrap heredado ─────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; }
.login-root > * { width: 100%; }
.login-wrap, .session-wrap { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }

/* ── Authenticated state ──────────────────────────────────── */
.session-wrap {
    min-height: 100vh;
    background: #CDEEEE;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.session-card {
    background: #fff;
    border: 1.5px solid #66BBBA;
    border-radius: 20px;
    padding: 2.5rem 3rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(46,156,157,0.12);
}
.session-logo img { height: 44px; object-fit: contain; margin-bottom: 1.5rem; }
.session-divider { height: 1px; background: #CDEEEE; margin-bottom: 1.5rem; }
.session-msg { font-size: 0.9rem; color: #2a6e6f; line-height: 1.6; margin-bottom: 2rem; }
.session-actions { display: flex; flex-direction: column; gap: 0.75rem; align-items: center; }
.btn-primary-action {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: #2E9C9D; color: #fff;
    padding: 0.75rem 2rem; border-radius: 50px;
    font-size: 0.9rem; font-weight: 600; text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.btn-primary-action:hover { background: #237e7f; transform: translateY(-1px); }
.btn-icon { font-size: 1rem; }
.btn-ghost-action {
    background: transparent; border: 1.5px solid #D92127; color: #D92127;
    padding: 0.65rem 1.75rem; border-radius: 50px;
    font-size: 0.88rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.btn-ghost-action:hover { background: #D92127; color: #fff; }

/* ── Two-panel layout ─────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: stretch;
    background: #2E9C9D;
}

/* ── Left panel ───────────────────────────────────────────── */
.login-left {
    flex: 0 0 45%;
    max-width: 45%;
    background: linear-gradient(150deg, #1a7475 0%, #2E9C9D 50%, #66BBBA 100%);
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.brand-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 2rem;
}
.brand-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}
.brand-headline .accent {
    color: #CDEEEE;
}
.brand-sub {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.7);
    max-width: 280px;
    line-height: 1.75;
}

/* Barra roja de acento inferior izquierda */
.login-left::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 6px;
    height: 40%;
    background: linear-gradient(to top, #D92127, transparent);
    z-index: 2;
}

/* Decorative orbs */
.decorative-grid { position: absolute; inset: 0; pointer-events: none; }
.d-node {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
}
.n1 { width: 320px; height: 320px; right: -100px; top: -100px; }
.n2 { width: 170px; height: 170px; right: 50px; top: 170px;
      background: rgba(205,238,238,0.12); border-color: rgba(205,238,238,0.25); }
.n3 { width: 80px; height: 80px; right: 25px; bottom: 220px; }
.n4 { width: 220px; height: 220px; left: -70px; bottom: -70px; background: rgba(255,255,255,0.04); }

/* Acento rojo: pequeño punto decorativo */
.n5 {
    width: 36px; height: 36px;
    right: 3.5rem; bottom: 4rem;
    background: rgba(217,33,39,0.35);
    border-color: rgba(217,33,39,0.5);
}

.d-line { position: absolute; background: rgba(255,255,255,0.06); }
.l1 { width: 1px; height: 100%; right: 30%; top: 0; }
.l2 { width: 100%; height: 1px; top: 38%; left: 0; }
.l3 { width: 1px; height: 60%; right: 55%; bottom: 0; }

.left-footer {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    position: relative;
    z-index: 3;
}

/* ── Right panel ──────────────────────────────────────────── */
.login-right {
    flex: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    min-width: 0;
    position: relative;
}

/* Franja verde muy clara en la parte superior del panel derecho */
.login-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(to right, #2E9C9D, #66BBBA);
}

.login-card {
    width: 100%;
    max-width: 380px;
}
.card-logo img {
    height: 40px;
    object-fit: contain;
    margin-bottom: 2.25rem;
    display: block;
}
.card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a5e5f;
    margin-bottom: 0.35rem;
}
.card-subtitle {
    font-size: 0.875rem;
    color: #7a9e9f;
    margin-bottom: 2.25rem;
}

/* Línea separadora con color de marca */
.card-divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(to right, #2E9C9D, #D92127);
    border-radius: 2px;
    margin-bottom: 2rem;
}

/* Error */
.error-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: #fff5f5;
    border: 1px solid #ED8380;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
}
.error-icon { font-size: 1rem; color: #D92127; margin-top: 1px; flex-shrink: 0; }
.error-messages p { font-size: 0.82rem; color: #D92127; line-height: 1.5; }

/* Form fields */
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }
.field-group { display: flex; flex-direction: column; gap: 0.4rem; }
.field-group label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #2E9C9D;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: #66BBBA;
    pointer-events: none;
}
.input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 44px 0 44px;
    background: #fff;
    border: 1.5px solid #CDEEEE;
    border-radius: 12px;
    font-size: 0.92rem;
    color: #1a4a4b;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
}
.input-wrap input::placeholder { color: #a8d5d5; }
.input-wrap input:focus {
    border-color: #2E9C9D;
    box-shadow: 0 0 0 4px rgba(46,156,157,0.12);
}
.toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #66BBBA;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    padding: 0;
}
.toggle-pass:hover { color: #2E9C9D; background: rgba(46,156,157,0.08); }
.toggle-pass svg { width: 16px; height: 16px; }

/* Submit button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    height: 52px;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #2E9C9D 0%, #66BBBA 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(46,156,157,0.35);
}
.btn-submit:hover { opacity: 0.93; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(46,156,157,0.4); }
.btn-submit:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(46,156,157,0.3); }
.btn-submit svg { width: 18px; height: 18px; }

/* Acento rojo bajo el botón */
.btn-hint {
    font-size: 0.72rem;
    color: #b0cece;
    text-align: center;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.btn-hint span.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #D92127;
    display: inline-block;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .login-wrap { flex-direction: column; }
    .login-left { flex: none; max-width: 100%; min-height: 260px; padding: 2.5rem 2rem; }
    .brand-headline { font-size: 2rem; }
    .login-right { width: 100%; padding: 2.5rem 1.5rem; }
    .d-node.n1 { width: 220px; height: 220px; }
    .login-left::after { width: 100%; height: 4px; bottom: 0; left: 0; background: linear-gradient(to right, #D92127, transparent); }
}
@media (max-width: 480px) {
    .login-right { padding: 2rem 1rem; }
    .login-card { max-width: 100%; }
    .card-title { font-size: 1.5rem; }
}