/*
 * Veya roadmap — standalone. Tokens copied from the Veya workspace
 * (src/app/globals.css, `.surface-admin`) so the board reads as the same
 * product: ink neutrals, aurora gradient, dotted canvas, Jakarta + Bricolage.
 */
:root {
  --ink-50: #f5f5f7;
  --ink-100: #efefef;
  --ink-200: #e5e5ea;
  --ink-300: #d2d2d7;
  --ink-400: #a1a1a6;
  --ink-500: #6e6e73;
  --ink-600: #515154;
  --ink-700: #3a3a3c;
  --ink-800: #2c2c2e;
  --ink-900: #1d1d1f;
  --ink-950: #000000;

  --aurora-violet: #7c3aed;
  --aurora-pink: #ec4899;
  --aurora-orange: #f97316;
  --aurora: linear-gradient(100deg, var(--aurora-violet) 0%, var(--aurora-pink) 55%, var(--aurora-orange) 100%);

  --previous: #10b981;
  --ongoing: var(--aurora-pink);
  --future: #0ea5e9;

  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --shadow-card: 0 1px 2px 0 rgb(0 0 0 / 0.04), 0 0 0 0.5px rgb(0 0 0 / 0.04);
  --shadow-raised: 0 4px 16px -4px rgb(0 0 0 / 0.08);
  --shadow-float: 0 12px 40px -12px rgb(0 0 0 / 0.18);

  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #fafafa;
  background-image: radial-gradient(rgba(29, 29, 31, 0.07) 1.05px, transparent 1.05px);
  background-size: 20px 20px;
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background-color: color-mix(in srgb, var(--aurora-pink) 22%, white);
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Soft aurora glows behind the page — the workspace shell's ::before/::after. */
.glow {
  position: fixed;
  z-index: -1;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.22;
  pointer-events: none;
}
.glow-a {
  top: -4rem;
  right: -2rem;
  width: 18rem;
  height: 18rem;
  background: color-mix(in srgb, var(--aurora-pink) 28%, transparent);
}
.glow-b {
  bottom: 10%;
  left: -3rem;
  width: 16rem;
  height: 16rem;
  background: color-mix(in srgb, var(--aurora-violet) 22%, transparent);
}

/* ── Page ─────────────────────────────────────────────────────────── */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.page-header {
  margin-bottom: 28px;
  animation: rise-in 0.45s var(--ease) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  font-family: var(--font-script);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-900);
}

.brand-flame {
  width: 12px;
  height: 16px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(135deg, var(--aurora-violet) 0%, var(--aurora-pink) 55%, var(--aurora-orange) 100%);
  transform: rotate(-12deg);
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1.15;
}

.page-title .script {
  display: inline-block;
  padding-block: 0.08em;
  font-family: var(--font-script);
  font-size: 1.2em;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  background-image: var(--aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-description {
  max-width: 42rem;
  margin: 8px 0 0;
  color: var(--ink-500);
  line-height: 1.6;
}

.footnote {
  margin: 20px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-400);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Controls ─────────────────────────────────────────────────────── */
.control {
  width: 100%;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  background: #fff;
  padding: 0 12px;
  height: 40px;
  font-size: 14px;
  color: var(--ink-900);
}
.control::placeholder {
  color: var(--ink-400);
}
.control:focus {
  border-color: color-mix(in srgb, var(--aurora-pink) 50%, transparent);
  outline: 2px solid color-mix(in srgb, var(--aurora-pink) 22%, white);
  outline-offset: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 150ms var(--ease), background-color 150ms, box-shadow 150ms;
}
.btn:hover {
  transform: translateY(-1px) scale(1.015);
}
.btn:active {
  transform: scale(0.97);
}
.btn:focus-visible,
.icon-btn:focus-visible,
.card:focus-visible,
.card-more:focus-visible {
  outline: 2px solid var(--aurora-pink);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}
.btn-primary {
  background: var(--ink-800);
  color: #fff;
}
.btn-primary:hover {
  background: var(--ink-700);
}
.btn-gradient {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--aurora-violet) 90%, transparent),
    color-mix(in srgb, var(--aurora-pink) 90%, transparent),
    color-mix(in srgb, var(--aurora-orange) 90%, transparent)
  );
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--ink-600);
}
.btn-ghost:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}
.btn-outline {
  background: #fff;
  color: var(--ink-700);
  box-shadow: inset 0 0 0 1px var(--ink-200);
}
.btn-outline:hover {
  background: var(--ink-50);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-500);
  transition: background-color 150ms, color 150ms;
}
.icon-btn:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}
.icon-btn-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ── Toolbar ──────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.search {
  position: relative;
  width: 100%;
  max-width: 320px;
}
.search .control {
  padding-left: 36px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400);
  pointer-events: none;
}
.toolbar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ── Board ────────────────────────────────────────────────────────── */
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
@media (max-width: 1023px) {
  .board {
    grid-template-columns: minmax(0, 1fr);
  }
}

.column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 28rem;
  padding: 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ink-50) 80%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink-200) 50%, transparent);
  transition: box-shadow 150ms, background-color 150ms;
}
.column.is-target[data-column="previous"] {
  background: color-mix(in srgb, var(--previous) 6%, white);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--previous) 45%, transparent);
}
.column.is-target[data-column="ongoing"] {
  background: color-mix(in srgb, var(--ongoing) 5%, white);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ongoing) 35%, transparent);
}
.column.is-target[data-column="future"] {
  background: color-mix(in srgb, var(--future) 6%, white);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--future) 45%, transparent);
}

.column-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 0;
  margin-bottom: 12px;
}
.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 999px;
  background: var(--ink-400);
}
.dot[data-column="previous"] {
  background: var(--previous);
}
.dot[data-column="ongoing"] {
  background: var(--ongoing);
}
.dot[data-column="future"] {
  background: var(--future);
}
.column-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
}
.count {
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink-200) 70%, transparent);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-500);
}
.column-hint {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--ink-400);
}
@media (max-width: 1279px) and (min-width: 1024px) {
  .column-hint {
    display: none;
  }
}
.column-actions {
  display: flex;
  margin-left: auto;
}
.column-actions .icon-btn {
  width: 28px;
  height: 28px;
}
.column-actions .icon-btn:hover {
  background: #fff;
}

.quick-add {
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card), inset 0 0 0 1px color-mix(in srgb, var(--aurora-pink) 30%, transparent);
}
.quick-add textarea {
  width: 100%;
  resize: none;
  border: 0;
  background: transparent;
  padding: 4px 6px;
  font-size: 14px;
  color: var(--ink-900);
}
.quick-add textarea:focus {
  outline: none;
}
.quick-add textarea::placeholder {
  color: var(--ink-400);
}

.cards {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cards > li {
  position: relative;
}

/* Drop indicator: overlaid in the gap above its card, so it never shifts the card being aimed at. */
.cards > li.drop-before::before,
.cards > li.drop-end::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -5px;
  height: 2px;
  border-radius: 999px;
  background: var(--aurora);
  pointer-events: none;
}

.card {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card), inset 0 0 0 1px color-mix(in srgb, var(--ink-200) 60%, transparent);
  text-align: left;
  cursor: grab;
  transition: box-shadow 150ms, transform 150ms, opacity 150ms;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-raised), inset 0 0 0 1px color-mix(in srgb, var(--aurora-pink) 25%, transparent);
}
.card:active {
  cursor: grabbing;
}
.card.is-dragging {
  opacity: 0.4;
}
.card-title {
  margin: 0;
  padding-right: 28px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-900);
  overflow-wrap: anywhere;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.card-meta .has-description {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--ink-400);
}

/* The ⋯ menu trigger sits over the card's top-right corner. */
.card-more {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-500);
  opacity: 0;
  transition: opacity 120ms, background-color 120ms, color 120ms;
}
.cards > li:hover .card-more,
.cards > li:focus-within .card-more,
.card-more[aria-expanded="true"] {
  opacity: 1;
}
.card-more:hover,
.card-more[aria-expanded="true"] {
  background: var(--ink-100);
  color: var(--ink-900);
}
@media (hover: none) {
  .card-more {
    opacity: 1;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  box-shadow: inset 0 0 0 1px var(--ring);
  background: var(--bg);
  color: var(--fg);
  --ring: color-mix(in srgb, var(--ink-200) 70%, transparent);
  --bg: var(--ink-50);
  --fg: var(--ink-600);
}
.pill-priority {
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 600;
}
.pill-P0 {
  --bg: #fff1f2;
  --fg: #be123c;
  --ring: #fecdd3;
}
.pill-P1 {
  --bg: #fffbeb;
  --fg: #92400e;
  --ring: #fde68a;
}
.pill-P2 {
  --bg: color-mix(in srgb, var(--ink-100) 90%, transparent);
  --fg: var(--ink-600);
}

.empty,
.drop-tail {
  flex: 1;
}
.empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 16px;
  border: 1px dashed var(--ink-200);
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-400);
}
.drop-tail {
  min-height: 40px;
}

/* ── Menu ─────────────────────────────────────────────────────────── */
.menu {
  position: fixed;
  z-index: 50;
  min-width: 200px;
  padding: 4px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-float), 0 0 0 1px var(--ink-200);
  animation: fade-in 120ms ease-out;
}
.menu-label {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-400);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  color: var(--ink-800);
}
.menu-item:hover,
.menu-item:focus-visible {
  background: var(--ink-50);
  outline: none;
}
.menu-item:disabled {
  color: var(--ink-400);
  cursor: default;
  background: transparent;
}
.menu-item .dot {
  margin: 0 4px;
}
.menu-item-danger {
  color: var(--danger);
}
.menu-item-danger:hover,
.menu-item-danger:focus-visible {
  background: var(--danger-soft);
}
.menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--ink-100);
}
.menu-kbd {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-400);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Drawer ───────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgb(0 0 0 / 0.3);
  animation: fade-in 150ms ease-out;
}
.overlay-strong {
  z-index: 80;
  background: rgb(0 0 0 / 0.55);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 36rem;
  border-left: 1px solid var(--ink-200);
  background: #fff;
  box-shadow: var(--shadow-float);
  animation: drawer-in 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--ink-100);
}
.drawer-kicker {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-500);
}
.drawer-head-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.drawer-title {
  width: 100%;
  resize: none;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--ink-900);
}
.drawer-title:focus {
  outline: none;
}
.drawer-title::placeholder {
  color: var(--ink-300);
}

.props {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  align-items: center;
  gap: 10px 12px;
  margin: 16px 0 0;
}
.props dt {
  color: var(--ink-500);
}
.props dd {
  margin: 0;
}
.prop-select {
  width: 100%;
  max-width: 15rem;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-800);
  cursor: pointer;
  transition: background-color 150ms, border-color 150ms;
}
.prop-select:hover {
  border-color: var(--ink-200);
  background: var(--ink-50);
}
.prop-select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--aurora-pink) 40%, transparent);
}
.prop-text {
  padding: 0 8px;
  color: var(--ink-600);
}

.description-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-100);
}
.section-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-400);
}
.description {
  width: calc(100% + 16px);
  min-height: 16rem;
  margin: 0 -8px;
  padding: 8px;
  /* Grows with its text (app.js autosize); the drawer body scrolls instead. */
  resize: none;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-800);
}
.description:hover,
.description:focus {
  background: color-mix(in srgb, var(--ink-50) 70%, transparent);
  outline: none;
}
.description::placeholder {
  color: var(--ink-400);
}

.drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--ink-100);
}

/* ── Confirm ──────────────────────────────────────────────────────── */
.confirm {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 90;
  width: calc(100% - 32px);
  max-width: 28rem;
  padding: 20px;
  border: 1px solid var(--ink-200);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-float);
  transform: translate(-50%, -50%);
}
.confirm-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.confirm-text {
  margin: 8px 0 0;
  color: var(--ink-600);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 32px);
  padding: 10px 10px 10px 16px;
  border-radius: 20px;
  background: var(--ink-900);
  color: #fff;
  box-shadow: var(--shadow-float);
  font-size: 13px;
  width: max-content;
  transform: translateX(-50%);
  animation: fade-in 150ms ease-out;
}
.toast-undo {
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.toast-undo:hover {
  background: rgb(255 255 255 / 0.24);
}

@media (max-width: 640px) {
  .page {
    padding: 24px 16px 40px;
  }
  .toolbar-actions {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Login ─────────────────────────────────────────────────────────── */
.login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--ink-50) 92%, transparent);
  backdrop-filter: blur(6px);
}
.login[hidden] {
  display: none;
}
.login-card {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-float);
}
.login-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.login-title .script {
  font-family: var(--font-script);
  background: var(--aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.875rem;
}
