:root {
  color-scheme: light;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-muted: #f8fafc;
  --color-surface-hover: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --color-border-hover: #94a3b8;
  --color-text: #0f172a;
  --color-text-secondary: #334155;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-focus: #3b82f6;
  --color-focus-ring: #dbeafe;
  --color-accent-bg: #dbeafe;
  --color-accent-text: #1d4ed8;
  --color-danger: #dc2626;
  --color-danger-ring: #fee2e2;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  --color-danger-text: #991b1b;
  --color-danger-solid: #dc2626;
  --color-danger-solid-hover: #b91c1c;
  --color-warning-bg: #fef3c7;
  --color-warning-text: #92400e;
  --color-info-bg: #eff6ff;
  --color-info-border: #bfdbfe;
  --color-info-text: #1e40af;
  --color-stage: #eef2f6;
  --color-card: #ffffff;
  --color-card-border: #e2e8f0;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --color-topbar: rgba(255, 255, 255, 0.9);
  --color-backdrop: rgba(15, 23, 42, 0.45);
  --color-showcase-from: #1e3a8a;
  --color-showcase-via: #2563eb;
  --color-showcase-to: #3b82f6;
  --color-showcase-card: #ffffff;
  --color-showcase-line: #e2e8f0;
  --color-showcase-line-short: #f1f5f9;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.25);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html.dark {
  color-scheme: dark;
  --color-bg: #0b1120;
  --color-surface: #111827;
  --color-surface-muted: #0f172a;
  --color-surface-hover: #1f2937;
  --color-border: #1f2937;
  --color-border-strong: #334155;
  --color-border-hover: #475569;
  --color-text: #e5e7eb;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-subtle: #64748b;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-focus: #60a5fa;
  --color-focus-ring: rgba(59, 130, 246, 0.35);
  --color-accent-bg: rgba(59, 130, 246, 0.18);
  --color-accent-text: #93c5fd;
  --color-danger: #f87171;
  --color-danger-ring: rgba(248, 113, 113, 0.3);
  --color-danger-bg: rgba(220, 38, 38, 0.12);
  --color-danger-border: rgba(248, 113, 113, 0.35);
  --color-danger-text: #fca5a5;
  --color-warning-bg: rgba(251, 191, 36, 0.16);
  --color-warning-text: #fcd34d;
  --color-info-bg: rgba(59, 130, 246, 0.12);
  --color-info-border: rgba(96, 165, 250, 0.35);
  --color-info-text: #93c5fd;
  --color-stage: #101828;
  --color-card: #182236;
  --color-card-border: #243147;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --color-topbar: rgba(17, 24, 39, 0.85);
  --color-backdrop: rgba(2, 6, 23, 0.7);
  --color-showcase-from: #172554;
  --color-showcase-via: #1e40af;
  --color-showcase-to: #2563eb;
  --color-showcase-card: #1e293b;
  --color-showcase-line: #334155;
  --color-showcase-line-short: #273449;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
}

.Button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.Button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.Button--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.Button--primary:hover {
  background: var(--color-primary-hover);
}

.Button--secondary {
  border-color: var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-secondary);
}

.Button--secondary:hover {
  border-color: var(--color-border-hover);
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.Button--danger {
  background: var(--color-danger-solid);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.Button--danger:hover {
  background: var(--color-danger-solid-hover);
}

.Button--ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.Button--ghost:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.Button--large {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}

.Button--block {
  width: 100%;
}

.Button__icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.IconButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.IconButton:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.IconButton:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.IconButton:disabled {
  background: transparent;
  color: var(--color-text-subtle);
  cursor: default;
  opacity: 0.5;
}

.IconButton--danger:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.IconButton__icon {
  width: 18px;
  height: 18px;
}

.VisuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.ThemeToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.ThemeToggle:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.ThemeToggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.ThemeToggle__icon {
  width: 18px;
  height: 18px;
}

.ThemeToggle__icon--sun,
html.dark .ThemeToggle__icon--moon {
  display: none;
}

html.dark .ThemeToggle__icon--sun {
  display: block;
}

.Input,
.Select,
.Textarea {
  width: 100%;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.Input {
  height: 40px;
  padding: 0 12px;
}

.Input[type="number"] {
  appearance: textfield;
}

.Input[type="number"]::-webkit-inner-spin-button,
.Input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.Select {
  height: 40px;
  padding: 0 36px 0 12px;
  background-image: var(--select-chevron);
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  appearance: none;
  cursor: pointer;
}

.Textarea {
  min-height: 96px;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.Input::placeholder,
.Textarea::placeholder {
  color: var(--color-text-subtle);
}

.Input:hover,
.Select:hover,
.Textarea:hover {
  border-color: var(--color-border-hover);
}

.Input:focus,
.Select:focus,
.Textarea:focus {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.Input--error,
.Input--error:hover,
.Select--error,
.Select--error:hover,
.Textarea--error,
.Textarea--error:hover {
  border-color: var(--color-danger);
}

.Input--error:focus,
.Select--error:focus,
.Textarea--error:focus {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px var(--color-danger-ring);
}

.Field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.Field__label {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.Field__error {
  margin-top: 6px;
  color: var(--color-danger);
  font-size: 13px;
}

.Alert {
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.Alert--error {
  border-color: var(--color-danger-border);
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.Alert--info {
  border-color: var(--color-info-border);
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

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

.Flash__close {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
}

.Flash__close:hover {
  opacity: 1;
}

.Flash__close-icon {
  width: 16px;
  height: 16px;
}

.Avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.Avatar--initials {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
  font-size: 12px;
  font-weight: 700;
}

.Brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  text-decoration: none;
}

.Brand__logo {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.Brand__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.Topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-topbar);
  backdrop-filter: saturate(180%) blur(8px);
}

.Topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.UserMenu {
  position: relative;
}

.UserMenu__trigger {
  display: inline-flex;
  padding: 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.UserMenu__trigger:hover .Avatar,
.UserMenu__trigger[aria-expanded="true"] .Avatar {
  box-shadow: 0 0 0 2px var(--color-border-strong);
}

.UserMenu__trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.UserMenu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: none;
  width: 240px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  animation: fade-in 0.12s ease-out;
}

.UserMenu__profile {
  display: flex;
  flex-direction: column;
  margin-bottom: 6px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--color-border);
}

.UserMenu__name,
.UserMenu__username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.UserMenu__name {
  font-size: 14px;
  font-weight: 600;
}

.UserMenu__username {
  color: var(--color-text-muted);
  font-size: 13px;
}

.UserMenu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.UserMenu__item:hover {
  background: var(--color-surface-hover);
}

.UserMenu__item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.UserMenu__icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--color-text-muted);
}

.UserMenu__switch {
  margin-left: auto;
}

html.dark .UserMenu__switch {
  background: var(--color-primary);
}

html.dark .UserMenu__switch::after {
  transform: translateX(16px);
}

.App {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.App__main {
  flex-grow: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.App__main:has(> .Board) {
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
}

.PageHeader {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.PageHeader__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ProjectGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ProjectCard {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ProjectGrid__item {
  position: relative;
}

.ProjectGrid__leave {
  position: absolute;
  top: 8px;
  right: 8px;
}

.ProjectCard--shared {
  padding-right: 48px;
}

.ProjectCard__action {
  margin-left: auto;
}

.ProjectCard:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow);
}

.ProjectCard--archived,
.ProjectCard--archived:hover {
  border-color: var(--color-border);
  box-shadow: none;
}

.ProjectCard--archived {
  flex-wrap: wrap;
}

.ProjectCard--archived .ProjectCard__body {
  flex: 1 1 140px;
}

.ProjectCard:focus-visible {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.ProjectCard__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.ProjectCard__icon--0 {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.ProjectCard__icon--1 {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.ProjectCard__icon--2 {
  background: linear-gradient(135deg, #10b981, #047857);
}

.ProjectCard__icon--3 {
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.ProjectCard__icon--4 {
  background: linear-gradient(135deg, #ec4899, #be185d);
}

.ProjectCard__icon--5 {
  background: linear-gradient(135deg, #06b6d4, #0e7490);
}

.ProjectCard__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ProjectCard__name {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 600;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ProjectCard__meta {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.Invitations {
  margin-bottom: 32px;
}

.ProjectFilters {
  margin: 0 0 20px;
}

.Tabs__count {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.Tabs__link--active .Tabs__count {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.ProjectFilters__empty {
  padding: 32px 16px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 14px;
  text-align: center;
}

.Invitations__title {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
}

.Invitations__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.Invitation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 16px 18px;
  border: 1px solid var(--color-info-border);
  border-radius: var(--radius);
  background: var(--color-info-bg);
}

.Invitation__text {
  min-width: 0;
  color: var(--color-text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.Invitation__actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.EmptyState {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  text-align: center;
}

.EmptyState__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--color-primary);
}

.EmptyState__title {
  font-size: 17px;
  font-weight: 700;
}

.EmptyState__text {
  max-width: 360px;
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.EmptyState__button {
  margin-top: 20px;
}

.Modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 16px 16px;
  overflow-y: auto;
}

.Modal__backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-backdrop);
  animation: fade-in 0.15s ease-out;
}

.Modal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.18s ease-out;
}

.Modal__dialog--wide {
  max-width: 560px;
}

.Modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.Modal__title {
  font-size: 18px;
  font-weight: 700;
}

.Modal__close {
  display: inline-flex;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.Modal__close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.Modal__close-icon {
  width: 18px;
  height: 18px;
}

.Modal__start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-right: auto;
}

.Modal__text {
  color: var(--color-text-secondary);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.Modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.ProjectHeader {
  margin-bottom: 24px;
}

.ProjectHeader__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.ProjectHeader__badge {
  padding: 1px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.ProjectHeader__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.Tabs {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  overflow-x: auto;
  box-shadow: inset 0 -1px 0 var(--color-border);
  scrollbar-width: none;
}

.Tabs__link {
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.Tabs__link:hover {
  color: var(--color-text);
}

.Tabs__link--active {
  border-bottom-color: var(--color-primary);
  color: var(--color-text);
}

.BoardFilters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.BoardFilters .FieldGroup {
  flex: 0 1 200px;
  min-width: 150px;
}

.Board {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
}

.Board__stages {
  display: flex;
  flex-grow: 1;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.BoardStage {
  display: flex;
  flex: 0 0 min(300px, 85vw);
  flex-direction: column;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-stage);
  scroll-snap-align: start;
}

.BoardStage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
}

.BoardStage__name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.BoardStage__count {
  min-width: 22px;
  margin-right: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.BoardStage__count:has(+ .BoardStage__estimate) {
  margin-right: 0;
}

.BoardStage__estimate {
  flex: none;
  margin-right: auto;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.BoardStage__add,
.BoardStage__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.BoardStage__add:hover,
.BoardStage__clear:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.BoardStage__add:focus-visible,
.BoardStage__clear:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.BoardStage__add-icon,
.BoardStage__clear-icon {
  width: 18px;
  height: 18px;
}

.BoardStage__tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.BoardStage--drop-target {
  border-color: var(--color-focus);
  box-shadow: inset 0 0 0 2px var(--color-focus-ring);
}

.BoardStage__tasks > .is-dragging {
  opacity: 0.4;
}

.BoardStage__tasks:has(> li) + .BoardStage__empty {
  display: none;
}

.BoardStage__empty {
  padding: 16px 8px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 13px;
  text-align: center;
}

.TaskCard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-sm);
  background: var(--color-card);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
}

.TaskCard:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow);
}

.TaskCard:focus-visible {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.TaskCard__title {
  flex-basis: 100%;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.TaskCard--overdue {
  box-shadow: inset 3px 0 0 var(--color-danger), var(--shadow-sm);
}

.TaskCard--overdue:hover {
  box-shadow: inset 3px 0 0 var(--color-danger), var(--shadow);
}

.TaskCard__footer {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.TaskCard__assignee {
  position: relative;
  display: inline-flex;
  margin-left: auto;
}

.TaskCard__avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.TaskCard__deadline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.TaskCard__deadline-icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.TaskCard__deadline--overdue {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.TaskTags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.TaskTags__priority::before,
.TaskTags__milestone::before,
.TaskTags__estimate::before {
  display: none;
}

.Chip__icon {
  width: 12px;
  height: 12px;
  flex: none;
  margin-right: -2px;
}

.ModalForm__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.LabelPicker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.LabelPicker__options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.LabelPicker__option {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  cursor: pointer;
}

.LabelPicker__input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.LabelPicker .LabelPicker__chip {
  padding: 4px 10px;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  color: var(--color-text-muted);
}

.LabelPicker__input:checked + .LabelPicker__chip {
  border-color: transparent;
  background: var(--tone-bg);
  color: var(--tone-text);
}

.LabelPicker__input:focus-visible + .LabelPicker__chip {
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.LabelPicker__empty {
  color: var(--color-text-muted);
  font-size: 14px;
}

.TextLink {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.TextLink:hover {
  text-decoration: underline;
}

.ModalForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ModalForm .Modal__actions {
  margin-top: 8px;
}

.ModalForm__meta {
  color: var(--color-text-muted);
  font-size: 13px;
}

.TaskTimer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
}

.TaskTimer__totals {
  display: flex;
  gap: 24px;
  margin: 0;
}

.TaskTimer__label {
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.TaskTimer__value {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.TimerBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 16px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--color-info-border);
  border-radius: var(--radius);
  background: var(--color-info-bg);
  font-size: 14px;
}

.TimerBar__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--color-danger);
  animation: tracking-pulse 1.6s ease-in-out infinite;
}

.TimerBar__label {
  color: var(--color-text-muted);
  font-weight: 600;
}

.TimerBar__task {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.TimerBar__task:hover {
  text-decoration: underline;
}

.TimerBar__elapsed {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.TimerBar__stop {
  margin-left: auto;
}

.TaskCard__tracking {
  display: inline-flex;
  flex-basis: 100%;
  align-items: center;
  gap: 6px;
  color: var(--color-danger-text);
  font-size: 12px;
  font-weight: 600;
}

@keyframes tracking-pulse {
  50% {
    opacity: 0.35;
  }
}

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

.TimePeriod {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.TimePeriod__title {
  min-width: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.PeriodPicker {
  flex: none;
}

.PeriodPicker__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  background-image: var(--select-chevron);
  background-position: right 9px center;
  background-repeat: no-repeat;
  background-size: 14px;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.PeriodPicker__trigger:hover {
  border-color: var(--color-border-hover);
}

.PeriodPicker__trigger:focus-visible,
.PeriodPicker__trigger[aria-expanded="true"] {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.PeriodPicker__icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

.PeriodPicker__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 132px 266px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  animation: fade-in 0.12s ease-out;
}

.PeriodPicker__presets {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 12px;
  border-right: 1px solid var(--color-border);
}

.PeriodPicker__preset {
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.PeriodPicker__preset:hover {
  background: var(--color-surface-hover);
}

.PeriodPicker__preset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.PeriodPicker__preset--active,
.PeriodPicker__preset--active:hover {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
  font-weight: 600;
}

.Calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.Calendar__month {
  font-size: 14px;
  font-weight: 600;
}

.Calendar__grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 2px;
  table-layout: fixed;
}

.Calendar__weekday {
  padding: 4px 0;
  color: var(--color-text-subtle);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.Calendar__cell {
  padding: 0;
  text-align: center;
}

.Calendar__cell--range {
  background: var(--color-accent-bg);
}

.Calendar__cell--range:first-child {
  border-radius: 18px 0 0 18px;
}

.Calendar__cell--range:last-child {
  border-radius: 0 18px 18px 0;
}

.Calendar__cell--start {
  background: linear-gradient(90deg, transparent 50%, var(--color-accent-bg) 50%);
}

.Calendar__cell--end {
  background: linear-gradient(90deg, var(--color-accent-bg) 50%, transparent 50%);
}

.Calendar__day {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.Calendar__day:hover {
  background: var(--color-surface-hover);
}

.Calendar__day:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.Calendar__cell--range .Calendar__day {
  color: var(--color-accent-text);
}

.Calendar__day--today {
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--color-border-strong);
}

.Calendar__day--edge,
.Calendar__day--edge:hover {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.Calendar__day:disabled {
  background: transparent;
  color: var(--color-text-subtle);
  cursor: default;
  opacity: 0.5;
}

.Calendar__hint {
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 12px;
  text-align: center;
}

.TimeReport {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.TimeReport__people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.TimeReport__person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.TimeReport__person-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.TimeReport__person-name {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.TimeReport__person-total {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.TimeTable__scroll {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.TimeTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.TimeTable th,
.TimeTable td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.TimeTable thead th {
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.TimeTable thead th:first-child,
.TimeTable tfoot th,
.TimeTable .TimeTable__task {
  text-align: left;
}

.TimeTable .TimeTable__task {
  min-width: 180px;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
}

.TimeTable tfoot th,
.TimeTable tfoot td {
  border-bottom: 0;
  background: var(--color-surface-muted);
  font-weight: 700;
}

.TimeTable__total {
  font-weight: 700;
}

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

.TimeTable__empty {
  color: var(--color-text-subtle);
}

.TimeTable__archived,
.TimeTable__backlog {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.TaskDetails {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.TaskDetails__title {
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.TaskDetails__description {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.TaskDetails__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.TaskDetails__label {
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.TaskDetails__value {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.TaskDetails__value--overdue {
  color: var(--color-danger);
}

.Backlog__actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.TaskList {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  list-style: none;
}

.TaskListItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.TaskListItem + .TaskListItem {
  border-top: 1px solid var(--color-border);
}

.TaskListItem__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.TaskListItem__title {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.TaskListItem__meta {
  color: var(--color-text-muted);
  font-size: 13px;
}

.TaskListItem__stage {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.TaskListItem__deadline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.TaskListItem__deadline-icon {
  width: 14px;
  height: 14px;
}

.TaskListItem__assignee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.TaskListItem__avatar {
  width: 20px;
  height: 20px;
  font-size: 9px;
}

.Pagination {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.Pagination__older {
  margin-left: auto;
}

.Settings {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}

.SettingsNav {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.SettingsNav__link {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.SettingsNav__link:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.SettingsNav__link--active,
.SettingsNav__link--active:hover {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.Settings__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.SettingsSection {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.SettingsSection__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.SettingsSection__status {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  animation: fade-in 0.2s ease-out;
}

.Switch {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.Switch__input {
  position: absolute;
  width: 40px;
  height: 24px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.Switch__track {
  position: relative;
  width: 40px;
  height: 24px;
  flex: none;
  border-radius: 999px;
  background: var(--color-border-strong);
  transition: background-color 0.15s, box-shadow 0.15s;
}

.Switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}

.Switch__input:checked + .Switch__track {
  background: var(--color-primary);
}

.Switch__input:checked + .Switch__track::after {
  transform: translateX(16px);
}

.Switch__input:focus-visible + .Switch__track {
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.Switch__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.Switch__label {
  font-size: 14px;
  font-weight: 600;
}

.Switch__description {
  color: var(--color-text-muted);
  font-size: 13px;
}

.RadioGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 0 52px;
  padding: 0;
  border: 0;
}

.RadioGroup__option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.RadioGroup__input {
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface);
  appearance: none;
  cursor: pointer;
}

.RadioGroup__input::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  transform: scale(0);
  transition: transform 0.15s;
}

.RadioGroup__input:checked {
  border-color: var(--color-primary);
}

.RadioGroup__input:checked::before {
  transform: scale(1);
}

.RadioGroup__input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.SettingsSection__title {
  font-size: 16px;
  font-weight: 700;
}

.SettingsSection__text {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.SettingsSection__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.SettingsSection__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.SettingsList {
  display: flex;
  flex-direction: column;
  margin: 16px 0 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  list-style: none;
}

.SettingsList__item + .SettingsList__item {
  border-top: 1px solid var(--color-border);
}

.SettingsList__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 8px 8px 14px;
}

.SettingsList__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
}

.SettingsList__name {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.SettingsList__meta {
  flex: none;
  color: var(--color-text-muted);
  font-size: 13px;
}

.SettingsList__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
}

.SettingsList__edit {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
}

.SettingsList__edit .FieldGroup {
  flex: 1 1 220px;
}

.SettingsList__edit-actions {
  display: flex;
  gap: 8px;
}

.Tone--gray {
  --tone: #64748b;
  --tone-bg: #f1f5f9;
  --tone-text: #334155;
}

.Tone--red {
  --tone: #ef4444;
  --tone-bg: #fee2e2;
  --tone-text: #991b1b;
}

.Tone--orange {
  --tone: #f97316;
  --tone-bg: #ffedd5;
  --tone-text: #9a3412;
}

.Tone--amber {
  --tone: #f59e0b;
  --tone-bg: #fef3c7;
  --tone-text: #92400e;
}

.Tone--green {
  --tone: #22c55e;
  --tone-bg: #dcfce7;
  --tone-text: #166534;
}

.Tone--teal {
  --tone: #14b8a6;
  --tone-bg: #ccfbf1;
  --tone-text: #115e59;
}

.Tone--blue {
  --tone: #3b82f6;
  --tone-bg: #dbeafe;
  --tone-text: #1e40af;
}

.Tone--indigo {
  --tone: #6366f1;
  --tone-bg: #e0e7ff;
  --tone-text: #3730a3;
}

.Tone--violet {
  --tone: #8b5cf6;
  --tone-bg: #ede9fe;
  --tone-text: #5b21b6;
}

.Tone--pink {
  --tone: #ec4899;
  --tone-bg: #fce7f3;
  --tone-text: #9d174d;
}

html.dark .Tone--gray {
  --tone-bg: rgba(148, 163, 184, 0.18);
  --tone-text: #cbd5e1;
}

html.dark .Tone--red {
  --tone-bg: rgba(248, 113, 113, 0.18);
  --tone-text: #fca5a5;
}

html.dark .Tone--orange {
  --tone-bg: rgba(251, 146, 60, 0.18);
  --tone-text: #fdba74;
}

html.dark .Tone--amber {
  --tone-bg: rgba(251, 191, 36, 0.18);
  --tone-text: #fcd34d;
}

html.dark .Tone--green {
  --tone-bg: rgba(74, 222, 128, 0.16);
  --tone-text: #86efac;
}

html.dark .Tone--teal {
  --tone-bg: rgba(45, 212, 191, 0.16);
  --tone-text: #5eead4;
}

html.dark .Tone--blue {
  --tone-bg: rgba(96, 165, 250, 0.18);
  --tone-text: #93c5fd;
}

html.dark .Tone--indigo {
  --tone-bg: rgba(129, 140, 248, 0.2);
  --tone-text: #a5b4fc;
}

html.dark .Tone--violet {
  --tone-bg: rgba(167, 139, 250, 0.2);
  --tone-text: #c4b5fd;
}

html.dark .Tone--pink {
  --tone-bg: rgba(244, 114, 182, 0.18);
  --tone-text: #f9a8d4;
}

.Chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tone-bg);
  color: var(--tone-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.Chip::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--tone);
}

.ColorPicker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ColorPicker__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ColorPicker__option {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.ColorPicker__input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ColorPicker__swatch {
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-surface);
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 0 1px var(--color-border-strong);
  transition: box-shadow 0.15s;
}

.ColorPicker__input:checked + .ColorPicker__swatch {
  box-shadow: 0 0 0 2px var(--color-text);
}

.ColorPicker__input:focus-visible + .ColorPicker__swatch {
  box-shadow: 0 0 0 2px var(--color-text), 0 0 0 5px var(--color-focus-ring);
}

.MilestoneForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.SettingsList__item > .MilestoneForm {
  padding: 14px;
}

.MilestoneForm__fields {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px;
}

.MilestoneForm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.NamedColorForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.SettingsList__item > .NamedColorForm {
  padding: 14px;
}

.NamedColorForm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.Person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.Person__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.Person__name,
.Person__detail {
  overflow-wrap: anywhere;
}

.Person__name {
  font-size: 14px;
  font-weight: 600;
}

.Person__detail {
  color: var(--color-text-muted);
  font-size: 13px;
}

.SettingsList__row--member {
  flex-wrap: wrap;
}

.SettingsList__row--member .SettingsList__actions {
  margin-left: auto;
}

.MemberRole {
  width: auto;
  height: 32px;
  padding-right: 32px;
  font-size: 13px;
}

.MemberStatus {
  flex: none;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.MemberStatus--owner {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.MemberStatus--invited {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.SettingsList__empty {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 14px;
  text-align: center;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.Login {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  min-height: 100dvh;
}

.Login__showcase {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 48px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(150deg, var(--color-showcase-from), var(--color-showcase-via) 60%, var(--color-showcase-to));
  color: #fff;
}

.Login__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

.Login__logo {
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.2);
}

.Login__headline {
  max-width: 440px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.Login__tagline {
  max-width: 420px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

.Login__panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--color-surface);
}

.Login__theme {
  position: absolute;
  top: 24px;
  right: 24px;
}

.Login__card {
  width: 100%;
  max-width: 380px;
}

.Login__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.Login__text {
  margin-top: 8px;
  color: var(--color-text-muted);
}

.Login__card .Alert {
  margin-top: 24px;
}

.Login__button {
  margin-top: 32px;
}

.Login__note {
  margin-top: 16px;
  color: var(--color-text-subtle);
  font-size: 13px;
  text-align: center;
}

.Showcase {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.Showcase__stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  max-width: 180px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.Showcase__title {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.Showcase__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--color-showcase-card);
  box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.45);
}

.Showcase__tag {
  width: 28px;
  height: 6px;
  border-radius: 999px;
}

.Showcase__tag--blue {
  background: #60a5fa;
}

.Showcase__tag--violet {
  background: #a78bfa;
}

.Showcase__tag--green {
  background: #34d399;
}

.Showcase__tag--amber {
  background: #fbbf24;
}

.Showcase__line {
  height: 6px;
  border-radius: 999px;
  background: var(--color-showcase-line);
}

.Showcase__line--wide {
  width: 90%;
}

.Showcase__line--medium {
  width: 70%;
}

.Showcase__line--narrow {
  width: 55%;
}

.Showcase__line--short {
  width: 35%;
  background: var(--color-showcase-line-short);
}

.DevLogin {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px;
  background: var(--color-surface-hover);
}

.DevLogin__card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 400px;
  padding: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.DevLogin__badge {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.DevLogin__title {
  margin-top: -8px;
  font-size: 20px;
  font-weight: 700;
}

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

@media (max-width: 860px) {
  .Login {
    grid-template-columns: 1fr;
  }

  .Login__showcase {
    gap: 24px;
    padding: 32px 24px;
  }

  .Showcase {
    display: none;
  }

  .Login__headline {
    font-size: 26px;
  }
}

@media (max-width: 760px) {
  .Settings {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .SettingsNav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .SettingsSection {
    padding: 16px;
  }
}

@media (max-width: 600px) {
  .BoardFilters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .BoardFilters .FieldGroup {
    min-width: 0;
  }

  .PeriodPicker__panel {
    left: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .PeriodPicker__presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .PeriodPicker__preset {
    padding: 8px 4px;
    text-align: center;
  }

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

  .Tabs {
    gap: 0;
  }

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

  .Tabs__link {
    padding: 10px 8px;
  }

  .Tabs__count {
    margin-left: 4px;
  }

  .ProjectFilters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    box-shadow: none;
  }

  .ProjectFilters .Tabs__link {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
  }

  .ProjectFilters .Tabs__link--active {
    border-color: var(--color-accent-bg);
    background: var(--color-accent-bg);
    color: var(--color-accent-text);
  }

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

  .SettingsNav__link {
    text-align: center;
  }

  .Topbar__inner {
    padding: 0 16px;
  }

  .App__main {
    padding: 24px 16px 48px;
  }
}

@media (max-width: 440px) {
  .ProjectHeader .Tabs:has(> :nth-child(5)) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ProjectHeader .Tabs:has(> :nth-child(5)) .Tabs__link {
    text-align: center;
  }
}

@media (max-height: 500px) {
  .Modal {
    padding-top: 16px;
  }
}

@media (pointer: coarse) {
  .Input,
  .Select,
  .Textarea {
    font-size: 16px;
  }
}
