:root {
  color-scheme: light;
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-soft: #f8f9f6;
  --surface-strong: #eef0e9;
  --sidebar: #17231f;
  --sidebar-soft: #22312c;
  --sidebar-text: #f5f7f2;
  --sidebar-muted: #9caaa4;
  --text: #17201d;
  --muted: #69736e;
  --subtle: #8b948f;
  --line: #e3e7df;
  --line-strong: #d6dbd2;
  --accent: #246b52;
  --accent-strong: #18533e;
  --accent-soft: #e4f1eb;
  --blue: #3f6cad;
  --blue-soft: #e8effa;
  --amber: #9a681c;
  --amber-soft: #fbf0da;
  --red: #b84a45;
  --red-soft: #fbe9e7;
  --purple: #6e5c9f;
  --purple-soft: #f0ebfa;
  --shadow: 0 18px 50px rgba(28, 41, 35, 0.12);
  --shadow-soft: 0 6px 24px rgba(28, 41, 35, 0.08);
  --radius: 14px;
  --sidebar-width: 252px;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #111614;
  --surface: #18201d;
  --surface-soft: #1d2723;
  --surface-strong: #26322d;
  --sidebar: #0d1210;
  --sidebar-soft: #1c2924;
  --text: #edf2ee;
  --muted: #a7b1ac;
  --subtle: #818d87;
  --line: #2a3631;
  --line-strong: #394740;
  --accent: #63b993;
  --accent-strong: #7bc9a6;
  --accent-soft: #203b30;
  --blue: #8eb4eb;
  --blue-soft: #22344d;
  --amber: #e3b75e;
  --amber-soft: #44361d;
  --red: #ef918b;
  --red-soft: #482927;
  --purple: #bca8ed;
  --purple-soft: #342c4b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 6px 24px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
  outline-offset: 1px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  left: 0;
  padding: 18px 14px 14px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand-row,
.brand,
.topbar,
.topbar-actions,
.sidebar-section-title,
.profile-button,
.page-heading,
.heading-actions,
.stat-line,
.section-heading,
.task-main,
.project-card-top,
.project-card-footer,
.tab-row,
.filter-row,
.drawer-heading,
.drawer-actions,
.activity-row,
.note-heading,
.board-column-heading {
  align-items: center;
  display: flex;
}

.brand-row {
  justify-content: space-between;
  min-height: 36px;
  padding: 0 4px;
}

.brand {
  background: transparent;
  border: 0;
  color: inherit;
  gap: 10px;
  padding: 0;
  text-align: left;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  height: 34px;
  object-fit: contain;
  width: 34px;
}

.castara-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #315f50, #6fa58c);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(49, 95, 80, .22);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 760;
  letter-spacing: 0.015em;
}

.brand-copy small {
  color: #66c8ee;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.025em;
  margin-top: 3px;
}

.quick-create {
  align-items: center;
  background: #f1f6f3;
  border: 0;
  border-radius: 10px;
  color: #18241f;
  display: grid;
  font-weight: 680;
  gap: 9px;
  grid-template-columns: auto 1fr auto;
  margin: 22px 0 17px;
  min-height: 42px;
  padding: 0 10px;
  text-align: left;
  transition: transform 120ms ease, background 120ms ease;
}

.quick-create:hover {
  background: #fff;
  transform: translateY(-1px);
}

.quick-create.is-unavailable {
  background: rgba(255, 255, 255, .06);
  color: #aebbb5;
}

.quick-create.is-unavailable:hover {
  background: rgba(255, 255, 255, .1);
}

.quick-create-icon {
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.project-required-banner {
  align-items: flex-start;
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 28%, var(--line));
  border-radius: var(--radius);
  color: var(--text);
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding: 15px 17px;
}

.project-required-banner p {
  color: var(--muted);
  margin: 4px 0 0;
}

.project-required-icon,
.project-required-modal-icon {
  align-items: center;
  background: var(--amber);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.project-required-modal {
  text-align: center;
}

.project-required-modal .project-required-modal-icon {
  height: 42px;
  margin-bottom: 14px;
  width: 42px;
}

.project-required-modal h2 {
  margin-bottom: 8px;
}

.project-required-modal > p {
  color: var(--muted);
  margin: 0 auto 20px;
  max-width: 520px;
}

.project-required-modal .readonly-context {
  text-align: left;
}

kbd {
  background: color-mix(in srgb, currentColor 8%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  border-radius: 5px;
  color: inherit;
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  padding: 4px 6px;
}

.primary-nav {
  display: grid;
  gap: 3px;
}

.nav-item,
.sidebar-project {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--sidebar-muted);
  display: flex;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  text-align: left;
  width: 100%;
}

.nav-item:hover,
.nav-item.is-active,
.sidebar-project:hover,
.sidebar-project.is-active {
  background: var(--sidebar-soft);
  color: var(--sidebar-text);
}

.nav-icon {
  color: currentColor;
  font-size: 17px;
  text-align: center;
  width: 18px;
}

.sidebar-section {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  margin-top: 17px;
  min-height: 0;
  padding-top: 16px;
}

.sidebar-section-title {
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.08em;
  padding: 0 8px 8px 10px;
  text-transform: uppercase;
}

.sidebar-projects {
  display: grid;
  gap: 2px;
  max-height: calc(100vh - 390px);
  overflow-y: auto;
}

.sidebar-project-dot,
.project-symbol {
  border-radius: 50%;
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

.sidebar-project span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  margin-top: auto;
  position: relative;
}

.account-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  bottom: 57px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
  color: var(--text);
  display: grid;
  left: 0;
  max-height: min(520px, calc(100vh - 90px));
  overflow-y: auto;
  padding: 7px;
  position: absolute;
  right: 0;
  z-index: 60;
}

.account-menu[hidden] {
  display: none;
}

.account-menu-context {
  border-bottom: 1px solid var(--line);
  display: grid;
  margin-bottom: 4px;
  padding: 9px 10px 11px;
}

.account-menu-context small,
.account-menu button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.account-menu-context strong {
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 48px;
  padding: 7px 8px;
  text-align: left;
}

.account-menu button:hover {
  background: var(--surface-strong);
}

.account-menu button > span:last-child,
.account-menu button strong,
.account-menu button small {
  display: block;
}

.account-menu-icon {
  align-items: center;
  background: var(--surface-strong);
  border-radius: 7px;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  height: 28px;
  justify-content: center;
}

.account-menu-separator {
  border-top: 1px solid var(--line);
  margin: 4px 6px;
}

.account-menu .account-menu-danger,
.account-menu .account-menu-danger small {
  color: var(--red);
}

.profile-button {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--sidebar-text);
  gap: 10px;
  padding: 14px 6px 4px;
  text-align: left;
  width: 100%;
}

.profile-button[aria-expanded='true'] {
  background: var(--sidebar-soft);
  border-radius: 9px;
}

.profile-menu-chevron {
  color: var(--sidebar-muted);
  letter-spacing: 1px;
}

.avatar {
  align-items: center;
  background: #d7eadf;
  border-radius: 9px;
  color: #225b46;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.profile-copy {
  display: grid;
  flex: 1;
}

.profile-copy strong {
  font-size: 12px;
  font-weight: 650;
}

.profile-copy small {
  color: var(--sidebar-muted);
  font-size: 10px;
}

.main-area {
  min-width: 0;
}

.topbar {
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  height: 64px;
  justify-content: space-between;
  padding: 0 34px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  flex: 0 0 auto;
  gap: 10px;
}

.global-search {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--subtle);
  display: flex;
  gap: 7px;
  height: 36px;
  padding: 0 8px 0 11px;
  width: 230px;
}

.global-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent);
}

.global-search input {
  background: transparent;
  border: 0;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.global-search input::placeholder {
  color: var(--subtle);
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  font-size: 17px;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.icon-button:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.icon-button.subtle {
  border: 0;
  color: inherit;
  height: 24px;
  width: 24px;
}

.page {
  margin: 0 auto;
  max-width: 1460px;
  padding: 44px clamp(24px, 4vw, 66px) 80px;
}

.page-heading {
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 30px;
}

.page-heading > div:first-child,
.section-heading > div:first-child {
  min-width: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 8px;
}

h2 {
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 0;
}

h3 {
  font-size: 15px;
  margin-bottom: 5px;
}

.page-subtitle,
.muted {
  color: var(--muted);
}

.page-subtitle {
  margin-bottom: 0;
  max-width: 620px;
  overflow-wrap: anywhere;
}

.heading-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  display: inline-flex;
  font-weight: 650;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 9px 14px;
  text-align: center;
}

.button:hover {
  background: var(--surface-strong);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.danger {
  color: var(--red);
}

.button.small {
  font-size: 12px;
  min-height: 32px;
  padding: 6px 10px;
}

.button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.invitation-send-button {
  min-width: 108px;
}

.invitation-send-button[aria-busy="true"] {
  opacity: .78;
}

.button-spinner {
  animation: button-spin .75s linear infinite;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  height: 13px;
  width: 13px;
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .button-spinner { animation: none; }
}

.stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 34px;
}

.stat-card,
.surface-card,
.project-card,
.board-column,
.note-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-card {
  min-height: 122px;
  padding: 19px 20px;
}

.stat-line {
  color: var(--muted);
  font-size: 12px;
  justify-content: space-between;
}

.stat-icon {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 8px;
  color: var(--accent);
  display: inline-flex;
  height: 29px;
  justify-content: center;
  width: 29px;
}

.stat-card strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  margin-top: 18px;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
}

.surface-card {
  overflow: hidden;
}

.section-heading {
  border-bottom: 1px solid var(--line);
  gap: 12px;
  justify-content: space-between;
  min-height: 59px;
  padding: 11px 19px;
}

.section-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.section-heading > :last-child {
  flex: 0 0 auto;
}

.quick-input-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  padding: 12px 15px;
}

.quick-input-row input {
  background: transparent;
  border: 0;
  flex: 1;
  min-width: 0;
  outline: 0;
}

.quick-input-row select,
.filter-select,
.inline-select {
  appearance: none;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  min-height: 31px;
  padding: 0 25px 0 9px;
}

.quick-input-plus {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 7px;
  color: var(--accent);
  display: inline-flex;
  font-size: 19px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.task-list {
  min-width: 0;
}

.task-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0;
  min-height: 53px;
  padding: 7px 16px;
  transition: background 100ms ease;
}

.task-row.is-table,
.list-header {
  grid-template-columns: minmax(280px, 1fr) 115px 135px 100px 95px 36px;
}

.task-row.is-compact {
  grid-template-columns: minmax(220px, 1fr) 90px 118px 88px 76px 32px;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row:hover {
  background: var(--surface-soft);
}

.task-main {
  gap: 8px;
  min-width: 0;
}

.task-assignee-cell,
.task-status-cell,
.task-priority-cell,
.task-due-cell,
.task-action-cell {
  align-items: center;
  display: flex;
  min-width: 0;
}

.task-assignee-cell {
  justify-content: flex-start;
}

.task-status-cell,
.task-priority-cell,
.task-due-cell {
  padding-right: 10px;
}

.task-status-cell .inline-select {
  max-width: 125px;
  width: 100%;
}

.task-action-cell {
  justify-content: flex-end;
}

.task-indent {
  flex: 0 0 auto;
}

.collapse-button {
  background: transparent;
  border: 0;
  color: var(--subtle);
  height: 25px;
  padding: 0;
  width: 20px;
}

.collapse-button.is-empty {
  cursor: default;
  opacity: 0;
}

.task-check {
  appearance: none;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  flex: 0 0 auto;
  height: 18px;
  margin: 0;
  position: relative;
  width: 18px;
}

.task-check:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.task-check:checked::after {
  color: white;
  content: '✓';
  font-size: 12px;
  left: 3px;
  position: absolute;
  top: -1px;
}

.task-title-button {
  background: transparent;
  border: 0;
  flex: 1;
  font-weight: 580;
  min-width: 120px;
  overflow: hidden;
  padding: 4px 2px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row.is-done .task-title-button {
  color: var(--subtle);
  text-decoration: line-through;
}

.task-project-label {
  color: var(--subtle);
  font-size: 11px;
  margin-left: 6px;
}

.meta-pill,
.status-pill,
.priority-pill,
.count-pill {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.025em;
  min-height: 24px;
  padding: 0 8px;
  white-space: nowrap;
}

.status-todo { background: var(--surface-strong); color: var(--muted); }
.status-progress { background: var(--blue-soft); color: var(--blue); }
.status-blocked { background: var(--red-soft); color: var(--red); }
.status-done { background: var(--accent-soft); color: var(--accent); }
.status-cancelled { background: var(--surface-strong); color: var(--subtle); }
.status-planning { background: var(--purple-soft); color: var(--purple); }
.status-active { background: var(--accent-soft); color: var(--accent); }
.status-hold { background: var(--amber-soft); color: var(--amber); }
.status-completed { background: var(--blue-soft); color: var(--blue); }
.status-archived { background: var(--surface-strong); color: var(--subtle); }
.priority-urgent, .priority-high { background: var(--red-soft); color: var(--red); }
.priority-medium { background: var(--amber-soft); color: var(--amber); }
.priority-low { background: var(--blue-soft); color: var(--blue); }

.due-label {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.due-label.is-overdue {
  color: var(--red);
  font-weight: 650;
}

.row-action {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--subtle);
  height: 28px;
  opacity: 0;
  padding: 0;
  width: 28px;
}

.task-row:hover .row-action,
.row-action:focus-visible {
  opacity: 1;
}

.mini-project-list {
  display: grid;
  gap: 0;
}

.mini-project {
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  padding: 16px 18px;
}

.mini-project:last-child {
  border-bottom: 0;
}

.mini-project:hover {
  background: var(--surface-soft);
}

.mini-project-title {
  align-items: center;
  display: flex;
  font-weight: 650;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mini-project-title > span:first-child {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.progress-track {
  background: var(--surface-strong);
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
}

.progress-value {
  background: var(--accent);
  border-radius: inherit;
  height: 100%;
  transition: width 250ms ease;
}

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

.project-card-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.visibility-badge {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  padding: 4px 8px;
  text-transform: uppercase;
}

.visibility-badge.public {
  background: var(--blue-soft);
  color: var(--blue);
}

.visibility-badge.private {
  background: var(--purple-soft);
  color: var(--purple);
}

.workspace-directory {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(280px, .75fr) minmax(420px, 1.25fr);
}

.workspace-card-grid {
  display: grid;
  gap: 10px;
}

.workspace-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 13px;
  text-align: left;
}

.workspace-card:hover,
.workspace-card.is-active {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.workspace-card-mark {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
  color: var(--accent);
  display: flex;
  font-size: 18px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  overflow: hidden;
  width: 42px;
}

.workspace-card-mark img,
.workspace-detail-logo img,
.workspace-logo-preview-mark img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.workspace-card-copy strong,
.workspace-card-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-card-copy {
  min-width: 0;
}

.workspace-card-copy strong,
.workspace-card-copy small {
  white-space: nowrap;
}

.workspace-card-copy small,
.workspace-detail > p {
  color: var(--muted);
  margin-top: 3px;
}

.workspace-detail {
  padding: 24px;
}

.workspace-detail-heading {
  align-items: center;
  display: flex;
  gap: 15px;
  min-width: 0;
}

.workspace-detail-heading > div {
  min-width: 0;
}

.workspace-detail-logo,
.workspace-logo-preview-mark {
  align-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
}

.workspace-detail-logo {
  border-radius: 14px;
  font-size: 24px;
  height: 62px;
  width: 62px;
}

.workspace-detail h2 {
  font-family: Georgia, serif;
  font-size: 30px;
  margin: 5px 0 0;
}

.workspace-detail .team-summary-grid {
  margin-top: 24px;
}

.workspace-boundary-note {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
}

.readonly-context,
.handle-preview {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 43px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.workspace-type-options {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-type-options label {
  cursor: pointer;
  position: relative;
}

.workspace-type-options input {
  opacity: 0;
  position: absolute;
}

.workspace-type-options span {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
  min-height: 78px;
  padding: 13px;
}

.workspace-type-options strong,
.workspace-type-options small {
  display: block;
}

.workspace-type-options small {
  color: var(--muted);
  margin-top: 4px;
}

.workspace-type-options input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.role-selection-field {
  border-top: 1px solid var(--line);
  margin-top: 3px;
  padding-top: 14px;
}

.role-guidance {
  background: var(--blue-soft);
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 10px;
  color: var(--text);
  margin-top: 9px;
  padding: 12px 13px;
}

.role-guidance strong {
  color: var(--blue);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.role-guidance p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
}

.workspace-switch-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  max-height: min(420px, 55vh);
  overflow-y: auto;
}

.workspace-switch-option {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  display: grid;
  gap: 11px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  padding: 11px;
  text-align: left;
}

.workspace-switch-option .workspace-card-mark {
  height: 40px;
  width: 40px;
}

.workspace-switch-option:hover,
.workspace-switch-option.is-active {
  border-color: var(--accent);
}

.workspace-switch-option > span:nth-child(2) strong,
.workspace-switch-option > span:nth-child(2) small {
  display: block;
}

.workspace-switch-option small,
.workspace-switch-option > span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.workspace-switch-option.is-active > span:last-child {
  color: var(--accent);
  font-weight: 750;
}

.profile-editor-heading {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  gap: 12px;
  margin: 18px 0;
  padding: 13px;
}

.profile-editor-heading strong,
.profile-editor-heading small {
  display: block;
}

.profile-editor-heading small {
  color: var(--muted);
  margin-top: 2px;
}

.workspace-settings-role {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 10px;
  display: grid;
  margin: 18px 0;
  padding: 12px 13px;
}

.workspace-logo-editor {
  align-items: center;
  background: linear-gradient(145deg, var(--surface-soft), color-mix(in srgb, var(--accent-soft) 45%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 16px;
  display: grid;
  gap: 18px;
  grid-template-columns: 92px minmax(0, 1fr);
  padding: 16px;
}

.workspace-logo-preview {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
}

.workspace-logo-preview > span:last-child {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.workspace-logo-preview-mark {
  border: 3px solid var(--surface);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(28, 41, 35, 0.13);
  font-size: 29px;
  height: 84px;
  width: 84px;
}

.workspace-logo-controls {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.workspace-logo-dropzone {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 34%, var(--line-strong));
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  gap: 11px;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 68px;
  padding: 11px 13px;
  position: relative;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.workspace-logo-dropzone:hover,
.workspace-logo-dropzone:focus-within,
.workspace-logo-dropzone.is-dragging {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.workspace-logo-dropzone input[type='file'] {
  border: 0;
  height: 1px;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.workspace-logo-dropzone strong,
.workspace-logo-dropzone small {
  display: block;
}

.workspace-logo-dropzone strong {
  color: var(--text);
  font-size: 12px;
}

.workspace-logo-dropzone small,
.workspace-logo-actions {
  color: var(--muted);
  font-size: 10px;
}

.workspace-logo-dropzone small {
  margin-top: 3px;
}

.workspace-logo-upload-icon {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
  color: var(--accent);
  display: inline-flex;
  font-size: 20px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.workspace-logo-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: space-between;
}

.workspace-settings-role span,
.workspace-settings-role small {
  color: var(--muted);
  font-size: 10px;
}

.workspace-settings-role strong {
  color: var(--accent);
  margin: 2px 0;
}

.readonly-context strong,
.readonly-context small {
  display: block;
}

.readonly-context small {
  color: var(--muted);
}

.handle-preview {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
}

.assignment-selector,
.assignment-group {
  display: grid;
  gap: 10px;
}

.assignment-group + .assignment-group {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.assignment-group > strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.team-assignee-avatar {
  background: var(--purple);
  color: white;
}

.team-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -12px 0 24px;
}

.team-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  min-height: 33px;
  padding: 0 13px;
}

.team-chip:hover,
.team-chip.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--accent);
}

.team-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

.team-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
}

.team-directory-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: 310px minmax(0, 1fr);
}

.team-tree-panel {
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  position: sticky;
  top: 84px;
}

.team-tree-title,
.team-tree-heading,
.team-detail-header,
.team-detail-identity,
.team-detail-label,
.team-project-row {
  align-items: center;
  display: flex;
}

.team-tree-title {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  min-height: 72px;
  padding: 13px 16px;
}

.team-tree-title .eyebrow {
  display: block;
  margin-bottom: 3px;
}

.team-tree-title h2 {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 500;
}

.team-tree {
  display: grid;
  gap: 5px;
  padding: 12px 10px 16px;
}

.team-tree-group + .team-tree-group {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 11px;
}

.team-tree-heading {
  color: var(--muted);
  font-size: 11px;
  gap: 8px;
  min-height: 34px;
  padding: 0 7px;
}

.team-tree-heading strong {
  flex: 1;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-tree-heading > span:last-child {
  background: var(--surface-strong);
  border-radius: 999px;
  font-size: 10px;
  padding: 2px 7px;
}

.team-tree-folder {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 6px;
  color: var(--accent);
  display: inline-flex;
  font-size: 9px;
  font-weight: 800;
  height: 23px;
  justify-content: center;
  width: 23px;
}

.team-tree-folder.other {
  background: var(--purple-soft);
  color: var(--purple);
}

.team-tree-children {
  border-left: 1px solid var(--line-strong);
  margin-left: 18px;
  padding: 3px 0 5px 8px;
}

.team-tree-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  display: grid;
  gap: 9px;
  grid-template-columns: 8px 33px minmax(0, 1fr) 12px;
  margin: 2px 0;
  min-height: 58px;
  padding: 7px 8px 7px 0;
  position: relative;
  text-align: left;
  width: 100%;
}

.team-tree-item:hover {
  background: var(--surface-soft);
}

.team-tree-item.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.team-tree-branch {
  border-top: 1px solid var(--line-strong);
  display: block;
  width: 8px;
}

.team-tree-avatar,
.team-detail-avatar {
  align-items: center;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: inline-flex;
  font-family: Georgia, serif;
  justify-content: center;
}

.team-tree-avatar {
  border-radius: 9px;
  font-size: 15px;
  height: 33px;
  width: 33px;
}

.team-tree-copy {
  display: grid;
  min-width: 0;
}

.team-tree-copy strong,
.team-tree-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-tree-copy strong {
  font-size: 12px;
}

.team-tree-copy small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
}

.team-tree-arrow {
  color: var(--subtle);
  font-size: 17px;
}

.team-tree-empty {
  color: var(--subtle);
  font-size: 11px;
  margin: 7px 8px 9px;
}

.team-detail-panel {
  min-width: 0;
}

.team-detail-header {
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  min-height: 126px;
  padding: 22px 24px;
}

.team-detail-identity {
  gap: 16px;
  min-width: 0;
}

.team-detail-identity > div {
  min-width: 0;
}

.team-detail-avatar {
  border-radius: 13px;
  flex: 0 0 auto;
  font-size: 27px;
  height: 58px;
  width: 58px;
}

.team-detail-label {
  color: var(--accent);
  font-size: 10px;
  font-weight: 760;
  gap: 9px;
  flex-wrap: wrap;
  letter-spacing: 0.07em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.team-detail-label code {
  background: var(--surface-strong);
  border-radius: 5px;
  color: var(--muted);
  font-family: inherit;
  font-size: 9px;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-detail-header h1 {
  font-size: clamp(27px, 3vw, 38px);
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.team-detail-header p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  overflow-wrap: anywhere;
}

.team-detail-panel .team-summary-grid {
  margin-bottom: 16px;
}

.team-detail-panel .stat-card {
  min-height: 105px;
  padding: 16px 18px;
}

.team-detail-panel .stat-card strong {
  font-size: 29px;
  margin-top: 14px;
}

.team-detail-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
}

.team-projects-panel {
  margin-top: 16px;
}

.team-project-list {
  display: grid;
}

.team-project-row {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  gap: 11px;
  min-height: 60px;
  padding: 10px 18px;
  text-align: left;
  width: 100%;
}

.team-project-row > :not(.team-project-copy) {
  flex: 0 0 auto;
}

.team-project-row:last-child {
  border-bottom: 0;
}

.team-project-row:hover {
  background: var(--surface-soft);
}

.team-project-copy {
  display: grid;
  flex: 1;
  min-width: 0;
}

.team-project-copy strong,
.team-project-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-project-copy strong {
  font-size: 13px;
}

.team-project-copy small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

.member-list,
.invitation-list {
  display: grid;
}

.member-row,
.invitation-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  min-height: 68px;
  padding: 11px 17px;
}

.member-row:last-child,
.invitation-row:last-child {
  border-bottom: 0;
}

.member-copy {
  display: grid;
  flex: 1;
  min-width: 0;
}

.member-copy strong,
.member-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-badge,
.member-task-count,
.invitation-row > .button {
  flex: 0 0 auto;
}

.member-copy strong {
  font-size: 13px;
}

.member-copy span,
.member-task-count {
  color: var(--muted);
  font-size: 11px;
}

.role-badge {
  background: var(--surface-strong);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  padding: 5px 7px;
  text-transform: uppercase;
}

.invitation-icon {
  align-items: center;
  background: var(--amber-soft);
  border-radius: 9px;
  color: var(--amber);
  display: inline-flex;
  flex: 0 0 auto;
  height: 35px;
  justify-content: center;
  width: 35px;
}

.avatar-stack {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  padding-left: 5px;
}

.member-avatar {
  align-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 8px;
  font-weight: 800;
  height: 25px;
  justify-content: center;
  margin-left: -5px;
  width: 25px;
}

.member-avatar.large {
  border: 0;
  flex: 0 0 auto;
  font-size: 11px;
  height: 38px;
  margin: 0;
  width: 38px;
}

.member-avatar.more {
  background: var(--surface-strong);
  color: var(--muted);
}

.unassigned-label {
  color: var(--subtle);
  font-size: 10px;
  white-space: nowrap;
}

.member-selector {
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  max-height: 185px;
  overflow-y: auto;
}

.member-choice {
  align-items: center;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: 18px 27px minmax(0, 1fr);
  min-height: 49px;
  padding: 6px 10px;
}

.member-choice:last-child {
  border-bottom: 0;
}

.member-choice:hover {
  background: var(--surface-soft);
}

.member-choice input {
  height: 16px;
  margin: 0;
  min-height: auto;
  width: 16px;
}

.member-choice .member-avatar {
  margin: 0;
}

.member-choice > span:last-child {
  display: grid;
  min-width: 0;
}

.member-choice strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.member-choice small {
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-audit {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  margin: -10px 0 24px;
  padding: 8px 10px;
}

.email-preview {
  text-align: center;
}

.email-preview-bar {
  align-items: center;
  background: var(--surface-soft);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 9px 10px;
}

.email-mark {
  align-items: center;
  background: var(--accent);
  border-radius: 12px;
  color: #fff;
  display: flex;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  margin: 0 auto 15px;
  transform: rotate(-3deg);
  width: 48px;
}

.email-preview > p {
  color: var(--muted);
  margin: 10px auto 20px;
  max-width: 340px;
}

.invite-detail {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin: 0 auto 18px;
  max-width: 300px;
  padding: 9px 11px;
}

.invite-detail span {
  color: var(--muted);
  font-size: 11px;
}

.email-accept {
  display: flex;
  margin: 0 auto 8px;
}

.email-footnote {
  border-top: 1px solid var(--line);
  color: var(--subtle);
  display: block;
  font-size: 10px;
  margin-top: 21px;
  padding-top: 14px;
}

.project-card {
  cursor: pointer;
  min-height: 210px;
  padding: 20px;
  transition: border 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.project-card-top {
  justify-content: space-between;
  margin-bottom: 30px;
}

.project-card-type {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 10px;
  font-weight: 700;
  gap: 8px;
  min-width: 0;
  text-transform: uppercase;
}

.project-card-type > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-symbol {
  align-items: center;
  border-radius: 9px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.project-icon {
  align-items: center;
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  justify-content: center;
}

.project-icon-nav {
  font-size: 9px;
  height: 20px;
  width: 20px;
}

.project-icon-small {
  font-size: 10px;
  height: 24px;
  width: 24px;
}

.project-card h3 {
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.project-card p {
  color: var(--muted);
  display: -webkit-box;
  font-size: 12px;
  height: 35px;
  margin-bottom: 22px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-card-footer {
  color: var(--muted);
  flex-wrap: wrap;
  font-size: 11px;
  gap: 6px 12px;
  justify-content: space-between;
  margin-top: 9px;
}

.project-hero {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--project-accent) 11%, var(--surface)) 0%, var(--surface) 58%);
  border: 1px solid var(--line);
  border-top: 4px solid var(--project-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
  overflow: hidden;
}

.project-hero-main {
  align-items: flex-start;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 42px);
}

.project-hero-copy {
  min-width: 0;
}

.project-context {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 680;
  gap: 8px;
  letter-spacing: 0.035em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.project-context .project-symbol {
  border-radius: 6px;
  height: 22px;
  width: 22px;
}

.project-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.project-hero-copy > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  max-width: 700px;
}

.project-hero-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.project-overview-strip {
  background: color-mix(in srgb, var(--surface-soft) 82%, transparent);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(100px, 0.55fr));
}

.project-overview-strip > div {
  border-right: 1px solid var(--line);
  min-width: 0;
  padding: 16px 20px;
}

.project-overview-strip > div:last-child {
  border-right: 0;
}

.project-overview-progress > div:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
}

.project-overview-strip span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-overview-strip strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-overview-progress strong {
  font-size: 15px;
  margin: 0;
}

.project-tabs {
  margin-bottom: 18px;
}

.project-title-line {
  align-items: center;
  display: flex;
  gap: 12px;
}

.project-title-line .project-symbol {
  height: 38px;
  width: 38px;
}

.tab-row {
  border-bottom: 1px solid var(--line);
  gap: 25px;
  margin: 0 0 20px;
}

.tab-button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
  margin-bottom: -1px;
  min-height: 43px;
  padding: 0 1px;
}

.tab-button:hover,
.tab-button.is-active {
  color: var(--text);
}

.tab-button.is-active {
  border-bottom-color: var(--accent);
}

.filter-row {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 13px;
}

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

.filter-select {
  background-color: var(--surface);
  min-height: 34px;
}

.list-header {
  align-items: center;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  color: var(--subtle);
  display: grid;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  min-height: 37px;
  padding: 0 16px;
  text-transform: uppercase;
}

.board {
  align-items: start;
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  overflow-x: auto;
  padding-bottom: 12px;
}

.board-column {
  min-height: 350px;
  padding: 12px;
}

.board-column-heading {
  justify-content: space-between;
  padding: 3px 2px 12px;
}

.board-column-heading strong {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.count-pill {
  background: var(--surface-strong);
  color: var(--muted);
  min-height: 21px;
}

.board-cards {
  display: grid;
  gap: 9px;
}

.board-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  padding: 12px;
}

.board-card:hover {
  border-color: var(--accent);
}

.board-card-title {
  font-weight: 620;
  margin-bottom: 11px;
}

.board-card-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 10px;
  justify-content: space-between;
}

.planner-toolbar,
.gantt-toolbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.planner-toolbar > div,
.gantt-toolbar > div:first-child {
  min-width: 0;
}

.planner-toolbar strong,
.gantt-toolbar strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.planner-toolbar span,
.gantt-toolbar span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.planner-notice {
  align-items: flex-start;
  background: color-mix(in srgb, #c58a28 9%, var(--surface));
  border: 1px solid color-mix(in srgb, #c58a28 36%, var(--line));
  border-radius: 10px;
  display: flex;
  gap: 8px 16px;
  margin-bottom: 14px;
  padding: 11px 14px;
}

.planner-notice strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.planner-notice span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.planner-notice button {
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text) 28%, transparent);
  text-underline-offset: 2px;
}

.planner-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.planner-metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  min-width: 0;
  padding: 14px 16px;
  position: relative;
}

.planner-metric::before {
  background: var(--subtle);
  border-radius: 8px;
  content: '';
  height: 4px;
  left: 16px;
  position: absolute;
  top: 0;
  width: 28px;
}

.planner-metric.is-danger::before {
  background: #c65c52;
}

.planner-metric.is-warning::before {
  background: #c58a28;
}

.planner-metric span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.planner-metric strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  margin-top: 8px;
}

.planner-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.65fr);
  margin-bottom: 14px;
}

.planner-panel {
  min-width: 0;
  overflow: hidden;
}

.planner-panel .section-heading {
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 17px 18px 14px;
}

.planner-task-list,
.planner-schedule-list,
.workload-list {
  display: grid;
}

.planner-task-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, auto) 78px 122px;
  min-height: 68px;
  padding: 10px 16px;
  position: relative;
}

.planner-task-row:last-child,
.planner-schedule-row:last-child,
.workload-row:last-child {
  border-bottom: 0;
}

.planner-task-row.has-danger::before {
  background: #c65c52;
  bottom: 12px;
  content: '';
  left: 0;
  position: absolute;
  top: 12px;
  width: 3px;
}

.planner-task-title,
.planner-schedule-title,
.gantt-task-label {
  background: transparent;
  border: 0;
  color: var(--text);
  min-width: 0;
  padding: 0;
  text-align: left;
}

.planner-task-title strong,
.planner-schedule-title strong,
.gantt-task-label strong {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-task-title span,
.planner-schedule-title span,
.gantt-task-label span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.attention-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 720;
  line-height: 1;
  padding: 5px 7px;
  white-space: nowrap;
}

.attention-badge.is-danger {
  background: color-mix(in srgb, #c65c52 10%, var(--surface));
  border-color: color-mix(in srgb, #c65c52 34%, var(--line));
  color: #a64038;
}

.attention-badge.is-warning {
  background: color-mix(in srgb, #c58a28 10%, var(--surface));
  border-color: color-mix(in srgb, #c58a28 34%, var(--line));
  color: #8d611c;
}

.planner-assignees {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.workload-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 11px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 65px;
  padding: 10px 16px;
}

.workload-copy {
  min-width: 0;
}

.workload-copy > div:first-child {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.workload-copy strong,
.workload-copy span {
  font-size: 11px;
}

.workload-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-copy span {
  color: var(--muted);
  flex: 0 0 auto;
}

.workload-track {
  background: var(--surface-strong);
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
}

.workload-track span {
  background: var(--project-accent, var(--accent));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 3px;
}

.planner-empty-copy {
  padding: 22px 18px;
}

.planner-schedule-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 0.7fr) 88px 78px 105px;
  min-height: 62px;
  padding: 10px 18px;
}

.planner-date-range {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 11px;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  white-space: nowrap;
}

.planner-date-range > span:not([aria-hidden]) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-actions,
.gantt-legend {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.gantt-legend {
  white-space: nowrap;
}

.gantt-legend i {
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
  height: 8px;
  margin-right: -5px;
  width: 14px;
}

.gantt-legend i.is-risk {
  background: #c65c52;
}

.gantt-shell {
  max-width: 100%;
  overflow: hidden;
  width: 100%;
}

.page:has(.gantt-toolbar) {
  max-width: none;
}

.gantt-scroll {
  max-height: min(70vh, 720px);
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  width: 100%;
}

.gantt-chart {
  min-width: calc(260px + var(--timeline-width));
}

.gantt-header,
.gantt-row {
  display: grid;
  grid-template-columns: 260px var(--timeline-width);
}

.gantt-header {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  height: 57px;
  position: sticky;
  top: 0;
  z-index: 4;
}

.gantt-label-heading {
  align-items: center;
  border-right: 1px solid var(--line);
  color: var(--subtle);
  display: flex;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  padding: 0 16px;
  text-transform: uppercase;
}

.gantt-axis,
.gantt-track {
  position: relative;
}

.gantt-tick {
  border-left: 1px solid var(--line);
  bottom: 0;
  color: var(--muted);
  font-size: 9px;
  position: absolute;
  top: 0;
}

.gantt-tick > span {
  left: 6px;
  position: absolute;
  top: 20px;
  white-space: nowrap;
}

.gantt-tick:last-child > span {
  left: auto;
  right: 5px;
}

.gantt-today {
  border-left: 1px solid #c65c52;
  bottom: 0;
  color: #a64038;
  font-size: 9px;
  font-weight: 750;
  position: absolute;
  top: 0;
  z-index: 2;
}

.gantt-today > span {
  background: color-mix(in srgb, #c65c52 12%, var(--surface));
  border-radius: 4px;
  left: 4px;
  padding: 2px 4px;
  position: absolute;
  top: 4px;
  white-space: nowrap;
}

.gantt-row {
  border-bottom: 1px solid var(--line);
  min-height: 60px;
}

.gantt-row:last-child {
  border-bottom: 0;
}

.gantt-row.is-done {
  opacity: 0.62;
}

.gantt-task-label {
  border-right: 1px solid var(--line);
  padding: 12px 14px 11px calc(16px + var(--task-depth) * 14px);
}

.gantt-task-label:hover strong {
  color: var(--accent);
}

.gantt-track {
  background: color-mix(in srgb, var(--surface-soft) 55%, transparent);
  min-height: 59px;
}

.gantt-gridline,
.gantt-today-line {
  border-left: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  bottom: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
}

.gantt-today-line {
  border-left-color: color-mix(in srgb, #c65c52 66%, transparent);
  z-index: 2;
}

.gantt-bar {
  background: #87939b;
  border: 0;
  border-radius: 5px;
  color: #fff;
  height: 24px;
  min-width: 10px;
  overflow: hidden;
  padding: 0 8px;
  position: absolute;
  text-align: left;
  text-overflow: ellipsis;
  top: 18px;
  white-space: nowrap;
  z-index: 3;
}

.gantt-bar span {
  font-size: 9px;
  font-weight: 720;
  line-height: 24px;
}

.gantt-bar.status-todo {
  background: #7b8790;
}

.gantt-bar.status-progress {
  background: var(--project-accent, var(--accent));
}

.gantt-bar.status-blocked,
.gantt-bar.is-risk {
  background: #b84e46;
}

.gantt-bar.status-done {
  background: #54816b;
}

.gantt-bar:hover,
.gantt-bar:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  filter: brightness(1.06);
}

.gantt-scale {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
}

.gantt-scale button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  min-height: 27px;
  padding: 0 10px;
}

.gantt-scale button:hover,
.gantt-scale button.is-active {
  color: var(--text);
}

.gantt-scale button.is-active {
  background: var(--surface);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--text) 9%, transparent);
}

.gantt-calendar-guide {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-bottom: 12px;
  padding: 9px 12px;
}

.gantt-calendar-guide span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 10px;
  gap: 5px;
}

.gantt-calendar-guide strong {
  color: var(--text);
  font-size: 10px;
  margin-left: auto;
}

.gantt-calendar-guide i {
  background: var(--project-accent, var(--accent));
  border-radius: 3px;
  display: inline-block;
  height: 8px;
  width: 13px;
}

.gantt-calendar-guide i.is-risk {
  background: #b84e46;
}

.gantt-calendar-guide i.is-estimated {
  background: repeating-linear-gradient(135deg, #87939b 0 3px, transparent 3px 5px);
  border: 1px solid #87939b;
}

.gantt-calendar-guide i.is-today {
  background: #c65c52;
  border-radius: 999px;
  width: 3px;
}

.gantt-schedule-notice {
  align-items: center;
}

.gantt-schedule-notice > div {
  min-width: 0;
}

.gantt-schedule-notice > div strong,
.gantt-schedule-notice > div span {
  display: block;
}

.gantt-schedule-notice > div span {
  margin-top: 3px;
}

.gantt-schedule-notice .button {
  flex: 0 0 auto;
  margin-left: auto;
}

.gantt-empty-schedule {
  padding-bottom: 24px;
  text-align: center;
}

.gantt-empty-schedule > .button {
  margin-top: -8px;
}

.modal:has(.gantt-schedule-modal) {
  overflow: hidden;
  width: min(760px, 100%);
}

.gantt-schedule-modal-heading {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.gantt-schedule-modal-heading h2 {
  margin-bottom: 5px;
}

.gantt-schedule-modal-heading p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.gantt-unscheduled-panel {
  margin-bottom: 12px;
  overflow: hidden;
}

.gantt-unscheduled-panel > .section-heading,
.gantt-unscheduled-heading {
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 14px 16px 12px;
}

.gantt-unscheduled-heading strong,
.gantt-unscheduled-heading span {
  display: block;
}

.gantt-unscheduled-heading strong {
  font-size: 12px;
}

.gantt-unscheduled-heading span {
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}

.gantt-unscheduled-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 1fr) auto;
  min-height: 58px;
  padding: 9px 16px;
}

.gantt-unscheduled-row:last-child {
  border-bottom: 0;
}

.gantt-unscheduled-row > button {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  padding: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-schedule-modal .gantt-unscheduled-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: min(54vh, 520px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.gantt-unscheduled-task {
  min-width: 0;
}

.gantt-unscheduled-task strong,
.gantt-unscheduled-task span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-unscheduled-task strong {
  font-size: 12px;
}

.gantt-unscheduled-task span {
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
}

.gantt-unscheduled-row .gantt-date-editor {
  width: min(300px, 100%);
}

.gantt-date-editor {
  align-items: end;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.gantt-date-editor label {
  min-width: 0;
}

.gantt-date-editor label > span {
  color: var(--muted);
  display: block;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.gantt-date-editor input {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 9px;
  height: 27px;
  min-width: 0;
  padding: 0 5px;
  width: 100%;
}

.gantt-date-editor input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 13%, transparent);
  outline: 0;
}

.gantt-chart {
  min-width: var(--timeline-width);
  width: max(100%, var(--timeline-width));
}

.gantt-header,
.gantt-row {
  display: block;
  width: 100%;
}

.gantt-header {
  height: 78px;
  z-index: 10;
}

.gantt-label-heading {
  align-items: flex-start;
  background: var(--surface-soft);
  flex-direction: column;
  justify-content: center;
  position: sticky;
  left: 0;
  z-index: 7;
}

.gantt-label-heading strong,
.gantt-label-heading span {
  display: block;
}

.gantt-label-heading strong {
  color: var(--text);
  font-size: 11px;
}

.gantt-label-heading span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 0;
  margin-top: 4px;
  text-transform: none;
}

.gantt-calendar-axis {
  background: var(--surface-soft);
  height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.gantt-month-row,
.gantt-unit-row {
  left: 0;
  position: absolute;
  right: 0;
}

.gantt-month-row {
  border-bottom: 1px solid var(--line);
  height: 32px;
  top: 0;
}

.gantt-month-row > span,
.gantt-unit-row > span {
  border-right: 1px solid var(--line);
  box-sizing: border-box;
  overflow: hidden;
  position: absolute;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-month-row > span {
  color: var(--text);
  font-size: 10px;
  font-weight: 720;
  height: 32px;
  line-height: 32px;
  padding: 0 9px;
}

.gantt-unit-row {
  bottom: 0;
  height: 46px;
}

.gantt-unit-row > span {
  align-items: center;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  top: 0;
}

.gantt-unit-row > span.is-weekend {
  background: color-mix(in srgb, var(--text) 3.5%, transparent);
}

.gantt-unit-row > span.is-today {
  background: color-mix(in srgb, #c65c52 9%, transparent);
  color: #a64038;
}

.gantt-unit-row small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-unit-row strong {
  font-size: 10px;
  line-height: 1;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-row {
  border-bottom: 0;
  min-height: 48px;
}

.gantt-task-card {
  align-items: center;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  padding: 9px 12px;
  position: sticky;
  left: 0;
  z-index: 5;
}

.gantt-task-label {
  border-right: 0;
  padding: 0 0 0 calc(var(--task-depth) * 12px);
}

.gantt-track {
  min-height: 48px;
  width: 100%;
}

.gantt-calendar-cell {
  border-right: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  bottom: 0;
  box-sizing: border-box;
  pointer-events: none;
  position: absolute;
  top: 0;
}

.gantt-calendar-cell.is-weekend {
  background: color-mix(in srgb, var(--text) 3.5%, transparent);
}

.gantt-bar {
  height: 26px;
  top: 11px;
}

.gantt-bar span {
  line-height: 26px;
}

.gantt-row:hover .gantt-track {
  background: color-mix(in srgb, var(--project-accent, var(--accent)) 3.5%, var(--surface-soft));
}

.gantt-bar.is-estimated {
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgb(255 255 255 / 16%) 6px 10px);
  border: 1px dashed rgb(255 255 255 / 72%);
}

.notes-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.6fr);
}

.note-composer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  padding: 15px;
}

.note-composer textarea,
.drawer-field textarea,
.modal textarea {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 95px;
  padding: 11px;
  resize: vertical;
  width: 100%;
}

.note-composer-footer {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.notes-list {
  display: grid;
  gap: 10px;
}

.note-card {
  padding: 16px;
}

.note-heading {
  color: var(--muted);
  font-size: 11px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.note-body {
  line-height: 1.6;
  margin-bottom: 0;
  white-space: pre-wrap;
}

.pinned-label {
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.activity-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.activity-row {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  padding: 16px 18px;
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-actor {
  flex: 0 0 34px;
  height: 34px;
  margin-top: 1px;
  width: 34px;
}

.activity-copy {
  flex: 1;
  min-width: 0;
}

.activity-copy p {
  margin: 0;
  overflow-wrap: anywhere;
}

.activity-copy strong {
  font-weight: 750;
}

.activity-identity {
  align-items: baseline;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-right: 2px;
  max-width: 100%;
}

.activity-email {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.activity-email::before {
  content: "·";
  margin-right: 5px;
}

.activity-copy time {
  color: var(--subtle);
  display: block;
  font-size: 11px;
  margin-top: 4px;
}

.activity-count {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
}

.empty-state {
  color: var(--muted);
  padding: 48px 20px;
  text-align: center;
}

.empty-illustration {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
  color: var(--accent);
  display: flex;
  font-size: 25px;
  height: 54px;
  justify-content: center;
  margin: 0 auto 14px;
  width: 54px;
}

.empty-state p {
  margin-bottom: 0;
}

.drawer-scrim,
.modal-backdrop,
.sidebar-scrim {
  background: rgba(8, 14, 11, 0.35);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 160ms ease;
}

.drawer-scrim {
  z-index: 60;
}

.drawer-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.task-drawer {
  background: var(--surface);
  box-shadow: var(--shadow);
  height: 100vh;
  max-width: 100%;
  overflow-y: auto;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(105%);
  transition: transform 200ms ease;
  width: 470px;
  z-index: 70;
}

.task-drawer.is-open {
  transform: translateX(0);
}

.drawer-heading {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.drawer-heading small {
  color: var(--muted);
}

.drawer-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 5px;
}

.drawer-title-input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  font-family: Georgia, serif;
  font-size: 27px;
  line-height: 1.2;
  margin-bottom: 23px;
  outline: 0;
  padding: 3px 0;
  width: 100%;
}

.drawer-title-input:focus {
  border-bottom-color: var(--accent);
}

.drawer-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 25px;
}

.drawer-field {
  display: grid;
  gap: 6px;
}

.drawer-field.full {
  grid-column: 1 / -1;
}

.drawer-field label,
.field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.drawer-field input,
.drawer-field select,
.field input,
.field select {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.drawer-section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.drawer-section + .drawer-section {
  margin-top: 23px;
}

.drawer-section h3 {
  margin-bottom: 12px;
}

.subtask-item {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  min-height: 40px;
}

.subtask-item button {
  background: transparent;
  border: 0;
  flex: 1;
  text-align: left;
}

.modal-backdrop {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 20px;
  z-index: 90;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 40px);
  max-width: 100%;
  overflow-y: auto;
  overflow-wrap: anywhere;
  padding: 24px;
  transform: translateY(8px) scale(0.99);
  transition: transform 160ms ease;
  width: min(470px, 100%);
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal h2 {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  margin-bottom: 5px;
}

.modal > p {
  color: var(--muted);
  margin-bottom: 21px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.modal-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 22px;
}

.project-color-editor {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  gap: 12px;
  padding: 13px;
}

.project-color-custom {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 48px minmax(0, 190px);
}

.project-color-picker {
  border: 2px solid var(--surface);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  display: block;
  height: 44px;
  overflow: hidden;
  position: relative;
  width: 48px;
}

.project-color-picker input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.project-color-picker span {
  display: block;
  height: 100%;
  width: 100%;
}

.project-color-code {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  min-height: 44px;
  overflow: hidden;
}

.project-color-code:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.project-color-code span {
  color: var(--muted);
  font-weight: 750;
  text-align: right;
}

.project-color-code input {
  background: transparent;
  border: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  min-height: 42px;
  outline: 0;
  padding: 0 9px 0 4px;
  text-transform: uppercase;
}

.project-color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-color-presets button {
  background: var(--preset-color);
  border: 2px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
  height: 27px;
  padding: 0;
  transition: transform 120ms ease, box-shadow 120ms ease;
  width: 27px;
}

.project-color-presets button:hover,
.project-color-presets button:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
  transform: scale(1.08);
}

.project-color-editor > small {
  color: var(--muted);
  font-size: 10px;
}

.toast-region {
  bottom: 20px;
  display: grid;
  gap: 8px;
  position: fixed;
  right: 20px;
  width: min(360px, calc(100vw - 40px));
  z-index: 110;
}

.toast {
  animation: toast-in 180ms ease;
  background: var(--sidebar);
  border-radius: 9px;
  box-shadow: var(--shadow-soft);
  color: var(--sidebar-text);
  font-size: 12px;
  overflow-wrap: anywhere;
  padding: 11px 14px;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
}

.search-results {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-top: 15px;
  overflow: hidden;
}

.mobile-only {
  display: none;
}

body.auth-mode {
  background: var(--surface);
}

.auth-mode .app-shell {
  display: block;
}

.auth-mode .sidebar,
.auth-mode .topbar,
.auth-mode .sidebar-scrim,
.auth-mode .drawer-scrim,
.auth-mode .task-drawer {
  display: none;
}

.auth-mode .page {
  margin: 0;
  max-width: none;
  padding: 0;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(480px, 0.92fr);
  min-height: 100vh;
}

.auth-visual {
  background:
    radial-gradient(circle at 78% 18%, rgba(111, 191, 153, 0.18), transparent 27%),
    radial-gradient(circle at 22% 85%, rgba(91, 136, 114, 0.15), transparent 30%),
    #12231d;
  color: #f5f8f5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(30px, 5vw, 72px);
  position: relative;
}

.auth-visual::after {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: '';
  height: 440px;
  position: absolute;
  right: -220px;
  top: 28%;
  width: 440px;
}

.auth-brand {
  align-items: center;
  background: transparent;
  border: 0;
  display: inline-flex;
  padding: 0;
  text-decoration: none;
  width: fit-content;
}

.auth-company-logo {
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.16));
  height: auto;
  transition: filter 150ms ease;
  width: clamp(155px, 15vw, 205px);
}

.castara-wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.castara-wordmark > b {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 13px;
  background: rgba(255,255,255,.12);
  font-size: 27px;
}

.castara-wordmark span { display: grid; gap: 2px; }
.castara-wordmark strong { font-size: 18px; letter-spacing: .12em; }
.castara-wordmark small { color: #b9d6cb; font-size: 9px; letter-spacing: .1em; }

.auth-pitch {
  margin: auto 0;
  max-width: 650px;
  position: relative;
  z-index: 1;
}

.auth-kicker {
  color: #90c7ad;
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  margin-bottom: 22px;
  text-transform: uppercase;
}

.auth-pitch h1 {
  font-size: clamp(48px, 6vw, 82px);
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin-bottom: 26px;
}

.auth-pitch > p {
  color: #b8c7c0;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.7;
  max-width: 560px;
}

.auth-benefits {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 14px;
  margin-top: 42px;
  max-width: 560px;
  padding-top: 24px;
}

.auth-benefits span {
  align-items: center;
  color: #dce6e1;
  display: flex;
  gap: 18px;
}

.auth-benefits b {
  color: #6fab8f;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.auth-visual-footer {
  color: #7f988d;
  font-size: 12px;
  margin: 0;
}

.auth-panel {
  align-items: center;
  background: var(--surface);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(30px, 6vw, 92px);
}

.auth-card {
  width: min(100%, 510px);
}

.auth-card-heading {
  margin-bottom: 34px;
}

.auth-card-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3.5vw, 46px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 7px 0 13px;
}

.auth-card-heading p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form-row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.auth-form .field {
  gap: 8px;
}

.auth-form .field label {
  color: var(--text);
  font-size: 12px;
}

.auth-form .field input {
  background: var(--surface-soft);
  border-radius: 10px;
  min-height: 50px;
  padding: 0 14px;
}

.auth-form .field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
  outline: none;
}

.auth-remember {
  align-items: flex-start;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin-top: -2px;
}

.auth-remember input {
  accent-color: var(--accent);
  flex: 0 0 auto;
  height: 17px;
  margin: 2px 0 0;
  width: 17px;
}

.auth-remember span {
  display: grid;
  gap: 2px;
}

.auth-remember strong {
  font-size: 13px;
}

.auth-remember small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.auth-submit {
  font-size: 14px;
  justify-content: space-between;
  margin-top: 5px;
  min-height: 52px;
  padding: 0 18px;
  width: 100%;
}

.auth-submit span {
  font-size: 19px;
}

.auth-sso-button {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--text);
  display: grid;
  grid-template-columns: 26px 1fr 26px;
  margin-top: 0;
}

.auth-sso-button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.auth-sso-button img {
  height: 24px;
  width: 24px;
}

.auth-sso-button span {
  font-size: 14px;
}

.auth-sso-button b {
  font-size: 19px;
  font-weight: 500;
}

.auth-divider {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 12px;
  margin: 20px 0;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  background: var(--line);
  content: '';
  flex: 1;
  height: 1px;
}

.auth-divider span {
  white-space: nowrap;
}

.auth-switch {
  color: var(--muted);
  font-size: 13px;
  margin: 23px 0 0;
  text-align: center;
}

.auth-switch button {
  background: none;
  border: 0;
  color: var(--accent);
  font-weight: 700;
  padding: 4px;
}

.auth-email-chip,
.auth-invite-help {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 11px;
  color: var(--accent-strong);
}

.auth-email-chip {
  align-items: center;
  display: flex;
  font-size: 13px;
  font-weight: 650;
  gap: 9px;
  min-height: 44px;
  padding: 0 13px;
}

.auth-invite-help {
  align-items: flex-start;
  display: flex;
  gap: 15px;
  padding: 19px;
}

.auth-mail-icon {
  font-size: 22px;
}

.auth-invite-help strong {
  display: block;
  margin-bottom: 4px;
}

.auth-invite-help p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 1100px) {
  .planner-layout {
    grid-template-columns: 1fr;
  }

  .planner-schedule-row {
    grid-template-columns: minmax(180px, 1fr) minmax(170px, 0.8fr) 80px 105px;
  }

  .planner-schedule-row > span:nth-child(4) {
    display: none;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-row.is-table,
  .list-header {
    grid-template-columns: minmax(220px, 1fr) 100px 122px 86px 78px 32px;
  }

  .task-row.is-compact {
    grid-template-columns: minmax(200px, 1fr) 80px 110px 70px 32px;
  }

  .task-row.is-compact .task-priority-cell {
    display: none;
  }

  .project-overview-strip {
    grid-template-columns: minmax(190px, 1.2fr) repeat(4, minmax(82px, 0.5fr));
  }

  .team-directory-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .team-detail-grid {
    grid-template-columns: 1fr;
  }

  .team-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-detail-header .heading-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .auth-page {
    grid-template-columns: minmax(340px, 0.8fr) minmax(440px, 1fr);
  }

  .auth-pitch h1 {
    font-size: 54px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .mobile-only {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    transform: translateX(-105%);
    transition: transform 190ms ease;
    width: min(300px, 88vw);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    z-index: 35;
  }

  .sidebar-scrim.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar {
    gap: 11px;
    padding: 0 16px;
  }

  .breadcrumbs {
    flex: 1;
  }

  .global-search {
    width: 40px;
  }

  .global-search input,
  .global-search kbd {
    display: none;
  }

  .global-search:focus-within {
    left: 15px;
    position: absolute;
    right: 15px;
    width: auto;
    z-index: 2;
  }

  .global-search:focus-within input {
    display: block;
  }

  .page {
    padding: 30px 18px 70px;
  }

  .project-tabs {
    flex-wrap: nowrap;
    gap: 22px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .project-tabs .tab-button {
    flex: 0 0 auto;
  }

  .planner-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .planner-task-row {
    grid-template-columns: minmax(170px, 1fr) minmax(120px, auto) 116px;
  }

  .planner-task-row .planner-assignees {
    display: none;
  }

  .planner-schedule-row {
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 0.8fr) 105px;
  }

  .planner-schedule-row > span:nth-child(3),
  .planner-schedule-row > span:nth-child(4) {
    display: none;
  }

  .gantt-toolbar {
    align-items: flex-start;
  }

  .gantt-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .gantt-chart {
    min-width: var(--timeline-width);
  }

  .gantt-header,
  .gantt-row {
    width: 100%;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading .heading-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .dashboard-grid,
  .notes-layout,
  .team-layout,
  .team-directory-layout,
  .workspace-directory {
    grid-template-columns: 1fr;
  }

  .team-tree-panel {
    max-height: none;
    position: static;
  }

  .team-tree {
    grid-template-columns: 1fr 1fr;
  }

  .team-tree-group + .team-tree-group {
    border-left: 1px solid var(--line);
    border-top: 0;
    margin: 0;
    padding: 0 0 0 10px;
  }

  .task-row.is-table,
  .list-header {
    grid-template-columns: minmax(220px, 1fr) 120px 82px 32px;
  }

  .list-header span:nth-child(2),
  .list-header span:nth-child(4),
  .task-row.is-table .task-assignee-cell,
  .task-row.is-table .task-priority-cell {
    display: none;
  }

  .task-row.is-compact {
    grid-template-columns: minmax(180px, 1fr) 108px 72px 32px;
  }

  .task-row.is-compact .task-assignee-cell,
  .task-row.is-compact .task-priority-cell {
    display: none;
  }

  .project-hero-main {
    flex-direction: column;
  }

  .project-hero-actions {
    width: 100%;
  }

  .project-hero-actions .button {
    flex: 1;
  }

  .project-overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-overview-progress {
    grid-column: 1 / -1;
  }

  .project-overview-strip > div:nth-child(3),
  .project-overview-strip > div:nth-child(5) {
    border-right: 0;
  }

  .auth-page {
    display: block;
  }

  .auth-visual {
    min-height: auto;
    padding: 26px 24px 32px;
  }

  .auth-pitch {
    margin: 55px 0 0;
  }

  .auth-pitch h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .auth-pitch > p,
  .auth-benefits,
  .auth-visual-footer {
    display: none;
  }

  .auth-panel {
    align-items: flex-start;
    min-height: auto;
    padding: 44px 24px 60px;
  }
}

@media (max-width: 560px) {
  .stats-grid,
  .project-grid,
  .team-summary-grid {
    grid-template-columns: 1fr;
  }

  .workspace-type-options {
    grid-template-columns: 1fr;
  }

  .workspace-switch-option {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .workspace-switch-option > span:last-child {
    grid-column: 2;
  }

  .stats-grid {
    gap: 9px;
  }

  .stat-card {
    min-height: 94px;
  }

  .stat-card strong {
    margin-top: 11px;
  }

  .heading-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .heading-actions .button:only-child {
    grid-column: 1 / -1;
  }

  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .planner-toolbar,
  .gantt-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .planner-toolbar .button,
  .gantt-toolbar .button {
    width: 100%;
  }

  .planner-notice {
    flex-direction: column;
  }

  .planner-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planner-task-row {
    align-items: start;
    grid-template-areas:
      "title status"
      "risks risks";
    grid-template-columns: minmax(0, 1fr) 112px;
    padding: 13px 12px;
  }

  .planner-task-title {
    grid-area: title;
  }

  .planner-task-row .attention-badges {
    grid-area: risks;
  }

  .planner-task-row .inline-select {
    grid-area: status;
    max-width: 112px;
  }

  .planner-schedule-row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 13px 12px;
  }

  .planner-schedule-row .planner-date-range {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .planner-schedule-row > span:nth-child(3),
  .planner-schedule-row > span:nth-child(4) {
    display: none;
  }

  .planner-panel .section-heading {
    align-items: flex-start;
    gap: 10px;
  }

  .gantt-actions {
    align-items: stretch;
  }

  .gantt-legend,
  .gantt-calendar-guide {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .gantt-chart {
    min-width: var(--timeline-width);
  }

  .gantt-header,
  .gantt-row {
    width: 100%;
  }

  .gantt-task-label {
    padding-left: calc(12px + var(--task-depth) * 10px);
    padding-right: 10px;
  }

  .gantt-task-card {
    padding: 8px 10px;
  }

  .gantt-calendar-guide {
    flex-wrap: nowrap;
  }

  .gantt-calendar-guide strong {
    display: none;
  }

  .gantt-unscheduled-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .gantt-unscheduled-row .gantt-date-editor,
  .gantt-schedule-notice .button {
    margin-left: 0;
    width: 100%;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quick-input-row select {
    display: none;
  }

  .task-row {
    padding-left: 8px;
    padding-right: 8px;
  }

  .list-header {
    display: none;
  }

  .task-row.is-table {
    grid-template-areas:
      "task action"
      "status due";
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 78px;
    row-gap: 8px;
  }

  .task-row.is-table .task-main { grid-area: task; }
  .task-row.is-table .task-status-cell { grid-area: status; padding-left: 46px; }
  .task-row.is-table .task-due-cell { grid-area: due; justify-content: flex-end; padding-right: 4px; }
  .task-row.is-table .task-action-cell { grid-area: action; }

  .task-row.is-compact {
    grid-template-columns: minmax(0, 1fr) 32px;
  }

  .task-row.is-compact .task-status-cell,
  .task-row.is-compact .task-due-cell {
    display: none;
  }

  .task-row .row-action {
    opacity: 1;
  }

  .task-indent {
    max-width: 30px;
  }

  .status-pill {
    font-size: 0;
    min-height: 9px;
    min-width: 9px;
    padding: 0;
  }

  .project-hero {
    margin-left: -4px;
    margin-right: -4px;
  }

  .project-hero-main {
    padding: 24px 19px;
  }

  .project-hero h1 {
    font-size: 38px;
  }

  .project-overview-strip > div {
    padding: 13px 15px;
  }

  .member-row,
  .invitation-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .member-copy {
    flex-basis: calc(100% - 50px);
  }

  .member-row .role-badge {
    margin-left: 50px;
  }

  .member-task-count {
    display: none;
  }

  .invitation-row .button {
    flex: 1;
    min-width: 120px;
  }

  .team-tree {
    grid-template-columns: 1fr;
  }

  .team-tree-group + .team-tree-group {
    border-left: 0;
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding: 11px 0 0;
  }

  .team-detail-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .team-detail-header .button {
    width: 100%;
  }

  .team-detail-identity {
    align-items: flex-start;
    width: 100%;
  }

  .team-detail-avatar {
    height: 48px;
    width: 48px;
  }

  .task-project-label {
    display: none;
  }

  .task-drawer {
    padding: 19px;
    width: 100%;
  }

  .drawer-grid {
    grid-template-columns: 1fr;
  }

  .drawer-field.full {
    grid-column: auto;
  }

  .tab-row {
    gap: 18px;
    overflow-x: auto;
  }

  .auth-form-row {
    grid-template-columns: 1fr;
  }

  .auth-card-heading {
    margin-bottom: 28px;
  }

  .auth-card-heading h2 {
    font-size: 34px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
    padding: 20px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .modal-actions .button {
    width: 100%;
  }

  .toast-region {
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: auto;
  }
}

@media (max-width: 380px) {
  .heading-actions,
  .filters {
    grid-template-columns: 1fr;
  }

  .heading-actions .button,
  .project-hero-actions .button {
    width: 100%;
  }

  .project-hero-actions {
    width: 100%;
  }

  .team-detail-identity {
    gap: 11px;
  }

  .team-detail-label {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-logo-editor {
    grid-template-columns: 1fr;
  }

  .workspace-logo-controls .button {
    justify-self: stretch;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
