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

     .landing-page,
    .landing-page * {
        box-sizing: border-box;
    }

.landing-page {
  min-height: 100dvh;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #080303;
  color: #f0f2f5;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* La portada y el acceso usan un fondo blanco; los módulos conservan su tema. */
.landing-page:has(.landing-shell) {
  background: #fff;
  color: #111827;
}

.landing-page:has(.landing-shell) .ambient-bg {
  display: none;
}

    .landing-page::selection {
        background: #7f1d1d;
        color: #fff;
    }

    .ambient-bg {
        position: fixed;
        inset: 0;
        z-index: 0;
        background: radial-gradient(circle at 50% 0%, #1a0505 0%, #080303 70%);
        overflow: hidden;
        pointer-events: none;
    }

    .landing-shell {
        position: relative;
        z-index: 2;
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: clamp(1.5rem, 3vh, 2rem) clamp(1rem, 4vw, 4rem) 5.25rem;
        background-color: #fff;
        color: #111827;
        animation: landing-appear 180ms ease-out both;
    }

@keyframes landing-appear {
    from { opacity: 0; }
    to { opacity: 1; }
}

.landing-main {
  width: 100%;
  max-width: 78rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
  flex: 1 1 auto;
  justify-content: center;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.hero-copy {
  text-align: center;
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

    .glass-placeholder {
        background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow:
            inset 0 1px 1px rgba(255,255,255,0.2),
            inset 0 -1px 1px rgba(0,0,0,0.5),
            0 15px 35px rgba(0,0,0,0.5);
    }

.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(0.5rem, 1.5vh, 1rem);
}

.logo-placeholder {
  width: clamp(3rem, 5vh, 4rem);
  height: clamp(3rem, 5vh, 4rem);
  border-radius: 1.25rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-placeholder i {
  color: rgba(255,255,255,0.4);
  font-size: clamp(1rem, 2vh, 1.5rem);
  transition: color 0.5s ease;
}

    .logo-placeholder:hover i {
        color: rgba(255,255,255,0.8);
    }

    .logo-label {
        position: absolute;
        bottom: -1.25rem;
        color: rgba(255,255,255,0.3);
        font-family: 'Manrope', 'Inter', sans-serif;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        white-space: nowrap;
    }

.operational-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(0.5rem, 1.5vh, 1.25rem);
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  color: rgba(240,242,245,0.82);
  font-size: clamp(0.55rem, 1.2vh, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  border-color: rgba(255,255,255,0.05);
  box-shadow: 0 0 30px rgba(255,255,255,0.03);
}

    .status-dot {
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 999px;
        background: #22c55e;
        box-shadow: 0 0 12px rgba(34,197,94,0.8);
        animation: landing-pulse 1.8s infinite ease-in-out;
    }

    @keyframes landing-pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.45; }
    }

.landing-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 clamp(0.5rem, 1.5vh, 1.5rem);
  font-family: 'Manrope', 'Inter', sans-serif;
  text-align: center;
}

.landing-title span {

  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

    .landing-title span {
        font-size: clamp(1.4rem, 4vw, 2.2rem);
        font-weight: 800;
        letter-spacing: -0.02em;
        line-height: 1;
    }

    .text-metal {
        margin-bottom: 0.25rem;
        background: linear-gradient(180deg, #fff 0%, #b0b5ba 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 10px 20px rgba(0,0,0,0.5);
        opacity: 0.92;
    }

    .text-shimmer {
        padding: 0.5rem 0;
        color: transparent;
        background: linear-gradient(90deg, #fff, #9ca3af, #fff);
        background-size: 200% auto;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6));
        animation: landing-shimmer 4s linear infinite;
    }

    @keyframes landing-shimmer {
        to { background-position: 200% center; }
    }

.landing-description {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
  color: #374151;
  font-size: clamp(0.9rem, 1.5vw, 0.88rem);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.08em;
}

    .cards-container {
        width: 100%;
        max-width: 1180px;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-content: center;
        gap: 16px;
    }

.agressive-card {
  min-height: clamp(220px, 32svh, 320px);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease, filter 0.6s ease, border-color 0.6s ease;
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,0.25),
    inset 0 -2px 10px rgba(0,0,0,0.8),
    0 30px 60px -15px rgba(0,0,0,0.9);
}

    .agressive-card::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        opacity: 0;
        background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
        transition: opacity 0.5s ease;
    }

    .agressive-card:hover::before {
        opacity: 1;
    }

    .agressive-card::after {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(125deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 40%);
    }

    .card-davi {
        background: linear-gradient(to top right, #4a0000, #d31018, #1a0505);
    }

    .card-dataf {
        background: linear-gradient(to top right, #051120, #004a80, #0a0505);
    }

    .card-content {
        position: relative;
        z-index: 2;
        height: 100%;
        min-height: clamp(280px, 42svh, 380px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: clamp(1.5rem, 4svh, 2.5rem) clamp(1rem, 3vw, 2rem);
    }

    .card-icon {
        width: 5rem;
        height: 5rem;
        border-radius: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1.5rem;
        background: rgba(0,0,0,0.5);
        border: 1px solid rgba(255,255,255,0.2);
        box-shadow: inset 0 2px 5px rgba(255,255,255,0.3), 0 10px 20px rgba(0,0,0,0.5);
        animation: landing-float-icon 4s ease-in-out infinite;
        transition: background 0.5s ease, border-color 0.5s ease, transform 0.5s ease;
    }

    .card-icon i {
        color: #fff;
        font-size: 2.5rem;
    }

    .card-davi .card-icon i {
        filter: drop-shadow(0 0 15px rgba(255,255,255,0.5));
    }

    .card-dataf .card-icon i {
        filter: drop-shadow(0 0 15px rgba(0,210,255,0.5));
    }

    .agressive-card:hover .card-icon {
        background: rgba(0,0,0,0.3);
        border-color: rgba(255,255,255,0.6);
    }

    .card-dataf:hover .card-icon {
        border-color: rgba(0,210,255,0.6);
    }

    @keyframes landing-float-icon {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-6px); }
    }

.card-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: clamp(0.5rem, 1.5vh, 1.25rem);
}

.card-copy h3 {
  margin: 0 0 0.15rem;
  color: #fff;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.card-copy h4 {
  margin: 0 0 0.5rem;
  font-size: clamp(0.65rem, 1.2vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

    .card-davi .card-copy h4 {
        color: #fecaca;
    }

    .card-dataf .card-copy h4 {
        color: #00d2ff;
    }

.card-copy p {
  max-width: 200px;
  margin: 0 auto;
  color: #e5e7eb;
  font-size: clamp(0.7rem, 1.2vw, 0.82rem);
  font-weight: 300;
  line-height: 1.55;
  opacity: 0.82;
  transition: opacity 0.5s ease;
}

    .agressive-card:hover .card-copy p {
        opacity: 1;
    }

.btn-elite {
  position: relative;
  overflow: hidden;
  width: min(100%, 200px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: auto;
  padding: 0.65rem 1.2rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: clamp(0.58rem, 1.1vw, 0.7rem);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1), 0 4px 15px rgba(0,0,0,0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

    .btn-elite::before {
        content: '';
        position: absolute;
        inset: 0;
        opacity: 0.5;
        background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
        transition: opacity 0.4s ease;
    }

    .btn-elite::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        border-radius: 2px;
        transform: translateX(-50%);
        transition: width 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    }

    .btn-elite span,
    .btn-elite i {
        position: relative;
        z-index: 1;
    }

    .btn-elite:hover {
        transform: translateY(-2px);
        border-color: rgba(255,255,255,0.25);
        box-shadow: inset 0 1px 2px rgba(255,255,255,0.2), 0 8px 25px rgba(0,0,0,0.6);
    }

    .btn-elite:hover::before {
        opacity: 1;
    }

    .card-davi .btn-elite:hover {
        background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(237,28,36,0.15) 100%);
        border-color: rgba(237,28,36,0.4);
    }

    .card-davi .btn-elite:hover::after {
        width: 100%;
        background: #ed1c24;
        box-shadow: 0 -2px 15px 2px rgba(237,28,36,0.8);
    }

    .card-dataf .btn-elite:hover {
        background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,210,255,0.15) 100%);
        border-color: rgba(0,210,255,0.4);
    }

    .card-dataf .btn-elite:hover::after {
        width: 100%;
        background: #00d2ff;
        box-shadow: 0 -2px 15px 2px rgba(0,210,255,0.8);
    }

    .btn-elite i {
        transition: transform 0.3s ease, color 0.3s ease;
    }

    .btn-elite:hover i {
        transform: translateX(0.35rem);
        color: #fff !important;
    }

    .card-davi .btn-elite i {
        color: #f87171;
    }

    .card-dataf .btn-elite i {
        color: #00d2ff;
    }

    .trust-indicators {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        margin-top: clamp(2rem, 5vh, 3rem);
        opacity: 0.5;
    }

    .trust-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: #fff;
        font-size: clamp(0.65rem, 1.4vw, 0.78rem);
        font-weight: 800;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        text-shadow: 0 3px 10px rgba(0,0,0,0.35);
    }

    .trust-item i {
        color: #ef4444;
    }

    .trust-separator {
        width: 0.25rem;
        height: 0.25rem;
        border-radius: 999px;
        background: rgba(255,255,255,0.4);
    }

    .landing-footer {
        position: absolute;
        bottom: 1.5rem;
        left: 0;
        right: 0;
        z-index: 3;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: min(100%, 80rem);
        margin: 0 auto;
        padding: 0 1.5rem;
        color: rgba(240,242,245,0.4);
        font-size: clamp(0.62rem, 1.3vw, 0.75rem);
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        pointer-events: none;
    }

    .transition-overlay {
        position: fixed;
        inset: 0;
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        color: #111827;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.8s ease;
    }

    .transition-overlay.active {
        opacity: 1;
        pointer-events: all;
    }

    .overlay-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .spinner-elegant {
        width: 44px;
        height: 44px;
        border: 2px solid rgba(17,24,39,0.12);
        border-top: 2px solid #ed1c24;
        border-radius: 50%;
        animation: landing-spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    }

    @keyframes landing-spin {
        to { transform: rotate(360deg); }
    }

    .overlay-content p {
        margin: 0;
        color: #374151;
        font-family: 'Manrope', 'Inter', sans-serif;
        font-size: 0.75rem;
        font-weight: 800;
        letter-spacing: 0.3em;
        text-transform: uppercase;
        text-shadow: none;
    }

    @media (min-width: 640px) {
        .cards-container {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            align-items: stretch;
        }

        .card-davi,
        .card-dataf {
            clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%);
            width: 100%;
            z-index: 10;
        }

        .card-davi {
            transform: translateX(12.5%);
        }

        .card-dataf {
            margin-left: 0;
            transform: translateX(-12.5%);
        }

        .card-davi:hover,
        .card-dataf:hover {
            z-index: 20;
            filter: brightness(1.15);
        }
    }

    @media (max-width: 639px) {
        .landing-shell {
            justify-content: flex-start;
            padding-bottom: 6rem;
        }

        .hero-copy {
            margin-bottom: 1.5rem;
        }

        .landing-title {
            margin-bottom: 1.8rem;
        }

        .landing-description br,
        .trust-separator {
            display: none;
        }

        .card-davi {
            clip-path: polygon(0 0, 100% 0, 100% 75%, 0 100%);
            width: 100%;
            z-index: 10;
        }

        .card-dataf {
            clip-path: polygon(0 25%, 100% 0, 100% 100%, 0 100%);
            width: 100%;
            margin-top: 0;
            z-index: 10;
        }

        .card-davi:hover,
        .card-dataf:hover {
            z-index: 20;
        }

        .landing-footer {
            bottom: 1rem;
            flex-direction: column;
            gap: 0.4rem;
            text-align: center;
        }
    }

    /* --- LOGIN MODE � CINEMATIC TRANSITIONS --- */
    .landing-shell.login-mode .cards-container {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateY(20px) scale(0.96);
        margin: 0 !important;
        padding: 0 !important;
        transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .landing-shell.login-mode .hero-copy {
        margin-bottom: clamp(0.25rem, 1vh, 0.75rem);
        transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .landing-shell.login-mode .logo-wrap img {
        width: 30% !important;
        transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .landing-shell.login-mode .landing-title span {
        font-size: clamp(1rem, 2.8vw, 1.5rem) !important;
        transition: font-size 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .landing-shell.login-mode .landing-description {
        font-size: clamp(0.72rem, 1.1vw, 0.8rem);
        max-width: 32rem;
        transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .landing-shell.login-mode .landing-main {
        gap: clamp(0.25rem, 0.8vh, 0.5rem);
    }

    /* --- LOGIN FLOW CONTAINER --- */
    .login-flow-container {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        background: rgba(12, 12, 15, 0.55);
        backdrop-filter: blur(40px) saturate(140%);
        -webkit-backdrop-filter: blur(40px) saturate(140%);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 16px;
        padding: 2rem 2rem 1.5rem;
        box-shadow:
            0 0 0 1px rgba(255,255,255,0.02),
            0 8px 32px rgba(0, 0, 0, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        display: none;
        opacity: 0;
        transform: translateY(24px);
        transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 10;
        position: relative;
        overflow: hidden;
    }

    .login-flow-container::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    }

    .login-flow-container::after {
        content: '';
        position: absolute;
        top: 0; left: 0;
        width: 3px; height: 100%;
        background: linear-gradient(180deg, #0078d4, rgba(0,210,255,0.25), transparent);
        border-radius: 3px 0 0 3px;
    }

    .login-flow-container.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    /* - Steps - */
    .login-step { display: none; }
    .login-step.active {
        display: block;
        animation: msStepIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes msStepIn {
        from { opacity: 0; transform: translateX(14px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    /* - Logo - */
    .ms-logo-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1.25rem;
    }
    .ms-logo {
        width: 120px;
        opacity: 0.9;
        border-radius: 10px;
    }

    /* - Typography - */
    .ms-title {
        font-family: 'Manrope', 'Inter', sans-serif;
        font-size: 1.3rem;
        font-weight: 700;
        color: rgba(240, 242, 245, 0.95);
        margin: 0 0 0.35rem 0;
        letter-spacing: -0.02em;
    }
    .ms-subtitle {
        font-size: 0.78rem;
        font-weight: 400;
        color: rgba(240, 242, 245, 0.4);
        margin: 0 0 1.25rem 0;
        letter-spacing: 0.03em;
    }

    /* - Input - */
    .ms-input-group { margin-bottom: 0.75rem; }
    .ms-input-label {
        display: block;
        font-size: 0.7rem;
        font-weight: 600;
        color: rgba(240, 242, 245, 0.5);
        margin-bottom: 0.4rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
    .ms-input {
        width: 100%;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 0.7rem 1rem;
        color: rgba(240, 242, 245, 0.95);
        font-family: 'Inter', sans-serif;
        font-size: 0.92rem;
        transition: all 0.3s ease;
        outline: none;
    }
    .ms-input::placeholder { color: rgba(240, 242, 245, 0.25); }
    .ms-input:focus {
        border-color: #0078d4;
        background: rgba(0, 120, 212, 0.04);
        box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.12);
    }

    /* - Buttons - */
    .ms-btn-primary {
        width: 100%;
        background: #0078d4;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 0.7rem 1rem;
        font-family: 'Inter', sans-serif;
        font-size: 0.88rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 1rem;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        position: relative;
        overflow: hidden;
    }
    .ms-btn-primary:hover {
        background: #106ebe;
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(0, 120, 212, 0.3);
    }
    .ms-btn-primary:active { transform: translateY(0); }

    .ms-btn-ghost {
        width: 100%;
        background: transparent;
        color: rgba(240, 242, 245, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 8px;
        padding: 0.6rem 1rem;
        font-family: 'Inter', sans-serif;
        font-size: 0.82rem;
        font-weight: 500;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 0.6rem;
        transition: all 0.3s ease;
    }
    .ms-btn-ghost:hover {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.12);
        color: rgba(240, 242, 245, 0.9);
    }

    /* - User Badge - */
    .ms-user-badge {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        background: rgba(255, 255, 255, 0.04);
        padding: 5px 14px 5px 6px;
        border-radius: 24px;
        margin-bottom: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }
    .ms-user-badge:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
    }
    .ms-user-badge .badge-arrow {
        width: 24px; height: 24px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.06);
        display: flex; align-items: center; justify-content: center;
        font-size: 0.65rem;
        color: rgba(240, 242, 245, 0.6);
        transition: all 0.3s ease;
    }
    .ms-user-badge:hover .badge-arrow {
        background: rgba(0, 120, 212, 0.2);
        color: #0078d4;
    }
    .ms-user-badge .badge-text {
        font-size: 0.8rem;
        color: rgba(240, 242, 245, 0.8);
        font-weight: 500;
    }

    /* - Alert - */
    .ms-alert {
        background: rgba(237, 28, 36, 0.07);
        border-left: 3px solid rgba(237, 28, 36, 0.5);
        color: rgba(255, 179, 179, 0.9);
        padding: 0.65rem 0.85rem;
        border-radius: 0 6px 6px 0;
        font-size: 0.8rem;
        margin-top: 0.75rem;
        line-height: 1.5;
    }

    /* - Security Footer - */
    .ms-security-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 1.25rem;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
        font-size: 0.65rem;
        color: rgba(240, 242, 245, 0.25);
        letter-spacing: 0.08em;
    }
    .ms-security-footer i {
        font-size: 0.6rem;
        color: #22c55e;
    }

    /* - Loading state - */
    .ms-loading-state {
        text-align: center;
        padding: 2rem 0;
    }
    .ms-loading-state p {
        margin: 0.75rem 0 0;
        color: rgba(240,242,245,0.5);
        font-size: 0.82rem;
        font-weight: 500;
        letter-spacing: 0.06em;
    }

    /* - Login Responsive - */
    @media (max-width: 639px) {
        .login-flow-container {
            max-width: 100%;
            border-radius: 12px;
            padding: 1.5rem 1.25rem 1.25rem;
        }
        .landing-shell.login-mode .logo-wrap img {
            width: 45% !important;
        }
        .landing-shell.login-mode .landing-title span {
            font-size: clamp(0.95rem, 4.5vw, 1.2rem) !important;
        }
    }

/* --- SUSPICIOUS ACTIVITY SCREEN --- */
.suspicious-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}

.suspicious-shield {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: rgba(239, 68, 68, 0.08);
    border: 2px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.15), inset 0 0 20px rgba(239, 68, 68, 0.05);
    animation: suspicious-pulse 2.5s ease-in-out infinite;
}

.suspicious-shield.permanent {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.25), inset 0 0 30px rgba(239, 68, 68, 0.1);
    animation: suspicious-pulse-permanent 1.5s ease-in-out infinite;
}

.suspicious-shield i {
    font-size: 2.2rem;
    color: #ef4444;
}

@keyframes suspicious-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(239, 68, 68, 0.15); }
    50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(239, 68, 68, 0.3); }
}

@keyframes suspicious-pulse-permanent {
    0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(239, 68, 68, 0.25); }
    50% { transform: scale(1.08); box-shadow: 0 0 80px rgba(239, 68, 68, 0.45); }
}

.suspicious-title {
    font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(240, 242, 245, 0.95);
    margin: 0 0 0.4rem 0;
    letter-spacing: -0.01em;
}

.suspicious-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(240, 242, 245, 0.45);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
    max-width: 320px;
}

.suspicious-subtitle.permanent-text {
    color: rgba(252, 165, 165, 0.7);
}

/* - Countdown Ring - */
.countdown-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.countdown-svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.countdown-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 4;
}

.countdown-progress {
    fill: none;
    stroke: #ef4444;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5));
}

.countdown-number {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Manrope', 'Inter', sans-serif;
}

.countdown-value {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(240, 242, 245, 0.95);
    line-height: 1;
    letter-spacing: -0.02em;
}

.countdown-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(240, 242, 245, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.25rem;
}

/* - Suspicious Buttons - */
.btn-retry {
    width: 100%;
    background: rgba(0, 120, 212, 0.15);
    color: rgba(240, 242, 245, 0.9);
    border: 1px solid rgba(0, 120, 212, 0.3);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
    /* Accessibility Styles */
    /* Accessibility Styles - Handled by Tailwind 'dark' class */

    /* High contrast if needed later */

/* Corporate application shell */
:root {
    --app-primary: #d71920;
    --app-primary-hover: #b51218;
    --app-background: #f4f6f8;
    --app-surface: #ffffff;
    --app-surface-muted: #f8fafc;
    --app-text-primary: #172033;
    --app-text-secondary: #647084;
    --app-border: #e3e7ed;
    --app-sidebar-width: 260px;
    --app-sidebar-collapsed-width: 72px;
    --app-header-height: 53px;
    --app-footer-height: 50px;
    --app-transition: 180ms cubic-bezier(.2, 0, 0, 1);
    --app-shadow-soft: 0 1px 2px rgba(15, 23, 42, .04), 0 5px 18px rgba(15, 23, 42, .035);
}

.banking-shell {
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    background: var(--app-background);
    color: var(--app-text-primary);
    font-family: 'Inter', system-ui, sans-serif;
}

.banking-shell .app-main {
    min-width: 0;
    min-height: 100dvh;
    margin-left: var(--app-sidebar-collapsed-width);
    padding-top: 0;
    display: flex;
    flex-direction: column;
    background: var(--app-background);
    transition: margin-left var(--app-transition);
}

.banking-shell.sidebar-expanded .app-main { margin-left: var(--app-sidebar-width); }

.app-content {
    width: 100%;
    min-width: 0;
    min-height: calc(100dvh - var(--app-header-height) - var(--app-footer-height));
    flex: 1 1 auto;
    padding: 20px 22px;
    position: relative;
    z-index: 1;
}

.home-banner {
    width: 100%;
    aspect-ratio: 1672 / 941;
    max-height: 79vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--app-surface);
}

.home-banner-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.unauthenticated-content {
    position: relative;
    z-index: 2;
    width: 97%;
    min-height: 100dvh;
    margin: 0 auto;
}

.banking-shell .global-toolbox-btn { bottom: 52px; }
.banking-shell .toolbox-menu { bottom: 116px; }

html.dark .banking-shell,
html.dark .banking-shell .app-main {
    --app-background: #101318;
    --app-surface: #181c23;
    --app-surface-muted: #20252e;
    --app-text-primary: #f2f4f7;
    --app-text-secondary: #a7b0bf;
    --app-border: #2c323c;
    background: var(--app-background);
    color: var(--app-text-primary);
}

@media (max-width: 1399px) {
    .app-content { padding: 16px; }
}

@media (max-width: 1024px) {
    .banking-shell .app-main,
    .banking-shell.sidebar-expanded .app-main { margin-left: 0; }
    .app-content { padding: 14px 12px; }
}

@media (min-width: 1025px) {
    .banking-shell:has(.sidebar-menu.collapsed:not(.navigation-collapsed):hover) .app-main,
    .banking-shell:has(.sidebar-menu.collapsed:not(.navigation-collapsed):focus-within) .app-main {
        margin-left: var(--app-sidebar-width);
    }
}

@media (prefers-reduced-motion: reduce) {
    .banking-shell .app-main { transition: none; }
}

/* Reglas de inicio consolidadas desde Pages/Index.razor. */
.landing-description-text {
color: #000;
  font-size: 12px;
}

.landing-heading-line {
color: #000;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem) !important;
}

.card-description {
font-size: 12px;
}

.landing-footer {
position: absolute;
        bottom: 1.5rem;
        left: 0;
        right: 0;
        z-index: 3;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: min(100%, 80rem);
        margin: 0 auto;
        padding: 0 1.5rem;
        color: #000 !important;
        font-size: clamp(0.62rem, 1.3vw, 0.75rem);
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        pointer-events: none;
}

.landing-footer p {
margin: 0;
        color: #000 !important;
}

.login-flow-container::after {
content: '';
        position: absolute;
        top: 0; left: 0;
        width: 3px; height: 100%;
        background: linear-gradient(180deg, red, rgba(0,210,255,0.25), transparent);
        border-radius: 3px 0 0 3px;
}

.ms-title {
font-family: 'Manrope', 'Inter', sans-serif;
        font-size: 1.6rem;
        font-weight: 700;
        color: rgba(240, 242, 245, 0.95);
        margin: 0 0 0.35rem 0;
        letter-spacing: -0.02em;
}

.ms-subtitle {
font-size: 0.9rem;
        font-weight: 400;
        color: white;
        margin: 0 0 1.2rem 0;
        letter-spacing: 0.03em;
}

.ms-input-label {
display: block;
        font-size: 0.9rem;
        font-weight: 600;
        color: white;
        margin-bottom: 0.4rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
}

.ms-input {
width: 100%;
        background: white;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 0.7rem 1rem;
        color: black;
        font-family: 'Inter', sans-serif;
        font-size: 1.2rem;
        transition: all 0.3s ease;
        outline: none;
}

.ms-input::placeholder {
color: black
}

.ms-input:focus {
background-color:white !important
}

.ms-password-wrapper {
position: relative;
        display: flex;
        align-items: center;
}

.ms-password-wrapper .ms-input-password {
padding-right: 2.5rem;
}

.ms-password-toggle {
position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        border: none;
        color: #6b7280;
        cursor: pointer;
        padding: 0.25rem;
        font-size: 1rem;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s ease;
}

.ms-password-toggle:hover {
color: #374151;
}

.ms-password-toggle:focus {
outline: none;
}

.landing-button-label {
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif !important;
}

.ms-alert {
background: rgba(237, 28, 36, 0.07);
        border-left: 3px solid rgba(237, 28, 36, 0.5);
        color: rgba(255, 179, 179, 0.9);
        padding: 0.65rem 0.85rem;
        border-radius: 0 6px 6px 0;
        font-size: 1rem;
        margin-top: 0.75rem;
        line-height: 1.5;
}

.ms-security-footer {
display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 1.25rem;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
        font-size: 1.0rem;
        color: white;
        letter-spacing: 0.08em;
}

.ms-security-footer i {
font-size: 1.0rem;
        color: #22c55e;
}

.btn-retry:not(:disabled):hover {
background: rgba(0, 120, 212, 0.25);
    border-color: rgba(0, 120, 212, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 120, 212, 0.2);
}

.btn-retry:disabled {
opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.btn-back-suspicious {
width: 100%;
    background: transparent;
    color: rgba(240, 242, 245, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.btn-back-suspicious:hover {
background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(240, 242, 245, 0.8);
}

.suspicious-warning-bar {
width: 100%;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.12);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    color: rgba(252, 165, 165, 0.7);
    line-height: 1.45;
}

.suspicious-warning-bar i {
color: #ef4444;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.permanent-block-icon {
width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: rgba(239, 68, 68, 0.12);
    border: 2px solid rgba(239, 68, 68, 0.4);
    animation: permanent-block-pulse 2s ease-in-out infinite;
}

.permanent-block-icon i {
font-size: 2rem;
    color: #dc2626;
}

@keyframes permanent-block-pulse {
0%, 100% { box-shadow: 0 0 30px rgba(220, 38, 38, 0.2); }
    50% { box-shadow: 0 0 60px rgba(220, 38, 38, 0.4); }
}

.suspicious-contact {
font-size: 0.72rem;
    color: rgba(240, 242, 245, 0.3);
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    line-height: 1.6;
}

.suspicious-contact a {
color: rgba(0, 120, 212, 0.7);
    text-decoration: none;
}

.suspicious-contact a:hover {
color: rgba(0, 120, 212, 1);
    text-decoration: underline;
}

.sw-update-overlay {
position: fixed;
    inset: 0;
    z-index: 99999;
    background: radial-gradient(circle at 50% 50%, #1a0505 0%, #080303 70%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sw-fade-in 0.3s ease;
}

@keyframes sw-fade-in {
from { opacity: 0; }
    to   { opacity: 1; }
}

.sw-update-card {
text-align: center;
    color: #f0f2f5;
    max-width: 440px;
    width: calc(100% - 2rem);
    padding: 2.5rem 2rem;
    background: rgba(12, 12, 15, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    position: relative;
    overflow: hidden;
}

.sw-update-card::before {
content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(237,28,36,0.6), transparent);
}

.sw-update-icon {
width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(237, 28, 36, 0.08);
    border: 2px solid rgba(237, 28, 36, 0.25);
    box-shadow: 0 0 40px rgba(237, 28, 36, 0.15), inset 0 0 20px rgba(237, 28, 36, 0.05);
    animation: sw-pulse-icon 2.5s ease-in-out infinite;
}

.sw-update-icon i {
font-size: 1.8rem;
    color: #ef4444;
    animation: sw-rotate-icon 2s linear infinite;
}

@keyframes sw-pulse-icon {
0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(237, 28, 36, 0.15); }
    50%      { transform: scale(1.05); box-shadow: 0 0 60px rgba(237, 28, 36, 0.30); }
}

@keyframes sw-rotate-icon {
to { transform: rotate(360deg); }
}

.sw-update-card h3 {
font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    color: rgba(240, 242, 245, 0.95);
}

.sw-update-card .sw-update-message {
color: rgba(240, 242, 245, 0.70);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    min-height: 1.4em;
    transition: opacity 0.3s ease;
    font-weight: 500;
}

.sw-hint {
color: rgba(240, 242, 245, 0.40);
    font-size: 0.78rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.6;
}

@media (max-width: 767px) {
    .sw-update-card {
    padding: 2rem 1.25rem;
    }

    .sw-update-card h3 {
    font-size: 1.25rem;
    }
}

/* Mantiene breve la transición posterior a la selección del portal. */
.landing-shell.login-mode .cards-container { transition: opacity 0.35s ease, max-height 0.35s ease, transform 0.35s ease, margin 0.35s ease, padding 0.35s ease; }
.landing-shell.login-mode .hero-copy { transition: margin-bottom 0.35s ease; }
.landing-shell.login-mode .logo-wrap img { transition: width 0.35s ease; }
.landing-shell.login-mode .landing-title span { transition: font-size 0.35s ease; }
.landing-shell.login-mode .landing-description { transition: font-size 0.35s ease, max-width 0.35s ease; }
.landing-shell.login-mode .landing-main { transition: gap 0.35s ease; }
@media (prefers-reduced-motion: reduce) {
    .landing-shell, .landing-shell *, .transition-overlay, .transition-overlay * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
