/* Wah-Kit Tick sheets (owner page). Shares the panel, buttons and form styles in meds.css. */
.ts-bar { display: flex; align-items: center; gap: 10px; }
.ts-bar h2 { flex: 1; margin: 0; font: 800 21px var(--font-display); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-people { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-pchip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 600 14px var(--font-body); color: var(--ink); cursor: pointer; }
.ts-pchip i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; color: #fff; display: grid; place-items: center; font: 800 12px var(--font-body); }
.ts-pchip small { font-size: 12px; }
.ts-pchip.add { padding: 4px 14px; border-style: dashed; color: var(--ink-soft); }
.ts-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.ts-tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: none; font: 700 15px var(--font-body); color: var(--ink-soft); cursor: pointer; }
.ts-tabs button.on { background: var(--ink); color: #fff; }

.ts-list { display: flex; flex-direction: column; gap: 10px; }
.ts-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.ts-card:hover { border-color: var(--ink-soft); }
.ts-card > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ts-card b { font-size: 17px; } .ts-card small { color: var(--ink-soft); font-size: 14px; }
.ts-em { font-size: 30px; }
.ts-ring { min-width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--font-body); background: #FEF3C7; color: #92400E; }
.ts-ring.all { background: #DCFCE7; color: #15803D; font-size: 20px; }
.ts-h { margin: 8px 0 0; font: 800 18px var(--font-display); }
.ts-tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ts-tcard { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.ts-tcard:hover { border-color: var(--ink); }
.ts-tcard span { font-size: 26px; } .ts-tcard b { font-size: 15.5px; } .ts-tcard small { color: var(--ink-soft); font-size: 13px; }
.ts-wk { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-wk button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: 600 14px var(--font-body); color: var(--ink); cursor: pointer; }
.ts-wk button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ts-two { display: grid; grid-template-columns: 90px 1fr; gap: 10px; }

/* today */
.ts-dayh { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.ts-dayh > b { font: 800 17px var(--font-display); }
.ts-today { display: flex; flex-direction: column; gap: 8px; }
.ts-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); }
.ts-row.done { border-left-color: #15803D; background: #F3FBF5; }
.ts-row.na { border-left-color: #94A3B8; opacity: .8; }
.ts-row.late { border-left-color: #DC2626; }
.ts-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ts-tx b { font-size: 16.5px; } .ts-tx small { color: var(--ink-soft); font-size: 13.5px; }
.ts-row.done .ts-tx b { text-decoration: line-through; text-decoration-color: #15803D88; }
.ts-st { font-weight: 700; color: #15803D !important; }
.ts-row.na .ts-st { color: var(--ink-soft) !important; }
.ts-st.late { color: #B91C1C !important; }

/* the month grid */
.ts-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14.5px; font-weight: 700; }
.ts-sum .done { color: #15803D; } .ts-sum .miss { color: #B91C1C; }
.ts-sum .btn { margin-left: auto; }
.ts-gwrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.ts-grid { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.ts-grid th, .ts-grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; min-width: 30px; height: 34px; padding: 0; }
.ts-grid thead th { font-weight: 700; color: var(--ink-soft); line-height: 1.1; padding: 4px 0; background: var(--surface); }
.ts-grid thead th small { display: block; font-size: 10px; font-weight: 600; }
.ts-grid thead th.wk { background: #F1F5F9; }
.ts-grid thead th.tdy { background: var(--ink); color: #fff; }
.ts-grid .ts-tn { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 4px 10px; min-width: 150px; max-width: 190px; box-shadow: 2px 0 0 var(--line); }
.ts-grid .ts-tn b { display: block; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-grid .ts-tn small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-grid td { font-weight: 800; font-size: 10.5px; }
.ts-grid td[tabindex] { cursor: pointer; }
.ts-grid td.off { background: repeating-linear-gradient(135deg, #F8FAFC 0 4px, #EEF2F6 4px 8px); }
.ts-grid td.done { background: color-mix(in srgb, var(--mc, #15803D) 18%, #fff); color: var(--mc, #15803D); }
.ts-grid td.na { color: var(--muted); background: #F8FAFC; }
.ts-grid td.miss { background: #FEE2E2; }
.ts-grid td.miss::after { content: "✕"; color: #DC2626; font-size: 11px; }
.ts-grid td.due { box-shadow: inset 0 0 0 2px var(--ink); }
.ts-grid td.later { background: #fff; }
.ts-key span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.ts-key { flex-wrap: wrap; }
.ts-key .k-done::before { background: #BBF7D0; } .ts-key .k-miss::before { background: #FECACA; } .ts-key .k-due::before { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.ts-key .k-na::before { background: #E2E8F0; } .ts-key .k-off::before { background: repeating-linear-gradient(135deg, #F8FAFC 0 2px, #E2E8F0 2px 4px); }

/* tasks */
.ts-tlist { display: flex; flex-direction: column; gap: 8px; }
.ts-trow { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ts-arrows { display: flex; flex-direction: column; }
.ts-arrows button { width: 36px; height: 26px; border: 0; background: none; color: var(--ink-soft); cursor: pointer; font-size: 12px; }
.ts-arrows button[disabled] { opacity: .25; cursor: default; }
.ts-tbtn { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: none; padding: 6px 0; font: inherit; color: var(--ink); cursor: pointer; min-width: 0; }
.ts-tbtn b { font-size: 16px; } .ts-tbtn small { color: var(--ink-soft); font-size: 13.5px; }

@media (max-width: 640px) {
  .ts-row { flex-wrap: wrap; }
  .ts-row .md-acts { width: 100%; justify-content: flex-end; }
  .ts-row .md-tick { flex-direction: row; gap: 6px; min-height: 48px; flex: 1; }
  .ts-tpl { grid-template-columns: 1fr 1fr; }
  .ts-sum .btn { margin-left: 0; }
  .ts-grid .ts-tn { min-width: 118px; max-width: 130px; }
}
#sheets.md { max-width: 1040px; }
