/* Minor — tema claro estilo iOS. Pensado primero para iPhone: nada se sale
   de los lados; la página solo se desplaza hacia arriba y hacia abajo. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --fill: #f2f2f7;          /* fondos secundarios (inputs, segmentado) */
  --fill-2: #e5e5ea;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #86868b;
  --line: #e5e5ea;
  --accent: #13203c;            /* azul marino del logo de Minor Hotels */
  --accent-soft: rgba(19, 32, 60, .1);
  --red: #ff3b30;  --red-soft: rgba(255, 59, 48, .1);
  --orange: #ff9500; --orange-text: #c26a00; --orange-soft: rgba(255, 149, 0, .12);
  --green: #34c759; --green-text: #248a3d; --green-soft: rgba(52, 199, 89, .12);
  --teal: #1ab5c1; --teal-text: #0f8f99;   /* avance 40–70% */
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; width: 100%; max-width: 100%;
  overflow-x: hidden; overscroll-behavior-x: none;
}
html.locked, html.locked body { overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  font-size: 16px; line-height: 1.35; letter-spacing: -.01em;
  background: var(--bg); color: var(--text);
  -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.error { color: var(--red); min-height: 1.2em; margin: 0; font-size: 14px; }
.small { font-size: 13px; margin: 0; }
.spacer { flex: 1; }

/* Controles. 16px evita que Safari haga zoom al enfocar un campo. */
input, select, textarea, button { font: inherit; font-size: 16px; color: inherit; }
input[type=text], input[type=search], input[type=password], input[type=date], select, textarea {
  width: 100%; max-width: 100%; min-width: 0; padding: 11px 14px; min-height: 44px;
  border: 0; border-radius: 12px; background-color: var(--fill);
  outline: none; -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px var(--accent-soft); background-color: #fff; }
select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  text-overflow: ellipsis;
}
input[type=date] { display: block; }
textarea { min-height: 88px; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #aeaeb2; }
label.field { display: block; min-width: 0; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: var(--fill); color: var(--accent); border-radius: 999px;
  padding: 10px 16px; min-height: 40px; cursor: pointer; font-weight: 600; font-size: 15px;
  white-space: nowrap; transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.97); opacity: .8; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; padding: 10px 6px; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn {
  border: 0; background: var(--fill); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; color: var(--muted); cursor: pointer; flex-shrink: 0;
}
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; margin-left: 2px;
}

/* Login */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 320px; display: grid; gap: 14px; text-align: center; }
.login-box h1 { font-size: 40px; font-weight: 700; }
.login-box p { margin: 0; }
.login-box input { text-align: center; font-size: 22px; letter-spacing: 6px; }
.login-box .btn { min-height: 48px; font-size: 17px; }

/* Encabezado tipo "large title" con vidrio esmerilado */
.top {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.brand { display: flex; flex-direction: column; min-width: 0; }
.brand h1 { font-size: 30px; font-weight: 700; }
.brand h1 { line-height: 0; }
.logo { height: 34px; width: auto; display: block; }
.brand .muted { margin-top: 4px; }
.logo-login { width: 220px; max-width: 70%; height: auto; display: block; margin: 0 auto 6px; }
.brand .muted { font-size: 13px; white-space: nowrap; }
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }

.filters { padding: 2px 16px 14px; display: grid; gap: 10px; }
.filter-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.segmented {
  display: flex; min-width: 0; background: var(--fill); border-radius: 10px; padding: 2px;
}
.filter-row #fQ { flex: 1; }
.segmented button {
  flex: 1; min-width: 0; border: 0; background: transparent; border-radius: 8px; padding: 7px 4px;
  font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.segmented button.on { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.filter-panel { display: grid; grid-template-columns: 1fr; gap: 8px; }

/* Tablero: secciones apiladas en celular, columnas en pantallas anchas */
.board { padding: 0 16px calc(40px + env(safe-area-inset-bottom)); display: grid; gap: 22px; }
@media (min-width: 900px) {
  .board { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; align-items: start; }
}
.col { min-width: 0; }
.col-head {
  display: flex; align-items: baseline; gap: 6px; margin: 0 4px 8px;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted);
}
.col-list { display: grid; gap: 14px; }
.empty-col { color: #aeaeb2; font-size: 14px; padding: 4px; }

/* Tarjetas colapsables: solo una abierta a la vez */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; min-width: 0;
}
.card-head {
  width: 100%; border: 0; background: none; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center;
  padding: 13px 14px 12px; color: inherit;
}
.card-top { display: flex; align-items: flex-start; gap: 8px; }
.card-top .card-title { flex: 1; }
.card-title { font-weight: 600; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
.card-side { display: flex; align-items: center; gap: 10px; }
.chev {
  width: 8px; height: 8px; flex-shrink: 0; border-right: 2px solid #c7c7cc; border-bottom: 2px solid #c7c7cc;
  transform: rotate(45deg) translateY(-2px); transition: transform .25s;
}
.card.open > .card-head .chev { transform: rotate(-135deg) translate(-2px, 0); }
.mini-prog { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.mini-prog .pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
.card.open .mini-prog { display: none; }
.mini-bar { flex: 1; height: 4px; background: var(--fill); border-radius: 2px; overflow: hidden; }
.mini-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }

.card-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.card.open .card-body { grid-template-rows: 1fr; }
.card-body > div { overflow: hidden; min-height: 0; }
.card-detail { padding: 0 14px 14px; display: grid; gap: 10px; }
.meta { font-size: 14px; color: var(--muted); display: grid; gap: 6px; }
.meta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
}
.meta-row b { color: var(--text); font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.meta > span { overflow-wrap: anywhere; }
.last { font-size: 14px; background: var(--fill); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.last .when { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.card-actions { display: flex; gap: 8px; }
.card-actions .btn { flex: 1; }

.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.alta { color: var(--red); background: var(--red-soft); }
.pill.media { color: var(--orange-text); background: var(--orange-soft); }
.pill.baja { color: var(--green-text); background: var(--green-soft); }
.due { white-space: nowrap; }
.due.late { color: var(--red); font-weight: 600; }
.due.soon { color: var(--orange-text); font-weight: 600; }

.progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.bar { flex: 1; height: 6px; background: var(--fill); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.lv-red > i { background: var(--red); }
.lv-orange > i { background: var(--orange); }
.lv-blue > i { background: var(--teal); }
.lv-green > i { background: var(--green); }

/* Hojas modales (bottom sheet en celular) */
.overlay {
  position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .3);
  display: flex; align-items: flex-end; justify-content: center; overscroll-behavior: contain;
}
@media (min-width: 700px) { .overlay { align-items: center; padding: 24px; } }
.sheet {
  background: var(--bg); width: 100%; max-width: 640px; max-height: 94vh; max-height: 94dvh;
  border-radius: 14px 14px 0 0; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .12);
}
@media (min-width: 700px) { .sheet { border-radius: 16px; max-height: 90vh; } }
.sheet::before {
  content: ""; display: block; flex-shrink: 0; width: 36px; height: 5px; border-radius: 3px; background: #d1d1d6; margin: 6px auto 0;
}
@media (min-width: 700px) { .sheet::before { display: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 8px; }
.sheet-head h2 { font-size: 20px; font-weight: 700; min-width: 0; }
.sheet-body {
  padding: 6px 6px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: grid; gap: 14px; min-width: 0;
}
.sheet-body > * { min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 > * { min-width: 0; }
@media (max-width: 430px) { .grid2 { grid-template-columns: 1fr; } }
.section { background: var(--fill); border-radius: var(--radius); padding: 12px; display: grid; gap: 12px; min-width: 0; }
.section h3 { font-size: 17px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
.row.end { justify-content: flex-end; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* Slider de avance: grueso, de lado a lado y con el color del rango */
input.slider {
  --c: var(--red);
  -webkit-appearance: none; appearance: none; display: block; height: 28px; background: transparent; margin: 0;
}
input.slider.lv-orange { --c: var(--orange); }
input.slider.lv-blue { --c: var(--teal); }
input.slider.lv-green { --c: var(--green); }
input.slider::-webkit-slider-runnable-track {
  height: 12px; border-radius: 6px;
  background: linear-gradient(to right, var(--c) 0 var(--p), #fff var(--p) 100%);
  box-shadow: inset 0 0 0 1px var(--fill-2);
}
input.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -8px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3), 0 0 0 .5px rgba(0, 0, 0, .06);
}
input.slider::-moz-range-track { height: 12px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px var(--fill-2); }
input.slider::-moz-range-progress { height: 12px; border-radius: 6px; background: var(--c); }
input.slider::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }

/* Guardar revisión: gris a lo ancho; se pinta azul al tocarlo o mientras guarda */

label.field > span.range-label { display: flex; justify-content: space-between; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }

/* Acordeones dentro de las hojas: uno abierto a la vez */
.acc { background: var(--fill); border-radius: var(--radius); min-width: 0; }
.acc-head {
  width: 100%; border: 0; background: none; cursor: pointer; color: inherit; text-align: left;
  display: flex; align-items: center; gap: 10px; padding: 14px 12px; font-size: 17px; font-weight: 600;
}
.acc-head .sub { font-size: 13px; font-weight: 400; color: var(--muted); }
.acc-head .chev { margin-left: auto; }
.acc.open .acc-head .chev { transform: rotate(-135deg) translate(-2px, 0); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.acc.open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; min-height: 0; }
.acc-inner { padding: 0 12px 12px; display: grid; gap: 12px; }

/* Dentro de bloques grises, campos y botones secundarios van en blanco */
.section .btn:not(.primary), .acc .btn:not(.primary) { background: #fff; }
.btn.danger { background: var(--red-soft) !important; }
.cap-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.section input:not([type=range]):not([type=checkbox]), .section select, .section textarea,
.acc input:not([type=range]):not([type=checkbox]), .acc select, .acc textarea { background-color: #fff; }

.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--fill-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; cursor: pointer; line-height: 1;
}
.add-img {
  width: 72px; height: 72px; border: 1.5px dashed #c7c7cc; border-radius: 12px; display: grid;
  place-items: center; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 600; background: #fff;
}

.history { display: grid; gap: 12px; }
.hist { border-right: 2px solid var(--fill-2); padding-right: 10px; min-width: 0; text-align: right; }
.hist .when { font-size: 12px; color: var(--muted); }
.hist .what { white-space: pre-wrap; overflow-wrap: anywhere; }
.hist .chg { font-size: 12px; color: var(--muted); }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Captura rápida y revisión por lote */
.capture textarea { min-height: 72px; }
.flag { margin: 0; font-size: 13px; color: var(--orange-text); background: var(--orange-soft); padding: 8px 10px; border-radius: 10px; }
.batch-item.excluded { opacity: .45; }
.batch-item label.row { gap: 10px; cursor: pointer; }
label.btn { cursor: pointer; }

/* Grabación: ondas que siguen la voz en tiempo real */
.btn.recording, .section .btn.recording, .acc .btn.recording { background: var(--red-soft); color: #d70015; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }
.btn.wide { width: 100%; min-height: 46px; }
.recwave {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow);
}
.recwave .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex-shrink: 0; animation: blink 1s infinite; }
.recwave .bars { flex: 1; height: 40px; display: flex; align-items: center; gap: 3px; min-width: 0; }
.recwave .bars i {
  flex: 1; min-width: 2px; height: 100%; border-radius: 2px; background: var(--red);
  transform: scaleY(.08); transition: transform .06s linear;
}
.recwave .time { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); flex-shrink: 0; }
@keyframes blink { 50% { opacity: .25; } }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(29, 29, 31, .92); color: #fff; padding: 11px 18px; border-radius: 14px; z-index: 40;
  width: max-content; max-width: calc(100% - 32px); font-size: 14px; text-align: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.toast.ok { background: rgba(36, 138, 61, .96); }
.notice { background: var(--orange-soft); color: var(--orange-text); border-radius: 12px; padding: 12px; }
.login-box input::placeholder { letter-spacing: 0; font-size: 17px; }

/* Lo que no va en bloque gris (títulos, barra, botones sueltos) conserva aire a los lados */
#sheetBody > form > :not(.acc):not(.section), #meetingBody > :not(.section):not(form) { margin-left: 10px; margin-right: 10px; }

/* Guardar revisión: gris a lo ancho; se pinta azul al tocarlo o mientras guarda */
.acc .btn.save:not(.primary) { width: 100%; min-height: 48px; background: #d1d1d6; color: #3c4043; font-size: 16px; }
.acc .btn.save:not(.primary):active, .acc .btn.save:not(.primary):disabled { background: var(--accent); color: #fff; opacity: 1; }

/* Contador de abiertos a la derecha del encabezado */
.top-actions { align-items: center; }
.top-actions #count { font-size: 14px; white-space: nowrap; }
.filters { padding-top: 8px; }

/* Botón flotante de nuevo pendiente, abajo a la derecha (solo celular) */
.fab {
  position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 10;
  width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(19, 32, 60, .35);
}
.fab svg { width: 36px; height: 36px; }
#btnNew { display: none; }   /* "Nueva tarea" es el botón flotante en todas las pantallas */
@media (min-width: 700px) {
  .fab { right: 32px; bottom: 32px; width: 84px; height: 84px; }
  .fab svg { width: 40px; height: 40px; }
  .fab:hover { transform: scale(1.04); }
  .board, .archive-view, .team-view { padding-bottom: 130px; }
}
.fab:active { transform: scale(.94); }
@media (max-width: 699px) {
  #btnNew { display: none; }
  .fab { display: grid; }
  .board { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
}

/* Botón Dictar a la derecha, un poco más ancho */
.btn.dictate { padding-left: 22px; padding-right: 22px; }

/* Título y barra del pendiente fijos al pie de la hoja */
.sheet-foot {
  flex-shrink: 0; display: grid; gap: 14px;
  background: rgba(255, 224, 102, .3);   /* amarillo de notificación, suave */
  border-top: 1px solid rgba(214, 170, 0, .25);
  padding: 20px 20px calc(22px + env(safe-area-inset-bottom));
}
.sheet-foot .card-title { font-size: 18px; }
.sheet-foot .bar { background: rgba(255, 255, 255, .8); }

/* Subcontenedor abierto: contorno azul marino */
.acc.open { box-shadow: inset 0 0 0 1.5px var(--accent); }
#sheetBody, #meetingBody { flex: 1 1 auto; min-height: 0; }
.sheet:has(#sheetFoot:not([hidden])) #sheetBody { padding-bottom: 24px; gap: 18px; }

/* Datos del pendiente: un campo por renglón */
.stack { display: grid; gap: 12px; min-width: 0; }

/* Cancelar / Crear pendiente mitad y mitad */
.half-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.half-actions .btn { width: 100%; min-height: 46px; }

/* Armar pendiente al 70% de su color; nota centrada */
.btn.primary.soft { background: rgba(19, 32, 60, .7); }
.center { text-align: center; }
.tiny { font-size: 11px; margin: 0; }

/* Ícono vectorial (solo contorno) a la derecha del título de la sección */
.acc-ico { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-left: -2px; }

/* Hitos: checklist de la tarea */
.ms-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.ms {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.ms-check { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.ms-check span, .ms-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ms.done .ms-check span, .ms.done .ms-text { text-decoration: line-through; color: var(--muted); }
.ms-btn {
  border: 0; background: none; color: var(--accent); cursor: pointer; padding: 4px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 15px; line-height: 1;
}
.ms-btn svg { width: 18px; height: 18px; }
.ms-rm { color: var(--muted); font-size: 14px; }
.ms-ok { font-weight: 700; font-size: 18px; }
.acc .ms input.ms-edit[type=text], .ms input.ms-edit[type=text] { flex: 1; min-width: 0; min-height: 36px; padding: 6px 10px; background-color: var(--fill); }
.ms-add { display: flex; gap: 8px; min-width: 0; }
.ms-add input { flex: 1; min-width: 0; }
.ms-add .btn { flex-shrink: 0; }
div.field > span.range-label, div.field > span.ms-label {
  display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 0 0 6px 4px;
}

/* Arrastrar tarjetas entre estados */
.card-head { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.card.dragging { opacity: .35; }
.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; margin: 0;
  box-shadow: 0 16px 40px rgba(19, 32, 60, .28); border-color: var(--accent);
}
.drag-ghost .card-body { display: none; }
.col { border-radius: 16px; transition: background .15s, box-shadow .15s; }
html.is-dragging .col { padding: 6px; margin: -6px; }
.col.drop-target { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
html.is-dragging, html.is-dragging body { cursor: grabbing; }

/* Con un solo estado filtrado, en pantallas anchas las tarjetas van al
   centro al 60% del ancho, en lugar de ir de lado a lado. */
@media (min-width: 900px) {
  .board.single { grid-template-columns: minmax(0, 1fr); width: 60%; margin: 0 auto; }
}

/* Botón de calendario entre la búsqueda y Filtros */
.cal-btn {
  flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--fill); color: var(--accent); display: grid; place-items: center;
}
.cal-btn svg { width: 22px; height: 22px; }
.cal-btn:active { transform: scale(.95); }

/* Calendario tipo Gantt */
.gantt-sheet { max-width: 1200px; height: 94vh; height: 94dvh; }
@media (min-width: 700px) { .gantt-sheet { height: 90vh; } }
.gantt-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0 0 calc(8px + env(safe-area-inset-bottom)); }
.g-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 16px 10px; font-size: 12px; color: var(--muted); }
.g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { width: 18px; height: 8px; border-radius: 4px; display: inline-block; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--accent); display: inline-block; }
.lg-dia { width: 9px; height: 9px; background: #ffb800; transform: rotate(45deg); display: inline-block; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #c98f00; }
.lg-today { width: 2px; height: 14px; background: var(--red); display: inline-block; }

.g-scroll {
  --gl: 150px;
  flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; border-top: 1px solid var(--line);
}
@media (min-width: 700px) { .g-scroll { --gl: 240px; } }
.g-grid { position: relative; }
.g-row { display: flex; border-bottom: 1px solid var(--line); min-height: 52px; }
.g-label {
  position: sticky; left: 0; z-index: 3; width: var(--gl); flex-shrink: 0;
  background: #fff; border: 0; border-right: 1px solid var(--line); text-align: left; cursor: pointer;
  padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; gap: 2px; color: inherit;
}
.g-title { font-size: 13px; font-weight: 600; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.g-sub { font-size: 11px; color: var(--muted); }
.g-track {
  position: relative; flex-shrink: 0;
  /* fines de semana sombreados (sáb y dom) */
  background-image: linear-gradient(to right, transparent 0 calc(100% * 5 / 7), #f6f6f9 calc(100% * 5 / 7) 100%);
  background-repeat: repeat-x;
}
.g-head { position: sticky; top: 0; z-index: 4; background: #fff; min-height: 44px; }
.g-head .g-track { background: #fff; }
.g-corner { font-size: 12px; color: var(--muted); font-weight: 600; cursor: default; z-index: 5; }
.g-months, .g-nums { position: relative; height: 22px; }
.g-month { position: absolute; top: 4px; font-size: 11px; font-weight: 700; color: var(--text); text-transform: capitalize; white-space: nowrap; padding-left: 4px; border-left: 1px solid var(--line); }
.g-num { position: absolute; top: 2px; text-align: center; font-size: 10px; color: var(--muted); }
.g-num.today { color: #fff; background: var(--red); border-radius: 6px; font-weight: 700; }

.g-bar {
  position: absolute; top: 50%; height: 14px; margin-top: -7px; border-radius: 7px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.g-bar.open-end { border-top-right-radius: 0; border-bottom-right-radius: 0; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent); }
.g-over {
  position: absolute; top: 50%; height: 14px; margin-top: -7px; border-radius: 0 7px 7px 0; cursor: pointer;
  background: repeating-linear-gradient(45deg, rgba(255, 59, 48, .85) 0 5px, rgba(255, 59, 48, .45) 5px 10px);
}
.g-due { position: absolute; top: 50%; height: 26px; margin-top: -13px; width: 3px; border-radius: 2px; background: var(--accent); cursor: pointer; }
.g-due.late { background: var(--red); }
.g-dot, .g-dia { position: absolute; top: 50%; z-index: 2; cursor: pointer; }
.g-dot { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--accent); }
.g-dia { width: 11px; height: 11px; margin: -19px 0 0 -5.5px; background: #ffb800; transform: rotate(45deg); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #c98f00; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--red); z-index: 1; pointer-events: none; opacity: .8; }

.merge-tip { background: var(--accent-soft); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; }
.merge-tip .btn { background: #fff; }

/* Menú ⋯ de la hoja de tarea */
.head-actions { position: relative; display: flex; gap: 8px; flex-shrink: 0; }
#sheetMenuBtn { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.menu {
  position: absolute; right: 38px; top: 38px; z-index: 30; min-width: 190px;
  background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18), 0 0 0 1px var(--line);
}
.menu-item {
  width: 100%; border: 0; background: none; text-align: left; padding: 11px 12px; border-radius: 10px;
  font-size: 15px; cursor: pointer; color: var(--text);
}
.menu-item:active, .menu-item:hover { background: var(--fill); }
.menu-item.danger { color: var(--red); font-weight: 600; }

/* En celular los estados se deslizan de lado dentro de su barra (la página
   no se mueve): cada botón con su ancho natural, en una sola fila. */
@media (max-width: 699px) {
  .segmented {
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { flex: 0 0 auto; padding: 7px 14px; overflow: visible; text-overflow: clip; scroll-snap-align: start; }
}

/* Menciones @ en hitos */
.ms-add, .ms-edit-wrap { position: relative; }
.ms-edit-wrap { flex: 1; min-width: 0; display: flex; }
.mention {
  display: inline-block; padding: 0 7px; border-radius: 999px; font-weight: 600; font-size: .92em;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap;
}
.ms.done .mention { background: var(--fill); color: var(--muted); }
.mention-box {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 25; min-width: 220px;
  background: #fff; border-radius: 12px; padding: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18), 0 0 0 1px var(--line);
}
.mention-opt {
  width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer;
  padding: 8px 10px; border-radius: 9px; font-size: 15px; text-align: left; color: var(--text);
}
.mention-opt.on, .mention-opt:hover { background: var(--fill); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}

/* Detalle dentro de la tarjeta (escritorio) */
.card.expanded { border-color: var(--accent); box-shadow: 0 8px 30px rgba(19, 32, 60, .12); }
.card.expanded .card-body { display: none; }
.card.expanded .mini-prog { display: flex; }
.card-full { padding: 0 12px 14px; display: grid; gap: 10px; position: relative; }
.full-bar { display: flex; justify-content: flex-end; gap: 8px; position: relative; }
.full-menu { right: 38px; top: 36px; }
.card-full .acc { background: var(--fill); }

/* Línea donde va a quedar la tarjeta al arrastrar */
.drop-line { height: 4px; border-radius: 2px; background: var(--accent); margin: -5px 4px; box-shadow: 0 0 0 3px var(--accent-soft); }

/* Hitos con fecha propia y mini barra de avance */
.ms { flex-direction: column; align-items: stretch; gap: 6px; }
.ms-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ms-due {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.ms-due.late { color: var(--red); background: rgba(255, 59, 48, .1); }
.ms-due i { font-style: normal; color: var(--orange); }
.ms.done .ms-due { color: var(--muted); background: var(--fill); }
.ms-prog { display: flex; align-items: center; gap: 10px; }
.ms-prog b { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
input.slider.mini { height: 20px; flex: 1; }
input.slider.mini::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; }
input.slider.mini::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -6px; }
input.slider.mini::-moz-range-track, input.slider.mini::-moz-range-progress { height: 6px; border-radius: 3px; }
input.slider.mini::-moz-range-thumb { width: 18px; height: 18px; }
.ms-add { flex-wrap: wrap; }
.ms-new-wrap { position: relative; flex: 1 1 100%; display: flex; min-width: 0; }
.ms-new-wrap input { flex: 1; min-width: 0; }
.ms-add input.ms-date { flex: 1 1 140px; }
.ms input.ms-date { flex: 0 0 auto; width: 150px; min-height: 36px; padding: 6px 8px; background-color: var(--fill); }
@media (max-width: 520px) {
  .ms-row:has(.ms-edit) { flex-wrap: wrap; }
  .ms-row:has(.ms-edit) .ms-edit-wrap { flex-basis: 100%; }
  .ms input.ms-date { flex: 1; width: auto; }
}
.mention-opt.add { color: var(--accent); font-weight: 600; }
.avatar.plus { background: var(--accent-soft); color: var(--accent); font-size: 16px; }

/* Contribuyentes */
.pp { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.pp summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.pp summary::-webkit-details-marker { display: none; }
.pp .avatar { width: 36px; height: 36px; font-size: 13px; }
.pp-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pp-main .mini-bar { flex: none; width: 100%; }
.pp-pct { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.pp-pct.lv-red { color: var(--red); } .pp-pct.lv-orange { color: var(--orange); }
.pp-pct.lv-blue { color: var(--teal-text); } .pp-pct.lv-green { color: var(--green); }
.pp-list { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 6px; }
.pp-item {
  width: 100%; text-align: left; border: 0; background: var(--fill); border-radius: 10px; padding: 9px 12px;
  display: grid; gap: 3px; cursor: pointer; color: var(--text); font: inherit;
}
.pp-ms { font-size: 14px; overflow-wrap: anywhere; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-tag { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; background: #fff; color: var(--muted); }
.pp-tag.ok { color: var(--green); } .pp-tag.bad { color: var(--red); } .pp-tag.warn { color: var(--orange); }

/* Calendario como vista del tablero (no ventana) */
.cal-view { padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.cal-view .gantt-body {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  padding: 10px 0 0; min-height: 320px;
}
.cal-btn.on { background: var(--accent); color: #fff; }
.pp-score { font-size: 13px; font-weight: 600; color: var(--accent); }

/* Título editable en su lugar (detalle abierto) */
.title-edit { display: flex; align-items: flex-start; gap: 4px; min-width: 0; flex: 1; }
.title-edit .card-title {
  flex: 1; min-width: 0; margin: 0; cursor: text; outline: none; border-radius: 8px;
  padding: 2px 6px; margin-left: -6px; transition: background .15s, box-shadow .15s;
}
.title-edit .card-title:hover { background: rgba(19, 32, 60, .05); }
.title-edit .card-title:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.title-edit .ms-btn { margin-top: 1px; opacity: .7; }
.card.expanded > .card-head { cursor: default; }

/* Foco: con una tarea abierta en escritorio, lo de alrededor se desenfoca */
#app .top, #app .filters { transition: filter .4s ease, opacity .4s ease; }
#app.focus .top, #app.focus .filters { filter: blur(4px); opacity: .45; pointer-events: none; }
.board.focus .col-head, .board.focus .empty-col, .board.focus .card:not(.expanded):not(.open) {
  filter: blur(5px); opacity: .4; pointer-events: none; animation: blurIn .4s ease both;
}
.board .defocus { animation: blurOut .45s ease both; }
@keyframes blurIn { from { filter: blur(0); opacity: 1; } to { filter: blur(5px); opacity: .4; } }
@keyframes blurOut { from { filter: blur(5px); opacity: .4; } to { filter: blur(0); opacity: 1; } }

/* Hojas: fondo desenfocado que aparece y se disipa */
.overlay {
  background: rgba(20, 24, 36, .18);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  animation: ovIn .3s ease both;
}
.overlay > .sheet { animation: sheetIn .3s ease both; }
.overlay.closing { animation: ovOut .26s ease both; pointer-events: none; }
.overlay.closing > .sheet { animation: sheetOut .26s ease both; }
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ovOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(24px); } to { transform: none; } }
@keyframes sheetOut { from { transform: none; } to { transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  .overlay, .overlay > .sheet, .overlay.closing, .overlay.closing > .sheet, .board.focus .card, .board .defocus { animation-duration: .01s; }
}

/* Brief de la tarea al final del detalle */
.brief { display: grid; gap: 12px; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); min-width: 0; }
.brief-title { margin: 0 0 0 4px; font-size: 15px; font-weight: 700; color: var(--accent); }

/* Archivo: finalizadas por trimestre */
.archive-view { padding: 0 0 calc(40px + env(safe-area-inset-bottom)); }
.arc-note { padding: 0 20px; margin: 0 0 10px; }
.arc-board { padding-bottom: 0; }
@media (min-width: 700px) { .arc-board { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.arc-year {
  font-size: 20px; font-weight: 800; color: var(--accent); margin: 10px 2px 2px; letter-spacing: -.01em;
}
.arc-col .col-list > .arc-year:first-child { margin-top: 0; }
.arc-month { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: capitalize; margin: 4px 4px 0; }
.arc-card {
  width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  display: grid; gap: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.arc-card:active { transform: scale(.99); }
.arc-top { display: flex; align-items: flex-start; gap: 8px; }
.arc-title { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }

/* Celular: la búsqueda va en su propio renglón y los íconos debajo */
@media (max-width: 430px) {
  .filter-row { flex-wrap: wrap; row-gap: 10px; }
  .filter-row #fQ { flex: 1 1 100%; }
  .filter-row #btnFilters { margin-left: auto; }
}
.arc-col .col-head { font-size: 15px; color: var(--accent); background: var(--fill); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.arc-col + .arc-col { margin-top: 6px; }
@media (min-width: 700px) { .arc-col + .arc-col { margin-top: 0; } }

/* Equipo: una columna por persona con su score */
.team-view { padding: 0 0 calc(40px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .tm-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tm-help { margin: 0 16px 12px; }
.tm-help summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); }
.tm-help p { margin: 6px 0 0; }
.tm-score {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  display: grid; gap: 12px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.tm-who { display: flex; align-items: center; gap: 12px; }
.tm-who .avatar { width: 42px; height: 42px; font-size: 15px; }
.tm-who > span:last-child { display: grid; gap: 2px; min-width: 0; }
.tm-who b { font-size: 17px; }
.tm-big { display: flex; align-items: center; gap: 14px; padding: 4px 0 2px; }
.tm-num { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--muted); font-variant-numeric: tabular-nums; }
.tm-num.lv-red { color: var(--red); } .tm-num.lv-orange { color: var(--orange); }
.tm-num.lv-blue { color: var(--teal-text); } .tm-num.lv-green { color: var(--green); }
.tm-lbl { font-size: 13px; color: var(--muted); line-height: 1.35; }
.tm-lbl b { color: var(--text); font-size: 15px; }
.tm-metric { display: grid; gap: 4px; }
.tm-mrow { display: flex; justify-content: space-between; font-size: 13px; }
.tm-mrow b { font-variant-numeric: tabular-nums; }
.tm-metric .mini-bar { flex: none; width: 100%; height: 6px; }
.tm-h { font-size: 13px; font-weight: 700; color: var(--accent); margin: 4px 4px -4px; text-transform: uppercase; letter-spacing: .03em; }
.tm-h .n { color: var(--muted); font-weight: 600; margin-left: 4px; }
.tm-task {
  width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px;
}
.tm-sub { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tm-col .pp-item { background: #fff; border: 1px solid var(--line); }
/* Indicadores del score: cerrados por defecto, se abren tocando el score */
button.tm-big { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 4px 0 2px; }
button.tm-big .chev { margin-left: auto; }
.tm-score.open button.tm-big .chev { transform: rotate(-135deg) translate(-2px, 0); }
.tm-metrics { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; margin-top: -12px; }
.tm-metrics > div { overflow: hidden; min-height: 0; display: grid; gap: 12px; }
.tm-score.open .tm-metrics { grid-template-rows: 1fr; margin-top: 0; }

/* Equipo: contenedores plegables (enfoque, mejora, desglose) */
.tm-box { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
.tm-box-head {
  width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
}
.tm-box-head > span:first-child { display: grid; gap: 2px; flex: 1; min-width: 0; }
.tm-box-head b { font-size: 15px; color: var(--accent); }
.tm-box.open .tm-box-head .chev { transform: rotate(-135deg) translate(-2px, 0); }
.tm-box .tm-metrics { margin-top: 0; }
.tm-box.open .tm-metrics { grid-template-rows: 1fr; }
.tm-box-body { padding: 0 14px 14px; display: grid; gap: 10px; }
.tm-box-body > .col-list { gap: 10px; }
.tm-intro { margin: 0; font-size: 14px; line-height: 1.45; }
.tm-focus { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tm-fitem {
  width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; display: grid; gap: 2px;
  border: 0; border-left: 3px solid var(--accent); background: var(--fill); border-radius: 8px; padding: 8px 10px;
}
.tm-fitem b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.tm-fitem .tiny { color: var(--muted); }
.tm-fitem.warn { border-left-color: var(--orange); }
.tm-fitem.bad { border-left-color: var(--red); }
.tm-fitem.bad .tiny { color: var(--red); }
.tm-sec { margin: 2px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--orange-text); }
.tm-sec.ok { color: var(--green-text); }
.tm-fb { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.tm-fb b { color: var(--accent); }
.tm-score { margin-bottom: 10px; }

/* Brief: ficha de solo lectura; el lápiz activa la edición */
.brief-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brief-pen { width: 34px; height: 34px; border-radius: 10px; }
.brief.editing .brief-pen { background: var(--accent); color: #fff; }
.brief:not(.editing) .brief-edit, .brief:not(.editing) .brief-save,
.brief:not(.editing) .add-img, .brief:not(.editing) .thumb button { display: none; }
.brief.editing .brief-view { display: none; }
.brief-edit { display: grid; gap: 12px; min-width: 0; }
.brief-view { background: #fff; border-radius: 14px; padding: 4px 14px; display: grid; }
.bv-desc { margin: 10px 0 8px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bv-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0;
  border-top: 1px solid var(--line); font-size: 14px;
}
.bv-row > span { color: var(--muted); }
.bv-row > b { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.brief:not(.editing) .brief-photos.empty { display: none !important; }
.acc { scroll-margin-top: 10px; }
.menu-item.success { color: var(--green-text); font-weight: 600; }

/* Fecha del hito: semáforo de cercanía */
.ms-due.d-3 { background: #fff3bf; color: #8a6d00; }
.ms-due.d-1 { background: var(--orange-soft); color: var(--orange-text); }
.ms-due.d-today { background: rgba(255, 59, 48, .14); color: var(--red); }
.ms-due.d-late { background: #b42318; color: #fff; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.ms-due.d-late i { color: #ffd0cc; text-decoration: none; }

/* Tarjeta: etiqueta del hotel y fecha de alta */
.card-sub { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; margin-top: -2px; }
.ptag {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .01em; padding: 2px 8px; border-radius: 6px;
}
.stamp { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Ventanita de sí / no */
.overlay.dialog-ov { z-index: 60; align-items: center; padding: 24px; }
.dialog {
  background: #fff; width: 100%; max-width: 380px; border-radius: 18px; padding: 20px 18px 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); display: grid; gap: 10px; animation: sheetIn .3s ease both;
}
.dialog h3 { margin: 0; font-size: 18px; }
.dialog p { margin: 0; color: var(--muted); font-size: 14px; }
.dialog ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.dialog-actions .btn { justify-content: center; text-align: center; }
.dialog-actions .btn { min-width: 0; white-space: normal; padding-left: 10px; padding-right: 10px; }

/* Tarjeta: hotel arriba a la izquierda, prioridad arriba a la derecha */
.card-head { grid-template-columns: minmax(0, 1fr); }
.card-row1 { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.card-place { min-width: 0; display: flex; }
.card-head > .card-title, .card-head > .title-edit { grid-column: 1 / -1; }
.card-head > .card-sub { margin-top: -4px; }

/* Tarjetas olvidadas (gag): solo el contenedor cambia de color y textura;
   el contenido (título, etiquetas, barras) se queda igual. */
.card.age-old, .card.age-mold, .card.age-rot { position: relative; isolation: isolate; }
.card.age-old::after, .card.age-mold::after, .card.age-rot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
}

/* >3 semanas: papel viejo, amarillento y craquelado */
.card.age-old { background: #f8efd9; border-color: #e6d8b3; box-shadow: inset 0 0 28px rgba(140, 100, 20, .12); }
.card.age-old::after {
  opacity: .32;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='120'%3E%3Cg fill='none' stroke='%23a3843f' stroke-width='.8' stroke-linecap='round'%3E%3Cpath d='M0 30 L22 34 L35 22 L58 28 L70 45 L95 40 L110 55 L140 50 L160 58'/%3E%3Cpath d='M35 22 L40 5 M70 45 L64 70 L80 92 L76 120 M110 55 L118 80 L150 86 M95 40 L100 15 L126 8'/%3E%3Cpath d='M0 95 L20 88 L40 100 L64 70 M20 88 L14 120 M126 8 L160 14'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 85% 20%, rgba(150, 110, 30, .28), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(150, 110, 30, .22), transparent 45%);
}

/* >1½ meses: moho verde */
.card.age-mold { background: #eaf2d8; border-color: #bfd1a1; box-shadow: inset 0 0 30px rgba(70, 110, 20, .15); }
.card.age-mold::after {
  opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='200' viewBox='0 0 320 200' preserveAspectRatio='none'%3E %3Cdefs%3E %3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E %3CfeTurbulence type='fractalNoise' baseFrequency='.045 .06' numOctaves='4' seed='7'/%3E %3CfeColorMatrix type='matrix' values='0 0 0 0 .30  0 0 0 0 .46  0 0 0 0 .14  3.2 0 0 0 -1.25'/%3E %3C/filter%3E %3CradialGradient id='g' cx='50%25' cy='50%25' r='72%25'%3E %3Cstop offset='.5' stop-color='black'/%3E%3Cstop offset='.82' stop-color='%23888'/%3E%3Cstop offset='1' stop-color='white'/%3E %3C/radialGradient%3E %3Cmask id='m'%3E%3Crect width='320' height='200' fill='url%28%23g%29'/%3E%3C/mask%3E %3C/defs%3E %3Crect width='320' height='200' filter='url%28%23f%29' mask='url%28%23m%29'/%3E %3C/svg%3E") center / 100% 100% no-repeat;
}

/* >2 meses: infectada, morada con manchas oscuras en las orillas */
.card.age-rot { background: #eadff3; border-color: #b08cc4; box-shadow: inset 0 0 36px rgba(60, 10, 80, .22); }
.card.age-rot::after {
  opacity: .6;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='200' viewBox='0 0 320 200' preserveAspectRatio='none'%3E %3Cdefs%3E %3Cfilter id='d' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E %3CfeTurbulence type='fractalNoise' baseFrequency='.035' numOctaves='3' seed='11' result='t'/%3E %3CfeDisplacementMap in='SourceGraphic' in2='t' scale='22' xChannelSelector='R' yChannelSelector='G'/%3E %3CfeGaussianBlur stdDeviation='.6'/%3E %3C/filter%3E %3C/defs%3E %3Cg filter='url%28%23d%29'%3E %3Cellipse cx='14' cy='38' rx='16' ry='13' fill='%235a1f78' fill-opacity='.55'/%3E %3Cellipse cx='10' cy='40' rx='7' ry='6' fill='%232a0638' fill-opacity='.7'/%3E %3Cellipse cx='300' cy='176' rx='24' ry='19' fill='%236a2a8c' fill-opacity='.5'/%3E %3Cellipse cx='306' cy='182' rx='10' ry='8' fill='%232a0638' fill-opacity='.65'/%3E %3Cellipse cx='286' cy='16' rx='11' ry='8' fill='%233a0a50' fill-opacity='.55'/%3E %3Cellipse cx='70' cy='194' rx='13' ry='9' fill='%237d3aa3' fill-opacity='.45'/%3E %3Cellipse cx='176' cy='4' rx='9' ry='6' fill='%235a1f78' fill-opacity='.4'/%3E %3Cellipse cx='318' cy='92' rx='8' ry='12' fill='%234a1266' fill-opacity='.45'/%3E %3C/g%3E %3C/svg%3E") center / 100% 100% no-repeat;
}

/* Tarjeta cerrada: fecha de alta a la izquierda y hitos a la derecha */
.card-head > .card-sub { justify-content: space-between; }
.ms-mini { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Vista previa: estado como menú, con el mismo estilo de los demás renglones */
.meta-status { cursor: pointer; }
.meta-status select {
  border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--accent); text-align: right;
  padding: 0 18px 0 0; min-height: 0; width: auto; cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2313203c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; background-size: 14px;
}

/* Fecha del hito: pastilla con ícono (el input va encima, transparente) */
.date-pill {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 140px;
  min-height: 44px; padding: 0 12px; border-radius: 12px; background: #fff; color: var(--muted); font-size: 15px; cursor: pointer;
}
.ms .date-pill { flex: 0 0 auto; min-height: 36px; background: var(--fill); font-size: 14px; }
.date-pill.has { color: var(--text); font-weight: 600; }
.date-pill svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.date-pill input.ms-date {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; margin: 0; border: 0; min-height: 0;
}
.date-pill input.ms-date::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* Historial narrativo */
.hist .chg b { color: var(--accent); }
.h-reason { display: block; margin-top: 2px; font-style: italic; color: var(--muted); }

/* Diálogo de motivo */
.dialog textarea { min-height: 80px; }
.dialog-cancel { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; padding: 4px; justify-self: center; }
.hist .chg { font-size: 13px; line-height: 1.4; }
.owner-pick { display: grid; gap: 8px; margin-top: 4px; }
.owner-pick .btn { justify-content: flex-start; gap: 10px; width: 100%; }
.owner-pick .avatar { width: 28px; height: 28px; font-size: 11px; }
/* Mientras se arrastra, las columnas ocupan todo el alto para poder soltar en cualquier parte */
html.is-dragging .board { align-items: stretch; }
html.is-dragging .board .col { min-height: 140px; border-radius: 14px; }
.dialog p.dialog-task {
  color: var(--text); font-weight: 600; font-size: 16px; line-height: 1.35;
  background: rgba(255, 224, 102, .35); border: 1px solid rgba(214, 170, 0, .35); border-radius: 12px; padding: 10px 14px;
}
.meta-status select.empty { color: var(--muted); font-weight: 600; }
/* Comentario de la revisión: botón con contorno gris que abre la caja */
.btn.note-toggle, .acc .btn.note-toggle:not(.primary) {
  width: 100%; justify-content: center; background: transparent; color: var(--muted);
  border: 1.5px solid #c7c7cc; box-shadow: none; font-weight: 600;
}
.btn.note-toggle:hover { color: var(--accent); border-color: var(--accent); }
.note-box { display: grid; gap: 10px; min-width: 0; }
.note-box[hidden] { display: none; }
#app.focus, #app.focus .board { cursor: pointer; }

/* Logo: lleva al tablero y con un poco más de aire arriba y a la izquierda */
.brand { padding: 4px 0 0 4px; }
.logo-link { display: inline-block; border-radius: 6px; }
.logo-link:active { opacity: .7; }
.card-place { gap: 6px; flex-wrap: wrap; }
.sched-tag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap;
  background: #e8eefc; color: #3555a8;
}

/* Score de la tarjeta (abajo a la izquierda, 70% de opacidad): 1–3 gris y 4 turquesa solo con
   contorno y texto; 5 relleno verde con ✓ */
.score-tag {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 6px; white-space: nowrap;
  background: #fff; border: 1px solid currentColor; line-height: 1.5;
}
.score-tag.sc-1, .score-tag.sc-2, .score-tag.sc-3 { color: #8e8e96; }
.score-tag.sc-4 { color: var(--teal-text); }
.score-tag.sc-5 { background: var(--green); border-color: var(--green); color: #fff; }
.score-miss { display: none; grid-column: 1 / -1; margin: -4px 0 0; font-size: 12px; color: var(--muted); text-align: left; font-weight: 400; }
.card.open:not(.expanded) .score-miss { display: block; }
.card-score { grid-column: 1 / -1; display: flex; justify-content: flex-start; margin-top: -2px; opacity: .7; }
/* Solicitante como #hashtag junto al score */
.card-score { align-items: center; gap: 8px; min-width: 0; }
.req-hash { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.meta-status select { max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Fecha de entrega en la vista previa: renglón tocable con ícono */
button.meta-row.meta-due { width: 100%; font: inherit; cursor: pointer; text-align: left; }
.meta-due b { display: inline-flex; align-items: center; gap: 6px; }
.meta-due b svg { width: 16px; height: 16px; color: var(--accent); }

/* Mini calendario de mes */
.cal-dialog { max-width: 340px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head b { font-size: 16px; }
.cal-head .icon-btn { font-size: 22px; line-height: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-wd { font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; border: 0; border-radius: 50%; background: none; font: inherit; font-size: 15px; cursor: pointer; color: var(--text);
}
.cal-day:hover { background: var(--fill); }
.cal-day.past { color: #b8b8c0; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 700; }
.cal-day.sel { background: var(--accent); color: #fff; font-weight: 700; }

/* Sub-hitos: grupo desplegable con sus sub-hitos */
.ms-group { gap: 6px; }
.ms-tog { border: 0; background: none; padding: 4px; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.ms-tog .chev { transform: rotate(-45deg); transition: transform .2s; border-color: var(--accent); }
.ms-group.open > .ms-row .ms-tog .chev { transform: rotate(45deg) translateY(-2px); }
.ms-gname {
  flex: 1; min-width: 0; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; text-align: left; cursor: pointer;
  color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ms-gcount { font-size: 12px; font-weight: 600; color: var(--muted); }
.ms-gbar { flex: 1; height: 6px; }
.ms-group.done .ms-gname { color: var(--muted); }
.ms-subs { margin: 2px 0 2px 14px; padding-left: 12px; border-left: 2px solid var(--fill-2); }
.ms-subs .ms { background: var(--fill); border-color: transparent; padding: 8px 10px; }
.ms-add-sub { margin-left: 26px; }
.ms-add-sub .btn { min-height: 40px; }
.btn.ms-addsub { justify-self: start; min-height: 34px; font-size: 13px; padding: 4px 12px; }
/* Agregar sub-hito: fecha y botón a la derecha; el botón con contorno */
.ms-add.ms-add-sub { justify-content: flex-end; }
.ms-add.ms-add-sub .date-pill { flex: 0 0 auto; }
.ms-add.ms-add-sub .btn, .acc .ms-add.ms-add-sub .btn:not(.primary) {
  flex: 0 0 auto; background: #fff; border: 1.5px solid #c7c7cc; color: var(--accent); box-shadow: none; padding: 0 16px;
}
/* Proveedores: varias columnas que se acomodan solas */
@media (min-width: 700px) { .tm-board.tm-prov { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
@media (max-width: 430px) {
  .filter-row { column-gap: 6px; }
  .filter-row .cal-btn { width: 40px; height: 40px; border-radius: 11px; }
  .filter-row .cal-btn svg { width: 20px; height: 20px; }
  .filter-row #btnFilters { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 360px) {
  .filter-row { column-gap: 5px; }
  .filter-row .cal-btn { width: 36px; height: 36px; border-radius: 10px; }
  .filter-row .cal-btn svg { width: 18px; height: 18px; }
  .filter-row #btnFilters { padding-left: 4px; padding-right: 4px; font-size: 15px; }
}

/* Proveedores: gráfica, destacados y contraídos */
.pchart { margin: 0 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px 18px 14px; display: grid; gap: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px rgba(19,32,60,.05); }
.pchart-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pchart-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 17px; letter-spacing: -.01em; color: var(--text); }
.pchart-toggle .muted { letter-spacing: 0; }
.pchart-chev { font-size: 22px; line-height: 1; color: var(--muted); transform: rotate(90deg); transition: transform .2s; margin-left: 2px; }
.pchart.closed { padding: 0; }
.pchart.closed .pchart-toggle { width: 100%; padding: 14px 18px; }
.pchart.closed .pchart-chev { transform: none; margin-left: auto; }
.pc-demo { font-size: 11px; font-weight: 600; color: #8a6d00; background: #fff6d6; border: 1px solid #f1dc8f; border-radius: 999px; padding: 2px 8px; }
.pchart-seg { overflow-x: auto; scrollbar-width: none; justify-self: start; max-width: 100%; }
.pchart-seg::-webkit-scrollbar { display: none; }
.pchart-seg button { flex: 0 0 auto; padding: 7px 14px; white-space: nowrap; }
.pchart-seg.small button { font-size: 12px; padding: 4px 11px; }
.pchart-hint { margin: 0; }
.pc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pc-kpi { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--fill); border: 1px solid transparent; position: relative; overflow: hidden; transition: background .2s, border-color .2s, opacity .2s; }
.pc-kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.pc-kpi:hover { background: #ebebf0; }
.pc-kpi.on { background: #fff; border-color: var(--c); }
.pchart[data-focus] .pc-kpi:not(.on) { opacity: .55; }
.pc-kpi-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.pc-kpi-name i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pc-kpi-big { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; display: flex; align-items: baseline; gap: 6px; }
.pc-kpi-big small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pc-kpi-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); min-height: 16px; }
.pc-tr { font-weight: 600; }
.pc-tr.good { color: var(--green-text); }
.pc-tr.bad { color: var(--red); }
.pc-charts { display: grid; gap: 18px; }
.pc-charts.two { grid-template-columns: 1fr 1fr; gap: 32px; }
.pc-fig { margin: 0; min-width: 0; }
.pc-fig figcaption { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; }
.pc-fig figcaption b { font-size: 14px; color: var(--text); }
.pc-fig figcaption span { font-size: 12px; color: var(--muted); }
.pc-plot { position: relative; }
.pc-svg { display: block; max-width: 100%; overflow: visible; touch-action: pan-y; }
.pc-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.pc-grid.base { stroke-dasharray: none; }
.pc-ytick, .pc-xtick { font-size: 10.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.pc-line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.pc-s { transition: opacity .25s; }
.pchart[data-focus="0"] .pc-s:not([data-s="0"]), .pchart[data-focus="1"] .pc-s:not([data-s="1"]), .pchart[data-focus="2"] .pc-s:not([data-s="2"]) { opacity: .15; }
.pc-dot, .pc-hdot { stroke: #fff; stroke-width: 2; }
.pc-end { font-size: 12px; }
.pc-end-v { fill: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-end-n { fill: var(--muted); font-weight: 500; }
.pc-cross { stroke: var(--text); stroke-opacity: .25; stroke-width: 1; }
.pc-hit { fill: transparent; cursor: crosshair; }
.pc-tip { position: absolute; top: 4px; z-index: 2; pointer-events: none; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 20px rgba(19,32,60,.12); padding: 8px 10px; font-size: 12px; display: grid; gap: 4px; min-width: 130px; color: var(--text); }
.pc-tip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.pc-tip span { display: flex; align-items: center; gap: 6px; }
.pc-tip span b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.pchart-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.pchart-foot .pchart-hint { flex: 1 1 320px; }
.pc-table { flex: 0 0 auto; max-width: 100%; }
.pc-table[open] { flex-basis: 100%; }
.pc-table summary { font-size: 12px; color: var(--muted); cursor: pointer; }
.pc-table-scroll { overflow-x: auto; margin-top: 6px; }
.pc-table table { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.pc-table th, .pc-table td { padding: 3px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.pc-table th:first-child { text-align: left; position: sticky; left: 0; background: #fff; }
@media (max-width: 520px) {
  .pchart { padding: 14px 12px 12px; border-radius: 18px; }
  .pc-kpis { gap: 6px; }
  .pc-kpi { padding: 10px 10px 9px 12px; border-radius: 12px; }
  .pc-kpi-big { font-size: 22px; flex-direction: column; align-items: flex-start; gap: 0; }
  .pc-kpi-foot span:not(.pc-tr) { display: none; }
}
.tm-featured { margin-bottom: 4px; }
@media (min-width: 700px) { .tm-board.tm-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tm-who-txt { flex: 1; }
.tm-who .tm-edit { margin-left: auto; align-self: flex-start; }
.tm-compact .tm-who { cursor: pointer; }
.tm-coltog { border: 0; background: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px; flex-shrink: 0; }
.tm-mini-num { font-size: 22px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.tm-mini-num.lv-red { color: var(--red); } .tm-mini-num.lv-orange { color: var(--orange); }
.tm-mini-num.lv-blue { color: var(--teal-text); } .tm-mini-num.lv-green { color: var(--green); }
.tm-compact.open .tm-coltog .chev { transform: rotate(-135deg) translate(-2px, 0); }
.tm-compact:not(.open) .tm-score { margin-bottom: 0; }
.tm-who-txt { display: grid; gap: 2px; min-width: 0; }
.board.tm-featured { padding-bottom: 6px !important; }
.tm-compact .tm-who .avatar { width: 36px; height: 36px; font-size: 13px; }
.pc-empty { margin: 4px 0; padding: 18px; text-align: center; background: var(--fill); border-radius: 14px; }
/* Reordenar hitos y sub-hitos arrastrando la agarradera */
.ms-grip { border: 0; background: none; padding: 6px 2px; margin: -6px 0 -6px -6px; color: var(--muted); opacity: .55; cursor: grab; touch-action: none; flex-shrink: 0; display: grid; place-items: center; }
.ms-grip svg { width: 10px; height: 16px; fill: currentColor; }
.ms-grip:hover { opacity: 1; }
.ms-sorting { user-select: none; -webkit-user-select: none; }
.ms-sorting .ms-grip { cursor: grabbing; }
.ms.ms-dragging { position: relative; z-index: 2; box-shadow: 0 8px 22px rgba(19,32,60,.16); border-color: var(--accent); transform: scale(1.015); transition: box-shadow .15s, transform .15s; }
/* Filtro por fechas */
.f-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.f-range label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.f-range input { width: 100%; min-width: 0; }
.filter-panel .f-all { justify-self: start; }
/* Escritorio: filtros compactos en uno o dos renglones (en celular se quedan apilados) */
@media (min-width: 900px) {
  .filter-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .filter-panel select { flex: 1 1 170px; max-width: 240px; width: auto; min-height: 36px; padding: 7px 30px 7px 12px; font-size: 14px; border-radius: 10px; background-position: right 11px center; }
  .filter-panel .f-range { display: flex; gap: 8px; flex: 0 1 auto; }
  .filter-panel .f-range[hidden] { display: none; }
  .filter-panel .f-range label { display: flex; align-items: center; gap: 6px; }
  .filter-panel .f-range input { min-height: 36px; padding: 6px 10px; font-size: 14px; border-radius: 10px; width: 150px; }
  .filter-panel .f-all { min-height: 36px; padding: 6px 14px; font-size: 14px; }
}
/* Filtros: outline gris Oxford, fondo blanco y letra gris */
.filter-panel select, .filter-panel .f-range input {
  background-color: #fff; border: 1px solid #4b4f54; color: #6e7378;
}
.filter-panel select:focus, .filter-panel .f-range input:focus { border-color: #4b4f54; box-shadow: 0 0 0 3px rgba(75, 79, 84, .12); }
.filter-panel select.has-val { color: #3a3d41; font-weight: 600; }
.filter-panel .f-all { background: #fff; border: 1px solid #4b4f54; color: #4b4f54; }
/* Proveedores: los 3 principales arriba; el resto con "Ver más proveedores" */
.tm-prov.tm-featured { margin-bottom: 8px; }
.tm-more { display: flex; justify-content: center; padding: 18px 16px 28px; border-top: 1px solid var(--line); margin: 10px 16px 0; }
.tm-more-btn { background: #fff; border: 1px solid #4b4f54; color: #4b4f54; padding: 10px 22px; }
.tm-rest + .tm-more { margin-top: 0; }
