:root {
  color-scheme: light;
  --brand: rgb(45, 63, 70);
  --cta: rgb(160, 42, 73);
  --page: #ffffff;
  --panel: #ffffff;
  --ink: #1d2733;
  --muted: #64748b;
  --line: rgb(45, 63, 70);
  --line-soft: rgba(45, 63, 70, 0.22);
  --bad: #b42318;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  background: var(--brand);
  color: #fff;
}

.header-inner,
.page,
.footer-inner {
  width: 100%;
  margin: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 5px 20px;
}

.brand-block {
  display: inline-flex;
  align-items: center;
}

.brand-block img {
  display: block;
  width: 86px;
  height: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
  margin-right: auto;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 120ms ease, color 120ms ease;
}

.header-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.header-nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0;
}

@media (max-width: 760px) {
  .header-nav {
    gap: 0;
    margin-left: 8px;
  }
  .header-nav a {
    padding: 6px 8px;
    font-size: 12px;
  }
}

.account-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.user-initials {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: var(--brand);
  background: #fff;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.logout-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 20;
  min-width: 120px;
  padding-top: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.logout-menu form {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow);
}

.account-menu:hover .logout-menu,
.account-menu:focus-within .logout-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.logout-menu button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  font-weight: 750;
  cursor: pointer;
}

.logout-menu button:hover,
.logout-menu button:focus {
  background: rgba(45, 63, 70, 0.06);
}

.page {
  flex: 1;
  padding: 24px 20px 48px;
}

.messages {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.message {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.message.bad {
  border-color: #f1a6a0;
  color: var(--bad);
  background: #fff5f5;
}

.login-panel,
.simple-panel {
  width: min(500px, 100%);
  margin: 7vh auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-panel {
  justify-items: center;
  text-align: center;
}

.login-panel form {
  width: 100%;
}

.simple-panel {
  width: 100%;
  margin: 0;
}

.login-logo {
  display: block;
  width: 120px;
  height: auto;
  margin: 0 auto 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cta);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.primary-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--cta);
  border-radius: 7px;
  margin: 18px 0 10px;
  color: #fff;
  background: var(--cta);
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: rgb(136, 32, 60);
}

.info-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.info-list dd {
  margin: 0;
  text-align: right;
  font-weight: 750;
}

.home-heading {
  margin-bottom: 24px;
}

.home-heading p {
  margin-bottom: 0;
}

.filter-bar {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff, #fafbfc);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.filter-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.filter-toggle svg:first-child {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.filter-toggle-chevron {
  margin-left: auto;
  width: 12px;
  height: 7px;
  color: var(--muted);
  transition: transform 150ms ease;
}

.filter-toggle[aria-expanded="true"] .filter-toggle-chevron {
  transform: rotate(180deg);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.filter-row .filter-group {
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 240px;
}

.filter-row .filter-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.filter-toggle-group {
  flex: 0 0 auto;
  align-self: stretch;
  max-width: none;
}

.toggle-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  min-height: 40px;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(45, 63, 70, 0.22);
  transition: background 150ms ease;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}

.toggle-switch input:checked ~ .toggle-track {
  background: var(--cta);
}

.toggle-switch input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(16px);
}

.toggle-switch input:focus-visible ~ .toggle-track {
  box-shadow: 0 0 0 3px rgba(160, 42, 73, 0.25);
}

.toggle-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.filter-actions {
  display: flex;
  align-items: flex-end;
}

.filter-apply {
  min-height: 40px;
  border: 1px solid var(--cta);
  border-radius: 8px;
  padding: 0 22px;
  color: #fff;
  background: var(--cta);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.filter-apply:hover {
  background: rgb(136, 32, 60);
}

.filter-apply:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(160, 42, 73, 0.25);
}

.filter-group {
  display: grid;
  gap: 6px;
  min-width: 0;
  position: relative;
}

.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.filter-date {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 600;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.filter-date:hover {
  border-color: var(--line);
}

.filter-date:focus,
.filter-date:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45, 63, 70, 0.12);
}

.filter-select,
.multi-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 36px 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
}

.filter-select:hover,
.multi-trigger:hover {
  border-color: var(--line);
}

.filter-select:focus,
.filter-select:focus-visible,
.multi-trigger:focus,
.multi-trigger:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45, 63, 70, 0.12);
}

.select-wrap .select-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 12px;
  height: 7px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.multi-trigger .select-chevron {
  flex-shrink: 0;
  margin-left: auto;
  width: 12px;
  height: 7px;
  color: var(--muted);
  transition: transform 150ms ease;
}

.multiselect.is-open .multi-trigger {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45, 63, 70, 0.12);
}

.multiselect.is-open .multi-trigger .select-chevron {
  transform: rotate(180deg);
}

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

.multi-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  min-width: 100%;
  z-index: 30;
  display: grid;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.multi-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.multi-clear {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--cta);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.multi-clear:hover {
  color: rgb(136, 32, 60);
}

.multi-options {
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
}

.multi-options li {
  list-style: none;
}

.multi-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 100ms ease;
}

.multi-option:hover {
  background: rgba(45, 63, 70, 0.07);
}

.multi-option input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.multi-option-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-check {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--brand);
  opacity: 0;
  transition: opacity 100ms ease;
}

.status-option .multi-check {
  color: var(--status-color);
}

.multi-option input:checked ~ .multi-check {
  opacity: 1;
}

.multi-option input:checked ~ .multi-option-name {
  font-weight: 800;
}

.multi-option:has(input:focus-visible) {
  background: rgba(45, 63, 70, 0.07);
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.status-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--status-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--status-color) 22%, #ffffff);
}

.person-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(45, 63, 70, 0.12);
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.person-avatar-team {
  background: color-mix(in srgb, var(--cta) 14%, #fff);
}

.person-avatar-team .team-dot {
  width: 10px;
  height: 10px;
}


.result-count {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

.dashboard-card {
  display: grid;
  gap: 10px;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.dashboard-card:hover {
  border-color: var(--cta);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.dashboard-card span {
  color: var(--cta);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-card strong {
  font-size: 24px;
}

.dashboard-card p {
  margin-bottom: 0;
}

.page-title,
.section-heading {
  margin-bottom: 22px;
}

.project-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-row {
  display: grid;
  grid-template-columns: 170px 110px 110px 140px 140px 140px minmax(220px, 1fr) 48px;
  gap: 14px;
  align-items: center;
  min-width: 1180px;
  min-height: 58px;
  padding: 0 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 14px;
}

.col-head {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
}

.today-marker {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 1180px;
  min-height: 44px;
  padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
}

.today-marker::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  height: 1px;
  background: var(--cta);
  opacity: 0.45;
  pointer-events: none;
}

.today-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border: 1px solid var(--cta);
  border-radius: 999px;
  background: #fff;
  color: var(--cta);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.person-cell {
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-cell.is-me {
  color: var(--cta);
  font-weight: 800;
}

.project-link {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease;
}

.project-link:hover,
.project-link:focus-visible {
  outline: none;
  color: var(--brand);
  background: rgba(45, 63, 70, 0.08);
}

.project-link svg {
  width: 16px;
  height: 16px;
}

.overflow-tooltip {
  position: fixed;
  z-index: 1000;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.project-row:first-child {
  border-top: 0;
}

.project-row:not(.table-head):hover {
  background: rgba(45, 63, 70, 0.05);
}

.project-row.table-head {
  min-height: 42px;
  background: rgba(45, 63, 70, 0.06);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: var(--ink);
}

.sort-link:hover,
.sort-link.active {
  color: var(--cta);
}

.sort-link span {
  font-size: 11px;
  line-height: 1;
}

.status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 24px;
  border: 1px solid var(--status-color);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--status-color);
  background: color-mix(in srgb, var(--status-color) 10%, white);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.project-row strong {
  color: var(--ink);
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #fff;
}

.gantt-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  scroll-snap-type: x proximity;
}

.gantt-column {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  border: 1px solid var(--line-soft);
  border-top: 4px solid var(--status-color);
  border-radius: 12px;
  background: #fafbfc;
  scroll-snap-align: start;
}

.gantt-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.gantt-column-head .status-badge {
  width: auto;
  display: inline-flex;
  padding: 4px 12px;
}

.gantt-column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(45, 63, 70, 0.1);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.gantt-column-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  flex: 1;
}

.gantt-column-empty {
  margin: 0;
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.gantt-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.gantt-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.gantt-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.gantt-card-meta {
  display: grid;
  gap: 4px;
  margin: 0;
}

.gantt-card-meta div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  font-size: 13px;
}

.gantt-card-meta dt {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  align-self: center;
}

.gantt-card-meta dd {
  margin: 0;
  text-align: left;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.gantt-card-meta dd.is-me {
  color: var(--cta);
  font-weight: 800;
}

.gantt-card-tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
}

.task-group {
  border-radius: 6px;
  background: rgba(45, 63, 70, 0.03);
}

.task-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  list-style: none;
  cursor: pointer;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.task-group > summary::-webkit-details-marker {
  display: none;
}

.task-group > summary::before {
  content: "▸";
  font-size: 10px;
  color: var(--muted);
  transition: transform 120ms ease;
  display: inline-block;
}

.task-group[open] > summary::before {
  transform: rotate(90deg);
}

.task-group-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-group-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(45, 63, 70, 0.08);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.task-list {
  margin: 0;
  padding: 0 8px 8px 22px;
  list-style: disc;
}

.task-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  color: var(--ink);
}

.task-item::marker {
  color: var(--muted);
}

.task-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.task-assignee {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.task-assignee.is-me {
  color: var(--cta);
  font-weight: 800;
}

.team-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cta);
}

.task-unassigned {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid rgba(180, 35, 24, 0.45);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bad) 10%, #fff);
  color: var(--bad);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .gantt-board {
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .gantt-column {
    flex: 0 0 280px;
  }
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
}

.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}

.cal-nav-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.cal-nav-label {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  min-width: 180px;
  letter-spacing: 0;
}

.cal-nav-today {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  height: 36px;
  border: 1px solid var(--cta);
  border-radius: 8px;
  color: var(--cta);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  transition: background 120ms ease;
}

.cal-nav-today:hover {
  background: color-mix(in srgb, var(--cta) 8%, #fff);
}

.cal-view-switch {
  display: inline-flex;
  margin-left: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.cal-view-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  height: 36px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 120ms ease, color 120ms ease;
}

.cal-view-btn:hover {
  background: rgba(45, 63, 70, 0.05);
}

.cal-view-btn.is-active {
  background: var(--brand);
  color: #fff;
}

.cal-view-btn + .cal-view-btn {
  border-left: 1px solid var(--line-soft);
}

.cal-grid {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: rgba(45, 63, 70, 0.05);
}

.cal-weekdays span {
  padding: 8px 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line-soft);
}

.cal-day {
  border-right: 1px solid var(--line-soft);
  background: #fff;
  padding: 4px 6px;
  display: flex;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  min-height: 72px;
}

.cal-day:last-child {
  border-right: 0;
}

.cal-day.is-outside {
  background: rgba(45, 63, 70, 0.025);
}

.cal-day.is-outside .cal-day-num {
  color: var(--muted);
  opacity: 0.55;
}

.cal-day.is-today {
  background: color-mix(in srgb, var(--cta) 5%, #fff);
}

.cal-day.is-today .cal-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--cta);
  color: #fff;
  font-weight: 800;
}

.cal-day.is-weekend {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 7px,
    rgba(45, 63, 70, 0.07) 7px,
    rgba(45, 63, 70, 0.07) 8px
  );
}

.cal-day.is-holiday {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 6px,
    rgba(160, 42, 73, 0.18) 6px,
    rgba(160, 42, 73, 0.18) 8px
  );
}

.cal-day.is-holiday.is-weekend {
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 7px,
      rgba(45, 63, 70, 0.07) 7px,
      rgba(45, 63, 70, 0.07) 8px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent 0,
      transparent 6px,
      rgba(160, 42, 73, 0.18) 6px,
      rgba(160, 42, 73, 0.18) 8px
    );
}

.cal-day {
  flex-direction: column;
  gap: 2px;
}

.cal-day-holiday {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cta);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cal-day-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.cal-bar {
  z-index: 2;
  position: relative;
  margin: 1px 3px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 5px 8px;
  border: 1px solid var(--status-color);
  border-radius: 4px;
  background: color-mix(in srgb, var(--status-color) 18%, #fff);
  color: color-mix(in srgb, var(--status-color) 70%, #1d2733);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: filter 100ms ease;
  font-family: inherit;
}

.cal-bar-title {
  font-weight: 800;
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cal-bar-person {
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-bar-person-name.is-me {
  color: var(--cta);
  font-weight: 800;
}

.cal-bar-role {
  font-weight: 700;
  opacity: 0.7;
  margin-right: 2px;
}

.cal-bar:hover {
  filter: brightness(0.93);
}

.cal-bar:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.cal-bar.clip-left {
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: 0;
}

.cal-bar.clip-right {
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  margin-right: 0;
}

.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.cal-modal-content {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 20px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
}

.cal-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(45, 63, 70, 0.06);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease;
}

.cal-modal-close:hover {
  background: rgba(45, 63, 70, 0.14);
}

.cal-modal-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-right: 36px;
}

.cal-modal-head .status-badge {
  width: auto;
  align-self: flex-start;
  display: inline-flex;
  padding: 4px 12px;
}

.cal-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.cal-modal-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fafbfc;
}

.cal-modal-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cal-modal-meta dt {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cal-modal-meta dd {
  margin: 0;
  text-align: left;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.cal-modal-meta dd.is-me {
  color: var(--cta);
  font-weight: 800;
}

.cal-modal-dim {
  color: var(--muted);
  font-weight: 600;
}

.cal-bar-pid {
  opacity: 0.7;
  margin-right: 2px;
}

.project-pid {
  color: var(--muted);
  font-weight: 700;
  margin-right: 6px;
}

.cal-modal-pid {
  color: var(--muted);
  font-weight: 700;
  margin-right: 6px;
}

.cal-modal-tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.cal-modal-empty {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px dashed var(--line-soft);
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.cal-modal-zoho {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--cta);
  border-radius: 8px;
  color: var(--cta);
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: background 120ms ease;
}

.cal-modal-zoho:hover {
  background: color-mix(in srgb, var(--cta) 8%, #fff);
}

.cal-modal-zoho svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 760px) {
  .cal-modal {
    padding: 12px;
  }
  .cal-modal-content {
    padding: 20px 18px 16px;
  }
  .cal-modal-meta {
    grid-template-columns: 1fr;
  }
  .cal-modal-title {
    font-size: 18px;
  }
}

@media (max-width: 760px) {
  .cal-nav-label {
    font-size: 16px;
    min-width: 0;
  }
  .cal-day {
    min-height: 56px;
    padding: 3px 4px;
  }
  .cal-day-num {
    font-size: 11px;
  }
  .cal-bar {
    padding: 4px 6px;
  }
  .cal-bar-title {
    font-size: 10px;
  }
  .cal-bar-person {
    font-size: 9px;
  }
}

.wl-board {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.wl-table {
  display: flex;
  align-items: stretch;
}

.wl-left {
  flex: 0 0 220px;
  border-right: 1px solid var(--line-soft);
  background: #fff;
  z-index: 2;
}

.wl-left-head {
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(45, 63, 70, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wl-left-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.wl-left-row.is-me {
  color: var(--cta);
  font-weight: 800;
}

.wl-left-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wl-right {
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.wl-axis {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 60px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(45, 63, 70, 0.04);
}

.wl-axis-days {
  position: relative;
  height: 28px;
}

.wl-axis-day {
  position: absolute;
  top: 0;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-left: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wl-axis-day.is-weekend {
  background: rgba(45, 63, 70, 0.06);
}

.wl-axis-day.is-today {
  background: color-mix(in srgb, var(--cta) 10%, #fff);
  color: var(--cta);
}

.wl-axis-hours {
  position: relative;
  height: 32px;
  border-top: 1px solid var(--line-soft);
}

.wl-axis-hour {
  position: absolute;
  top: 0;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transform: translateX(-50%);
}

.wl-axis-hour.is-day-start {
  color: var(--ink);
  font-weight: 800;
}

.wl-tracks {
  position: relative;
}

.wl-track {
  position: relative;
  border-bottom: 1px solid var(--line-soft);
}

.wl-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(45, 63, 70, 0.06);
  pointer-events: none;
}

.wl-grid-line.is-day-line {
  background: rgba(45, 63, 70, 0.18);
  width: 1px;
}

.wl-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cta);
  z-index: 3;
  pointer-events: none;
  opacity: 0.7;
}

.wl-booking {
  position: absolute;
  height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 4px 8px;
  border: 1px solid var(--status-color);
  border-radius: 5px;
  background: color-mix(in srgb, var(--status-color) 18%, #fff);
  color: color-mix(in srgb, var(--status-color) 70%, #1d2733);
  font-size: 10px;
  font-family: inherit;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  z-index: 2;
  transition: filter 100ms ease;
}

.wl-booking:hover {
  filter: brightness(0.93);
}

.wl-booking.clip-left {
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.wl-booking.clip-right {
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.wl-booking-project {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wl-booking-task {
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wl-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.wl-popover {
  position: fixed;
  z-index: 1000;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  border: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 13px;
  pointer-events: none;
}

.wl-pop {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wl-pop-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wl-pop-head .status-badge {
  width: auto;
  align-self: flex-start;
  display: inline-flex;
  padding: 3px 10px;
}

.wl-pop-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.wl-pop-title strong {
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.wl-pop-task {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(45, 63, 70, 0.04);
  border-radius: 7px;
}

.wl-pop-task-name {
  font-weight: 800;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.wl-pop-task-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.wl-pop-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.wl-pop-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 0;
}

.wl-pop-meta div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.wl-pop-meta dt {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wl-pop-meta dd {
  margin: 0;
  text-align: left;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
}

.loading-state p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(45, 63, 70, 0.12);
  border-top-color: var(--cta);
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2400ms;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 16px 12px 32px;
  }

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

  h1 {
    font-size: 26px;
  }

  .filter-bar {
    padding: 10px 12px;
  }

  .filter-toggle {
    display: flex;
  }

  .filter-row {
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-top: 12px;
  }

  .filter-row.is-open {
    display: flex;
  }

  .filter-row .filter-group,
  .filter-row .filter-actions {
    flex: 1 1 auto;
    max-width: none;
    margin-left: 0;
  }

  .filter-apply {
    width: 100%;
  }

  .multi-panel {
    position: absolute;
    left: 0;
    right: 0;
    max-width: 100%;
  }

  .project-table {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .project-row.table-head {
    display: none;
  }

  .project-row:not(.table-head) {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name link"
      "status status"
      "start start"
      "end end"
      "owner owner"
      "csm csm"
      "tech tech";
    gap: 6px 12px;
    min-width: 0;
    min-height: 0;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-top: 1px solid var(--line-soft);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  .project-row:not(.table-head):hover {
    background: #fff;
  }

  .project-row:not(.table-head) > :nth-child(1) {
    grid-area: status;
    justify-self: start;
  }

  .project-row:not(.table-head) > :nth-child(2) {
    grid-area: start;
  }

  .project-row:not(.table-head) > :nth-child(3) {
    grid-area: end;
  }

  .project-row:not(.table-head) > :nth-child(4) {
    grid-area: owner;
  }

  .project-row:not(.table-head) > :nth-child(5) {
    grid-area: csm;
  }

  .project-row:not(.table-head) > :nth-child(6) {
    grid-area: tech;
  }

  .project-row:not(.table-head) > :nth-child(7) {
    grid-area: name;
    color: var(--ink);
    font-size: 16px;
  }

  .project-row:not(.table-head) > :nth-child(8) {
    grid-area: link;
    align-self: start;
  }

  .project-row:not(.table-head) .status-badge {
    width: auto;
    display: inline-flex;
    padding: 4px 12px;
  }

  .project-row:not(.table-head) > :nth-child(2)::before,
  .project-row:not(.table-head) > :nth-child(3)::before,
  .project-row:not(.table-head) > :nth-child(4):not(:empty)::before,
  .project-row:not(.table-head) > :nth-child(5):not(:empty)::before,
  .project-row:not(.table-head) > :nth-child(6):not(:empty)::before {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-right: 8px;
  }

  .project-row:not(.table-head) > :nth-child(2)::before { content: "Start"; }
  .project-row:not(.table-head) > :nth-child(3)::before { content: "End"; }
  .project-row:not(.table-head) > :nth-child(4):not(:empty)::before { content: "Owner"; }
  .project-row:not(.table-head) > :nth-child(5):not(:empty)::before { content: "CSM"; }
  .project-row:not(.table-head) > :nth-child(6):not(:empty)::before { content: "Tech Lead"; }

  .project-row:not(.table-head) > :nth-child(4):empty,
  .project-row:not(.table-head) > :nth-child(5):empty,
  .project-row:not(.table-head) > :nth-child(6):empty {
    display: none;
  }

  .person-cell {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .today-marker {
    min-width: 0;
    min-height: 0;
    padding: 14px 0 6px;
    border-top: 0;
  }

  .today-marker::before {
    left: 0;
    right: 0;
  }
}
