/* OfiSim · modo oficina (beta): escritorio, bandeja, reloj y avisos. */

body.oficina { background: var(--bg); }

.otop {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 22px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.oday { display: flex; flex-direction: column; line-height: 1.1; min-width: 88px }
.oday b { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em }
.oday span { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em }
.oprog { flex: 1; min-width: 150px; max-width: 360px }
.obar { height: 7px; background: var(--line); border-radius: 4px; overflow: hidden }
.obar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--coral)); transition: width .35s }
.oprog small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px }
.ochips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto }

.omain { max-width: 1280px; margin: 0 auto; padding: 20px 22px 40px }
.ohero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; margin-bottom: 14px; background: linear-gradient(120deg, var(--panel), var(--accentsoft)) }
.ohero h1 { margin: 2px 0 4px; font-size: 26px }
.ohero p { margin: 0; color: var(--muted); font-size: 13.5px }
.ohero-actions { display: flex; gap: 8px; flex-wrap: wrap }
.odias { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px }
.odias button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 6px; padding: 6px 10px; font-size: 11.5px; font-weight: 700; text-align: left }
.odias button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent) }
.odias button.on { background: var(--accent); border-color: var(--accent); color: #fff }
.odias button:disabled { opacity: .55; cursor: not-allowed }

.ogrid { display: grid; grid-template-columns: minmax(310px, 430px) 1fr; gap: 14px; align-items: start }
.obandeja { overflow: hidden }
.obandeja .hd { align-items: flex-start; gap: 10px; flex-wrap: wrap }
.ofiltros { display: flex; gap: 5px; flex-wrap: wrap }
.ofiltros button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 5px; padding: 4px 9px; font-size: 11.5px; font-weight: 700 }
.ofiltros button:hover { border-color: var(--accent); color: var(--accent) }
.ofiltros button.on { background: var(--accent); border-color: var(--accent); color: #fff }

.olista { display: flex; flex-direction: column; max-height: 62vh; overflow: auto }
.oitem {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text); text-align: left; cursor: pointer;
}
.oitem:hover { background: var(--panel2) }
.oitem.activo { background: var(--accentsoft); box-shadow: inset 3px 0 var(--accent) }
.oitem.hecha { opacity: .78 }
.oitem.perdida { opacity: .62 }
.oitem.urgente { box-shadow: inset 3px 0 var(--coral) }
.oic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--panel2); font-size: 18px }
.otxt { min-width: 0 }
.otxt b { display: block; font-size: 13.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.otxt small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.otag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 800; white-space: nowrap }
.otag.alta { background: var(--badsoft); color: var(--bad) }
.otag.media { background: var(--warnsoft); color: var(--warn) }
.otag.baja { background: var(--panel2); color: var(--muted) }
.otime { font-size: 11px; font-weight: 800; white-space: nowrap; color: var(--muted) }
.otime.urgente { color: var(--bad) }
.otime.ok { color: var(--ok) }

.odetalle { padding: 20px 22px; min-height: 360px }
.odetalle .ohead { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px }
.odetalle .ohead .oic { width: 52px; height: 52px; font-size: 26px; border-radius: 10px }
.odetalle h2 { margin: 0 0 3px; font-size: 21px }
.odetalle .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.odetalle .resumen { font-size: 14.5px; line-height: 1.6; margin: 4px 0 16px }
.odetalle .osla { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 7px 0 4px }
.odetalle .osla i { display: block; height: 100%; background: var(--accent) }
.odetalle .osla i.bad { background: var(--bad) }
.odetalle .osla i.warn { background: var(--warn) }
.odetalle .oacciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px }
.odetalle .agenda { margin: 2px 0 0; border-collapse: collapse; width: 100% }
.odetalle .agenda td { padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top }
.odetalle .agenda td:first-child { white-space: nowrap; color: var(--muted); font-weight: 700; width: 64px }
.odetalle .agenda .est { font-size: 11px; font-weight: 800; white-space: nowrap }
.odetalle .agenda .est.hecha { color: var(--ok) }
.odetalle .agenda .est.perdida { color: var(--bad) }
.odetalle .agenda .est.pendiente { color: var(--warn) }
.odetalle .agenda .est.futuro { color: var(--muted) }
.odetalle .oempty { text-align: center; color: var(--muted); padding: 26px 10px }
.odetalle .oempty .big { font-size: 42px; margin-bottom: 8px }

.oexplicacion { background: var(--panel2); border-left: 3px solid var(--accent); border-radius: 4px; padding: 10px 12px; font-size: 13px; line-height: 1.55; margin-top: 14px }
.ocorreccion { margin: 10px 0 0; padding: 0; list-style: none }
.ocorreccion li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px }
.ocorreccion .sic { width: 20px; height: 20px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 11px; flex-shrink: 0 }
.ocorreccion .sic.ok { background: var(--ok) }
.ocorreccion .sic.bad { background: var(--bad) }

.olog { margin-top: 14px; overflow: hidden }
.olog .hd { padding-bottom: 8px }
.olog #oLog { max-height: 190px; overflow: auto }
.olog .lrow { display: flex; gap: 10px; align-items: baseline; padding: 7px 18px; border-top: 1px solid var(--line); font-size: 12.5px }
.olog .lrow .lh { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 48px }
.olog .lrow .li { width: 20px; text-align: center; flex-shrink: 0 }

/* Briefing y resumen del día dentro de la ventana modal */
.ofi-brief .top, .ofi-resumen .top { padding: 26px 28px 8px; text-align: left }
.ofi-brief h2, .ofi-resumen h2 { margin: 6px 0 8px; font-size: 24px }
.ofi-brief ul, .ofi-resumen ul { text-align: left }
.ofi-brief p, .ofi-resumen p { font-size: 14px; line-height: 1.6; margin: 0 0 10px }
.ofi-brief ul, .ofi-resumen ul { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6 }
.ofi-brief .ft, .ofi-resumen .ft { padding: 14px 28px 22px }
.ofi-resumen .inota { display: inline-block; min-width: 130px }
.ofi-resumen .rkpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 4px }
.ofi-resumen .rkpis > div { background: var(--panel2); border-radius: 8px; padding: 10px; text-align: center }
.ofi-resumen .rkpis b { display: block; font-size: 20px }
.ofi-resumen .rkpis span { color: var(--muted); font-size: 11px }
.ofi-resumen .canales { margin-top: 14px }
.ofi-resumen .lista-perdidas { margin: 12px 0 0; padding: 0; list-style: none }
.ofi-resumen .lista-perdidas li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px }

@media (max-width: 900px) {
  .ogrid { grid-template-columns: 1fr }
  .olista { max-height: 42vh }
  .otop { padding: 10px 14px; gap: 10px }
  .ochips { margin-left: 0; width: 100% }
  .omain { padding: 14px 14px 30px }
  .ohero { flex-direction: column; align-items: flex-start }
  .ohero h1 { font-size: 22px }
  .odetalle { min-height: 300px }
  .ofi-resumen .rkpis { grid-template-columns: 1fr 1fr }
}
