/* To-do app + the shared "Schedule activity" component (classes act-*). Tokens from admin.css only, logical properties, light + dark through the tokens, phone first (44px targets). */

/* ------------------------------------------------------------ shared: chips, avatars, round tick */
.act-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--info-soft); color: var(--info-ink); max-width: 100%; }
.act-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.act-chip.tone-warn { background: var(--warn-soft); color: var(--warn-ink); }
.act-chip.tone-danger { background: var(--danger-soft); color: var(--danger-ink); }
.act-chip.tone-neutral { background: var(--panel-3); color: var(--muted); }
a.act-link { text-decoration: none; }
a.act-link:hover { text-decoration: underline; }
.act-avs { display: inline-flex; align-items: center; gap: 2px; }
.act-av { width: 24px; height: 24px; font-size: 10px; }
.act-check { position: relative; flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 2px solid var(--muted); border-radius: 50%; background: var(--panel); color: transparent; transition: background .15s, border-color .15s, color .15s; }
.act-check::after { content: ""; position: absolute; inset: -10px; }   /* 44px touch target around the 24px circle */
.act-check:hover:not(:disabled) { border-color: var(--ok); }
.act-check.on { background: var(--ok); border-color: var(--ok); color: var(--accent-on); }
.act-check:disabled { opacity: .45; cursor: not-allowed; }
.act-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.act-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.act-by { overflow-wrap: anywhere; }
.act-form { display: grid; gap: 12px; }
.act-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act-undo { margin-inline-start: auto; min-height: 36px; padding: 0 12px; border: 1px solid currentColor; border-radius: var(--r-sm); background: transparent; color: inherit; font-weight: 700; }
.toast .act-undo:hover { background: color-mix(in srgb, currentColor 18%, transparent); }

/* ------------------------------------------------------------ To-do screen */
.act-page { display: grid; gap: 12px; align-content: start; }
.act-add { display: grid; gap: 10px; padding: 12px 14px; }
.act-add-row { display: flex; gap: 8px; align-items: center; }
.act-add-input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); font-size: 15px; outline: 0; }
.act-add-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.act-add-row .btn { min-height: 44px; }
.act-due-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.act-pick { min-height: 44px; padding-inline: 12px; cursor: pointer; position: relative; }
.act-pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-d); }
.act-pick-date input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.act-clear { width: 36px; height: 36px; }
.act-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.act-bar .search-box { flex: 1 1 200px; max-width: 360px; }
.act-bar .seg { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.act-count { font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: var(--panel-3); color: var(--muted); }
.seg.on .act-count { background: color-mix(in srgb, currentColor 22%, transparent); color: inherit; }
.act-sections { display: grid; gap: 14px; }
.act-section h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 6px; color: var(--muted); }
.act-section.tone-danger h3 { color: var(--danger-ink); }
.act-section.tone-warn h3 { color: var(--warn-ink); }
.act-todos, .act-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.act-todo { display: flex; align-items: flex-start; gap: 14px; padding: 10px 14px; min-height: 52px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); }
.act-todo.is-overdue { box-shadow: inset 3px 0 0 var(--danger); }
[dir="rtl"] .act-todo.is-overdue { box-shadow: inset -3px 0 0 var(--danger); }
.act-todo .act-check { margin-block-start: 2px; }
.act-name-btn { display: block; max-width: 100%; min-height: 28px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 650; text-align: start; overflow-wrap: anywhere; cursor: pointer; }
.act-name-btn:hover { text-decoration: underline; }
.act-todo.is-done .act-name-btn, .act-item.is-done .act-name { text-decoration: line-through; color: var(--muted); }
.act-todo.is-done { background: var(--panel-2); }

/* ------------------------------------------------------------ Activities card (record pages) */
.act-card { display: grid; gap: 10px; }
.act-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.act-head h3 { font-size: 15.5px; }
.act-schedule { min-height: 44px; }
.act-item { display: flex; align-items: flex-start; gap: 12px; padding: 8px 2px; border-block-end: 1px solid var(--line-2); }
.act-item:last-child { border-block-end: 0; }
.act-item .act-check { margin-block-start: 3px; }
.act-name { overflow-wrap: anywhere; font-weight: 650; }
.act-item.is-overdue .act-name { color: var(--danger-ink); }
.act-done > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); font-weight: 650; }
.act-empty { padding-block: 4px; }
.act-error { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

@media (max-width: 480px) {
  .act-two { grid-template-columns: 1fr; }
  .act-bar .search-box { max-width: none; }
}
