@font-face {
  font-family: 'Manrope';
  src: url('/Manrope-Variable.ttf') format('truetype-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --page-background: #0f172a;
  --board-surface: rgba(30, 41, 59, 0.5);
  --column-surface: rgba(30, 41, 59, 0.7);
  --card-surface: #1e293b;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --border-soft: rgba(51, 65, 85, 0.5);
  --border-strong: rgb(42, 138, 246);
  --accent: rgb(42, 138, 246);
  --accent-secondary: rgb(168, 83, 186);
  --accent-soft: rgba(42, 138, 246, 0.15);
  --focus-ring: 0 0 0 3px rgba(96, 165, 250, 0.24);
  --focus-shadow: 0 18px 35px rgba(12, 32, 66, 0.32);
  --panel-highlight: rgba(96, 165, 250, 0.12);
  --panel-glass: rgba(15, 23, 42, 0.74);
  --panel-glass-strong: rgba(15, 23, 42, 0.9);
  --pink-accent: rgb(233, 42, 103);
  --success-glow: 0 0 10px rgba(74, 222, 128, 0.5);
  --shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 15px 30px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at top left, rgba(42, 138, 246, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(168, 83, 186, 0.12), transparent 28%),
    var(--page-background);
  color: var(--text-primary);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

.app-shell {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

.app-shell__frame {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 32px;
  display: grid;
  gap: 28px;
}

.app-shell__header {
  display: grid;
  gap: 12px;
  max-width: 980px;
  padding: 24px 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.72)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.18), transparent 42%);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.app-shell__eyebrow,
.workspace-panel__eyebrow,
.auth-panel__eyebrow {
  margin: 0;
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.app-shell__headline {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4.6rem);
  font-weight: 250;
  line-height: 0.95;
  max-width: 10ch;
}

.app-shell__summary {
  margin: 0;
  max-width: 62ch;
  color: rgba(248, 250, 252, 0.76);
  line-height: 1.65;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-logo__mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 16px;
  border: 1px solid rgba(147, 197, 253, 0.46);
  background:
    radial-gradient(circle at 34% 28%, rgba(248, 250, 252, 0.26), transparent 34%),
    linear-gradient(135deg, rgba(42, 138, 246, 0.36), rgba(168, 83, 186, 0.26)),
    rgba(15, 23, 42, 0.88);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 16px 34px rgba(42, 138, 246, 0.26);
}

.brand-logo__glyph {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-logo__stem,
.brand-logo__arch {
  stroke: rgba(248, 250, 252, 0.94);
  stroke-width: 5;
}

.brand-logo__a-leg {
  stroke: rgb(251, 191, 36);
  stroke-width: 6.2;
  paint-order: stroke;
  filter: drop-shadow(0 0 7px rgba(251, 191, 36, 0.5));
}

.brand-logo__a-bar {
  stroke: rgb(251, 191, 36);
  stroke-width: 5;
}

.brand-logo__spark {
  fill: rgb(251, 191, 36);
  stroke: none;
  opacity: 0.92;
}

.brand-logo__arc,
.brand-logo__bridge {
  stroke: rgba(248, 250, 252, 0.88);
  stroke-width: 5.2;
}

.brand-logo__slash {
  stroke: rgb(147, 197, 253);
  stroke-width: 4.4;
}

.brand-logo__cut {
  stroke: rgb(251, 191, 36);
  stroke-width: 4;
}

.brand-logo__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-logo__name {
  font-size: 1.16rem;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(147, 197, 253, 0.24);
}

.brand-logo__tagline {
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.72rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.auth-grid > .brand-logo {
  justify-self: start;
  width: max-content;
  max-width: 100%;
  padding: 10px 14px 10px 10px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 16px 38px rgba(2, 6, 23, 0.22);
}

.auth-grid > .brand-logo .brand-logo__mark {
  width: 60px;
  height: 60px;
  flex-basis: 60px;
}

.auth-grid > .brand-logo .brand-logo__glyph {
  width: 42px;
  height: 42px;
}

.auth-grid > .brand-logo .brand-logo__name {
  font-size: 1.36rem;
  font-weight: 800;
}

.auth-grid > .brand-logo .brand-logo__tagline {
  font-size: 0.78rem;
}

.auth-workspace-scaffold {
  display: grid;
  gap: 16px;
  align-content: start;
}

.auth-grid,
.workspace-active-board {
  display: grid;
  gap: 24px;
  align-items: start;
}

.auth-panel,
.workspace-panel,
.project-modal {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.72)),
    radial-gradient(circle at top right, rgba(168, 83, 186, 0.14), transparent 44%);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.auth-panel:focus-within,
.workspace-panel:focus-within,
.project-modal:focus-within {
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(96, 165, 250, 0.14);
}

.auth-panel {
  display: grid;
  gap: 18px;
  padding: 30px;
}

.auth-panel--secondary {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.68)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.14), transparent 44%);
}

.auth-panel__title,
.workspace-panel__title {
  margin: 0;
  font-size: clamp(1.7rem, 2.2vw, 2.6rem);
  font-weight: 300;
  line-height: 1.05;
}

.auth-panel__copy,
.auth-panel__form {
  display: grid;
  gap: 14px;
}

.auth-panel__signals,
.workspace-panel__project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-panel__signal,
.workspace-panel__project-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.44);
  color: rgba(248, 250, 252, 0.82);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.auth-panel__signal:nth-child(1),
.workspace-panel__project-chip--accent {
  border-color: rgba(42, 138, 246, 0.34);
  background:
    linear-gradient(135deg, rgba(42, 138, 246, 0.18), rgba(168, 83, 186, 0.14)),
    rgba(15, 23, 42, 0.56);
}

.auth-panel__signal:nth-child(3) {
  border-color: rgba(233, 42, 103, 0.28);
  background: rgba(233, 42, 103, 0.08);
}

.workspace-panel__project-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.44);
  color: rgba(248, 250, 252, 0.88);
  pointer-events: none;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.workspace-panel__project-badge--owner {
  border-color: rgba(42, 138, 246, 0.42);
  background: rgba(42, 138, 246, 0.16);
  color: #e0ecff;
  box-shadow: 0 0 24px rgba(42, 138, 246, 0.22);
}

.workspace-panel__project-badge--shared {
  border-color: rgba(148, 163, 184, 0.24);
  color: rgba(226, 232, 240, 0.9);
}

.board-context-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 16px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.board-context-header[data-expanded="false"] {
  gap: 0;
  padding: 12px 18px;
}

.board-context-header__parent-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: rgba(226, 232, 240, 0.92);
  font: inherit;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.board-context-header__parent-link:hover,
.board-context-header__parent-link:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(42, 138, 246, 0.45);
  box-shadow: 0 10px 24px rgba(42, 138, 246, 0.16);
}

.board-context-header__parent-link svg {
  color: rgba(168, 196, 246, 0.95);
}

.board-context-header__parent-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.92);
}

.board-context-header__parent-title {
  font-weight: 500;
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(420px, 60vw);
}

.board-context-header__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.board-context-header__title-row {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.board-context-header__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 300;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.board-context-header__deadline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
  color: rgba(248, 250, 252, 0.9);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}

.board-context-header__deadline svg {
  color: rgba(168, 196, 246, 0.95);
}

.board-context-header__toggle {
  flex: 0 0 auto;
}

.board-context-header__toggle[aria-expanded="true"] svg {
  color: rgba(168, 196, 246, 0.95);
}

.board-context-header__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: board-context-header-reveal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes board-context-header-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.board-context-header__description {
  border-radius: 14px;
  background: rgba(8, 15, 35, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.1);
  padding: 12px 14px;
  color: rgba(236, 242, 255, 0.92);
}

.board-context-header__description .workspace-project-card-markdown {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.board-context-header__description .workspace-project-card-markdown--empty {
  color: rgba(148, 163, 184, 0.85);
  font-style: italic;
}

.board-context-header__parent-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.42);
}

.board-context-header__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.92);
}

.board-context-header__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-context-header__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.5);
  color: rgba(236, 242, 255, 0.9);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.board-context-header__chip svg {
  color: rgba(148, 163, 184, 0.92);
}

.board-context-header__chip--priority-high {
  border-color: rgba(233, 42, 103, 0.34);
  background: rgba(233, 42, 103, 0.14);
  color: #ffd6e3;
}

.board-context-header__chip--priority-high svg {
  color: rgba(255, 140, 175, 0.95);
}

.board-context-header__chip--priority-medium {
  border-color: rgba(168, 83, 186, 0.32);
  background: rgba(168, 83, 186, 0.14);
  color: #f1d6ff;
}

.board-context-header__chip--priority-medium svg {
  color: rgba(216, 156, 240, 0.95);
}

.board-context-header__chip--priority-low {
  border-color: rgba(42, 138, 246, 0.3);
  background: rgba(42, 138, 246, 0.12);
  color: #d8e9ff;
}

.board-context-header__chip--priority-low svg {
  color: rgba(168, 196, 246, 0.95);
}

.board-context-header__parent-description {
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(8, 15, 35, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: rgba(236, 242, 255, 0.9);
  font-size: 0.86rem;
  line-height: 1.5;
}

.board-context-header__attachments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-context-header__attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.board-context-header__attachment svg {
  color: rgba(168, 196, 246, 0.92);
}

.board-context-header__attachment a {
  color: rgba(236, 242, 255, 0.92);
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.board-context-header__attachment a:hover,
.board-context-header__attachment a:focus-visible {
  color: rgba(168, 196, 246, 0.95);
  outline: none;
}

@media (max-width: 720px) {
  .board-context-header {
    padding: 14px 16px;
  }

  .board-context-header__title {
    font-size: 1.25rem;
  }

  .board-context-header__parent-title {
    max-width: 100%;
  }
}

.workspace-panel__project-deadline {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  margin-top: 4px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.44);
  color: rgba(248, 250, 252, 0.86);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
}

.workspace-panel__project-deadline svg {
  color: rgba(168, 196, 246, 0.92);
}

.workspace-panel__project-members {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.workspace-panel__project-members-stack {
  display: inline-flex;
  align-items: center;
}

.workspace-panel__project-member {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: 2px solid rgba(15, 23, 42, 0.92);
  margin-left: -8px;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.36);
}

.workspace-panel__project-members-stack
  .workspace-panel__project-member:first-child {
  margin-left: 0;
}

.workspace-panel__project-member-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workspace-panel__project-member-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.workspace-panel__project-member--sun {
  background: linear-gradient(135deg, #f97316, #f59e0b);
}

.workspace-panel__project-member--mint {
  background: linear-gradient(135deg, #22d3ee, #34d399);
}

.workspace-panel__project-member--ice {
  background: linear-gradient(135deg, #38bdf8, #2a8af6);
}

.workspace-panel__project-member--ember {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.workspace-panel__project-member--volt {
  background: linear-gradient(135deg, #84cc16, #22d3ee);
}

.workspace-panel__project-member--rose {
  background: linear-gradient(135deg, #f472b6, #e92a67);
}

.workspace-panel__project-members-overflow {
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field__label {
  color: rgba(248, 250, 252, 0.86);
  font-size: 0.92rem;
}

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

.auth-field__input,
.workspace-panel__signout,
.auth-panel__button,
.auth-panel__switch {
  font: inherit;
}

.auth-field__input {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-primary);
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-field__input:focus-visible,
.auth-panel__button:focus-visible,
.auth-panel__switch:focus-visible,
.app-header__signout:focus-visible {
  outline: none;
  border-color: rgba(42, 138, 246, 0.84);
  box-shadow:
    var(--focus-ring),
    var(--focus-shadow);
}

.auth-panel__button,
.app-header__signout,
.auth-panel__switch {
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(42, 138, 246, 0.24);
  cursor: pointer;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-panel__button {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(42, 138, 246, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 30px rgba(7, 15, 33, 0.24);
  color: var(--text-primary);
}

.auth-panel__button--register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-panel__button--ghost,
.app-header__signout {
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-primary);
}

.app-header__signout {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  flex: 0 0 auto;
}

.auth-panel__switch {
  background: transparent;
  color: rgba(248, 250, 252, 0.72);
  border-color: rgba(148, 163, 184, 0.12);
}

.auth-panel__button:hover,
.auth-panel__switch:hover,
.app-header__signout:hover {
  border-color: rgba(42, 138, 246, 0.42);
}

.auth-panel__button--register:hover,
.auth-panel__button--register:focus-visible {
  border-color: rgba(42, 138, 246, 0.46);
  background: rgba(30, 41, 59, 0.86);
}

.auth-panel__message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(42, 138, 246, 0.12);
  border: 1px solid rgba(42, 138, 246, 0.18);
  color: rgba(248, 250, 252, 0.88);
  line-height: 1.5;
}

.auth-panel__message--error {
  background: rgba(233, 42, 103, 0.18);
  border-color: rgba(233, 42, 103, 0.52);
  color: #fecdd3;
  box-shadow: 0 0 24px rgba(233, 42, 103, 0.28);
}

.project-modal__note {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.project-modal__note {
  color: rgba(248, 250, 252, 0.88);
}

.project-modal__copy {
  margin: 0;
  color: rgba(248, 250, 252, 0.72);
  line-height: 1.6;
}

.workspace-panel,
.workspace-active-board {
  display: grid;
  gap: 18px;
}

.workspace-panel {
  padding: 30px;
}

.workspace-active-board {
  align-content: start;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 64px;
  padding: 0 24px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.5);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 60;
}

.app-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  min-height: 42px;
  padding: 0 16px;
}

.workspace-panel__project-copy > span {
  color: rgba(248, 250, 252, 0.68);
}
.board-navigation-bar__label {
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.workspace-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.workspace-panel__header-actions,
.workspace-panel__project-actions,
.workspace-panel__delete-actions,
.project-modal__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-panel__project-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

.workspace-panel__project-list > li {
  min-width: 0;
}

.workspace-profile-card {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.52);
}

.profile-page {
  display: grid;
  gap: 16px;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.72)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.16), transparent 44%);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.profile-page__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.profile-page__eyebrow {
  margin: 0;
}

.profile-page__title {
  margin: 0;
  font-size: clamp(1.7rem, 2.2vw, 2.6rem);
  font-weight: 300;
  line-height: 1.05;
}

.profile-page__card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.52);
}

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

.profile-page__avatar,
.profile-page__fallback {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.profile-page__avatar {
  object-fit: cover;
}

.profile-page__fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: white;
}

.profile-page__fallback--sun { background: linear-gradient(135deg, #f59e0b, #f97316); }
.profile-page__fallback--mint { background: linear-gradient(135deg, #10b981, #06b6d4); }
.profile-page__fallback--ice { background: linear-gradient(135deg, #38bdf8, #3b82f6); }
.profile-page__fallback--ember { background: linear-gradient(135deg, #ef4444, #f97316); }
.profile-page__fallback--volt { background: linear-gradient(135deg, #84cc16, #22c55e); }
.profile-page__fallback--rose { background: linear-gradient(135deg, #ec4899, #f43f5e); }

.profile-page__avatar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-page__upload-label {
  cursor: pointer;
}

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

.profile-page__section-title {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.profile-page__api-key {
  position: relative;
  align-items: stretch;
}

.profile-page__api-key .profile-page__rotate {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.profile-page__key-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-page__key {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-muted);
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.profile-page__key-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-page__key-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-page__key-meta-item svg {
  color: rgba(148, 163, 184, 0.72);
}

.profile-page__password {
  gap: 14px;
}

.profile-page__collapsible-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.profile-page__collapsible-toggle:focus-visible {
  outline: 2px solid rgba(42, 138, 246, 0.5);
  outline-offset: 4px;
  border-radius: 6px;
}

.profile-page__collapsible-toggle svg {
  transition: transform 0.2s ease;
  color: rgba(148, 163, 184, 0.85);
}

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

.profile-page__password-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-page__password-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

.profile-page__feedback {
  margin: 0;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.55);
  font-size: 0.92rem;
  line-height: 1.4;
}

.profile-page__feedback--error {
  border-color: rgba(244, 63, 94, 0.38);
  background: rgba(244, 63, 94, 0.12);
  color: #fecdd3;
}

.profile-page__feedback--success {
  border-color: rgba(16, 185, 129, 0.38);
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
}

.workspace-profile-card__identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.workspace-profile-card__avatar,
.workspace-profile-card__fallback {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.workspace-profile-card__avatar {
  object-fit: cover;
}

.workspace-profile-card__fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: white;
}

.workspace-profile-card__fallback--sun { background: linear-gradient(135deg, #f59e0b, #f97316); }
.workspace-profile-card__fallback--mint { background: linear-gradient(135deg, #10b981, #06b6d4); }
.workspace-profile-card__fallback--ice { background: linear-gradient(135deg, #38bdf8, #3b82f6); }
.workspace-profile-card__fallback--ember { background: linear-gradient(135deg, #ef4444, #f97316); }
.workspace-profile-card__fallback--volt { background: linear-gradient(135deg, #84cc16, #22c55e); }
.workspace-profile-card__fallback--rose { background: linear-gradient(135deg, #ec4899, #f43f5e); }

.workspace-profile-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-profile-card__input {
  width: 100%;
  color: var(--text-muted);
}

.workspace-panel__create-project {
  width: 100%;
  min-height: 260px;
  padding: 20px;
  border-radius: 16px;
  border: 1px dashed rgba(42, 138, 246, 0.4);
  background: rgba(15, 23, 42, 0.62);
  color: var(--text-primary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 26px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 16px;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.workspace-panel__create-project:hover,
.workspace-panel__create-project:focus-visible {
  border-color: rgba(42, 138, 246, 0.62);
  background: rgba(15, 23, 42, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 40px rgba(6, 24, 44, 0.28);
  outline: none;
}

.workspace-panel__create-project-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(42, 138, 246, 0.1);
  border: 1px solid rgba(42, 138, 246, 0.22);
}

.workspace-panel__create-project-copy {
  display: grid;
  gap: 8px;
  text-align: left;
}

.workspace-panel__create-project-copy strong {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.workspace-panel__create-project-copy span {
  color: rgba(248, 250, 252, 0.68);
  font-size: 0.92rem;
  line-height: 1.5;
}

.workspace-panel__project-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  min-height: 260px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.12), transparent 44%);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.workspace-panel__project-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(42, 138, 246, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.workspace-panel__project-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(42, 138, 246, 0.14),
    0 0 0 4px rgba(42, 138, 246, 0.12);
}

.workspace-panel__project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.workspace-panel__project-card:hover::before,
.workspace-panel__project-card:focus-visible::before,
.workspace-panel__project-card[aria-current="true"]::before {
  opacity: 1;
}

.workspace-panel__project-card[aria-current="true"] {
  border-color: rgba(96, 165, 250, 0.42);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.54)),
    radial-gradient(circle at top right, var(--panel-highlight), transparent 48%);
  box-shadow:
    0 16px 32px rgba(8, 15, 35, 0.26),
    inset 0 0 0 1px rgba(96, 165, 250, 0.12);
}

.workspace-panel__project-copy {
  display: grid;
  gap: 6px;
  align-content: start;
}

.workspace-panel__project-copy strong {
  font-size: 1.05rem;
  color: #ffffff;
}

.workspace-panel__project-open-progress {
  display: grid;
  gap: 6px;
  min-height: 34px;
  padding: 8px 0;
  color: #dbeafe;
  font-size: 0.86rem;
}

.workspace-panel__project-open-bar {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
}

.workspace-panel__project-open-bar::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #a7f3d0);
  animation: board-open-progress 0.9s ease-in-out infinite alternate;
}

.workspace-panel__project-open-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

@keyframes board-open-progress {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(138%);
  }
}

.workspace-panel__project-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.workspace-panel__project-description-shell {
  display: grid;
  gap: 12px;
}

.board-page__load-failure {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: -2px 0 12px;
  color: #fecaca;
  font-size: 0.9rem;
}

.board-page__load-failure p {
  margin: 0;
}

.workspace-panel__project-display-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.workspace-panel__project-display-button {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  background: transparent;
  color: rgba(226, 232, 240, 0.74);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.workspace-panel__project-display-button:hover,
.workspace-panel__project-display-button:focus-visible {
  color: rgba(248, 250, 252, 0.96);
  outline: none;
}

.workspace-panel__project-display-button--active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(96, 165, 250, 0.24));
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.18);
}

.workspace-project-card-markdown {
  min-height: 120px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(8, 15, 35, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: rgba(236, 242, 255, 0.92);
  overflow: auto;
}

.workspace-project-card-markdown--rendered,
.workspace-project-card-markdown--degraded {
  font-size: 0.88rem;
  line-height: 1.55;
}

.workspace-project-card-markdown--rendered > :first-child,
.workspace-project-card-markdown--degraded > :first-child {
  margin-top: 0;
}

.workspace-project-card-markdown--rendered > :last-child,
.workspace-project-card-markdown--degraded > :last-child {
  margin-bottom: 0;
}

.workspace-project-card-markdown h1,
.workspace-project-card-markdown h2,
.workspace-project-card-markdown h3,
.workspace-project-card-markdown h4 {
  margin: 0 0 0.6rem;
  color: #f8fafc;
  line-height: 1.2;
}

.workspace-project-card-markdown p,
.workspace-project-card-markdown ul,
.workspace-project-card-markdown ol,
.workspace-project-card-markdown blockquote,
.workspace-project-card-markdown pre,
.workspace-project-card-markdown table {
  margin: 0 0 0.8rem;
}

.workspace-project-card-markdown ul,
.workspace-project-card-markdown ol {
  padding-left: 1.2rem;
}

.workspace-project-card-markdown li + li {
  margin-top: 0.28rem;
}

.workspace-project-card-markdown input[type="checkbox"] {
  margin-right: 0.45rem;
}

.workspace-project-card-markdown code,
.workspace-project-card-markdown pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.workspace-project-card-markdown pre {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(59, 130, 246, 0.16);
  white-space: pre-wrap;
}

.workspace-project-card-markdown code {
  padding: 0.1rem 0.28rem;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.76);
}

.workspace-project-card-markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.workspace-project-card-markdown th,
.workspace-project-card-markdown td {
  padding: 0.55rem 0.6rem;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.workspace-project-card-markdown th {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.82);
}

.workspace-project-card-markdown blockquote {
  padding-left: 0.9rem;
  border-left: 3px solid rgba(56, 189, 248, 0.4);
  color: rgba(191, 219, 254, 0.88);
}

.workspace-project-card-markdown--raw {
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  color: rgba(226, 232, 240, 0.86);
}

.workspace-project-card-markdown--degraded {
  border-color: rgba(250, 204, 21, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(30, 41, 59, 0.68)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.08), transparent 42%);
}

.workspace-project-card-markdown--empty {
  display: flex;
  align-items: center;
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.88rem;
  line-height: 1.5;
}

.workspace-panel__project-topline {
  display: flex;
  align-items: start;
  justify-content: flex-start;
  gap: 12px;
  padding-right: 112px;
}

.workspace-panel__project-card .workspace-panel__project-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  gap: 10px;
  z-index: 2;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.workspace-panel__delete-confirm {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(233, 42, 103, 0.08);
  border: 1px solid rgba(233, 42, 103, 0.16);
}

.workspace-panel__delete-confirm p {
  margin: 0;
  color: rgba(248, 250, 252, 0.82);
}

.auth-panel__switch--danger {
  border-color: rgba(233, 42, 103, 0.24);
  color: rgba(255, 177, 202, 0.92);
}

.project-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.55);
  z-index: 3;
}

.project-modal__content {
  width: min(100%, 520px);
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.8)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.16), transparent 46%);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow-lg);
}

.project-modal__eyebrow,
.project-modal__title {
  margin: 0;
}

.project-modal__eyebrow {
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.project-modal__title {
  font-size: 1.6rem;
  font-weight: 300;
}

.project-modal__copy {
  margin-top: -6px;
}

.auth-field__input--textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.55;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.project-modal__description-shell {
  display: grid;
  gap: 12px;
}

.project-modal__description-preview {
  display: grid;
  gap: 10px;
}

.project-modal__description-hint {
  margin: 0;
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 960px) {
  .app-shell__frame {
    padding: 20px;
  }

  .auth-grid,
  .workspace-active-board {
    grid-template-columns: 1fr;
  }

  .workspace-panel__header {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .app-header {
    padding: 0 12px;
  }

  .app-header .brand-logo__copy {
    display: none;
  }

  .app-header__back-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
    justify-content: center;
  }

  .app-header__back-btn > span {
    display: none;
  }
}

@media (min-width: 960px) {
  .auth-workspace-scaffold--auth {
    min-height: calc(100vh - 64px);
    align-content: center;
    justify-items: start;
  }

  .auth-grid {
    width: 500px;
    justify-self: start;
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-panel {
    min-height: 500px;
    align-content: center;
  }
}

.board-background-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

.board-background-canvas--fallback {
  opacity: 0;
}

.board-page {
  min-height: calc(100vh - 200px);
  padding: 0;
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
}

/* Visually hidden status surface for screen readers and Playwright text
   assertions; the visible badge was removed by user request because routine
   "Project ..." messages were surfacing as noise. */
.board-page__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.board-page__presence-fx {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 20;
}

.board-navigation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.68)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.16), transparent 48%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow-md);
}

.board-navigation-bar__pill {
  display: grid;
  gap: 2px;
}

.board-navigation-bar__pill strong {
  font-size: 1rem;
}

.board-navigation-bar__count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(42, 138, 246, 0.12);
  border: 1px solid rgba(42, 138, 246, 0.18);
  color: rgba(248, 250, 252, 0.86);
}

.drag-overlay {
  position: fixed;
  right: 32px;
  bottom: 28px;
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px solid rgba(42, 138, 246, 0.28);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at top right, rgba(168, 83, 186, 0.24), transparent 45%);
  color: var(--text-primary);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drag-overlay--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.drag-overlay--handoff {
  right: auto;
  bottom: auto;
  padding: 18px;
  border-radius: 16px;
  border-color: rgba(42, 138, 246, 0.42);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.14), transparent 44%);
  transform: translate3d(0, 0, 0) scale(0.98);
  transform-origin: top left;
  opacity: 0.72;
  filter: saturate(0.58) brightness(0.88);
  overflow: hidden;
  z-index: 24;
  will-change: transform, opacity, filter;
  transition:
    transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.drag-overlay--handoff.drag-overlay--handoff-started {
  transform: translate3d(var(--handoff-dx, 0), var(--handoff-dy, 0), 0) scale(1);
  opacity: 0.98;
  filter: saturate(1) brightness(1);
  border-color: rgba(255, 255, 255, 0.14);
}

.drag-overlay--handoff.drag-overlay--handoff-awaiting {
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(42, 138, 246, 0.08);
}

.drag-overlay--handoff.drag-overlay--handoff-returning {
  border-color: rgba(244, 114, 182, 0.3);
}

.board-page__columns {
  /* 014-canvas cutover: was a grid wrapping <VirtualizedBoard>'s column items.
     Now hosts a single <CanvasBoard>, so it acts as a sized frame around
     the canvas surface. Inner column scrolling is owned by the canvas. */
  display: flex;
  min-height: min(72vh, 720px);
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background: var(--board-surface);
  box-shadow: var(--shadow-lg);
}

.board-page__columns > .canvas-board {
  flex: 1 1 auto;
  min-height: 0;
}

.virtualized-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 340px);
  gap: 24px;
  align-items: start;
}

.virtualized-column {
  min-width: 0;
}

.board-page__virtual-spacer {
  min-height: 1px;
}

.board-page__create-column {
  min-height: 420px;
  padding: 24px 20px;
  border-radius: 20px;
  border: 1px dashed rgba(42, 138, 246, 0.4);
  background: rgba(15, 23, 42, 0.62);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 18px;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.board-page__create-column:hover,
.board-page__create-column:focus-visible {
  border-color: rgba(42, 138, 246, 0.62);
  background: rgba(15, 23, 42, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 40px rgba(6, 24, 44, 0.28);
  outline: none;
}

.board-page__create-column-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(42, 138, 246, 0.1);
  border: 1px solid rgba(42, 138, 246, 0.22);
}

.board-page__create-column-copy {
  display: grid;
  gap: 8px;
  text-align: left;
}

.board-page__create-column-copy strong {
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.board-page__create-column-copy span {
  color: rgba(248, 250, 252, 0.68);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Scrollbar styling */
.board-page__columns::-webkit-scrollbar {
  height: 8px;
}

.board-page__columns::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.3);
  border-radius: 4px;
}

.board-page__columns::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}

.board-page__columns::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

.column-lane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 16px;
  min-height: 420px;
  padding: 20px;
  border-radius: 20px;
  background: var(--column-surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}

.column-lane__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  touch-action: none;
}

.column-lane__header-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.column-lane__completion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.4);
  color: rgba(226, 232, 240, 0.82);
  cursor: pointer;
}

.column-lane__completion-toggle--active {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(20, 83, 45, 0.32);
  color: #bbf7d0;
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.12);
}

.column-lane__completion-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.column-lane__title-button {
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    text-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.column-lane__title-button:hover,
.column-lane__title-button:focus-visible {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(42, 138, 246, 0.28);
  outline: none;
}

.column-lane__header-copy,
.column-lane__title-button {
  width: 100%;
}

.column-lane__header span {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.icon-action-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 10px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(42, 138, 246, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-action-button:hover,
.icon-action-button:focus-visible {
  border-color: rgba(42, 138, 246, 0.48);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 10px 24px rgba(42, 138, 246, 0.16);
  outline: none;
}

.icon-action-button__label {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.22), transparent 48%);
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
  transition:
    opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-action-button:hover .icon-action-button__label,
.icon-action-button:focus-visible .icon-action-button__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.column-lane__actions {
  display: flex;
  gap: 8px;
}

.icon-action-button--danger {
  border-color: rgba(233, 42, 103, 0.3);
  background: rgba(48, 16, 32, 0.62);
}

.icon-action-button--danger:hover,
.icon-action-button--danger:focus-visible {
  border-color: rgba(233, 42, 103, 0.48);
  box-shadow: 0 10px 24px rgba(233, 42, 103, 0.16);
}

.icon-action-button--pressed {
  border-color: rgba(42, 138, 246, 0.52);
  background: rgba(42, 138, 246, 0.16);
  color: #e0ecff;
  box-shadow: 0 0 24px rgba(42, 138, 246, 0.22);
}

/* 020-project-tree-canvas — the "Иерархия" entry point reuses the
   existing `.icon-action-button` Tier-1 styling per upscayl_design.md §11
   (icon-in-circle + hover/focus tooltip via `.icon-action-button__label`).
   No feature-specific selector is needed. */

.glass-modal__backdrop {
  position: fixed;
  inset: 0;
  /* Sits above the task editor backdrop (z-index: 50) so confirmation
     dialogs raised from within the editor (close-guard, delete-guard)
     overlay the editor surface that triggered them. */
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.glass-modal {
  width: min(100%, 440px);
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.82)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.18), transparent 42%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

.glass-modal--danger {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.82)),
    radial-gradient(circle at top right, rgba(233, 42, 103, 0.18), transparent 42%);
}

/* Task editor (017) — see specs/017-task-card-redesign/spec.md FR-001..028 */
.task-editor__backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.task-editor__shell {
  width: min(100%, 1080px);
  height: min(92vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 16px;
  background: var(--panel-glass);
  border: 1px solid rgba(51, 65, 85, 0.5);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.task-editor__action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--panel-glass-strong);
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.task-editor__action-bar-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-editor__body {
  min-height: 0;
  display: grid;
  /* 017-redesign-v3: fix the side column width so the merged
     properties panel never reflows the main column when its preview
     row gains/loses chips. Mobile fallback at <720 px collapses the
     grid to a single column elsewhere in this file. */
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 20px 24px;
  overflow: hidden;
}

.task-editor__column--main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.task-editor__column--main > .task-editor__field--description {
  flex: 1 1 auto;
  min-height: 0;
}

.task-editor__column--side {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 12px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
}

.task-editor__field-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.5);
  backdrop-filter: blur(8px);
}

.task-editor__field-row-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.task-editor__field-row-control {
  min-width: 0;
}

.task-editor__assignee-stack-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.task-editor__panel {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.5);
  backdrop-filter: blur(8px);
  /* The side column is fixed-width; nothing inside a panel may
     widen it. `min-width: 0` lets grid children shrink below
     intrinsic content width, and `overflow-x: clip` blocks any
     residual horizontal spill (e.g. from a popover or wide
     internal control) without affecting vertical popovers. */
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  transition:
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-editor__panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  /* The heading is the parent of the meta-preview row; without
     `min-width: 0` flex children refuse to shrink below their
     intrinsic content size and force the column to scroll. */
}

.task-editor__panel-title {
  flex: 0 0 auto;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.task-editor__panel-chip {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.4);
  color: var(--text-primary);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-editor__panel-toggle {
  flex: 0 0 auto;
  margin-left: auto;
}

/* 017-redesign-v3: header-row preview shown when the merged
   priority/due/tags panel is collapsed. Renders dot + date pill +
   tag chips on a single line. Outer container keeps overflow:visible
   so the priority-dot glow is not clipped; the tags sub-container
   does the clipping so chips never push the chevron off-screen. */
.task-editor__meta-preview {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: visible;
}

/* Force the colored fill back to currentColor — the bare
   `.task-card__priority--{slug}` rules target chip-shaped badges and
   override `background` to a 12 % alpha tint, which makes the dot
   nearly invisible. Two-class selector wins on specificity. */
.task-editor__meta-preview .task-card__priority-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  background: currentColor;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.55),
    0 0 10px currentColor;
}

.task-editor__meta-preview .task-card__due--compact {
  flex: 0 0 auto;
  padding: 2px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* Tag chips stack with a small negative margin so successive chips
   visually overlap. As the parent runs out of width, flex-shrink
   compresses each chip from its `max-width`, so a long tag word
   ellipsizes instead of pushing the row past the chevron. */
.task-editor__meta-preview-tags {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding-left: 4px; /* leave a half-overlap gap from the date pill */
}

.task-editor__meta-preview-tags .task-card__tag {
  flex: 0 1 auto;
  min-width: 1.75rem;
  max-width: 7rem;
  margin-inline-start: -10px;
  padding: 2px 10px;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Stronger contrast on overlap edges so two chips never blur into
     a single smear. */
  border: 1px solid rgba(15, 23, 42, 0.7);
  background: rgba(168, 83, 186, 0.32);
  color: #f5d0fe;
  /* Successive chips render on top of the previous one. */
  position: relative;
  z-index: 1;
}

.task-editor__meta-preview-tags .task-card__tag:first-child {
  margin-inline-start: 0;
}

.task-editor__meta-preview-tags .task-card__tag:hover {
  z-index: 2;
}

.task-editor__panel-body {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  min-width: 0;
}

.task-editor__panel-scroll {
  display: grid;
  gap: 10px;
  max-height: 24rem;
  /* Without explicit overflow-x, `overflow-y: auto` implicitly turns
     overflow-x into `auto` too, so a single long filename in the
     attachments list would surface a horizontal scrollbar. Clip the
     x-axis and let `min-width: 0` on the inner flex/grid items do
     the shrinking. */
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
}

.task-editor__field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-editor__close-guard {
  display: grid;
  gap: 14px;
  width: min(100%, 460px);
}

.task-editor__heading {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.task-editor__field--description {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
}

.task-editor__field--description > :last-child {
  min-height: 0;
  height: 100%;
}

.task-editor__save-pill {
  padding: 10px 22px;
  border-radius: 9999px;
  border: 1px solid rgba(42, 138, 246, 0.6);
  background: rgba(42, 138, 246, 0.28);
  color: #f8fafc;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 24px rgba(42, 138, 246, 0.22);
}

.task-editor__save-pill:hover,
.task-editor__save-pill:focus-visible {
  background: rgba(42, 138, 246, 0.4);
  box-shadow: 0 12px 28px rgba(42, 138, 246, 0.28);
  outline: none;
}

.task-editor__save-pill--in-flight {
  background: rgba(42, 138, 246, 0.18);
  cursor: progress;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.task-editor__save-pill--in-flight:hover {
  background: rgba(42, 138, 246, 0.18);
  box-shadow: 0 0 24px rgba(42, 138, 246, 0.22);
}

.task-editor__save-pill--failed {
  background: rgba(233, 42, 103, 0.22);
  border-color: rgba(233, 42, 103, 0.6);
  box-shadow: 0 0 24px rgba(233, 42, 103, 0.18);
}

.task-editor__save-pill-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(248, 250, 252, 0.4);
  border-top-color: #f8fafc;
  animation: task-editor-save-spin 0.7s linear infinite;
}

@keyframes task-editor-save-spin {
  to {
    transform: rotate(360deg);
  }
}

.task-editor__save-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 24px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(233, 42, 103, 0.16);
  border: 1px solid rgba(233, 42, 103, 0.4);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.task-editor__close-guard-copy {
  display: grid;
  gap: 6px;
}

.task-editor__close-guard-eyebrow {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-editor__close-guard-copy h2 {
  margin: 0;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.task-editor__close-guard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.task-editor__close-guard-cancel,
.task-editor__close-guard-discard {
  padding: 10px 16px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-editor__close-guard-cancel {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.task-editor__close-guard-discard {
  border: 1px solid rgba(233, 42, 103, 0.35);
  background: rgba(233, 42, 103, 0.16);
}

.task-editor__close-guard-cancel:hover,
.task-editor__close-guard-cancel:focus-visible {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.1);
  outline: none;
}

.task-editor__close-guard-discard:hover,
.task-editor__close-guard-discard:focus-visible {
  border-color: rgba(233, 42, 103, 0.55);
  box-shadow: 0 10px 24px rgba(233, 42, 103, 0.16);
  outline: none;
}

@media (max-width: 959px) {
  .task-editor__body {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .task-editor__shell {
    border-radius: 12px;
  }
}

@media (max-width: 719px) {
  .task-editor__backdrop {
    padding: 0;
  }

  .task-editor__shell {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    border: none;
  }

  .task-editor__action-bar {
    padding: 12px 16px;
  }

  .task-editor__body {
    padding: 12px;
  }
}

.column-title-modal__copy {
  display: grid;
  gap: 6px;
}

.column-title-modal__label,
.column-title-modal__field-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.column-title-modal__copy h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
}

.column-title-modal__input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-primary);
  outline: none;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.column-title-modal__input:focus {
  border-color: rgba(42, 138, 246, 0.8);
  box-shadow: 0 0 0 4px rgba(42, 138, 246, 0.14);
}

.column-title-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.column-title-modal__button {
  padding: 10px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(42, 138, 246, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.column-title-modal__button:hover,
.column-title-modal__button:focus-visible {
  border-color: rgba(42, 138, 246, 0.48);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 10px 24px rgba(42, 138, 246, 0.12);
  outline: none;
}

.column-title-modal__button--ghost {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.column-context-indicator {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.column-context-indicator--ready {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #bbf7d0;
  box-shadow: var(--success-glow);
}

.column-context-indicator--busy {
  background: rgba(233, 42, 103, 0.1);
  border: 1px solid rgba(233, 42, 103, 0.26);
  color: #f9a8d4;
}

.delete-column-dialog,
.conflict-resolution-dialog,
.sync-status-banner {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
}

.conflict-resolution-dialog {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 48;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: min(420px, calc(100vw - 32px));
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.84)),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 46%);
}

.conflict-resolution-dialog--timeout {
  border-color: rgba(251, 191, 36, 0.28);
  background:
    linear-gradient(135deg, rgba(67, 40, 10, 0.94), rgba(30, 41, 59, 0.86)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.22), transparent 42%);
}

.conflict-resolution-dialog--stale {
  border-color: rgba(56, 189, 248, 0.28);
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.94), rgba(30, 41, 59, 0.86)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 42%);
}

.conflict-resolution-dialog__copy {
  display: grid;
  gap: 6px;
}

.conflict-resolution-dialog__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.9);
}

.conflict-resolution-dialog--timeout .conflict-resolution-dialog__eyebrow {
  color: #fcd34d;
}

.conflict-resolution-dialog--stale .conflict-resolution-dialog__eyebrow {
  color: #7dd3fc;
}

.conflict-resolution-dialog__dismiss {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.delete-column-dialog strong,
.conflict-resolution-dialog h2 {
  color: var(--text-primary);
}

.delete-column-dialog p,
.conflict-resolution-dialog p {
  margin: 8px 0 0;
  color: rgba(248, 250, 252, 0.76);
}

.sync-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
}

.sync-status-banner__copy {
  display: grid;
  gap: 4px;
}

.sync-status-banner__title {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sync-status-banner__hint {
  max-width: 34ch;
  color: rgba(248, 250, 252, 0.68);
  font-size: 0.86rem;
}

.sync-status-banner--warning {
  border-color: rgba(233, 42, 103, 0.32);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(48, 16, 32, 0.72)),
    radial-gradient(circle at top right, rgba(233, 42, 103, 0.18), transparent 48%);
}

.sync-status-banner--info {
  border-color: rgba(42, 138, 246, 0.28);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(18, 39, 74, 0.72)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.18), transparent 48%);
}

.column-lane__cards {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  min-width: 0;
  position: relative;
}

.column-lane__insert-slot {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -15px;
  height: 30px;
  z-index: 1;
}

.column-lane__insert-slot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.92),
    0 8px 20px rgba(42, 138, 246, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
}

.column-lane__insert-slot--active {
}

.column-lane__insert-slot--active::after {
  opacity: 1;
}

.task-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.12), transparent 44%);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  cursor: grab;
  will-change: transform;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  touch-action: none;
}

.task-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.task-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(42, 138, 246, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.task-card:hover::before {
  opacity: 1;
}

.task-card:active {
  cursor: grabbing;
}

.task-card--dragging {
  opacity: 0.5;
  transform: scale(0.96) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.task-card--handoff-hidden {
  opacity: 0 !important;
  visibility: hidden;
}

.task-card--drop-before::after,
.task-card--drop-after::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.92),
    0 8px 20px rgba(42, 138, 246, 0.24);
  pointer-events: none;
  z-index: 0;
}

.task-card--drop-before::after {
  top: -15px;
}

.task-card--drop-after::after {
  bottom: -15px;
}

.task-card--locked {
  border-color: rgba(244, 114, 182, 0.35);
  background:
    linear-gradient(180deg, rgba(244, 114, 182, 0.08), rgba(15, 23, 42, 0.92)),
    rgba(15, 23, 42, 0.88);
}

.task-card--locked:hover {
  transform: none;
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(244, 114, 182, 0.16);
}

.task-card__priority {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(42, 138, 246, 0.2);
  background: rgba(42, 138, 246, 0.1);
  color: #bfdbfe;
}

.task-card__priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.task-card__priority--low {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(74, 222, 128, 0.12);
}

.task-card__priority--medium {
  color: #93c5fd;
  border-color: rgba(42, 138, 246, 0.24);
  background: rgba(42, 138, 246, 0.12);
}

.task-card__priority--high {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.12);
}

.task-card__priority--urgent {
  color: #f9a8d4;
  border-color: rgba(233, 42, 103, 0.24);
  background: rgba(233, 42, 103, 0.13);
}

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

.task-card__meta-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.task-card__edit {
  width: 40px;
  height: 40px;
  padding: 0;
  flex: 0 0 auto;
}

.task-card__edit svg {
  width: 16px;
  height: 16px;
}

.task-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.3;
}

.task-card__meta {
  display: grid;
  gap: 10px;
}

.task-description-markdown {
  color: rgba(226, 232, 240, 0.88);
  overflow: auto;
}

.task-description-markdown--card,
.task-description-markdown--modal {
  font-size: 0.9rem;
  line-height: 1.55;
}

.task-description-markdown--card {
  margin: 0 0 4px;
}

.task-description-markdown--modal {
  margin: 0;
  min-height: 132px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(15, 23, 42, 0.68);
}

.task-description-markdown--rendered > :first-child,
.task-description-markdown--degraded > :first-child {
  margin-top: 0;
}

.task-description-markdown--rendered > :last-child,
.task-description-markdown--degraded > :last-child {
  margin-bottom: 0;
}

.task-description-markdown h1,
.task-description-markdown h2,
.task-description-markdown h3,
.task-description-markdown h4 {
  margin: 0 0 0.55rem;
  color: #f8fafc;
  line-height: 1.2;
}

.task-description-markdown--card h1,
.task-description-markdown--card h2,
.task-description-markdown--card h3,
.task-description-markdown--card h4 {
  font-size: 0.98rem;
}

.task-description-markdown p,
.task-description-markdown ul,
.task-description-markdown ol,
.task-description-markdown blockquote,
.task-description-markdown pre,
.task-description-markdown table {
  margin: 0 0 0.72rem;
}

.task-description-markdown ul,
.task-description-markdown ol {
  padding-left: 1.2rem;
}

.task-description-markdown li + li {
  margin-top: 0.24rem;
}

.task-description-markdown input[type="checkbox"] {
  margin-right: 0.45rem;
}

.task-description-markdown code,
.task-description-markdown pre,
.task-modal__textarea {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.task-description-markdown pre {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(8, 15, 35, 0.74);
  border: 1px solid rgba(59, 130, 246, 0.16);
  white-space: pre-wrap;
}

.task-description-markdown code {
  padding: 0.1rem 0.28rem;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.76);
}

.task-description-markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.task-description-markdown th,
.task-description-markdown td {
  padding: 0.5rem 0.58rem;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.task-description-markdown th {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.82);
}

.task-description-markdown blockquote {
  padding-left: 0.9rem;
  border-left: 3px solid rgba(56, 189, 248, 0.4);
  color: rgba(191, 219, 254, 0.88);
}

.task-description-markdown--degraded {
  border-color: rgba(250, 204, 21, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(30, 41, 59, 0.68)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.08), transparent 42%);
}

.task-description-markdown--empty {
  display: flex;
  align-items: center;
  color: rgba(148, 163, 184, 0.9);
}

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

.task-card__assignee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.56);
}

.task-card__assignee-avatar,
.task-card__assignee-fallback {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.task-card__assignee-avatar {
  object-fit: cover;
}

.task-card__assignee-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
}

.task-card__assignee-fallback--sun { background: linear-gradient(135deg, #f59e0b, #f97316); }
.task-card__assignee-fallback--mint { background: linear-gradient(135deg, #10b981, #06b6d4); }
.task-card__assignee-fallback--ice { background: linear-gradient(135deg, #38bdf8, #3b82f6); }
.task-card__assignee-fallback--ember { background: linear-gradient(135deg, #ef4444, #f97316); }
.task-card__assignee-fallback--volt { background: linear-gradient(135deg, #84cc16, #22c55e); }
.task-card__assignee-fallback--rose { background: linear-gradient(135deg, #ec4899, #f43f5e); }

.task-card__assignee-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: rgba(248, 250, 252, 0.88);
}

.task-card__due,
.task-card__tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 9999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.task-card__due {
  border: 1px solid rgba(42, 138, 246, 0.18);
  background: rgba(42, 138, 246, 0.08);
  color: #bfdbfe;
}

.task-card__subtasks {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.46);
}

.task-card__subtasks-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(148, 163, 184, 0.92);
}

.task-card__subtasks-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: #bbf7d0;
}

.task-card__lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border-radius: 9999px;
  padding: 5px 10px 5px 6px;
  font-size: 0.74rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  border: 1px solid rgba(244, 114, 182, 0.28);
  background: rgba(244, 114, 182, 0.12);
  color: #fbcfe8;
}

.task-card__lock-badge--owned {
  border-color: rgba(74, 222, 128, 0.22);
  background: rgba(22, 101, 52, 0.26);
  color: #bbf7d0;
}

.task-card__lock-badge--pending {
  border-color: rgba(251, 191, 36, 0.26);
  background: rgba(120, 53, 15, 0.32);
  color: #fde68a;
}

.task-card__lock-badge-avatar {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.48);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 700;
}

.task-card__lock-badge-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card__lock-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border-radius: 9999px;
  padding: 6px 10px;
  border: 1px solid rgba(244, 114, 182, 0.28);
  background: rgba(48, 16, 32, 0.52);
  color: #fce7f3;
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.task-card__lock-action--pending {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(120, 53, 15, 0.38);
  color: #fde68a;
}

.task-card__lock-action--hidden {
  display: none;
}

.task-card__lock-action:disabled {
  opacity: 0.66;
  cursor: default;
}

.task-card__lock-action-avatar {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 114, 182, 0.22);
  color: #fff1f7;
  font-size: 0.78rem;
  font-weight: 600;
}

.task-card__lock-action-label {
  white-space: nowrap;
}

.task-priority-picker {
  position: relative;
}

.task-priority-picker__shell,
.task-date-picker__input-shell {
  position: relative;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(15, 23, 42, 0.68);
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The date shell sits inside a fixed-width side column, so the value
   has the least horizontal headroom of any picker. Drop the `gap` and
   tighten the padding — the clear button is absolutely positioned and
   no longer competes with the value for inline space. */
.task-date-picker__input-shell {
  gap: 0;
  padding: 0 12px;
}

.task-priority-picker__shell:hover,
.task-priority-picker__shell:focus-within,
.task-date-picker__input-shell:hover,
.task-date-picker__input-shell:focus-within {
  transform: translateY(-1px);
  border-color: rgba(42, 138, 246, 0.62);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 0 0 4px rgba(42, 138, 246, 0.12);
}

.task-priority-picker__icon {
  width: 18px;
  height: 18px;
  color: rgba(147, 197, 253, 0.92);
  flex: 0 0 auto;
}

.task-priority-picker__icon svg,
.task-date-picker__clear svg {
  width: 100%;
  height: 100%;
}

.task-priority-picker__select,
.task-date-picker__native-input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  outline: none;
}

.task-priority-picker__select {
  padding-right: 28px;
  cursor: pointer;
}

.task-priority-picker__shell::after {
  content: "";
  position: absolute;
  right: 16px;
  width: 9px;
  height: 9px;
  border-right: 1.8px solid rgba(248, 250, 252, 0.72);
  border-bottom: 1.8px solid rgba(248, 250, 252, 0.72);
  transform: translateY(-3px) rotate(45deg);
  pointer-events: none;
}

.task-date-picker {
  position: relative;
}

/* Date-picker right-edge affordance switches by value:
   - empty value → keep the UA calendar-picker indicator so the user
     sees a clickable picker glyph and knows the field opens a picker;
   - filled value → hide the indicator, the §11 tier-1 clear button
     (✕) takes its place and reclaims the same horizontal slot.
   The whole input row remains click-to-open in either state, so the
   UA indicator is purely a visual hint, not a control. */
.task-date-picker__native-input::-webkit-calendar-picker-indicator {
  opacity: 0.92;
  cursor: pointer;
  filter: invert(0.92);
}

.task-date-picker__input-shell--filled
  .task-date-picker__native-input::-webkit-calendar-picker-indicator {
  display: none;
}

.task-date-picker__native-input {
  cursor: pointer;
}

/* Reserve room for the abs-positioned clear icon only when it is
   actually rendered, so the empty state lets the value's natural
   alignment use the whole input width. */
.task-date-picker__input-shell--filled .task-date-picker__native-input {
  padding-right: 24px;
}

/* Clear button leaves the flex flow and overlays the input's right
   edge as a §11 tier-1-style icon. Keeping it out of the flex flow
   stops it from stealing horizontal space from the value text. */
.task-date-picker__clear {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(148, 163, 184, 0.88);
  cursor: pointer;
}

.task-date-picker__clear:hover,
.task-date-picker__clear:focus-visible {
  color: rgba(248, 250, 252, 0.92);
  outline: none;
}

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

.task-card__tag {
  border: 1px solid rgba(168, 83, 186, 0.18);
  background: rgba(168, 83, 186, 0.12);
  color: #e9d5ff;
}

.task-modal__backdrop {
  position: fixed;
  top: 80px;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(42, 138, 246, 0.14), transparent 36%),
    rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(12px);
}

.task-modal {
  width: min(100%, 620px);
  display: grid;
  gap: 18px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 26px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.84)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.22), transparent 42%);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.task-modal--detail {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88)),
    radial-gradient(circle at top right, rgba(168, 83, 186, 0.22), transparent 46%);
}

.task-modal--confirm {
  width: min(100%, 520px);
}

.task-modal__copy {
  display: grid;
  gap: 8px;
}

.task-modal__eyebrow {
  margin: 0;
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.task-modal__copy h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.15rem);
  font-weight: 300;
  letter-spacing: -0.04em;
}

.task-modal__copy p {
  margin: 0;
  color: rgba(248, 250, 252, 0.72);
  line-height: 1.55;
}

.task-modal__field {
  display: grid;
  gap: 8px;
}

.task-modal__field > span {
  color: rgba(248, 250, 252, 0.84);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.task-modal__subtask-summary {
  margin: 10px 0 0;
  color: rgba(191, 219, 254, 0.92);
  font-size: 0.92rem;
}

.task-modal__subtask-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.task-modal__subtask-row {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.44);
  color: rgba(248, 250, 252, 0.88);
  font-size: 0.92rem;
}

.task-attachments__input {
  display: none;
}

/* 017 redesign-v3: minimal Вложения section per upscayl §10 (minimum
   chrome) and §11 (icon-in-circle hierarchy). The panel header already
   labels the section, so the inner layout drops eyebrow, h3, badges,
   pill buttons, hint paragraphs, and inline confirm copy. Each row is
   filename + two Tier-1 icon buttons. */
.task-attachments,
.task-gallery {
  display: grid;
  gap: 10px;
  /* Allow the section and every grid descendant to shrink below their
     intrinsic content width — otherwise a long filename token in the
     list forces the panel wider than the side column. */
  min-width: 0;
}

.task-attachments__upload-row {
  display: flex;
  justify-content: flex-start;
}

.task-attachments__feedback,
.task-attachments__error {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.72);
}

.task-attachments__feedback {
  color: rgba(125, 211, 252, 0.92);
}

.task-attachments__error {
  color: #fda4af;
}

.task-attachments__list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  min-width: 0;
}

.task-attachments__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  min-width: 0;
  /* §3 generous rounding + §4 glassmorphism — same recipe as the
     panel surface so each row reads as a sub-card without inventing
     a new shape. */
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(8px);
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-attachments__item:hover {
  border-color: rgba(42, 138, 246, 0.32);
}

.task-attachments__filename {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-attachments__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Compact variant of `.icon-action-button` for use inside attachment
   rows: same chrome, smaller footprint so two buttons + filename fit
   inside a 320 px-wide side column. */
.task-attachments__actions .icon-action-button {
  width: 34px;
  height: 34px;
  padding: 0;
}

.task-gallery__bar {
  display: flex;
  justify-content: flex-start;
}

.task-gallery__strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.task-gallery__thumb {
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 16px;
  padding: 0;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(8px);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-gallery__thumb:hover,
.task-gallery__thumb:focus-visible {
  /* §5 hover lift, mirrored from `.icon-action-button` so the gallery
     reads with the same animation language. */
  transform: translateY(-1px) scale(1.01);
  border-color: rgba(42, 138, 246, 0.48);
  box-shadow: 0 10px 24px rgba(42, 138, 246, 0.16);
  outline: none;
}

.task-gallery__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.task-attachment-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(12px);
}

.task-attachment-fullscreen__image {
  max-width: min(92vw, 1280px);
  max-height: 88vh;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.task-modal__input,
.task-modal__textarea {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(15, 23, 42, 0.68);
  color: var(--text-primary);
  font: inherit;
  outline: none;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-modal__textarea {
  min-height: 132px;
  resize: vertical;
}

.task-modal__description-shell {
  display: grid;
  gap: 12px;
}

.task-modal__description-preview {
  display: grid;
  gap: 10px;
}

.task-modal__description-hint {
  margin: 0;
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.82rem;
  line-height: 1.45;
}

.task-modal__input:focus,
.task-modal__textarea:focus {
  border-color: rgba(42, 138, 246, 0.62);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 0 0 4px rgba(42, 138, 246, 0.12);
}

.task-modal__input--invalid,
.task-modal__input--invalid:focus {
  border-color: rgba(248, 113, 113, 0.85);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18);
}

.task-modal__meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.task-modal__assignee-picker {
  display: grid;
  gap: 10px;
}

.task-modal__assignee-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.task-modal__assignee-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: min(240px, 100%);
  flex-wrap: wrap;
}

.task-modal__assignee-empty {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.task-modal__assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 36px;
  padding: 4px 10px 4px 6px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(8px);
}

.task-modal__assignee-chip-name {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.task-modal__assignee-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.86)),
    radial-gradient(circle at top right, rgba(42, 138, 246, 0.14), transparent 56%);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.36);
}

.task-modal__assignee-option {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 4px 10px 4px 6px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.52);
  color: rgba(248, 250, 252, 0.9);
  cursor: pointer;
  max-width: 100%;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-modal__assignee-option:hover,
.task-modal__assignee-option:focus-within {
  border-color: rgba(42, 138, 246, 0.34);
  background: rgba(15, 23, 42, 0.64);
}

.task-modal__assignee-option--selected {
  border-color: rgba(42, 138, 246, 0.72);
  background: rgba(42, 138, 246, 0.16);
  color: #f8fafc;
  box-shadow:
    inset 0 0 0 1px rgba(42, 138, 246, 0.42),
    0 0 24px rgba(42, 138, 246, 0.22);
}

.task-modal__assignee-option-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.task-modal__assignee-option-identity span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  color: inherit;
}

.task-modal__assignee-checkbox {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #2a8af6;
}

.task-modal__assignee-avatar,
.task-modal__assignee-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.task-modal__assignee-avatar {
  object-fit: cover;
}

.task-modal__assignee-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #f8fafc;
}

.task-modal__assignee-fallback--sun { background: linear-gradient(135deg, #f59e0b, #f97316); }
.task-modal__assignee-fallback--mint { background: linear-gradient(135deg, #10b981, #06b6d4); }
.task-modal__assignee-fallback--ice { background: linear-gradient(135deg, #38bdf8, #3b82f6); }
.task-modal__assignee-fallback--ember { background: linear-gradient(135deg, #ef4444, #f97316); }
.task-modal__assignee-fallback--volt { background: linear-gradient(135deg, #84cc16, #22c55e); }
.task-modal__assignee-fallback--rose { background: linear-gradient(135deg, #ec4899, #f43f5e); }

.task-modal__actions,
.task-modal__delete-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.task-modal__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(42, 138, 246, 0.28);
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-primary);
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-modal__button:hover,
.task-modal__button:focus-visible {
  border-color: rgba(42, 138, 246, 0.48);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 12px 28px rgba(42, 138, 246, 0.14);
  outline: none;
}

.task-modal__button--primary {
  border-color: rgba(42, 138, 246, 0.5);
  background: rgba(42, 138, 246, 0.28);
  color: #f8fafc;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(42, 138, 246, 0.22);
}

.task-modal__button--primary:hover,
.task-modal__button--primary:focus-visible {
  border-color: rgba(42, 138, 246, 0.72);
  box-shadow: 0 16px 36px rgba(42, 138, 246, 0.3);
}

.task-modal__button--ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.task-modal__button--danger {
  border-color: rgba(233, 42, 103, 0.28);
  background: rgba(48, 16, 32, 0.62);
}

.task-modal__button--danger:hover,
.task-modal__button--danger:focus-visible {
  border-color: rgba(233, 42, 103, 0.44);
  box-shadow: 0 12px 28px rgba(233, 42, 103, 0.18);
}

.task-modal__delete-guard {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(233, 42, 103, 0.18);
  background:
    linear-gradient(135deg, rgba(62, 12, 33, 0.78), rgba(30, 41, 59, 0.68)),
    radial-gradient(circle at top right, rgba(233, 42, 103, 0.2), transparent 48%);
}

.task-modal__lock-banner {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.86), rgba(15, 23, 42, 0.78)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 48%);
  color: rgba(224, 242, 254, 0.96);
  font-size: 0.92rem;
  line-height: 1.45;
}

.release-request-prompt {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  background:
    linear-gradient(135deg, rgba(56, 33, 10, 0.92), rgba(30, 41, 59, 0.92)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), transparent 46%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.release-request-prompt__copy {
  display: grid;
  gap: 6px;
}

.release-request-prompt__copy strong {
  color: #fef3c7;
  font-weight: 500;
}

.release-request-prompt__copy p {
  margin: 0;
  color: #e5e7eb;
}

.release-request-prompt__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
}

.release-request-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.release-request-prompt__countdown {
  margin-right: auto;
  font-size: 0.82rem;
  color: #fde68a;
}

.board-page__release-request-overlay {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100vw - 32px));
  z-index: 30;
}

.task-modal__delete-guard strong {
  font-size: 1rem;
  font-weight: 500;
}

.task-modal__delete-guard p {
  margin: 0;
}

.debug-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.debug-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.debug-panel__summary h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

.debug-panel__summary button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  padding: 8px 16px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.debug-panel__summary button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.debug-panel__state,
.debug-panel__entry {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.debug-panel__state {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: pre-wrap;
}

.debug-panel__log {
  display: grid;
  gap: 10px;
  max-height: 250px;
  overflow: auto;
  padding-right: 8px;
}

.debug-panel__log::-webkit-scrollbar {
  width: 6px;
}
.debug-panel__log::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 3px;
}

.debug-panel__entry {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 2px solid var(--accent-secondary);
}

@media (max-width: 720px) {
  .app-shell__frame {
    padding: 16px;
  }

  .board-page {
    padding: 0;
  }

  .board-page__columns {
    gap: 16px;
    padding: 0;
  }

  .virtualized-board {
    grid-auto-columns: minmax(280px, 85vw);
    gap: 16px;
  }

  .glass-modal__backdrop {
    padding: 16px;
  }

  .column-title-modal__actions {
    flex-direction: column-reverse;
  }

  .column-title-modal__button {
    width: 100%;
  }

  .drag-overlay {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }

  .task-modal__backdrop {
    top: 72px;
    padding: 16px;
  }

  .task-modal {
    padding: 20px;
    border-radius: 22px;
    max-height: calc(100vh - 32px);
  }

  .task-modal__meta-grid,
  .task-modal__actions,
  .task-modal__delete-actions {
    grid-template-columns: 1fr;
    flex-direction: column-reverse;
  }

.task-modal__button {
    width: 100%;
  }

  .icon-action-button__label {
    display: none;
  }
}

.workspace-panel__project-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  width: fit-content;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(15, 23, 42, 0.42);
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-modal__feedback {
  margin: 0;
  color: rgba(148, 163, 184, 0.92);
  line-height: 1.5;
}

.board-navigation-bar__meta,
.board-navigation-bar__actions,
.sync-status-banner__meta,
.sync-status-banner__members,
.board-navigation-bar__members {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.board-navigation-bar__meta {
  gap: 14px;
}

.board-navigation-bar__actions {
  justify-content: flex-end;
}

.board-navigation-bar__member,
.sync-status-banner__member {
  display: inline-flex;
}

.board-navigation-bar__member-avatar,
.board-navigation-bar__member-fallback,
.sync-status-banner__member-avatar,
.sync-status-banner__member-fallback {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.28);
}

.board-navigation-bar__share {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  background: linear-gradient(135deg, rgba(42, 138, 246, 0.18), rgba(168, 83, 186, 0.14));
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}

.board-navigation-bar__share:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--focus-shadow);
}

.board-navigation-bar__member-fallback--sun,
.sync-status-banner__member-fallback--sun { background: linear-gradient(135deg, #f59e0b, #f97316); }
.board-navigation-bar__member-fallback--mint,
.sync-status-banner__member-fallback--mint { background: linear-gradient(135deg, #10b981, #06b6d4); }
.board-navigation-bar__member-fallback--ice,
.sync-status-banner__member-fallback--ice { background: linear-gradient(135deg, #38bdf8, #3b82f6); }
.board-navigation-bar__member-fallback--ember,
.sync-status-banner__member-fallback--ember { background: linear-gradient(135deg, #ef4444, #f97316); }
.board-navigation-bar__member-fallback--volt,
.sync-status-banner__member-fallback--volt { background: linear-gradient(135deg, #84cc16, #22c55e); }
.board-navigation-bar__member-fallback--rose,
.sync-status-banner__member-fallback--rose { background: linear-gradient(135deg, #ec4899, #f43f5e); }

@media (max-width: 720px) {
  .board-navigation-bar,
  .sync-status-banner {
    align-items: flex-start;
  }

  .board-navigation-bar__actions {
    justify-content: flex-start;
  }
}

/* ============================================================================
   Canvas-rendered project board — feature 014-canvas-board-render.
   FR-001 keeps the HTML header above this surface; this block styles only the
   canvas mount, the surface itself, the visually-hidden focus mirror, the live
   regions, and the off-canvas "Создать колонку" anchor used as the keyboard
   entry point.
============================================================================ */
.canvas-board {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  /* FR-013: top-aligned, full-width on desktop; canvas does not vertically
     center as a "page panel" would (upscayl §12 exception). */
  align-self: stretch;
  justify-self: stretch;
  max-width: none;
  min-height: min(72vh, 720px);
  /* FR-012: outer mobile spacing is owned exclusively by `.app-shell__frame`;
     this surface never adds nested mobile padding. */
  padding: 0;
  margin: 0;
}

@media (max-width: 720px) {
  .canvas-board {
    padding: 0;
    margin: 0;
  }
}

.canvas-board__surface {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  /* The page-level radial-gradient blob in CSS bleeds through the canvas's
     transparent gaps so the upscayl ambience stays visible (research R-3). */
  background: transparent;
  outline: none;
  touch-action: none;
}

.canvas-board__surface:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.5);
  outline-offset: -2px;
}

.canvas-board__focus-mirror,
.canvas-board__live-region,
.canvas-board__keyboard-help {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Off-canvas "Создать колонку" anchor — visually hidden but kept in the DOM
   so the keyboard FR-A11Y-1 contract (Tab lands on a column-creation button
   before entering the focus-mirror tree) survives. The visible affordance is
   the canvas-painted tile at the right edge of the column strip. */
.canvas-board__create-column-anchor {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: transparent;
}

/* ============================================================================
   Project hierarchy tree and Gantt views.
============================================================================ */
.hierarchy-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  min-height: min(72vh, 720px);
}

.hierarchy-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hierarchy-page__header h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--text-primary);
}

.hierarchy-page__switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.36);
}

.hierarchy-page__switch-button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  cursor: pointer;
}

.hierarchy-page__switch-button--active {
  background: rgba(96, 165, 250, 0.2);
  color: var(--text-primary);
}

.hierarchy-page__switch-button:focus-visible,
.hierarchy-page__row:focus-visible,
.hierarchy-page__milestone:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--focus-shadow);
}

.hierarchy-page__state {
  margin: 0;
  color: var(--text-secondary);
}

.hierarchy-page__tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hierarchy-page__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.3);
}

.hierarchy-page__row--current {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(30, 64, 175, 0.2);
}

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

.hierarchy-page__row-title,
.hierarchy-page__milestone-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-weight: 650;
}

.hierarchy-page__current,
.hierarchy-page__badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1;
  white-space: nowrap;
}

.hierarchy-page__current {
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}

.hierarchy-page__deadline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.hierarchy-page__gantt {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 240px);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-width: thin;
}

.hierarchy-page__milestone {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.34);
}

.hierarchy-page__milestone::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 27px;
  right: -12px;
  height: 2px;
  background: rgba(96, 165, 250, 0.24);
}

.hierarchy-page__milestone:last-child::before {
  right: auto;
  width: 0;
}

.hierarchy-page__milestone--current {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(30, 64, 175, 0.2);
}

.hierarchy-page__milestone-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #60a5fa;
  box-shadow: 0 0 0 5px rgba(96, 165, 250, 0.16);
}

@media (max-width: 720px) {
  .hierarchy-page__row {
    grid-template-columns: 1fr;
  }

  .hierarchy-page__deadline {
    justify-content: flex-start;
  }

  .hierarchy-page__switch {
    width: 100%;
  }

  .hierarchy-page__switch-button {
    flex: 1 1 0;
  }
}

/* ============================================================================
   019 — Task time tracking panel.
   Reuses the existing .task-editor__panel + .task-editor__field-row chrome
   (border-radius 16px, slate-800 50% bg, slate-700 50% border, blur) so the
   panel reads as a sibling of Assignees / Subtasks / Attachments by default.
   New classes here cover only the time-panel specifics (input + suffix
   layout, inline error pill, future over-budget tint hook).
   ============================================================================ */

.task-time-panel__planned-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-time-panel__planned-input {
  /* The numeric input is short and right-aligned so the suffix sits next
     to the digits without a wide ribbon of whitespace. */
  flex: 0 1 96px;
  text-align: right;
}

.task-time-panel__unit-suffix {
  /* "час" / "мин." (FR-004) — quiet secondary text colour so the digits
     remain the dominant visual element in the row. */
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.task-time-panel__inline-error {
  margin: 4px 0 0;
  padding: 6px 10px;
  border-radius: 9999px;
  background: rgba(233, 42, 103, 0.12);
  border: 1px solid rgba(233, 42, 103, 0.32);
  color: rgb(252, 165, 178);
  font-size: 0.78rem;
  line-height: 1.3;
}

/* US4 — over-budget tint applied to the running-total row when the actual
   total exceeds the planned estimate (FR-012, §13). */
.task-time-panel__row--over-budget {
  border-radius: 12px;
  background: rgba(233, 42, 103, 0.14);
  box-shadow: 0 0 24px rgba(233, 42, 103, 0.22);
}

.task-time-panel__total-control {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.task-time-panel__total-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-primary);
}

/* Empty-entries hint shown when the expanded panel has no entries (research
   decision #6 locked copy "Нет отметок"). */
.task-time-panel__empty-hint {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-style: italic;
}

/* US3 — entries list */
.task-time-panel__entries {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-time-panel__entry {
  display: grid;
  grid-template-columns: 28px auto auto 1fr 32px 32px;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border-radius: 10px;
}

.task-time-panel__entry-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.task-time-panel__entry-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-time-panel__entry-initial {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.task-time-panel__entry-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-primary);
}

.task-time-panel__entry-spacer {
  display: block;
}

.task-time-panel__entry-edit,
.task-time-panel__entry-delete {
  width: 32px;
  height: 32px;
  padding: 6px;
}

.task-time-panel__edit-modal {
  max-width: 360px;
  padding: 24px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-time-panel__edit-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-time-panel__edit-input {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

/* US3 — new-entry input row */
.task-time-panel__new-entry-row {
  grid-template-columns: minmax(0, 1fr);
}

.task-time-panel__new-entry-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.task-time-panel__new-entry-input {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.task-time-panel__submit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(42, 138, 246, 0.36);
  background: rgba(42, 138, 246, 0.18);
  color: #e0ecff;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-time-panel__submit-pill:hover,
.task-time-panel__submit-pill:focus-visible {
  border-color: rgba(42, 138, 246, 0.6);
  background: rgba(42, 138, 246, 0.2);
  box-shadow: 0 8px 24px rgba(42, 138, 246, 0.22);
  outline: none;
}

/* US5 — confirmation modal */
.task-time-panel__confirm-modal {
  max-width: 360px;
  padding: 24px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-time-panel__confirm-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.task-time-panel__confirm-body {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.task-time-panel__confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.task-time-panel__confirm-cancel,
.task-time-panel__confirm-delete {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.86rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-primary);
}

.task-time-panel__confirm-delete {
  border-color: rgba(233, 42, 103, 0.4);
  background: rgba(233, 42, 103, 0.18);
  color: #fce4ec;
}

.task-time-panel__confirm-delete:hover,
.task-time-panel__confirm-delete:focus-visible {
  border-color: rgba(233, 42, 103, 0.62);
  box-shadow: 0 8px 24px rgba(233, 42, 103, 0.24);
  outline: none;
}

/* 021-replace-gantt-view — replacement project/task Gantt page styles. */
.gantt-page {
  --gantt-label-column: 320px;
  --gantt-row-indent: 0px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gantt-page__truncated {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(233, 168, 42, 0.4);
  background: rgba(233, 168, 42, 0.12);
  color: #ffe6a0;
  font-size: 0.9rem;
}

.gantt-page__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.gantt-toolbar__filter[aria-pressed="true"] {
  border-color: rgba(95, 158, 160, 0.6);
  background: rgba(95, 158, 160, 0.18);
}

.gantt-toolbar__zoom,
.gantt-toolbar__scroll {
  display: flex;
  gap: 6px;
}

.gantt-page__chart {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 14, 28, 0.45);
  overflow: hidden;
}

.gantt-page__columns {
  display: grid;
  grid-template-columns: var(--gantt-label-column) 1fr;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.gantt-page__column-header {
  padding: 8px 12px;
}

.gantt-page__column-header--timeline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.gantt-page__column-header-today {
  font-weight: 600;
  color: #f4b73e;
}

.gantt-page__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  overflow: auto;
  position: relative;
}

.gantt-page__today-line {
  pointer-events: none;
  position: absolute;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(244, 183, 62, 0.9), rgba(244, 183, 62, 0.4));
  z-index: 1;
}

.gantt-row {
  display: grid;
  grid-template-columns: var(--gantt-label-column) 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 4px 12px;
  position: relative;
  background: transparent;
  transition: background-color 0.15s ease-out;
}

.gantt-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.gantt-row--project {
  font-weight: 600;
}

.gantt-row--task {
  font-weight: 400;
}

.gantt-row--placeholder .gantt-row__title {
  color: var(--text-muted);
  font-style: italic;
}

.gantt-row__label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: var(--gantt-row-indent);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gantt-row__toggle {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  padding: 0;
}

.gantt-row__title {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.gantt-row__type,
.gantt-row__column,
.gantt-row__date,
.gantt-row__badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.gantt-row__badge {
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
}

.gantt-row__badge--placeholder {
  background: rgba(233, 42, 103, 0.18);
  color: #fce4ec;
}

.gantt-row__timeline {
  position: relative;
  height: 28px;
}

.gantt-row__pin {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.gantt-row__pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5f9ea0;
  box-shadow: 0 0 0 2px rgba(95, 158, 160, 0.18);
}

.gantt-row__pin-label,
.gantt-row__bar-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.gantt-row__bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 6px;
  background: rgba(95, 158, 160, 0.4);
  border: 1px solid rgba(95, 158, 160, 0.6);
}

/* Status colors — must remain distinguishable without color alone (FR-016).
 * Each variant adds a left border style + label suffix (rendered via the
 * status_label helper) so the meaning is readable in monochrome too. */
.gantt-row--neutral .gantt-row__pin-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.18);
}
.gantt-row--before .gantt-row__bar {
  background: rgba(46, 196, 182, 0.36);
  border-color: rgba(46, 196, 182, 0.66);
}
.gantt-row--after .gantt-row__bar {
  background: rgba(255, 117, 117, 0.32);
  border-color: rgba(255, 117, 117, 0.6);
  border-style: dashed;
}
.gantt-row--root-past .gantt-row__bar {
  background: rgba(233, 42, 103, 0.32);
  border-color: rgba(233, 42, 103, 0.7);
  border-style: dashed;
}
.gantt-row--root-future .gantt-row__bar {
  background: rgba(124, 58, 237, 0.32);
  border-color: rgba(124, 58, 237, 0.66);
}
