:root {
  --motion-fast: 150ms;
  --motion-base: 220ms;
  --motion-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --bg: #edf0f5;
  --column-line: #d8dfea;
  --surface: #fff;
  --ink: #11172d;
  --muted: #7b88a4;
  --line: #e9edf5;
  --primary: #3655ee;
  --primary-hover: #2843c8;
  --accent: #3655ee;
  --danger: #b52d27;
  --success: #009f67;
  --warning: #8a5a16;
  --ring: #3655ee;
  --radius: 10px;
  --font: "Segoe UI", Arial, sans-serif;
  --display: "Segoe UI", sans-serif;
  --scroll: #a5b3c4;
}
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--scroll);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7b8da6;
}
::-webkit-scrollbar-track {
  background: transparent;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.45 var(--font);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  transition:
    background 0.12s,
    border-color 0.12s;
}
button:hover {
  background: #edf2f9;
  border-color: #b8c7da;
}
button:active {
  background: #e4ecf8;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button[aria-busy="true"] {
  opacity: 0.7;
}
a {
  color: var(--primary);
  text-underline-offset: 3px;
  cursor: pointer;
}
a:hover {
  color: var(--primary-hover);
}
:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}
.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.primary:active {
  background: #153e86;
}
.ghost {
  background: transparent;
  border-color: transparent;
}
.danger {
  color: var(--danger);
}
.wide {
  width: 100%;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.7px;
  margin: 0;
}
h2 {
  font-size: 17px;
  line-height: 1.3;
}
h3 {
  font-size: 13px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -1px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.brand-dot {
  color: var(--accent);
}
.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;
}
.skip {
  position: absolute;
  top: -100px;
  z-index: 9;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 8px;
}
.topbar {
  height: 52px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
}
.top-divider {
  height: 24px;
  width: 1px;
  background: var(--line);
}
.workspace-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.top-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
main {
  max-width: 1920px;
  padding: 14px 20px 12px;
  margin: auto;
}
#app-view {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#app-view > .topbar {
  flex-shrink: 0;
}
#app-view > main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
}
#app-view > main > :not(.board) {
  flex-shrink: 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
}
.page-heading p {
  margin: 0;
}
.page-heading .primary {
  min-height: 32px;
  padding: 5px 12px;
}
.kpi-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px minmax(280px, 1.25fr);
  gap: 20px;
  align-items: center;
  min-height: 106px;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius);
}
.kpi-details > summary {
  display: none;
}
@media (max-height: 700px) {
  #app-view footer {
    display: none;
  }
  #app-view .board-meta {
    min-height: 30px;
  }
  .kpi-details > summary {
    display: list-item;
    cursor: pointer;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    margin-bottom: 8px;
    font-size: 12px;
  }
  #kpi-compact-value {
    float: right;
    color: var(--primary);
    font-weight: 600;
  }
}
.kpi-panel[data-zone="below_min"] {
  border-left-color: var(--danger);
}
.kpi-panel[data-zone="min"] {
  border-left-color: var(--warning);
}
.kpi-panel[data-zone="target"] {
  border-left-color: var(--primary);
}
.kpi-panel[data-zone="wow"] {
  border-left-color: var(--success);
}
.kpi-caption h2 {
  margin: 0 0 6px;
  font-size: 13px;
}
.kpi-period {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.kpi-period input {
  width: 170px;
  min-height: 28px;
  padding: 3px 7px;
  font-size: 12px;
}
.kpi-caption p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.kpi-result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
}
#kpi-value {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.kpi-zone {
  justify-self: start;
  font-size: 11px;
  font-weight: 650;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
}
#kpi-gap {
  grid-column: 1/-1;
  font-size: 11px;
  color: var(--muted);
}
.kpi-panel[data-zone="below_min"] .kpi-zone {
  background: #fff0eb;
  color: var(--danger);
}
.kpi-panel[data-zone="min"] .kpi-zone {
  background: #fff4dd;
  color: var(--warning);
}
.kpi-panel[data-zone="target"] .kpi-zone {
  background: #eef3fc;
  color: var(--primary);
}
.kpi-panel[data-zone="wow"] .kpi-zone {
  background: #eaf2ee;
  color: var(--success);
}
.kpi-panel[data-state="stale"] .kpi-zone {
  background: var(--bg);
  color: var(--muted);
}
.kpi-goals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  font-size: 11px;
}
.kpi-goals > span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.kpi-goals b {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.kpi-panel[data-zone="min"] [data-goal="min"] {
  border-color: var(--warning);
  background: #fff4dd;
  color: var(--warning);
}
.kpi-panel[data-zone="target"] [data-goal="target"] {
  border-color: var(--primary);
  background: #eef3fc;
  color: var(--primary);
}
.kpi-panel[data-zone="wow"] [data-goal="wow"] {
  border-color: var(--success);
  background: #eaf2ee;
  color: var(--success);
}
.kpi-meter {
  position: relative;
  height: 18px;
  margin-top: 6px;
}
.kpi-track {
  position: absolute;
  inset: 6px 0;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    #efdfdc 0% var(--kpi-min, 70%),
    #f4e7cc var(--kpi-min, 70%) var(--kpi-target, 80%),
    #dce8fc var(--kpi-target, 80%) var(--kpi-wow, 90%),
    #d6ecdf var(--kpi-wow, 90%) 100%
  );
}
.kpi-marker {
  position: absolute;
  left: clamp(6px, var(--kpi-value, 0%), calc(100% - 6px));
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--ink);
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--ink);
  transform: translateX(-50%) rotate(45deg);
  transition: left 0.18s;
}
.kpi-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 10px;
}
.kpi-method summary {
  color: var(--primary);
  cursor: pointer;
  text-underline-offset: 2px;
}
.kpi-method summary:hover {
  text-decoration: underline;
}
.kpi-method p {
  margin: 8px 0 0;
  line-height: 1.5;
  max-width: 470px;
  font-size: 11px;
}
.kpi-method[open] {
  flex-basis: 100%;
}
.kpi-panel[aria-busy="true"] #kpi-freshness {
  color: var(--muted);
}
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.view-tabs {
  display: flex;
  gap: 4px;
  margin-right: 8px;
}
.view-tabs button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
}
.view-tabs .active {
  background: var(--ink);
  color: white;
}
.search-label {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 400px;
}
.search-label span:not(.sr-only) {
  position: absolute;
  left: 10px;
  top: 3px;
  font-size: 20px;
  line-height: 24px;
  color: var(--muted);
}
.search-label input {
  padding-left: 32px;
}
.toolbar select {
  max-width: 200px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.check-label input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--primary);
}
input,
select,
textarea {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 5px 9px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
}
textarea {
  resize: none;
  min-height: 80px;
  line-height: 1.45;
}
.board-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
}
.board-meta p {
  margin: 0;
}
.board {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  align-items: stretch;
  min-height: 0;
  flex: 1;
  overflow-y: hidden;
  padding-bottom: 10px;
}
.column {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  flex: 0 0 auto;
  width: 420px;
  border-radius: var(--radius);
  background: #eaf0f6;
  border: 1px solid transparent;
  min-height: 0;
  padding: 10px;
  transition: border-color 0.12s;
}
.column[data-status="doing"] {
  background: #edf0fa;
}
.column[data-status="done"] {
  background: #eaf2ee;
}
.column.drop-target {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px #3655ee22;
}
.column-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 2px 10px;
}
.column-header h2 {
  font-size: 13px;
  font-weight: 650;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.column-header .status-mark {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #71849a;
}
.column[data-status="doing"] .status-mark {
  background: var(--primary);
}
.column[data-status="done"] .status-mark {
  background: var(--success);
}
.column-count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  background: #fff9;
  border-radius: 6px;
  padding: 1px 7px;
  color: var(--muted);
}
.column-header button {
  flex-shrink: 0;
  min-height: 28px;
  width: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 20px;
  color: var(--muted);
}
.column-header .column-settings {
  margin-left: auto;
}
.column-header [data-create] {
  margin-left: auto;
}
.column-header .column-settings + [data-create] {
  margin-left: 0;
}
.column-resize {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -5px;
  width: 12px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}
.column-resize::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 32px;
  top: 50%;
  left: 4px;
  border-radius: 3px;
  background: #71849a66;
}
.column-resize:hover {
  background: #3655ee12;
}
.resizing-column,
.resizing-column * {
  cursor: col-resize !important;
  user-select: none;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-card {
  flex-shrink: 0;
  background: white;
  border: 1px solid #e9edf5;
  border-radius: 8px;
  box-shadow: 0 2px 3px #11172d05;
  position: relative;
  overflow: hidden;
}
.task-card.dragging {
  opacity: 0.45;
}
.task-open {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  display: block;
  padding: 8px 10px;
  font-weight: 400;
  min-height: 0;
  background: white;
}
.task-open:hover {
  background: #f9fbfe;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 5px;
}
.task-number {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: #f0f3f7;
  color: var(--muted);
}
.badge.urgent {
  background: #fff0eb;
  color: #a43428;
}
.badge.normal {
  background: #eef3fc;
  color: #28599e;
}
.task-title {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
  display: block;
  overflow-wrap: anywhere;
}
.card-bottom {
  padding: 6px 10px;
  border-top: 1px solid #eef1f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.card-assignee {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.avatar {
  height: 20px;
  min-width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e7edf8;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}
.assignee-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}
.due {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.due.late {
  color: var(--danger);
  font-weight: 600;
}
.card-details-count {
  display: flex;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.column-empty {
  border: 1px dashed #c4cfdd;
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.column-empty p {
  margin: 0 0 8px;
}
.load-more {
  flex-shrink: 0;
  width: 100%;
  margin-top: 12px;
  background: #fff8;
}
.mobile-tabs {
  display: none;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  padding-top: 12px;
}
.banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: #fff1ee;
  border: 1px solid #f0d3cc;
  border-radius: 9px;
  color: #942f27;
  font-size: 13px;
}
.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: 1080px;
  margin: auto;
  gap: 100px;
  padding: 64px;
}
.login-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-brand .wordmark {
  font-size: 52px;
  letter-spacing: -4px;
}
.login-brand > span:last-child {
  color: var(--muted);
}
.login-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
}
.login-panel h1 {
  font-size: 24px;
  max-width: 260px;
}
.login-panel .small {
  margin: 24px 0 0;
}
.login-panel label,
form > label,
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 10px 0 4px;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  margin: 12px 0;
}
.form-error:empty {
  min-height: 0;
  margin: 0;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.field.full {
  grid-column: 1/-1;
}
.field .small {
  margin: 5px 0 0;
}
input[aria-invalid="true"] {
  border-color: var(--danger);
}
dialog {
  border: 0;
  color: var(--ink);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 18px 90px #11172d30;
  max-height: 92dvh;
  overflow: auto;
  scrollbar-gutter: stable;
}
dialog::backdrop {
  background: #16294370;
}
.compact-dialog {
  width: 460px;
  max-width: calc(100vw - 32px);
  padding: 20px;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.dialog-header h2 {
  margin: 0;
}
.close {
  font-size: 24px;
  line-height: 1;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.task-dialog {
  width: 740px;
  max-width: calc(100vw - 40px);
}
.task-head {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.task-head .eyebrow {
  letter-spacing: 1px;
}
.task-body {
  padding: 4px 20px 16px;
}
.task-body h2 {
  margin: 12px 0 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.task-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
}
.task-status label {
  font-size: 12px;
  white-space: nowrap;
  font-weight: 600;
}
.task-status select {
  max-width: 180px;
}
.task-status .telegram-link {
  margin-left: auto;
  font-size: 12px;
}
.section-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0 12px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.section-title h3 {
  margin: 0;
}
.upload-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.file-input {
  width: 0;
  height: 0;
  opacity: 0;
  position: absolute;
}
.photo-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.task-photos {
  margin-top: 8px;
}
.card-photos {
  padding: 0 10px 8px;
}
.photo-thumb,
.photo-more {
  width: 76px;
  height: 56px;
  flex: 0 0 76px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-failure {
  font-size: 10px;
  overflow-wrap: anywhere;
}
.photo-dialog {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 48px 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  color: white;
}
.photo-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}
.photo-dialog::backdrop {
  background: #091322e8;
}
.photo-dialog .close {
  position: absolute;
  top: 12px;
  right: 16px;
  color: white;
  background: #ffffff22;
  border: 0;
}
#photo-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.photo-dialog [hidden],
.photo-thumb [hidden] {
  display: none;
}
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.comment-list li {
  padding: 12px 0;
  border-bottom: 1px solid #edf1f6;
}
.comment-list header {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.comment-list p {
  font-size: 13px;
  margin: 6px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment-list time {
  font-size: 11px;
  color: var(--muted);
}
#comment-body {
  min-height: 60px;
  margin-top: 10px;
}
.task-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.user-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.user-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.user-list strong,
.user-list span {
  display: block;
}
.user-list span {
  font-size: 11px;
  color: var(--muted);
}
.user-list button {
  font-size: 12px;
}
.conflict {
  padding: 12px;
  border: 1px solid #edcabc;
  border-radius: 8px;
  background: #fff6f0;
  font-size: 13px;
  margin-top: 12px;
}
.conflict button {
  margin-top: 8px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: var(--ink);
  color: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px #11172d20;
  font-size: 13px;
  z-index: 50;
  max-width: 90vw;
}
.add-column {
  flex: 0 0 180px;
  align-self: flex-start;
  border: 1px dashed #a5b3c4;
  background: transparent;
  color: var(--muted);
  min-height: 38px;
}
.is-struck .task-title,
#task-heading.is-struck {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  color: var(--muted);
}
.automation-enabled {
  margin: 16px 0;
}
.automation-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
  padding: 12px;
}
.automation-actions legend {
  font-weight: 600;
  padding: 0 4px;
}
.automation-actions label {
  margin: 8px 0;
}
.automation-preview {
  border-left: 3px solid var(--primary);
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 4px;
  font-size: 12px;
}
@media (max-width: 1000px) {
  .kpi-panel {
    grid-template-columns: minmax(200px, 1fr) 160px;
    gap: 10px 16px;
  }
  .kpi-scale {
    grid-column: 1/-1;
  }
  main {
    padding: 14px 16px 12px;
  }
  .topbar {
    padding: 0 16px;
  }
  .board {
    gap: 12px;
  }
  .column {
    padding: 10px;
  }
  .toolbar {
    gap: 8px;
  }
  .search-label {
    max-width: none;
  }
  .view-tabs {
    margin-right: 0;
  }
  .toolbar select {
    max-width: 180px;
  }
  .card-bottom {
    flex-wrap: wrap;
  }
  .login-view {
    gap: 40px;
    padding: 40px;
  }
  .login-brand .wordmark {
    font-size: 54px;
  }
}
@media (max-width: 700px) {
  .kpi-panel {
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 10px;
    padding: 10px;
  }
  .kpi-caption h2 {
    font-size: 12px;
  }
  .kpi-period {
    gap: 5px;
    flex-wrap: wrap;
  }
  .kpi-period input {
    width: min(148px, 100%);
  }
  .kpi-caption p {
    font-size: 10px;
  }
  .kpi-result {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  #kpi-value {
    font-size: 28px;
  }
  #kpi-gap {
    font-size: 10px;
  }
  .kpi-goals > span {
    padding: 4px 7px;
  }
  .kpi-bottom {
    font-size: 10px;
  }
  .topbar {
    height: 48px;
    padding: 0 12px;
    gap: 12px;
  }
  .topbar .wordmark {
    font-size: 19px;
  }
  .workspace-label,
  .top-divider {
    display: none;
  }
  .top-actions {
    gap: 0;
  }
  .top-actions button {
    font-size: 11px;
    min-height: 36px;
    padding: 6px 9px;
  }
  main {
    padding: 12px;
  }
  .page-heading {
    margin-bottom: 10px;
    align-items: center;
    gap: 8px;
  }
  h1 {
    font-size: 20px;
  }
  .page-heading p {
    font-size: 12px;
    max-width: 180px;
  }
  .page-heading .primary {
    font-size: 12px;
    min-height: 36px;
    padding: 6px 10px;
    white-space: nowrap;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.4px;
  }
  .toolbar {
    gap: 8px;
  }
  .view-tabs {
    width: auto;
  }
  .search-label {
    flex: auto;
    width: 100%;
  }
  .toolbar > label:not(.search-label):not(.check-label) {
    flex: 1;
  }
  .toolbar select {
    max-width: 100%;
    font-size: 12px;
  }
  .check-label {
    margin-top: 0;
  }
  .mobile-tabs {
    display: flex;
    background: #e6ecf4;
    padding: 4px;
    border-radius: 9px;
    gap: 3px;
    margin-bottom: 8px;
    overflow-x: auto;
  }
  .mobile-tabs button {
    flex: 1 0 auto;
    white-space: nowrap;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    padding: 7px 5px;
    min-height: 36px;
  }
  .mobile-tabs .active {
    background: white;
    color: var(--ink);
    box-shadow: 0 1px 4px #11172d10;
  }
  .board {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0;
    gap: 6px;
  }
  .column {
    display: none;
    width: 100% !important;
    padding: 8px;
    min-height: 0;
    height: auto;
  }
  .column.mobile-active {
    display: flex;
    flex: 1;
  }
  .add-column {
    order: -1;
    flex: 0 0 auto;
    min-height: 30px;
    align-self: flex-end;
    font-size: 12px;
  }
  .column-resize {
    display: none;
  }
  .heading-actions {
    gap: 5px;
  }
  .heading-actions button {
    padding: 7px 9px;
    font-size: 12px;
  }
  .card-bottom {
    flex-wrap: nowrap;
  }
  .task-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
  }
  .task-head {
    padding: 10px 14px;
  }
  .task-body {
    padding: 0 14px 16px;
  }
  .field-grid {
    gap: 0 10px;
  }
  .field.full {
    grid-column: 1/-1;
  }
  .task-status {
    flex-wrap: wrap;
  }
  .task-status .telegram-link {
    margin-left: 0;
  }
  .task-foot {
    flex-wrap: wrap;
  }
  footer {
    font-size: 10px;
  }
  .login-view {
    display: block;
    padding: 30px 20px;
    max-width: 440px;
  }
  .login-brand {
    margin: 16px 0 28px;
    gap: 2px;
  }
  .login-brand .wordmark {
    font-size: 40px;
    letter-spacing: -2px;
  }
  .login-brand > span:last-child {
    font-size: 12px;
  }
  .login-panel {
    padding: 26px;
  }
  .login-panel h1 {
    font-size: 24px;
  }
  .compact-dialog {
    padding: 22px;
  }
  .task-card {
    touch-action: pan-y;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  button,
  .task-card,
  .column {
    border: 1px solid ButtonText;
  }
  :focus-visible {
    outline: 3px solid Highlight;
  }
}
@media (max-width: 700px) {
  .task-dialog {
    position: fixed;
    inset: 0;
  }
}
.upload-label:has(input:focus-visible) {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}
/* Approved reference: 1.png, 06 October 2026. Shared dashboard presentation. */
.ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.topbar {
  height: 54px;
  padding: 0 35px;
  border-color: var(--line);
  gap: 18px;
}
.wordmark {
  font-family: var(--font);
  font-size: 23px;
  letter-spacing: -1px;
  font-weight: 800;
}
.workspace-label {
  font-size: 15px;
}
.top-actions {
  gap: 12px;
}
.top-actions button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 15px;
  color: var(--muted);
}
.top-actions #logout-button {
  color: var(--ink);
}
.account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #929db3;
  color: white;
  font-size: 18px;
}
.top-actions #account-button {
  padding-top: 4px;
  padding-bottom: 4px;
}
#account-button .ui-icon {
  width: 14px;
  height: 14px;
  color: var(--ink);
}
#app-view > main {
  padding: 18px 35px 19px;
  max-width: none;
}
.page-heading {
  min-height: 50px;
  margin-bottom: 16px;
  gap: 16px;
}
.page-heading h1 {
  font: 700 28px/32px var(--font);
  letter-spacing: -0.6px;
}
.page-heading .page-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
  line-height: 18px;
  max-width: none;
}
.heading-actions {
  display: flex;
  gap: 12px;
}
.page-heading .heading-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 10px;
  box-shadow: 0 4px 13px #28385b05;
}
.heading-actions .primary {
  background: linear-gradient(135deg, #4863e8, #5269ed);
  border-color: #536cff;
  color: #fff;
}
.heading-actions .primary:hover {
  background: var(--primary-hover);
}
.kpi-panel {
  display: grid;
  grid-template-columns: 1.03fr 1.02fr 1.02fr 1.07fr 0.96fr 0.93fr;
  gap: 3px;
  padding: 0;
  margin: 0 0 12px;
  min-height: 82px;
  border: 0;
  background: transparent;
  border-radius: 0;
}
.metric {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 10px 13px;
  height: 82px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.metric-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #f1f2ff;
  color: #2844db;
}
.metric-icon .ui-icon {
  width: 28px;
  height: 28px;
}
.metric-icon.green {
  color: #00a665;
  background: #eaf7f1;
}
.metric-fresh .metric-icon {
  color: #566586;
  background: #f6f7fb;
}
.metric-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.metric-label,
.metric-period label {
  font-size: 12px;
  font-weight: 600;
  color: #677696;
  margin: 0 0 4px;
}
.metric strong {
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -0.6px;
  line-height: 1.15;
  color: var(--ink);
}
.metric-caption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.metric-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
#kpi-value {
  font-size: 29px;
  line-height: 1.15;
  letter-spacing: -0.6px;
}
#kpi-zone {
  background: transparent;
  padding: 0;
  font-size: 11px;
  color: #00945d;
  white-space: nowrap;
}
#kpi-panel[data-zone="below_min"] #kpi-zone {
  color: var(--danger);
}
#kpi-panel[data-state="stale"] #kpi-zone {
  color: var(--danger);
  white-space: normal;
}
.stat-overdue {
  color: #d32727;
}
.metric-period input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 8px 12px;
  border-color: var(--line);
  margin: 0;
  font-size: 13px;
  border-radius: 9px;
  font-weight: 600;
  background: #fff;
}
.metric-fresh strong {
  font-size: 19px;
  letter-spacing: 0;
}
.metric-done {
  gap: 15px;
}
.completion-ring {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  background: conic-gradient(#00a76a var(--completion, 0%), #ecf8f1 0);
  padding: 4px;
}
.completion-ring span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  font-size: 13px;
  font-weight: 700;
}
#kpi-info-dialog {
  width: min(540px, calc(100vw - 24px));
}
#kpi-info-dialog .kpi-scale {
  width: 100%;
}
#kpi-info-dialog #kpi-method-copy {
  margin-top: 22px;
}
.toolbar {
  border-bottom: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  min-height: 42px;
}
.toolbar .search-label {
  flex: 0 1 382px;
  min-width: 150px;
  margin: 0;
  height: 42px;
}
.search-label input {
  height: 42px;
  background: white;
  padding-left: 41px;
  font-size: 13px;
}
.search-label > span[aria-hidden] {
  left: 14px;
  top: 9px;
  font-size: 23px;
  line-height: 1;
}
.toolbar select {
  min-height: 42px;
  height: 42px;
  min-width: 160px;
  padding: 8px 14px;
  border-radius: 9px;
  border-color: var(--line);
  font-size: 13px;
  background: white;
}
.toolbar #urgency-filter {
  min-width: 184px;
}
.toolbar .check-label {
  flex-shrink: 0;
  font-size: 13px;
  color: #596b8d;
}
.check-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.view-tabs {
  order: 10;
  margin-left: auto;
  display: flex;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
}
.view-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 15px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}
.view-tabs button.active {
  background: #263349;
  border-color: #263349;
  color: white;
  box-shadow: 0 3px 8px #1e2b4220;
}
.view-tabs .ui-icon {
  width: 17px;
  height: 17px;
}
#list-view-button {
  width: 42px;
  padding: 10px;
}
#list-view-button[aria-pressed="true"] {
  color: var(--primary);
  border-color: var(--primary);
  background: #eff2ff;
}
.board-meta {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.board {
  gap: 16px;
  padding: 0 0 1px;
  align-items: stretch;
}
.column,
.column[data-status="doing"],
.column[data-status="done"] {
  background: var(--surface);
  border: 1px solid var(--column-line);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 2px 5px #24365208;
}
.column-header {
  height: 48px;
  min-height: 48px;
  padding: 10px 18px;
  gap: 14px;
  border-bottom: 1px solid var(--column-line);
  margin: 0;
}
.column-header h2 {
  font-size: 16px;
  font-weight: 700;
}
.column-header .status-mark {
  width: 13px;
  height: 13px;
  background: #8994aa;
  border-radius: 50%;
  box-shadow: inset 0 -2px 3px #30446b25;
}
.column[data-status="doing"] .status-mark {
  background: #284bff;
}
.column[data-status="done"] .status-mark {
  background: #00b273;
}
.column-count {
  min-width: 26px;
  padding: 1px 8px;
  border-radius: 12px;
  background: #f0f2f8;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}
.column-header button {
  color: #52648a;
  font-size: 23px;
}
.card-list {
  padding: 10px 12px 12px;
  gap: 5px;
}
.task-card {
  padding: 8px 16px 10px;
  border: 1px solid #fff;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 15px #1c315809;
}
.task-card:hover {
  border-color: #dbe1f2;
  box-shadow: 0 5px 16px #1c315823;
}
.task-open {
  padding: 0;
}
.card-top {
  justify-content: flex-start;
  gap: 15px;
  margin-bottom: 5px;
}
.task-number {
  color: #7a88a3;
  font-size: 10px;
  font-weight: 600;
}
.badge {
  border: 0;
  border-radius: 6px;
  background: #f0f2f7;
  color: #64738c;
  font-size: 10px;
  padding: 1px 7px;
  font-weight: 650;
  line-height: 1.3;
  text-transform: capitalize;
}
.badge.urgent {
  color: var(--danger);
  background: #fff0ed;
}
.badge.normal {
  color: #345abc;
  background: #eef3ff;
}
.task-title {
  font: 600 14px/1.23 var(--font);
  color: var(--ink);
  margin: 0;
}
.card-bottom {
  padding: 0;
  border-top: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-height: 28px;
}
.card-meta-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.card-meta-right .ui-icon {
  width: 15px;
  height: 15px;
}
.due {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4e607c;
  font-size: 11px;
  font-weight: 600;
  white-space: normal;
}
.due.late {
  color: var(--danger);
  background: #ffe7e4;
  border: 1px solid #efc2bd;
  border-radius: 5px;
  padding: 3px 5px;
}
.card-comment,
.card-menu {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 2px;
  min-height: 28px;
  color: #627598;
  font-size: 11px;
}
.card-menu {
  font-size: 20px;
  min-width: 16px;
}
.card-photos {
  margin: 0;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 1;
}
.card-photos .photo-thumb,
.card-photos .photo-more {
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex: 0 0 30px;
  border: 0;
  border-radius: 7px;
}
.card-photos .photo-more {
  padding: 0;
  font-size: 11px;
  color: #52648a;
  background: #f0f2f8;
}
.card-photos .photo-failure {
  font-size: 7px;
  padding: 0;
}
.column-empty {
  flex: 1;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 5px 55px;
  color: var(--ink);
  text-align: center;
}
.empty-illustration {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  position: relative;
  margin-bottom: 20px;
  border-radius: 17px;
  background: linear-gradient(135deg, #f1f2ff, #e8ecff);
  color: #244bff;
}
.empty-illustration > .ui-icon {
  width: 36px;
  height: 36px;
  stroke-width: 1.6;
}
.empty-plus {
  position: absolute;
  right: -8px;
  bottom: -3px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #2145eb;
  border-radius: 50%;
  color: white;
  border: 2px solid white;
}
.empty-plus .ui-icon {
  width: 17px;
  height: 17px;
}
.column-empty p {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 5px;
}
.empty-hint {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 22px;
}
.empty-create {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  min-height: 46px;
  border: 1px solid #8593ff;
  color: #2149ff;
  border-radius: 10px;
  background: white;
}
.column[data-status="done"] .empty-illustration {
  background: #e1f4ec;
  color: #00a469;
}
.column[data-status="done"] .empty-create {
  color: #009758;
  border-color: #70cfab;
}
.add-column {
  align-self: flex-start;
  flex: 0 0 220px;
  width: 220px;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 0 12px;
  border: 1px dashed #a7b5ca;
  border-radius: 12px;
  background: #ffffff66;
  text-align: left;
  font-size: 14px;
  color: var(--ink);
}
.new-column-title {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 10px 6px;
  flex-shrink: 0;
}
.new-column-title .ui-icon {
  color: #6a7898;
  width: 17px;
  height: 17px;
}
.new-column-body {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 1px dashed #d6ddef;
  border-radius: 11px;
  flex: 1;
  width: 100%;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  font-weight: 400;
  padding: 20px 10px 70px;
}
.new-column-plus {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eff0ff;
  color: #2444d5;
}
.new-column-plus .ui-icon {
  width: 27px;
  height: 27px;
}
#app-view footer {
  display: none;
}
.board.list-layout {
  flex-direction: column;
  overflow-y: auto;
}
.board.list-layout .column {
  width: 100% !important;
  height: auto;
  flex: 0 0 auto;
}
.board.list-layout .card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  overflow: visible;
}
.board.list-layout .column-empty {
  min-height: 0;
  padding: 16px;
}
.board.list-layout .empty-illustration,
.board.list-layout .empty-hint,
.board.list-layout .column-resize {
  display: none;
}
.board.list-layout .add-column {
  min-height: 52px;
  flex: 0 0 auto;
  width: 100%;
}
.board.list-layout .new-column-body {
  display: none;
}
@media (max-width: 1550px) and (min-width: 1001px) {
  .metric {
    gap: 10px;
    padding: 12px;
  }
  .metric-icon {
    width: 43px;
    height: 48px;
    flex-basis: 43px;
    border-radius: 12px;
  }
  .metric-icon .ui-icon {
    width: 25px;
    height: 25px;
  }
  .metric-label,
  .metric-period label {
    font-size: 11px;
  }
  .metric-caption {
    font-size: 11px;
  }
  .completion-ring {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
    padding: 3px;
  }
  .completion-ring span {
    font-size: 10px;
  }
  .metric-value-row {
    gap: 5px;
  }
  .toolbar select {
    min-width: 140px;
  }
  .toolbar #urgency-filter {
    min-width: 160px;
  }
}
@media (max-width: 1000px) {
  .topbar {
    padding: 0 18px;
  }
  #app-view > main {
    padding: 16px 18px;
  }
  .kpi-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .metric {
    height: 80px;
    padding: 10px;
    gap: 10px;
  }
  .metric-icon {
    flex-basis: 40px;
    width: 40px;
    height: 46px;
    border-radius: 12px;
  }
  .metric-icon .ui-icon {
    width: 24px;
    height: 24px;
  }
  .metric strong,
  #kpi-value {
    font-size: 25px;
  }
  .metric-fresh strong {
    font-size: 17px;
  }
  .completion-ring {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    padding: 3px;
  }
  .completion-ring span {
    font-size: 10px;
  }
  .metric-caption {
    font-size: 11px;
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .toolbar .search-label {
    flex: 1 1 250px;
  }
  .toolbar select,
  .toolbar #urgency-filter {
    min-width: 140px;
  }
  .view-tabs {
    margin-left: auto;
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 12px;
    gap: 8px;
    height: 50px;
  }
  .wordmark {
    font-size: 20px;
  }
  .top-actions {
    gap: 3px;
  }
  .top-actions button {
    padding: 5px 6px;
    gap: 4px;
    min-height: 34px;
    font-size: 11px;
  }
  .top-actions .ui-icon,
  .account-avatar {
    display: none;
  }
  #app-view > main {
    padding: 12px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    min-height: 0;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading .page-subtitle {
    font-size: 12px;
  }
  .heading-actions {
    width: 100%;
    gap: 8px;
  }
  .page-heading .heading-actions button {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12px;
  }
  .kpi-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 12px;
    gap: 5px;
  }
  .metric {
    height: 74px;
    gap: 7px;
    padding: 8px;
    border-radius: 10px;
  }
  .metric-icon {
    flex-basis: 30px;
    width: 30px;
    height: 38px;
    border-radius: 9px;
  }
  .metric-icon .ui-icon {
    width: 21px;
    height: 21px;
  }
  .metric-label,
  .metric-period label {
    font-size: 10px;
  }
  .metric strong,
  #kpi-value {
    font-size: 23px;
  }
  .metric-caption {
    font-size: 10px;
  }
  .metric-period input {
    padding: 4px;
    height: 31px;
    font-size: 10px;
  }
  .metric-value-row {
    gap: 5px;
  }
  #kpi-zone {
    font-size: 9px;
  }
  .metric-fresh strong {
    font-size: 16px;
  }
  .metric-done .metric-icon {
    display: none;
  }
  .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 8px;
    gap: 6px;
  }
  .toolbar .search-label {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
  .toolbar label {
    min-width: 0;
  }
  .toolbar select,
  .toolbar #urgency-filter {
    min-width: 0;
    width: 100%;
    padding: 7px;
    height: 34px;
    min-height: 34px;
    font-size: 11px;
  }
  .toolbar .search-label,
  .search-label input {
    height: 34px;
  }
  .search-label > span[aria-hidden] {
    top: 5px;
  }
  .toolbar .check-label {
    font-size: 11px;
  }
  .view-tabs {
    order: 10;
    grid-column: 1 / -1;
    width: 100%;
    gap: 7px;
  }
  .view-tabs button {
    height: 34px;
    min-height: 34px;
    padding: 6px 11px;
    font-size: 11px;
  }
  #list-view-button {
    margin-left: auto;
    width: 34px;
  }
  .mobile-tabs {
    margin-bottom: 7px;
  }
  .board {
    gap: 0;
  }
  .column-header {
    min-height: 43px;
    height: 43px;
    padding: 8px 12px;
    gap: 8px;
  }
  .column-header h2 {
    font-size: 14px;
  }
  .card-list {
    padding: 8px;
  }
  .task-card {
    padding: 8px 11px;
  }
  .task-title {
    font-size: 13px;
  }
  .card-meta-right {
    gap: 7px;
  }
  .card-photos {
    gap: 4px;
  }
  .card-photos .photo-thumb,
  .card-photos .photo-more {
    width: 25px;
    height: 25px;
    min-height: 25px;
    flex-basis: 25px;
  }
  .column-empty {
    min-height: 190px;
    padding: 12px;
  }
  .empty-illustration {
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
  }
  .empty-illustration > .ui-icon {
    width: 25px;
    height: 25px;
  }
  .empty-hint {
    font-size: 12px;
    margin-bottom: 12px;
  }
  .empty-create {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12px;
  }
  .add-column {
    height: 34px;
    min-height: 34px;
    width: 100%;
    flex: 0 0 34px;
    margin-bottom: 7px;
    padding: 0 10px;
  }
  .new-column-title {
    height: 32px;
    padding: 4px;
    font-size: 12px;
  }
  .new-column-body {
    display: none;
  }
  .board.list-layout {
    display: flex;
    gap: 7px;
  }
  .board.list-layout .column {
    display: flex;
  }
  .board.list-layout .card-list {
    grid-template-columns: 1fr;
  }
}
@media (max-height: 700px) {
  .page-heading {
    margin-bottom: 8px;
  }
  .kpi-details {
    margin-bottom: 8px;
  }
  .kpi-details[open] .kpi-panel {
    max-height: 190px;
    overflow-y: auto;
  }
}

.column-resize::after {
  opacity: 0;
}
.column-resize:hover::after,
.column-resize:focus-visible::after {
  opacity: 1;
}
.column-empty {
  border: 0;
  background: transparent;
}
@media (max-width: 700px) and (max-height: 700px) {
  .board > .add-column {
    display: none;
  }
  .page-heading .page-subtitle {
    display: none;
  }
  .page-heading {
    gap: 6px;
  }
  .page-heading .heading-actions button {
    min-height: 30px;
    padding: 4px 10px;
  }
  .mobile-tabs button {
    min-height: 30px;
    padding: 4px 5px;
  }
}
.toolbar select {
  font-weight: 600;
}
/* Motion is feedback, not an automatic refresh effect. */
@property --completion {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}
.completion-ring {
  transition: --completion 300ms var(--motion-ease);
}
button {
  transition:
    background var(--motion-fast),
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    transform var(--motion-fast);
}
button:active:not(:disabled):not(.task-open):not(.column-resize) {
  transform: scale(0.97);
}
.heading-actions button:hover:not(:disabled),
.top-actions button:hover:not(:disabled) {
  box-shadow: 0 3px 10px #253c7014;
}
dialog[open]:not(:where(#photo-dialog)) {
  animation: dialog-arrive var(--motion-base) var(--motion-ease);
}
dialog[open]::backdrop {
  animation: backdrop-arrive var(--motion-base) ease-out;
}
@keyframes dialog-arrive {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes backdrop-arrive {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
#photo-dialog.photo-closing::backdrop {
  animation: backdrop-leave 180ms ease-in forwards;
}
@keyframes backdrop-leave {
  to {
    opacity: 0;
  }
}
.task-card.dragging {
  opacity: 0.7;
  transform: translateY(-3px) rotate(-0.6deg);
  box-shadow: 0 12px 24px #182d4628;
}
.motion-drop-slot {
  flex: 0 0 auto;
  border: 1px dashed var(--primary);
  border-radius: 12px;
  background: #3655ee0b;
  pointer-events: none;
}
.card-list:has(.motion-drop-slot) .column-empty {
  display: none;
}
.motion-number {
  position: relative;
  color: transparent !important;
}
.motion-number::after {
  content: attr(data-motion-value);
  position: absolute;
  inset: 0;
  color: var(--ink);
  white-space: nowrap;
}
.motion-check {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  background: var(--success);
  margin-left: 10px;
  vertical-align: middle;
}
.task-card > .motion-check {
  position: absolute;
  right: 12px;
  top: 8px;
  margin: 0;
}
.motion-check svg {
  width: 20px;
  height: 20px;
}
.motion-check path {
  stroke-dasharray: 28;
  stroke-dashoffset: 0;
  animation: check-draw 230ms ease-out;
}
@keyframes check-draw {
  from {
    stroke-dashoffset: 28;
  }
}
.motion-strike .task-title,
#task-heading.motion-strike {
  position: relative;
}
.motion-strike .task-title::after,
#task-heading.motion-strike::after {
  content: "";
  position: absolute;
  height: 1px;
  left: 0;
  right: 0;
  top: 50%;
  background: currentColor;
  transform-origin: left;
  animation: strike-draw 230ms ease-out;
}
@keyframes strike-draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@media (max-width: 700px) {
  #task-dialog[open] {
    animation: sheet-arrive 250ms var(--motion-ease);
  }
  @keyframes sheet-arrive {
    from {
      opacity: 0.4;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .task-card.dragging,
  button:active:not(:disabled) {
    transform: none !important;
  }
}
/* Task editor: content first, compact task properties. */
.task-dialog {
  width: 1080px;
  max-width: calc(100vw - 48px);
}
.task-head {
  padding: 7px 20px;
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}
.task-body {
  padding: 18px 24px 16px;
}
.task-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 26px;
  align-items: start;
}
.task-main-content {
  min-width: 0;
}
.task-title-field {
  margin: 0 0 14px;
}
#task-title {
  display: block;
  width: 100%;
  min-height: 36px;
  max-height: 140px;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.35;
  resize: none;
}
#task-title:hover:not(:disabled),
#task-title:focus {
  border-color: var(--line);
  background: #fafbfe;
}
#task-heading.is-struck #task-title {
  text-decoration: line-through;
}
.task-description-field label {
  margin: 0 0 7px;
  font-size: 13px;
}
#task-description {
  min-height: 300px;
  height: clamp(300px, 43dvh, 560px);
  padding: 15px 16px;
  font-size: 14px;
  line-height: 1.65;
  border-radius: 10px;
  background: #fcfdff;
}
.task-materials {
  margin-top: 17px;
}
.task-materials .section-title {
  margin-bottom: 8px;
  min-height: 30px;
}
.task-materials h3 {
  font-size: 13px;
  margin: 0;
}
.task-materials .task-photos {
  margin: 0;
  gap: 10px;
}
.task-materials .photo-thumb {
  flex: 0 0 110px;
  width: 110px;
  height: 82px;
  border-radius: 9px;
}
.materials-empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
}
.task-properties {
  padding-left: 20px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 11px;
}
.task-properties .field label {
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 4px;
  font-weight: 500;
}
.task-properties input,
.task-properties select {
  min-height: 30px;
  height: 30px;
  font-size: 12px;
  padding: 4px 7px;
  background: #f8f9fc;
  border-color: transparent;
}
.task-properties input:hover,
.task-properties select:hover,
.task-properties input:focus,
.task-properties select:focus {
  border-color: var(--line);
  background: white;
}
.property-value {
  display: block;
  padding: 5px 7px;
  font-size: 12px;
}
.task-properties .telegram-link {
  font-size: 11px;
  line-height: 1.5;
  margin-top: 4px;
}
.task-save-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding: 12px 0;
  margin-top: 8px;
  background: #ffffffed;
  border-bottom: 1px solid var(--line);
}
.task-comments {
  padding-top: 14px;
}
.task-comments h3 {
  font-size: 12px;
  margin-bottom: 8px;
}
.task-comments .comment-list:empty {
  display: none;
}
#comment-body {
  min-height: 40px;
  height: 40px;
  font-size: 12px;
  padding: 10px;
}
#comment-body:focus {
  min-height: 72px;
}
.task-comments .dialog-actions {
  margin-top: 7px;
}
.task-comments .dialog-actions button {
  font-size: 11px;
  min-height: 28px;
  padding: 4px 9px;
}
.task-foot {
  gap: 8px;
  padding-top: 10px;
}
.task-foot button {
  font-size: 11px;
}
@media (min-width: 701px) and (max-width: 900px) {
  .task-editor-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .task-properties {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 0 0;
  }
}
@media (max-width: 700px) {
  .task-dialog {
    width: 100vw;
    max-width: 100vw;
  }
  .task-head {
    padding: 6px 12px;
  }
  .task-body {
    padding: 12px;
  }
  .task-editor-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #task-title {
    font-size: 17px;
  }
  #task-description {
    min-height: 260px;
    height: 42dvh;
    padding: 12px;
    font-size: 14px;
  }
  .task-properties {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .task-properties .telegram-link {
    align-self: center;
  }
  .task-materials .photo-thumb {
    flex-basis: 90px;
    width: 90px;
    height: 68px;
  }
  .task-save-actions {
    gap: 7px;
  }
}
/* Urgency stays readable as both a word and a colored card. */
.task-card.urgency-urgent {
  --card-tint: #fff1f0;
  --card-edge: #df5350;
}
.task-card.urgency-planned {
  --card-tint: #eef3ff;
  --card-edge: #527bed;
}
.task-card.urgency-normal {
  --card-tint: #edf8f1;
  --card-edge: #36a46b;
}
.task-card[class*="urgency-"] {
  background: var(--card-tint);
  border-color: var(--card-tint);
  border-left: 3px solid var(--card-edge);
}
.task-card[class*="urgency-"]:hover {
  border-color: var(--card-edge);
}
.task-card[class*="urgency-"] .task-open {
  background: transparent;
}
.urgency-planned .badge {
  color: #3159bf;
  background: #dfe9ff;
}
.urgency-normal .badge {
  color: #24754a;
  background: #d9efdf;
}
.urgency-urgent .badge {
  color: #ad302d;
  background: #ffe0dc;
}
.navigation-toggle {
  position: fixed;
  z-index: 3;
  top: 18px;
  left: 10px;
  width: 30px;
  height: 38px;
  padding: 0;
  font-size: 30px;
  line-height: 1;
  color: var(--primary);
  box-shadow: 0 3px 12px #253c7010;
}
#navigation-dialog {
  position: fixed;
  inset: 0 auto 0 0;
  margin: 0;
  width: 248px;
  max-width: calc(100vw - 42px);
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0 14px 14px 0;
  background: white;
  padding: 0;
  overflow-y: auto;
}
#navigation-dialog[open] {
  animation: navigation-arrive 240ms var(--motion-ease);
}
@keyframes navigation-arrive {
  from {
    opacity: 0.5;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
#navigation-close {
  position: absolute;
  right: 10px;
  top: 14px;
  font-size: 30px;
}
#navigation-dialog .topbar {
  height: 100%;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 24px 18px;
  border: 0;
  background: white;
}
#navigation-dialog .wordmark {
  align-self: flex-start;
  margin-right: 35px;
}
#navigation-dialog .top-divider {
  display: none;
}
#navigation-dialog .workspace-label {
  display: block;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
#navigation-dialog .top-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  gap: 10px;
  flex: 1;
}
#navigation-dialog .top-actions button {
  justify-content: flex-start;
  padding: 10px 12px;
  min-height: 42px;
  font-size: 13px;
}
#navigation-dialog .top-actions .ui-icon {
  display: inline;
}
#navigation-dialog .account-avatar {
  display: grid;
}
#navigation-dialog #logout-button {
  margin-top: auto;
}
#app-view > main {
  padding-left: 56px;
}
.toolbar {
  justify-content: flex-end;
}
.toolbar .view-tabs {
  margin-left: auto;
}
@media (max-width: 700px) {
  #app-view > main {
    padding-left: 12px;
  }
  .page-heading > div:first-child {
    padding-left: 34px;
  }
  .navigation-toggle {
    top: 10px;
    left: 7px;
    width: 28px;
    height: 32px;
    min-height: 32px;
  }
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .toolbar .view-tabs {
    width: auto;
    flex: 1;
    justify-content: flex-end;
  }
  #list-view-button {
    margin-left: 0;
  }
}
