/* Taskowisko Enterprise: the look of a big, busy work tracker. Clean on
 * the surface, crowded underneath. Made up, not any real product's look. */

:root {
  --ink: #1f2430;
  --muted: #5d6475;
  --line: #dfe2e8;
  --bg: #f6f7f9;
  --panel: #fff;
  --accent: #6b3fd4;
  --accent-soft: #efe9fc;
  --ok: #1f8a5b;
  --warn: #b25e09;
  --warn-soft: #fff4e5;
}

* { box-sizing: border-box; }
body.tk { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.tk a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tk button { font: inherit; }
.tk :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tk-shell { min-width: 1100px; }

/* top bar */
.tk-top { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tk-logo { display: flex; align-items: baseline; gap: 6px; margin-right: 10px; color: var(--ink) !important; text-decoration: none; font-weight: 800; font-size: 16px; }
.tk-logo .mark { color: var(--accent); }
.tk-logo small { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.tk-nav { display: flex; align-items: center; gap: 2px; }
.tk-menu { position: relative; }
.tk-menu .m { height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font-weight: 600; cursor: pointer; }
.tk-menu .m:hover, .tk-menu .m[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); }
.tk-drop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; min-width: 240px; padding: 6px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 20, 40, .14); }
.tk-drop.right { left: auto; right: 0; }
.tk-drop > a, .tk-drop > button { display: block; width: 100%; padding: 7px 16px; border: 0; background: none; color: var(--ink) !important; text-align: left; text-decoration: none; cursor: pointer; }
.tk-drop > a:hover, .tk-drop > button:hover { background: var(--bg); }
.tk-drop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.tk-drop .cap { margin: 6px 16px 2px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tk-top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tk-search input { width: 200px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: inherit; }
.tk-ico { position: relative; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.tk-ico:hover { background: var(--bg); }
.tk-ico .badge { position: absolute; top: 0; right: -2px; padding: 0 5px; border-radius: 8px; background: #d63a3a; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; }
.tk-av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2f6f8f; color: #fff; font-size: 11px; font-weight: 700; flex: none; }

.tk-banner { padding: 8px 16px; background: var(--warn-soft); border-bottom: 1px solid #f3d7ad; color: #5c3a06; font-size: 13px; }
.link { padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* sidebar */
.tk-body { display: flex; min-height: calc(100vh - 140px); }
.tk-side { width: 240px; flex: none; padding: 14px 10px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.tk-side .proj { display: flex; gap: 10px; align-items: center; padding: 4px 6px 14px; }
.tk-side .proj small { display: block; color: var(--muted); font-size: 11px; }
.tk-side .pico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: #e85d3f; color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.tk-side ul { list-style: none; margin: 0; padding: 0; }
.tk-side .grp { margin: 12px 8px 4px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tk-side a { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; color: var(--ink) !important; text-decoration: none; }
.tk-side a:hover { background: var(--bg); }
.tk-side a[aria-current] { background: var(--accent-soft); color: var(--accent) !important; font-weight: 700; }
.tk-side .i { width: 20px; text-align: center; color: var(--muted); font-size: 12px; }
.tk-side .settings { margin-top: auto; border-top: 1px solid var(--line); border-radius: 0; padding-top: 12px; }
.tk-side .note { margin: 8px; color: var(--muted); font-size: 11px; }

.tk-main { flex: 1; min-width: 0; padding: 20px 28px 40px; }
.crumbs { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.tk-h { margin: 0 0 16px; font-size: 22px; }
.hint { color: var(--muted); font-size: 13px; }

/* buttons */
.tk-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font-weight: 600; cursor: pointer; }
.tk-btn:hover { background: var(--bg); }
.tk-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.tk-btn.primary:hover { filter: brightness(1.08); }
.tk-btn.subtle { border-color: transparent; background: none; }
.tk-btn.small { height: 30px; }
.tk-btn.icon { width: 32px; justify-content: center; padding: 0; }
.tk-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* dialogs and toast */
.tk-dlg-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(20, 22, 35, .45); }
.tk-dlg { max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.tk-dlg h2 { margin: 0; padding: 18px 22px 0; font-size: 18px; }
.tk-dlg .in { padding: 12px 22px; }
.tk-dlg .foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; }
.tk-form { display: grid; gap: 12px; }
.tk-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tk-form input, .tk-form select, .tk-form textarea, .tk-in { height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: 14px system-ui, -apple-system, "Segoe UI", sans-serif; }
.tk-form textarea { height: auto; padding: 6px 8px; }
.tk-form .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; color: var(--ink); font-size: 13px; }
.tk-err { margin: 8px 0 0; padding: 8px 10px; border-radius: 6px; background: #fdecec; color: #8a1c1c; font-size: 13px; }
.tk-toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); max-width: 520px; padding: 10px 16px; border-radius: 8px; background: #1f2430; color: #fff; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }

/* board */
.board-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.board-bar .grow { flex: 1; }
.avs { display: flex; }
.avs .tk-av { margin-left: -6px; border: 2px solid var(--bg); }
.avs .tk-av:first-child { margin-left: 0; }
.cols { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 10px; }
.col { flex: 1 1 0; min-width: 190px; max-width: 280px; padding: 8px; border-radius: 8px; background: #eceef2; }
.col h3 { margin: 4px 6px 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.card { margin-bottom: 8px; padding: 10px; border-radius: 6px; background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.card p { margin: 0 0 8px; }
.card .meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.card .meta .pts { margin-left: auto; padding: 0 6px; border-radius: 8px; background: #e4e6eb; }
.ty { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.ty.bug { background: #e5493a; } .ty.story { background: #3fa35d; } .ty.task { background: #3b7ddd; }
.col .empty { margin: 6px; color: var(--muted); font-size: 12px; font-style: italic; }

/* settings */
.set { display: flex; gap: 24px; }
.set-nav { width: 200px; flex: none; }
.set-nav a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink) !important; text-decoration: none; }
.set-nav a[aria-current] { background: var(--accent-soft); color: var(--accent) !important; font-weight: 700; }
.set-nav .cap { margin: 14px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.set-main { flex: 1; min-width: 0; }
table.tk-t { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.tk-t th, .tk-t td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tk-t th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.tk-t tr:last-child td { border-bottom: 0; }
.lz { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #e4e6eb; font-size: 12px; font-weight: 700; }
.lz.todo { background: #e4e6eb; } .lz.prog { background: #dbe7fb; color: #1f4f9a; } .lz.done { background: #d9f2e5; color: #17633f; } .lz.new { background: var(--accent-soft); color: var(--accent); }
.box { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.box.warn { background: var(--warn-soft); border-color: #f3d7ad; }
.box.ok { background: #e9f7f0; border-color: #b9e2cd; }

/* workflow editor */
.wf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.wf-bar .grow { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { height: 30px; padding: 0 12px; border: 0; background: var(--panel); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.diagram { position: relative; display: flex; flex-wrap: wrap; gap: 28px 56px; padding: 30px; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel) radial-gradient(#e3e5ea 1px, transparent 1px) 0 0 / 16px 16px; }
.node { position: relative; padding: 8px 14px; border: 2px solid #9aa0ad; border-radius: 6px; background: var(--panel); font-weight: 700; font-size: 13px; }
.node::after { content: "→"; position: absolute; right: -40px; top: 50%; transform: translateY(-50%); color: #9aa0ad; }
.node:last-child::after { content: ""; }
.node.all::before { content: "ALL"; position: absolute; top: -16px; left: 0; padding: 0 4px; border-radius: 3px; background: var(--accent); color: #fff; font-size: 9px; }

/* board config */
.cfg-cols { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.cfg-col { width: 180px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.cfg-col h4 { margin: 0 0 8px; font-size: 13px; }
.cfg-col .lz { display: block; margin-top: 4px; }
.cfg-col.unm { border-style: dashed; background: var(--bg); }

/* search */
.jql { display: flex; gap: 8px; margin-bottom: 14px; }
.jql textarea { flex: 1; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: 13px ui-monospace, Menlo, monospace; }
.basic { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
