/* Cronograma compartido: agenda, calendario en linea y tabla. */
.pos-schedule {
  --font-body: "Rubik", "Segoe UI", Arial, sans-serif;
  --schedule-surface: #fff;
  --schedule-secondary: #ebe9ed;
  --schedule-text: #101311;
  --schedule-muted: #535d56;
  --schedule-border: #d0d5d2;
  --schedule-accent: var(--pos-800, #145730);
  --schedule-result: var(--ua-900, #493c17);
  --schedule-result-bg: var(--ua-100, #fbefc9);
  --schedule-result-line: var(--ua-600, #dab544);
  width: 100%; max-width: 1120px; min-width: 0; margin: 28px auto 0;
  padding: clamp(16px, 3vw, 32px); border: 1px solid var(--schedule-border);
  border-radius: 20px; background: var(--schedule-surface); color: var(--schedule-text);
  font-family: var(--font-body, Rubik, sans-serif); text-align: left;
  overflow-wrap: anywhere;
}
[data-theme="dark"] .pos-schedule {
  --schedule-surface: #141417; --schedule-secondary: #1b1b20;
  --schedule-text: #f3f6f4; --schedule-muted: #b4bdb7; --schedule-border: #424849;
  --schedule-accent: var(--pos-200, #93d7b0);
  --schedule-result: var(--ua-300, #f6d982); --schedule-result-bg: var(--ua-900, #493c17);
  --schedule-result-line: var(--ua-400, #f3ce5e);
}
.pos-schedule *, .pos-schedule *::before, .pos-schedule *::after { box-sizing: border-box; }
.pos-schedule [hidden] { display: none !important; }
.pos-schedule .pos-schedule-context { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pos-schedule-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 10px; border-radius: 999px; background: var(--schedule-secondary); color: var(--schedule-text); font-size: .75rem; line-height: 1.4; font-weight: 500; }
.pos-schedule-period { font-family: var(--font-code); font-size: .72rem; color: var(--schedule-muted); }
.pos-schedule .pos-schedule-explanation { margin: 16px 0 0; color: var(--schedule-muted); font-size: .9rem; line-height: 1.6; max-width: 76ch; }
.pos-schedule .pos-schedule-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 12px; }
.pos-schedule-toolbar > span { margin-right: auto; font-size: .75rem; color: var(--schedule-muted); }
.pos-schedule-views { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--schedule-border); border-radius: 16px; background: var(--schedule-secondary); }
.pos-schedule .pos-schedule-views button { border-color: transparent; background: transparent; }
.pos-schedule .pos-schedule-views button[aria-pressed="true"] { background: var(--schedule-surface); border-color: var(--schedule-accent); }
.pos-schedule button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--schedule-border); border-radius: 12px; background: var(--schedule-surface); color: var(--schedule-text); font: 560 .8rem/1.4 var(--font-body, Rubik, sans-serif); cursor: pointer; transition: background 160ms ease, border-color 160ms ease; }
.pos-schedule button:hover { background: var(--schedule-secondary); border-color: var(--schedule-accent); }
.pos-schedule button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 5px; border-color: var(--schedule-accent); }
.pos-schedule button:focus-visible, .pos-schedule a:focus-visible, .pos-schedule-table-wrap:focus-visible { outline: 3px solid var(--schedule-accent); outline-offset: 3px; }
.pos-schedule a { color: var(--schedule-accent); text-decoration: underline; text-underline-offset: 3px; }
.pos-schedule a:hover { text-decoration-thickness: 2px; }
.pos-schedule .pos-schedule-key { display: flex; gap: 8px; align-items: baseline; margin: 12px 0 20px; font-size: .78rem; line-height: 1.5; color: var(--schedule-muted); }
.pos-schedule-key > span { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; background: var(--schedule-result-line); }
.pos-schedule-group { margin-top: 16px; border: 1px solid var(--schedule-border); border-radius: 12px; }
.pos-schedule .pos-schedule-group-heading { margin: 0; padding: 0; font: 600 1rem/1.4 var(--font-display); color: var(--schedule-text); }
.pos-schedule-group-heading > span { display: block; padding: 16px; }
.pos-schedule .pos-schedule-group-heading button { display: flex; width: 100%; min-width: 0; align-items: center; gap: 12px; padding: 16px; border: 0; border-radius: 12px; background: var(--schedule-secondary); text-align: left; font-size: .94rem; }
.pos-schedule-group-heading button > span:first-child { flex: 1; min-width: 0; }
.pos-schedule-group-count { color: var(--schedule-muted); font: 400 .68rem/1.4 var(--font-code); }
.pos-schedule-group-heading svg { width: 18px; height: 18px; flex: 0 0 18px; transition: transform 160ms ease; }
.pos-schedule-group-heading [aria-expanded="false"] svg { transform: rotate(-90deg); }
.pos-schedule .pos-schedule-group-preview { margin: 0; padding: 10px 16px; font-size: .75rem; line-height: 1.65; color: var(--schedule-muted); border-top: 1px solid var(--schedule-border); }
.pos-schedule .pos-schedule-events { margin: 0; padding: 0 16px; list-style: none; }
.pos-schedule-event { display: grid; grid-template-columns: minmax(160px, .8fr) minmax(0, 2fr); gap: 24px; padding: 18px 12px; border-top: 1px solid var(--schedule-border); }
.pos-schedule-event:first-child { border-top: 0; }
.pos-schedule-event.is-result { border-left: 4px solid var(--schedule-result-line); padding-left: 8px; }
.pos-schedule .pos-schedule-date { color: var(--schedule-text); font: 500 .8rem/1.65 var(--font-code); }
.pos-schedule-date time { white-space: nowrap; }
.pos-schedule-date small { display: block; color: var(--schedule-muted); font: 400 .7rem/1.5 var(--font-body); margin-top: 5px; }
.pos-schedule .pos-schedule-copy h4, .pos-schedule .pos-schedule-copy h5 { margin: 0; color: var(--schedule-text); font: 560 1rem/1.4 var(--font-body); letter-spacing: 0; }
.pos-schedule .pos-schedule-copy p { margin: 8px 0 0; color: var(--schedule-muted); font-size: .875rem; line-height: 1.6; max-width: 76ch; }
.pos-schedule .pos-schedule-copy .pos-schedule-condition { color: var(--schedule-text); }
.pos-schedule-result { display: block; width: fit-content; max-width: 100%; margin-bottom: 7px; padding: 4px 8px; background: var(--schedule-result-bg); color: var(--schedule-result); border-radius: 6px; font: 500 .7rem/1.4 var(--font-body); }
.pos-schedule-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; margin-right: 8px; padding: 3px 6px; background: var(--schedule-secondary); border-radius: 6px; color: var(--schedule-accent); font: 500 .7rem/1.3 var(--font-code); vertical-align: baseline; }
.pos-schedule .pos-schedule-source { padding: 12px 16px; margin: 0; border-top: 1px solid var(--schedule-border); color: var(--schedule-muted); font-size: .73rem; line-height: 1.8; }
.pos-schedule-source a, .pos-schedule-notice a { display: inline-flex; align-items: center; min-height: 44px; }
.pos-schedule .pos-schedule-notice { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--schedule-border); font-size: .875rem; line-height: 1.65; color: var(--schedule-muted); max-width: 80ch; }
.pos-schedule-notice a { display: flex; width: fit-content; font-weight: 560; font-size: .8rem; }
.pos-schedule-table-wrap { margin-top: 18px; width: 100%; max-width: 100%; overflow-x: auto; }
.pos-schedule .pos-schedule-table { width: 100%; min-width: 640px; border-collapse: collapse; color: var(--schedule-text); background: var(--schedule-surface); }
.pos-schedule-table caption { padding: 12px 0; text-align: left; color: var(--schedule-muted); font-size: .8rem; }
.pos-schedule-table th, .pos-schedule-table td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--schedule-border); line-height: 1.55; font-size: .8rem; }
.pos-schedule-table th[scope="col"] { font-size: .85rem; }
.pos-schedule-table th[scope="row"] { width: 32%; font-weight: 500; }
.pos-schedule-table td:nth-child(2) { width: 26%; font-family: var(--font-code); }
.pos-schedule-table thead, .pos-schedule-table th[scope="rowgroup"] { background: var(--schedule-secondary); }
.pos-schedule-table tr.is-result > th { border-left: 4px solid var(--schedule-result-line); }
.pos-schedule-table td p { margin: 8px 0 0; font-size: inherit; }
.pos-schedule-table td small { display: block; font-family: var(--font-body); }
.pos-schedule-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* El eje conserva 28 px por dia. Solo este lienzo, nunca la pagina, se desplaza. */
.pos-linear { margin-top: 20px; min-width: 0; }
.pos-linear-controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.pos-linear-years { display: flex; gap: 8px; align-items: center; }
.pos-schedule .pos-linear-years strong { min-width: 5ch; text-align: center; font: 600 1.25rem/1.4 var(--font-display); }
.pos-schedule .pos-linear-years button { min-width: 44px; font-size: 1.35rem; padding: 4px; }
.pos-schedule .pos-linear-years button:disabled { color: var(--schedule-muted); opacity: .5; cursor: default; border-color: var(--schedule-border); background: var(--schedule-secondary); }
.pos-linear-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 100%; min-width: 0; font-size: .8rem; }
.pos-linear-filter select { min-height: 44px; width: 280px; max-width: 100%; padding: 10px; border: 1px solid var(--schedule-border); border-radius: 10px; font: 400 .8rem/1.5 var(--font-body); background: var(--schedule-surface); color: var(--schedule-text); color-scheme: light; }
[data-theme="dark"] .pos-linear-filter select { color-scheme: dark; }
.pos-schedule .pos-linear-help, .pos-schedule .pos-linear-scroll-hint { margin: 14px 0; color: var(--schedule-muted); font-size: .8rem; line-height: 1.6; max-width: 88ch; }
.pos-schedule .pos-linear-scroll-hint { margin: 0 0 8px; font-size: .7rem; }
.pos-linear-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.pos-linear-board { flex: 1 1 950px; min-width: 0; max-width: 100%; }
.pos-linear-scroll { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--schedule-border); border-radius: 12px; background: var(--schedule-surface); scrollbar-color: var(--schedule-muted) var(--schedule-secondary); }
.pos-linear-scroll:focus-visible, .pos-linear-filter select:focus-visible, .pos-linear-detail-title:focus { outline: 3px solid var(--schedule-accent); outline-offset: 3px; }
.pos-linear-grid { width: 948px; padding-right: 8px; }
.pos-linear-days { display: grid; grid-template-columns: 72px repeat(31, 28px); background: var(--schedule-secondary); font: 400 .65rem/32px var(--font-code); text-align: center; color: var(--schedule-muted); }
.pos-linear-days > span:first-child { position: sticky; left: 0; z-index: 3; background: var(--schedule-secondary); border-right: 1px solid var(--schedule-border); }
.pos-linear-month { display: grid; grid-template-columns: 72px 868px; border-top: 1px solid var(--schedule-border); }
.pos-linear-month-name { position: sticky; left: 0; z-index: 3; padding: 20px 10px; background: var(--schedule-surface); border-right: 1px solid var(--schedule-border); color: var(--schedule-text); font: 500 .8rem/1.4 var(--font-body); }
.pos-linear-track { position: relative; min-width: 0; isolation: isolate; }
.pos-linear-ticks { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(31, 28px); pointer-events: none; }
.pos-linear-ticks > span { padding-top: 2px; text-align: center; border-right: 1px solid var(--schedule-border); color: var(--schedule-muted); font: 400 .55rem/1 var(--font-code); opacity: .7; }
.pos-linear-ticks > span.is-invalid { background: var(--schedule-secondary); }
.pos-schedule .pos-linear-event { position: absolute; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; text-align: left; font: 500 .7rem/1.3 var(--font-body); }
.pos-schedule .pos-linear-event:hover { background: transparent; }
.pos-schedule .pos-linear-event[aria-pressed="true"] { text-decoration: none; }
.pos-linear-band { position: absolute; top: 9px; height: 26px; display: block; padding: 5px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border: 1px solid var(--schedule-accent); border-radius: 5px; background: var(--pos-100, #bee7cf); color: var(--pos-900, #0c341d); }
[data-theme="dark"] .pos-linear-band { background: var(--pos-900, #0c341d); color: var(--pos-100, #bee7cf); }
.pos-linear-band.continues-before { border-left-style: dashed; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.pos-linear-band.continues-after { border-right-style: dashed; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pos-linear-dot { position: absolute; top: 17px; width: 10px; height: 10px; border: 2px solid var(--schedule-accent); border-radius: 50%; background: var(--schedule-surface); color: var(--schedule-accent); font: 600 .9rem/6px var(--font-body); }
.pos-linear-point-label { position: absolute; top: 10px; max-width: 140px; padding: 4px 3px; background: var(--schedule-surface); color: var(--schedule-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-linear-point-label.is-before { text-align: right; }
.pos-linear-event.is-reference .pos-linear-dot { border-style: dashed; }
.pos-linear-event.is-result .pos-linear-band { background: var(--schedule-result-bg); color: var(--schedule-result); border-color: var(--schedule-result-line); font-weight: 600; }
.pos-linear-event.is-result .pos-linear-dot { background: var(--schedule-result-line); border-color: var(--schedule-result); }
.pos-linear-event.is-result .pos-linear-point-label { background: var(--schedule-result-bg); color: var(--schedule-result); font-weight: 600; }
.pos-linear-event[aria-pressed="true"] .pos-linear-band, .pos-linear-event:hover .pos-linear-band { outline: 2px solid var(--schedule-accent); outline-offset: 2px; }
.pos-linear-event[aria-pressed="true"] .pos-linear-point-label, .pos-linear-event:hover .pos-linear-point-label { text-decoration: underline; text-underline-offset: 3px; }
.pos-schedule .pos-linear-empty-month { position: relative; display: inline-block; margin: 24px 12px 0; padding: 2px 6px; color: var(--schedule-muted); background: var(--schedule-surface); font-size: .7rem; }
.pos-linear-more { padding: 4px 8px 8px; background: var(--schedule-secondary); }
.pos-linear-more button { position: sticky; left: 8px; max-width: 186px; text-align: left; }
.pos-linear-detail { flex: 1 1 260px; min-width: 0; padding: 20px; background: var(--schedule-secondary); border: 1px solid var(--schedule-border); border-radius: 12px; scroll-margin-top: 120px; transition: none; }
.pos-linear-detail.is-result { border-top: 4px solid var(--schedule-result-line); }
.pos-schedule .pos-linear-detail-group { margin: 0 0 12px; color: var(--schedule-muted); font: 500 .72rem/1.5 var(--font-code); }
.pos-schedule .pos-linear-detail-title { margin: 0 0 12px; color: var(--schedule-text); font: 600 1.05rem/1.45 var(--font-display); letter-spacing: 0; scroll-margin-top: 140px; }
.pos-schedule .pos-linear-detail > p:not(.pos-linear-detail-group) { font-size: .875rem; line-height: 1.65; color: var(--schedule-muted); max-width: 88ch; }
.pos-schedule .pos-linear-detail .pos-schedule-source { padding: 12px 0; margin-top: 12px; }
.pos-linear-back { margin-top: 12px; }
.pos-linear-pending { margin-top: 20px; }
.pos-linear-pending:empty { display: none; }
.pos-schedule .pos-linear-pending h3, .pos-schedule .pos-linear-pending h4 { margin: 0; color: var(--schedule-text); font: 600 .95rem/1.5 var(--font-display); }
.pos-linear-pending ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.pos-schedule .pos-linear-undated { width: 100%; text-align: left; }
.pos-linear-undated span, .pos-linear-undated small { display: block; }
.pos-linear-undated small { margin-top: 4px; color: var(--schedule-muted); font-size: .7rem; font-weight: 400; }
.pos-linear-undated.is-result { border-left: 4px solid var(--schedule-result-line); }
.planner-panel .pos-schedule { margin-top: 24px; }
.planner-panel { min-width: 0; }
.planner-panel #plannerCalendarStatus { padding: 0; border: 0; background: transparent; font-size: .8rem; }
.planner-panel #plannerCalendarStatus:empty { display: none; }
@media (max-width: 900px) {
  /* Reserva el carril de dots existente sin superponerlo a fechas o controles. */
  #fechas > .shell .pos-schedule { width: calc(100% - 44px); margin-left: 0; margin-right: 44px; }
  .planner-panel { margin-right: 44px; }
}
@media (max-width: 600px) {
  .planner-panel { padding: 12px; }
  .planner-panel .planner-program { flex-wrap: wrap; gap: 12px; }
  .planner-panel .planner-program .code { white-space: normal; overflow-wrap: anywhere; }
  .pos-schedule { padding: 12px; }
  .pos-schedule-event { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px 4px; }
  .pos-schedule-event.is-result { padding-left: 10px; }
  .pos-schedule .pos-schedule-events { padding: 0 10px; }
  .pos-schedule-toolbar > span { flex-basis: 100%; }
  .pos-schedule-group-heading button { flex-wrap: wrap; }
  .pos-schedule-group-count { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pos-schedule button, .pos-schedule svg { transition: none; }
}
@media print {
  .section-dots { display: none !important; }
  .planner-grid { display: block; }
  .planner-panel { opacity: 1 !important; transform: none !important; margin-right: 0; }
  .pos-schedule { --schedule-surface: #fff !important; --schedule-secondary: #f5f5f5 !important; --schedule-text: #060606 !important; --schedule-muted: #3f3f3f !important; --schedule-border: #7a7a7a !important; --schedule-accent: #145730 !important; --schedule-result: #493c17 !important; --schedule-result-bg: #fbefc9 !important; --schedule-result-line: #796526 !important; max-width: none; padding: 0; border: 0; }
  .pos-schedule [data-schedule-tools], .pos-schedule [data-schedule-table], .pos-schedule [data-schedule-linear], .pos-schedule [data-schedule-group-toggle], .pos-schedule .pos-schedule-group-preview { display: none !important; }
  .pos-schedule .pos-schedule-agenda, .pos-schedule [data-schedule-group-body], .pos-schedule [data-schedule-static-heading] { display: block !important; }
  .pos-schedule-event { break-inside: avoid; }
  .pos-schedule-group { break-inside: auto; }
  .pos-schedule-group-heading { break-after: avoid; }
  .pos-schedule .pos-schedule-source a::after, .pos-schedule .pos-schedule-notice a::after { content: ' (' attr(href) ')'; font-size: .65rem; font-weight: 400; overflow-wrap: anywhere; }
  .pos-schedule a { display: inline; min-height: 0; }
}
