/* ============================================================
   Tasks (Oct 8 2026) — Profile › Tasks + Profile › Team Tasks
   Same type system as Orders / Production Status (Inter, teal accent).
   Everything is scoped under .tk (pages, modal) and .tk-toast.
   ============================================================ */
.tk{--bg:#F6F3EA;--surface:#FFFFFF;--line:#E8E3D8;--line-soft:#F0ECE2;--ink:#20242B;--mute:#8B8577;--soft:#A8A196;
  --teal:#2F6E6E;--teal-tint:#E9F2F1;--gold:#B8862A;--gold-tint:#FBF1DF;--red:#B4483C;--red-tint:#FBE9E6;
  font-family:'Inter',sans-serif;color:var(--ink);font-size:14px;-webkit-font-smoothing:antialiased;max-width:1200px}
.tk *{box-sizing:border-box}
.tk button,.tk input{font-family:'Inter',sans-serif}
.tk label{margin:0}
.tk-loading{font-family:'Inter',sans-serif;font-size:13px;color:#8B8577;padding:24px 0}
.tk-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.tk-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px}
#mytasks-root .tk-h1,#teamtasks-root .tk-h1{font-family:'Inter',sans-serif;font-weight:800;font-size:30px;letter-spacing:-.01em;margin:0 0 4px;color:var(--ink)}
.tk-sub{font-size:13px;color:var(--mute);margin:0}
.tk-datenav{display:flex;align-items:center;gap:6px}
.tk-arrow{width:34px;height:34px;border-radius:8px;border:1px solid var(--line);background:var(--surface);font-size:16px;line-height:1;cursor:pointer;color:var(--ink)}
.tk-arrow:hover{border-color:var(--soft)}
.tk-datelabel{min-width:190px;text-align:center;font-weight:700;font-size:14px}
.tk-datelabel small{display:block;font-weight:500;font-size:11.5px;color:var(--mute)}

.tk-btn{font-size:13px;font-weight:600;padding:8px 14px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;white-space:nowrap}
.tk-btn:hover{border-color:var(--soft)}
.tk-btn.tk-primary{background:var(--teal);border-color:var(--teal);color:#fff;font-weight:700}
.tk-btn.tk-primary:hover{background:#245858}
.tk-btn:disabled{opacity:.5;cursor:default}

.tk-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:22px 24px;margin-bottom:18px}
.tk-card-title{font-family:'Inter',sans-serif;font-weight:700;font-size:15px;margin:0 0 4px;letter-spacing:0;color:var(--ink)}
.tk-card-sub{font-size:12.5px;color:var(--mute);margin:0 0 16px;line-height:1.5;max-width:68ch}
.tk-addcard .tk-card-title{font-size:18px;font-weight:800}
.tk-addrow{display:flex;gap:8px;align-items:center}
.tk-addrow input{flex:1;min-width:0;height:42px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);font-size:14px;color:var(--ink)}
.tk-addrow input:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px rgba(47,110,110,.15);background:#fff}
.tk-addrow .tk-btn{height:42px}
.tk-err{color:var(--red);font-size:12px;margin:8px 0 0;min-height:1em}
.tk-errbox{background:var(--red-tint);color:#8A2E22;border-radius:10px;padding:10px 14px;font-size:13px;margin-bottom:14px}

.tk-summary{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.tk-progress{flex:1;min-width:220px}
.tk-progress-num{font-weight:800;font-size:28px;line-height:1;letter-spacing:-.01em}
.tk-progress-num span{font-size:13px;font-weight:500;color:var(--mute);margin-left:6px;letter-spacing:0}
.tk-bar{height:8px;border-radius:99px;background:var(--line-soft);overflow:hidden;margin-top:10px}
.tk-bar i{display:block;height:100%;background:var(--teal);border-radius:99px;transition:width .3s}
.tk-facts{display:flex;gap:18px;flex-wrap:wrap;font-size:12.5px;color:var(--mute)}
.tk-facts b{color:var(--ink);font-size:15px;display:block}
.tk-actions{display:flex;gap:8px}
.tk-closed{font-size:13px;font-weight:700;color:var(--teal);background:var(--teal-tint);padding:6px 12px;border-radius:999px}

.tk-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:18px;align-items:start}
.tk-list{list-style:none;margin:0;padding:0}
.tk-task{display:flex;gap:11px;padding:12px 0;border-top:1px solid var(--line-soft)}
.tk-task:first-child{border-top:0;padding-top:4px}
.tk-check{width:22px;height:22px;border-radius:7px;border:1.5px solid var(--soft);background:var(--surface);flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;margin-top:1px;cursor:pointer}
.tk-check svg{width:13px;height:13px;opacity:0;color:#fff}
.tk-check.tk-on{background:var(--teal);border-color:var(--teal)}
.tk-check.tk-on svg{opacity:1}
.tk-check:disabled{cursor:default}
.tk-check.tk-x{border-style:dashed}
.tk-main{flex:1;min-width:0}
.tk-title{font-weight:700;font-size:13.5px;line-height:1.35;word-wrap:break-word}
.tk-done .tk-title{text-decoration:line-through;text-decoration-color:var(--soft);color:var(--mute)}
.tk-out .tk-title{color:var(--mute)}
.tk-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:5px;font-size:11.5px;color:var(--mute)}
.tk-meta:empty{display:none}
.tk-tag{font-size:10.5px;font-weight:600;padding:2px 8px;border-radius:999px;border:1px solid var(--line);color:var(--mute);white-space:nowrap}
.tk-tag.tk-carry{color:var(--gold);border-color:#E5C784;background:var(--gold-tint)}
.tk-tag.tk-drop{color:var(--red);border-color:transparent;background:var(--red-tint)}
.tk-by{font-weight:600;color:var(--ink)}
.tk-note{font-size:12px;color:var(--mute);margin-top:4px}
.tk-empty{font-size:12.5px;color:var(--soft);margin:4px 0 4px}
.tk-soft{color:var(--soft);font-size:12.5px}

/* Team */
.tk-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}
.tk-stat{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:18px 22px}
.tk-stat-num{font-weight:800;font-size:28px;line-height:1;letter-spacing:-.01em}
.tk-stat-label{font-size:13px;color:var(--mute);margin-top:6px}
.tk-tablewrap{overflow-x:auto}
.tk .tk-table{width:100%;border-collapse:collapse;min-width:720px;border:0;background:transparent;font-size:13px}
.tk .tk-table th{background:transparent;color:var(--mute);text-transform:none;letter-spacing:0;text-align:left;font-size:11.5px;font-weight:600;padding:0 10px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
.tk .tk-table td{padding:13px 10px;border-bottom:1px solid var(--line-soft);font-size:13px;vertical-align:middle}
.tk .tk-table th.tk-num,.tk .tk-table td.tk-num{text-align:center}
.tk-table td.tk-num{font-weight:700}
.tk-row{cursor:pointer}
.tk-row:hover td{background:#FCFBF7}
.tk-row:last-child td{border-bottom:0}
.tk-row:focus-visible{outline:2px solid var(--teal);outline-offset:-2px}
.tk-who{display:flex;align-items:center;gap:10px}
.tk-who b{display:block;font-size:13.5px}
.tk-who small{color:var(--mute);font-size:11.5px}
.tk-avatar{width:32px;height:32px;border-radius:50%;background:var(--ink);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0}
.tk-avatar-lg{width:44px;height:44px;font-size:17px}
.tk-minibar{display:flex;align-items:center;gap:8px;min-width:130px}
.tk-minibar .tk-bar{flex:1;margin:0;height:6px}
.tk-minibar span{font-size:12px;font-weight:700;width:36px;text-align:right}
.tk-closedtxt{color:var(--teal);font-weight:700}
.tk-back{border:0;background:none;color:var(--teal);font-weight:700;font-size:13px;padding:0;margin-bottom:14px;cursor:pointer}
.tk-drillhead{display:flex;align-items:center;gap:12px}
.tk-drillhead .tk-h1{margin:0}

/* Close my day modal */
.tk-scrim{position:fixed;inset:0;background:rgba(26,27,32,.42);display:none;align-items:center;justify-content:center;padding:20px;z-index:1000}
.tk-scrim.tk-open{display:flex}
.tk-modal{background:#fff;border-radius:14px;border:1px solid var(--line);width:100%;max-width:560px;max-height:85vh;overflow:auto;padding:24px}
.tk-modal h2{font-family:'Inter',sans-serif;font-size:22px;font-weight:800;margin:0 0 6px;letter-spacing:-.01em;color:var(--ink)}
.tk-modal > p{font-size:13px;color:var(--mute);margin:0 0 16px;line-height:1.5}
.tk-closeitem{border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin-bottom:10px}
.tk-closeitem .tk-title{margin-bottom:9px}
.tk-closeitem input{width:100%;margin-top:9px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--bg);font-size:13px}
.tk-closeitem input:focus{outline:none;border-color:var(--teal)}
.tk-seg{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
.tk-seg button{border:0;background:none;padding:6px 12px;font-size:12.5px;font-weight:600;color:var(--mute);cursor:pointer}
.tk-seg button.tk-on{background:var(--ink);color:#fff}
.tk-modalfoot{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}

.tk-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%) translateY(20px);background:#20242B;color:#fff;padding:10px 16px;border-radius:10px;font-family:'Inter',sans-serif;font-size:13px;font-weight:600;opacity:0;transition:.2s;pointer-events:none;z-index:1100;display:flex;gap:14px;align-items:center;max-width:calc(100vw - 32px)}
.tk-toast.tk-show{opacity:1;transform:translateX(-50%) translateY(0);pointer-events:auto}
.tk-toast button{border:0;background:none;color:#9BD3D3;font-weight:700;font-size:13px;cursor:pointer;padding:0;font-family:'Inter',sans-serif}

@media (max-width:860px){
  .tk-grid{grid-template-columns:1fr}
  .tk-stats{gap:10px}
  .tk-stat{padding:14px}
}
@media (max-width:640px){
  #mytasks-root .tk-h1,#teamtasks-root .tk-h1{font-size:24px}
  .tk-datenav{width:100%;justify-content:space-between}
  .tk-datelabel{min-width:0;flex:1}
  .tk-card{padding:18px 16px}
  .tk-addrow{flex-direction:column;align-items:stretch}
  .tk-stat-num{font-size:24px}
}
/* The app styles every .tab-panel h1/h2 in Cinzel with a big top margin — keep Inter here. */
#mytasks-root .tk-card-title,#teamtasks-root .tk-card-title{font-family:'Inter',sans-serif;margin:0 0 4px;letter-spacing:0}
#mytasks-root .tk-addcard .tk-card-title{font-size:18px;font-weight:800}
@media (max-width:640px){.tk-addrow input{flex:none;width:100%}}

/* Oct 8 rev: Remove (with reason), simple Close-day confirm, Moved stat */
.tk-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.tk-rm{align-self:flex-start;border:0;background:none;color:var(--soft);font-size:12px;font-weight:600;padding:2px 0;cursor:pointer;white-space:nowrap}
.tk-rm:hover{color:var(--red)}
.tk-removeform{display:flex;gap:8px;margin-top:9px;flex-wrap:wrap}
.tk-removeform input{flex:1 1 220px;min-width:0;height:36px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--bg);font-size:13px}
.tk-removeform input:focus{outline:none;border-color:var(--red);background:#fff}
.tk-removeform .tk-btn{height:36px;padding:0 12px}
.tk-btn.tk-danger{background:var(--red);border-color:var(--red);color:#fff;font-weight:700}
.tk-modal-sm{max-width:460px}
.tk-movelist{margin:0 0 6px;padding:10px 14px 10px 30px;background:var(--bg);border-radius:10px;font-size:13px;font-weight:600;line-height:1.7}
@media (max-width:640px){.tk-stats{grid-template-columns:1fr 1fr 1fr;gap:8px}.tk-stat{padding:12px}.tk-stat-num{font-size:20px}.tk-stat-label{font-size:11.5px}}

/* Oct 8 rev 2: calmer look, matched to Sales › Orders (lighter weights, ink buttons, smaller numbers) */
.tk{--line:#EAE4D4;--line-soft:#F1EFE8}
.tk-card{border-radius:10px;padding:18px 20px;margin-bottom:16px}
#mytasks-root .tk-card-title,#teamtasks-root .tk-card-title,
#mytasks-root .tk-addcard .tk-card-title{font-size:14px;font-weight:700;margin:0 0 2px}
.tk-card-sub{font-size:12px;margin:0 0 14px}
.tk-datelabel{font-weight:600;font-size:13px}
.tk-arrow{width:32px;height:32px;font-size:14px;color:var(--mute)}

.tk-btn{font-size:12.5px;font-weight:600;padding:7px 14px}
.tk-btn.tk-primary{background:#20242B;border-color:#20242B;color:#F6F3EA;font-weight:600}
.tk-btn.tk-primary:hover{background:#353A43}
.tk-btn.tk-danger{font-weight:600}
.tk-addrow input{height:38px;font-size:13px;background:#fff;border-color:#DDD6C4}
.tk-addrow .tk-btn{height:38px}

.tk-progress-num{font-weight:700;font-size:20px}
.tk-progress-num span{font-size:12.5px}
.tk-bar{height:6px;margin-top:9px}
.tk-facts{gap:20px;font-size:11.5px}
.tk-facts b{font-size:14px;font-weight:600}
.tk-closed{font-size:12px;font-weight:600;padding:5px 11px}

.tk-task{padding:11px 0}
.tk-check{width:18px;height:18px;border-radius:5px;border-width:1.5px;border-color:#CFC8B6;margin-top:1px}
.tk-check svg{width:11px;height:11px}
.tk-title{font-weight:500;font-size:13px}
.tk-meta{font-size:11px;margin-top:4px}
.tk-tag{font-size:10.5px;font-weight:500;padding:1px 7px}
.tk-by{font-weight:600}
.tk-rm{font-weight:500;font-size:11.5px}

.tk-stat{border-radius:10px;padding:14px 18px}
.tk-stat-num{font-weight:700;font-size:20px}
.tk-stat-label{font-size:12px;margin-top:5px}
.tk .tk-table th{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--mute)}
.tk-table td.tk-num{font-weight:500}
.tk-who b{font-size:13px;font-weight:600}
.tk-who small{font-size:11px}
.tk-avatar{width:30px;height:30px;font-size:12px;font-weight:600;background:#F1EFE8;color:#20242B}
.tk-avatar-lg{width:40px;height:40px;font-size:15px}
.tk-minibar span{font-weight:500;color:var(--mute)}
.tk-closedtxt{font-weight:600}
.tk-back{font-weight:600;font-size:12.5px}

#mytasks-root .tk-modal h2,.tk-modal h2{font-size:18px;font-weight:700;letter-spacing:0}
.tk-modal{border-radius:12px}
.tk-movelist{font-weight:500;font-size:12.5px}
.tk-toast{font-weight:500;font-size:12.5px}
@media (max-width:640px){.tk-stat-num{font-size:18px}}

/* Oct 8 rev 3: quieter still — lighter headings, numbers and names */
#mytasks-root .tk-h1,#teamtasks-root .tk-h1{font-size:24px;font-weight:700;letter-spacing:-.005em}
.tk-sub{font-size:12.5px}
.tk-datelabel{font-weight:500}
.tk-btn{font-weight:500}
.tk-btn.tk-primary{font-weight:500}
.tk-stats{gap:12px;margin-bottom:14px}
.tk-stat{padding:12px 16px}
.tk-stat-num{font-size:17px;font-weight:600}
.tk-stat-label{font-size:11.5px;margin-top:3px}
.tk .tk-table th{font-weight:600;color:var(--soft);font-size:10px}
.tk .tk-table td{padding:11px 10px}
.tk-table td.tk-num{font-weight:400;color:#4A4E56}
.tk-who b{font-weight:500}
.tk-avatar{width:28px;height:28px;font-size:11.5px;font-weight:500;color:#5F5E58}
.tk-avatar-lg{width:38px;height:38px;font-size:14px}
.tk-closedtxt{font-weight:500}
.tk-progress-num{font-size:17px;font-weight:600}
.tk-facts b{font-weight:500}
#mytasks-root .tk-card-title,#teamtasks-root .tk-card-title,
#mytasks-root .tk-addcard .tk-card-title{font-weight:600}
.tk-title{font-weight:400}
.tk-by{font-weight:500}
#mytasks-root .tk-modal h2,.tk-modal h2{font-size:17px;font-weight:600}
@media (max-width:640px){#mytasks-root .tk-h1,#teamtasks-root .tk-h1{font-size:21px}.tk-stat-num{font-size:16px}}
.tk .tk-table{min-width:600px}.tk-minibar{min-width:110px}
