/* Task board (PRD_Task_Board_View). Erin's direction (Oct 26 2026): each column has a light tint of its
   color and a solid header pill; white cards with outlined pills for date and priority. */

.tb {
    --tb-ink: var(--grey-900, #09113B);
    --tb-muted: var(--n-500, #71717a);
    --tb-line: var(--n-200, #e4e4e7);
    --tb-lane: var(--n-50, #fafafa);
    --tb-overdue: #B42318;
    --tb-col-w: 296px;
    font-family: var(--font-body, 'Manrope', sans-serif);
    color: var(--tb-ink);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.tb-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Toolbar */
.tb-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-toolbar .tb-spacer { flex: 1; }
.tb-label { font-size: 12px; color: var(--tb-muted); font-weight: 500; }
.tb-select { height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--tb-line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--tb-ink); appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center; }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--tb-line); background: #fff; color: var(--tb-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tb-btn:hover { background: var(--tb-lane); }
.tb-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tb-btn--primary { background: var(--tb-ink); border-color: var(--tb-ink); color: #fff; }
.tb-btn--primary:hover { background: #1b2350; }
.tb-btn--quiet { border-color: transparent; background: transparent; color: var(--tb-muted); }
.tb-btn--quiet:hover { color: var(--tb-ink); background: var(--n-100); }
.tb-btn--danger { background: #B42318; border-color: #B42318; color: #fff; }
.tb :focus-visible, .tb-sheet :focus-visible, .tb-dialog :focus-visible { outline: 2px solid var(--tb-ink); outline-offset: 2px; }
.tb-btn--primary:focus-visible { outline-color: #9aa3c7; }

/* Board scroller with edge shadows (shadows appear only when there is more to scroll). */
.tb-scroller {
    display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; overflow-y: visible; padding: 2px 2px 12px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    background:
        linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 32px 100% no-repeat local,
        linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right center / 32px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(9,17,59,0.10), rgba(9,17,59,0)) left center / 12px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(9,17,59,0.10), rgba(9,17,59,0)) right center / 12px 100% no-repeat scroll;
}
.tb-scroller .tb-columns { display: flex; align-items: flex-start; gap: 12px; }
.tb-scroller .tb-columns > .edd-item { flex: 0 0 auto; }

/* Column: a light tint of the column color, a solid header pill in the deeper shade. */
.tb-col { --col-dot: #8B8B95; --col-strong: #696975; --col-tint: #F1F1F2;
    flex: 0 0 var(--tb-col-w); width: var(--tb-col-w); display: flex; flex-direction: column;
    background: linear-gradient(180deg, var(--col-tint) 0%, var(--col-tint) 60%, color-mix(in srgb, var(--col-tint) 55%, #fff) 100%);
    border: 1px solid transparent; border-radius: 16px; scroll-snap-align: start; max-height: calc(100vh - 240px); }
.tb-col--target { border-color: var(--col-strong); }
.tb-col-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 7px; padding: 10px 8px 8px 10px; background: var(--col-tint); border-radius: 16px 16px 0 0; }
.tb-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.tb-pill-head { margin: 0; display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: calc(100% - 110px); height: 28px; padding: 0 10px; border-radius: 9px; background: var(--col-strong); color: #fff;
    font-family: var(--font-display, 'Clash Grotesk', sans-serif); font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; }
.tb-pill-head svg { flex: 0 0 auto; }
.tb-pill-avatar { flex: 0 0 auto; width: 20px; height: 20px; margin-left: -4px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,0.25);
    display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-body, 'Manrope', sans-serif); font-size: 9px; font-weight: 700; }
.tb-pill-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tb-pill-head-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-count { font-size: 12.5px; font-weight: 600; color: var(--n-500, #71717a); font-variant-numeric: tabular-nums; }
.tb-col-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.tb-icon-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 8px; background: transparent; color: var(--n-500, #71717a); cursor: pointer; }
.tb-icon-btn:hover { background: rgba(9,17,59,0.06); color: var(--tb-ink); }
.tb-col-grip { cursor: grab; margin-right: -4px; }
.tb-custom { display: flex; align-items: center; gap: 6px; padding: 0 12px 8px; font-size: 11px; color: var(--n-600, #52525b); }
.tb-link { border: none; background: none; padding: 0; color: var(--tb-ink); font: inherit; font-size: 11px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.tb-col-body { padding: 0 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 48px; }
.tb-col-body .edd-list { display: flex; flex-direction: column; gap: 10px; min-height: 44px; }
.tb-empty-col { padding: 16px 10px; border: 1px dashed color-mix(in srgb, var(--col-dot) 45%, transparent); border-radius: 12px; text-align: center; font-size: 12px; color: var(--n-600, #52525b); }

/* Card */
.tb-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 10px; background: #fff; border: 1px solid rgba(9,17,59,0.08); border-radius: 14px;
    box-shadow: 0 1px 2px rgba(9,17,59,0.04); cursor: pointer; transition: border-color 150ms ease, box-shadow 150ms ease, transform 180ms cubic-bezier(0.2, 0, 0, 1); outline: none; }
.tb-card:hover { border-color: rgba(9,17,59,0.16); box-shadow: 0 2px 8px rgba(9,17,59,0.06); }
.tb-card:focus-visible { outline: 2px solid var(--tb-ink); outline-offset: 2px; }
.tb-card--picked { border-color: var(--tb-ink); box-shadow: 0 0 0 2px rgba(9,17,59,0.12); }
.tb-card--done { background: #EEF8F2; border-color: #CFE8D9; box-shadow: none; }
.tb-card--done:hover { border-color: #A9D6BC; }
.tb-card--done .tb-card-title { color: #2F7A52; text-decoration: line-through; text-decoration-color: #3E9D69; text-decoration-thickness: 1.5px; }
.tb-card--done .tb-pill { background: transparent; border-color: #CFE8D9; color: #2F7A52; }
.tb-card-top { display: flex; align-items: flex-start; gap: 6px; }
.tb-card-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 19px; color: var(--tb-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.tb-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tb-card-also { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11.5px; line-height: 16px; color: var(--n-500, #71717a); min-width: 0; }
.tb-card-also i { flex: 0 0 auto; font-size: 13px; line-height: 1; }
.tb-card-also span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 7px; border: 1px solid var(--tb-line); border-radius: 7px; background: #fff;
    font-size: 11.5px; font-weight: 600; color: var(--n-700, #3f3f46); white-space: nowrap; font-variant-numeric: tabular-nums; max-width: 100%; }
.tb-pill svg { flex: 0 0 auto; color: var(--n-500, #71717a); }
.tb-pill--overdue { color: var(--tb-overdue); border-color: #F5C8C2; }
.tb-pill--overdue svg { color: var(--tb-overdue); }
.tb-pill--risk { color: #CA2849; border-color: #F3C6CF; }
.tb-pill--tag { min-width: 0; }
.tb-pill i { display: block; font-size: 13px; line-height: 1; flex: 0 0 auto; }
.tb-pill-text { overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.tb-avatars { display: flex; align-items: center; margin-right: 2px; }
.tb-avatar { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; background: var(--n-200); color: var(--n-700); font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.tb-avatar:first-child { margin-left: 0; }
.tb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tb-card-menu-btn { margin: -4px -6px 0 0; flex: 0 0 auto; }

/* Menus and popovers (glass only on floating surfaces) */
.tb-menu { position: absolute; z-index: 40; min-width: 200px; max-width: 260px; padding: 6px; background: rgba(255,255,255,0.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--tb-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(9,17,59,0.14); }
.tb-menu--right { right: 6px; top: 34px; }
.tb-menu-label { padding: 6px 8px 4px; font-size: 11px; font-weight: 600; color: var(--tb-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tb-menu-item { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 8px; border: none; border-radius: 8px; background: transparent; color: var(--tb-ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.tb-menu-item:hover, .tb-menu-item:focus-visible { background: var(--n-100); }
.tb-menu-item[aria-checked="true"] { font-weight: 700; }
.tb-menu-item--danger { color: #B42318; }
.tb-menu-sep { height: 1px; margin: 4px 2px; background: var(--tb-line); }
.tb-menu-scroll { max-height: 240px; overflow-y: auto; }
.tb-menu--wide { width: 284px; max-width: 284px; }
.tb-icons { display: grid; grid-template-columns: repeat(8, 30px); gap: 2px; padding: 4px 6px 8px; max-height: 172px; overflow-y: auto; }
.tb-icon-choice { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 8px; background: transparent; color: var(--n-600, #52525b); font-size: 16px; cursor: pointer; }
.tb-icon-choice:hover { background: var(--n-100); color: var(--tb-ink); }
.tb-icon-choice[aria-checked="true"] { background: var(--tb-ink); color: #fff; }
.tb-pill-head i { font-size: 14px; line-height: 1; font-weight: normal; }
.tb-swatches { display: grid; grid-template-columns: repeat(5, 28px); gap: 8px; padding: 6px 8px 8px; }
.tb-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--tb-line); cursor: pointer; }
.tb-swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--tb-ink); }

/* Inline inputs */
.tb-input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--n-300); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--tb-ink); }
.tb-input:focus { outline: none; border-color: var(--tb-ink); box-shadow: 0 0 0 3px rgba(9,17,59,0.08); }
.tb-error { font-size: 12px; color: #B42318; }
.tb-quick { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: #fff; border: 1px solid rgba(9,17,59,0.08); border-radius: 14px; }
.tb-quick-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--tb-muted); }
.tb-add { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 8px; border: none; border-radius: 10px; background: transparent; color: var(--col-strong, var(--tb-muted)); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.tb-add:hover { background: rgba(255,255,255,0.6); }
.tb-ghost-col .tb-add { color: var(--n-600, #52525b); }
.tb-done-toggle { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px; border: none; background: none; color: var(--col-strong, var(--tb-muted)); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; border-top: 1px solid rgba(9,17,59,0.06); margin-top: 2px; }

/* Ghost "+ Add column" */
.tb-ghost-col { flex: 0 0 220px; min-height: 96px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 12px; border: 1px dashed var(--n-300); border-radius: 16px; color: var(--tb-muted); }

/* States */
.tb-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 48px 16px; border: 1px dashed var(--n-300); border-radius: 12px; }
.tb-state h3 { font-family: var(--font-display, 'Clash Grotesk', sans-serif); font-size: 20px; font-weight: 600; margin: 0; }
.tb-state p { margin: 0; max-width: 420px; font-size: 13px; color: var(--tb-muted); line-height: 20px; }
.tb-state-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tb-skeleton { flex: 0 0 var(--tb-col-w); height: 280px; border-radius: 12px; background: linear-gradient(90deg, var(--n-50) 0%, var(--n-100) 50%, var(--n-50) 100%); background-size: 200% 100%; animation: tb-shimmer 1.4s ease-in-out infinite; }
@keyframes tb-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.tb-hint { position: sticky; bottom: 8px; align-self: center; z-index: 30; padding: 8px 14px; border-radius: 999px; background: var(--tb-ink); color: #fff; font-size: 12px; font-weight: 600; }

/* View switcher (segmented) */
.tb-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--n-100); border-radius: 10px; }
.tb-seg button { height: 28px; padding: 0 12px; border: none; border-radius: 8px; background: transparent; color: var(--tb-muted, #71717a); font-family: var(--font-body, 'Manrope', sans-serif); font-size: 13px; font-weight: 600; cursor: pointer; }
.tb-seg button[aria-pressed="true"] { background: #fff; color: var(--grey-900, #09113B); box-shadow: 0 0 0 1px var(--n-200, #e4e4e7); }
.tb-seg button:focus-visible { outline: 2px solid var(--grey-900, #09113B); outline-offset: 1px; }

/* Dialog + sheet */
.tb-dialog { display: flex; flex-direction: column; gap: 14px; font-family: var(--font-body, 'Manrope', sans-serif); color: var(--grey-900, #09113B); }
.tb-dialog h3 { margin: 0; font-family: var(--font-display, 'Clash Grotesk', sans-serif); font-size: 20px; font-weight: 600; }
.tb-dialog p { margin: 0; font-size: 13px; line-height: 20px; color: var(--n-500, #71717a); }
.tb-radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--n-200, #e4e4e7); border-radius: 10px; font-size: 13px; cursor: pointer; }
.tb-radio input { margin-top: 3px; accent-color: var(--grey-900, #09113B); }
.tb-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tb-suggest { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.tb-suggest-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--n-200, #e4e4e7); border-radius: 10px; }
.tb-suggest-head { display: flex; align-items: center; gap: 10px; }
.tb-suggest-head input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--grey-900, #09113B); }
.tb-suggest ul { margin: 0; padding-left: 28px; font-size: 12px; color: var(--n-600, #52525b); line-height: 18px; }

/* Bottom sheet (phones) / centered panel (768 px and up). Glass only on this floating surface. */
.tb-sheet-root { position: fixed; inset: 0; z-index: 1200; font-family: var(--font-body, 'Manrope', sans-serif); color: var(--grey-900, #09113B); }
.tb-sheet-backdrop { position: absolute; inset: 0; background: rgba(9, 17, 59, 0.32); animation: tb-fade 160ms ease-out; }
.tb-sheet { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, 92vw); max-height: 80vh; overflow-y: auto; overscroll-behavior: contain;
    background: rgba(255, 255, 255, 0.97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--n-200, #e4e4e7); border-radius: 16px;
    box-shadow: 0 24px 60px rgba(9, 17, 59, 0.18); padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.tb-sheet-grabber { display: none; width: 36px; height: 4px; border-radius: 4px; background: var(--n-300, #d4d4d8); margin: 4px auto 2px; }
.tb-sheet-head { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.tb-sheet-head h3 { margin: 0; flex: 1; min-width: 0; font-family: var(--font-display, 'Clash Grotesk', sans-serif); font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-sheet-body { display: flex; flex-direction: column; gap: 4px; }
.tb-sheet-note { margin: 0 0 4px; font-size: 12.5px; line-height: 18px; color: var(--n-500, #71717a); }
.tb-menu-date { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
@keyframes tb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tb-rise { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }

/* Manage columns */
.tb-manage-list { display: flex; flex-direction: column; gap: 6px; }
.tb-manage-row { display: flex; flex-direction: column; gap: 8px; padding: 6px 6px 6px 4px; background: #fff; border: 1px solid var(--n-200, #e4e4e7); border-radius: 12px; }
.tb-manage-main { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tb-manage-badge { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: var(--col-strong); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; margin: 0 4px; }
.tb-manage-badge i { display: block; line-height: 1; }
.tb-manage-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-manage-grip { cursor: grab; }
.tb-manage-edit { display: flex; flex-direction: column; gap: 8px; padding: 4px 6px 6px 8px; border-top: 1px solid var(--n-100, #f4f4f5); }
.tb-manage-add { display: flex; gap: 8px; margin-top: 6px; }
.tb-icons--sheet { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); max-height: none; padding: 0; }

.tb-scroller { position: relative; }
.tb-mobile-only { display: none; }
.tb-show-narrow { display: none; }

/* Tablet: about 2.3 columns visible, snap per column. */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .tb { --tb-col-w: calc((100vw - 96px) / 2.3); }
    .tb-scroller { scroll-snap-type: x mandatory; }
}

/* Phones: one column at a time. Chips and swiping switch columns; "Move to" is a bottom sheet. */
@media (max-width: 767.98px) {
    .tb-mobile-only { display: block; }
    .tb-hide-narrow { display: none; }
    .tb-show-narrow { display: inline; }
    .tb-sheet-root.tb-mobile-only { display: block; }

    .tb-scroller { container-type: inline-size; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; gap: 12px; padding: 2px 0 12px; background: none; }
    .tb { --tb-col-w: 100cqw; }
    .tb-col { max-height: none; scroll-snap-align: center; scroll-snap-stop: always; }
    .tb-col-body { overflow: visible; }
    .tb-ghost-col, .tb-col-grip { display: none; }
    .tb-card { min-height: 64px; }
    .tb-card .tb-menu { display: none; }
    .tb-card-menu-btn { width: 44px; height: 44px; margin: -10px -10px -6px 0; }
    .tb-tap { min-width: 44px; min-height: 44px; }
    .tb-icon-btn.tb-tap { width: 44px; height: 44px; }
    .tb-tap-input { height: 44px; font-size: 16px; }
    .tb-tap-swatch { width: 36px; height: 36px; }
    .tb-col-tools .tb-icon-btn { width: 40px; height: 40px; }
    .tb-add { min-height: 44px; }
    .tb-menu-item.tb-tap { min-height: 48px; }

    .tb-chipbar { position: sticky; top: 0; z-index: 5; margin: 0 -2px; padding: 4px 2px; background: #fff; }
    /* Always pinned just above the bottom tab bar (64 px + safe area), whatever is scrolling. */
    .tb-quickbar { position: fixed; left: 16px; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 29; }
    .tb-quickbar .tb-btn { height: 48px; border-radius: 14px; box-shadow: 0 8px 24px rgba(9, 17, 59, 0.22); }
    /* Room under the last card so the pinned button never covers it. */
    .tb { padding-bottom: 72px; }

    .tb-sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 85vh; border-radius: 18px 18px 0 0;
        padding: 6px 16px calc(16px + env(safe-area-inset-bottom, 0px)); animation: tb-rise 180ms cubic-bezier(0.2, 0, 0, 1); }
    .tb-sheet-grabber { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    .tb-card, .tb-skeleton, .tb-sheet, .tb-sheet-backdrop { transition: none; animation: none; }
}

/* ============================================
   Add / Edit task form (AddTaskComponent), in the board's look:
   left-aligned header, chips for status and priority, soft inputs, pinned footer.
   ============================================ */
.tf { display: flex; flex-direction: column; gap: 18px; font-family: var(--font-body, 'Manrope', sans-serif); color: var(--grey-900, #09113B); }
.tf-head { display: flex; align-items: center; gap: 12px; }
.tf-badge { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: var(--grey-900, #09113B); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.tf-badge i { display: block; line-height: 1; }
.tf-head-text { min-width: 0; }
.tf-title { margin: 0; font-family: var(--font-display, 'Clash Grotesk', sans-serif); font-size: 21px; font-weight: 600; letter-spacing: 0.005em; line-height: 26px; }
.tf-sub { margin: 2px 0 0; font-size: 13px; line-height: 19px; color: var(--n-500, #71717a); }
.tf-body { display: flex; flex-direction: column; gap: 16px; }
.tf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tf-label { font-size: 12.5px; font-weight: 600; color: var(--n-700, #3f3f46); }
.tf-hint { margin: 0; font-size: 12px; line-height: 17px; color: var(--n-500, #71717a); }
.tf-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--n-700, #3f3f46); cursor: pointer; width: fit-content; }
.tf-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--grey-900, #09113B); cursor: pointer; }

.tf-input { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--n-200, #e4e4e7); border-radius: 10px; background: #fff;
    font: inherit; font-size: 14px; color: var(--grey-900, #09113B); transition: border-color 120ms ease, box-shadow 120ms ease; }
.tf-input::placeholder { color: var(--n-400, #a1a1aa); }
.tf-input:hover { border-color: var(--n-300, #d4d4d8); }
.tf-input:focus, .tf-input:focus-visible { outline: none !important; border-color: var(--grey-900, #09113B); box-shadow: 0 0 0 3px rgba(9, 17, 59, 0.08); }
.tf-input--title { min-height: 46px; font-size: 16px; font-weight: 600; }
.tf-textarea { min-height: 96px; padding: 10px 12px; line-height: 20px; resize: vertical; }
.tf-input.invalid { border-color: #B42318; }
.tf-error, .tf .validation-message { font-size: 12px; color: #B42318; }
.tf-error--block { padding: 8px 12px; border-radius: 10px; background: #FEF3F2; }

.tf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 1px solid var(--n-200, #e4e4e7); border-radius: 999px; background: #fff;
    color: var(--n-700, #3f3f46); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 120ms ease, border-color 120ms ease, color 120ms ease; }
.tf-chip:hover:not(:disabled) { border-color: var(--n-300, #d4d4d8); background: var(--n-50, #fafafa); }
.tf-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.tf-chip:focus-visible { outline: 2px solid var(--grey-900, #09113B); outline-offset: 2px; }
.tf-chip--on { background: var(--grey-900, #09113B); border-color: var(--grey-900, #09113B); color: #fff; }
.tf-chip--on:hover:not(:disabled) { background: #1b2350; border-color: #1b2350; }
.tf-chip--danger { background: #B42318; border-color: #B42318; color: #fff; }
.tf-chip i { font-size: 14px; line-height: 1; }
.tf-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.tf-chip--on .tf-dot { box-shadow: 0 0 0 1.5px #fff; }
.tf-chip--person { padding-left: 4px; }
.tf-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--n-100, #f4f4f5);
    color: var(--n-700, #3f3f46); font-size: 10px; font-weight: 700; flex: 0 0 auto; }
.tf-avatar img { width: 100%; height: 100%; object-fit: cover; }

.tf-callout { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid #F3D9B8; border-radius: 12px; background: #FFF8EF; }
.tf-callout-icon { font-size: 18px; line-height: 1; color: #B76E00; margin-top: 2px; }
.tf-callout-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tf-callout-title { margin: 0; font-size: 13.5px; font-weight: 700; }

.tf-foot { position: sticky; bottom: -1px; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; margin: 0 -4px -4px; padding: 12px 4px 4px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 28%); }
.tf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
    font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.tf-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tf-btn--primary { background: var(--grey-900, #09113B); color: #fff; }
.tf-btn--primary:hover:not(:disabled) { background: #1b2350; }
.tf-btn--quiet { background: #fff; border-color: var(--n-200, #e4e4e7); color: var(--n-700, #3f3f46); }
.tf-btn--quiet:hover { background: var(--n-50, #fafafa); }
.tf-btn:focus-visible { outline: 2px solid var(--grey-900, #09113B); outline-offset: 2px; }

@media (max-width: 559.98px) {
    .tf-grid { grid-template-columns: 1fr; }
    .tf-foot .tf-btn { flex: 1; min-height: 46px; }
    .tf-input { min-height: 44px; font-size: 16px; }
}

/* ── Task files (TaskAttachmentsPanel), in the task form and the overview task modal ── */
.tfa { display: flex; flex-direction: column; gap: 8px; font-family: var(--font-body, 'Manrope', sans-serif); color: var(--grey-900, #09113B); }
.tfa-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tfa-label { font-size: 12.5px; font-weight: 600; color: var(--n-700, #3f3f46); }
.tfa-count { font-size: 12px; color: var(--n-500, #71717a); }
.tfa-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tfa-item { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 6px 6px 12px; border: 1px solid var(--n-200, #e4e4e7); border-radius: 10px; background: #fff; }
.tfa-icon { flex: 0 0 auto; font-size: 20px; line-height: 1; color: var(--n-500, #71717a); }
.tfa-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tfa-name { font-size: 13.5px; font-weight: 600; color: var(--grey-900, #09113B); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
a.tfa-name:hover { text-decoration: underline; }
.tfa-size { font-size: 12px; color: var(--n-500, #71717a); }
.tfa-icon-btn { flex: 0 0 auto; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent;
    color: var(--n-600, #52525b); font-size: 17px; cursor: pointer; text-decoration: none; }
.tfa-icon-btn:hover:not(:disabled) { background: var(--n-100, #f4f4f5); color: var(--grey-900, #09113B); }
.tfa-icon-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tfa-icon-btn:focus-visible { outline: 2px solid var(--grey-900, #09113B); outline-offset: 1px; }
.tfa-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 12px; border: 1.5px dashed var(--n-300, #d4d4d8); border-radius: 12px;
    background: var(--n-50, #fafafa); text-align: center; transition: border-color 120ms ease, background 120ms ease; }
.tfa-drop:hover, .tfa-drop:focus-within { border-color: var(--grey-900, #09113B); background: #fff; }
.tfa-drop--busy { opacity: 0.75; }
.tfa-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tfa-input:disabled { cursor: progress; }
.tfa-drop-icon { font-size: 20px; line-height: 1; color: var(--n-500, #71717a); }
.tfa-drop-text { font-size: 13px; font-weight: 600; }
.tfa-hint { margin: 0; font-size: 12px; line-height: 17px; color: var(--n-500, #71717a); }
.tfa-error { margin: 0; font-size: 12px; color: #B42318; }
.tfa-spin { animation: tfa-spin 900ms linear infinite; }
@keyframes tfa-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tfa-spin { animation: none; } }

/* Paperclip count on board cards and List rows */
.tb-clip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--n-500, #71717a); }
.tb-clip i { font-size: 13px; line-height: 1; }

/* Linked tasks: "Waits on" picker, List indent and tags, ready pop-up */
.tpp { display: flex; flex-direction: column; gap: 6px; }
.tpp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tpp-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--n-100, #f4f4f5); color: var(--grey-900, #171412); font-size: 12.5px; font-weight: 500; }
.tpp-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpp-chip-x { width: 24px; height: 24px; border: 0; border-radius: 999px; background: transparent; color: var(--n-500, #71717a); font-size: 16px; line-height: 1; cursor: pointer; }
.tpp-chip-x:hover, .tpp-chip-x:focus-visible { background: var(--n-200, #e4e4e7); color: var(--grey-900, #171412); }
.tpp-hint { margin: 0; font-size: 12px; color: var(--n-500, #71717a); }

.tl-link-indent { display: inline-flex; flex-shrink: 0; align-items: center; color: var(--n-300, #d4d4d8); }
.tl-link-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tl-link-tag--ready { background: #E4F6ED; color: #1F7A52; }
.tl-link-tag--waiting { background: var(--n-100, #f4f4f5); color: var(--n-600, #52525b); }

.tl-ready-toast-start { border: 0; background: var(--grey-900, #171412); color: #fff; }
.tl-ready-toast-later { border: 1.5px solid var(--n-300, #d4d4d8); background: transparent; color: var(--n-700, #3f3f46); }

/* Link icon (replaces the Waiting / Ready pills) and its popup */
.tl-link-icon { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--n-500, #71717a); font-size: 15px; cursor: pointer; }
.tl-link-icon:hover, .tl-link-icon:focus-visible { background: var(--n-100, #f4f4f5); color: var(--grey-900, #171412); }
.tl-link-icon--ready { color: #1F9D6B; }
.tl-link-modal { display: flex; flex-direction: column; gap: 10px; font-family: var(--font-body); }
/* Room on the right for the popup's close button; body font so long titles wrap neatly. */
.tl-link-modal-head { display: flex; align-items: flex-start; gap: 8px; padding-right: 36px; color: var(--grey-900, #171412); }
.tl-link-modal-head i { flex-shrink: 0; margin-top: 2px; font-size: 18px; }
.tl-link-modal-head h2 { margin: 0; font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: 0; overflow-wrap: anywhere; }
.tl-link-modal h3 { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--n-500, #71717a); }
.tl-link-modal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tl-link-modal li button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--n-200, #e4e4e7); border-radius: 8px; background: #fff; text-align: left; cursor: pointer; }
.tl-link-modal li button:hover, .tl-link-modal li button:focus-visible { background: var(--n-50, #fafafa); }
.tl-link-modal-title { flex: 1; min-width: 0; font-size: 14px; color: var(--grey-900, #171412); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-link-modal-meta { flex-shrink: 0; font-size: 12px; color: var(--n-500, #71717a); }
.tl-link-done { color: #1F9D6B; }
.tl-link-modal-ready { margin: 0; padding: 8px 10px; border-radius: 8px; background: #E4F6ED; color: #1F7A52; font-size: 13px; font-weight: 600; }
.tl-link-modal-hint { margin: 0; font-size: 12px; color: var(--n-500, #71717a); }
.tl-link-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tl-link-modal-actions button { min-height: 40px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Priority pill: the word goes on narrower screens; the icon and tooltip still say it. */
@media (max-width: 1439px) {
    .tl-prio-word { display: none; }
    .tl-prio-btn { padding-left: 8px; padding-right: 8px; }
}

/* "Nice work!" prompt after a parent task is completed (centered modal) */
.tl-ready-modal { display: flex; flex-direction: column; gap: 12px; font-family: var(--font-body); }
.tl-ready-modal-head { display: flex; align-items: center; gap: 10px; padding-right: 36px; }
.tl-ready-modal-head h2 { margin: 0; font-family: var(--font-body); font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--grey-900, #171412); }
.tl-ready-modal-badge { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: #E4F6ED; color: #1F9D6B; font-size: 18px; }
.tl-ready-modal p { margin: 0; font-size: 14px; color: var(--n-700, #3f3f46); }
.tl-ready-modal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tl-ready-modal li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--n-200, #e4e4e7); border-radius: 8px; background: #fff; font-size: 14px; line-height: 1.4; color: var(--grey-900, #171412); overflow-wrap: anywhere; }
.tl-ready-modal li i { flex-shrink: 0; margin-top: 2px; color: #1F9D6B; }
.tl-ready-modal li.tl-ready-modal-more { border: 0; background: transparent; padding: 0 12px; color: var(--n-500, #71717a); }
.tl-ready-modal-error { color: var(--semantic-danger, #dc2626) !important; font-size: 13px !important; }

/* "6 wks out" after the due date on a card's date pill. */
.tb-pill-sub { color: var(--tb-muted); font-weight: 500; }
.tb-pill--overdue .tb-pill-sub { color: inherit; opacity: 0.85; }

/* Calendar view (Gabi, Nov 4 2026): month grid, a weeks-out label per week, event day marked. */
.tcal-nav { display: inline-flex; align-items: center; gap: 2px; }
.tcal-arrow { width: 32px; padding: 0; justify-content: center; }
.tcal-title { margin: 0 6px; min-width: 132px; text-align: center; font-family: var(--font-display, inherit); font-size: 16px; font-weight: 700; color: var(--tb-ink); }
.tcal-empty { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--tb-line); border-radius: 10px; font-size: 13px; color: var(--tb-muted); }

.tcal-grid { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); border: 1px solid var(--tb-line); border-radius: 14px; overflow: hidden; background: var(--tb-line); gap: 1px; }
.tcal-head { background: var(--grey-25, #fafafa); padding: 8px 10px; font-size: 10px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--n-400, #a1a1aa); }
.tcal-gutter { background: var(--grey-25, #fafafa); padding: 10px 6px; display: flex; justify-content: center; }
.tcal-gutter span { font-size: 11px; font-weight: 600; color: var(--tb-muted); text-align: center; line-height: 1.25; }
.tcal-gutter--event span { color: #8A6402; }
.tcal-head.tcal-gutter { padding: 8px 6px; }

.tcal-day { container-type: inline-size; background: #fff; min-height: 124px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: background-color 0.12s; }
.tcal-day--outside { background: var(--grey-25, #fafafa); }
.tcal-day--outside .tcal-num { color: var(--n-300, #d4d4d8); }
.tcal-day--event { background: #FBF6EA; box-shadow: inset 0 0 0 2px #E3C77A; }
.tcal-day--target { background: #EEF2FF; box-shadow: inset 0 0 0 2px #6B7CD6; }
.tcal-day-top { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.tcal-num { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--tb-ink); }
.tcal-day--today .tcal-num { background: var(--tb-ink); color: #fff; }
.tcal-event-badge { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px; border-radius: 999px; background: #F6E7BC; color: #6E5000; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; }

.tcal-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
@container (max-width: 112px) { .tcal-event-text { display: none; } }
.tcal-chip { --chip-color: #8B8B95; position: relative; display: flex; align-items: flex-start; gap: 4px; width: 100%; min-width: 0; min-height: 24px; padding: 3px 5px 3px 9px; border: 1px solid var(--tb-line); border-radius: 6px;
    background: color-mix(in srgb, var(--chip-color) 9%, #fff); color: var(--tb-ink); font: inherit; font-size: 11.5px; font-weight: 500; text-align: left; cursor: pointer; }
.tcal-chip[draggable="true"] { cursor: grab; }
.tcal-chip:hover { border-color: var(--chip-color); }
.tcal-chip-bar { position: absolute; left: 2px; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--chip-color); }
.tcal-chip-text { overflow: hidden; min-width: 0; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tcal-chip-check { flex: 0 0 auto; margin-top: 2px; color: #2F7A52; }
.tcal-chip--done { background: #fff; color: var(--n-400, #a1a1aa); }
.tcal-chip--done .tcal-chip-text { text-decoration: line-through; }
.tcal-chip--done .tcal-chip-bar { opacity: 0.4; }
.tcal-chip--overdue { color: var(--tb-overdue); border-color: #F5C8C2; font-weight: 600; }
.tcal-chip--dragging { opacity: 0.45; }
.tcal-more { align-self: flex-start; border: none; background: none; padding: 1px 4px; border-radius: 4px; font: inherit; font-size: 11px; font-weight: 600; color: var(--tb-muted); cursor: pointer; }
.tcal-more:hover { color: var(--tb-ink); background: var(--n-100, #f4f4f5); }

.tcal-agenda { display: none; flex-direction: column; gap: 10px; }
.tcal-agenda-empty { margin: 0; padding: 16px; text-align: center; font-size: 13px; color: var(--tb-muted); }
.tcal-agenda-day { border: 1px solid var(--tb-line); border-radius: 12px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.tcal-agenda-day--event { background: #FBF6EA; border-color: #E3C77A; }
.tcal-agenda-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tcal-agenda-date { font-size: 13px; font-weight: 700; color: var(--tb-ink); }
.tcal-agenda-countdown { font-size: 11px; font-weight: 600; color: var(--tb-muted); white-space: nowrap; }
.tcal-agenda .tcal-chip { min-height: 32px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }

@media (max-width: 767px) {
    .tcal-grid { display: none; }
    .tcal-agenda { display: flex; }
    .tcal-title { min-width: 0; font-size: 15px; }
}

/* Task form: "Also show in" as a compact two-column checkbox list (Erin, Nov 4 2026). */
.tf-also { border: 0; margin: 0; padding: 0; min-width: 0; }
.tf-also legend { padding: 0; margin-bottom: 6px; display: flex; align-items: baseline; gap: 8px; }
.tf-also-count { font-size: 12px; font-weight: 500; color: var(--n-500, #71717a); }
.tf-also-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; max-height: 196px; overflow-y: auto;
    padding: 6px 8px; border: 1px solid var(--n-200, #e4e4e7); border-radius: 12px; background: #fff; }
.tf-also-item { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 32px; padding: 0 6px; border-radius: 8px; font-size: 13px; color: var(--n-700, #3f3f46); cursor: pointer; }
.tf-also-item:hover { background: var(--n-50, #fafafa); }
.tf-also-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-also-item input { width: 16px; height: 16px; flex: 0 0 16px; margin: 0; accent-color: var(--grey-900, #09113B); cursor: pointer; }
.tf-also-item--on { color: var(--grey-900, #09113B); font-weight: 600; }
.tf-also:disabled .tf-also-item { cursor: not-allowed; opacity: 0.6; }
@media (max-width: 480px) { .tf-also-list { grid-template-columns: minmax(0, 1fr); } }
