:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color-scheme: light;
  --page: #fff;
  --sidebar: #f6f6f7;
  --panel: #fff;
  --raised: #f3f4f6;
  --hover: #eeeef1;
  --line: #e5e6ea;
  --ink: #272930;
  --muted: #646873;
  --button-ink: #fff;
  --chart-blue: #4779d4;
  --chart-blue-end: #8aabed;
  --chart-violet: #8b70c1;
  --chart-violet-end: #b7a1dd;
  --chart-rose: #c66f8b;
  --chart-rose-end: #e4a6ba;
  --accent: #285dc5;
  --accent-soft: #edf2fc;
  --danger: #bc3a43;
  --danger-soft: #fff1f2;
  --shadow: 0 12px 40px #1719231a;
  color: var(--ink);
  background: var(--page);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] {
  color-scheme: dark;
  --page: #191a1d;
  --sidebar: #202125;
  --panel: #202125;
  --raised: #292a30;
  --hover: #303137;
  --line: #35363d;
  --ink: #e8e8ec;
  --muted: #aeb3bf;
  --button-ink: #17213a;
  --chart-blue: #88adf4;
  --chart-blue-end: #4f78ba;
  --chart-violet: #b59ade;
  --chart-violet-end: #8061ad;
  --chart-rose: #df95ae;
  --chart-rose-end: #a46079;
  --accent: #8aadff;
  --accent-soft: #29334c;
  --danger: #f19aa1;
  --danger-soft: #3a252b;
  --shadow: 0 12px 40px #0004;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
}
#app {
  min-height: 100dvh;
}
html.has-overlay {
  overflow: hidden;
  scrollbar-gutter: stable;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--accent);
  color: var(--button-ink);
  font-weight: 500;
  line-height: 18px;
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.button:hover {
  filter: brightness(0.96);
}

.secondary {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}
.quiet {
  background: transparent;
  color: var(--muted);
  padding: 4px 0;
  min-height: 28px;
}
.danger-text {
  background: transparent;
  color: var(--danger);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--muted);
  flex: none;
}
.icon-button:hover {
  background: var(--hover);
  color: var(--ink);
}
svg {
  display: inline-block;
  vertical-align: middle;
  flex: none;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
h3 {
  font-size: 14px;
  font-weight: 500;
}
p {
  color: var(--muted);
}
small {
  font-size: 12px;
  color: var(--muted);
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  outline-offset: 1px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
textarea {
  resize: vertical;
  min-height: 88px;
}
input[type="color"] {
  max-width: 100px;
  padding: 4px;
}
input[aria-invalid="true"] {
  border-color: var(--danger);
}
form.is-submitting:not(.toolbar) button {
  pointer-events: none;
  opacity: 0.65;
}
.error {
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}
.error::first-letter {
  text-transform: uppercase;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 208px;
  padding: 24px 12px 16px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  margin: 0 10px 24px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--ink);
  color: var(--page);
  border-radius: 6px;
}
.workspace-picker {
  margin-bottom: 24px;
}
.workspace-picker .select-trigger {
  background: transparent;
  font-weight: 500;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 500;
}
.sidebar nav a:hover {
  background: var(--hover);
  color: var(--ink);
}
.sidebar nav a.selected {
  background: var(--hover);
  color: var(--ink);
}
.sidebar nav a.selected svg {
  color: var(--accent);
}
.sidebar-theme {
  margin-top: auto;
  padding-top: 16px;
}
.sidebar-bottom {
  margin-top: 12px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 4px 12px;
}
.profile small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--hover);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: none;
  font-weight: 500;
}
.sidebar-bottom > form {
  padding-left: 4px;
}
main {
  margin-left: 208px;
  padding: 0 28px 32px;
  min-width: 0;
  min-height: 100dvh;
  display: flow-root;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 16px;
}
.page-heading p {
  font-size: 13px;
  margin-top: 4px;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toolbar {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}
.toolbar > input[type="search"] {
  max-width: 232px;
  flex: 1 1 180px;
}
.toolbar > label {
  display: block;
  font-size: 0;
  min-width: 112px;
  max-width: 180px;
  flex: 0 1 auto;
}
.toolbar > .select-control {
  max-width: 120px;
  min-width: 100px;
}
.toolbar .select-trigger {
  background: var(--page);
}
.toolbar .secondary {
  font-size: 12px;
}
.reset-filters {
  font-size: 12px;
  color: var(--muted);
  padding: 4px;
}
.reset-filters:hover {
  color: var(--accent);
}
.board {
  display: flex;
  align-items: stretch;
  gap: 12px;
  overflow: auto;
  min-height: 0;
  padding-bottom: 20px;
  scrollbar-width: thin;
}
.column {
  flex: 1 0 220px;
  max-width: 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  min-height: 160px;
  padding: 12px 8px;
  background: var(--sidebar);
  border: 1px solid transparent;
  border-radius: 8px;
}
.column-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0 4px 12px;
}
.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.column-title h2 {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 20px;
}
.column-count {
  color: var(--muted);
  font-size: 12px;
}
.stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9295a1;
  flex: none;
}
.stage-dot.won {
  background: var(--accent);
}
.stage-dot.lost {
  background: var(--muted);
}
.column-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tile {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 1px 2px #00000004;
}
.tile:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.tile h3 {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.tile > p {
  font-size: 12px;
  margin-top: 6px;
}
.tile-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
}
.person-dot {
  display: inline-grid;
  place-items: center;
  background: var(--raised);
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 10px;
}
.tag-preview {
  max-width: 128px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  background: var(--raised);
  border-radius: 4px;
  padding: 2px 5px;
}
.add-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 12px;
}
.add-card:hover {
  color: var(--accent);
}
.column.drop-target {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.tile.dragging {
  opacity: 0.4;
}
.board[aria-busy="true"] {
  pointer-events: none;
  opacity: 0.7;
}
.record-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.table-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 2fr) minmax(160px, 1.2fr) minmax(130px, 1fr)
    minmax(100px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 14px 20px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}
.table-row:last-child {
  border-bottom: 0;
}
a.table-row:hover {
  background: var(--raised);
}
.table-head {
  min-height: 40px;
  padding-top: 10px;
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  background: var(--sidebar);
}
.row-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.row-name > span:last-child {
  min-width: 0;
}
.row-name strong {
  font-weight: 500;
  display: block;
  overflow-wrap: anywhere;
}
.row-name small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}
.row-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  flex: none;
}
.row-assignee {
  color: var(--muted);
  font-size: 12px;
}
.row-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.badge,
.stage-label {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--raised);
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}
.contact-lines small {
  display: block;
  margin-top: 2px;
}
.overdue {
  color: var(--danger);
}
.task-complete {
  color: var(--muted);
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  max-width: 100%;
  flex: 1;
}
.empty h2 {
  font-size: 18px;
  font-weight: 500;
}
.empty p {
  max-width: 360px;
}
.empty-icon {
  display: grid;
  place-items: center;
  background: var(--raised);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--muted);
}
.empty-icon svg {
  width: 24px;
  height: 24px;
}
.empty .button {
  margin-top: 4px;
}
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  background: #10121a66;
  z-index: 20;
}
.drawer {
  width: min(980px, calc(100vw - 64px));
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 0;
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.record-id {
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
}
.close {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--muted);
  flex: none;
}
.close:hover {
  background: var(--hover);
  color: var(--ink);
}
.drawer-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  min-height: 0;
  flex: 1;
}
.drawer-properties {
  padding: 24px;
  overflow: auto;
  min-width: 0;
}
.record-form {
  --field-label-width: 112px;
  --field-gap: 12px;
  display: flex;
  flex-direction: column;
}
.record-name {
  display: block;
  font-size: 0;
  margin: 0 0 24px;
}
.record-name input {
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
  padding: 4px 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 0;
}
.record-name input:focus {
  border-bottom-color: var(--accent);
  outline: 0;
}
.form-grid {
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.form-grid > label,
.form-grid > .switch-field,
.form-grid .field-row > label,
.form-grid .field-row > .switch-field {
  display: grid;
  grid-template-columns: var(--field-label-width) minmax(0, 1fr);
  align-items: center;
  gap: var(--field-gap);
  min-height: 44px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
}
.form-grid > label > input,
.form-grid > label > .select-control,
.form-grid > label > select {
  grid-column: 2;
}
.form-grid .select-trigger,
.form-grid input {
  border-color: var(--line);
  background: var(--panel);
  min-height: 36px;
  height: 36px;
}
.form-grid .select-trigger:hover,
.form-grid input:hover,
.form-grid .select-trigger[aria-expanded="true"],
.form-grid input:focus {
  border-color: var(--line);
  background: var(--raised);
}
.record-form > label:not(.record-name) {
  display: grid;
  grid-template-columns: var(--field-label-width) minmax(0, 1fr);
  align-items: start;
  gap: var(--field-gap);
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
}
.description-field > span {
  padding-top: 8px;
}
.record-form > label:not(.record-name) > textarea {
  grid-column: 2;
}
.drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: var(--panel);
  padding: 16px 0 8px;
  margin-top: auto;
  z-index: 1;
}
.record-form > label + .drawer-actions {
  margin-top: 24px;
}
.save-hint {
  display: none;
  font-size: 11px;
  color: var(--muted);
  margin-right: auto;
}
.record-form.is-dirty .save-hint {
  display: block;
}
.drawer-activity {
  padding: 24px;
  background: var(--sidebar);
  border-left: 1px solid var(--line);
  overflow: auto;
  min-width: 0;
}
.drawer-activity h3 {
  margin: 20px 0 12px;
  font-size: 13px;
  font-weight: 600;
}
.drawer-activity .inline {
  display: flex;
  justify-content: flex-end;
}
.drawer-activity p > a {
  color: var(--accent);
  font-size: 12px;
}
.drawer-activity textarea {
  min-height: 84px;
}
.drawer-activity form > button {
  margin-top: 8px;
}
.history {
  margin-top: 10px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.modal-overlay {
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  width: 420px;
  max-width: 100%;
  max-height: calc(100dvh - 48px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.column-form {
  padding: 24px;
}
.column-form > label {
  margin-bottom: 16px;
}
.modal-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}
.column-form > .danger-text {
  margin-top: 16px;
  font-size: 12px;
}
body:has(.overlay) {
  overflow: hidden;
}
#discard-confirm,
#delete-confirm {
  padding: 24px;
  width: 440px;
  max-width: calc(100vw - 32px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}
#discard-confirm::backdrop,
#delete-confirm::backdrop {
  background: #10121a88;
}
#discard-confirm p,
#delete-confirm p {
  margin: 12px 0 20px;
}
.dialog-actions {
  flex-wrap: wrap;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100vw - 32px);
  background: var(--ink);
  color: var(--page);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 13px;
}
#toast.toast-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.select-control {
  position: relative;
  min-width: 0;
  font-size: 13px;
}
.js select:not(.select-source) {
  visibility: hidden;
}
.select-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(50%);
}
.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-weight: 400;
  text-align: left;
}
.select-trigger > svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-trigger[aria-expanded="true"] {
  border-color: var(--accent);
}
.select-trigger[aria-invalid="true"] {
  border-color: var(--danger);
}
.select-menu {
  position: fixed;
  z-index: 60;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 4px;
  max-height: 320px;
}
.select-menu > input {
  min-height: 36px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 4px 4px 0 0;
  margin-bottom: 4px;
  padding: 8px 10px;
}
.select-menu > [role="listbox"] {
  max-height: 260px;
  overflow: auto;
}
.select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  min-height: 36px;
  font-weight: 400;
  text-align: left;
}
.select-option > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-option[aria-selected="true"] {
  background: var(--raised);
}
.select-option:hover,
.select-option:focus-visible {
  background: var(--accent-soft);
  outline: none;
}
.option-check {
  color: var(--accent);
}
.select-empty {
  padding: 16px 10px;
  font-size: 12px;
}
.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.switch-button {
  position: relative;
  width: 32px;
  height: 20px;
  min-height: 20px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--hover);
  flex: none;
}
.switch-button > span {
  display: block;
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 0.12s;
}
.switch-button[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
}
.switch-button[aria-checked="true"] > span {
  background: var(--page);
  transform: translateX(12px);
}
.settings-layout {
  display: grid;
  grid-template-columns: 184px minmax(0, 760px);
  gap: 32px;
  align-items: start;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-nav a {
  padding: 8px 12px;
  min-height: 36px;
  border-radius: 6px;
  color: var(--muted);
}
.settings-nav a:hover {
  background: var(--raised);
  color: var(--ink);
}
.settings-nav a.selected {
  background: var(--accent-soft);
  color: var(--accent);
}
.settings {
  min-width: 0;
}
.settings > section {
  padding: 0;
  margin-bottom: 28px;
}
.settings h2 {
  margin-bottom: 12px;
}
.settings p {
  margin-bottom: 16px;
  font-size: 13px;
}
.settings form > label {
  margin: 12px 0;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.settings form > label > .select-control,
.settings form > label > input {
  grid-column: 2;
}
.settings form > button {
  margin-top: 12px;
}
.settings .switch-field {
  margin: 16px 0;
  max-width: 100%;
  justify-content: flex-start;
}
.settings .switch-field > span {
  width: 148px;
}
.config-item {
  padding: 0 12px;
  border-radius: 8px;
  margin: 4px -12px;
}
.config-item.editing {
  background: var(--raised);
}
.config-item:last-child {
  border-bottom: 0;
}
.config-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 12px 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  font-weight: 400;
  text-align: left;
}
.config-toggle > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.edit-label {
  font-size: 12px;
  color: var(--muted);
}
.config-toggle:hover .edit-label {
  color: var(--accent);
}
.config-item > form {
  display: none;
  padding-bottom: 16px;
}
.config-item.editing > form {
  display: block;
}
.add-setting {
  color: var(--accent);
}
.setting-note {
  padding: 16px;
  background: var(--raised);
  border-radius: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
}
.setting-note a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  margin-top: 8px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-heading h2 {
  margin: 0;
}
.section-heading > span,
.section-heading > svg {
  font-size: 12px;
  color: var(--muted);
}
.team-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.team-member strong {
  font-weight: 500;
  flex: 1;
}
.add-member {
  margin-top: 24px;
}
.device-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.device-settings > label {
  max-width: 520px;
}
.device-settings [role="status"] {
  font-size: 12px;
  margin-top: 12px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--sidebar);
  min-width: 0;
}
.metric > span {
  color: var(--muted);
  font-size: 12px;
}
.metric > strong {
  font-size: 28px;
  line-height: 32px;
  font-weight: 500;
  margin: 4px 0;
  letter-spacing: -0.8px;
}
.metric-unit {
  font-size: 20px;
  color: var(--muted);
  margin-left: 4px;
}
.metric small {
  font-size: 11px;
}
.metric-attention > strong {
  color: var(--danger);
}
a.metric:hover {
  border-color: var(--accent);
}
.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.report-panel {
  background: var(--sidebar);
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}
.pipeline-report {
  display: block;
  padding: 16px 0;
}
.pipeline-report:last-of-type {
  border-bottom: 0;
}
.pipeline-report > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}
.pipeline-report strong {
  font-weight: 500;
}
.pipeline-report > div:first-child > span {
  color: var(--muted);
  font-size: 12px;
}
.distribution {
  display: flex;
  gap: 3px;
  height: 8px;
  background: var(--raised);
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
}
.distribution > span {
  min-width: 0;
  flex-basis: 0;
}
.distribution-open {
  background: var(--chart-blue);
}
.distribution-won {
  background: var(--chart-violet);
}
.distribution-lost {
  background: var(--chart-rose);
}
.pipeline-numbers {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 11px;
}
.report-caption {
  color: var(--muted);
  font-size: 11px;
  margin-top: 16px;
}
.workload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-size: 13px;
}
.workload-row > span {
  flex: 1;
}
.workload-row > svg {
  color: var(--muted);
}
.workload-row strong {
  font-size: 18px;
  font-weight: 500;
}
.people-head,
.people-row {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 20px;
  align-items: center;
}
.people-head {
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 8px 0 12px;
}
.people-row {
  padding: 12px 0;
}
.people-row:last-child {
  border-bottom: 0;
}
.people-row > span:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}
.people-row > strong {
  font-weight: 500;
}
.empty-inline {
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}
.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: var(--sidebar);
  padding: 24px;
}
.login > form {
  width: 380px;
  max-width: 100%;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.login .brand {
  margin: 0 0 28px;
}
.login h1 {
  font-size: 24px;
}
.login p {
  margin: 8px 0 24px;
  font-size: 13px;
}
.login label {
  margin: 16px 0;
}
.login button {
  width: 100%;
  margin-top: 8px;
}
@media (min-width: 1600px) {
  .column {
    flex-basis: 280px;
  }
  .page-heading,
  main > .settings-layout,
  main > .metric-grid,
  main > .analytics-grid,
  main > .people-report {
    max-width: 1600px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 184px;
  }
  main {
    margin-left: 184px;
    padding: 0 20px 24px;
  }
  .settings-layout {
    grid-template-columns: 156px minmax(0, 1fr);
    gap: 20px;
  }
  .metric-grid {
    gap: 12px;
  }
  .metric {
    padding: 16px;
  }
  .metric > strong {
    font-size: 28px;
  }
  .analytics-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .table-row {
    grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 1fr) minmax(
        110px,
        1fr
      );
    gap: 16px;
  }
  .table-row > [role="cell"]:last-child,
  .table-head > span:last-child {
    display: none;
  }
  .drawer {
    width: calc(100vw - 32px);
  }
  .drawer-properties,
  .drawer-activity {
    padding: 20px;
  }
  .record-form {
    --field-label-width: 96px;
    --field-gap: 8px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: relative;
    width: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin: 0 8px 12px;
    display: inline-flex;
  }
  .workspace-picker {
    width: 100%;
    margin: 0 0 8px;
  }
  .sidebar-theme {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 128px;
    margin: 0;
  }

  .sidebar nav {
    clear: both;
    flex-direction: row;
    gap: 4px;
    overflow: auto;
    scrollbar-width: none;
  }
  .sidebar nav a {
    gap: 8px;
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 12px;
  }
  .sidebar-bottom {
    display: none;
  }
  main {
    min-height: 0;
    margin: 0;
    padding: 0 16px 24px;
  }
  .page-heading {
    margin: 20px 0;
    gap: 8px;
  }
  h1 {
    font-size: 22px;
  }
  .page-actions {
    gap: 6px;
  }
  .page-actions .button {
    font-size: 12px;
    padding: 8px 10px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar > input[type="search"] {
    max-width: none;
    flex-basis: 100%;
  }
  .toolbar > label {
    flex: 1 1 120px;
    max-width: none;
  }
  .toolbar > .select-control {
    flex: 1 1 100px;
    max-width: none;
  }

  .column {
    flex-basis: 248px;
  }
  .settings-layout {
    display: block;
  }
  .settings-nav {
    flex-direction: row;
    overflow: auto;
    white-space: nowrap;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }
  .settings-nav a {
    font-size: 12px;
    padding: 8px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .report-panel {
    padding: 16px;
  }
  .people-head,
  .people-row {
    grid-template-columns: 1.7fr repeat(3, 1fr);
    gap: 8px;
    font-size: 12px;
  }
  .people-row .avatar {
    display: none;
  }
  .table-row {
    grid-template-columns: minmax(140px, 1.5fr) minmax(110px, 1fr);
    gap: 12px;
    padding: 12px;
  }
  .table-row > .row-assignee,
  .table-head > span:nth-child(3) {
    display: none;
  }
  .drawer {
    width: 100vw;
  }
  .drawer-columns {
    display: block;
    overflow: auto;
  }
  .drawer-properties,
  .drawer-activity {
    overflow: visible;
    padding: 20px;
  }
  .drawer-activity {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .drawer-header {
    min-height: 52px;
    padding: 12px 20px;
  }
  .drawer-actions {
    position: static;
    padding-top: 16px;
  }
  .record-form > label + .drawer-actions {
    margin-top: 24px;
  }
  .record-form {
    --field-label-width: 100px;
    --field-gap: 8px;
  }
  .record-name input {
    font-size: 20px;
  }
  .save-hint {
    max-width: 100px;
  }
  .modal-overlay {
    padding: 16px;
  }
  .modal {
    max-height: calc(100dvh - 32px);
  }
  .modal-header,
  .column-form {
    padding: 20px;
  }
  .settings form > label {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
  }
  .settings .switch-field > span {
    width: 116px;
  }
  .select-trigger,
  .select-option {
    min-height: 40px;
  }
  .form-grid .select-trigger {
    min-height: 36px;
  }
  .distribution {
    height: 10px;
  }
  .pipeline-numbers {
    gap: 10px;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.saved-views {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 16px;
}
.saved-view {
  display: inline-flex;
  align-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}
.saved-view a {
  padding: 4px 8px;
}
.saved-view .icon-button {
  width: 24px;
  min-height: 28px;
  height: 28px;
  padding: 4px;
  opacity: 0.55;
}
.saved-view.selected {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.select-create {
  width: 100%;
  background: var(--accent-soft);
  color: var(--accent);
  justify-content: flex-start;
  text-align: left;
  font-size: 12px;
  white-space: normal;
}
.select-error {
  padding: 8px;
  color: var(--danger);
  font-size: 12px;
}
#preset-dialog {
  max-width: 440px;
  width: calc(100vw - 32px);
  padding: 14px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}
#preset-dialog::backdrop {
  background: #15192366;
}
#preset-dialog .modal-header {
  padding: 0 0 16px;
  border: 0;
}
#preset-dialog .preset-hint {
  font-size: 12px;
  margin-top: 12px;
}
#preset-dialog .dialog-actions {
  margin-top: 16px;
}
@media (max-width: 760px) {
  .sidebar-theme {
    padding: 0;
    margin: 0;
  }
  .page-heading {
    margin: 16px 0;
  }
}

button.icon-button {
  background: transparent;
  color: var(--muted);
}
button.icon-button:hover {
  background: var(--hover);
  color: var(--ink);
}
.icon-button.danger-text,
.icon-button.danger-text:hover {
  color: var(--danger);
}
.danger-text:hover {
  background: var(--danger-soft);
}
.custom-fields {
  display: contents;
}
.form-grid .field-row > label > input,
.form-grid .field-row > label > .select-control {
  grid-column: 2;
}
.identity-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.identity-title .record-name {
  flex: 1;
  margin: 0;
}
.identity-title .client-avatar {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.drawer-header > span:first-child {
  margin-right: auto;
}
.drawer-header {
  gap: 8px;
}
.drawer.new-record {
  width: min(600px, 100vw);
}
.new-record .drawer-columns {
  grid-template-columns: 1fr;
}
.new-record .drawer-activity {
  display: none;
}
.field-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.field-dialog-content {
  padding: 16px;
}
.field-create-section {
  border-top: 1px solid var(--line);
}
.field-dialog::backdrop {
  background: #15192366;
}
.field-dialog .modal-header {
  margin: 0;
  padding: 0 0 8px;
  border: 0;
}
.field-hint {
  font-size: 12px;
  margin: 0 0 12px;
}
.field-choices {
  margin-bottom: 12px;
}
.field-choices .switch-field {
  justify-content: space-between;
  padding: 8px 0;
}
.field-dialog [data-new-field] {
  margin: 0;
  padding: 4px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field-dialog [data-new-field] > button {
  align-self: flex-start;
}
.tone-0 {
  --tone: #3b6bcc;
}
.tone-1 {
  --tone: #8061be;
}
.tone-2 {
  --tone: #b77a26;
}
.tone-3 {
  --tone: #bf5878;
}
[data-theme="dark"] .tone-0 {
  --tone: #9bbdff;
}
[data-theme="dark"] .tone-1 {
  --tone: #c4a8ef;
}
[data-theme="dark"] .tone-2 {
  --tone: #e7bd7f;
}
[data-theme="dark"] .tone-3 {
  --tone: #e8aac0;
}
.avatar[class*="tone-"],
.badge[class*="tone-"],
.tag-preview[class*="tone-"],
.person-dot[class*="tone-"] {
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 12%, var(--panel));
  border-color: transparent;
}
.column .stage-dot.open {
  background: var(--tone);
}
.column .stage-dot.lost {
  background: var(--danger);
}
.tile-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tile-identity .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.tile-contact {
  padding-left: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
}
.activity-entry {
  display: flex;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.activity-entry > div {
  min-width: 0;
  flex: 1;
}
.activity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-size: 12px;
}
.activity-meta time {
  color: var(--muted);
  font-size: 11px;
}
.activity-entry p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}
.activity-event {
  padding: 12px 0;
}
.activity-event .avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}
.activity-event p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--sidebar);
}
.segmented button {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  white-space: nowrap;
}
.segmented button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 3px #00000014;
}
.column-form > .segmented {
  margin: 12px 0;
}
.settings .segmented {
  margin-bottom: 12px;
}
.toolbar > .switch-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 0 4px;
}
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  background: transparent;
  color: var(--muted);
  border: 0;
}
.theme-toggle:hover {
  background: var(--hover);
}
.theme-toggle > span {
  display: flex;
}
.theme-moon {
  display: none !important;
}
[data-theme="dark"] .theme-sun {
  display: none !important;
}
[data-theme="dark"] .theme-moon {
  display: flex !important;
}

@media (max-width: 760px) {
  .toolbar .segmented {
    flex: 1;
  }
  .toolbar .segmented button {
    flex: 1;
  }
  .toolbar > input[type="search"] {
    flex-basis: 100%;
  }
}

/* Content keeps its place while the navigation panel folds away. */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.sidebar-brand .brand {
  margin: 0 10px;
}
.sidebar-toggle {
  background: transparent;
}
.page-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sidebar-reopen {
  display: none;
}
@media (min-width: 761px) {
  .sidebar {
    transition: transform 180ms ease;
  }
  main {
    transition: margin-left 180ms ease;
  }
  [data-sidebar="collapsed"] .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
  }
  [data-sidebar="collapsed"] main {
    margin-left: 0;
  }
  [data-sidebar="collapsed"] .sidebar-reopen {
    display: inline-flex;
  }
}
@media (max-width: 760px) {
  .sidebar-brand {
    margin: 0;
  }
  .sidebar-toggle {
    display: none;
  }
}
.page-actions {
  flex-wrap: wrap;
  gap: 10px;
}
.archive-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--muted);
  border-radius: 6px;
}
.archive-link:hover {
  background: var(--hover);
  color: var(--ink);
}
.settings-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.config-toggle [data-when-open],
.config-toggle[aria-expanded="true"] [data-when-closed] {
  display: none;
}
.config-toggle[aria-expanded="true"] [data-when-open] {
  display: inline-flex;
}
.config-toggle[aria-expanded="true"] {
  color: var(--accent);
}
.settings [data-field-options] label {
  margin: 12px 0;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.settings form > button + button {
  margin-left: 8px;
}
.activity-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-actions .danger-text {
  width: 32px;
  padding: 6px;
  min-height: 32px;
}
.comment-form,
.quick-task {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment-form textarea {
  min-height: 96px;
}
.comment-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.comment-actions .icon-button {
  margin-right: auto;
  width: 36px;
  height: 36px;
  padding: 8px;
}
.comment-actions [aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.quick-task > button {
  align-self: flex-end;
}
.activity-filter {
  margin: 16px 0 8px;
}
.activity-filter button {
  font-size: 11px;
}
.activity-entry {
  border: 0;
  padding: 12px 0;
}
.activity-meta {
  flex-wrap: wrap;
  gap: 4px 10px;
}
.activity-entry p {
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.related-task {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
}
.related-task a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.related-task strong {
  font-weight: 500;
}
.related-task a > span {
  font-size: 11px;
  color: var(--muted);
}
.task-check {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 3px;
  background: var(--panel);
  border-color: var(--line);
  color: transparent;
}
.task-check[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.task-complete strong {
  text-decoration: line-through;
  color: var(--muted);
}
.related-task.overdue a > span {
  color: var(--danger);
}
input[type="datetime-local"] {
  min-height: 38px;
  max-width: 100%;
}
.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  max-width: 1600px;
}
.chart-grid .section-heading {
  margin-bottom: 4px;
}
.trend-chart {
  display: block;
  width: 100%;
  height: 166px;
}
.chart-gridline {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.chart-label {
  fill: var(--muted);
  font-size: 11px;
}
.chart-point {
  fill: var(--chart-blue);
  stroke: var(--panel);
  stroke-width: 2;
}
.chart-point:hover,
.chart-point:focus {
  r: 6;
  fill: var(--chart-violet);
}
.outcome-chart {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 166px;
}
.ring-chart {
  width: 150px;
  height: 150px;
  flex: none;
}
.ring-value {
  fill: var(--ink);
  font-size: 26px;
  font-weight: 600;
}
.chart-legend {
  display: grid;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.chart-legend a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.chart-legend strong {
  margin-left: auto;
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chart-blue);
  flex: none;
}
.legend-dot.won {
  background: var(--chart-violet);
}
.legend-dot.lost {
  background: var(--chart-rose);
}
@media (max-width: 1100px) {
  .chart-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr);
  }
  .ring-chart {
    width: 120px;
    height: 120px;
  }
  .outcome-chart {
    gap: 8px;
  }
}
@media (max-width: 760px) {
  .chart-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .trend-chart {
    height: 150px;
  }
  .outcome-chart {
    min-height: 120px;
  }
  .settings [data-field-options] label {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  main {
    transition: none;
  }
}

[data-note-reminder] {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
[data-note-reminder] > label + label {
  margin-top: 12px;
}
[data-confirm-delete] {
  background: var(--danger);
  color: var(--button-ink);
}
.member-role {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 16px 0 24px;
}
.member-role > span {
  font-size: 12px;
  color: var(--muted);
}
.member-role .segmented {
  justify-self: start;
  margin: 0;
}
.member-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}
.push-badge {
  color: var(--muted);
  background: var(--raised);
  padding: 4px 8px;
  border-radius: 6px;
}
.push-badge[data-state="enabled"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.push-badge[data-state="denied"] {
  color: var(--danger);
  background: var(--danger-soft);
}
.settings .push-help {
  font-size: 12px;
  line-height: 1.7;
  padding: 12px;
  background: var(--raised);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .member-role {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 10px;
  }
}
.toolbar [data-segment-name="mode"] {
  margin-left: auto;
  order: 10;
}
.segmented button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  box-shadow: none;
  font-weight: 600;
}
.segmented button[aria-pressed="false"] {
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
}
.segmented button:hover {
  background: var(--hover);
  color: var(--ink);
}
.activity-toolbar [data-segment] {
  margin-left: auto;
  order: 1;
}
.activity-note,
.activity-event {
  background: transparent;
  opacity: 1;
  color: var(--ink);
}
.activity-note p,
.activity-event p {
  font-size: 13px;
  color: var(--ink);
}
.field-choices .switch-field {
  gap: 8px;
}
.field-choices .switch-field > span {
  min-width: 0;
  overflow-wrap: anywhere;
  flex: 1;
}
.field-grip {
  cursor: grab;
  touch-action: none;
  padding: 4px;
}
.field-choices .is-dragging {
  opacity: 0.5;
  background: var(--accent-soft);
}
[data-layout-status] {
  display: inline-block;
  min-height: 20px;
  color: var(--muted);
  font-size: 11px;
}
.task-row .row-name {
  display: flex;
  gap: 12px;
  align-items: center;
}
.task-row form {
  flex: none;
}
.task-row .row-name > a {
  min-width: 0;
  flex: 1;
}
.task-row [role="cell"] {
  min-width: 0;
}
.task-check[aria-checked="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.task-row.overdue > [role="cell"]:nth-child(2) {
  color: var(--danger);
}
.shell-toggle {
  position: fixed;
  top: 24px;
  left: 20px;
  z-index: 3;
  width: 28px;
  height: 28px;
  padding: 4px;
}
.sidebar-brand {
  padding-left: 34px;
}
.sidebar-brand .brand {
  margin-left: 8px;
}
.activity-event .avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}
.activity-event p {
  margin-top: 6px;
}
.notification-events-title {
  margin: 24px 0 12px;
}
@media (min-width: 761px) {
  .sidebar {
    transition:
      transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
      visibility 0s;
  }
  main {
    transition: margin-left 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  [data-sidebar="collapsed"] .sidebar {
    transition:
      transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
      visibility 0s 220ms;
  }
  [data-sidebar="collapsed"] .page-title-group {
    padding-left: 36px;
  }
}
@media (max-width: 760px) {
  .shell-toggle {
    display: none;
  }
  .sidebar-brand {
    padding-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  main,
  [data-sidebar="collapsed"] .sidebar {
    transition: none;
  }
}
.column {
  border-top: 2px solid var(--tone, var(--line));
}
.column-grip {
  width: 20px;
  height: 24px;
  min-height: 24px;
  padding: 2px;
  cursor: grab;
}
.color-field {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}
.color-field > span {
  font-size: 12px;
  color: var(--muted);
}
.color-picker {
  display: flex;
  gap: 10px;
}
.color-picker button {
  border-radius: 50%;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 4px;
  background: var(--swatch);
  color: #fff;
  border: 3px solid var(--panel);
  outline: 1px solid transparent;
}
.color-picker button svg {
  visibility: hidden;
}
.color-picker button[aria-pressed="true"] {
  outline-color: var(--ink);
}
.color-picker button[aria-pressed="true"] svg {
  visibility: visible;
}
.trend-panel {
  position: relative;
}
.chart-tooltip {
  position: absolute;
  right: 16px;
  top: 46px;
  background: var(--ink);
  color: var(--page);
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 12px;
  pointer-events: none;
}
.chart-point.is-active {
  r: 6;
  fill: var(--chart-violet);
}
.ring-chart g circle:hover,
.ring-chart g circle:focus {
  stroke-width: 23;
}
.column {
  position: relative;
}
.column-drop-before::before,
.column-drop-after::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  pointer-events: none;
}
.column-drop-before::before {
  left: -8px;
}
.column-drop-after::after {
  right: -8px;
}
.column-drag-preview {
  z-index: 100;
  position: fixed;
  top: -2000px;
  left: 0;
  max-height: 240px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
  pointer-events: none;
}
.column-drag-preview .column-grip,
.column-drag-preview .add-card {
  display: none;
}
.column.is-dragging {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.column-form .color-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 20px 0 24px;
}
.color-picker {
  align-items: center;
}
.settings .color-field {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
}
.color-picker button {
  width: 32px;
  height: 32px;
  min-height: 32px;
}
.column .stage-dot.lost {
  background: var(--tone);
}

.drawer-actions {
  justify-content: flex-end;
  min-height: 60px;
}
.drawer-actions .save-hint {
  display: flex;
  align-items: center;
  visibility: hidden;
  flex: 1;
  min-width: 0;
  min-height: 36px;
  margin-right: auto;
}
.record-form.is-dirty .save-hint {
  display: flex;
  visibility: visible;
}
.drawer-actions > button,
.drawer-actions > a {
  flex: none;
}
.toolbar:has([data-segment-name="mode"]) {
  position: relative;
  padding-right: 88px;
  min-height: 36px;
}
.toolbar [data-segment-name="mode"] {
  position: absolute;
  right: 0;
  top: 0;
  margin: 0;
}
.device-actions [data-push="enable"] {
  min-width: 190px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.task-schedule {
  margin: 8px 0;
  min-width: 0;
}
.schedule-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}
.schedule-heading .switch-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.reminder-time {
  display: grid;
  grid-template-columns: 1fr 132px;
  align-items: center;
  margin-top: 8px;
}
.form-grid .task-schedule {
  padding: 8px 0;
}
.icon-button,
button.icon-button,
.close {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 7px;
  border-radius: 5px;
}
.card-actions .danger-text {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.card-actions .icon-button {
  border: 1px solid var(--line);
  background: var(--panel);
}
.card-actions button:hover {
  background: var(--hover);
}
.card-actions .danger-text:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.archive-column {
  margin-right: auto;
  color: var(--danger);
}
.activity-events-toggle {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}
.activity-events-toggle[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.column-heading[data-column-drag] {
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.column-heading[data-column-drag]:active {
  cursor: grabbing;
}
.column-drop-before::before,
.column-drop-after::after {
  width: 4px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.column-grip {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 4px !important;
}
@media (min-width: 761px) {
  .sidebar-brand {
    height: 32px;
    padding-left: 44px;
  }
}
.drawer-header {
  min-height: 64px;
  align-items: center;
}
.drawer-header .close,
.drawer-header .icon-button {
  margin: 0;
}
.calendar-heading,
.calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.calendar-heading {
  justify-content: space-between;
  margin: 12px 0;
}
.calendar-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  min-width: 784px;
}
.calendar-weekday {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  background: var(--sidebar);
}
.calendar-day {
  min-height: 112px;
  padding: 6px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 0;
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-day.other-month {
  background: var(--sidebar);
}
.calendar-day.other-month time {
  color: var(--muted);
}
.calendar-day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.calendar-day time {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.calendar-day time.selected {
  color: var(--button-ink);
  background: var(--accent);
  border-radius: 50%;
}
.calendar-day-heading .icon-button {
  opacity: 0.5;
}
.calendar-day-heading .icon-button:hover {
  opacity: 1;
}
.calendar-task {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  gap: 2px;
  margin: 4px 0;
  background: var(--accent-soft);
  border-radius: 5px;
}
.calendar-task > span {
  font-size: 10px;
  color: var(--muted);
}
.calendar-task strong {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.calendar-task.overdue {
  background: var(--danger-soft);
}
.calendar-undated {
  margin-top: 12px;
  font-size: 12px;
}
.column-placeholder {
  flex: 1 0 220px;
  max-width: 280px;
  flex-shrink: 0;
  align-self: flex-start;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 16px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 2px dashed var(--accent);
  border-radius: 8px;
  text-align: center;
}
.column-placeholder strong {
  font-weight: 500;
}
.column-placeholder span {
  font-size: 12px;
}
.config-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}
.config-actions .danger-text {
  margin-right: auto;
}
.settings form > button {
  margin-left: auto;
  display: flex;
}
.settings .team-member form {
  margin: 0;
}
.settings .team-member form > button {
  margin: 0;
}
.device-actions {
  justify-content: flex-end;
  align-items: center;
}
.field-dialog [data-new-field] > button {
  align-self: flex-end;
}
.record-counters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}
.record-counters > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.record-counters svg {
  width: 14px;
  height: 14px;
}
.table-row .record-counters {
  margin-top: 4px;
}
.form-grid {
  padding-bottom: 0;
  margin-bottom: 0;
}
.record-form > label:not(.record-name) {
  padding: 4px 0;
  min-height: 44px;
}
.drawer-actions {
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-right: -24px;
  padding: 16px 24px 8px;
  border-top: 1px solid var(--line);
}
.activity-filter {
  width: calc(100% + 48px);
  margin-left: -24px;
  padding: 12px 24px 0;
  border-top: 1px solid var(--line);
}
.field-create-toggle {
  margin: 0;
  padding: 12px 16px;
  border-radius: 0;
}
.add-member {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.settings > section + section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
@media (max-width: 760px) {
  .drawer-actions {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .activity-filter {
    width: calc(100% + 32px);
    margin-left: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
}
.color-picker {
  flex-wrap: wrap;
  gap: 10px;
}
.tone-4 {
  --tone: #1681b7;
}
.tone-5 {
  --tone: #9a51b0;
}
.tone-6 {
  --tone: #c66a31;
}
.tone-7 {
  --tone: #c84c4c;
}
.tone-8 {
  --tone: #737987;
}
[data-theme="dark"] .tone-4 {
  --tone: #85c5eb;
}
[data-theme="dark"] .tone-5 {
  --tone: #d4a2e1;
}
[data-theme="dark"] .tone-6 {
  --tone: #edb18b;
}
[data-theme="dark"] .tone-7 {
  --tone: #ec9a9a;
}
[data-theme="dark"] .tone-8 {
  --tone: #b4bbc9;
}
:root {
  --board-list: #f2f3f5;
}
[data-theme="dark"] {
  --board-list: #242529;
}
.column-title {
  gap: 6px;
}
.column-title h2 {
  font-weight: 600;
}
.column-count {
  min-width: 16px;
  text-align: center;
}
.column .tile {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 8px;
  box-shadow: none;
  padding: 12px;
}
.column .tile:hover {
  border-color: var(--accent);
}
.column-cards {
  gap: 8px;
}
.column .add-card {
  margin-top: 8px;
  border-radius: 6px;
  padding: 8px;
  min-height: 36px;
}
.column .add-card:hover {
  background: var(--hover);
  color: var(--ink);
}
.column-placeholder {
  border-radius: 12px;
}
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 36px;
}
.tag-chips {
  display: contents;
}
.tag-picker .select-trigger {
  order: 2;
}
.form-grid .tag-picker .select-trigger {
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex: none;
  padding: 7px;
  border: 1px dashed var(--line);
  border-radius: 5px;
  background: transparent;
}
.tag-picker .select-value {
  display: none;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 3px 2px 8px;
  max-width: 100%;
  background: color-mix(in srgb, var(--tone) 12%, var(--panel));
  color: var(--tone);
  border-radius: 5px;
  font-size: 12px;
}
.tag-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-remove {
  background: transparent;
  color: inherit;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 4px;
  border-radius: 4px;
}
.tag-remove svg {
  width: 14px;
  height: 14px;
}
.tag-remove:hover {
  background: color-mix(in srgb, var(--tone) 16%, transparent);
}
.column {
  background: var(--board-list);
  border: 0;
  border-radius: 6px;
  padding: 10px;
}
.column-heading {
  padding: 0 0 8px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--tone, var(--line));
}
.column-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.column-count {
  min-width: 20px;
}
.column .tile {
  border-radius: 6px;
}
.column-drag-preview {
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
}
