/* ===== Estructura de la web: menú lateral (escritorio) y barra inferior (móvil) ===== */
.xr-app { min-height: 100vh; display: flex; }

.xr-sidebar { width: 264px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--xr-borde); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1040; }
.xr-sidebar .xr-marca { padding: 1.25rem 1.25rem .5rem; }
.xr-sidebar .xr-marca img { height: 40px; }
.xr-sidebar .xr-producto { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin-top: .35rem; }
.xr-empresa { margin: .75rem 1rem 1rem; padding: .75rem; border: 1px solid var(--xr-borde); border-radius: 14px; display: flex; align-items: center; gap: .7rem; background: #fbfcfe; }
.xr-empresa img { max-width: 64px; max-height: 40px; object-fit: contain; }
.xr-empresa .xr-empresa-nombre { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.xr-empresa .xr-empresa-sub { font-size: .75rem; color: var(--xr-suave); }

.xr-nav { padding: 0 .75rem; flex: 1; }
.xr-nav .xr-seccion { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; padding: .9rem .6rem .4rem; }
.xr-nav a { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 12px; color: #334155; text-decoration: none; font-weight: 500; margin-bottom: 2px; }
.xr-nav a:hover { background: #f4f6fb; color: var(--xr-texto); }
.xr-nav a.active { background: #fff0f7; color: var(--xr-rosa-osc); font-weight: 700; }
.xr-nav a .rh-tile { width: 30px; height: 30px; border-radius: 9px; }

.xr-usuario { margin: .75rem; padding: .7rem; border-radius: 14px; background: #f4f6fb; display: flex; align-items: center; gap: .65rem; }
.xr-usuario .xr-usuario-nombre { font-weight: 600; font-size: .88rem; line-height: 1.2; }
.xr-usuario .xr-usuario-rol { font-size: .74rem; color: var(--xr-suave); }
.xr-usuario a { color: var(--xr-suave); }
.xr-usuario a:hover { color: var(--xr-rosa); }

.xr-principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.xr-contenido { padding: 1.75rem 2rem 2.5rem; max-width: 1280px; width: 100%; }

.xr-topbar { display: none; }
.xr-tabbar { display: none; }
.xr-velo { display: none; }

@media (max-width: 991.98px) {
    .xr-sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(15,23,42,.18); }
    .xr-sidebar.abierta { transform: none; }
    .xr-velo.abierta { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 1030; }
    .xr-topbar { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; background: #fff; border-bottom: 1px solid var(--xr-borde); position: sticky; top: 0; z-index: 1020; }
    .xr-topbar img.xr-simbolo { height: 30px; }
    .xr-topbar .xr-topbar-titulo { font-weight: 800; font-size: .95rem; line-height: 1.1; }
    .xr-topbar .xr-topbar-empresa { font-size: .75rem; color: var(--xr-suave); }
    .xr-topbar img.xr-logo-empresa { max-height: 30px; max-width: 80px; object-fit: contain; margin-left: auto; }
    .xr-topbar button { border: 0; background: transparent; padding: .35rem; color: var(--xr-texto); }
    .xr-contenido { padding: 1rem 1rem 6rem; }
    .xr-tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--xr-borde); z-index: 1020; padding-bottom: env(safe-area-inset-bottom); }
    .xr-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0 .55rem; font-size: .7rem; color: var(--xr-suave); text-decoration: none; font-weight: 600; }
    .xr-tabbar a.active { color: var(--xr-rosa); }
    .xr-tabbar a.xr-tab-fichar .xr-tab-circulo { width: 46px; height: 46px; margin-top: -22px; border-radius: 50%; background: var(--xr-degradado); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(232,23,123,.35); }
}

/* ===== Login ===== */
.xr-login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.xr-login-marca { background: var(--xr-degradado); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.xr-login-marca::before, .xr-login-marca::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.xr-login-marca::before { width: 420px; height: 420px; right: -140px; top: -120px; }
.xr-login-marca::after { width: 300px; height: 300px; left: -100px; bottom: -110px; }
.xr-login-marca .xr-blanco { background: #fff; border-radius: 16px; padding: .7rem 1rem; display: inline-block; }
.xr-login-marca .xr-blanco img { height: 46px; }
.xr-login-marca h2 { font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.xr-login-marca ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.xr-login-marca li { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; opacity: .95; }
.xr-login-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; background: #fff; }
.xr-login-form .xr-caja { width: 100%; max-width: 380px; }
.xr-login-form h1 { font-size: 1.6rem; font-weight: 800; }
.xr-login-form .form-control { padding: .7rem .9rem; }
.xr-login-empresa { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--xr-borde); border-radius: 14px; margin-bottom: 1.25rem; background: #fbfcfe; }
.xr-login-empresa img { max-height: 42px; max-width: 90px; object-fit: contain; }
.xr-login-movil { display: none; }
@media (max-width: 991.98px) {
    .xr-login { grid-template-columns: 1fr; }
    .xr-login-marca { display: none; }
    .xr-login-movil { display: block; text-align: center; margin-bottom: 1.5rem; }
    .xr-login-movil img { height: 52px; }
}

#blazor-error-ui { z-index: 2000; }
.min-w-0 { min-width: 0; }

/* Banda del modo soporte (superadministrador dentro de una empresa) */
.xr-banda-soporte { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .55rem 1.25rem; background: #0f172a; color: #fff; font-size: .85rem; position: sticky; top: 0; z-index: 1030; }
.xr-banda-soporte a { color: #fda4cf; font-weight: 700; margin-left: auto; text-decoration: none; }
.xr-banda-soporte a:hover { color: #fff; }
