:root {
  --bg: #0d0d0d;
  --bg-elevated: #121212;
  --panel: #171717;
  --surface: #1f1f1f;
  --surface-2: #202225;
  --surface-3: #27292c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 84, 84, 0.55);
  --text: #f3f3f3;
  --muted: #9c9da4;
  --muted-2: #70737b;
  --primary: #ff5454;
  --primary-strong: #ff3b3b;
  --primary-soft: rgba(255, 84, 84, 0.16);
  --accent: #ffa34d;
  --green: #4ecb71;
  --yellow: #ffb347;
  --purple: #b08cff;
  --pink: #ff6fa8;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --radius-xs: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 84, 84, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(176, 140, 255, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input {
  border: 0;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 84px;
  background: rgba(0, 0, 0, 0.72);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  gap: 18px;
}

.sidebar__logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 84, 84, 0.18), #111111);
  border: 1px solid rgba(255, 84, 84, 0.24);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 30px rgba(255, 59, 59, 0.18);
}

.sidebar__logo span,
.sidebar__logo span::before {
  position: absolute;
  content: "";
  width: 15px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  top: 20px;
  left: 13px;
  transform: rotate(-42deg);
}

.sidebar__logo span::before {
  width: 8px;
  top: -5px;
  left: 9px;
  transform: rotate(84deg);
}

.sidebar__count {
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 600;
}

.main-frame {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 24px;
  gap: 18px;
}

.topbar,
.tabs,
.board,
.details-panel,
.modal__dialog {
  backdrop-filter: blur(18px);
}

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

.topbar__left,
.topbar__right,
.tabs,
.column__title-wrap,
.column__actions,
.panel-section__header,
.panel-section__icons,
.progress-headings,
.modal__actions {
  display: flex;
  align-items: center;
}

.topbar__left,
.topbar__right {
  gap: 10px;
}

.breadcrumb {
  color: #d3d4d8;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.breadcrumb span {
  color: var(--muted-2);
  margin: 0 6px;
}

.tabs {
  gap: 10px;
}

.tab,
.icon-button,
.column__actions button,
.toggle-group__button,
.button,
.modal__close,
.modal__backdrop {
  background: transparent;
  color: var(--text);
}

.tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
}

.tab--active {
  border-color: var(--border-strong);
  color: #fff3f3;
  box-shadow: inset 0 0 0 1px rgba(255, 84, 84, 0.28), 0 0 0 1px rgba(255, 84, 84, 0.08);
  background: linear-gradient(180deg, rgba(255, 84, 84, 0.08), rgba(255, 84, 84, 0.02));
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  min-height: 0;
}

.board {
  min-width: 0;
}

.board__columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
  min-width: 0;
}

.column,
.details-panel {
  background: linear-gradient(180deg, rgba(28, 28, 30, 0.96), rgba(18, 18, 18, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.column {
  padding: 16px;
  min-width: 0;
}

.column--narrow {
  max-width: 260px;
}

.column__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.column__title-wrap {
  gap: 10px;
  min-width: 0;
}

.column__title-wrap h2,
.panel-section__header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.column__title-wrap h2 span {
  color: var(--muted);
  margin-left: 4px;
}

.column__actions {
  gap: 8px;
}

.column__actions button,
.icon-button {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.04);
}

.icon-button.ghost {
  background: transparent;
  border-color: transparent;
}

.icon-button.notify {
  position: relative;
}

.icon-button.notify::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--bg);
}

.icon,
.status-dot,
.mini-icon,
.caret {
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.icon-dots,
.icon-plus,
.icon-filter,
.icon-sort,
.icon-share,
.icon-star {
  width: 14px;
  height: 14px;
}

.icon-dots::before {
  content: "";
  position: absolute;
  inset: 6px 1px auto;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 5px 0 0 currentColor, 10px 0 0 currentColor;
}

.icon-plus::before,
.icon-plus::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 999px;
}

.icon-plus::before {
  width: 12px;
  height: 2px;
  left: 1px;
  top: 6px;
}

.icon-plus::after {
  width: 2px;
  height: 12px;
  left: 6px;
  top: 1px;
}

.icon-filter::before,
.icon-filter::after,
.icon-sort::before,
.icon-sort::after,
.icon-share::before,
.icon-share::after,
.icon-star::before,
.icon-star::after {
  content: "";
  position: absolute;
}

.icon-filter::before {
  inset: 2px 1px auto;
  width: 12px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
}

.icon-filter::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  left: 6px;
  top: 0;
  box-shadow: -4px 4px 0 currentColor, 2px 8px 0 currentColor;
}

.icon-sort::before {
  width: 9px;
  height: 2px;
  background: currentColor;
  left: 2px;
  top: 3px;
  box-shadow: 0 6px 0 currentColor;
}

.icon-sort::after {
  width: 2px;
  height: 12px;
  background: currentColor;
  right: 2px;
  top: 1px;
}

.icon-share::before {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  right: 1px;
  top: 1px;
}

.icon-share::after {
  width: 8px;
  height: 2px;
  background: currentColor;
  left: 1px;
  bottom: 1px;
  transform: rotate(-45deg);
  transform-origin: left center;
}

.icon-star::before {
  inset: 1px;
  clip-path: polygon(50% 0%, 61% 36%, 100% 38%, 68% 60%, 79% 100%, 50% 75%, 21% 100%, 32% 60%, 0% 38%, 39% 36%);
  border: 1.5px solid currentColor;
}

.icon-star::after {
  display: none;
}

.status-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

.status-dot--backlog {
  color: var(--primary);
  border-style: dotted;
}

.status-dot--progress {
  color: var(--yellow);
  border-color: var(--yellow);
  border-right-color: transparent;
  transform: rotate(-35deg);
}

.status-dot--regress {
  color: var(--green);
  border-color: var(--green);
}

.status-dot--regress::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--green);
  border-right: 2px solid var(--green);
  right: -1px;
  top: 2px;
  transform: rotate(20deg);
}

.status-dot--done {
  color: var(--purple);
  border-color: rgba(176, 140, 255, 0.7);
  background: radial-gradient(circle at 50% 50%, rgba(176, 140, 255, 0.7), rgba(176, 140, 255, 0.12));
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.issue-card {
  background: linear-gradient(180deg, rgba(38, 39, 43, 0.98), rgba(28, 29, 31, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 126px;
}

.issue-card--cta-anchor {
  border-color: rgba(255, 84, 84, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 84, 84, 0.1);
}

.issue-card--compact {
  min-height: 88px;
  gap: 8px;
}

.issue-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
}

.issue-card__meta,
.issue-card__footer,
.panel-copy,
.property-list dt,
.property-list dd,
.progress-headings,
.assignee-list,
.chip,
.branch-tag {
  font-size: 13px;
}

.issue-card__meta,
.issue-card__footer,
.panel-copy,
.property-list dt,
.assignee-list li,
.progress-headings {
  color: var(--muted);
}

.issue-card__meta,
.chip-row,
.issue-card__footer,
.property-list div,
.assignee,
.assignee-list li,
.member-stack {
  display: flex;
  align-items: center;
}

.issue-card__meta,
.property-list div,
.assignee-list li {
  justify-content: space-between;
}

.chip-row {
  gap: 8px;
  flex-wrap: wrap;
}

.chip,
.branch-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #d9dbe0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chip--warning {
  background: rgba(255, 179, 71, 0.12);
  color: #ffd595;
  border-color: rgba(255, 179, 71, 0.18);
}

.chip--success,
.branch-tag {
  background: rgba(78, 203, 113, 0.12);
  color: #a8efba;
  border-color: rgba(78, 203, 113, 0.18);
}

.mini-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-icon::before,
.mini-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  height: 2px;
  background: var(--muted);
  border-radius: 999px;
}

.mini-icon::before {
  bottom: 4px;
}

.mini-icon::after {
  bottom: 8px;
  width: 7px;
}

.details-panel {
  padding: 16px 0;
}

.panel-section {
  padding: 0 16px 18px;
}

.panel-section + .panel-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 18px;
}

.panel-section__header {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.panel-section__icons {
  gap: 10px;
}

.caret {
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}

.property-list {
  margin: 0;
  display: grid;
  gap: 14px;
}

.property-list div {
  gap: 12px;
}

.property-list dt {
  min-width: 84px;
}

.property-list dd {
  margin: 0;
  color: #d9dbe0;
  text-align: right;
}

.member-stack {
  display: inline-flex;
  margin-right: 8px;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #120f14;
  background: #d9d9d9;
}

.avatar + .avatar {
  margin-left: -8px;
}

.avatar--pink {
  background: var(--pink);
}

.avatar--orange {
  background: var(--accent);
}

.avatar--muted {
  background: #31343a;
  color: var(--muted);
}

.panel-copy {
  margin: 0;
  line-height: 1.6;
}

.panel-copy a {
  color: #ffd1d1;
  text-decoration: none;
}

.progress-headings {
  justify-content: space-between;
  margin-bottom: 14px;
}

.progress-headings strong {
  color: var(--text);
  font-weight: 600;
  margin-left: 4px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-bar span {
  display: block;
  width: 60.8%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  border-radius: inherit;
}

.toggle-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.toggle-group__button {
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.toggle-group__button--active {
  background: linear-gradient(180deg, rgba(255, 84, 84, 0.14), rgba(255, 84, 84, 0.06));
  border-color: rgba(255, 84, 84, 0.28);
  color: #fff2f2;
}

.assignee-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.assignee-list li strong {
  color: var(--text);
}

.assignee {
  gap: 10px;
}

.floating-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
  font-weight: 700;
  box-shadow: 0 20px 50px rgba(255, 59, 59, 0.35);
  z-index: 30;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
  z-index: 40;
}

.modal[aria-hidden="false"] {
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal__dialog {
  position: relative;
  width: min(100%, 460px);
  background: linear-gradient(180deg, rgba(25, 25, 28, 0.98), rgba(17, 17, 19, 0.98));
  border: 1px solid rgba(255, 84, 84, 0.16);
  border-radius: 24px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  padding: 28px;
}

.modal[aria-hidden="true"] .modal__dialog,
.modal[aria-hidden="true"] .modal__backdrop {
  opacity: 0;
}

.modal[aria-hidden="false"] .modal__dialog,
.modal[aria-hidden="false"] .modal__backdrop {
  opacity: 1;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  font-size: 24px;
  line-height: 1;
}

.modal__state h2 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 10px;
  color: #ffb3b3;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
}

.modal__copy {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.waitlist-form {
  display: grid;
  gap: 16px;
}

.waitlist-form label {
  display: grid;
  gap: 8px;
}

.waitlist-form label span {
  font-size: 13px;
  color: #dbdde2;
}

.waitlist-form input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 14px;
}

.waitlist-form input::placeholder {
  color: var(--muted-2);
}

.form-message {
  margin: -4px 0 0;
  color: #ff9b9b;
  font-size: 13px;
}

.modal__actions {
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 600;
}

.button--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
  box-shadow: 0 12px 30px rgba(255, 59, 59, 0.28);
}

.button--secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

  .details-panel {
    order: -1;
  }
}

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

  .column--narrow {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 14px 16px;
  }

  .main-frame {
    padding: 16px;
  }

  .topbar,
  .tabs {
    flex-wrap: wrap;
  }

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

  .floating-cta {
    right: 16px;
    bottom: 16px;
    left: 16px;
    justify-content: center;
  }

  .modal__dialog {
    padding: 24px 20px;
  }

  .modal__state h2 {
    font-size: 28px;
  }
}
