.topbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 40px 8px 260px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: padding-left 0.15s ease;
}

.logo {
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
  gap: 4px;
}
.logo img {
  height: 30px;
  width: auto;
  display: block;
}

.nav-link {
  color: var(--ink);
  font-weight: 500;
}

.spacer {
  flex: 1;
}

.shell {
  display: flex;
  align-items: flex-start;
}

main {
  flex: 1;
  min-width: 0;
  max-width: 1440px;
  margin: 0 0 0 220px;
  padding: 24px 40px 80px;
  transition: margin-left 0.15s ease;
}

.sidenav {
  width: 220px;
  padding: 0 12px 16px;
  border-right: 1px solid var(--line);
  background: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 30;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidenav .logo {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 14px;
  margin-bottom: 4px;
  font-size: 18px;
}
.sidenav {
  transition: width 0.15s ease;
}

#sidenav {
  display: flex;
  flex-direction: column;
  flex: 1;
}

body.auth {
  background: #f3f2ee;
  min-height: 100vh;
}
body.auth .topbar, body.auth .sidenav {
  display: none;
}
body.auth main {
  margin-left: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.icon-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
}
.icon-btn:hover {
  border-color: #dadada;
}
.icon-btn .i-closed {
  display: none;
}

#side-toggle {
  border: none;
  background: transparent;
  color: #ccc;
}

body.collapsed .topbar {
  padding-left: 108px;
}
body.collapsed main {
  margin-left: 68px;
}
body.collapsed .sidenav {
  width: 68px;
  padding: 0 8px 16px;
}
body.collapsed .sidenav .logo {
  padding: 0;
  justify-content: center;
  font-size: 0;
  gap: 0;
}
body.collapsed .side-title {
  visibility: hidden;
}
body.collapsed .side-label {
  display: none;
}
body.collapsed .side-link {
  justify-content: center;
  padding: 8px 0;
  position: relative;
}
body.collapsed .side-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  margin-left: 0;
}
body.collapsed #side-toggle .i-open {
  display: none;
}
body.collapsed #side-toggle .i-closed {
  display: inline;
}

.side-section {
  margin-bottom: 20px;
}

.sidenav .side-section:first-child .side-title {
  margin-top: 56px;
}

.side-title {
  margin: 0 0 6px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -1%;
  color: var(--muted);
  opacity: 0.6;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 2px;
  font-size: 14px;
}
.side-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke-width: 1.75;
}
.side-link:hover {
  background: var(--accent-soft);
}
.side-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.side-dot {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}

.usernav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-dd {
  position: relative;
}

.dd-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 170px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  padding: 6px;
  z-index: 30;
}

.user-dd.open .dd-menu {
  display: block;
}

.dd-divider {
  border-top: 1px solid var(--line);
  margin: 5px 0;
}

.dd-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.dd-link svg {
  width: 15px;
  height: 15px;
}
.dd-link:hover {
  background: var(--bg);
}

button.dd-link {
  background: none;
  border: 0;
  font: inherit;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
button.dd-link.danger {
  color: var(--danger);
}

.list-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.list-menu svg {
  width: 15px;
  height: 15px;
}
.list-menu:hover {
  border-color: #dadada;
}

#orgwrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toplink {
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.ctx-link {
  font-weight: 400;
}

.ctx-sep {
  color: var(--muted);
}

button.edit-mini.link {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  margin-left: 8px;
  color: var(--accent);
}
button.edit-mini.link svg {
  width: 13px;
  height: 13px;
}
button.edit-mini.link:hover {
  color: var(--accent);
}

body.bare .sidenav, body.bare #side-toggle, body.bare .ctx-link {
  display: none;
}
body.bare .topbar {
  padding-left: 40px;
}
body.bare main {
  margin-left: 0;
}

body.no-projects .sidenav, body.no-projects #side-toggle {
  display: none;
}
body.no-projects .topbar {
  padding-left: 40px;
}
body.no-projects main {
  margin-left: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.center {
  text-align: center;
}

.home-cta {
  margin-bottom: 12px;
}

.muted {
  color: var(--muted);
}

.empty {
  color: var(--muted);
  font-style: italic;
  margin: 8px 0;
}

.grow {
  flex: 1;
  min-width: 0;
}

.page-head {
  margin: 2px 0 24px;
}
.page-head p.muted {
  margin-bottom: 0;
}
.page-head h1 {
  font-size: 32px;
  letter-spacing: -1%;
  font-weight: 500;
}

.actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.crumbs {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 4px;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}
button:hover {
  filter: brightness(1.1);
}
button.link {
  background: none;
  color: var(--ink);
  padding: 0;
  font-weight: 500;
  border-radius: 0;
}
button.link.danger {
  color: var(--danger);
  font-size: 13px;
}

#user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

input, textarea {
  font: inherit;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  min-width: 0;
}
input:focus, textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.inline-form input:first-child {
  flex: 2 1 200px;
}
.inline-form input {
  flex: 1 1 120px;
}
.inline-form input.full {
  flex-basis: 100%;
}
.inline-form.small {
  margin-top: 8px;
  font-size: 14px;
}
.inline-form.small button {
  padding: 6px 14px;
}
.inline-form.project-form input[name=name] {
  flex: 1 1 160px;
}
.inline-form.project-form input[name=description] {
  flex: 3 1 260px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stack-form button {
  align-self: flex-start;
}

select, .select-btn {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7a82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 14px;
  color: inherit;
  cursor: pointer;
  min-width: 0;
}
select:focus, .select-btn:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.select-btn {
  display: inline-flex;
  align-items: center;
  text-align: left;
  font-weight: 400;
}

label:has(> select) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ff87d2;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}
.avatar.sm {
  width: 22px;
  height: 22px;
  font-size: 9px;
}

.profile-avatar {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-avatar > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.stack-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.tag {
  font-size: 12px;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--muted);
  white-space: nowrap;
}
.tag.overdue {
  background: #fdecea;
  color: var(--danger);
}

.status-chip.st-not-started {
  background: #eef0f2;
  color: #5b6770;
}
.status-chip.st-in-progress {
  background: #e3efff;
  color: #2b62b3;
}
.status-chip.st-complete {
  background: var(--white);
  color: var(--green);
}
.status-chip.st-cancelled {
  background: #fdecea;
  color: var(--danger);
}
.status-chip.st-blocked {
  background: #fdf0e0;
  color: #b35309;
}
.status-chip.st-done {
  background: #e3efff;
  color: #2b62b3;
}
.status-chip.pr-urgent {
  background: #fdecea;
  color: var(--danger);
}
.status-chip.pr-high {
  background: #fdf0e0;
  color: #b35309;
}
.status-chip.pr-medium {
  background: var(--yellow-bg);
  color: var(--yellow);
}
.status-chip.pr-low {
  background: #eef0f2;
  color: #5b6770;
}

details {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

summary {
  cursor: pointer;
}

.clamp {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.count {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table tr:last-child td {
  border-bottom: 0;
}

.mention {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}

.mention-pop {
  position: absolute;
  z-index: 60;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  min-width: 180px;
  overflow: hidden;
}

.mention-opt {
  padding: 7px 12px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mention-opt.sel, .mention-opt:hover {
  background: var(--accent-soft);
}

button.add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.add-btn svg {
  width: 15px;
  height: 15px;
}

body.auth::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40vh;
  background: radial-gradient(55% 90% at 18% 100%, rgba(22, 84, 255, 0.08), transparent 70%), radial-gradient(50% 90% at 82% 100%, rgba(255, 135, 210, 0.1), transparent 70%), linear-gradient(to top, rgba(255, 255, 255, 0.6), transparent);
  pointer-events: none;
  z-index: -1;
}

.auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 104px);
}

.auth-logo {
  position: absolute;
  top: 28px;
  left: 40px;
  display: flex;
  align-items: center;
}

.welcome-wrap .auth-card {
  gap: 4px;
  text-align: left;
}
.welcome-wrap .welcome-sub {
  margin-top: 4px;
  text-align: left;
}
.welcome-wrap .welcome-hint {
  text-align: left;
  margin-top: 30px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: none;
}
.auth-card h1 {
  font-size: 34px;
  font-weight: 500;
  text-align: left;
  margin-bottom: 20px;
  letter-spacing: -2%;
}
.auth-card input {
  padding: 10px 12px;
}
.auth-card h1.welcome-title {
  margin-bottom: 0;
}

.small-text {
  font-size: 14px;
  margin: 4px 0 0;
}

.name-row {
  display: flex;
  gap: 12px;
}
.name-row input {
  min-width: 0;
}
.name-row input[name=firstName] {
  flex: 1;
}
.name-row input[name=lastName] {
  flex: 1.4;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0;
}
.terms-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn:hover {
  filter: brightness(1.1);
}

.actions-left {
  display: flex;
  gap: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  display: block;
  color: inherit;
  margin: 0;
}
.project-card p {
  color: var(--muted);
  min-height: 1.5em;
  margin: 0 0 12px;
}
.project-card small {
  color: var(--muted);
}

.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.dash-complete {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}
.dash-complete strong {
  font-size: 20px;
  font-weight: 600;
}
.dash-complete .progress {
  flex: 1;
  margin: 0;
}

.dash-summary {
  margin-bottom: 20px;
  padding: 8px;
}
.dash-summary .stats {
  margin-bottom: 0;
}
.dash-summary .stat {
  border: 0;
  padding: 8px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  position: relative;
}
.dash-summary .stat:has(.stat-link):hover {
  filter: brightness(0.97);
}
.dash-summary .stat small {
  font-size: 14px;
  color: var(--ink);
  font-weight: 400;
}
.dash-summary .stat strong {
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  margin-top: 14px;
}
.dash-summary .stat .progress {
  width: 100%;
}
.dash-summary .stat-link {
  font-size: 13px;
  margin-top: auto;
}
.dash-summary .stat-link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.dash-summary .st-grey {
  background: var(--grey-bg);
}
.dash-summary .st-green {
  background: var(--green-bg);
}
.dash-summary .st-green small, .dash-summary .st-green strong, .dash-summary .st-green .stat-link {
  color: var(--green-dark);
}
.dash-summary .st-red {
  background: var(--red-bg);
}
.dash-summary .st-red small, .dash-summary .st-red strong, .dash-summary .st-red .stat-link {
  color: var(--red-dark);
}
.dash-summary .st-yellow {
  background: var(--yellow-bg);
}
.dash-summary .st-yellow small, .dash-summary .st-yellow strong {
  color: var(--yellow-dark);
}
.dash-summary .st-yellow .stat-link {
  color: var(--yellow);
}

.progress {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tool {
  display: block;
  color: inherit;
  min-height: 260px;
  margin: 0;
}
.tool small {
  color: var(--muted);
}
.tool:hover .tool-more {
  text-decoration: underline;
}

.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.tool-head h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -1%;
}

.tool-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  color: var(--accent);
}
.tool-more svg {
  width: 13px;
  height: 13px;
}

.tool-messages,
.tool-todos,
.tool-schedule {
  background: var(--white);
  border-color: var(--line);
}

.dash-acts {
  margin-bottom: 0;
}

.act-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.act-list li:last-child {
  border-bottom: 0;
}
.act-list li small {
  white-space: nowrap;
}

.preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
.preview small {
  display: block;
}
.preview strong {
  font-weight: 500;
}
.preview[data-action] {
  cursor: pointer;
}

.box {
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 3px;
  flex-shrink: 0;
}

.date-chip {
  font-size: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.list-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.list-head h3 {
  flex: 1;
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 0;
}
.list-head small {
  color: var(--muted);
}

.list ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.list-desc {
  margin-top: -4px;
}

.todo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.todo label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.todo input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.todo.done span {
  text-decoration: line-through;
  color: var(--muted);
}
.todo .danger, .todo .todo-edit {
  visibility: hidden;
}
.todo:hover .danger, .todo:hover .todo-edit {
  visibility: visible;
}

.todo-desc {
  display: block;
  font-weight: 400;
  font-size: 13px;
}
.todo-desc h2, .todo-desc h3, .todo-desc h4 {
  font-size: 1em;
  margin: 4px 0 0;
}

.todo-title {
  flex: 1;
  cursor: pointer;
  font-weight: 500;
}

.todo-edit {
  font-size: 13px;
  color: var(--muted);
}

.assignee-dd-wrap,
.status-dd-wrap {
  position: relative;
  display: inline-block;
}

.assignee-dd,
.status-dd {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  width: 220px;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  padding: 8px;
}

.a-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.a-row input {
  width: auto;
  margin: 0;
}
.a-row:hover {
  background: var(--bg);
}

.a-foot {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding: 6px 8px 2px;
  text-align: right;
}

.view-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.vt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}
.vt-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
}
.vt-btn:hover {
  background: var(--accent-soft);
}
.vt-btn.on {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 16px;
  overflow-y: auto;
}

.card-modal {
  background: var(--bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 300px;
  overflow: hidden;
}
.card-modal.single {
  grid-template-columns: 1fr;
  max-width: 560px;
}

.modal-main {
  padding: 20px 24px;
}

.modal-side {
  background: #f1f1f1;
  border-left: 1px solid var(--line);
  padding: 16px;
}
.modal-side input {
  width: 100%;
}

.modal-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.modal-top select {
  font: inherit;
  font-size: 13px;
}
.modal-top .modal-x {
  margin-left: auto;
  font-size: 16px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 4px 6px;
  margin-left: -6px;
}
.modal-title:focus {
  background: #fff;
  outline: 2px solid var(--accent);
}

.modal-fields {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.modal-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.modal-h {
  margin: 20px 0 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.desc-edit {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.desc-edit svg {
  width: 12px;
  height: 12px;
}

.desc-view {
  margin-bottom: 8px;
}

.cat-block {
  margin: 4px 0;
}

.cat-label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.cat-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.cat-x {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 0 0 5px;
  color: inherit;
  opacity: 0.6;
}
.cat-x:hover {
  opacity: 1;
}

.cat-dd-wrap {
  position: relative;
  display: inline-block;
}

.cat-dd {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  width: 280px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  padding: 10px;
}

.cat-search {
  width: 100%;
  margin-bottom: 8px;
}

.cat-list {
  max-height: 132px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.cat-row input {
  width: auto;
  margin: 0;
}

.cat-bar {
  flex: 1;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
}

.cat-create {
  margin-top: 8px;
  width: 100%;
  border: 1px dashed var(--line);
  background: none;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.cat-create:hover {
  background: var(--accent-soft);
}

.md-editor textarea {
  width: 100%;
}
.md-editor .btn {
  margin-top: 6px;
}

.md-tools {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.md-tools button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.md-tools button:hover {
  background: var(--accent-soft);
}

.sub-progress {
  margin-bottom: 10px;
}

.feed {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 13px;
}
.feed li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 720px) {
  .card-modal {
    grid-template-columns: 1fr;
  }
  .modal-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
.message-card {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
}
.message-card p {
  margin: 2px 0 0;
  font-size: 14px;
}
.message-card strong {
  font-weight: 500;
}

.message {
  margin-bottom: 24px;
}

.post-title {
  font-size: 20px;
  font-weight: 600;
  margin: 4px 0 12px;
}

.post-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.post-meta .avatar {
  width: 40px;
  height: 40px;
  font-size: 15px;
  flex-shrink: 0;
}

.post-meta-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.post-meta-top {
  font-size: 14px;
}
.post-meta-top strong {
  font-weight: 600;
}
.post-meta-top .muted {
  font-size: 13px;
}

.post-meta-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.post-meta-sub .eye {
  font-size: 13px;
  padding: 0;
}
.post-meta-sub .danger {
  font-size: 13px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}
.byline .danger {
  margin-left: auto;
}

.body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.comment small {
  color: var(--muted);
}

.comments form {
  margin-top: 16px;
}

.day {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.day:last-child {
  border-bottom: 0;
}
.day.past {
  opacity: 0.5;
}
.day ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.day li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 2px 0;
}
.day li.ev-row {
  cursor: pointer;
}

.day-label {
  width: 150px;
  flex-shrink: 0;
  font-weight: 600;
}

.time {
  width: 70px;
  color: var(--muted);
  font-size: 14px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  padding: 1px;
}

.cal-head {
  background: var(--card);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 10px;
  color: var(--muted);
}

.cal-cell {
  background: var(--card);
  min-height: 90px;
  padding: 6px 8px;
  font-size: 13px;
}
.cal-cell.blank {
  background: var(--bg);
}
.cal-cell.today .cal-num {
  color: var(--accent);
  font-weight: 800;
}

.cal-num {
  font-weight: 600;
  margin-bottom: 4px;
}

.cal-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

.cal-event {
  display: block;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  align-items: stretch;
  padding-bottom: 8px;
  margin-right: -40px;
  min-height: calc(100vh - 210px);
}

.board-col {
  min-width: 300px;
  width: 300px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #f1f1f1;
  border: 0px solid #e1e1e1;
  border-radius: 8px;
  padding: 12px;
}
.board-col .list-head {
  align-items: center;
  margin-bottom: 12px;
}
.board-col.new-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-style: dashed;
  background: transparent;
}
.board-col.drop-over {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

.col-count {
  display: inline-block;
  margin-left: 8px;
  background: #e6e8ec;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 7px;
  vertical-align: 1px;
}

.col-add {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: var(--ink);
  padding: 4px;
  border-radius: 8px;
}
.col-add svg {
  width: 20px;
  height: 20px;
}
.col-add:hover {
  background: #e8eaee;
  filter: none;
}

.col-add-form {
  margin: 0 0 12px;
}
.col-add-form[hidden] {
  display: none;
}

.kcard {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  cursor: pointer;
}
.kcard:hover {
  border-color: #eaeaea;
}
.kcard.dragging {
  opacity: 0.4;
}
.kcard.done {
  opacity: 0.7;
}
.kcard.done .kcard-title .todo-title {
  text-decoration: line-through;
  color: var(--muted);
}
.kcard .eye {
  margin-left: auto;
}

.drop-above {
  box-shadow: 0 -3px 0 var(--accent);
}

li.todo.dragging {
  opacity: 0.4;
}

.kcard-title {
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kcard-title .todo-title {
  flex: 1;
}

.kcard-desc {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.kcard-meta {
  display: flex;
  gap: 6px;
  margin: 10px 0 0;
  flex-wrap: wrap;
}
.kcard-meta:empty {
  display: none;
}
.kcard-meta .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
}
.kcard-meta .status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.kcard-meta .status-chip.no-dot::before {
  display: none;
}
.kcard-meta .status-chip.pr-chip {
  border-radius: 4px;
}
.kcard-meta .status-chip svg {
  width: 13px;
  height: 13px;
}

.kcard-date {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}
.kcard-date svg {
  width: 15px;
  height: 15px;
}
.kcard-date.overdue {
  color: var(--danger);
}

.kcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
  min-height: 30px;
}

.kcard-stats {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.kcard-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.kcard-stats svg {
  width: 15px;
  height: 15px;
}

button.eye {
  font-size: 14px;
  opacity: 0.7;
  text-decoration: none;
}
button.eye:hover {
  opacity: 1;
}

.chat-card {
  padding: 0;
  overflow: hidden;
}
.chat-card form {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.chatlog {
  max-height: 420px;
  overflow-y: auto;
  padding: 20px 24px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}
.chat-msg.own .chat-bubble {
  background: var(--accent-soft);
}

.chat-bubble {
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 14px;
  max-width: 75%;
}
.chat-bubble small {
  color: var(--muted);
}

.chat-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 13px;
}
.chat-file svg {
  width: 14px;
  height: 14px;
}

.chat-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--grey-bg);
  padding: 6px 8px 8px;
}
.chat-box textarea {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  resize: vertical;
  min-height: 40px;
  max-height: 160px;
  padding: 8px 10px;
  font: inherit;
}
.chat-box textarea:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

.chat-tools {
  display: flex;
  gap: 2px;
  padding: 0px 4px 2px;
  border-bottom: 1px solid var(--line);
}
.chat-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chat-tools button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.chat-tools button:hover {
  background: var(--grey-bg);
  color: var(--ink);
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 0;
}
.chat-actions .chat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chat-actions .chat-icon svg {
  width: 17px;
  height: 17px;
}
.chat-actions .chat-icon:hover {
  background: var(--grey-bg);
  color: var(--ink);
}
.chat-actions .chat-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.chat-actions .chat-send svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.chat-actions .chat-send:hover {
  opacity: 0.9;
}

.doc-icon {
  font-size: 20px;
}

.client-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.client-check input {
  width: auto;
}

.feature-row {
  cursor: pointer;
}
.feature-row input {
  width: auto;
  flex-shrink: 0;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.person-row:last-child {
  border-bottom: 0;
}
.person-row small {
  display: block;
}
.person-row select {
  font: inherit;
  font-size: 14px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.org-row {
  color: inherit;
}

.org-row:hover {
  background: var(--bg);
}

.pending-head {
  margin-top: 18px;
}

.invite-link {
  font-size: 13px;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-all;
}

.danger-zone h3 {
  color: var(--danger);
}

.lineup-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.lineup-row:last-child {
  border-bottom: 0;
}

.lineup-name {
  width: 160px;
  flex-shrink: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-track {
  position: relative;
  flex: 1;
  height: 22px;
  background: var(--bg);
  border-radius: 11px;
}

.lineup-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  background: var(--accent);
  border-radius: 8px;
  opacity: 0.85;
}

.lineup-today {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--danger);
}

.lineup-dates {
  width: 200px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat strong {
  display: block;
  font-size: 28px;
}
.stat small {
  color: var(--muted);
}

ul.plain {
  list-style: none;
  padding: 0;
  margin: 0;
}

.actions a:not(.btn) {
  color: var(--ink);
  text-decoration: underline;
}

.active-tab {
  color: var(--ink);
  font-weight: 600;
  text-decoration-thickness: 2px;
}

.checkin-freq {
  color: var(--muted);
}

kbd {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 7px;
  font-family: inherit;
  font-size: 13px;
}

.shortcuts {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.shortcuts.show {
  display: flex;
}
.shortcuts .card {
  width: 420px;
  max-width: 90vw;
}

@media (max-width: 700px) {
  .shell {
    flex-direction: column;
  }
  .topbar {
    padding-left: 24px;
  }
  main {
    margin-left: 0;
  }
  .sidenav {
    width: 100%;
    min-height: 0;
    position: static;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidenav .logo {
    display: none;
  }
  .side-section {
    display: contents;
  }
  .side-title {
    display: none;
  }
  #side-toggle {
    display: none;
  }
  .side-link {
    white-space: nowrap;
    margin-bottom: 0;
  }
  .day {
    flex-direction: column;
    gap: 4px;
  }
  .tools {
    grid-template-columns: 1fr;
  }
  .page-head h1 {
    font-size: 26px;
  }
}
:root {
  --bg: #fafafa;
  --grey-bg: #fafafa;
  --card: #fff;
  --white: #fff;
  --ink: #141c5c;
  --muted: #587e93;
  --line: #e8e2dd;
  --line-blue: #d5e5f8;
  --accent: #1654FF;
  --accent-soft: #f4f9ff;
  --green: #1e8e6b;
  --green-bg: #ecf6f4;
  --green-dark: #02432F;
  --yellow: #ED9400;
  --yellow-bg: #FCF0DC;
  --yellow-dark: #513300;
  --danger: #c0392b;
  --red-bg: #fdeeec;
  --red-dark: #5F0A00;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1, h2, h3 {
  margin: 0 0 0.4em;
  line-height: 1.2;
}

/*# sourceMappingURL=styles.css.map */
