:root {
    --accent: #1aaa87;
    --accent-sec: #0fa1c3;
    --bg: #ffffff;
    --panel-bg: #f9f9f9;
    --fg: #333333;
    --border: #e0e0e0;
    --error-color: #dc3545;

    /* extras sutiles */
    --ring: 0 0 0 .2rem rgba(26, 170, 135, .20);
    --shadow: 0 8px 24px rgba(0, 0, 0, .15);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
}

.row.g-0 {
    margin: 0;
    min-height: 100dvh;
    /* mejor comportamiento en móvil que 100vh */
}

/* =======================
   IZQUIERDA (hero)
======================= */
.panel-left {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-sec) 100%);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem;
}

.panel-left h1 {
    font-size: clamp(2.2rem, 3.5vw, 3.5rem);
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.panel-left h1 i {
    font-size: 1em;
}

.panel-left p {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    margin-bottom: 1.25rem;
    max-width: 360px;
    line-height: 1.45;
}

.panel-left .logo-img {
    display: block;
    margin: 0 auto;
    max-width: 200px;
    width: 100%;
    height: auto;
}

/* =======================
   DERECHA (form)
======================= */
.panel-right {
    background: var(--panel-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* marca móvil (se muestra solo en < lg) */
.brand-mobile {
    display: none;
    text-align: center;
    margin-bottom: .75rem;
}

.brand-mobile img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: .4rem;
    vertical-align: middle;
}

.brand-mobile h1 {
    display: inline-block;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fg);
    vertical-align: middle;
}

/* =======================
   Tarjeta
======================= */
.login-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    padding: 3rem;
    text-align: center;
}

.login-card img {
    width: 64px;
    margin: 0 auto 1rem;
}

.login-card h4 {
    margin-bottom: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

/* =======================
   Inputs
======================= */
.input-group {
    margin-bottom: 1rem;
}

/* icono izquierdo claro (antes oscuro) */
.input-group .input-group-text {
    background: #e8f5f1;
    /* claro con tinte verde */
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    width: 2.75rem;
    justify-content: center;
}

.input-group .form-control {
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: #fff;
    color: var(--fg);
    padding-left: .75rem;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: var(--ring);
    outline: none;
}

/* botón mostrar/ocultar a juego (no oscuro) */
.show-pass-btn {
    background: #e8f5f1;
    border: 1px solid var(--border);
    color: var(--accent);
    padding: .5rem .65rem;
    border-radius: 0 8px 8px 0;
    margin-left: -1px;
    cursor: pointer;
}

/* hint de caps */
.caps-hint {
    display: none;
    margin-top: .35rem;
    font-size: .875rem;
    color: #8a5200;
    background: #fff6e5;
    border: 1px solid #ffe3b3;
    padding: .4rem .55rem;
    border-radius: 8px;
}

/* =======================
   Botón principal
======================= */
.btn-login {
    background: var(--accent);
    border: none;
    color: #000;
    width: 100%;
    padding: .75rem 1rem;
    font-weight: 700;
    border-radius: 16px;
    transition: background .2s ease, box-shadow .2s ease, transform .08s ease;
    margin-top: .5rem;
}

.btn-login:hover {
    background: var(--accent-sec);
    box-shadow: 0 12px 26px rgba(26, 170, 135, .18);
}

.btn-login:active {
    transform: translateY(1px);
}

/* =======================
   Mensajes y links
======================= */
.error-msg {
    color: var(--error-color);
    background: #fff3f3;
    border: 1px solid #ffd9d9;
    border-radius: 12px;
    padding: .75rem .875rem;
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.login-links {
    margin-top: 1.25rem;
    font-size: .9rem;
}

.login-links a {
    color: var(--accent);
    text-decoration: none;
    margin: 0 .5rem;
}

.login-links a:hover {
    text-decoration: underline;
}

/* =======================
   Accesibilidad (foco)
======================= */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* =======================
   Responsive
======================= */
/* Oculta el hero hasta < lg (992px) y centra form */
@media (max-width: 991.98px) {
    .panel-left {
        display: none !important;
    }

    .panel-right {
        min-height: 100dvh;
        padding: 2rem 1rem;
    }

    body,
    html {
        background: var(--panel-bg);
    }

    .login-card {
        margin: 0 auto;
        width: min(420px, 92vw);
        padding: 2rem;
    }

    .brand-mobile {
        display: block;
    }
}






/* ===== Fix toasts en móvil: centrados, sin overflow ===== */
@media (max-width: 991.98px) {
  /* evita scroll lateral en layouts ajustados */
  html, body, .row.g-0 { overflow-x: hidden; }

  /* el stack pasa a fixed y centrado */
  .toast-stack{
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)); /* respeta notch */
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 24px);               /* margen respiración */
    max-width: 560px;
    margin: 0 !important;
    z-index: 1056;                            /* sobre el card */
    pointer-events: none;                     /* no bloquea la UI */
  }
  .toast-stack > * { pointer-events: auto; }  /* pero sí los toasts */

  /* el toast nunca se sale ni “empuja” */
  .ann-toast{
    width: 100%;
    border-radius: 14px;
    padding: .75rem .9rem;
    box-shadow: 0 14px 36px rgba(0,0,0,.22);
  }

  /* por si el parent tenía position:relative que lo condiciona */
  .panel-right { position: static !important; }
}

/* ===== Desktop se mantiene anclado arriba-derecha del panel derecho ===== */
@media (min-width: 992px) {
  .panel-right { position: relative; }
  .toast-stack{
    position: absolute;
    top: 24px;
    right: 24px;
    left: auto;
    transform: none;
    width: min(520px, 92vw);
    z-index: 5;
  }
}



/* Convierte PNG a “blanco” con buen contraste */
.logo-white{
  filter: brightness(0) invert(1) saturate(0) contrast(110%) drop-shadow(0 2px 8px rgba(0,0,0,.35));
}











