/* ============================================================================
   Umbral · pantallas de acceso (login, recuperar clave, restablecer clave)
   ----------------------------------------------------------------------------
   Antes cada pantalla traía su propio bloque de estilo incrustado. Ahora las
   tres comparten esta hoja, con la misma paleta que el panel (css/app.css).
   ========================================================================= */

        /* ====================================================================
           Login de Umbral · pantalla partida
           Izquierda: foto del condominio con velo navy, marca y beneficios.
           Derecha: el formulario en tarjeta limpia.
           Misma paleta que el panel (css/app.css).
           ================================================================= */
        :root {
            --u-navy: #0a1d2e;
            --u-steel: #1b4965;
            --u-steel-700: #163d55;
            --u-copper: #a8622c;
            --u-copper-soft: rgba(168, 98, 44, .12);
            --u-copper-light: #e0a273;
            --u-ink: #16222e;
            --u-ink-2: #55636f;
            --u-ink-3: #8996a2;
            --u-line: #e5e9ee;
            --u-line-strong: #d2d9e1;
            --u-canvas: #f5f7f9;
            --u-danger: #8c2f2f;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
            color: var(--u-ink);
            background: var(--u-canvas);
            -webkit-font-smoothing: antialiased;
        }

        .login-shell { display: flex; min-height: 100vh; }

        /* ---------------------------------------------- columna izquierda --- */

        /* Lockup completo del panel izquierdo: la marca manda. */
        .side-brand-logo {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #fff;
            border-radius: 16px;
            padding: 14px 18px;
            margin-bottom: 2.2rem;
            box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
        }

        .side-brand-logo img {
            display: block;
            width: 118px;
            height: auto;
        }


        .login-side {
            position: relative;
            flex: 1 1 52%;
            display: flex;
            align-items: center;
            padding: 3.5rem;
            overflow: hidden;
            color: #fff;
        }

        .login-side__bg {
            position: absolute;
            inset: 0;
            background-image: url("../public/images/login/fondo.jpg");
            background-size: cover;
            background-position: center;
            transform: scale(1.02);
        }

        /* velo navy: la foto se intuye, el texto manda */
        .login-side__veil {
            position: absolute;
            inset: 0;
            background: linear-gradient(150deg,
                rgba(10, 29, 46, .95) 0%,
                rgba(10, 29, 46, .82) 45%,
                rgba(27, 73, 101, .78) 100%);
        }

        .login-side__glow {
            position: absolute;
            width: 460px;
            height: 460px;
            right: -140px;
            bottom: -160px;
            background: radial-gradient(circle, rgba(168, 98, 44, .38), transparent 62%);
            pointer-events: none;
        }

        .login-side__content { position: relative; z-index: 1; max-width: 430px; }

        .side-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 2.6rem; }

        .side-brand__mark {
            width: 40px; height: 40px;
            border-radius: 11px;
            background: #fff;
            padding: 5px;
            display: flex; align-items: center; justify-content: center;
        }
        .side-brand__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

        .side-brand__name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }

        .side-brand__name small {
            display: block;
            font-size: 10.5px;
            font-weight: 500;
            letter-spacing: .1em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, .5);
            margin-top: 1px;
        }

        .login-side h1 {
            font-size: 32px;
            line-height: 1.22;
            font-weight: 700;
            letter-spacing: -.025em;
            margin-bottom: 1rem;
        }

        .login-side h1 em { font-style: normal; color: var(--u-copper-light); }

        .login-side__lead {
            font-size: 14.5px;
            line-height: 1.65;
            color: rgba(255, 255, 255, .72);
            margin-bottom: 2.2rem;
        }

        .side-features { list-style: none; display: grid; gap: .85rem; }

        .side-features li {
            display: flex;
            align-items: flex-start;
            gap: .65rem;
            font-size: 13.5px;
            color: rgba(255, 255, 255, .85);
            line-height: 1.5;
        }

        .side-features i {
            flex: 0 0 18px;
            width: 18px; height: 18px;
            border-radius: 50%;
            background: rgba(168, 98, 44, .22);
            color: var(--u-copper-light);
            font-size: 9px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-top: 2px;
        }

        .side-foot {
            position: absolute;
            left: 3.5rem;
            bottom: 2rem;
            z-index: 1;
            font-size: 11.5px;
            color: rgba(255, 255, 255, .38);
        }

        /* ------------------------------------------------ columna derecha --- */

        .login-main {
            flex: 0 0 48%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2.5rem 1.5rem;
            /* superficie propia y separada del panel, no un gris casi blanco */
            background: #fff;
            box-shadow: -18px 0 40px rgba(10, 29, 46, .06);
            position: relative;
            z-index: 2;
        }

        .login-card { width: 100%; max-width: 392px; }

        .login-card__mark {
            width: 46px; height: 46px;
            border-radius: 12px;
            background: var(--u-canvas);
            border: 1px solid var(--u-line);
            padding: 5px;
            display: flex; align-items: center; justify-content: center;
            margin-bottom: 1.3rem;
        }
        .login-card__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

        .login-card h2 { font-size: 24px; font-weight: 700; letter-spacing: -.025em; margin-bottom: .3rem; }

        .login-card__sub { font-size: 13.5px; color: var(--u-ink-3); margin-bottom: 1.9rem; }

        .form-group { margin-bottom: 1.1rem; }

        .form-group label {
            display: block;
            font-size: 12.5px;
            font-weight: 600;
            color: var(--u-ink-2);
            margin-bottom: .4rem;
        }

        .field {
            display: flex;
            align-items: stretch;
            border: 1px solid var(--u-line-strong);
            border-radius: 9px;
            background: #fff;
            overflow: hidden;
            transition: border-color .15s ease, box-shadow .15s ease;
        }

        .field:focus-within {
            border-color: var(--u-copper);
            box-shadow: 0 0 0 3px var(--u-copper-soft);
        }

        .field__icon {
            display: flex;
            align-items: center;
            padding: 0 .8rem;
            color: var(--u-ink-3);
            font-size: 13px;
        }

        .field input {
            flex: 1;
            border: 0;
            outline: none;
            padding: .72rem .2rem;
            font-size: 14.5px;
            color: var(--u-ink);
            background: transparent;
            font-family: inherit;
            min-width: 0;
        }

        .field input::placeholder { color: var(--u-ink-3); }

        .field__toggle {
            border: 0;
            background: transparent;
            padding: 0 .8rem;
            color: var(--u-ink-3);
            cursor: pointer;
            font-size: 13px;
        }
        .field__toggle:hover { color: var(--u-steel); }

        .login-help { font-size: 11.5px; color: var(--u-ink-3); margin-top: .4rem; }

        .btn-login {
            width: 100%;
            padding: .8rem 1rem;
            margin-top: .5rem;
            border: 0;
            border-radius: 9px;
            background: var(--u-steel);
            color: #fff;
            font-family: inherit;
            font-size: 14.5px;
            font-weight: 600;
            cursor: pointer;
            transition: background .15s ease;
        }

        .btn-login:hover { background: var(--u-steel-700); }
        .btn-login:disabled { opacity: .65; cursor: not-allowed; }

        .alert-custom {
            display: none;
            padding: .7rem .85rem;
            margin-bottom: 1.1rem;
            border-radius: 9px;
            font-size: 13px;
            line-height: 1.45;
            background: #f8ebeb;
            border: 1px solid #eccfcf;
            color: var(--u-danger);
        }
        .alert-custom.show { display: block; }
        .alert-custom i { margin-right: .45rem; }

        .login-divider { margin: 1.6rem 0 1rem; border-top: 1px solid var(--u-line); }

        .login-card__foot { font-size: 11.5px; color: var(--u-ink-3); line-height: 1.6; }

        .login-card__foot a { color: var(--u-ink-2); text-decoration: none; font-weight: 600; }
        .login-card__foot a:hover { color: var(--u-copper); }

        /* ------------------------------------- selector de condominio ------- */

        .condominio-selector { display: none; }

        .condominio-selector__head { margin-bottom: 1.3rem; }
        .condominio-selector__head h2 { font-size: 19px; margin-bottom: .25rem; }
        .condominio-selector__head p { font-size: 13px; color: var(--u-ink-3); }

        .condominio-list { display: grid; gap: .55rem; margin-bottom: 1.2rem; }

        .condominio-item {
            display: flex;
            align-items: center;
            gap: .75rem;
            padding: .8rem .9rem;
            border: 1px solid var(--u-line-strong);
            border-radius: 9px;
            background: #fff;
            cursor: pointer;
            transition: border-color .15s ease, background .15s ease, transform .15s ease;
        }

        .condominio-item:hover {
            border-color: var(--u-steel);
            background: #fcfdfe;
            transform: translateX(2px);
        }

        .condominio-item .ci-icon {
            width: 34px; height: 34px; flex: 0 0 34px;
            border-radius: 8px;
            background: var(--u-canvas);
            display: flex; align-items: center; justify-content: center;
            color: var(--u-steel);
            font-size: 14px;
            overflow: hidden;
        }

        .condominio-item .ci-icon img { width: 100%; height: 100%; object-fit: cover; }

        .condominio-item .ci-info { flex: 1; min-width: 0; }

        .condominio-item .ci-info h4 {
            font-size: 13.5px;
            font-weight: 600;
            color: var(--u-ink);
            margin: 0 0 1px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .condominio-item .ci-role {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: .05em;
            color: var(--u-ink-3);
        }

        .condominio-item .fa-chevron-right { color: var(--u-line-strong) !important; font-size: 11px; }

        .link-back {
            display: inline-flex;
            align-items: center;
            gap: .4rem;
            font-size: 12.5px;
            font-weight: 600;
            color: var(--u-ink-2);
            text-decoration: none;
        }
        .link-back:hover { color: var(--u-copper); }

        .spinner {
            display: inline-block;
            width: 14px; height: 14px;
            border: 2px solid rgba(255, 255, 255, .4);
            border-top-color: #fff;
            border-radius: 50%;
            animation: girar .7s linear infinite;
            margin-right: .45rem;
            vertical-align: -2px;
        }
        @keyframes girar { to { transform: rotate(360deg); } }

        /* --------------------------------------------------- responsive ---- */

        @media (max-width: 991.98px) {
            .login-side { display: none; }
            .login-main { flex: 1 1 100%; min-height: 100vh; }
            .login-card { max-width: 420px; }
        }

        @media (max-width: 420px) {
            .login-main { padding: 1.75rem 1.15rem; }
        }
