/* Mi tablero personal (tarea 5b). Mismos tokens de estilos.css; el bloque del día lleva su propio verde petróleo fijo
   (en oscuro, --petroleo se vuelve claro y el bloque quedaría blanco). */
:root { --mt-heroe: #2b4546; --mt-heroe-tinta: #ffffff; --mt-heroe-pista: rgba(255, 255, 255, .24); --mt-heroe-anillo: #e7d9b8; --mt-acento: #2b4546; --mt-acento-tinta: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --mt-heroe: #253839; --mt-heroe-tinta: #eeeae2; --mt-heroe-pista: rgba(238, 234, 226, .18); --mt-heroe-anillo: #d7b97a; --mt-acento: #9fbf9f; --mt-acento-tinta: #172425; }
}
:root[data-theme="dark"] { --mt-heroe: #253839; --mt-heroe-tinta: #eeeae2; --mt-heroe-pista: rgba(238, 234, 226, .18); --mt-heroe-anillo: #d7b97a; --mt-acento: #9fbf9f; --mt-acento-tinta: #172425; }

/* la vista usa más ancho y el fondo arena del mockup, con tarjetas blancas encima */
main:has(> .mt) { max-width: 1440px; }
body:has(.mt) { background: var(--tinte); }
body:has(.mt) #cabecera { background: var(--fondo); }

.mt { position: relative; }
.mt-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt .solo-movil { display: none; }
.mt-cab-movil { display: none; }

/* captura rápida */
.mt-captura { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; margin: 0 0 18px; }
.mt-captura input { width: 100%; padding: 11px 14px; border-radius: var(--r-m); background: var(--fondo); font-size: 15px; }
.mt-captura .btn { padding: 10px 18px; }
.mt-entendi { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--gris); min-height: 0; }
.mt-entendi:empty { display: none; }
.mt-entendi-t { margin-right: 2px; }
.mt-pieza { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: var(--r-pill); background: var(--fondo); border: 1px solid var(--linea-fuerte); color: var(--tinta); }
.mt-pieza.es-titulo { padding-right: 10px; color: var(--petroleo); }
.mt-pieza button[data-accion] { width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--gris); cursor: pointer; font-size: 15px; line-height: 1; }
.mt-pieza button[data-accion]:hover { background: var(--tinte-2); color: var(--tinta); }
.mt-pieza .enlace { margin: 0 4px; }
.mt-otro-dia { margin: -6px 0 16px; font-size: 14px; color: var(--gris); }

/* tres columnas: el día, las columnas y los proyectos */
.mt-rejilla { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.mt-dia { flex: 0 1 262px; max-width: 270px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.mt-columnas { flex: 999 1 560px; min-width: 0; }
.mt-lado { flex: 0 1 222px; max-width: 230px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.mt h2 { font: 500 15px/1.3 var(--sans); color: var(--petroleo); margin: 0; letter-spacing: 0; }

.mt-heroe { background: var(--mt-heroe); color: var(--mt-heroe-tinta); border-radius: var(--r-l); padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--sombra-1); }
.mt-heroe .mt-fecha { font-size: 13px; opacity: .85; }
.mt-heroe h1 { font: 400 26px/1.1 var(--sans); color: inherit; margin: 0; }
.mt-heroe-fila { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.mt-heroe-1 { font-size: 15px; font-weight: 500; }
.mt-heroe-2 { font-size: 13px; opacity: .85; margin-top: 2px; }
.mt-anillo { flex: none; }
.mt-anillo circle { fill: none; stroke-width: 8; }
.mt-anillo .pista { stroke: var(--mt-heroe-pista); }
.mt-anillo .avance { stroke: var(--mt-heroe-anillo); stroke-linecap: round; transition: stroke-dasharray 600ms var(--curva); }
.mt-anillo text { fill: currentColor; font: 500 16px var(--sans); }

.mt-caja { background: var(--fondo); border: 1px solid var(--linea-fuerte); border-radius: var(--r-l); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mt-caja-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mt-caja-cab > span { font-size: 12px; color: var(--gris); }
.mt-nota { font-size: 12px; color: var(--gris); margin: 0; }
.mt-vacio { color: var(--gris); font-size: 13.5px; font-style: italic; margin: 4px 2px; list-style: none; }

/* Enfoque de hoy */
.mt-filas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mt-fila { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--tinte); border: 1px solid transparent;
  transition: transform var(--dur-l) var(--curva), background var(--dur) var(--curva), border-color var(--dur) var(--curva), opacity var(--dur-l) var(--curva); }
.mt-fila input[type=checkbox] { width: 20px; height: 20px; margin: 1px 0 0; flex: none; cursor: pointer; }
.mt-fila-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.mt-titulo { color: var(--tinta); text-decoration: none; font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.mt-titulo:hover { color: var(--petroleo); text-decoration: underline; }
.mt-fila.hecha .mt-titulo { color: var(--gris); text-decoration: line-through; text-decoration-color: var(--linea-fuerte); }
.mt-prio { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex: none; background: var(--linea-fuerte); }
.mt-prio.pr-alta { background: var(--negroni); } .mt-prio.pr-media { background: var(--ocre); }
.mt-mas { flex: none; width: 28px; height: 28px; margin: -3px -4px 0 0; border: 0; border-radius: var(--r-pill); background: none; color: var(--gris); cursor: pointer; font-size: 17px; line-height: 1; }
.mt-mas:hover, .mt-mas:focus-visible { background: var(--tinte-2); color: var(--tinta); }

/* piezas de cada tarjeta: en escritorio, texto con puntos; en el teléfono, pastillas */
.mt-chips { display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 12px; color: var(--gris); }
.mt-chips .mt-c + .mt-c::before { content: '·'; margin-right: 6px; color: var(--linea-fuerte); }
.mt-c.urge { color: var(--negroni); }
.mt-items { display: inline-flex; gap: 3px; align-items: center; flex: none; }
/* en Enfoque de hoy las piezas pasan a una segunda línea si no caben (nada se corta a unas letras). El punto que las separa
   va en el margen de cada pieza; la lista se corre a la izquierda dentro de un marco que recorta, así el punto de la
   primera pieza de cada línea queda fuera y no se ve. */
.mt-fila .mt-fila-txt { overflow: hidden; }
.mt-fila .mt-chips { flex-wrap: wrap; gap: 0; margin-left: -12px; }
.mt-fila .mt-chips .mt-c { position: relative; margin-left: 12px; white-space: nowrap; }
.mt-fila .mt-chips .mt-c.proy, .mt-fila .mt-chips .mt-c.cat, .mt-fila .mt-chips .mt-c.corta { white-space: normal; }
.mt-fila .mt-chips .mt-c::before, .mt-fila .mt-chips .mt-c + .mt-c::before { content: '·'; position: absolute; left: -9px; margin: 0; color: var(--linea-fuerte); }
.mt-fila .mt-chips .mt-c:first-child::before { content: '·'; }
.mt-items i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--salvia); }
.mt-items i.si { background: var(--salvia); }

/* Hoy en el restaurante */
.mt-evento { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--tinte); color: var(--tinta); text-decoration: none; font-size: 13px; }
.mt-evento b { font-weight: 500; color: var(--petroleo); }
.mt-evento:hover { background: var(--tinte-2); color: var(--tinta); }
.mt-acuses { display: inline-flex; gap: 4px; }
.mt-acuses i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--salvia); }
.mt-acuses i.si { background: var(--salvia); }

/* en las tarjetas de las columnas (y en el teléfono, en todas), las piezas van como pastillas */
.mt-tarjeta .mt-chips { gap: 6px; }
.mt-tarjeta .mt-chips .mt-c + .mt-c::before { content: none; }
.mt-tarjeta .mt-chips .mt-c { font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--tinte); color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; min-width: 0; }
.mt-tarjeta .mt-chips .mt-c.urge { background: var(--i-fondo); color: var(--i-tinta); }
.mt-tarjeta .mt-chips .mt-c.proy { background: var(--tinte-2); color: var(--ocre); }
.mt-tarjeta .mt-chips .mt-c.cat { background: var(--tinte); color: var(--petroleo); }
.mt-tarjeta .mt-chips .mt-items { background: none; padding: 2px 0; }

/* columnas */
.mt-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: start; }
.mt-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; border-radius: var(--r-l); padding: 2px; transition: background var(--dur) var(--curva); }
.mt-col-cab { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; gap: 6px; }
.mt-col-cab > span { font-size: 12px; color: var(--gris); }
.mt-lista { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.mt-tarjeta { position: relative; background: var(--fondo); border: 1px solid var(--linea-fuerte); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--sombra-1);
  transition: transform var(--dur-l) var(--curva), box-shadow var(--dur) var(--curva), opacity var(--dur-l) var(--curva); }
.mt-tarjeta .mt-titulo { font-size: 13.5px; font-weight: 400; line-height: 1.3; }
.mt-tarjeta .mt-mas { position: absolute; bottom: 4px; right: 2px; margin: 0; }
.mt-tarjeta .mt-chips { padding-right: 24px; min-height: 18px; }
.mt-tarjeta.hecha { box-shadow: none; border-color: var(--linea); opacity: .72; }
.mt-grupo { display: none; font: 500 12px/1.3 var(--sans); color: var(--gris); margin: 6px 4px 0; text-transform: none; }
.mt-mas-de, .mt-agregar { border: 1px dashed var(--linea-fuerte); background: transparent; color: var(--gris); border-radius: 12px; padding: 9px; font: inherit; font-size: 13px; cursor: pointer; text-align: center; }
.mt-mas-de { border-style: solid; border-color: transparent; }
.mt-mas-de:hover, .mt-agregar:hover { background: var(--fondo); color: var(--petroleo); border-color: var(--linea-fuerte); }

/* arrastrar */
@media (pointer: fine) and (min-width: 821px) { .mt [data-arrastre] { cursor: grab; } }
/* tablet en horizontal: mantener presionado arrastra, sin menú del sistema ni selección de texto */
@media (pointer: coarse) and (min-width: 821px) { .mt [data-arrastre] { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; } }
body.mt-arrastrando, body.mt-arrastrando * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.mt-fantasma { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; margin: 0; box-shadow: var(--sombra-2); opacity: .96; rotate: 1.5deg; }
.mt-origen { opacity: .35; }
.mt-hueco { height: 4px; border-radius: 2px; background: var(--salvia); margin: -2px 2px; }
.mt-moviendo { outline: 2px dashed var(--salvia); outline-offset: 2px; }

/* proyectos, esperando y semana */
.mt-caja-cab .enlace { font-size: 13px; text-decoration: none; }
.mt-proy { display: flex; flex-direction: column; gap: 6px; }
.mt-proy > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.mt-proy > div:first-child span:last-child { color: var(--gris); font-size: 12px; white-space: nowrap; }
.mt-barra { height: 6px; border-radius: 3px; background: var(--tinte-2); overflow: hidden; }
.mt-barra i { display: block; height: 100%; background: var(--salvia); border-radius: 3px; transition: width 600ms var(--curva); }
.mt-espera { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--tinta); text-decoration: none; padding: 2px 0; }
.mt-espera span:first-child { min-width: 0; overflow-wrap: anywhere; }
.mt-espera span:last-child { color: var(--gris); font-size: 12px; white-space: nowrap; }
.mt-espera:hover span:first-child { color: var(--petroleo); text-decoration: underline; }
.mt-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mt-sem { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: var(--r-s); text-decoration: none; color: var(--gris); font-size: 12px; }
.mt-sem b { font-weight: 500; font-size: 15px; color: var(--tinta); }
.mt-sem:hover { background: var(--tinte); color: var(--tinta); }
.mt-sem.hoy b { color: var(--petroleo); }
.mt-sem.sel { background: var(--mt-acento); color: var(--mt-acento-tinta); }
.mt-sem.sel b { color: var(--mt-acento-tinta); }

/* menú de la tarjeta (en el modal) */
.mt-menu-t { font-size: 24px; margin-bottom: 4px; }
.mt-menu .grupo { margin: 14px 0 6px; }
.mt-menu .fila { margin: 6px 0; }
.mt-menu select { max-width: 100%; min-width: 0; flex: 1 1 200px; }

/* deshacer: 5 s después de terminar o pasar a mañana */
#mt-deshacer { position: fixed; left: 50%; bottom: 24px; z-index: 31; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 10px 10px 10px 18px;
  background: var(--mt-acento); color: var(--mt-acento-tinta); border-radius: var(--r-m); box-shadow: var(--sombra-2); font-size: 14.5px;
  transform: translate(-50%, 10px); opacity: 0; transition: opacity var(--dur) var(--curva), transform var(--dur) var(--curva); }
#mt-deshacer.ver { opacity: 1; transform: translate(-50%, 0); }
#mt-deshacer[hidden] { display: none; }
#mt-deshacer button { border: 1px solid currentColor; background: none; color: inherit; border-radius: var(--r-s); padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }

.mt-fab { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 12; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--mt-acento); color: var(--mt-acento-tinta);
  box-shadow: 0 6px 16px rgba(24, 38, 39, .35); place-items: center; cursor: pointer; transition: transform 120ms var(--curva); }
.mt-fab:active { transform: scale(.94); }

/* escritorio estrecho: el lado de proyectos baja y las cuatro columnas pasan a dos */
@media (max-width: 1180px) and (min-width: 821px) { .mt-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- teléfono: pestañas Hoy y Columnas ---------- */
@media (max-width: 820px) {
  /* la última tarjeta sube por encima del botón flotante (y la barra de deshacer va arriba del botón); los dos, sobre la barra inferior de 64 px */
  body:has(.mt) main { padding-bottom: calc(124px + 64px + env(safe-area-inset-bottom, 0px)); }
  #mt-deshacer { bottom: calc(88px + 64px + env(safe-area-inset-bottom, 0px)); }
  .mt-fab { bottom: calc(16px + 64px + env(safe-area-inset-bottom, 0px)); }
  .mt .solo-movil { display: revert; }
  .mt .mt-filtros.solo-movil, .mt .mt-colnav.solo-movil, .mt .mt-nota-cols.solo-movil { display: flex; }
  .mt .mt-fab.solo-movil { display: grid; }
  .mt .solo-escritorio { display: none; }
  .mt-cab-movil { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
  .mt-cab-movil h1 { font: 400 26px/1.1 var(--sans); color: var(--petroleo); margin: 0; }
  .mt-cab-movil .mt-fecha { font-size: 13px; color: var(--gris); margin: 0 0 2px; }
  .mt-pestanas { display: flex; background: var(--fondo); border: 1px solid var(--linea-fuerte); border-radius: var(--r-pill); padding: 3px; flex: none; }
  .mt-pestanas button { border: 0; background: none; font: inherit; font-size: 13.5px; padding: 6px 14px; border-radius: var(--r-pill); color: var(--petroleo); cursor: pointer; }
  .mt-pestanas button[aria-pressed="true"] { background: var(--mt-acento); color: var(--mt-acento-tinta); }
  .mt-captura:not(.en-modal) { display: none; }
  .mt-rejilla { display: block; }
  .mt-dia, .mt-lado { max-width: none; gap: 14px; }
  .mt[data-pestana="hoy"] .mt-columnas, .mt[data-pestana="columnas"] .mt-dia, .mt[data-pestana="columnas"] .mt-lado { display: none; }
  .mt-lado { margin-top: 14px; }

  .mt-heroe { flex-direction: row; align-items: center; border-radius: 18px; padding: 16px; }
  .mt-heroe-fila { margin: 0; gap: 14px; }
  .mt-heroe-2 { font-size: 12px; }
  .mt-filtros { gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -2px; }
  .mt-filtros button { flex: none; padding: 8px 14px; border: 1px solid var(--linea-fuerte); border-radius: var(--r-pill); background: var(--fondo); color: var(--petroleo); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
  .mt-filtros button[aria-pressed="true"] { background: var(--mt-acento); color: var(--mt-acento-tinta); border-color: var(--mt-acento); }

  /* en Hoy, la lista del día son tarjetas que se deslizan */
  .mt-enfoque { background: none; border: 0; padding: 0; }
  .mt-enfoque .mt-caja-cab { display: none; }
  .mt-enfoque .mt-nota { padding: 0 4px; }
  .mt-fila { background: var(--fondo); border: 1px solid var(--linea-fuerte); border-radius: 16px; padding: 14px; gap: 12px; touch-action: pan-y; }
  .mt-fila input[type=checkbox] { width: 22px; height: 22px; }
  .mt-fila .mt-titulo { font-size: 15px; }
  .mt-fila .mt-prio { display: none; }
  .mt-fila.mt-desliza { transition: none; }
  .mt-fila[data-lado="terminar"] { background: var(--v-fondo); border-color: var(--v-linea); }
  .mt-fila[data-lado="manana"] { background: var(--tinte-2); border-color: var(--ocre); }
  .mt-fila[data-lado]::after { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--gris); }
  .mt-fila[data-lado="terminar"]::after { content: 'Terminar'; right: 44px; color: var(--v-tinta); }
  .mt-fila[data-lado="manana"]::after { content: 'Para mañana'; right: 44px; color: var(--ocre); }
  .mt-fila.listo-soltar::after { font-weight: 500; }
  .mt-chips { gap: 6px; }
  .mt-chips .mt-c + .mt-c::before { content: none; }
  .mt-fila .mt-chips { gap: 6px; margin-left: 0; }
  .mt-fila .mt-chips .mt-c, .mt-fila .mt-chips .mt-c.proy, .mt-fila .mt-chips .mt-c.cat, .mt-fila .mt-chips .mt-c.corta { margin-left: 0; max-width: 100%; white-space: nowrap; }
  .mt-fila .mt-chips .mt-c::before, .mt-fila .mt-chips .mt-c + .mt-c::before { content: none; }
  .mt-chips .mt-c { font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--tinte); color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; min-width: 0; }
  .mt-chips .mt-c.urge { background: var(--i-fondo); color: var(--i-tinta); }
  .mt-chips .mt-c.proy { background: var(--tinte-2); color: var(--ocre); }
  .mt-chips .mt-c.cat { background: var(--tinte); color: var(--petroleo); }
  .mt-chips .mt-items { background: none; padding: 2px 0; }
  .mt-evento { grid-template-columns: 60px minmax(0, 1fr) auto; }

  /* en Columnas, una columna a la vez */
  .mt-colnav { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--linea-fuerte); margin: 0 0 10px; }
  .mt-colnav button { border: 0; background: none; font: inherit; font-size: 13px; color: var(--gris); padding: 10px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
  .mt-colnav button span { font-size: 11px; }
  .mt-colnav button[aria-pressed="true"] { color: var(--petroleo); font-weight: 500; border-bottom-color: var(--petroleo); }
  .mt-nota-cols { justify-content: space-between; gap: 10px; margin: 0 4px 10px; }
  .mt-cols { display: block; touch-action: pan-y; }
  .mt-col.fuera { display: none; }
  .mt-col-cab { display: none; }
  .mt-grupo { display: block; font-size: 14px; color: var(--petroleo); margin: 12px 4px 0; }
  .mt-grupo:first-child { margin-top: 0; }
  .mt-tarjeta { border-radius: 16px; padding: 14px 40px 14px 14px; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
  .mt-tarjeta .mt-mas { top: 8px; bottom: auto; right: 6px; }
  .mt-tarjeta .mt-chips { padding-right: 0; }
  .mt-tarjeta .mt-titulo { font-size: 15px; }
}
@media (max-width: 380px) { .mt-cab-movil h1 { font-size: 23px; } .mt-pestanas button { padding: 6px 11px; } }
