/* Scoped to the scheduling surface inside the existing eight-step table form. */
#tableScheduling { margin:0 0 2rem; }
#tableScheduling [hidden] { display:none!important; }
#tableScheduling .ts-choice { border:0; padding:0; margin:0 0 1.5rem; min-width:0; }
#tableScheduling legend { font-family:var(--font-heading); font-size:1.45rem; font-weight:700; padding:0; margin-bottom:1rem; }
#tableScheduling button { font:inherit; cursor:pointer; color:var(--text-primary); }
#tableScheduling button:focus-visible, #tableScheduling input:focus-visible { outline:3px solid var(--olive); outline-offset:3px; }
#tableScheduling button:disabled { cursor:default; color:var(--text-muted); opacity:.45; }
#tableScheduling .ts-modes { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
#tableScheduling .ts-mode { position:relative; cursor:pointer; min-width:0; }
#tableScheduling .ts-mode input { position:absolute; right:1rem; top:1.2rem; width:20px; height:20px; accent-color:var(--olive); cursor:pointer; }
#tableScheduling .ts-mode-body { display:flex; align-items:center; gap:1rem; padding:1.25rem 3rem 1.25rem 1.1rem; border:1px solid var(--warm-beige); border-radius:10px; min-height:128px; box-sizing:border-box; transition:border-color .18s,background-color .18s; }
#tableScheduling .ts-mode input:checked + .ts-mode-body { border-color:var(--olive); background:rgba(92,107,79,.07); }
#tableScheduling .ts-mode input:focus-visible + .ts-mode-body { outline:3px solid rgba(92,107,79,.3); outline-offset:3px; }
#tableScheduling .ts-mode strong { display:block; font:700 1.25rem var(--font-heading); margin:0 0 .45rem; }
#tableScheduling .ts-mode-body > span:last-child > span { display:block; color:var(--text-secondary); font-size:.94rem; line-height:1.5; }
#tableScheduling .ts-icon { width:54px; height:54px; flex-shrink:0; display:grid; place-items:center; border-radius:50%; background:rgba(92,107,79,.06); color:var(--olive-dark); }
#tableScheduling .ts-icon svg { width:28px; height:28px; }
#tableScheduling .ts-icon-several { box-shadow:4px -4px 0 -1px rgba(92,107,79,.1); }
#tableScheduling .ts-frequency { margin-bottom:1rem; }
#tableScheduling .ts-frequency legend { font-size:1.2rem; }
#tableScheduling .ts-patterns { display:flex; flex-wrap:wrap; gap:.6rem; }
#tableScheduling .ts-patterns label { position:relative; cursor:pointer; }
#tableScheduling .ts-patterns input { position:absolute; opacity:0; width:1px; height:1px; }
#tableScheduling .ts-patterns span { display:block; border:1px solid var(--warm-beige); border-radius:28px; padding:.7rem 1.1rem; font-size:.92rem; transition:background-color .18s,border-color .18s; }
#tableScheduling .ts-patterns input:checked + span { border-color:var(--olive); background:rgba(92,107,79,.12); }
#tableScheduling .ts-patterns input:focus-visible + span { outline:3px solid rgba(92,107,79,.3); outline-offset:3px; }
#tableScheduling .ts-repeat-fields { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-top:1.1rem; }
#tableScheduling .ts-repeat-fields .mao-field { margin-bottom:.2rem; }
#tableScheduling .ts-hint { color:var(--text-secondary); font-size:.86rem; line-height:1.6; margin:.6rem 0 1rem; }
#tableScheduling .ts-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.05fr); gap:1rem; margin-top:1.25rem; align-items:start; }
#tableScheduling .ts-calendar, #tableScheduling .ts-chosen { border:1px solid var(--warm-beige); border-radius:10px; padding:1.1rem; min-width:0; }
#tableScheduling .ts-month-nav { display:flex; align-items:center; justify-content:space-between; gap:.3rem; margin-bottom:1rem; }
#tableScheduling h3 { font:700 1.2rem var(--font-heading); margin:0; }
#tableScheduling .ts-month-nav button { border:0; background:transparent; width:40px; height:40px; font-size:1.8rem; line-height:1; border-radius:50%; }
#tableScheduling .ts-weekdays, #tableScheduling .ts-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); text-align:center; gap:3px; }
#tableScheduling .ts-weekdays { color:var(--text-secondary); font-size:.8rem; margin:0 0 .6rem; }
#tableScheduling .ts-days button { border:0; background:transparent; padding:0; width:100%; aspect-ratio:1; min-height:36px; border-radius:50%; font-size:.9rem; }
#tableScheduling .ts-days button[aria-pressed="true"] { background:#dbe1cd; color:var(--olive-dark); font-weight:700; }
#tableScheduling .ts-days button[aria-current="date"] { text-decoration:underline; text-underline-offset:4px; }
#tableScheduling .ts-days button:not(:disabled):hover { box-shadow:inset 0 0 0 1px var(--olive); }
#tableScheduling .ts-list-heading { display:flex; align-items:center; justify-content:space-between; gap:.5rem; min-height:40px; margin-bottom:.75rem; }
#tableScheduling .ts-text-button { border:0; background:transparent; text-decoration:underline; text-underline-offset:3px; color:var(--olive-dark); padding:.4rem .15rem; font-size:.86rem; }
#tableScheduling ul { list-style:none; margin:0; padding:0; }
#tableScheduling li { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:.7rem; border:1px solid var(--warm-beige); border-radius:8px; padding:.85rem .65rem; margin-bottom:.55rem; }
#tableScheduling .ts-date-stamp { display:flex; flex-direction:column; align-items:center; padding-right:.6rem; border-right:1px solid var(--warm-beige); color:var(--olive-dark); font: .85rem var(--font-heading); }
#tableScheduling .ts-date-stamp strong { font-size:1.6rem; font-weight:500; line-height:1.25; }
#tableScheduling .ts-date-detail { display:flex; flex-direction:column; gap:.3rem; font-size:.85rem; line-height:1.4; min-width:0; }
#tableScheduling .ts-date-detail strong { font-weight:500; }
#tableScheduling .ts-date-detail > span { color:var(--text-secondary); }
#tableScheduling .ts-date-actions { display:flex; flex-direction:column; gap:.25rem; }
#tableScheduling .ts-date-actions button { background:transparent; border:0; padding:.3rem; min-height:32px; min-width:48px; font-size:.76rem; text-decoration:underline; text-underline-offset:3px; color:var(--olive-dark); }
#tableScheduling #tsEditor { border-top:1px solid var(--warm-beige); margin-top:1rem; padding-top:1rem; }
#tableScheduling .ts-edit-actions { display:flex; align-items:center; gap:1rem; }
#tableScheduling #tsUpdate { background:var(--olive); color:#fff; border:0; border-radius:8px; padding:.65rem .9rem; font-size:.85rem; }
#tableScheduling #tsFeedback:empty { display:none; }
@media(max-width:700px) {
  #tableScheduling .ts-workspace { grid-template-columns:1fr; }
  #tableScheduling .ts-mode-body { gap:.6rem; padding:1rem 2rem 1rem .8rem; align-items:flex-start; min-height:152px; }
  #tableScheduling .ts-icon { display:none; }
  #tableScheduling .ts-mode input { right:.7rem; top:1.05rem; width:17px; height:17px; }
  #tableScheduling .ts-mode strong { font-size:1.1rem; }
  #tableScheduling .ts-mode-body > span:last-child > span { font-size:.86rem; }
  #tableScheduling .ts-modes { gap:.6rem; }
  #tableScheduling legend { font-size:1.3rem; }
  #tableScheduling .ts-calendar, #tableScheduling .ts-chosen { padding:.9rem; }
}
@media(prefers-reduced-motion:reduce) { #tableScheduling * { transition:none!important; } }
