:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #262630;
  background: var(--bg);
  font-size: 14px;
  --bg: #f6f6f9;
  --panel: #fff;
  --ink: #262630;
  --muted: #797a89;
  --line: #e7e7ed;
  --accent: #7763dd;
  --soft: #efebff;
  --hover: #f2f1f7;
  --danger: #c33c54;
  --shadow: 0 12px 48px #24223518;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #17181e;
  --panel: #202128;
  --ink: #eeeef5;
  --muted: #a1a2b3;
  --line: #34353f;
  --accent: #ad9aff;
  --soft: #35304c;
  --hover: #2b2c36;
  --danger: #ff92a5;
  --shadow: 0 12px 48px #0005;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button,
input,
textarea {
  outline: none;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 14px;
  min-height: 40px;
  background: var(--panel);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 550;
  transition: background 0.15s;
}
button:hover {
  background: var(--hover);
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
button.primary:hover {
  filter: brightness(0.95);
}
button.ghost {
  border-color: transparent;
  background: transparent;
}
button.ghost:hover {
  background: var(--hover);
}
button.danger {
  color: var(--danger);
}
.icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon-button {
  width: 40px;
  padding: 9px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 15px;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: #22232d;
  color: #e6e5ef;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 12px;
}
.brand img {
  width: 36px;
  height: 36px;
}
.brand strong {
  font-size: 21px;
  letter-spacing: -0.5px;
}
.brand small {
  display: block;
  color: #a1a0b3;
  margin-top: 2px;
}
.sidebar .eyebrow {
  color: #9291a5;
  padding: 0 12px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
}
.nav button {
  justify-content: flex-start;
  background: transparent;
  color: #bab9cb;
  border-color: transparent;
  padding: 12px;
}
.nav button:hover {
  background: #30313d;
}
.nav button.active {
  background: #393447;
  color: #e4d9ff;
}
.nav .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.nav .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav .count {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.7;
}
.sidebar .add-business {
  color: #9b9aae;
  font-size: 12px;
}
.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px 0;
  border-top: 1px solid #3a3a48;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 30px;
  height: 30px;
  background: var(--soft);
  color: var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 650;
  flex: none;
}
.sidebar .avatar {
  background: #444055;
  color: #d7cfff;
}
.sidebar-footer .icon-button {
  margin-left: auto;
  color: #aaa8be;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 80px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 36px;
  background: var(--panel);
}
.topbar .crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 40px;
}
.search input {
  border: 0;
  background: none;
  color: var(--ink);
  width: 190px;
  padding: 10px 0;
}
.notification {
  position: relative;
}
.notification .badge {
  position: absolute;
  right: 2px;
  top: 2px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--panel);
  font-size: 9px;
  min-width: 17px;
  height: 17px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main {
  padding: 36px;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
}
.heading-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--soft);
  color: var(--accent);
}
.stat strong {
  font-size: 25px;
  letter-spacing: -0.8px;
  display: block;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-heading h2 {
  font-size: 17px;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.project-card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
  min-height: 200px;
  box-shadow: 0 2px 3px #00000002;
}
.project-card:hover {
  border-color: var(--accent);
  background: var(--panel);
  transform: translateY(-2px);
}
.project-card .project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.project-symbol {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card h3 {
  font-size: 17px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.project-card .description {
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card .bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.progress {
  height: 4px;
  background: var(--line);
  border-radius: 6px;
  margin-top: 12px;
  overflow: hidden;
}
.progress span {
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: 6px;
}
.pill {
  font-size: 10px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pill.warn {
  background: #fff1de;
  color: #966522;
}
.pill.danger {
  background: #fde9ed;
  color: #b73d55;
}
.pill.done {
  background: #e2f4eb;
  color: #33805a;
}
:root[data-theme="dark"] .pill.warn {
  background: #44351f;
  color: #f3c984;
}
:root[data-theme="dark"] .pill.danger {
  background: #44272f;
  color: #ffa0b4;
}
:root[data-theme="dark"] .pill.done {
  background: #223c30;
  color: #91d8b2;
}
.empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 70px 24px;
  text-align: center;
  background: var(--panel);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 14px;
}
.empty .empty-icon {
  background: var(--soft);
  color: var(--accent);
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
}
.empty .empty-icon .icon {
  width: 30px;
  height: 30px;
}
.empty p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.7;
}
.board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}
.board-toolbar .filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.board {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 24px;
  min-height: 55vh;
}
.column {
  width: 290px;
  min-width: 290px;
  background: var(--hover);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.column-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 4px;
}
.column-head h3 {
  flex: 1;
  font-size: 13px;
}
.column-head .count {
  font-size: 11px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
}
.column-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.column[data-kind="doing"] .column-dot {
  background: #9172e5;
}
.column[data-kind="review"] .column-dot {
  background: #e3af55;
}
.column[data-kind="done"] .column-dot {
  background: #6db795;
}
.cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 35px;
}
.task {
  display: block;
  text-align: left;
  padding: 16px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 2px 3px #00000003;
  width: 100%;
  font-weight: 450;
  cursor: grab;
}
.task:active {
  cursor: grabbing;
}
.task:hover {
  border-color: var(--accent);
  background: var(--panel);
}
.task h3 {
  font-size: 13px;
  line-height: 1.6;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.task .task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.task-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}
.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-meta .icon {
  width: 13px;
  height: 13px;
}
.task .avatar {
  width: 24px;
  height: 24px;
  font-size: 9px;
}
.add-card {
  width: 100%;
  margin-top: 10px;
  justify-content: flex-start;
  color: var(--muted);
  font-size: 12px;
}
.column.dragover {
  outline: 2px solid var(--accent);
  background: var(--soft);
}
.board-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 20%, var(--soft), var(--bg) 65%);
}
.login-card {
  width: 100%;
  max-width: 410px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 36px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.login-card .brand {
  padding: 0;
  margin-bottom: 32px;
}
.login-card .brand small {
  color: var(--muted);
}
.login-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0 24px;
}
.login-card button.primary {
  width: 100%;
  margin-top: 8px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
}
.field input,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  min-height: 40px;
}
.field textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 96px;
}
.field .help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.select-wrap {
  position: relative;
}
.select-button {
  justify-content: flex-start;
  width: 100%;
  font-weight: 400;
  padding-right: 44px;
}
.select-button .icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
}
.select-menu {
  position: fixed;
  z-index: 1000;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
  box-shadow: var(--shadow);
  overflow: auto;
  max-height: 280px;
}
.select-menu button {
  display: flex;
  width: 100%;
  border: 0;
  justify-content: flex-start;
  font-weight: 400;
  border-radius: 6px;
  min-height: 36px;
}
.select-menu button[aria-selected="true"] {
  background: var(--soft);
  color: var(--accent);
}
dialog {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
dialog::backdrop {
  background: #12132270;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
}
.modal-body {
  padding: 26px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.row.three {
  grid-template-columns: repeat(3, 1fr);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.check-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex: none;
}
.check-row span {
  flex: 1;
}
.check-row.checked span {
  text-decoration: line-through;
  color: var(--muted);
}
.check-row button {
  min-height: 28px;
  width: 28px;
  padding: 4px;
}
.check-add {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.check-add input {
  flex: 1;
  min-width: 0;
}
.subsection {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
}
.subsection h3 {
  margin-bottom: 16px;
}
.comment {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
.comment .text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 6px;
}
.comment strong {
  font-size: 12px;
}
.comment time {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.activity-item button {
  display: block;
  text-align: left;
  padding: 0;
  min-height: 0;
  background: none;
  border: none;
  font-weight: 400;
  line-height: 1.7;
  flex: 1;
}
.activity-item.unread .avatar {
  box-shadow: 0 0 0 3px var(--soft);
}
.activity-item time {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 8px 0 22px;
}
.switch-label input {
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
}
.column-edit {
  display: grid;
  grid-template-columns: 1fr 125px 32px 32px 32px;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.column-edit input {
  min-width: 0;
}
.column-edit .icon-button {
  width: 32px;
  min-height: 32px;
  padding: 5px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  background: var(--ink);
  color: var(--panel);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  line-height: 1.5;
  display: none;
}
.mobile-menu {
  display: none;
}
.search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.search-results button {
  text-align: left;
  justify-content: flex-start;
  padding: 18px;
}
.search-results small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
@media (min-width: 1400px) {
  .main {
    padding: 42px 48px;
  }
  .topbar {
    padding: 0 48px;
  }
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .main {
    padding: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .search input {
    width: 130px;
  }
}
@media (max-width: 720px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
    position: fixed;
    z-index: 50;
    width: 244px;
    box-shadow: var(--shadow);
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .topbar {
    height: 68px;
    padding: 0 16px;
    gap: 8px;
  }
  .topbar .crumb {
    display: none;
  }
  .top-actions {
    gap: 3px;
    flex: 1;
    justify-content: flex-end;
  }
  .search {
    flex: 1;
    max-width: 240px;
  }
  .search input {
    width: 100%;
    min-width: 0;
  }
  .main {
    padding: 24px 16px;
  }
  .page-heading {
    flex-direction: column;
    margin-bottom: 24px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .heading-actions {
    width: 100%;
  }
  .stats {
    gap: 10px;
    margin-bottom: 28px;
  }
  .stat {
    padding: 14px;
    gap: 10px;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat-icon {
    width: 32px;
    height: 32px;
  }
  .column {
    width: 270px;
    min-width: 270px;
  }
  .board-toolbar {
    align-items: flex-start;
  }
  .row,
  .row.three {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .modal-head {
    padding: 16px 18px;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-foot {
    padding: 14px 18px;
  }
  .column-edit {
    grid-template-columns: minmax(90px, 1fr) 100px 28px 28px 28px;
    gap: 4px;
  }
  .login-card {
    padding: 28px;
  }
  .board {
    gap: 12px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
