@font-face { font-family: "Iosevka Charon Light"; src: url("fonts/IosevkaCharon-Light.ttf") format("truetype"); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Iosevka Charon"; src: url("fonts/IosevkaCharon-Regular.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Iosevka Charon"; src: url("fonts/IosevkaCharon-Medium.ttf") format("truetype"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Iosevka Charon"; src: url("fonts/IosevkaCharon-Bold.ttf") format("truetype"); font-style: normal; font-weight: 600 900; font-display: swap; }

:root {
  color-scheme: light;
  --task-dialog-width: 820px;
  --ink: #171a21;
  --muted: #6f7380;
  --paper: #f4f5f7;
  --surface: #ffffff;
  --line: #dfe2e8;
  --active: #c9605c;
  --completed: #4c9074;
  --paused: #c0903d;
  --cancelled: #7b8494;
  font-family: "Iosevka Charon Light", "Iosevka Charon", "Segoe UI Symbol", "Segoe UI Emoji", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-size: 16px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(calc(var(--task-dialog-width) + 60px), calc(100% - 32px)); margin: 0 auto; padding: 28px 0 48px; }
.topbar { display: grid; gap: 14px; margin-bottom: 22px; }
.topbar-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.topbar-meta .eyebrow { margin: 0; }
#appVersion { white-space: nowrap; }
.topbar h1 { text-align: center; font-size: clamp(1.5rem, 4.5vw, 3.25rem); }
.eyebrow { margin: 0 0 5px; color: var(--active); font-size: 0.75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 3.25vw, 3.25rem); line-height: .98; }
h2 { font-size: 1.55rem; }
.toolbar { display: flex; align-items: center; gap: 10px; }
.button { min-height: 44px; border: 1px solid transparent; border-radius: 10px; padding: 0 16px; font-weight: 750; white-space: nowrap; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--ink); color: white; box-shadow: 0 7px 18px rgba(23,26,33,.16); }
.button-secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.button-danger { background: #b84642; color: white; box-shadow: 0 7px 18px rgba(184,70,66,.22); }.button-danger:hover { background: #a73e3a; }
.search { display: flex; align-items: center; gap: 8px; flex: 1 1 230px; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,26,33,.08); }
.search svg { width: 19px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--muted); font-size: .75rem; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: .88rem; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .status-count { color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.legend .clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.active { background: var(--active); }.dot.completed { background: var(--completed); }.dot.paused { background: var(--paused); }.dot.cancelled { background: var(--cancelled); }
.task-list-card { min-height: 360px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 60px rgba(25,31,44,.07); }
.task-list-head, .task-row { width: 100%; min-width: 0; }
.task-list-head { position: sticky; top: 0; z-index: 8; background: var(--surface); border-bottom: 1px solid var(--line); }
.task-title-head { position: sticky; left: 0; z-index: 10; display: flex; align-items: end; justify-content: space-between; gap: 14px; padding: 18px 12px 12px 18px; background: var(--surface); border-right: 1px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.header-filters { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.marker-filter { flex: 0 0 auto; }
.marker-filter-select { width: 170px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 28px 0 10px; outline: 0; background: var(--surface); color: var(--ink); font-size: .78rem; font-weight: 750; letter-spacing: 0; text-transform: none; }
.marker-filter-select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,26,33,.08); }
.status-filter { flex: 0 0 auto; }
.status-filter-select { min-width: 118px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 28px 0 10px; outline: 0; background: var(--surface); color: var(--ink); font-size: .78rem; font-weight: 750; letter-spacing: 0; text-transform: none; }
.status-filter-select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,26,33,.08); }
.group-row { width: 100%; min-width: 0; background: #e7ebf0; border-top: 2px solid #c3cad4; border-bottom: 1px solid #cbd1da; }
.group-row.search-match { border-top-color: #d7b84f; border-bottom-color: #dec96e; }
.group-name { position: sticky; left: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px 9px 20px; background: #e1e6ec; border-right: 1px solid #cbd1da; box-shadow: inset 4px 0 0 #7f8998; color: #343b47; font-size: .84rem; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.group-row.search-match .group-name { background: #f4e7bd; box-shadow: inset 4px 0 0 #bf9424; color: #473a1d; }
.group-name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; }
.group-add-button, .group-edit-button, .group-delete-button { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); }
.group-add-button { font-size: 1.2rem; font-weight: 700; line-height: 1; }
.group-add-button:hover { border-color: #b9dbcd; background: #eff9f5; color: var(--completed); }
.group-edit-button:hover { border-color: var(--line); background: var(--surface); color: var(--ink); }
.group-add-button:focus-visible, .group-edit-button:focus-visible, .group-delete-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.group-delete-button:hover { border-color: #e4b8b6; background: #fff2f1; color: #b84642; }
.group-edit-button svg, .group-delete-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.task-row { position: relative; min-height: 74px; border-bottom: 1px solid var(--line); }
.task-row:hover, .task-row:focus-within { z-index: 30; }
.task-row:hover .task-info, .task-row:focus-within .task-info { z-index: 31; }
.task-info { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 14px 9px 18px; background: var(--surface); border-right: 1px solid var(--line); }
.task-row.active .task-info { background: rgba(201, 96, 92, .30); }
.task-row.completed .task-info { background: rgba(76, 144, 116, .30); }
.task-row.paused .task-info { background: rgba(192, 144, 61, .30); }
.task-row.cancelled .task-info { background: rgba(123, 132, 148, .30); }
.task-copy { min-width: 0; }
.task-title-button { display: block; width: 100%; overflow: hidden; border: 0; border-radius: 5px; padding: 1px 2px; background: none; color: var(--ink); font-size: .96rem; font-weight: 750; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.task-title-button:hover { color: var(--active); text-decoration: underline; text-underline-offset: 3px; }
.task-title-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.task-copy p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: block; margin-top: 1px; overflow: hidden; color: #8a8f99; font-size: .72rem; line-height: 1.3; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.task-progress { display: block; margin-top: 4px; color: var(--ink); font-size: .8rem; font-weight: 750; }
.status-menu { position: relative; }
.status-button { border: 1px solid var(--line); border-radius: 8px; background: transparent; padding: 6px 9px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.status-menu:hover .status-options, .status-menu:focus-within .status-options { display: grid; }
.status-options { display: none; position: absolute; z-index: 20; right: 0; top: calc(100% + 5px); width: 140px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: 0 12px 30px rgba(23,26,33,.18); }
.status-menu.opens-up .status-options { top: auto; bottom: calc(100% + 5px); }
.status-options button { border: 0; border-radius: 6px; background: none; padding: 8px; text-align: left; font-size: .8rem; }.status-options button:hover { background: var(--paper); }
.state { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 30px; text-align: center; color: var(--muted); }.state strong { color: var(--ink); font-size: 1.15rem; }.state-error { color: #a52d2a; }
.pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 18px; color: var(--muted); font-size: .82rem; }
.pagination[hidden] { display: none; }
.pagination span { margin-right: auto; }
.page-button { border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; background: white; color: var(--ink); font-size: .82rem; cursor: pointer; }
.page-button:hover:not(:disabled) { background: var(--paper); }
.page-button:disabled { opacity: .45; cursor: default; }
.modal { width: min(var(--task-dialog-width), calc(100% - 28px)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 24px 80px rgba(23,26,33,.28); }.modal-small { width: min(440px, calc(100% - 28px)); }.modal::backdrop { background: rgba(17,20,27,.54); backdrop-filter: blur(3px); }
.modal form { display: grid; gap: 18px; max-height: calc(100vh - 28px); overflow-y: auto; padding: 24px; }.modal-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }.icon-button { border: 0; background: none; color: var(--muted); font-size: 1.8rem; line-height: 1; }
.modal-heading-actions { display: flex; align-items: center; gap: 12px; }
.print-task-button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.print-task-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.modal label { display: grid; gap: 7px; color: var(--muted); font-size: .82rem; font-weight: 750; }.modal input,.modal textarea,.modal select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; outline: 0; color: var(--ink); background: white; }.modal input:focus,.modal textarea:focus,.modal select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,26,33,.08); }.modal textarea { resize: vertical; }
.modal input:disabled, .modal textarea:disabled, .modal select:disabled { opacity: 1; color: var(--ink); background: #f8f9fb; cursor: default; }
.modal .marker-choice input:disabled { opacity: 1; }
.login-hint { margin: 0; color: var(--muted); font-size: .9rem; }
.task-description { min-height: 450px; }
.task-description-view { min-width: 0; }
.task-description-view h3 { margin: 0 0 7px; color: var(--muted); font-size: .82rem; font-weight: 750; }
.task-comment-input, .task-description-history { font-size: .875rem; line-height: 1.5; }
.task-description-history { background: white; border: 1px solid var(--line); border-radius: 9px; }
.task-description-history p { margin: 0; padding: 11px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-description-history hr { margin: 0; border: 0; border-top: 1px solid var(--line); }
.hint { margin: -7px 0 0; color: var(--muted); font-size: .8rem; }.modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
.danger-eyebrow { color: #b84642; }.delete-group-name { margin: 0; font-size: 1rem; font-weight: 800; overflow-wrap: anywhere; }.delete-group-note { margin: -8px 0 0; color: var(--muted); line-height: 1.5; }
.marker-picker { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.marker-picker legend { padding: 0 5px; color: var(--muted); font-size: .82rem; font-weight: 750; }
.marker-options { display: flex; flex-wrap: wrap; gap: 8px; }
.modal .marker-choice { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); font-size: .8rem; cursor: pointer; }
.modal .marker-choice input { width: auto; margin: 0; padding: 0; accent-color: var(--marker-color); }
.marker-swatch { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--marker-color); }
.marker-empty { margin: 0; color: var(--muted); font-size: .82rem; }
.task-markers { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.task-marker-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; background: rgba(255,255,255,.78); color: var(--ink); font-size: .68rem; line-height: 1.3; }
.task-marker-chip .marker-swatch { width: 8px; height: 8px; }
.marker-list { display: grid; gap: 8px; max-height: min(45vh, 420px); overflow-y: auto; }
.marker-list-empty { margin: 0; padding: 12px; color: var(--muted); font-size: .88rem; text-align: center; }
.marker-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--surface); }
.marker-list-identity { display: flex; min-width: 0; align-items: center; gap: 9px; font-size: .9rem; }
.marker-list-identity span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marker-list-actions { justify-content: flex-start; }
.marker-row-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.marker-row-actions button { min-height: 32px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; background: white; color: var(--ink); font-size: .76rem; }
.marker-row-actions button:hover { background: var(--paper); }
.marker-row-actions .marker-remove:hover { border-color: #e4b8b6; background: #fff2f1; color: #a73e3a; }
.marker-color-input { width: 100%; min-height: 44px; padding: 5px !important; }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: 360px; border-radius: 10px; padding: 12px 15px; background: var(--ink); color: white; box-shadow: 0 14px 36px rgba(23,26,33,.28); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 640px) { body:not(.viewer-mode) .toolbar { flex-wrap: wrap; } .toolbar .button { padding-inline: 10px; } .search kbd { display: none; } }
@media (max-width: 800px) { .task-title-head { gap: 8px; padding-right: 8px; padding-left: 10px; }.header-filters { gap: 5px; }.marker-filter-select { width: 145px; }.status-filter-select { min-width: 108px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
@media screen { .print-sheet { display: none !important; } }
@page { size: A4; margin: 17mm 16mm; }
@media print {
  html, body { width: auto; min-width: 0; margin: 0; background: #fff; color: #222933; }
  body.printing-task > :not(#printSheet), body.printing-task dialog::backdrop { display: none !important; }
  body.printing-task #printSheet { display: block !important; }
  .print-sheet { font-family: "Iosevka Charon Light", "Iosevka Charon", Arial, sans-serif; font-size: 10.5pt; line-height: 1.42; }
  .print-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12mm; padding-bottom: 8mm; border-bottom: 2px solid #4c5969; }
  .print-kicker { display: block; margin-bottom: 3mm; color: #697687; font-size: 8.5pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .print-header h1 { max-width: 135mm; margin: 0; font-size: 22pt; font-weight: 700; line-height: 1.12; overflow-wrap: anywhere; white-space: normal; }
  .print-generated { flex: 0 0 39mm; color: #6c7785; font-size: 8pt; text-align: right; }
  .print-section { margin-top: 8mm; break-inside: avoid-page; }
  .print-description-section { break-inside: auto; }
  .print-section h2 { margin: 0 0 3mm; padding-bottom: 2mm; border-bottom: 1px solid #cbd2da; color: #364353; font-size: 11pt; font-weight: 700; letter-spacing: .02em; break-after: avoid; }
  .print-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5mm 9mm; margin: 0; }
  .print-details > div { min-width: 0; break-inside: avoid; }
  .print-details dt { margin-bottom: 1mm; color: #75808d; font-size: 8pt; }
  .print-details dd { margin: 0; font-size: 10.5pt; font-weight: 600; overflow-wrap: anywhere; }
  .print-status { display: inline-block; border-left: 3px solid #687789; padding-left: 3mm; }
  .print-status.active { border-color: var(--active); }.print-status.completed { border-color: var(--completed); }.print-status.paused { border-color: var(--paused); }.print-status.cancelled { border-color: var(--cancelled); }
  .print-performers { display: flex; flex-wrap: wrap; gap: 3mm; overflow-wrap: anywhere; }
  .print-performer { display: inline-flex; align-items: center; gap: 2mm; border: 1px solid #d6dce3; border-radius: 4mm; padding: 1.5mm 3mm; break-inside: avoid; }
  .print-performer i { display: inline-block; flex: 0 0 2.5mm; width: 2.5mm; height: 2.5mm; border-radius: 50%; background: var(--marker-color); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-description { font-size: 10.5pt; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
}
