:root {
  --bg: #0e1014;
  --bg-2: #151821;
  --card: #1c202b;
  --card-hover: #232836;
  --line: #2a3040;
  --text: #e8eaef;
  --muted: #8b93a7;
  --accent: #d4a017;
  --accent-2: #7c6af7;
  --danger: #e05d5d;
  --ok: #3dbf8f;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
button, input, textarea, select {
  font: inherit; color: inherit;
}
button { cursor: pointer; }
.hidden { display: none !important; }

.screen { min-height: 100%; }
#login {
  display: grid; place-items: center;
  background: radial-gradient(1200px 500px at 20% -10%, #2a2208 0%, transparent 50%), var(--bg);
}
.login-card {
  width: min(420px, 92vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.brand { font-weight: 700; letter-spacing: 0.04em; font-size: 1.15rem; }
.login-card .brand { font-size: 1.4rem; color: var(--accent); }
.muted, .hint { color: var(--muted); font-size: 0.9rem; }
.login-card label { display: block; margin: 12px 0; font-size: 0.85rem; color: var(--muted); }
.login-card input, .login-card button,
.modal-card input, .modal-card button, .drawer input, .drawer textarea, .drawer select, .drawer button {
  width: 100%;
}
input, textarea, select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
}
textarea { min-height: 90px; resize: vertical; }
button[type="submit"], .primary {
  background: var(--accent);
  color: #1a1404;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  width: auto;
}
.ghost {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text);
  width: auto;
}
.ghost:hover { border-color: var(--accent); }
.error { color: var(--danger); min-height: 1.2em; }
.hint { margin-top: 18px; }

.top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 10px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand-row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand-row .brand { color: var(--accent); white-space: nowrap; }
.tabs { display: flex; gap: 6px; overflow-x: auto; }
.tab {
  background: transparent; border: 0; color: var(--muted);
  padding: 8px 12px; border-radius: 8px; width: auto; white-space: nowrap;
}
.tab.active { background: var(--card); color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.who { color: var(--muted); font-size: 0.85rem; }

.board {
  display: flex; gap: 12px; overflow-x: auto; padding: 16px;
  align-items: flex-start; min-height: calc(100vh - 56px);
}
.column {
  flex: 0 0 300px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 70vh;
  display: flex; flex-direction: column;
}
.column.drag-over { outline: 1px dashed var(--accent); }
.column-head {
  padding: 12px 12px 8px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 0.85rem; font-weight: 600;
}
.column-head span.count {
  background: var(--card); border-radius: 999px; padding: 1px 8px; font-weight: 500;
}
.cards { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
}
.card:hover { background: var(--card-hover); }
.card .cover { width: 100%; height: 120px; object-fit: cover; display: block; background: #0a0c10; }
.card .body { padding: 10px 12px 12px; }
.card h3 { margin: 0 0 6px; font-size: 0.95rem; font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.75rem; color: var(--muted); }
.tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
}
.avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-2); color: #fff;
  display: inline-grid; place-items: center; font-size: 0.7rem; font-weight: 700;
}
.add-card {
  margin: 8px; width: auto;
  background: transparent; border: 1px dashed var(--line);
  color: var(--muted); border-radius: 8px; padding: 8px;
}

.drawer {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 20;
  display: flex; justify-content: flex-end;
}
.drawer-inner {
  width: min(520px, 100vw); background: var(--bg-2);
  border-left: 1px solid var(--line);
  height: 100%; overflow: auto; padding: 20px 22px 40px;
  position: relative;
}
.icon-btn {
  position: absolute; top: 10px; right: 12px;
  background: transparent; border: 0; font-size: 1.6rem; color: var(--muted); width: auto;
}
.drawer h2 { margin: 0 32px 8px 0; font-size: 1.2rem; }
.field { margin: 12px 0; }
.field label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
.files a { color: var(--accent); }
.comment { border-top: 1px solid var(--line); padding: 10px 0; font-size: 0.9rem; }
.check-item { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; font-size: 0.9rem; }
.check-item input { width: auto; margin-top: 3px; }
.progress { font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.cover-lg { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 30;
  display: grid; place-items: center;
}
.modal-card {
  width: min(440px, 92vw); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 20px;
}
.modal-card h3 { margin-top: 0; }
.user-list { list-style: none; padding: 0; margin: 12px 0; }
.user-list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
