:root {
  --bg: #e8efe6;
  --bg-deep: #d4e0d1;
  --paper: var(--cell-bg);
  --ink: #1a2a22;
  --muted: color-mix(in srgb, var(--ink) 62%, var(--cell-bg));
  --line: #b8c9bc;
  --selection: #333333;
  --selection-width: 2px;
  --accent: var(--header);
  --accent-soft: color-mix(in srgb, var(--header) 14%, var(--cell-bg));
  --danger: #9b2c2c;
  --header: #2a3d34;
  --header-ink: #eef6f1;
  --cell-bg: #ffffff;
  --cell-font-size: 0.92rem;
  --header-font-size: 0.9rem;
  --shadow: 0 12px 40px rgba(26, 42, 34, 0.12);
  --mono: "Golos Text", system-ui, sans-serif;
  --sans: "Golos Text", system-ui, sans-serif;
  --done-bg: #c9d0cb;
  --done-ink: color-mix(in srgb, var(--ink) 60%, var(--done-bg));
  --check: #1f6b4a;
  --await-bg: #fde2ec;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
}

.hidden { display: none !important; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(380px, 100%);
  background: var(--paper);
  padding: 28px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}
.login-brand {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.field { display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.field input {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
.form-error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 0.9rem; }

.btn {
  font: inherit;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--header-ink);
}
.login-screen .btn-primary { color: #fff; }
.btn-ghost { background: transparent; }
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.btn-icon svg { display: block; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px 12px 16px;
  background: color-mix(in srgb, var(--cell-bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  z-index: 20;
}
.project-filter {
  position: relative;
  min-width: 220px;
}
.project-filter-native {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.project-filter-btn {
  font: inherit;
  width: 100%;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 28px 8px 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231a2a22' d='M1.5 2 L6 6.5 L10.5 2 Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.project-filter-btn:focus,
.project-filter-btn:focus-visible,
.project-filter-btn:active {
  outline: none;
  box-shadow: none;
  border-color: var(--line);
}
.project-filter.is-open .project-filter-btn {
  border-radius: 10px 10px 0 0;
  border-bottom-color: transparent;
}
.project-filter-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  padding-bottom: 4px;
}
.project-filter-menu[hidden] { display: none; }
.project-filter-option {
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}
.project-filter-option:last-child {
  border-radius: 0 0 10px 10px;
}
.project-filter-option:hover,
.project-filter-option[aria-selected="true"] {
  background: var(--header);
  color: var(--header-ink);
}
.topbar-spacer { flex: 1; min-width: 8px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

#app-shell {
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.grid-wrap {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.grid-wrap::-webkit-scrollbar {
  width: 8px;
}
.grid-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.grid-wrap::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
}
.grid-wrap::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--line) 80%, var(--ink));
}

.sheet {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--cell-bg);
  box-shadow: none;
  border-radius: 0;
  width: 100%;
  max-width: 100%;
}
.col-project { width: 13%; }
.col-date { width: 10%; }
.col-materials { width: 21%; }
.col-julia { width: 24%; }
.col-emil { width: 24%; }
.col-done { width: 8%; }
.sheet th, .sheet td {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  padding: 0;
}
.sheet thead th {
  border-top: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 6;
}
.sheet th:first-child,
.sheet td.cell-project {
  border-left: 1px solid var(--line);
}

.col-head {
  position: sticky;
  top: 0;
  background: var(--header);
  color: var(--header-ink);
  font-weight: 600;
  font-size: var(--header-font-size);
  height: 36px;
}
.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}
.col-head-inner {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  min-height: 36px;
}
.col-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sheet td {
  background: var(--cell-bg);
  color: var(--ink);
  font-size: var(--cell-font-size);
  line-height: 1.4;
  padding: 6px 10px;
  vertical-align: top;
  overflow: hidden;
}
.cell-text {
  display: block;
  box-sizing: border-box;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cell-project {
  font-weight: 700;
  overflow-wrap: anywhere;
  background: var(--cell-bg);
  color: var(--ink);
  position: relative;
}
.cell-project:has(.pack-fold),
.cell-pack-fold {
  padding-right: 28px;
}
.cell-done {
  text-align: center;
  cursor: pointer;
}
.done-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  vertical-align: top;
  border: 1.5px solid var(--check);
  border-radius: 4px;
  background: #fff;
  color: #fff;
  cursor: pointer;
}
.done-check svg { display: none; }
.done-check.is-on { background: var(--check); }
.done-check.is-on svg { display: block; }

.row-done td:not(.cell-project) {
  background: var(--done-bg);
  color: var(--done-ink);
}
.row-done .cell-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 1.4em;
  transition: max-height 0.22s ease;
}
.row-done.is-open .cell-text {
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: unset;
  max-height: 40em;
}
.row-done {
  cursor: pointer;
}
tr.row-done-extras.is-folded {
  pointer-events: none;
}
.sheet td.cell-extras {
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  vertical-align: top;
  line-height: 0;
  font-size: inherit;
}
.sheet .extras-sheet td:first-child {
  border-left: 0;
}
.fold-inner {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s ease-in-out;
}
tr.row-done-extras:not(.is-folded) .fold-inner {
  grid-template-rows: 1fr;
}
.fold-clip {
  min-height: 0;
  overflow: hidden;
}
.extras-sheet {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
}
.extras-sheet td:first-child {
  border-left: 0;
}
.pack-fold {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 4;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--header);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pack-fold:hover {
  color: var(--ink);
}
.pack-fold svg {
  display: block;
  transform: rotate(180deg);
  transition: transform 0.42s ease-in-out;
}
.pack-fold.is-open svg {
  transform: rotate(0deg);
}

/* ---- MyWorkTaskExchange ---- */
.login-screen {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  --accent: #6a6dc2;
  --accent-soft: #2c2e58;
  --line: #3c3f6e;
  --ink: #dfe1f6;
  --muted: #9a9dc6;
  --danger: #e08aa3;
  --paper: #20223f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 15% -10%, #2c2f5e 0%, transparent 60%),
    radial-gradient(800px 600px at 100% 110%, #2e2756 0%, transparent 55%),
    linear-gradient(160deg, #12132a 0%, #191a38 55%, #1f1c42 100%);
}
.login-screen .login-brand { color: #a9acf2; }
.login-screen .field input,
.login-screen .user-card {
  background: #1a1b35;
  color: var(--ink);
  border-color: var(--line);
}
.login-screen .user-card.is-on {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.login-brand { font-size: 1.6rem; }
.login-screen .field input { outline: none; }
.login-screen .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.login-screen .btn:hover { border-color: var(--accent); }
.login-screen .btn-primary:disabled { opacity: 0.55; cursor: default; }
.user-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.user-card {
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}
.user-card.is-on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--accent-soft);
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  display: block;
}

/* шапка */
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .btn { white-space: nowrap; flex: 0 0 auto; }
.topbar-actions { align-items: center; }
.presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 6px;
}
.presence-slot { width: 32px; height: 32px; border-radius: 50%; }
.presence-slot.is-off { visibility: hidden; }
.presence-slot .avatar { width: 32px; height: 32px; }
.btn-tab { min-width: 92px; }
.btn-tab.is-on,
.btn-tab-icon.is-on {
  background: var(--header);
  border-color: var(--header);
  color: var(--header-ink);
}

/* ячейки */
.sheet td { font-family: var(--sans); }
.cell-date { font-variant-numeric: tabular-nums; }
.cell-date .cell-text { white-space: pre-wrap; }
.cell-edit { cursor: text; }
.cell-edit:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.cell-editor {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sheet td.is-editing { box-shadow: inset 0 0 0 1px var(--accent); }
.sheet td.is-dragover { box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }

.cell-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.row-done .cell-link { color: inherit; }

.sheet td.cell-files { position: relative; }
.mat-list { display: grid; gap: 4px; line-height: 1.35; }
.mat-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-file {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 2px 0;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.mat-file:hover .mat-name { text-decoration: underline; }
.mat-file-ico { flex: 0 0 auto; display: block; }
.mat-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-size { color: var(--muted); font-size: 0.8em; }
.mat-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.mat-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: #fff;
  display: block;
}
.mat-status {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--cell-bg);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mat-status.is-error { color: var(--danger); }
.mat-summary { display: none; color: var(--done-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-done:not(.is-open) .mat-list > * { display: none; }
.row-done:not(.is-open) .mat-list > .mat-summary { display: block; }
.row-done .mat-file { color: var(--done-ink); }

.cell-done.is-readonly,
.done-check.is-readonly { cursor: default; }

/* просмотр картинки */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 18, 14, 0.85);
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 16px;
  gap: 12px;
}
.viewer img {
  max-width: 100%;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}
.viewer-bar { display: flex; align-items: center; gap: 10px; max-width: 100%; }
.viewer-name { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50vw; }
.viewer-bar .btn { text-decoration: none; }

/* логи */
.logs-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.logs-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.seg-btn {
  font: inherit;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 7px 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.seg-btn:last-child { border-right: 0; }
.seg-btn.is-on { background: var(--header); color: var(--header-ink); }
.logs-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.logs-table td { overflow-wrap: anywhere; }
.logs-table td:first-child { border-left: 1px solid var(--line); }
.log-time, .log-ip { font-variant-numeric: tabular-nums; }
.log-anon { color: var(--muted); }
.logs-table tr.log-fail td { background: #f6e3e3; }
.logs-more { padding: 12px 16px 24px; min-height: 64px; }

/* настройки */
.settings-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.settings-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.settings-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-head h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.settings-col { display: grid; gap: 20px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px 20px;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--ink) 6%, transparent);
}
.card h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.set-row:first-of-type { border-top: 0; }
.swatch {
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 138px;
  height: 34px;
  padding: 0 10px 0 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.swatch:hover, .swatch.is-active { border-color: var(--accent); }
.swatch-chip {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex: 0 0 auto;
}
.swatch-hex { font-size: 0.85rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.stepper {
  display: inline-flex;
  align-items: center;
  width: 138px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.step-btn {
  font: inherit;
  width: 36px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.05rem;
}
.step-btn:hover { background: var(--accent-soft); }
.step-val {
  flex: 1;
  text-align: center;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.preview {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px;
}
.preview-sheet { width: 100%; }
.preview-sheet td:first-child { border-left: 1px solid var(--line); }
.card .field { margin-bottom: 12px; }
.card .field input {
  outline: none;
}
.card .field input:focus { border-color: var(--accent); }
.tg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.tg-foot .form-error { flex: 1; min-height: 1.2em; }
.btn-save { min-width: 140px; }

/* выбор цвета */
.color-pop {
  position: fixed;
  z-index: 95;
  width: 248px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}
.cp-sv {
  position: relative;
  height: 150px;
  border-radius: 10px;
  cursor: crosshair;
  touch-action: none;
}
.cp-sv-white, .cp-sv-black {
  position: absolute;
  inset: 0;
  border-radius: 10px;
}
.cp-sv-white { background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.cp-sv-black { background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)); }
.cp-sv-knob {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.cp-hue {
  position: relative;
  height: 14px;
  border-radius: 7px;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
.cp-hue-knob {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.color-hex { display: flex; align-items: center; gap: 8px; }
.color-hex-preview { width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); flex: 0 0 auto; }
.color-hex input {
  font: inherit;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  outline: none;
  color: var(--ink);
}
.color-hex input:focus { border-color: var(--accent); }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; }
  .topbar-left { flex: 1 1 100%; }
  .topbar-left .project-filter { flex: 1; min-width: 0; }
  .project-filter-btn { min-width: 0; }
  .topbar-spacer { display: none; }
  .topbar-actions { flex: 1 1 100%; justify-content: flex-end; flex-wrap: nowrap; }
  .logs-bar { flex-wrap: wrap; }
  .settings-grid { grid-template-columns: 1fr; }
}
.sheet tr.row-new td { height: calc(1.4em + 12px); }
#sheet-body td.cell-project { padding-right: 36px; }
.add-row {
  position: absolute;
  right: 5px;
  top: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--header);
  border-radius: 50%;
  background: transparent;
  color: var(--header);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.add-row.is-shifted { right: 28px; }
.add-row svg { display: block; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 18, 14, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal-panel {
  width: min(420px, 100%);
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 12px;
}
.modal-panel h2 { margin: 0; font-size: 1.15rem; }
.modal-panel .field input { outline: none; }
.modal-panel .field input:focus { border-color: var(--accent); }
.modal-panel .form-error { min-height: 1.2em; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; }
.sheet td.is-awaiting { background: var(--await-bg); }
.mat-list > .cell-text { min-height: 1lh; }
.topbar .btn,
.project-filter-btn,
.project-filter-btn:focus,
.project-filter-btn:active,
.logs-bar .btn,
.seg,
.page-head .btn {
  border-color: color-mix(in srgb, var(--line) 45%, transparent);
}
.project-filter-menu { border-color: color-mix(in srgb, var(--line) 45%, transparent); }
