/* Staff tasks (108, Lane Y2) — the Tasks screen, its nav badge and its sheets. */
.tk-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tk-head h2 { margin: 0; margin-right: auto; }
.tk-tabs { margin-bottom: 10px; max-width: 460px; }
.tk-tabs .tab { flex: 1; min-height: 40px; }
.tk-filter { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.tk-filter select { width: auto; min-width: 130px; }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tk { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
      background: var(--raised); border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; }
.tk.late { border-left: 3px solid var(--bad); }
.tk.closed .tk-title { color: var(--ink-dim); }
.tk-main { flex: 1 1 260px; min-width: 0; }
.tk-title { overflow-wrap: anywhere; }
.tk-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: var(--ink-dim); }
.tk-meta .ro-link { font-size: 13px; }
.tk-due { white-space: nowrap; }
.tk-note { margin: 6px 0 0; overflow-wrap: anywhere; }
.tk-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tk-actions .btn { min-height: 44px; min-width: 44px; }
.tk-empty { padding: 18px 0; }
.tk-settings { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hairline); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tk-settings label { display: flex; gap: 8px; align-items: center; }
.tk-form label { display: block; margin-top: 10px; }
.tk-form .tk-check { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.tk-form textarea { width: 100%; min-height: 70px; resize: vertical; }
.tk-discord { margin: 4px 0 0; }
.tk-history { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.tk-history .note { display: block; }
/* The count on the nav's Tasks tab; red when something is overdue. */
.tk-badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 999px; font-size: 11px;
            font-weight: 650; line-height: 18px; text-align: center; background: rgba(48,209,88,.2); color: #86e8a4; }
.tk-badge.late { background: var(--bad); color: #2a0707; }
@media (max-width: 520px) {
  .tk-actions { width: 100%; }
  .tk-actions .btn { flex: 1 1 auto; white-space: nowrap; }
}

/* ---- The corner window (Y2b): my tasks, bottom right, on every screen ------------------------ */
.tk-dock { position: fixed; right: 16px; bottom: 16px; z-index: 80; max-width: calc(100vw - 32px); }
.tk-dock[hidden] { display: none; }
/* The page keeps clear of it: Post sale and Take payment can always scroll above the window. */
body.tk-dock-on main { padding-bottom: calc(64px + var(--tk-dock-h, 0px)); }
.tkd-pill { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
            background: var(--surface-solid); color: var(--ink); border: 1px solid var(--hairline-strong);
            box-shadow: 0 6px 24px rgba(0,0,0,.45); font: inherit; font-weight: 600; }
.tkd-pill:hover { background: var(--hover); }
.tkd-count { display: inline-block; min-width: 20px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 20px;
             text-align: center; background: rgba(48,209,88,.2); color: #86e8a4; }
.tkd-count.late { background: var(--bad); color: #2a0707; }
.tkd-card { width: 320px; max-width: calc(100vw - 32px); max-height: min(46vh, 380px); overflow-x: hidden; overflow-y: auto; padding: 10px 12px;
            background: var(--surface-solid); color: var(--ink); border: 1px solid var(--hairline-strong); border-radius: 14px;
            box-shadow: 0 10px 34px rgba(0,0,0,.5); }
.tkd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tkd-tools { display: inline-flex; gap: 4px; }
.tkd-icon { min-width: 44px; min-height: 44px; border-radius: 10px; border: 0; background: none; color: var(--ink-dim); cursor: pointer; font: inherit; font-size: 16px; }
.tkd-icon:hover { background: var(--hover); color: var(--ink); }
.tkd-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.tkd-row { min-width: 0; display: flex; gap: 8px; align-items: center; background: var(--raised); border: 1px solid var(--hairline); border-radius: 10px; padding: 4px 6px 4px 4px; }
.tkd-row.late { border-left: 3px solid var(--bad); }
.tkd-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 6px 8px; border-radius: 8px; min-height: 44px; }
.tkd-open:hover { background: var(--hover); }
.tkd-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tkd-meta { display: block; font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tkd-done { min-height: 44px; min-width: 56px; }
.tkd-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.tkd-foot .linkish { min-height: 36px; }
.tkd-empty { margin: 8px 0 0; }
.tkd-pill:focus-visible, .tkd-icon:focus-visible, .tkd-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* A new task: the window itself pulses a green ring and settles in (the window persists across repaints, so a repaint
   never restarts it). Reduced motion: a steady glow instead, no movement. */
.tk-dock { border-radius: 14px; }
.tk-dock.collapsed { border-radius: 999px; }
.tk-dock.tk-ping { animation: tkd-pulse 1.1s ease-out 2, tkd-slide .5s ease-out 1; }
@keyframes tkd-pulse { 0% { box-shadow: 0 0 0 0 rgba(48,209,88,.7); } 100% { box-shadow: 0 0 0 18px rgba(48,209,88,0); } }
@keyframes tkd-slide { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tk-dock.tk-ping { animation: none; box-shadow: 0 0 0 3px var(--accent-glow); }
}
/* A phone gets only the pill (it opens the Tasks tab); it sits low enough to leave the thumb zone's buttons alone. */
@media (max-width: 640px) { .tk-dock { right: 10px; bottom: 10px; } .tkd-card { display: none; } }
