/* WiseMed360 Tenant Admin Shell Theme
   Scope: tenant admin safe shell only.
   Activated by body class: wm-tenant-shell-active.
   UI only. No field-control overrides.
*/

body.wm-tenant-shell-active {
    --wm-teal: #0f8f94;
    --wm-teal-dark: #0b6f76;
    --wm-mint: #58c9bd;
    --wm-navy: #071722;
    --wm-slate: #64748b;
    --wm-soft: #f6fbfc;
    --wm-border: #e5eef1;
    --wm-shadow-soft: 0 14px 34px rgba(15, 23, 42, .055);
}

body.wm-tenant-shell-active,
body.wm-tenant-shell-active .fi-layout {
    background:
        radial-gradient(circle at top right, rgba(15, 143, 148, .09), transparent 34rem),
        radial-gradient(circle at bottom left, rgba(88, 201, 189, .055), transparent 28rem),
        linear-gradient(180deg, #f8fcfd 0%, #ffffff 42%, #ffffff 100%) !important;
}

body.wm-tenant-shell-active .fi-main,
body.wm-tenant-shell-active .fi-main-ctn {
    background: transparent !important;
}

/* Sidebar claro, alineado al landing */
body.wm-tenant-shell-active .fi-sidebar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(247, 252, 253, .98) 100%) !important;
    border-right: 1px solid rgba(226, 238, 241, .95) !important;
    box-shadow: 10px 0 28px rgba(15, 23, 42, .045) !important;
}

body.wm-tenant-shell-active .fi-sidebar-header {
    background: rgba(255, 255, 255, .98) !important;
    border-bottom: 1px solid rgba(226, 238, 241, .95) !important;
}

body.wm-tenant-shell-active .fi-sidebar .fi-logo {
    filter: none !important;
}

body.wm-tenant-shell-active .fi-sidebar-group-label {
    color: #78909c !important;
    font-size: .71rem !important;
    font-weight: 720 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

body.wm-tenant-shell-active .fi-sidebar-item a {
    border-radius: 14px !important;
    color: #526777 !important;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

body.wm-tenant-shell-active .fi-sidebar-item a svg {
    color: #8aa0ad !important;
}

body.wm-tenant-shell-active .fi-sidebar-item a:hover {
    background: rgba(15, 143, 148, .065) !important;
    color: var(--wm-teal-dark) !important;
}

body.wm-tenant-shell-active .fi-sidebar-item a:hover svg {
    color: var(--wm-teal-dark) !important;
}

body.wm-tenant-shell-active .fi-sidebar-item.fi-active a,
body.wm-tenant-shell-active .fi-sidebar-item-active a,
body.wm-tenant-shell-active .fi-sidebar-nav-item-active a {
    background: linear-gradient(135deg, #0b6f76, #0f8f94) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(15, 143, 148, .16) !important;
}

body.wm-tenant-shell-active .fi-sidebar-item.fi-active svg,
body.wm-tenant-shell-active .fi-sidebar-item-active svg,
body.wm-tenant-shell-active .fi-sidebar-nav-item-active svg {
    color: #ffffff !important;
}

/* Topbar tipo landing */
body.wm-tenant-shell-active .fi-topbar nav {
    background: rgba(255, 255, 255, .92) !important;
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 238, 241, .9) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .035) !important;
}

body.wm-tenant-shell-active .fi-header-heading {
    color: var(--wm-navy) !important;
    font-weight: 760 !important;
    letter-spacing: -.035em !important;
}

body.wm-tenant-shell-active .fi-header-subheading {
    color: var(--wm-slate) !important;
    font-weight: 520 !important;
}

/* Cards y tablas más limpias */
body.wm-tenant-shell-active .fi-section,
body.wm-tenant-shell-active .fi-widget,
body.wm-tenant-shell-active .fi-ta-ctn,
body.wm-tenant-shell-active .fi-in-entry-wrp {
    border: 1px solid var(--wm-border) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: var(--wm-shadow-soft) !important;
}

body.wm-tenant-shell-active .fi-section-header {
    background: rgba(250, 253, 254, .82) !important;
    border-bottom-color: rgba(226, 238, 241, .9) !important;
}

body.wm-tenant-shell-active .fi-section-header-heading,
body.wm-tenant-shell-active .fi-wi-stats-overview-stat-label,
body.wm-tenant-shell-active .fi-ta-header-cell-label {
    color: var(--wm-navy) !important;
    font-weight: 720 !important;
}

body.wm-tenant-shell-active .fi-wi-stats-overview-stat {
    border: 1px solid var(--wm-border) !important;
    border-radius: 22px !important;
    background:
        radial-gradient(circle at top right, rgba(15, 143, 148, .05), transparent 16rem),
        #ffffff !important;
    box-shadow: var(--wm-shadow-soft) !important;
}

body.wm-tenant-shell-active .fi-wi-stats-overview-stat-value {
    color: var(--wm-navy) !important;
    font-weight: 760 !important;
    letter-spacing: -.035em !important;
}

body.wm-tenant-shell-active .fi-ta-header,
body.wm-tenant-shell-active .fi-ta-footer {
    background: #fbfdfe !important;
}

body.wm-tenant-shell-active .fi-ta-row:hover {
    background: #f7fdfe !important;
}

/* Acciones principales sobrias */
body.wm-tenant-shell-active .fi-btn-color-primary {
    background: linear-gradient(135deg, #0b6f76, #0f8f94) !important;
    border: 0 !important;
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(15, 143, 148, .14) !important;
}

body.wm-tenant-shell-active .fi-btn-color-primary:hover {
    background: linear-gradient(135deg, #095f65, #0d7f84) !important;
    box-shadow: 0 14px 28px rgba(15, 143, 148, .18) !important;
}

body.wm-tenant-shell-active .fi-badge {
    border-radius: 999px !important;
    font-weight: 650 !important;
}

/* === Tenant shell refinement v5: CRUD width + active nav contrast ===
   Objetivo:
   - Mejorar contraste del item activo del sidebar
   - Reducir espacio muerto lateral en CRUD/listados
   - Mantener intactos inputs/selects/dropdowns
*/

/* 1) Sidebar activo: forzar contraste correcto */
body.wm-tenant-shell-active .fi-sidebar-item.fi-active > a,
body.wm-tenant-shell-active .fi-sidebar-item-active > a,
body.wm-tenant-shell-active .fi-sidebar-nav-item-active > a {
    background: linear-gradient(135deg, #0b6f76, #0f8f94) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(15, 143, 148, .16) !important;
}

body.wm-tenant-shell-active .fi-sidebar-item.fi-active > a *,
body.wm-tenant-shell-active .fi-sidebar-item-active > a *,
body.wm-tenant-shell-active .fi-sidebar-nav-item-active > a * {
    color: #ffffff !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

body.wm-tenant-shell-active .fi-sidebar-item.fi-active > a svg,
body.wm-tenant-shell-active .fi-sidebar-item-active > a svg,
body.wm-tenant-shell-active .fi-sidebar-nav-item-active > a svg {
    color: #ffffff !important;
}

/* 2) Sidebar hover más limpio */
body.wm-tenant-shell-active .fi-sidebar-item > a:hover {
    background: rgba(15, 143, 148, .07) !important;
    color: #0b6f76 !important;
}

body.wm-tenant-shell-active .fi-sidebar-item > a:hover * {
    color: #0b6f76 !important;
}

/* 3) Ampliar el ancho útil del contenido principal */
body.wm-tenant-shell-active .fi-main,
body.wm-tenant-shell-active .fi-main-ctn,
body.wm-tenant-shell-active .fi-page,
body.wm-tenant-shell-active .fi-page-content,
body.wm-tenant-shell-active [class*="fi-resource-"],
body.wm-tenant-shell-active [class*="fi-page-"] {
    max-width: none !important;
}

/* 4) Limitar pero mucho más ancho que antes */
body.wm-tenant-shell-active .fi-page {
    width: 100% !important;
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 5) Menos espacio muerto lateral */
body.wm-tenant-shell-active .fi-main-ctn {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 1024px) {
    body.wm-tenant-shell-active .fi-main-ctn {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

@media (min-width: 1440px) {
    body.wm-tenant-shell-active .fi-page {
        max-width: 1680px !important;
    }

    body.wm-tenant-shell-active .fi-main-ctn {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* 6) Listados/tablas ocupan mejor el ancho disponible */
body.wm-tenant-shell-active .fi-ta-ctn {
    width: 100% !important;
}

body.wm-tenant-shell-active .fi-ta-content,
body.wm-tenant-shell-active .fi-ta-table {
    width: 100% !important;
}

/* 7) Encabezados de página un poco más compactos */
body.wm-tenant-shell-active .fi-header {
    margin-bottom: 1rem !important;
}

body.wm-tenant-shell-active .fi-page-content {
    gap: 1rem !important;
}

/* 8) Mantener el cuadro bonito sin cambiar su esencia */
body.wm-tenant-shell-active .fi-section,
body.wm-tenant-shell-active .fi-ta-ctn {
    overflow: hidden !important;
}

/* === Tenant shell refinement v7: app-wide content width ===
   Objetivo:
   - Quitar el efecto de CRUD centrado con mucho espacio lateral
   - Usar casi todo el ancho disponible del tenant admin
   - Mantener padding lateral elegante
   - No tocar inputs/selects/dropdowns
*/

/* Contenedor principal: usar ancho completo disponible */
body.wm-tenant-shell-active .fi-main,
body.wm-tenant-shell-active .fi-main-ctn,
body.wm-tenant-shell-active .fi-page,
body.wm-tenant-shell-active .fi-page-content {
    width: 100% !important;
    max-width: none !important;
}

/* Filament suele centrar páginas con mx-auto/max-width; lo neutralizamos en el shell */
body.wm-tenant-shell-active .fi-main {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Padding lateral pequeño y consistente */
body.wm-tenant-shell-active .fi-main-ctn {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 1024px) {
    body.wm-tenant-shell-active .fi-main-ctn {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

@media (min-width: 1440px) {
    body.wm-tenant-shell-active .fi-main-ctn {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Listados y tablas: ocupar el ancho del canvas */
body.wm-tenant-shell-active .fi-ta-ctn,
body.wm-tenant-shell-active .fi-ta,
body.wm-tenant-shell-active .fi-ta-content,
body.wm-tenant-shell-active .fi-ta-table {
    width: 100% !important;
    max-width: none !important;
}

/* Sections/cards: también pueden crecer */
body.wm-tenant-shell-active .fi-section,
body.wm-tenant-shell-active .fi-widget,
body.wm-tenant-shell-active .fi-in-entry-wrp {
    width: 100% !important;
    max-width: none !important;
}

/* Neutralizar max-width comunes de Tailwind solo dentro del shell */
body.wm-tenant-shell-active .fi-main .max-w-7xl,
body.wm-tenant-shell-active .fi-main .max-w-screen-2xl,
body.wm-tenant-shell-active .fi-main .max-w-screen-xl,
body.wm-tenant-shell-active .fi-main .max-w-6xl,
body.wm-tenant-shell-active .fi-main .max-w-5xl {
    max-width: none !important;
}

/* Mantener una separación superior más compacta */
body.wm-tenant-shell-active .fi-header {
    margin-bottom: 1rem !important;
}

body.wm-tenant-shell-active .fi-page-content {
    gap: 1rem !important;
}

/* En páginas tipo Agenda diaria, permitir que los bloques custom crezcan */
body.wm-tenant-shell-active .fi-page-content > *,
body.wm-tenant-shell-active .fi-page-content section,
body.wm-tenant-shell-active .fi-page-content form {
    max-width: none !important;
}

/* La tabla/card conserva el look de cuadro */
body.wm-tenant-shell-active .fi-ta-ctn,
body.wm-tenant-shell-active .fi-section {
    border-radius: 24px !important;
}

/* === Tenant shell refinement v8: daily sheet full-width ===
   Objetivo:
   - Aplicar shell a Agenda diaria
   - Hacer que sus cuadros custom usen más ancho
   - No tocar inputs/selects/dropdowns
*/

body.wm-tenant-shell-daily-sheet .fi-page,
body.wm-tenant-shell-daily-sheet .fi-page-content,
body.wm-tenant-shell-daily-sheet .fi-main,
body.wm-tenant-shell-daily-sheet .fi-main-ctn {
    width: 100% !important;
    max-width: none !important;
}

body.wm-tenant-shell-daily-sheet .fi-page-content > *,
body.wm-tenant-shell-daily-sheet .fi-page-content > div,
body.wm-tenant-shell-daily-sheet .fi-page-content section,
body.wm-tenant-shell-daily-sheet .fi-page-content form {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.wm-tenant-shell-daily-sheet .fi-page-content .max-w-7xl,
body.wm-tenant-shell-daily-sheet .fi-page-content .max-w-6xl,
body.wm-tenant-shell-daily-sheet .fi-page-content .max-w-5xl,
body.wm-tenant-shell-daily-sheet .fi-page-content .max-w-4xl,
body.wm-tenant-shell-daily-sheet .fi-page-content .max-w-3xl,
body.wm-tenant-shell-daily-sheet .fi-page-content .max-w-2xl,
body.wm-tenant-shell-daily-sheet .fi-page-content .max-w-xl {
    width: 100% !important;
    max-width: none !important;
}

body.wm-tenant-shell-daily-sheet .fi-page-content .mx-auto {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Mantener el look de cuadro que sí gustó */
body.wm-tenant-shell-daily-sheet .fi-page-content section,
body.wm-tenant-shell-daily-sheet .fi-page-content [class*="rounded"] {
    border-radius: 24px;
}

/* === Tenant forms CSS-only v1: safe create/edit styling ===
   Objetivo:
   - Mejorar visual de formularios create/edit en rutas seguras
   - Sin JS nuevo
   - Sin MutationObserver
   - Sin tocar inputs/selects/dropdowns/combobox
   - No aplica en rutas protegidas porque depende de wm-tenant-shell-active
*/

body.wm-tenant-shell-active .fi-page form .fi-section {
    border-radius: 26px !important;
    border: 1px solid rgba(213, 231, 235, .95) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .99) 0%, rgba(252, 254, 255, .98) 100%) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .06) !important;
    overflow: hidden !important;
}

body.wm-tenant-shell-active .fi-page form .fi-section::before {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #0b6f76, #0f8f94, rgba(88, 201, 189, .55));
}

body.wm-tenant-shell-active .fi-page form .fi-section-header {
    background:
        linear-gradient(135deg, rgba(15, 143, 148, .075), rgba(255, 255, 255, .98) 42%, rgba(255, 255, 255, .98)) !important;
    border-bottom: 1px solid rgba(226, 238, 241, .95) !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

body.wm-tenant-shell-active .fi-page form .fi-section-header-heading {
    color: #071722 !important;
    font-weight: 780 !important;
    letter-spacing: -.025em !important;
}

body.wm-tenant-shell-active .fi-page form .fi-section-content {
    padding-top: 1.35rem !important;
    padding-bottom: 1.35rem !important;
}

body.wm-tenant-shell-active .fi-form-actions {
    margin-top: 1rem !important;
}

body.wm-tenant-shell-active .fi-form-actions .fi-btn {
    border-radius: 12px !important;
    font-weight: 680 !important;
}

/* === Tenant forms CSS-only v2: stronger product form cards ===
   Objetivo:
   - Hacer formularios seguros más visibles/premium
   - Inspirado en cuadro de Agenda diaria
   - CSS-only
   - No aplica a rutas protegidas
*/

/* Card principal de formularios seguros */
body.wm-tenant-shell-active .fi-page form .fi-section {
    border-radius: 28px !important;
    border: 1px solid rgba(188, 224, 226, .95) !important;
    background:
        radial-gradient(circle at top right, rgba(15, 143, 148, .045), transparent 18rem),
        linear-gradient(180deg, rgba(255, 255, 255, .995) 0%, rgba(250, 254, 255, .99) 100%) !important;
    box-shadow: 0 24px 58px rgba(15, 23, 42, .075) !important;
    overflow: hidden !important;
}

/* Quitar barra anterior si existe y reemplazar por header más fuerte */
body.wm-tenant-shell-active .fi-page form .fi-section::before {
    display: none !important;
}

/* Header tipo producto, más evidente */
body.wm-tenant-shell-active .fi-page form .fi-section-header {
    background:
        linear-gradient(135deg, #073d4a 0%, #0b6f76 48%, #0f8f94 100%) !important;
    border-bottom: 0 !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .18) !important;
}

body.wm-tenant-shell-active .fi-page form .fi-section-header-heading,
body.wm-tenant-shell-active .fi-page form .fi-section-header-description,
body.wm-tenant-shell-active .fi-page form .fi-section-header svg {
    color: #ffffff !important;
}

body.wm-tenant-shell-active .fi-page form .fi-section-header-heading {
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
}

/* Cuerpo con mejor respiración */
body.wm-tenant-shell-active .fi-page form .fi-section-content {
    padding-top: 1.65rem !important;
    padding-bottom: 1.65rem !important;
}

/* Separación entre secciones */
body.wm-tenant-shell-active .fi-page form .fi-section + .fi-section {
    margin-top: 1.25rem !important;
}

/* Acciones más integradas */
body.wm-tenant-shell-active .fi-form-actions {
    margin-top: 1.25rem !important;
    padding-bottom: 1rem !important;
}

body.wm-tenant-shell-active .fi-form-actions .fi-btn {
    border-radius: 13px !important;
    font-weight: 700 !important;
}

/* Botón primario consistente */
body.wm-tenant-shell-active .fi-form-actions .fi-btn-color-primary {
    background: linear-gradient(135deg, #0b6f76, #0f8f94) !important;
    box-shadow: 0 14px 28px rgba(15, 143, 148, .16) !important;
}

/* Forms con menos sensación plana */
body.wm-tenant-shell-active .fi-page-content > form {
    padding-bottom: 2rem !important;
}

/* === Tenant UI Consistency v1: safe tables cards and page rhythm ===
   Objetivo:
   - Homogeneizar listados, tablas y cards en rutas seguras
   - Mantener estética WiseMed/landing
   - CSS-only
   - No tocar inputs/selects/dropdowns/combobox
   - No aplica a rutas protegidas porque depende de wm-tenant-shell-active
*/

/* Ritmo general de páginas seguras */
body.wm-tenant-shell-active .fi-page {
    background:
        radial-gradient(circle at top right, rgba(15, 143, 148, .07), transparent 22rem),
        linear-gradient(180deg, rgba(247, 253, 254, .72), rgba(255, 255, 255, 1) 18rem) !important;
}

body.wm-tenant-shell-active .fi-page-header,
body.wm-tenant-shell-active .fi-header {
    margin-bottom: 1.35rem !important;
}

body.wm-tenant-shell-active .fi-header-heading {
    color: #071722 !important;
    letter-spacing: -.04em !important;
    font-weight: 820 !important;
}

/* Contenedores principales tipo producto */
body.wm-tenant-shell-active .fi-ta-ctn,
body.wm-tenant-shell-active .fi-infolist,
body.wm-tenant-shell-active .fi-wi-widget,
body.wm-tenant-shell-active .fi-section:not(form .fi-section) {
    border-radius: 24px !important;
    border: 1px solid rgba(213, 231, 235, .95) !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 22px 56px rgba(15, 23, 42, .065) !important;
    overflow: hidden !important;
}

/* Tablas: headers más limpios */
body.wm-tenant-shell-active .fi-ta-header,
body.wm-tenant-shell-active .fi-ta-header-toolbar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(249, 253, 254, .94)) !important;
    border-bottom: 1px solid rgba(226, 238, 241, .95) !important;
}

body.wm-tenant-shell-active .fi-ta-header-cell,
body.wm-tenant-shell-active .fi-ta-header-cell-label {
    color: #071722 !important;
    font-weight: 760 !important;
    letter-spacing: -.015em !important;
}

/* Filas más premium sin cambiar comportamiento */
body.wm-tenant-shell-active .fi-ta-row {
    transition: background-color .16s ease, box-shadow .16s ease !important;
}

body.wm-tenant-shell-active .fi-ta-row:hover {
    background: rgba(241, 250, 251, .82) !important;
}

/* Footer/paginación integrado */
body.wm-tenant-shell-active .fi-ta-footer {
    background: rgba(250, 253, 254, .96) !important;
    border-top: 1px solid rgba(226, 238, 241, .95) !important;
}

/* Tabs/filtros tipo pill, sin tocar inputs */
body.wm-tenant-shell-active .fi-tabs {
    border-radius: 18px !important;
    border: 1px solid rgba(226, 238, 241, .95) !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .045) !important;
}

body.wm-tenant-shell-active .fi-tabs-item {
    border-radius: 14px !important;
    font-weight: 650 !important;
}

/* Botones de acciones de header */
body.wm-tenant-shell-active .fi-header-actions .fi-btn,
body.wm-tenant-shell-active .fi-ac .fi-btn {
    border-radius: 13px !important;
    font-weight: 700 !important;
}

body.wm-tenant-shell-active .fi-header-actions .fi-btn-color-primary,
body.wm-tenant-shell-active .fi-ac .fi-btn-color-primary {
    background: linear-gradient(135deg, #0b6f76, #0f8f94) !important;
    box-shadow: 0 14px 28px rgba(15, 143, 148, .16) !important;
}

/* Badges más suaves */
body.wm-tenant-shell-active .fi-badge {
    border-radius: 999px !important;
    font-weight: 700 !important;
}

/* Empty states / no results */
body.wm-tenant-shell-active .fi-ta-empty-state {
    background:
        radial-gradient(circle at top, rgba(15, 143, 148, .055), transparent 18rem),
        rgba(255, 255, 255, .98) !important;
}

/* Dashboard widgets/cards seguras */
body.wm-tenant-shell-active .fi-wi-stats-overview-stat {
    border-radius: 24px !important;
    border: 1px solid rgba(213, 231, 235, .95) !important;
    background:
        radial-gradient(circle at top right, rgba(15, 143, 148, .065), transparent 12rem),
        rgba(255, 255, 255, .98) !important;
    box-shadow: 0 20px 44px rgba(15, 23, 42, .06) !important;
}

body.wm-tenant-shell-active .fi-wi-stats-overview-stat-value {
    color: #071722 !important;
    letter-spacing: -.04em !important;
}

/* === Protected module list UI v1: safe critical list polish ===
   Objetivo:
   - Mejorar visual de listados críticos sin tocar formularios
   - Aplica solo en rutas exactas:
     /admin/invoices
     /admin/payments
     /admin/credit-notes
     /admin/products
     /admin/cash-registers
   - No aplica en create/edit/view
   - CSS-only visual
   - No tocar inputs/selects/dropdowns/combobox
*/

body.wm-tenant-protected-list-shell {
    background:
        radial-gradient(circle at top right, rgba(15, 143, 148, .07), transparent 28rem),
        linear-gradient(180deg, #f8fcfd 0%, #ffffff 34%, #ffffff 100%) !important;
}

body.wm-tenant-protected-list-shell .fi-main,
body.wm-tenant-protected-list-shell .fi-main-ctn,
body.wm-tenant-protected-list-shell .fi-page,
body.wm-tenant-protected-list-shell .fi-page-content {
    width: 100% !important;
    max-width: none !important;
}

body.wm-tenant-protected-list-shell .fi-main-ctn {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

@media (min-width: 1440px) {
    body.wm-tenant-protected-list-shell .fi-main-ctn {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

body.wm-tenant-protected-list-shell .fi-header {
    margin-bottom: 1.35rem !important;
}

body.wm-tenant-protected-list-shell .fi-header-heading {
    color: #071722 !important;
    letter-spacing: -.04em !important;
    font-weight: 820 !important;
}

body.wm-tenant-protected-list-shell .fi-ta-ctn {
    width: 100% !important;
    max-width: none !important;
    border-radius: 24px !important;
    border: 1px solid rgba(213, 231, 235, .95) !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 22px 56px rgba(15, 23, 42, .065) !important;
    overflow: hidden !important;
}

body.wm-tenant-protected-list-shell .fi-ta-header,
body.wm-tenant-protected-list-shell .fi-ta-header-toolbar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(249, 253, 254, .94)) !important;
    border-bottom: 1px solid rgba(226, 238, 241, .95) !important;
}

body.wm-tenant-protected-list-shell .fi-ta-header-cell,
body.wm-tenant-protected-list-shell .fi-ta-header-cell-label {
    color: #071722 !important;
    font-weight: 760 !important;
    letter-spacing: -.015em !important;
}

body.wm-tenant-protected-list-shell .fi-ta-row:hover {
    background: rgba(241, 250, 251, .82) !important;
}

body.wm-tenant-protected-list-shell .fi-ta-footer {
    background: rgba(250, 253, 254, .96) !important;
    border-top: 1px solid rgba(226, 238, 241, .95) !important;
}

body.wm-tenant-protected-list-shell .fi-header-actions .fi-btn,
body.wm-tenant-protected-list-shell .fi-ac .fi-btn {
    border-radius: 13px !important;
    font-weight: 700 !important;
}

body.wm-tenant-protected-list-shell .fi-header-actions .fi-btn-color-primary,
body.wm-tenant-protected-list-shell .fi-ac .fi-btn-color-primary {
    background: linear-gradient(135deg, #0b6f76, #0f8f94) !important;
    box-shadow: 0 14px 28px rgba(15, 143, 148, .16) !important;
}

body.wm-tenant-protected-list-shell .fi-badge {
    border-radius: 999px !important;
    font-weight: 700 !important;
}

/* === Tenant Dashboard Polish v1: exact admin home ===
   Scope:
   - Solo ruta exacta /admin
   - Visual product dashboard
   - Sin controles de formulario
   - Sin lógica nueva
*/

body.wm-tenant-dashboard-shell .fi-page {
    background:
        radial-gradient(circle at top right, rgba(15, 143, 148, .09), transparent 26rem),
        linear-gradient(180deg, rgba(247, 253, 254, .9), rgba(255, 255, 255, 1) 22rem) !important;
}

body.wm-tenant-dashboard-shell .fi-main,
body.wm-tenant-dashboard-shell .fi-main-ctn,
body.wm-tenant-dashboard-shell .fi-page,
body.wm-tenant-dashboard-shell .fi-page-content {
    width: 100% !important;
    max-width: none !important;
}

body.wm-tenant-dashboard-shell .fi-main-ctn {
    padding-left: 1.35rem !important;
    padding-right: 1.35rem !important;
}

@media (min-width: 1440px) {
    body.wm-tenant-dashboard-shell .fi-main-ctn {
        padding-left: 1.75rem !important;
        padding-right: 1.75rem !important;
    }
}

body.wm-tenant-dashboard-shell .fi-header {
    margin-bottom: 1.6rem !important;
}

body.wm-tenant-dashboard-shell .fi-header-heading {
    color: #071722 !important;
    font-size: clamp(2rem, 2.2vw, 2.65rem) !important;
    line-height: 1.02 !important;
    font-weight: 860 !important;
    letter-spacing: -.055em !important;
}

/* KPI cards / widgets */
body.wm-tenant-dashboard-shell .fi-wi-stats-overview-stat,
body.wm-tenant-dashboard-shell .fi-wi-widget {
    border-radius: 26px !important;
    border: 1px solid rgba(213, 231, 235, .95) !important;
    background:
        radial-gradient(circle at top right, rgba(15, 143, 148, .065), transparent 12rem),
        rgba(255, 255, 255, .985) !important;
    box-shadow: 0 22px 54px rgba(15, 23, 42, .065) !important;
    overflow: hidden !important;
}

body.wm-tenant-dashboard-shell .fi-wi-stats-overview-stat:hover,
body.wm-tenant-dashboard-shell .fi-wi-widget:hover {
    transform: translateY(-1px);
    box-shadow: 0 26px 62px rgba(15, 23, 42, .078) !important;
}

body.wm-tenant-dashboard-shell .fi-wi-stats-overview-stat-value {
    color: #071722 !important;
    font-weight: 850 !important;
    letter-spacing: -.045em !important;
}

body.wm-tenant-dashboard-shell .fi-wi-stats-overview-stat-label {
    color: #64748b !important;
    font-weight: 680 !important;
}

/* Sections / últimas facturas */
body.wm-tenant-dashboard-shell .fi-section,
body.wm-tenant-dashboard-shell .fi-ta-ctn {
    border-radius: 26px !important;
    border: 1px solid rgba(213, 231, 235, .95) !important;
    background: rgba(255, 255, 255, .985) !important;
    box-shadow: 0 24px 58px rgba(15, 23, 42, .065) !important;
    overflow: hidden !important;
}

body.wm-tenant-dashboard-shell .fi-section-header,
body.wm-tenant-dashboard-shell .fi-ta-header,
body.wm-tenant-dashboard-shell .fi-ta-header-toolbar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(249, 253, 254, .96)) !important;
    border-bottom: 1px solid rgba(226, 238, 241, .95) !important;
}

body.wm-tenant-dashboard-shell .fi-section-header-heading,
body.wm-tenant-dashboard-shell .fi-ta-header-cell-label {
    color: #071722 !important;
    font-weight: 790 !important;
    letter-spacing: -.02em !important;
}

body.wm-tenant-dashboard-shell .fi-ta-row:hover {
    background: rgba(241, 250, 251, .82) !important;
}

body.wm-tenant-dashboard-shell .fi-ta-footer {
    background: rgba(250, 253, 254, .96) !important;
    border-top: 1px solid rgba(226, 238, 241, .95) !important;
}

/* Botón Personalizar y acciones */
body.wm-tenant-dashboard-shell .fi-header-actions .fi-btn,
body.wm-tenant-dashboard-shell .fi-ac .fi-btn {
    border-radius: 13px !important;
    font-weight: 700 !important;
}

body.wm-tenant-dashboard-shell .fi-header-actions .fi-btn-color-primary,
body.wm-tenant-dashboard-shell .fi-ac .fi-btn-color-primary {
    background: linear-gradient(135deg, #0b6f76, #0f8f94) !important;
    box-shadow: 0 14px 28px rgba(15, 143, 148, .16) !important;
}

body.wm-tenant-dashboard-shell .fi-badge {
    border-radius: 999px !important;
    font-weight: 700 !important;
}

/* === Tenant final UI consistency pass v1 ===
   Objetivo:
   - Unificar visualmente CRUDs/listados/formularios Filament.
   - Mantener Planner intacto.
   - No tocar inputs/selects/dropdowns/combobox.
   - No tocar lógica de facturación/POS/pagos.
*/

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) {
    --wm-final-teal: #0f8f94;
    --wm-final-teal-dark: #075f66;
    --wm-final-cyan: #08a7c5;
    --wm-final-ink: #0f172a;
    --wm-final-muted: #64748b;
    --wm-final-border: rgba(15, 143, 148, .18);
    --wm-final-soft: rgba(236, 254, 255, .72);
    --wm-final-shadow: 0 22px 60px rgba(15, 23, 42, .065);
}

/* Página: mejor ritmo visual */
body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-page {
    color: var(--wm-final-ink) !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-page-header {
    margin-bottom: 1.35rem !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-header-heading,
body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-page-header h1 {
    color: #071827 !important;
    font-weight: 760 !important;
    letter-spacing: -.025em !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-breadcrumbs {
    color: var(--wm-final-muted) !important;
}

/* Cards / sections: estilo producto */
body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-section {
    border: 1px solid var(--wm-final-border) !important;
    border-radius: 24px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94)) !important;
    box-shadow: var(--wm-final-shadow) !important;
    overflow: hidden !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-section-header {
    min-height: 3.2rem !important;
    border-bottom: 1px solid rgba(15, 143, 148, .14) !important;
    background:
        linear-gradient(135deg, rgba(240, 253, 250, .98), rgba(236, 254, 255, .94)) !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-section-header-heading {
    color: #073b43 !important;
    font-weight: 760 !important;
    letter-spacing: -.012em !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-section-content {
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, .045), transparent 28rem),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94)) !important;
}

/* Tablas / listados */
body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-ta-ctn {
    border: 1px solid rgba(15, 143, 148, .13) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .07) !important;
    overflow: hidden !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-ta-header {
    background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,253,250,.72)) !important;
    border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-ta-table thead {
    background:
        linear-gradient(180deg, rgba(248,250,252,.98), rgba(255,255,255,.96)) !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-ta-row:hover {
    background: rgba(236, 254, 255, .32) !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-ta-pagination {
    background: rgba(255, 255, 255, .98) !important;
    border-top: 1px solid rgba(148, 163, 184, .16) !important;
}

/* Botones */
body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-btn {
    border-radius: 13px !important;
    font-weight: 720 !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-btn-color-primary {
    background: linear-gradient(135deg, var(--wm-final-teal-dark), var(--wm-final-teal)) !important;
    box-shadow: 0 15px 30px rgba(15, 143, 148, .18) !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-btn-color-primary:hover {
    filter: brightness(1.03) saturate(1.04) !important;
}

/* Badges / tabs / counters */
body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-badge {
    border-radius: 999px !important;
    font-weight: 720 !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-tabs {
    border-radius: 18px !important;
    border: 1px solid rgba(15, 143, 148, .12) !important;
    background: rgba(255, 255, 255, .86) !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .045) !important;
}

body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-tabs-item-active {
    color: #075f66 !important;
    background: rgba(236, 254, 255, .78) !important;
}

/* Stats/dashboard/cards pequeños */
body.wm-tenant-shell-active:not(.wm-tenant-shell-planner) .fi-wi-stats-overview-stat {
    border: 1px solid rgba(15, 143, 148, .13) !important;
    border-radius: 22px !important;
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, .08), transparent 13rem),
        rgba(255, 255, 255, .96) !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .06) !important;
}
