/* Tareas por horizontes de tiempo: columnas limpias, casillas redondas, agregar en línea. */
#view .tasks-timeline{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;min-width:0;max-width:100%;
  --th-accent:var(--system-amber,#c2410c);--th-danger:var(--system-red,#ad2535);--th-ok:var(--system-green,#17653a)}
.th-top{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px}
.th-intro h2{margin:0;font-size:22px;letter-spacing:-.02em}
.th-summary{margin:4px 0 0;font-size:13px;color:var(--muted)}
.th-actions{display:flex;flex-wrap:wrap;gap:8px}
.th-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;
  padding-bottom:12px;border-bottom:1px solid var(--border-soft,var(--border))}
.th-views{display:inline-flex;padding:3px;gap:2px;border-radius:10px;background:var(--surface-muted,rgba(0,0,0,.05));border:1px solid var(--border-soft,var(--border))}
.th-views button{min-height:32px;padding:6px 14px;border:0!important;border-radius:8px!important;background:transparent!important;
  box-shadow:none!important;font-size:13px;font-weight:600;color:var(--muted)}
.th-views button[aria-selected="true"]{background:var(--surface)!important;color:var(--text-strong,var(--text));box-shadow:0 1px 2px rgba(0,0,0,.08)!important}
.th-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#view .th-filters input[type=search]{width:200px;min-height:34px}
#view .th-filters select{width:auto;max-width:200px;min-height:34px}
.th-toggle{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);white-space:nowrap;cursor:pointer}
.th-notice:empty{display:none}
.th-notice{margin:0;font-size:13px;color:var(--th-ok)}

.th-nav{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}
.th-nav button{min-height:30px;padding:4px 12px;font-size:13px}
.th-nav-btn{font-size:18px!important;line-height:1}
.th-nav-here{color:var(--th-accent)!important;font-weight:700}

.task-horizons{min-width:0;max-width:100%}
.th-columns{display:flex;max-width:100%;align-items:stretch;overflow-x:auto;min-height:62vh;
  border:1px solid var(--border-soft,var(--border));border-radius:14px;background:var(--surface);scroll-snap-type:x proximity}
.th-col{flex:1 0 250px;min-width:250px;display:flex;flex-direction:column;padding:16px 14px 14px;
  border-right:1px solid var(--border-soft,var(--border));scroll-snap-align:start;transition:background .15s}
.th-dias .th-col{flex-basis:165px;min-width:165px;padding-left:10px;padding-right:10px}
.th-dias .th-name{font-size:18px}
.th-semanas .th-col{flex-basis:210px;min-width:210px}
.th-col:last-child{border-right:0}
.th-col.th-weekend{background:color-mix(in srgb,var(--muted) 4%,var(--surface))}
.th-col.th-past .th-name{color:var(--muted)}
.th-col.th-drop{background:color-mix(in srgb,var(--th-accent) 8%,var(--surface))}
.th-head{display:grid;grid-template-columns:1fr auto;align-items:baseline;column-gap:8px;width:100%;margin:0 0 10px;padding:0 4px;
  text-align:left;background:none!important;border:0!important;box-shadow:none!important;min-height:0;color:inherit;font:inherit}
.th-head-toggle{cursor:pointer}
.th-name{font-size:21px;font-weight:760;letter-spacing:-.025em;color:var(--text-strong,var(--text))}
.th-sub{grid-column:1;font-size:13px;color:var(--muted);font-weight:500}
.th-count{grid-row:1;grid-column:2;min-width:22px;padding:1px 7px;border-radius:999px;text-align:center;font-size:12px;font-weight:700;
  background:var(--surface-muted,rgba(0,0,0,.06));color:var(--muted)}
.th-today .th-name,.th-today .th-sub{color:var(--th-accent)}
.th-today .th-count{background:color-mix(in srgb,var(--th-accent) 14%,var(--surface));color:var(--th-accent)}
.th-horizontes .th-today{background:color-mix(in srgb,var(--th-accent) 3%,var(--surface))}

.th-folded{flex:0 0 44px;min-width:44px;padding:14px 0}
.th-folded .th-head{display:flex;flex-direction:column;align-items:center;gap:8px;height:100%;padding:0}
.th-folded .th-name{writing-mode:vertical-rl;transform:rotate(180deg);font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.th-folded .th-sub{display:none}
.th-folded .th-count{order:-1}

.th-list{display:flex;flex-direction:column;gap:1px}
.th-item{display:grid;grid-template-columns:20px 1fr auto;align-items:start;gap:10px;padding:7px 6px;border-radius:8px;cursor:pointer;outline:none}
.th-item:hover,.th-item:focus-visible{background:var(--surface-muted,rgba(0,0,0,.04))}
.th-item:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb,var(--th-accent) 45%,transparent)}
.th-item.th-dragging{opacity:.45}
.th-check{width:18px;height:18px;min-height:18px!important;margin-top:1px;padding:0!important;border-radius:50%!important;
  border:1.5px solid color-mix(in srgb,var(--muted) 60%,transparent)!important;background:transparent!important;box-shadow:none!important;
  display:grid;place-items:center;font-size:11px;font-weight:800;line-height:1;color:var(--surface)}
.th-check:hover{border-color:var(--th-ok)!important;background:color-mix(in srgb,var(--th-ok) 12%,transparent)!important}
.th-done .th-check{background:var(--th-ok)!important;border-color:var(--th-ok)!important}
.th-high .th-check{border-color:var(--th-danger)!important}
.th-body{min-width:0;display:flex;flex-direction:column;gap:2px}
.th-title{font-size:14px;line-height:1.35;color:var(--text);overflow-wrap:anywhere}
.th-detail{font-size:12.5px;line-height:1.4;color:var(--text);opacity:.82;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.th-detail b{font-weight:600;color:var(--muted)}
.th-done .th-detail{display:none}
.th-evidence{display:grid;gap:4px;margin:0 0 14px;padding:12px 14px;border-radius:10px;border:1px solid var(--border-soft,var(--border));
  background:var(--surface-muted,rgba(0,0,0,.03));font-size:13px}
.th-evidence-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.th-evidence strong{font-size:14px;color:var(--text-strong,var(--text))}
.th-evidence p{margin:0;color:var(--muted)}
.th-evidence ul{margin:4px 0 0;padding-left:18px;display:grid;gap:3px;font-variant-numeric:tabular-nums}
.th-done .th-title{text-decoration:line-through;color:var(--muted)}
.th-meta{display:flex;flex-wrap:wrap;gap:2px 8px;font-size:11.5px;color:var(--muted)}
.th-tag{font-weight:600}
.th-late{color:var(--th-danger);font-weight:650}
.th-progress{color:var(--system-blue,#1d4ed8);font-weight:600}
.th-auto{font-style:italic}
.th-flag{width:7px;height:7px;margin-top:7px;border-radius:50%;background:var(--th-danger)}

#view .th-add{margin-top:4px;width:100%;min-height:34px;padding:6px 8px 6px 36px;border:1px dashed transparent!important;border-radius:8px;
  background:transparent!important;box-shadow:none!important;font-size:14px;color:var(--text)}
#view .th-add::placeholder{color:var(--muted)}
#view .th-add:hover{border-color:var(--border)!important}
#view .th-add:focus{border-style:solid!important;border-color:var(--th-accent)!important;background:var(--surface)!important;padding-left:10px}
.th-empty{margin:4px 6px;font-size:13px;color:var(--muted)}

@media (max-width:760px){
  .th-bar{align-items:stretch}
  .th-views{width:100%;overflow-x:auto}
  .th-views button{flex:1 0 auto;padding:6px 10px}
  #view .th-filters input[type=search]{width:100%}
  .th-columns{flex-direction:column;overflow:visible;min-height:0}
  .th-col,.th-dias .th-col{flex:none;min-width:0;border-right:0;border-bottom:1px solid var(--border-soft,var(--border))}
  .th-col:last-child{border-bottom:0}
  .th-horizontes .th-col[data-col="hoy"]{order:-1}
  .th-folded{padding:12px 14px}
  .th-folded .th-head{flex-direction:row;justify-content:space-between;height:auto}
  .th-folded .th-name{writing-mode:horizontal-tb;transform:none}
  .th-folded .th-count{order:0}
}

/* Cartera tributaria › Deuda fiscal TGR: carga de certificados. */
#view .tgr-drop{display:grid;gap:4px;margin:0 0 10px;padding:18px 20px;border:2px dashed var(--border);border-radius:14px;
  background:var(--surface);cursor:pointer;text-align:center}
#view .tgr-drop strong{font-size:15px}
#view .tgr-drop span{font-size:13px;color:var(--muted)}
#view .tgr-drop:hover,#view .tgr-drop:focus-visible,#view .tgr-drop.tgr-drop-on{border-color:var(--system-blue,#1d4ed8);
  background:color-mix(in srgb,var(--system-blue,#1d4ed8) 5%,var(--surface));outline:none}
#view .tgr-carga{margin:0 0 10px;padding-left:18px;font-size:13px}
#view .tgr-carga .tgr-ok{color:var(--system-green,#17653a)}
#view .tgr-carga .tgr-mal{color:var(--system-red,#ad2535)}
#view .tgr-pasos{margin:0 0 12px;font-size:13px}
#view .tgr-pasos ol{margin:6px 0 0;padding-left:20px}

.th-mes .th-columns{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:var(--border);border:1px solid var(--border)}
.th-mes .th-col{min-width:0;padding:8px;background:var(--surface);border:0}
.th-mes .th-col:first-child{grid-column-start:var(--th-dia-inicial,1)}
.th-mes .th-today{box-shadow:inset 0 0 0 2px var(--th-accent)}
.th-mes .th-name{font-size:15px}
.th-month-title{margin:8px 0}
@media(max-width:900px){
  .th-mes .th-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
  .th-mes .th-col:first-child{grid-column-start:auto}
}
@media(max-width:480px){.th-mes .th-columns{grid-template-columns:minmax(0,1fr)}}

/* La barra puede tener seis vistas incluso en pantallas estrechas. */
.th-views{display:flex;flex-wrap:wrap;max-width:100%;min-width:0}
.th-views button{white-space:normal;min-width:0}
.th-mes .th-columns{min-height:0}
.th-mes .th-head{padding-inline:0;grid-template-columns:minmax(0,1fr) auto;column-gap:4px}
.th-mes .th-name{overflow-wrap:anywhere}
@media(max-width:600px){
  .th-views{width:100%}
  .th-views button{flex:1 1 30%;min-height:40px;padding-inline:5px}
  .th-nav button{min-height:40px}
}
