/* Super-app header, the home hub and the task manager. Loaded after style.css. */

/* ---------------------------------------------------------------- header */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand img { border-radius: 7px; }
.apps { position: relative; }
.apps summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px;
  border: 1px solid var(--line); border-radius: 8px; font-weight: 600; user-select: none; }
.apps summary::-webkit-details-marker { display: none; }
.apps summary:hover, .apps[open] summary { border-color: var(--accent); }
.apps-i { display: grid; grid-template-columns: repeat(3, 4px); gap: 2px; }
.apps-i i { width: 4px; height: 4px; border-radius: 1px; background: var(--muted); }
.apps-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; min-width: 300px; padding: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .22); }
.apps-row { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.apps-row:hover { background: var(--hover); text-decoration: none; }
.apps-row.on { background: var(--new); }
.apps-row.off { opacity: .55; cursor: default; }
.apps-row b { display: block; }
.apps-row small { color: var(--muted); }
.apps-ic, .tile-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-weight: 700; flex: none; }
.ic-home, .tile-ic { background: linear-gradient(135deg, #17457f, #2a78d6); }
.ic-tenders, .tile-tenders .tile-ic { background: linear-gradient(135deg, #2a78d6, #6250d6); }
.ic-tasks, .tile-tasks .tile-ic { background: linear-gradient(135deg, #1baf7a, #0f8a9c); }
.ic-tickets, .tile-tickets .tile-ic { background: linear-gradient(135deg, #e0792f, #c43e6b); }
.tile-analytics .tile-ic { background: linear-gradient(135deg, #6250d6, #a04bc9); }
.ic-jarvis, .tile-jarvis .tile-ic { background: linear-gradient(135deg, #0f172a, #3b82f6); }
.ic-maps, .tile-maps .tile-ic { background: linear-gradient(135deg, #e5484d, #e0792f); }
.code-big { display: inline-block; margin-top: 6px; padding: 6px 12px; font-size: 20px; letter-spacing: .06em; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.tile-renewals .tile-ic { background: linear-gradient(135deg, #b9491b, #e0792f); }
.av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 10px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #2a78d6, #6250d6); flex: none; vertical-align: middle; }
.av-s { width: 22px; height: 22px; font-size: 9px; }
@media (max-width: 560px) {
  .who-n { display: none; } .top { gap: 10px; } .brand span { display: none; }
  .top nav { order: 10; flex-basis: 100%; gap: 14px; padding-top: 2px; }
}

/* ---------------------------------------------------------------- home hub */
.hub { max-width: 1100px; margin: 0 auto; }
.hub-hello h1 { font-size: 26px; margin: 10px 0 2px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 18px 0; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .12s, box-shadow .12s; }
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .1); }
.tile b { font-size: 16px; margin-top: 4px; }
.tile-s { font-size: 13px; color: var(--muted); }
.tile-s em { font-style: normal; font-weight: 700; color: var(--text); }
.tile.off { opacity: .6; }
.tile.off:hover { transform: none; box-shadow: none; }
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.tlist li:last-child { border-bottom: 0; }
.tlist li a { color: var(--text); }
.tlist .sub { display: block; }
.tlist-my li.is-done a { text-decoration: line-through; color: var(--muted); }

/* ---------------------------------------------------------------- tasks home: focus, boards, team, feed */
.th-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .th-grid { grid-template-columns: minmax(0, 1fr); } }
.tasks-home .kpi { display: block; color: var(--text); }
a.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi-v.ok { color: var(--ok); }
.focus { border-top: 3px solid var(--series-1); }
.fl { list-style: none; margin: 0; padding: 0; }
.fl-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.fl-row:last-child { border-bottom: 0; }
.fl-done { margin: 0; display: flex; }
.fl-done button { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.fl-done button:hover { border-color: var(--ok); background: var(--ok); }
.fl-t { flex: 1; min-width: 0; color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-m { display: flex; gap: 6px; align-items: center; font-size: 12px; flex: none; }
.fl-b { color: var(--muted); }
@media (max-width: 560px) { .fl-b { display: none; } .fl-t { white-space: normal; } }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.quick input, .quick select { margin: 0; width: auto; padding: 6px 9px; font-size: 14px; }
.quick input[name=title] { flex: 1 1 220px; }
.quick button { padding: 6px 12px; }

/* calendar, Outlook-like week */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-head h3 { margin: 0; font-size: 15px; }
.cal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cal-nav .button { padding: 4px 10px; font-size: 13px; }
.cal-nav .button.on { border-color: var(--accent); color: var(--accent); }
.cal-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cal-seg a { padding: 4px 10px; font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); }
.cal-seg a:first-child { border-left: 0; }
.cal-seg a:hover { text-decoration: none; background: var(--hover); }
.cal-seg a.on { background: var(--accent); color: var(--accent-text); }
.cal-scroll { overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 6px; min-width: 880px; margin-bottom: 6px; }
.cal-day { min-height: 120px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.cal-month .cal-day { min-height: 96px; }
.cal-day.is-we { background: var(--bg); }
.cal-day.is-past { opacity: .75; }
.cal-day.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); opacity: 1; }
.cal-d { display: flex; align-items: baseline; gap: 5px; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.cal-dd { font-size: 16px; font-weight: 700; color: var(--text); }
.is-today .cal-dd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; background: var(--accent); color: var(--accent-text); }
.cal-cnt { margin-left: auto; font-size: 11px; }
.cal-t { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px; font-size: 12px; line-height: 1.3; color: var(--text);
  background: rgba(42, 120, 214, .12); border-left: 3px solid #2a78d6; }
.cal-t:hover { text-decoration: none; filter: brightness(.96); }
.cal-t.p-high { background: rgba(224, 121, 47, .16); border-left-color: #e0792f; }
.cal-t.p-urgent { background: rgba(209, 59, 59, .16); border-left-color: #d13b3b; }
.cal-t.p-low { background: var(--bg); border-left-color: var(--muted); }
.cal-t.is-done { opacity: .55; }
.cal-t.is-done .cal-tt { text-decoration: line-through; }
.cal-t.is-over { border-left-color: var(--danger); box-shadow: inset 0 0 0 1px rgba(209, 59, 59, .3); }
.cal-tt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-sub { font-size: 11px; color: var(--muted); }
.cal-t .av { width: 18px; height: 18px; font-size: 8px; }
.cal-rem { font-size: 11px; color: var(--soon); padding: 1px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev { font-size: 11px; line-height: 1.3; padding: 2px 6px; border-radius: 5px; background: rgba(123, 79, 214, .14); border-left: 3px solid #7b4fd6; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev b { font-weight: 600; color: #7b4fd6; }
.cal-ev-p { background: rgba(27, 175, 122, .14); border-left-color: #1baf7a; }
.cal-ev-p b { color: #12805a; }
.cal-add { margin-top: auto; }
.cal-add input { margin: 0; padding: 2px 6px; font-size: 12px; border-style: dashed; background: transparent; opacity: .5; }
.cal-add input:focus { opacity: 1; background: var(--card); }
@media (max-width: 760px) { .cal { min-width: 720px; } }

.btiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.btile { display: block; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .12s, box-shadow .12s; font: inherit; text-align: left; cursor: pointer; }
.btile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .1); border-color: var(--accent); }
.btile-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.btile b { font-size: 16px; }
.btile p { margin: 2px 0 0; }
.bov { flex: none; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 9px; background: rgba(209, 59, 59, .14); color: var(--danger); }
.bcols { display: flex; gap: 4px; margin-top: 10px; }
.bcol { flex: 1 1 0; min-width: 0; padding: 4px 6px; border-radius: 6px; background: var(--bg); font-size: 11px; line-height: 1.3; display: flex; flex-direction: column; gap: 1px; }
.bcol-n { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcol b { font-size: 14px; }
.bcol-done b { color: var(--ok); }
.bprog { height: 5px; margin: 10px 0 8px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.bprog span { display: block; height: 100%; background: var(--ok); border-radius: 3px; transition: width .2s; }
.bmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.avs { display: inline-flex; }
.avs .av { margin-right: -5px; border: 2px solid var(--card); }
.btile-new { display: grid; place-items: center; min-height: 150px; border-style: dashed; background: transparent; color: var(--muted); font-size: 15px; }
.btile-new:hover { color: var(--accent); transform: none; box-shadow: none; }
.team { display: grid; gap: 4px; }
.team-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 5px 4px; border-radius: 8px; color: var(--text); font-size: 14px; }
.team-row:hover { background: var(--hover); text-decoration: none; }
.team-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-n .bar-t { display: block; height: 4px; margin-top: 3px; }
.team-c { font-size: 13px; white-space: nowrap; }
.feed { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.feed li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.feed li:last-child { border-bottom: 0; }
.feed .av { margin-top: 2px; }
.dlg { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; background: var(--card); color: var(--text); width: min(520px, 92vw); }
.dlg::backdrop { background: rgba(0, 0, 0, .4); }
.dlg h2 { margin-bottom: 14px; }

/* ---------------------------------------------------------------- kanban board */
body.board-page main { max-width: none; padding: 12px 16px 20px; }
.kb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 10px; }
.kb-title { position: relative; }
.kb-title summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; }
.kb-title summary::-webkit-details-marker { display: none; }
.kb-title h1 { margin: 0; font-size: 20px; }
.kb-title h1::after { content: " ✎"; font-size: 13px; color: var(--muted); }
.kb-edit { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(420px, 90vw); padding: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .22); }
.acc-btn { padding: 4px 10px; font-size: 13px; white-space: nowrap; }
.access { margin: 0 0 12px; padding: 8px 12px 6px; border: 1px solid var(--line); border-radius: 8px; }
.access legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.access label.check { margin-bottom: 4px; font-size: 14px; justify-content: flex-start; }
.access input[type=radio], .access input[type=checkbox] { width: auto; margin: 0; flex: none; }
.access-who { margin: 6px 0 0 22px; display: grid; gap: 2px; }
.access-who label.check { font-size: 13px; }
.kb-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.kb-filters input, .kb-filters select { width: auto; margin: 0; padding: 5px 9px; font-size: 14px; }
.kb-filters input { flex: 1 1 180px; }
.kb-filters .reset { font-size: 13px; }

.kanban { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; min-height: calc(100vh - 150px); }
.kcol { flex: 0 0 290px; max-width: 290px; display: flex; flex-direction: column; max-height: calc(100vh - 140px);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
@media (prefers-color-scheme: dark) { .kcol { background: #171a20; } }
.kcol.over { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kcol-done .kcol-h h2::before { content: "✓ "; color: var(--ok); }
.kcol-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; }
.kcol-h h2 { margin: 0; font-size: 14px; font-weight: 600; }
.kcount { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; text-align: center; font-size: 11px; font-weight: 600;
  color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.kmenu { position: relative; }
.kmenu summary { list-style: none; cursor: pointer; padding: 0 6px; color: var(--muted); font-weight: 700; border-radius: 6px; }
.kmenu summary::-webkit-details-marker { display: none; }
.kmenu summary:hover { background: var(--card); }
.kmenu-b { position: absolute; right: 0; top: calc(100% + 4px); z-index: 25; width: 240px; padding: 8px; display: grid; gap: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.kmenu-b form { display: flex; gap: 6px; flex-wrap: wrap; }
.kmenu-b input { flex: 1 1 100px; margin: 0; padding: 4px 8px; font-size: 13px; }
.kmenu-b button { flex: 1 1 auto; padding: 4px 8px; font-size: 13px; }
.kcards { flex: 1 1 auto; min-height: 30px; overflow-y: auto; padding: 2px 8px; display: flex; flex-direction: column; gap: 8px; }
.tcard { position: relative; padding: 9px 11px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; cursor: grab;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: box-shadow .12s; }
.tcard:hover, .tcard:focus { box-shadow: 0 4px 12px rgba(0, 0, 0, .1); border-color: var(--accent); outline: none; }
.tcard.dragging { opacity: .4; }
.tcard.is-done .tcard-t { color: var(--muted); text-decoration: line-through; }
.tcard-ph { height: 44px; border: 2px dashed var(--accent); border-radius: 9px; opacity: .6; }
.tcard-t { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.tcard-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 7px; font-size: 12px; }
.tcard-m .av { margin-left: auto; }
.tlabels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.tlabel { display: inline-block; padding: 0 7px; font-size: 11px; font-weight: 600; line-height: 18px; border-radius: 9px; color: #fff; }
.l-blue { background: #2a78d6; } .l-green { background: #1baf7a; } .l-orange { background: #e0792f; } .l-red { background: #d13b3b; }
.l-purple { background: #7b4fd6; } .l-teal { background: #0f8a9c; } .l-gray { background: #6b7280; }
.tprio { padding: 0 6px; border-radius: 4px; font-weight: 600; font-size: 11px; line-height: 18px; }
.p-high { background: rgba(224, 121, 47, .18); color: #b9491b; }
.p-urgent { background: rgba(209, 59, 59, .18); color: #b42318; }
@media (prefers-color-scheme: dark) { .p-high { color: #f39a72; } .p-urgent { color: #f97066; } }
.tdue { padding: 0 6px; border-radius: 4px; line-height: 18px; background: var(--bg); color: var(--muted); font-variant-numeric: tabular-nums; }
.tdue.d-overdue { background: rgba(209, 59, 59, .16); color: var(--danger); font-weight: 600; }
.tdue.d-today { background: rgba(224, 121, 47, .18); color: var(--soon); font-weight: 600; }
.tdue.d-soon { color: var(--soon); }
.tsub { color: var(--muted); }
.tsub.all { color: var(--ok); }
.qadd { padding: 6px 8px 8px; }
.qadd textarea, .qadd-b { display: none; }
.qadd.on textarea, .qadd.on .qadd-b { display: flex; }
.qadd.on .qadd-open { display: none; }
.qadd textarea { margin: 0 0 6px; padding: 8px 10px; font-size: 14px; background: var(--card); }
.qadd-b { gap: 6px; }
.qadd-b button { padding: 5px 12px; font-size: 13px; }
.qadd-open { width: 100%; text-align: left; border: 0; background: transparent; color: var(--muted); padding: 6px 4px; }
.qadd-open:hover { background: var(--card); color: var(--text); }
.kcol-new { background: transparent; border-style: dashed; }
.kcol-add { display: flex; gap: 6px; padding: 10px; }
.kcol-add input { margin: 0; background: var(--card); }
.kcol-add button { display: none; }
.kcol-add input:focus + button, .kcol-add input:not(:placeholder-shown) + button { display: inline-block; }

/* ---------------------------------------------------------------- mind map */
body.map-page main { max-width: none; padding: 10px 16px 12px; }
.mm { display: flex; flex-direction: column; height: calc(100vh - 80px); min-height: 480px; }
.mm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.mm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; }
.mm-tools button { padding: 4px 10px; font-size: 13px; }
.mm-colors { display: inline-flex; gap: 3px; margin: 0 6px; }
.mm-colors button { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.mm-status { margin-left: 6px; }
.mm-canvas { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: grab; outline: none;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
.mm-canvas:focus { border-color: var(--accent); }
.mm-canvas svg { display: block; width: 100%; height: 100%; }
.mm-link { fill: none; stroke-width: 2; opacity: .85; }
.mm-node { cursor: pointer; }
.mm-node rect { fill: var(--card); stroke-width: 1.5; }
.mm-node.root rect { fill: #1d2330; stroke: #1d2330; }
.mm-node.root text { fill: #fff; font-weight: 600; font-size: 16px; }
.mm-node.branch text { fill: #fff; font-weight: 600; }
.mm-node text { font: 14px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; fill: var(--text); pointer-events: none; }
.mm-node.sel rect { stroke-width: 3; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.mm-toggle { cursor: pointer; }
.mm-toggle text { font-size: 11px; fill: var(--muted); pointer-events: none; }
.mm-toggle text.on { fill: #fff; font-weight: 700; }
.mm-edit { position: absolute; z-index: 5; margin: 0; padding: 6px 12px; border: 2px solid var(--accent); border-radius: 8px; background: var(--card); color: var(--text);
  font: 14px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.3; resize: none; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.mm-hint { margin: 6px 0 0; }
@media (prefers-color-scheme: dark) { .mm-node.root rect { fill: #e6e8eb; stroke: #e6e8eb; } .mm-node.root text { fill: #14171c; } }

/* ---------------------------------------------------------------- card drawer */
.drawer-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .25); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: min(560px, 100vw); background: var(--card); border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(0, 0, 0, .2); overflow-y: auto; }
.drawer-c { padding: 16px 20px 24px; }
.tk-page { max-width: 760px; margin: 0 auto; }
.tk-page .drawer-c { padding: 16px 20px; }
.tk-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tk-move select { width: auto; margin: 0; padding: 4px 8px; font-size: 13px; }
.tk-tools { display: flex; align-items: center; gap: 6px; }
.tk-tools form { margin: 0; }
.tk-tools button, .tk-tools .button { padding: 4px 10px; font-size: 13px; }
.tk-close { font-size: 20px; line-height: 1; padding: 2px 8px; border: 0; background: transparent; color: var(--muted); }
.tk-close:hover { color: var(--text); }
[data-standalone] .tk-close, [data-standalone] .tk-full { display: none; }
.tk-title textarea { margin: 0; padding: 6px 8px; font-size: 20px; font-weight: 600; line-height: 1.3; resize: none; overflow: hidden; background: transparent; border-color: transparent; }
.tk-title textarea:hover, .tk-title textarea:focus { border-color: var(--line); background: var(--bg); }
.tk-done { margin: 6px 0 0; font-size: 13px; }
.tk-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 12px 0 8px; }
.tk-meta label { margin: 0; font-size: 12px; color: var(--muted); }
.tk-meta label small { display: none; }
.tk-meta input, .tk-meta select { margin-top: 2px; padding: 5px 8px; font-size: 14px; color: var(--text); }
.tk-meta label:last-child { grid-column: span 2; }
@media (max-width: 480px) { .tk-meta { grid-template-columns: 1fr; } .tk-meta label:last-child { grid-column: auto; } }
.tk-s { margin-top: 18px; }
.tk-s h3 { margin: 0 0 6px; font-size: 14px; }
.tk-desc textarea { margin: 0; font-size: 14px; }
.subs { list-style: none; margin: 4px 0; padding: 0; }
.subs li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.subs li form { margin: 0; display: flex; }
.subs .sub-n { flex: 1; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.subs li.is-done .sub-n { color: var(--muted); text-decoration: line-through; }
.subs input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
button.link.x { color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }
button.link.x:hover { color: var(--danger); }
.sub-add input { margin: 6px 0 0; font-size: 14px; }
.cmt { padding: 8px 0; border-bottom: 1px solid var(--line); }
.cmt-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cmt-h form { margin-left: auto; }
.cmt-t { margin-top: 4px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-add { margin-top: 8px; display: grid; gap: 6px; }
.cmt-add textarea { margin: 0; font-size: 14px; }
.cmt-add button { justify-self: end; padding: 5px 12px; font-size: 13px; }
.tk-hist summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.hist { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; }
.hist li { padding: 3px 0; }
.tk-f { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line); }
.tk-f form { margin: 0; }
.tk-f button { font-size: 13px; }
body.drawer-open { overflow: hidden; }
@media print { .drawer, .drawer-bg, .apps { display: none !important; } }
