:root {
  --bg: #0f0f0f;
  --panel: #1c1c1f;
  --panel-2: #26262b;
  --line: #34343a;
  --text: #f1f1f1;
  --muted: #a0a0a8;
  --accent: #ff0033;
  --accent-dim: #cc0029;
  --drop: #2d2d34;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 18px; margin: 0; font-weight: 600; }
.logo {
  display: inline-grid; place-items: center;
  width: 30px; height: 22px;
  background: var(--accent); color: #fff;
  border-radius: 6px; font-size: 12px;
}
.actions { display: flex; align-items: center; gap: 8px; }
.status { color: var(--muted); font-size: 13px; margin-right: 4px; }

.btn {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.btn:hover { background: #303036; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dim); }

/* Board / columns */
.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding: 16px;
  align-content: start;
  min-height: calc(100vh - 60px);
}
.welcome { grid-column: 1 / -1; }

.welcome { max-width: 560px; margin: 8vh auto; text-align: center; }
.welcome h2 { font-size: 26px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.column {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: auto;
  display: flex;
  flex-direction: column;
  height: calc((100vh - 92px) / 2 - 14px);  /* two equal rows fill the screen */
}
.column.dragover { outline: 2px dashed var(--accent); background: var(--drop); }
.column.unsorted { background: #16161a; }

.col-head {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.col-title {
  flex: 1; font-weight: 600; font-size: 15px;
  background: transparent; border: none; color: var(--text);
  padding: 4px; border-radius: 6px;
}
.col-title:focus { background: var(--panel-2); outline: 1px solid var(--line); }
.col-count { color: var(--muted); font-size: 12px; min-width: 22px; text-align: center; }
.col-btn {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 14px; padding: 2px 5px; border-radius: 5px;
}
.col-btn:hover { background: var(--panel-2); color: var(--text); }

.col-body {
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 40px;
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* old Edge/IE */
}
.col-body::-webkit-scrollbar { display: none; }  /* Chrome/Edge/Safari */

/* Channel card */
.card {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 8px;
  background: var(--panel-2);
  border: 1px solid transparent;
  border-radius: 7px;
  margin-bottom: 4px;
  cursor: grab;
}
.card:hover { border-color: var(--line); }
.card.dragging { opacity: .4; }
.card img { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 24px; background: #000; }
.card .name {
  flex: 1; font-size: 13px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.card a.open { color: var(--muted); text-decoration: none; font-size: 13px; padding: 0 4px; }
.card a.open:hover { color: var(--accent); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 10px; z-index: 50;
}
