/* Pantallas de ejemplo con el aspecto de Odoo (templates/flexone/solucion/_pantalla.html.twig) y secciones de función
   (_funcion.html.twig). Como las capturas del sitio, la pantalla es clara en los dos temas: colores fijos, no del tema.
   El morado es el de los botones de Odoo, igual que en las capturas. */
.fx-pantalla {
  --fx-p-texto: #1f2328;
  --fx-p-suave: #6b7280;
  --fx-p-borde: #e5e7eb;
  --fx-p-fondo-fila: #f8f9fb;
  --fx-p-odoo: #714b67;
  padding: 1.5rem 1.5rem 1.35rem;
  border: 1px solid var(--fx-p-borde);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 30px 70px -30px rgba(10, 15, 30, .35), 0 2px 8px rgba(10, 15, 30, .05);
  color: var(--fx-p-texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: .8125rem;
  line-height: 1.45;
}
[data-bs-theme=dark] .fx-pantalla { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); border-color: transparent; }
/* [data-bs-theme]: el tema pinta los <p> en oscuro con [data-bs-theme=dark] p, que se carga después */
[data-bs-theme] .fx-pantalla p, .fx-pantalla p { margin: 0; color: inherit; }

.fx-pantalla__cabecera { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.fx-pantalla__ruta { color: var(--fx-p-suave) !important; font-size: .8125rem; }
.fx-pantalla__titulo { margin-top: .1rem !important; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.fx-pantalla__subtitulo { margin-top: .2rem !important; color: var(--fx-p-suave) !important; }
.fx-pantalla__estado { flex: none; padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.fx-pantalla__estado--verde { background: #dcfce7; color: #166534; }
.fx-pantalla__estado--azul { background: #dbeafe; color: #1e40af; }
.fx-pantalla__estado--ambar { background: #fef3c7; color: #92400e; }

.fx-pantalla__resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.fx-pantalla__cifra { padding: .7rem .85rem; border: 1px solid var(--fx-p-borde); border-radius: .7rem; }
.fx-pantalla__cifra span { display: block; color: var(--fx-p-suave); font-size: .75rem; }
.fx-pantalla__cifra strong { display: block; margin-top: .15rem; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.fx-pantalla__tabla { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fx-pantalla__tabla th { padding: .5rem .55rem; border-bottom: 1px solid var(--fx-p-borde); color: var(--fx-p-suave); font-size: .75rem; font-weight: 500; text-align: left; white-space: nowrap; }
.fx-pantalla__tabla td { padding: .55rem; border-bottom: 1px solid var(--fx-p-borde); vertical-align: middle; white-space: nowrap; }
.fx-pantalla__tabla tbody tr:nth-child(even) td { background: var(--fx-p-fondo-fila); }
.fx-pantalla__tabla tfoot td { border-bottom: 0; font-weight: 600; }
.fx-pantalla__tabla .num { text-align: right; }
.fx-pantalla__persona { display: inline-flex; align-items: center; gap: .55rem; }
.fx-pantalla__avatar { display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: .45rem; color: #fff; font-size: .6875rem; font-weight: 600; }
.fx-pantalla__avatar--0 { background: #2f80c3; }
.fx-pantalla__avatar--1 { background: #d97a2b; }
.fx-pantalla__avatar--2 { background: #8a5ba8; }
.fx-pantalla__avatar--3 { background: #2e9e57; }
.fx-pantalla__avatar--4 { background: #c0392b; }
.fx-pantalla__avatar--5 { background: #138d90; }
.fx-pantalla__nombre { display: block; font-weight: 500; }
.fx-pantalla__cargo { display: block; color: var(--fx-p-suave); font-size: .6875rem; }

.fx-pantalla__bloques { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem; }
.fx-pantalla__bloque { padding: .85rem 1rem; border: 1px solid var(--fx-p-borde); border-radius: .8rem; }
.fx-pantalla__bloque-titulo { display: flex; align-items: center; gap: .45rem; margin-bottom: .45rem !important; font-weight: 600; }
.fx-pantalla__bloque-titulo .bi { color: var(--fx-p-odoo); }
.fx-pantalla__linea { display: flex; justify-content: space-between; gap: 1rem; padding: .22rem 0; font-variant-numeric: tabular-nums; }
.fx-pantalla__linea span:last-child { white-space: nowrap; }
.fx-pantalla__linea--total { margin-top: .3rem; padding-top: .5rem; border-top: 1px solid var(--fx-p-borde); font-weight: 600; }
.fx-pantalla__destacado { display: flex; justify-content: space-between; align-items: center; margin-top: .75rem; padding: .7rem 1rem; border-radius: .7rem; background: #f3eef2; }
.fx-pantalla__destacado strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.fx-pantalla__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.fx-pantalla__chips span { padding: .2rem .65rem; border-radius: 999px; background: #eceef1; color: #374151; font-size: .75rem; font-weight: 500; }
.fx-pantalla__nota { margin-top: .85rem !important; color: var(--fx-p-suave) !important; font-size: .75rem; }
.fx-pantalla__botones { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.fx-pantalla__boton { padding: .4rem .85rem; border-radius: .45rem; background: #eceef1; color: #1f2328; font-weight: 500; }
.fx-pantalla__boton--primario { background: var(--fx-p-odoo); color: #fff; }

/* Mini calendario */
.fx-pantalla__cal { margin-bottom: .9rem; }
.fx-pantalla__cal-mes { margin-bottom: .5rem !important; font-weight: 600; }
.fx-pantalla__cal-grilla { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; text-align: center; font-variant-numeric: tabular-nums; }
.fx-pantalla__cal-sem { color: var(--fx-p-suave); font-size: .6875rem; font-weight: 600; }
.fx-pantalla__cal-dia { padding: .3rem 0; border-radius: .4rem; }
.fx-pantalla__cal-dia.is-vac { background: #dcfce7; color: #166534; font-weight: 600; }
.fx-pantalla__cal-dia.is-pend { background: #fef3c7; color: #92400e; font-weight: 600; }

/* Lista (documentos, solicitudes) */
.fx-pantalla__lista { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.fx-pantalla__lista li { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border: 1px solid var(--fx-p-borde); border-radius: .7rem; }
.fx-pantalla__lista-icono { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: .5rem; background: #f3eef2; color: var(--fx-p-odoo); }
.fx-pantalla__lista-texto { flex: 1; min-width: 0; }
.fx-pantalla__lista-valor { white-space: nowrap; font-variant-numeric: tabular-nums; }

.fx-pantalla__estado--rojo { background: #fee2e2; color: #991b1b; }
.fx-pantalla__estado--gris { background: #eceef1; color: #374151; }

/* Chip dentro de una celda o tarjeta */
.fx-pantalla__chip { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .6875rem; font-weight: 600; white-space: nowrap; }
.fx-pantalla__chip--verde { background: #dcfce7; color: #166534; }
.fx-pantalla__chip--azul { background: #dbeafe; color: #1e40af; }
.fx-pantalla__chip--ambar { background: #fef3c7; color: #92400e; }
.fx-pantalla__chip--rojo { background: #fee2e2; color: #991b1b; }
.fx-pantalla__chip--gris { background: #eceef1; color: #4b5563; }

/* Barra de avance (lista) */
.fx-pantalla__avance { display: block; height: .3rem; margin-top: .35rem; border-radius: 999px; background: #eceef1; overflow: hidden; }
.fx-pantalla__avance span { display: block; height: 100%; border-radius: inherit; background: var(--fx-p-odoo); }

/* Organigrama: la gerencia arriba y las áreas debajo, unidas por una línea */
.fx-pantalla__org-raiz { display: flex; justify-content: center; padding-bottom: 1rem; position: relative; }
.fx-pantalla__org-raiz::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 1px; height: 1rem; background: var(--fx-p-borde); }
.fx-pantalla__org-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .5rem; padding-top: 1rem; border-top: 1px solid var(--fx-p-borde); }
.fx-pantalla__org-caja { display: flex; flex-direction: column; align-items: center; padding: .55rem .5rem; border: 1px solid var(--fx-p-borde); border-radius: .7rem; text-align: center; line-height: 1.3; }
.fx-pantalla__org-raiz .fx-pantalla__org-caja { min-width: 11rem; background: #f3eef2; border-color: transparent; }
.fx-pantalla__org-caja small { color: var(--fx-p-suave); font-size: .6875rem; }
.fx-pantalla__org-caja em { margin-top: .25rem; color: var(--fx-p-odoo); font-size: .6875rem; font-style: normal; font-weight: 600; }

/* Conversación tipo WhatsApp */
.fx-pantalla__chat { display: flex; flex-direction: column; gap: .45rem; padding: .85rem; border-radius: .8rem; background: #efeae2; }
.fx-pantalla__burbuja { max-width: 85%; padding: .45rem .65rem; border-radius: .7rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.fx-pantalla__burbuja small { display: block; margin-top: .15rem; color: var(--fx-p-suave); font-size: .625rem; text-align: right; }
.fx-pantalla__burbuja--sistema { align-self: flex-start; background: #fff; border-top-left-radius: .2rem; }
.fx-pantalla__burbuja--persona { align-self: flex-end; background: #d9fdd3; border-top-right-radius: .2rem; }

/* Kanban de etapas */
.fx-pantalla__kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .6rem; }
.fx-pantalla__kanban-col { padding: .6rem; border-radius: .7rem; background: var(--fx-p-fondo-fila); }
.fx-pantalla__kanban-etapa { display: flex; justify-content: space-between; margin-bottom: .5rem !important; font-weight: 600; }
.fx-pantalla__kanban-etapa span { color: var(--fx-p-suave); font-weight: 500; }
.fx-pantalla__kanban-tarjeta { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .45rem; padding: .5rem .6rem; border: 1px solid var(--fx-p-borde); border-radius: .55rem; background: #fff; }
.fx-pantalla__kanban-tarjeta .fx-pantalla__chip { align-self: flex-start; }

/* Celular: menos columnas (las `opcional`) y algo más de aire lateral */
@media (max-width: 575.98px) {
  .fx-pantalla { padding: 1.1rem 1rem 1rem; font-size: .75rem; }
  .fx-pantalla__tabla .opc { display: none; }
  .fx-pantalla__tabla th, .fx-pantalla__tabla td { padding-inline: .35rem; }
  .fx-pantalla__cabecera { flex-direction: column; gap: .5rem; }
}
