/* ============================================================
   SAPIENS PLANNING · avatars.css
   Capa de presencia pixel-art: dock del usuario, popover de
   estado, hábitat del equipo (diorama día/noche), tarjetas
   hover y cronómetro por tarea. Construida sobre los tokens
   reales de Sapiens (styles.css → tokens/*).
   ============================================================ */

:root {
  --pix-ink:    #2e1d14;
  --pix-line:   #3a2618;
  --pix-paper:  #efe3cc;
  --pix-paper2: #e3d2ad;
  --pix-cream:  #f7efdc;
  /* estados (reusan la paleta de status del planning) */
  --st-activo:  #2E7D5B;
  --st-almuerzo:#E0991B;
  --st-dormir:  #2C6E8F;
  --st-fuera:   #A79E92;
  --pix-font: "Pixelify Sans", "VT323", monospace;
}

/* ============================================================
   STATS del Inicio (Mis tareas) — del prototipo
   ============================================================ */
.ws-stats { display: flex; gap: 12px; margin: 22px 0 6px; flex-wrap: wrap; }
.ws-stat { background: var(--sap-cream); border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--border-on-light);
  padding: 14px 18px; min-width: 132px; }
.ws-stat .n { font-family: var(--font-display); text-transform: uppercase; font-size: 34px; line-height: .9; }
.ws-stat .k { font-size: 12px; font-weight: 600; color: var(--text-muted-on-light); text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
.ws-stat.accent .n { color: var(--st-activo); font-variant-numeric: tabular-nums; }

/* encabezado de sección "MIS TAREAS" + grupos por proyecto */
.home-tasks-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 28px 0 4px; flex-wrap: wrap; }
.home-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.home-default { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; border: 1.5px dashed var(--border-on-light); background: transparent;
  color: var(--text-muted-on-light); cursor: pointer; transition: all .12s ease; }
.home-default .ic { width: 13px; height: 13px; }
.home-default:hover { border-color: var(--sap-ink); color: var(--sap-ink); }
.home-default.on { border-style: solid; border-color: var(--st-activo); color: var(--st-activo); cursor: default; }
.home-tasks-head h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 40px; line-height: .9; margin: 0; }
.home-tasks-sub { font-family: var(--font-serif); font-style: italic; color: var(--text-muted-on-light); font-size: 15.5px; margin: 6px 0 0; }
.ws-group { margin-top: 24px; }
.ws-group h3 { font-family: var(--font-serif); font-weight: 600; font-size: 16px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.ws-group h3 .ct { font-size: 12px; color: var(--text-muted-on-light); font-weight: 500; }
.ws-group h3 .pj { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--text-muted-on-light); }

/* —— botón timer / play por tarea (pill compacta en filas y tarjetas) —— */
.tplay { display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  background: var(--sap-cream); box-shadow: inset 0 0 0 1px var(--border-on-light);
  border-radius: var(--radius-pill); padding: 5px 7px 5px 11px; font-family: var(--pix-font);
  font-size: 14px; font-weight: 500; color: var(--sap-ink); letter-spacing: .02em;
  transition: box-shadow .14s ease, background .14s ease, color .14s ease, transform .12s cubic-bezier(0.23,1,0.32,1); min-width: 86px; justify-content: space-between; }
.tplay:hover { box-shadow: inset 0 0 0 1px var(--sap-ink); }
.tplay:active { transform: scale(.96); }
.tplay .tt-time { font-variant-numeric: tabular-nums; }
.tplay .pp { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--st-activo); color: #fff; flex-shrink: 0; }
.tplay .pp .ic { width: 12px; height: 12px; stroke-width: 0; fill: currentColor; }
.tplay.running { background: color-mix(in oklab, var(--st-activo) 14%, var(--sap-cream)); box-shadow: inset 0 0 0 1px var(--st-activo); color: var(--st-activo); }
.tplay.running .pp { background: var(--st-activo); animation: tpulse 1.6s ease-in-out infinite; }
.tplay.logged:not(.running) .pp { background: var(--sap-stone); color: var(--sap-ink); }
@keyframes tpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(46,125,91,.4); } 50% { box-shadow: 0 0 0 5px rgba(46,125,91,0); } }

/* ============================================================
   PIXEL FRAME helper (marco doble, estilo Stardew)
   ============================================================ */
.pixbox { background: var(--pix-paper); border: 3px solid var(--pix-line);
  box-shadow: inset 0 0 0 2px var(--pix-cream), 0 6px 0 0 rgba(58,38,24,.18), var(--shadow-float);
  border-radius: 6px; }

/* ============================================================
   DOCK — avatar del usuario actual
   ============================================================ */
.dock { position: fixed; z-index: 80; display: flex; align-items: center; gap: 8px;
  font-family: var(--pix-font); user-select: none; }
.dock.pos-br { bottom: 22px; right: 24px; }
.dock.pos-bl { bottom: 16px; left: 74px; }
.dock.pos-top { top: calc(14px + env(safe-area-inset-top)); right: 26px; }   /* cápsula iOS: no bajo el notch */
.dock.pos-free { right: auto; bottom: auto; }
/* en anclajes a la derecha, el avatar queda fijo y la pastilla crece hacia adentro */
.dock.pos-br, .dock.pos-top, .dock.pos-free { flex-direction: row-reverse; }
.dock.hide { display: none; }

.dock-bubble { position: relative; cursor: grab; display: block; line-height: 0; touch-action: none; }
.dock.dragging .dock-bubble { cursor: grabbing; }
/* sprites basados en imagen (PNG): se achican con suavizado, no pixelado */
.dock-bubble img.csprite-img { position: relative; z-index: 1; height: auto; display: block;
  image-rendering: auto; filter: drop-shadow(0 3px 2px rgba(58,38,24,.3)); transition: transform .15s ease; }
.dock-bubble:hover img.csprite-img { transform: translateY(-2px); }
.dock.img-avatar .dock-shadow { display: none; }
.dock.dragging .dock-bubble img.csprite-img { transform: scale(1.06); }

/* sombra elíptica bajo la criatura */
.dock-shadow { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); z-index: 0;
  width: 44px; height: 9px; background: rgba(20,17,15,.22); border-radius: 50%; filter: blur(.5px); }

/* mini-pill de estado: puntito + texto, siempre visible bajo el avatar */
.dock-status { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; pointer-events: none;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; line-height: 1; color: var(--sap-ink);
  background: var(--sap-cream); border-radius: var(--radius-pill); padding: 4px 11px 4px 9px;
  box-shadow: var(--shadow-inset-line), var(--shadow-soft); }
.dock-status .d { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dock.running .dock-status { display: none; }

.dock-name { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(2px); margin-bottom: 8px; z-index: 5;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 500; background: var(--sap-ink); color: var(--sap-cream);
  padding: 5px 13px; border-radius: var(--radius-pill); white-space: nowrap; letter-spacing: .01em;
  box-shadow: var(--shadow-soft); opacity: 0; transition: opacity .16s ease, transform .16s ease; pointer-events: none; }
.dock-bubble:hover .dock-name { opacity: 1; transform: translateX(-50%) translateY(0); }

/* píldora de timer activo, sale del bubble */
.dock-timer { display: flex; align-items: center; gap: 10px; padding: 8px 18px;
  max-width: 0; overflow: hidden; opacity: 0; pointer-events: none;
  transition: max-width .26s ease, opacity .18s ease, padding .26s ease;
  background: var(--sap-cream); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-inset-line), var(--shadow-soft); }
/* la pastilla se mantiene visible siempre que haya un timer activo (como antes) */
.dock.has-timer .dock-timer {
  padding: 8px 12px 8px 18px; max-width: 380px; opacity: 1; pointer-events: auto; }
.dock-timer .dt-info { cursor: pointer; }
.dock-timer .dt-k { font-family: var(--font-ui); font-size: 9.5px; font-weight: 700; color: var(--text-muted-on-light); text-transform: uppercase; letter-spacing: .12em; }
.dock-timer .dt-task { font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; color: var(--sap-ink);
  max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dock-timer .dt-time { font-family: var(--font-ui); font-size: 20px; font-weight: 700; line-height: 1; color: var(--st-activo); font-variant-numeric: tabular-nums; transition: color .14s ease; }
.dock-timer .dt-info { min-width: 0; }
.dock-timer .dt-toggle { width: 34px; height: 34px; flex-shrink: 0; padding: 0; margin-left: 2px; cursor: pointer;
  border: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--st-activo); color: #fff; transition: background .14s ease, transform .12s ease, box-shadow .14s ease; }
.dock-timer .dt-toggle .ic { width: 16px; height: 16px; fill: currentColor; stroke-width: 0; }
.dock-timer .dt-toggle:hover { transform: scale(1.07); }
.dock-timer .dt-toggle:active { transform: scale(.93); }
/* corriendo: la pausa es discreta; pausado: el play verde invita a reanudar */
.dock-timer:not(.paused) .dt-toggle { background: color-mix(in oklab, var(--st-activo) 15%, var(--sap-cream)); color: var(--st-activo); box-shadow: inset 0 0 0 1px var(--st-activo); }
.dock-timer.paused .dt-time { color: var(--text-muted-on-light); }
/* en reunión el avatar está "trabajando": la pastilla se ve igual que la de tarea (verde activo) */

/* —— menú del cronómetro (clic en la pastilla): últimas tareas + tareas de hoy —— */
.timer-menu { position: fixed; z-index: 96; width: 290px; max-height: 60vh; overflow-y: auto;
  padding: 8px; font-family: var(--font-ui); background: var(--sap-cream); border-radius: var(--radius-md);
  box-shadow: var(--shadow-inset-line), 0 12px 30px rgba(0,0,0,.18); opacity: 0; transform: translateY(6px);
  pointer-events: none; transition: opacity .14s ease, transform .14s ease; }
.timer-menu.show { opacity: 1; transform: none; pointer-events: auto; }
.tm-head { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted-on-light); padding: 6px 8px 4px; }
.tm-task { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none;
  background: transparent; border-radius: var(--radius-sm); cursor: pointer; text-align: left; transition: background .12s ease; }
.tm-task:hover { background: var(--sap-paper); }
.tm-task.running { background: color-mix(in oklab, var(--st-activo) 12%, var(--sap-cream)); }
.tm-play { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--st-activo) 14%, var(--sap-cream)); color: var(--st-activo); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--st-activo) 50%, transparent); }
.tm-play .ic { width: 14px; height: 14px; fill: currentColor; stroke-width: 0; }
.tm-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tm-name { font-size: 13px; font-weight: 600; color: var(--sap-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-proj { font-size: 11px; color: var(--text-muted-on-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-expand { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 6px;
  padding: 9px 10px; border: 1px solid var(--border-on-light); border-radius: var(--radius-sm); background: var(--sap-cream);
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; color: var(--sap-ink); cursor: pointer; }
.tm-expand:hover { background: var(--sap-paper); }
.tm-chev { display: inline-flex; transition: transform .15s ease; color: var(--text-muted-on-light); }
.tm-chev .ic { width: 16px; height: 16px; }
.tm-expand.open .tm-chev { transform: rotate(180deg); }
.tm-today { margin-top: 4px; display: flex; flex-direction: column; }
.tm-empty { padding: 10px; font-size: 12.5px; font-style: italic; color: var(--text-muted-on-light); text-align: center; }

/* ============================================================
   POPOVER de estados (1 clic)
   ============================================================ */
.statepop { position: fixed; z-index: 95; width: 244px; padding: 16px 16px 14px; font-family: var(--font-ui);
  background: var(--sap-cream); border-radius: var(--radius-md);
  box-shadow: var(--shadow-inset-line), var(--shadow-soft);
  max-height: calc(100vh - 24px); overflow-y: auto;
  opacity: 0; transform: translateY(6px) scale(.99); transform-origin: bottom right; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease; }
.statepop.show { opacity: 1; transform: none; pointer-events: auto; }
.statepop .sp-head { margin: 0 2px 12px; }
.statepop .sp-eyebrow { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted-on-light); }
.statepop .sp-animal { display: block; font-family: var(--font-serif); font-style: italic; font-size: 15px;
  color: var(--sap-ink); margin-top: 3px; }

/* estado actual (solo lectura) */
.statepop .sp-now { display: flex; align-items: center; gap: 9px; padding: 10px 12px;
  background: var(--sap-paper); border-radius: var(--radius-sm); margin-bottom: 10px; }
.statepop .sp-now .sdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.statepop .sp-now-label { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--sap-ink); }
.statepop .sp-now-tag { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted-on-light); }

/* única acción manual: almuerzo (toggle) */
.statepop .sp-lunch { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-on-light);
  background: var(--sap-cream); font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--sap-ink);
  cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.statepop .sp-lunch .sdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.statepop .sp-lunch:hover { background: var(--sap-paper); }
.statepop .sp-lunch.on { background: color-mix(in oklab, var(--st-almuerzo) 16%, var(--sap-cream));
  border-color: var(--st-almuerzo); color: #845408; }
.statepop .sp-lunch + .sp-lunch { margin-top: 7px; }
.statepop .sp-meet.on { background: color-mix(in oklab, #7A4FB5 15%, var(--sap-cream));
  border-color: #7A4FB5; color: #5B3690; }
.statepop .sp-lunch[disabled] { opacity: .45; cursor: not-allowed; }
/* —— hábitos (cabecera desplegable + lista) —— */
.statepop .sp-habits-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%;
  margin-top: 7px; padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-on-light);
  background: var(--sap-cream); font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--sap-ink);
  cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.statepop .sp-habits-head:hover { background: var(--sap-paper); }
.statepop .sp-habits-head.has-on { border-color: #8A5BC7; background: color-mix(in oklab, #8A5BC7 13%, var(--sap-cream)); color: #5B3690; }
.statepop .sp-hh-l { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.statepop .sp-hh-l .sdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.statepop .sp-hh-l > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statepop .sp-hh-chev { display: inline-flex; flex-shrink: 0; color: var(--text-muted-on-light); transition: transform .15s ease; }
.statepop .sp-hh-chev .ic { width: 16px; height: 16px; }
.statepop .sp-habits-head.open .sp-hh-chev { transform: rotate(180deg); }
.statepop .sp-habits-list { display: flex; flex-direction: column; gap: 6px; margin-top: 7px; }
.statepop .sp-habit { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-on-light); background: var(--sap-cream);
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--sap-ink); cursor: pointer;
  text-align: left; transition: background .12s ease, border-color .12s ease; }
.statepop .sp-habit:hover { background: var(--sap-paper); border-color: var(--hc, var(--border-on-light)); }
.statepop .sp-habit.on { border-color: var(--hc); background: color-mix(in oklab, var(--hc) 15%, var(--sap-cream)); }
.statepop .sp-habit-emoji { font-size: 16px; line-height: 1; flex-shrink: 0; }
.statepop .sp-habit-name { flex: 1; min-width: 0; }
.statepop .sp-habit-secs { font-size: 11px; font-weight: 600; color: var(--text-muted-on-light); font-variant-numeric: tabular-nums; }
.statepop .sp-habit:active { transform: scale(0.98); }
/* owner: crear hábito nuevo */
.statepop .sp-habit-add { border-style: dashed; color: var(--text-muted-on-light); background: transparent; }
.statepop .sp-habit-add:hover { color: var(--sap-ink); background: var(--sap-paper); }
.statepop .sp-habit-add .sp-habit-emoji { font-size: 15px; font-weight: 700; }
.statepop .sp-habit-new { display: flex; align-items: center; gap: 8px; }
.statepop .sp-habit-inp { flex: 1; min-width: 0; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--hc, var(--sap-plum)); background: var(--sap-cream); font-family: var(--font-ui);
  font-size: 13.5px; font-weight: 600; color: var(--sap-ink); outline: none; }
.statepop .sp-habit-inp::placeholder { color: var(--text-muted-on-light); font-weight: 500; }
.statepop .sp-habit-ok { flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--radius-sm); border: none;
  background: var(--sap-plum, #8A5BC7); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform .12s ease, filter .12s ease; }
.statepop .sp-habit-ok:hover { filter: brightness(1.08); }
.statepop .sp-habit-ok:active { transform: scale(0.94); }
.statepop .sp-note { margin: 12px 2px 0; padding-top: 11px; border-top: 1px solid var(--border-on-light);
  font-size: 11.5px; line-height: 1.45; color: var(--text-muted-on-light); }
.statepop .sp-note b { font-weight: 600; color: var(--sap-ink); }

/* ============================================================
   DIORAMA — Hábitat del equipo (doble clic)
   ============================================================ */
.habitat { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(20,17,15,.42); backdrop-filter: blur(2px); opacity: 0; pointer-events: none;
  transition: opacity .26s ease; }
.habitat.show { opacity: 1; pointer-events: auto; }
.scene { position: relative; width: min(92vw, 1180px); height: min(78vh, 660px);
  border: 4px solid var(--pix-line); border-radius: 10px; overflow: hidden;
  box-shadow: inset 0 0 0 3px var(--pix-cream), 0 24px 60px rgba(0,0,0,.5);
  transform: scale(.96); transition: transform .26s ease; }
.habitat.show .scene { transform: none; }
.scene img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }

.scene-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: flex-start;
  gap: 14px; padding: 14px 16px; background: linear-gradient(180deg, rgba(46,29,20,.62), transparent); }
.scene-title { font-family: var(--pix-font); font-size: 23px; line-height: 1.05; color: #fff; letter-spacing: .03em;
  text-shadow: 2px 2px 0 var(--pix-line); white-space: nowrap; }
.scene-title span { display: block; font-family: var(--font-serif); font-style: italic; font-size: 13px;
  color: rgba(255,255,255,.82); text-shadow: none; letter-spacing: 0; margin-top: 2px; }
.scene-legend { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; max-width: 320px; padding-top: 4px; }
.scene-legend span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-ui);
  font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.scene-legend .d { width: 9px; height: 9px; border-radius: 50%; }
.scene-close { width: 36px; height: 36px; border: 3px solid var(--pix-line); background: var(--pix-paper);
  border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--pix-line); flex-shrink: 0; }
.scene-close .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.scene-close:hover { background: #fff; }

/* criatura colocada en el diorama */
.crit { position: absolute; z-index: 5; transform: translate(-50%, -100%); cursor: pointer; }
.crit .csprite-img { image-rendering: auto; display: block; }
.crit .cbob { animation: bob var(--bobdur, 2.4s) ease-in-out infinite; }
.crit .cname { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-family: var(--pix-font);
  font-size: 13px; color: #fff; text-shadow: 1px 1px 0 var(--pix-line); white-space: nowrap; pointer-events: none; }
.crit.is-fuera { opacity: 1; }
/* mi avatar: arrastrable y se queda donde lo suelte */
.crit.is-me { cursor: grab; touch-action: none; }
.crit.is-me .cname::after { content: " · tú"; opacity: .7; }
.crit.is-me:hover .csprite-img { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 7px rgba(255,255,255,.75)); }
.crit.is-me.dragging { cursor: grabbing; z-index: 40; }
.crit.is-me.dragging .csprite-img { filter: drop-shadow(0 4px 6px rgba(20,17,15,.45)); }
.crit:hover { z-index: 30; }
.crit:hover .csprite-img { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 6px rgba(255,255,255,.6)); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* tarjeta hover de criatura */
.ccard { position: fixed; z-index: 96; width: 232px; padding: 0; overflow: hidden; font-family: var(--font-ui);
  opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .14s ease, transform .14s ease; }
.ccard.show { opacity: 1; transform: none; }
.ccard .cc-top { display: flex; align-items: center; gap: 11px; padding: 12px 13px 11px;
  background: var(--pix-paper2); border-bottom: 2px solid var(--pix-line); }
.ccard .cc-av { width: 44px; height: 44px; border-radius: 8px; background: var(--pix-cream);
  box-shadow: inset 0 0 0 2px var(--pix-line); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.ccard .cc-av img { image-rendering: auto; width: 38px; }
.ccard .cc-id b { font-family: var(--font-serif); font-weight: 600; font-size: 15px; display: block; line-height: 1.15; }
.ccard .cc-id i { font-style: normal; font-size: 11.5px; color: var(--text-muted-on-light); }
.ccard .cc-id .cc-animal { font-family: var(--pix-font); font-size: 13px; color: var(--pix-line); }
.ccard .cc-body { padding: 12px 13px; }
.ccard .cc-state { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
  border-radius: 999px; padding: 4px 11px 4px 9px; color: var(--ccs); background: color-mix(in oklab, var(--ccs) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ccs) 40%, transparent); }
.ccard .cc-state .d { width: 8px; height: 8px; border-radius: 50%; background: var(--ccs); }
.ccard .cc-task { margin-top: 11px; font-size: 13px; color: var(--sap-ink); line-height: 1.4; }
.ccard .cc-task .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  color: var(--text-muted-on-light); display: block; margin-bottom: 3px; }
.ccard .cc-time { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-family: var(--pix-font);
  font-size: 18px; color: var(--st-activo); }
.ccard .cc-time.idle { color: var(--text-muted-on-light); }

/* ============================================================
   TOAST de la capa avatar
   ============================================================ */
.av-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--pix-line); color: var(--pix-cream); font-family: var(--pix-font); font-size: 15px;
  padding: 10px 18px; border-radius: 8px; z-index: 120; opacity: 0; transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow-float); pointer-events: none; }
.av-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* —— modo enfoque: toggle en el popover —— */
.statepop .sp-focus { display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%;
  padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-on-light);
  background: var(--sap-cream); font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--sap-ink);
  cursor: pointer; margin-top: 7px; transition: border-color .12s ease, background .12s ease; }
.statepop .sp-focus.on { border-color: var(--st-activo); background: color-mix(in oklab, var(--st-activo) 9%, var(--sap-cream)); }
.statepop .sp-focus:hover { background: var(--sap-paper); }
.sp-focus-l { display: inline-flex; align-items: center; gap: 8px; }
.sp-focus-l .ic { width: 16px; height: 16px; }
.sp-switch { width: 38px; height: 22px; border-radius: 999px; background: #cdc5b6; position: relative; flex-shrink: 0; transition: background .14s ease; }
.sp-switch.on { background: var(--st-activo); }
.sp-switch-k { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .14s ease; }
.sp-switch.on .sp-switch-k { transform: translateX(16px); }
.sp-focus-today { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted-on-light); margin: 8px 2px 0; }
.sp-focus-today .sdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* —— modo enfoque: chip de nivel de atención al pausar —— */
.focus-prompt { position: fixed; left: 0; top: 0; z-index: 122;
  background: var(--sap-cream); border-radius: 14px; padding: 11px 14px;
  box-shadow: var(--shadow-inset-line), var(--shadow-float); display: flex; flex-direction: column; gap: 9px;
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; font-family: var(--font-ui); }
.focus-prompt.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.fp-q { font-size: 12.5px; font-weight: 700; color: var(--sap-ink); text-align: center; }
.fp-btns { display: flex; gap: 6px; }
.fp-b { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-on-light);
  background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 600; color: var(--sap-ink);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.fp-b:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.fp-bajo:hover { border-color: #B5564A; }
.fp-medio:hover { border-color: #E0991B; }
.fp-alto:hover { border-color: #2E7D5B; }
.fp-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ============================================================
   REPORTES DE TIEMPO
   ============================================================ */
.tr-toolbar { display: flex; align-items: center; gap: 14px; margin: 18px 0 20px; flex-wrap: wrap; }
.tr-range { font-family: var(--font-serif); font-style: italic; font-size: 15px; color: var(--text-muted-on-light); }
.tr-total { margin-left: auto; font-family: var(--pix-font); font-size: 22px; color: var(--st-activo); }
.tr-table { width: 100%; border-collapse: collapse; background: var(--sap-cream); border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--border-on-light); overflow: hidden; }
.tr-table th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: var(--text-muted-on-light); padding: 12px 14px; border-bottom: 1px solid var(--border-on-light); }
.tr-table td { padding: 11px 14px; font-size: 13.5px; border-bottom: 1px solid var(--border-on-light); vertical-align: middle; }
.tr-table tr:last-child td { border-bottom: none; }
.tr-table .tr-dur { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.tr-user { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.tr-empty { padding: 40px 20px; text-align: center; color: var(--text-muted-on-light); font-family: var(--font-serif); font-style: italic; }
.tr-table .tr-day td { background: rgba(46, 29, 20, .04); font-family: var(--font-serif); font-style: italic;
  font-size: 12.5px; color: var(--text-muted-on-light); padding: 7px 14px; }
.tr-table .tr-day .tr-dur { font-style: normal; font-size: 12px; }
.tr-table .tr-lunch td { color: #A66E07; }
.tr-table .tr-lunch .tr-dur { color: #A66E07; }
.tr-lunch-tag { color: #A66E07; font-size: 13px; margin-right: 10px; }
.tr-sub { color: var(--text-muted-on-light); font-size: 12px; }
/* agrupado por proyecto en Tiempos */
.tr-table .tr-proj td { background: var(--sap-cream); font-weight: 700; color: var(--sap-ink); padding: 9px 14px; }
.tr-table .tr-proj td .ic { width: 13px; height: 13px; margin-right: 6px; vertical-align: -2px; opacity: .7; }
.tr-table td.tr-indent { padding-left: 30px; }
