/* yuzbir-board — uni style: warm editorial B2B.
 * stone paper canvas + ink primary + ONE violet accent. Warm neutrals only.
 */
:root {
  --ink: 28 25 23;
  --accent: 124 58 237;
  --paper: #faf9f7;
  --line: #e7e5e4;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: rgb(var(--ink));
  font-size: 15px;
  line-height: 1.5;
}

/* The signature dotted paper canvas — grid stays put while content scrolls. */
.ub-body {
  background-color: var(--paper);
  background-image: radial-gradient(circle at 1px 1px, rgb(var(--ink) / 0.04) 1px, transparent 0);
  background-size: 22px 22px;
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3 { font-family: Sora, Inter, sans-serif; font-weight: 700; margin: 0; }
h1 { font-size: 1.85rem; letter-spacing: -0.02em; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.98rem; }

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.muted { color: #78716c; }
.small { font-size: 0.82rem; }
.lede { color: #78716c; margin: 0.35rem 0 1.5rem; }

::selection { background-color: rgb(var(--accent) / 0.18); }

/* ── chrome ─────────────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(12px);
}
header nav {
  max-width: 1400px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 1.25rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: Sora, sans-serif; font-weight: 700;
  color: rgb(var(--ink)); text-decoration: none;
}
.logo {
  display: grid; place-items: center;
  height: 36px; width: 36px; border-radius: 12px;
  background: rgb(var(--ink)); color: #fff;
  font-family: Sora, sans-serif; font-weight: 800;
  transition: transform 0.2s;
}
.brand:hover .logo { transform: rotate(-6deg); }

main { max-width: 1400px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

/* ── primitives ─────────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 1px 2px 0 rgb(var(--ink) / 0.04), 0 1px 3px 0 rgb(var(--ink) / 0.06);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 12px; padding: 0.6rem 1rem;
  font: inherit; font-weight: 600; font-size: 0.9rem;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: rgb(var(--ink)); color: #fff; }
.btn-primary:hover { background: #292524; }
.btn-secondary { background: #fff; color: #44403c; border-color: var(--line); }
.btn-secondary:hover { background: #fafaf9; border-color: #d6d3d1; }
.btn-accent { background: rgb(var(--accent)); color: #fff; }
.btn-accent:hover { background: #8b5cf6; }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.82rem; border-radius: 9px; }

.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  border-radius: 999px; padding: 0.15rem 0.55rem;
  font-size: 0.75rem; font-weight: 600;
}
.badge-stone { background: #f5f5f4; color: #57534e; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-rose  { background: #ffe4e6; color: #be123c; }
.badge-violet{ background: #ede9fe; color: #6d28d9; }

.ub-input {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 0.55rem 0.75rem; font: inherit; background: #fff;
  color: rgb(var(--ink)); width: 100%;
}
.ub-input:focus { outline: 2px solid rgb(var(--ink) / 0.15); outline-offset: 2px; border-color: #d6d3d1; }

/* ── board index ────────────────────────────────────────────────────── */
.board-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.boardcard { padding: 1.1rem; text-decoration: none; color: inherit; transition: box-shadow 0.18s, transform 0.18s; }
.boardcard:hover { box-shadow: 0 4px 16px -2px rgb(var(--ink) / 0.10); transform: translateY(-2px); }
.boardcard-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.boardcard-meta { display: flex; justify-content: space-between; margin-top: 0.6rem; }
.bar { height: 6px; background: #f5f5f4; border-radius: 999px; margin-top: 0.85rem; overflow: hidden; }
.bar-fill { height: 100%; background: rgb(var(--accent)); border-radius: 999px; transition: width 0.3s; }

.newboard { padding: 1.25rem; margin-top: 2rem; max-width: 620px; }
.newboard .row { display: flex; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }
.newboard .row .ub-input { flex: 1 1 160px; }

/* ── kanban ─────────────────────────────────────────────────────────── */
.board-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.stats { display: flex; gap: 1.5rem; }
.stat-n { font-family: "JetBrains Mono", monospace; font-size: 1.6rem; font-weight: 500; display: block; }

.columns {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  align-items: start;
}
@media (max-width: 1100px) { .columns { grid-template-columns: repeat(2, minmax(240px, 1fr)); } }
@media (max-width: 640px)  { .columns { grid-template-columns: 1fr; } }

.col { background: rgb(255 255 255 / 0.55); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem; }
.col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.col-title { font-family: Sora, sans-serif; font-weight: 700; font-size: 0.92rem; }
.col-sub { font-size: 0.72rem; color: #a8a29e; }

.drop { min-height: 60px; display: flex; flex-direction: column; gap: 0.6rem; }

.task {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.75rem; cursor: grab;
  box-shadow: 0 1px 2px 0 rgb(var(--ink) / 0.04);
  animation: fade-in-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.task:hover { box-shadow: 0 4px 16px -2px rgb(var(--ink) / 0.10); }
.task.dragging { opacity: 0.4; }
.task-ghost { border: 1px dashed rgb(var(--accent)); background: #f5f3ff; }
.task-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.task-body { font-size: 0.82rem; color: #57534e; }
.task-ev {
  font-size: 0.74rem; color: #78716c; margin-top: 0.5rem;
  padding-top: 0.5rem; border-top: 1px dashed var(--line);
}
.task-ev b { color: #57534e; font-weight: 600; }
.task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.4rem; }
.del { border: 0; background: none; color: #d6d3d1; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.15rem; }
.del:hover { color: #be123c; }

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

.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: rgb(var(--ink)); color: #fff;
  padding: 0.6rem 1rem; border-radius: 12px; font-size: 0.85rem;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
  z-index: 100;
}
.toast.show { opacity: 1; }
