/* ============================================================
   Taskflow — Trello Clone  |  Design System & Styles
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Background */
  --bg-body: #050505;
  --bg-header: rgba(0, 0, 0, .92);
  --bg-board: #0a0a0a;
  --bg-list: rgba(255, 255, 255, .04);
  --bg-list-hover: rgba(255, 255, 255, .06);
  --bg-card: rgba(255, 255, 255, .06);
  --bg-card-hover: rgba(255, 255, 255, .1);
  --bg-input: rgba(255, 255, 255, .08);
  --bg-modal: rgba(10, 10, 10, .98);
  --bg-overlay: rgba(0, 0, 0, .75);
  --bg-confirm: rgba(10, 10, 10, .98);
  --bg-sidebar: rgba(8, 8, 8, .98);


  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, .6);
  --text-muted: rgba(255, 255, 255, .35);
  --text-placeholder: rgba(255, 255, 255, .25);
  --text-accent: #a7db28;

  /* Accent (Cheeeeese Lime Green) */
  --accent: #a7db28;
  --accent-hover: #bcf235;
  --accent-glow: rgba(167, 219, 40, .35);
  --danger: #e84393;
  --danger-hover: #d63384;

  /* Borders */
  --border-light: rgba(255, 255, 255, .1);
  --border-focus: var(--accent);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, .22);
  --shadow-list: 0 4px 24px rgba(0, 0, 0, .18);
  --shadow-modal: 0 16px 64px rgba(0, 0, 0, .45);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --duration: .22s;

  /* Sizes */
  --header-h: 56px;
  --list-w: 300px;
  --scrollbar-w: 6px;
  --sidebar-w: 280px;
}

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

html,
body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: var(--scrollbar-w);
  height: var(--scrollbar-w);
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .22);
}

/* ---------- Utility ---------- */
.hidden {
  display: none !important;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-header);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
}

.header__left,
.header__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__center {
  flex: 1;
  max-width: 420px;
  margin: 0 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: default;
  user-select: none;
}

.logo__icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.logo__text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--accent), #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-tag {
  font-size: .6rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2px 8px;
  letter-spacing: .03em;
  margin-left: 4px;
  user-select: none;
}

/* Search */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: border var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.search-box__icon {
  position: absolute;
  left: 10px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box__input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font: inherit;
  font-size: .875rem;
}

.search-box__input::placeholder {
  color: var(--text-placeholder);
}

/* Sidebar toggle */
.sidebar-toggle {
  flex-shrink: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-right: 1px solid var(--border-light);
  z-index: 95;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .3s var(--ease);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 10px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.sidebar__close svg {
  width: 16px;
  height: 16px;
}

/* Sidebar sections */
.sidebar__section {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border-light);
}

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

.sidebar__section-title {
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  cursor: pointer;
  user-select: none;
  transition: color var(--duration) var(--ease);
}

.sidebar__section-title:hover {
  color: var(--text-primary);
}

.sidebar__section-arrow {
  font-size: .55rem;
  transition: transform .25s var(--ease);
  display: inline-block;
  line-height: 1;
}

.sidebar__section.collapsed .sidebar__section-arrow {
  transform: rotate(-90deg);
}

.sidebar__section-body {
  overflow: hidden;
  transition: max-height .3s var(--ease), opacity .25s var(--ease);
  max-height: 600px;
  opacity: 1;
}

.sidebar__section.collapsed .sidebar__section-body {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.sidebar__section.collapsed .sidebar__section-title {
  margin-bottom: 0;
}

/* Sidebar list items */
.sidebar__list-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.sidebar__list-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background var(--duration) var(--ease);
  cursor: default;
}

.sidebar__list-item:hover {
  background: rgba(255, 255, 255, .06);
}

.sidebar__list-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar__list-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__list-item-name {
  cursor: default;
}

.sidebar__list-tags {
  display: flex;
  gap: 4px;
  padding-left: 2px;
}

.sidebar__list-tag {
  font-size: .6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s var(--ease);
}

.sidebar__list-tag:hover {
  border-color: rgba(255, 255, 255, .25);
  color: var(--text-primary);
}

.sidebar__list-tag--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sidebar__list-item-city {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, .1);
}

.sidebar__city-input {
  width: 100%;
  padding: 4px 8px;
  font-size: .75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--duration) var(--ease);
  text-transform: uppercase;
}

.sidebar__city-input:focus {
  border-color: var(--accent);
}

.sidebar__list-item-count {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 600;
  background: rgba(255, 255, 255, .07);
  padding: 2px 7px;
  border-radius: 99px;
  margin-left: 8px;
}

/* Sidebar user list */
.sidebar__user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 260px;
  overflow-y: auto;
}

.sidebar__user-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  transition: background var(--duration) var(--ease);
}

.sidebar__user-item:hover {
  background: rgba(255, 255, 255, .06);
}

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

.sidebar__user-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 42px;
}

.sidebar__user-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .65rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .05);
  padding: 2px 8px;
  border-radius: 99px;
}

.sidebar__user-stat-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__user-stat-count {
  font-weight: 700;
  color: var(--accent);
  font-size: .6rem;
}

.sidebar__user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
  text-transform: uppercase;
}

.sidebar__user-avatar:hover {
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(255, 255, 255, .2);
}

.sidebar__user-name {
  flex: 1;
  font-size: .84rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__user-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  flex-shrink: 0;
}

.sidebar__user-delete:hover {
  background: rgba(232, 67, 147, .15);
  color: var(--danger);
}

.sidebar__user-delete svg {
  width: 14px;
  height: 14px;
}

/* Sidebar marca list */
.sidebar__marca-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  max-height: 220px;
  overflow-y: auto;
}

.sidebar__marca-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  transition: background var(--duration) var(--ease);
}

.sidebar__marca-item:hover {
  background: rgba(255, 255, 255, .06);
}

.sidebar__marca-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}

.sidebar__marca-color:hover {
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(255, 255, 255, .2);
}

.sidebar__marca-name {
  flex: 1;
  font-size: .82rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__marca-count {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 600;
  background: rgba(255, 255, 255, .07);
  padding: 2px 7px;
  border-radius: 99px;
}

.sidebar__marca-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  flex-shrink: 0;
}

.sidebar__marca-delete:hover {
  background: rgba(232, 67, 147, .15);
  color: var(--danger);
}

.sidebar__marca-delete svg {
  width: 13px;
  height: 13px;
}

/* Sidebar add form */
.sidebar__add-form {
  display: flex;
  gap: 6px;
}

.sidebar__input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font: inherit;
  font-size: .82rem;
  outline: none;
  transition: border var(--duration) var(--ease);
  min-width: 0;
}

.sidebar__input:focus {
  border-color: var(--accent);
}

/* Sidebar inline edit (double-click rename) */
.sidebar__inline-edit {
  flex: 1;
  padding: 4px 8px;
  background: var(--bg-input);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font: inherit;
  font-size: .82rem;
  outline: none;
  min-width: 0;
}

/* Sidebar backdrop */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 94;
  animation: overlayIn .2s var(--ease) both;
}

/* ============================================================
   BOARD HEADER
   ============================================================ */
.board-header {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  padding: 18px 28px 10px;
  z-index: 90;
  background: linear-gradient(180deg, var(--bg-body) 60%, transparent);
  transition: left .3s var(--ease);
}

.board-header__title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.02em;
  outline: none;
  border-bottom: 2px solid transparent;
  transition: border var(--duration) var(--ease);
  display: inline-block;
  min-width: 40px;
  color: var(--text-accent);
}

.board-header__title:focus {
  border-color: var(--accent);
}

/* ============================================================
   BOARD (horizontal list scroller)
   ============================================================ */
.board {
  position: absolute;
  top: calc(var(--header-h) + 58px);
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 24px 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  transition: left .3s var(--ease);
}

/* Shift board when sidebar is open (desktop) */
body.sidebar-open .board,
body.sidebar-open .board-header {
  left: var(--sidebar-w);
}

/* ============================================================
   LIST
   ============================================================ */
.list {
  flex: 0 0 var(--list-w);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-list);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-list);
  transition: background var(--duration) var(--ease);
  animation: listIn .35s var(--ease) both;
}

.list:hover {
  background: var(--bg-list-hover);
}

@keyframes listIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* List header */
.list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 8px;
  gap: 8px;
}

.list__drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 4px;
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
  user-select: none;
}

.list__drag-handle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, .08);
}

.list__drag-handle:active {
  cursor: grabbing;
}

/* List dragging states */
.list--dragging {
  opacity: .4;
  transform: rotate(1deg) scale(.97);
}

.list--drag-over {
  border-left: 3px solid var(--accent);
  box-shadow: -4px 0 12px rgba(108, 92, 231, .25);
}

.list__title {
  flex: 1;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: -.01em;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  transition: border var(--duration) var(--ease);
  padding: 2px 4px;
  border-radius: 4px;
}

.list__title:focus {
  border-color: var(--accent);
}

.list__menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.list__menu-btn:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--text-primary);
}

/* Cards container */
.list__cards {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 4px;
  min-height: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Drop zone feedback */
.list__cards.drag-over {
  background: rgba(108, 92, 231, .06);
  border-radius: var(--radius-sm);
}

/* List footer */
.list__footer {
  padding: 8px 10px 12px;
}

.add-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.add-card-btn svg {
  width: 16px;
  height: 16px;
}

.add-card-btn:hover {
  background: rgba(255, 255, 255, .07);
  color: var(--text-primary);
}

/* Add card form */
.add-card-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.add-card-form textarea {
  width: 100%;
  padding: 10px 12px;
  min-height: 64px;
  resize: none;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: .84rem;
  outline: none;
  transition: border var(--duration) var(--ease);
}

.add-card-form textarea:focus {
  border-color: var(--accent);
}

.add-card-form__actions {
  display: flex;
  gap: 6px;
}

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: grab;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
  animation: cardIn .3s var(--ease) both;
  user-select: none;
  position: relative;
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.card:active {
  cursor: grabbing;
}

.card.dragging {
  opacity: .45;
  transform: rotate(2deg) scale(.96);
}

.card.drag-placeholder {
  border: 2px dashed var(--accent);
  background: rgba(108, 92, 231, .08);
  min-height: 48px;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card__marca {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
  margin-right: 4px;
}

.card__priority {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .6rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 6px;
  opacity: .9;
}

.card__title {
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: .72rem;
  color: var(--text-muted);
}

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

.card__due svg {
  width: 13px;
  height: 13px;
}

.card__due.overdue {
  color: var(--danger);
}

.card__desc-indicator {
  display: flex;
  align-items: center;
  gap: 3px;
}

.card__desc-indicator svg {
  width: 13px;
  height: 13px;
}

/* Card assignees */
.card__assignees {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

.card__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid var(--bg-card);
  margin-left: -6px;
  text-transform: uppercase;
  transition: transform .15s var(--ease);
  flex-shrink: 0;
  cursor: default;
}

.card__avatar:first-child {
  margin-left: 0;
}

.card__avatar:hover {
  transform: scale(1.18);
  z-index: 1;
}

/* Card match/filter */
.card--dimmed {
  opacity: .2;
  pointer-events: none;
}

/* ============================================================
   ADD-LIST PLACEHOLDER
   ============================================================ */
.add-list {
  flex: 0 0 var(--list-w);
}

.add-list__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .04);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

.add-list__btn svg {
  width: 18px;
  height: 18px;
}

.add-list__btn:hover {
  background: rgba(255, 255, 255, .07);
  border-color: var(--accent);
  color: var(--text-primary);
}

.add-list__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-list);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
}

.add-list__input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: .88rem;
  outline: none;
  transition: border var(--duration) var(--ease);
}

.add-list__input:focus {
  border-color: var(--accent);
}

.add-list__actions {
  display: flex;
  gap: 6px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--duration) var(--ease), transform .12s var(--ease);
}

.btn:active {
  transform: scale(.96);
}

.btn--sm {
  padding: 6px 14px;
  font-size: .8rem;
}

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

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

.btn--danger {
  background: rgba(232, 67, 147, .15);
  color: var(--danger);
}

.btn--danger:hover {
  background: rgba(232, 67, 147, .25);
}

.btn--ghost {
  background: none;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  color: var(--text-primary);
}

.btn--icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  padding: 0;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.btn--icon svg {
  width: 18px;
  height: 18px;
}

.btn--icon:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--text-primary);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: overlayIn .25s var(--ease) both;
}

@keyframes overlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  width: 92%;
  max-width: 520px;
  background: var(--bg-modal);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  padding: 28px 28px 20px;
  position: relative;
  animation: modalIn .3s var(--ease) both;
}

.modal--sm {
  max-width: 360px;
  padding: 24px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.modal__close svg {
  width: 18px;
  height: 18px;
}

.modal__close:hover {
  background: rgba(255, 255, 255, .08);
  color: var(--text-primary);
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.modal__label {
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
}

.modal__input,
.modal__textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: .88rem;
  outline: none;
  transition: border var(--duration) var(--ease);
}

.modal__input:focus,
.modal__textarea:focus {
  border-color: var(--accent);
}

.modal__textarea {
  resize: vertical;
  min-height: 90px;
}

.modal__input--date {
  cursor: pointer;
  color-scheme: dark;
}

/* Marca picker (radio) */
.modal__marca-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}

.modal__marca-radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}

.modal__marca-radio-row:hover {
  background: rgba(255, 255, 255, .07);
}

.modal__marca-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.modal__marca-radio:checked {
  border-color: var(--accent);
}

.modal__marca-radio:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.modal__marca-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
}

.modal__marca-radio-name {
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.modal__marca-none {
  color: var(--text-muted);
  font-style: italic;
  font-size: .78rem;
}

/* Priority picker */
.modal__priority-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal__priority-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background var(--duration) var(--ease);
}

.modal__priority-opt:hover {
  background: rgba(255, 255, 255, .07);
}

.modal__priority-opt input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color .2s var(--ease);
}

.modal__priority-opt input[type="radio"]:checked {
  border-color: var(--accent);
}

.modal__priority-opt input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.modal__priority-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.modal__priority-dot--none {
  border: 2px dashed rgba(255, 255, 255, .2);
  background: transparent;
}

.modal__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

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

/* ---- User checklist in card modal ---- */
.modal__user-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.modal__user-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}

.modal__user-check-row:hover {
  background: rgba(255, 255, 255, .07);
}

.modal__user-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.modal__user-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.modal__user-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.modal__user-checkbox:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal__user-check-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  flex-shrink: 0;
}

.modal__user-check-name {
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.modal__user-check-none {
  color: var(--text-muted);
  font-style: italic;
  font-size: .78rem;
}

/* ---- User color picker ---- */
.user-color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.user-color-opt {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.user-color-opt:hover {
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(255, 255, 255, .2);
}

.user-color-opt.selected {
  border-color: #fff;
  transform: scale(1.12);
}

/* ============================================================
   CONFIRM DIALOG
   ============================================================ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: overlayIn .2s var(--ease) both;
}

.confirm-dialog {
  background: var(--bg-confirm);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  max-width: 380px;
  width: 90%;
  box-shadow: var(--shadow-modal);
  animation: modalIn .25s var(--ease) both;
}

.confirm-dialog__msg {
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: 18px;
  line-height: 1.5;
}

.confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --list-w: 260px;
    --header-h: 50px;
    --sidebar-w: 260px;
  }

  .header__center {
    max-width: 200px;
    margin: 0 10px;
  }

  .board {
    padding: 8px 12px 16px;
    gap: 12px;
  }

  .board-header {
    padding: 14px 16px 8px;
  }

  .board-header__title {
    font-size: 1.2rem;
  }

  .modal {
    padding: 20px;
  }

  /* On mobile, sidebar overlays instead of pushing */
  body.sidebar-open .board,
  body.sidebar-open .board-header {
    left: 0;
  }
}

/* ============================================================
   AUTH SCREEN
   ============================================================ */
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  z-index: 9999;
}

.auth-container {
  width: 100%;
  max-width: 380px;
  padding: 40px 32px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  text-align: center;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-logo .logo__icon {
  color: var(--accent);
}

.auth-logo__text {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--accent), #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.auth-box__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: .9rem;
  outline: none;
  transition: border var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

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

.auth-error {
  font-size: .8rem;
  color: var(--danger);
  min-height: 1.2em;
  margin: 0;
}

.auth-submit {
  margin-top: 4px;
}

.btn--lg {
  padding: 12px 24px;
  font-size: .95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.auth-switch {
  margin-top: 20px;
  font-size: .82rem;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--duration) var(--ease);
}

.auth-switch a:hover {
  color: var(--accent-hover);
}

/* Set-password hint text */
.auth-hint {
  font-size: .82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.auth-input[readonly] {
  opacity: .6;
  cursor: not-allowed;
}

/* Sidebar user form with two inputs */
.sidebar__add-form--user {
  display: flex;
  flex-direction: column;
  gap: 6px;
}