/* PcVue Kanban — Industrial Control Panel Aesthetic */
/* Outfit (display) + IBM Plex Mono (data/labels) */
/* Palette: Navy #1e2249, Red #e63946, Black #0a0c14 */

[hidden] {
  display: none !important;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0c14;
  --bg-warm: #0d0f1a;
  --surface: #121522;
  --surface-raised: #181c30;
  --surface-hover: #1e2249;
  --border: #262b4a;
  --border-subtle: #1c2040;
  --text: #e4e6f0;
  --text-muted: #7a80a4;
  --text-dim: #4e5478;
  --accent: #e63946;
  --accent-glow: rgba(230, 57, 70, 0.15);
  --accent-hover: #ff4d5a;
  --accent-soft: rgba(230, 57, 70, 0.08);
  --navy: #1e2249;
  --navy-light: #2a3060;
  --col-backlog: #6366f1;
  --col-progress: #f59e0b;
  --col-review: #8b5cf6;
  --col-done: #22c55e;
  --danger: #ff3b3b;
  --danger-hover: #ff5555;
  --radius: 6px;
  --radius-lg: 10px;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Cascadia Code', monospace;
  --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%;
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== WELCOME SCREEN ========== */

.welcome {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Subtle grid background */
.welcome__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
}

.welcome__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-panel);
  animation: welcome-enter 0.5s ease-out;
}

@keyframes welcome-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.welcome__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
}

.welcome__chevron {
  width: 36px;
  height: 48px;
  filter: drop-shadow(0 0 8px rgba(230, 57, 70, 0.4));
}

.welcome__title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.welcome__title span {
  color: var(--accent);
}

.welcome__subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 28px;
}

/* Live status indicator */
.welcome__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.status-dot--live {
  background: var(--col-done);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(34, 197, 94, 0.6); }
  50% { opacity: 0.6; box-shadow: 0 0 16px rgba(34, 197, 94, 0.3); }
}

.welcome__status-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--col-done);
  letter-spacing: 0.12em;
}

.welcome__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.welcome__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin: 8px 0;
}

.welcome__divider::before,
.welcome__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.welcome__hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 8px;
}

/* ========== HEADER ========== */

.header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 56px;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__chevron {
  width: 18px;
  height: 24px;
  filter: drop-shadow(0 0 4px rgba(230, 57, 70, 0.3));
}

.header__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.header__title-sub {
  font-weight: 500;
  color: var(--text-muted);
}

.header__actions {
  flex: 1;
}

.header__auth {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.header__user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.header__name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.header__user {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.header__user:hover {
  background: var(--surface-raised);
}

.header__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-light);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  border: 2px solid var(--border);
}

/* Profile modal */
.profile__avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.profile__avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.profile__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-light);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
}

.profile__avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header__login {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ========== BOARD ========== */

.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 20px;
  height: calc(100vh - 56px);
  overflow: hidden;
}

.column {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 0;
}

.column__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-warm);
}

.column__indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.column__indicator--backlog { background: var(--col-backlog); box-shadow: 0 0 6px rgba(99, 102, 241, 0.4); }
.column__indicator--progress { background: var(--col-progress); box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.column__indicator--review { background: var(--col-review); box-shadow: 0 0 6px rgba(139, 92, 246, 0.4); }
.column__indicator--done { background: var(--col-done); box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }

.column__name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  flex: 1;
}

.column__count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg);
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

.column__cards {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.column__cards.drag-over {
  background: var(--accent-soft);
  outline: 1px dashed var(--accent);
  outline-offset: -4px;
}

/* ========== CARDS ========== */

.card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}

.card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}

.card:active {
  border-color: var(--accent);
}

.card.dragging {
  opacity: 0.35;
}

.card__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  word-break: break-word;
}

.card__archive {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition), border-color var(--transition);
  z-index: 1;
}

.card:hover .card__archive {
  opacity: 1;
}

.card__archive:hover {
  color: var(--col-done);
  border-color: var(--col-done);
}

.kiosk-mode .card__archive {
  display: none !important;
}

.card__title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card__assigned {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.card__assigned--none {
  background: var(--border);
  color: var(--text-dim);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.card__avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

/* Empty column placeholder */
.column__empty {
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 32px 8px;
  letter-spacing: 0.05em;
}

/* ========== DETAIL OVERLAY ========== */

.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 15, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 56px;
  z-index: 100;
}

.detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-panel);
  animation: panel-in 0.2s ease-out;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.detail__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.detail__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  flex: 1;
  word-break: break-word;
  line-height: 1.3;
}

.detail__close {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  border-radius: var(--radius);
  transition: all var(--transition);
  margin-left: 12px;
  flex-shrink: 0;
}

.detail__close:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--accent);
}

.detail__description {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail__description--empty {
  color: var(--text-dim);
  font-style: italic;
}

.detail__meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail__assign {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.detail__assign-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail__assign .form-input--small {
  width: 180px;
}

.detail__actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

/* Edit form in detail panel */
.detail__edit-form {
  margin-bottom: 16px;
}

.detail__edit-form .form-label {
  margin-bottom: 12px;
}

/* ========== CARD IMAGES (board thumbnails) ========== */

.card__images {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  overflow: hidden;
}

.card__thumb {
  width: 100%;
  height: 64px;
  object-fit: cover;
  flex: 1;
  min-width: 0;
}

.card__images-more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  background: var(--bg);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.card__attach-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

/* ========== ATTACHMENTS (detail panel) ========== */

.attachments {
  margin-bottom: 16px;
}

.attachments__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.attachments__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.attachments__item {
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}

.attachments__item--image .attachments__preview {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.attachments__info {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.attachments__name {
  font-size: 0.7rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachments__size {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
}

.attachments__item--file {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.attachments__file-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.75rem;
  word-break: break-all;
}

.attachments__file-link:hover {
  color: var(--accent-hover);
}

.attachments__delete {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(10, 12, 20, 0.8);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
  z-index: 1;
}

.attachments__item:hover .attachments__delete {
  opacity: 1;
}

.attachments__delete:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.attachments__upload {
  margin-top: 8px;
  margin-bottom: 16px;
}

.btn--upload {
  cursor: pointer;
}

/* ========== NEW CARD FILE LIST ========== */

.nc-file-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.nc-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  font-size: 0.75rem;
}

.nc-file-thumb {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.nc-file-icon {
  flex-shrink: 0;
  color: var(--text-dim);
}

.nc-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.nc-file-size {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.nc-file-label {
  font-size: 0.8rem;
}

/* ========== COMMENTS ========== */

.comments {
  margin-bottom: 16px;
}

.comments__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.comments__item {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  position: relative;
}

.comments__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comments__user {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.comments__time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

.comments__edit,
.comments__delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
}

.comments__edit {
  margin-left: auto;
}

.comments__delete {
  margin-left: 0;
}

.comments__item:hover .comments__edit,
.comments__item:hover .comments__delete {
  opacity: 1;
}

.comments__edit:hover {
  color: var(--accent);
}

.comments__delete:hover {
  color: var(--danger);
}

.comments__images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.comments__img {
  max-width: 200px;
  max-height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color var(--transition);
}

.comments__img:hover {
  border-color: var(--accent);
}

.comments__form-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comments__form-actions {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.comments__img-btn {
  cursor: pointer;
  padding: 8px;
}

.comments__file-preview {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.comments__preview-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

.comments__edit-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comments__edit-actions {
  display: flex;
  gap: 6px;
}

.comments__body {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.comments__form-wrap {
  margin-bottom: 16px;
  padding-top: 8px;
}

.comments__form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.comments__input {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: vertical;
}

.btn--small {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.mention {
  color: var(--accent);
  font-weight: 600;
}

.card-tag {
  color: var(--col-backlog);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.85em;
  text-decoration: none;
  cursor: pointer;
}

.card-tag:hover {
  text-decoration: underline;
}

.mention-item__id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--col-backlog);
  min-width: 32px;
}

/* ========== MENTION AUTOCOMPLETE ========== */

.mention-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  z-index: 10;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 4px;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background var(--transition);
}

.mention-item:hover,
.mention-item--active {
  background: var(--surface-hover);
}

.mention-item__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.mention-item__email {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

/* ========== ACTIVITY LOG ========== */

.activity__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.activity__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity__item {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.activity__item:last-child {
  border-bottom: none;
}

.activity__action {
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
}

.activity__user {
  color: var(--accent);
}

.activity__time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ========== BUTTONS ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn__icon {
  flex-shrink: 0;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.25);
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.35);
}

.btn--primary:active {
  transform: scale(0.97);
}

.btn--secondary {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: var(--surface-hover);
  border-color: var(--navy-light);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
}

.btn--danger:hover {
  background: var(--danger-hover);
}

.btn--danger:active {
  transform: scale(0.97);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--border);
}

.btn--link {
  background: none;
  color: var(--accent);
  padding: 4px 8px;
}

.btn--link:hover {
  color: var(--accent-hover);
}

.btn--large {
  padding: 14px 24px;
  font-size: 0.95rem;
}

.btn--full {
  width: 100%;
}

/* Auth controls visibility */
.guest .auth-only {
  display: none !important;
}

/* ========== MODAL ========== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 15, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 80px;
  z-index: 200;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  width: 440px;
  max-width: 90vw;
  box-shadow: var(--shadow-panel);
  animation: panel-in 0.2s ease-out;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.modal__close {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 10px;
  border-radius: var(--radius);
  line-height: 1;
  transition: all var(--transition);
}

.modal__close:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--accent);
}

.modal__body,
.modal form {
  padding: 20px 24px 24px;
}

.modal__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* ========== FORMS ========== */

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.form-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-input--small {
  padding: 6px 10px;
  font-size: 0.8rem;
  width: 200px;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-display);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237a80a4' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ========== CONNECTION STATUS ========== */

.connection-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 10px;
}

.connection-status--connected {
  color: var(--col-done);
}

.connection-status--reconnecting {
  color: var(--col-progress);
}

/* ========== TOAST ========== */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--accent);
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.85rem;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.3s ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== SCROLLBAR ========== */

.column__cards::-webkit-scrollbar {
  width: 5px;
}

.column__cards::-webkit-scrollbar-track {
  background: transparent;
}

.column__cards::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.column__cards::-webkit-scrollbar-thumb:hover {
  background: var(--navy-light);
}

/* ========== QR WIDGET ========== */

.qr-widget {
  position: fixed;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  z-index: 50;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.qr-widget:hover {
  opacity: 1;
}

.qr-widget__code img {
  display: block;
  width: 96px;
  height: 96px;
}

.qr-widget__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.qr-widget__kiosk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 5px 10px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition);
}

.qr-widget__kiosk:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--accent);
}

/* ========== KIOSK MODE ========== */

.kiosk-mode {
  cursor: none !important;
  user-select: none;
  -webkit-user-select: none;
}

.kiosk-mode * {
  cursor: none !important;
}

.kiosk-mode .header__auth {
  display: none;
}

.kiosk-mode .card {
  cursor: none !important;
}

/* Kiosk status bar */
.kiosk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 28px;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.kiosk-bar__left,
.kiosk-bar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.kiosk-bar__clock {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.7rem;
}

.kiosk-bar__refresh {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kiosk-bar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--col-done);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* Adjust board height when kiosk bar is present */
.kiosk-mode .board {
  height: calc(100vh - 56px - 28px);
}

/* Auto-scroll animation for overflowing columns */
.column__cards--autoscroll {
  animation: kiosk-scroll var(--scroll-duration, 20s) linear infinite alternate;
}

@keyframes kiosk-scroll {
  0% { transform: translateY(0); }
  10% { transform: translateY(0); }
  90% { transform: translateY(var(--scroll-distance, 0px)); }
  100% { transform: translateY(var(--scroll-distance, 0px)); }
}

/* ========== UTILITIES ========== */

::selection {
  background: var(--accent);
  color: #fff;
}
