/* ── Layout ────────────────────────────────────────────────────────────────── */

.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  position: relative;
  z-index: 1;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.app-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  height: 56px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--horizon-border);
  background: rgba(5, 9, 31, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 100;
}

.app-header__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.app-header__logo-mark {
  width: 28px;
  height: 28px;
}

.app-header__logo-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--horizon-text-bright);
  letter-spacing: -0.01em;
}

.app-header__boards {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  overflow-x: auto;
  padding: 0 0.5rem;
  scrollbar-width: none;
}
.app-header__boards::-webkit-scrollbar { display: none; }

.board-tab {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--horizon-text-dim);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}
.board-tab:hover {
  color: var(--horizon-text);
  background: var(--horizon-bg-hover);
}
.board-tab.is-active {
  color: var(--horizon-text-bright);
  background: rgba(3, 161, 239, 0.08);
  border-color: var(--horizon-accent-dim);
  box-shadow: 0 0 0 1px rgba(3,161,239,0.24);
}
.board-tab__delete {
  display: none;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--horizon-text-dim);
  padding: 1px;
  border-radius: 3px;
  line-height: 1;
}
.board-tab:hover .board-tab__delete { display: flex; }
.board-tab__delete:hover { color: var(--horizon-warm); }

.btn--new-board {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--horizon-border);
  background: transparent;
  color: var(--horizon-text-dim);
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}
.btn--new-board:hover {
  color: var(--horizon-text);
  border-color: var(--horizon-border-strong);
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
}

.app-header__user {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--horizon-soft);
}

.btn--logout {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--horizon-text-dim);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.btn--logout:hover {
  color: var(--horizon-warm);
  background: rgba(228,111,113,0.06);
}

/* ── Filter button + badge ────────────────────────────────────────────────── */

#filter-btn { position: relative; }
#filter-btn.has-active {
  border-style: solid;
  border-color: var(--horizon-accent-dim);
  color: var(--horizon-accent-bright);
  background: rgba(3, 161, 239, 0.08);
  box-shadow: 0 0 0 1px rgba(3, 161, 239, 0.24);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--horizon-accent);
  color: #001523;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  margin-left: 0.35rem;
  line-height: 1;
}

/* ── Filter banner (active state indicator) ──────────────────────────────── */

.filter-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg,
    rgba(3, 161, 239, 0.10) 0%,
    rgba(19, 26, 56, 0.7) 45%,
    rgba(13, 18, 41, 0.85) 100%);
  border-bottom: 1px solid var(--horizon-accent-dim);
  box-shadow: 0 0 0 1px rgba(3,161,239,0.12), 0 0 32px rgba(3,161,239,0.18);
  z-index: 50;
  overflow: hidden;
  animation: horizon-pulse-banner 3s ease-in-out infinite;
}

.filter-banner[hidden] { display: none !important; }

.filter-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--horizon-accent), transparent);
  box-shadow: 0 0 14px var(--horizon-accent);
}

@keyframes horizon-pulse-banner {
  0%, 100% { box-shadow: 0 0 0 1px rgba(3,161,239,0.12), 0 0 32px rgba(3,161,239,0.18); }
  50%      { box-shadow: 0 0 0 1px rgba(3,161,239,0.24), 0 0 48px rgba(3,161,239,0.32); }
}

.filter-banner__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--horizon-accent-bright);
  flex-shrink: 0;
}

.filter-banner__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(3, 161, 239, 0.08);
  border: 1px solid var(--horizon-accent-dim);
  color: var(--horizon-text-bright);
  font-size: 0.78rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover { background: rgba(3, 161, 239, 0.18); }

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

.filter-chip__x {
  opacity: 0.6;
  font-size: 0.9rem;
  line-height: 1;
  padding-left: 0.1rem;
}
.filter-chip:hover .filter-chip__x { opacity: 1; }

.filter-banner__clear {
  flex-shrink: 0;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
}

/* ── Filter panel (overlay) ──────────────────────────────────────────────── */

.filter-section {
  margin-bottom: 1.25rem;
}
.filter-section:last-child { margin-bottom: 0; }

.filter-section__title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--horizon-soft);
  margin-bottom: 0.6rem;
}

.filter-section__options {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.875rem;
  color: var(--horizon-text);
  user-select: none;
}
.filter-option:hover { background: var(--horizon-bg-hover); }

.filter-option__checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--horizon-accent);
  flex-shrink: 0;
  cursor: pointer;
}

.filter-option__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-empty {
  color: var(--horizon-text-dim);
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
}

/* ── Board area ────────────────────────────────────────────────────────────── */

.board-area {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.board-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex: 1;
  color: var(--horizon-text-dim);
  text-align: center;
  padding: 3rem;
}
.board-empty__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--horizon-text);
}
.board-empty__sub {
  font-size: 0.9rem;
  max-width: 320px;
}

/* ── Lists ─────────────────────────────────────────────────────────────────── */

.list {
  flex-shrink: 0;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(13, 18, 41, 0.75);
  border: 1px solid var(--horizon-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-height: calc(100vh - 56px - 3rem);
  max-height: calc(100dvh - 56px - 3rem);
  overflow: hidden;
  position: relative;
}

.list::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--horizon-accent) 50%, transparent 100%);
  opacity: 0.25;
  transition: opacity 0.3s ease;
}

.list__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem 0.75rem;
  flex-shrink: 0;
}

.list__title {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--horizon-text-bright);
  cursor: text;
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.4rem;
  margin: -0.2rem -0.4rem;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  outline: none;
  word-break: break-word;
}
.list__title:focus {
  border-color: var(--horizon-accent);
  background: var(--horizon-bg-overlay);
  box-shadow: 0 0 0 3px rgba(3,161,239,0.1);
}

.list__count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--horizon-text-whisper);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.list__menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--horizon-text-dim);
  padding: 0.2rem 0.3rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  line-height: 1;
  font-size: 1.1rem;
}
.list__menu-btn:hover {
  color: var(--horizon-text);
  background: var(--horizon-bg-hover);
}

.list__cards {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.list__add-card {
  padding: 0.5rem 0.625rem 0.75rem;
  flex-shrink: 0;
}

.add-card-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: var(--horizon-bg-overlay);
  border: 1px solid var(--horizon-border);
  border-radius: var(--radius-md);
  color: var(--horizon-text-bright);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: none;
}
.add-card-input.is-open { display: block; }
.add-card-input:focus {
  border-color: var(--horizon-accent);
  box-shadow: 0 0 0 3px rgba(3,161,239,0.1);
}

.btn--add-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.5rem;
  background: transparent;
  border: none;
  color: var(--horizon-text-dim);
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  font-family: var(--font-sans);
}
.btn--add-card:hover {
  color: var(--horizon-text);
  background: var(--horizon-bg-hover);
}
.btn--add-card.is-hidden { display: none; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */

.kanban-card {
  flex-shrink: 0;
  background: linear-gradient(180deg,
    rgba(19, 26, 56, 0.7) 0%,
    rgba(13, 18, 41, 0.9) 100%);
  border: 1px solid var(--horizon-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.875rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.kanban-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0.875rem;
  right: 0.875rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--horizon-accent), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.kanban-card:hover {
  border-color: var(--horizon-border-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.5);
}
.kanban-card:hover::before { opacity: 0.6; }

.kanban-card__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.label-chip {
  display: inline-flex;
  align-items: center;
  height: 6px;
  width: 32px;
  border-radius: 3px;
  flex-shrink: 0;
}
.label-chip--full {
  height: auto;
  width: auto;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  color: rgba(5, 9, 31, 0.9);
}

.kanban-card__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--horizon-text-bright);
  line-height: 1.4;
  word-break: break-word;
}

.kanban-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--horizon-text-dim);
  letter-spacing: 0.04em;
}
.card-meta-item--due-soon { color: var(--label-yellow); }
.card-meta-item--overdue { color: var(--horizon-warm); }
.card-meta-item--done { color: var(--horizon-success); }

/* Drag ghost */
.kanban-card.sortable-ghost {
  opacity: 0.35;
  border-style: dashed;
}
.kanban-card.sortable-drag {
  opacity: 0.95;
  box-shadow: 0 24px 60px -10px rgba(0,0,0,0.7);
  transform: rotate(1.5deg);
}

/* ── Add list ──────────────────────────────────────────────────────────────── */

.add-list-btn {
  flex-shrink: 0;
  width: 240px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(13, 18, 41, 0.4);
  border: 1px dashed var(--horizon-border);
  border-radius: var(--radius-lg);
  color: var(--horizon-text-dim);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  align-self: flex-start;
}
.add-list-btn:hover {
  background: rgba(13, 18, 41, 0.7);
  border-color: var(--horizon-border-strong);
  color: var(--horizon-text);
}

/* ── Modal ─────────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5, 9, 31, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
  animation: horizon-fade-up 0.25s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: linear-gradient(180deg,
    rgba(19, 26, 56, 0.95) 0%,
    rgba(13, 18, 41, 0.98) 100%);
  border: 1px solid var(--horizon-border);
  border-radius: var(--radius-xl);
  padding: 2rem 2rem 1.75rem;
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  animation: horizon-pop-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 2px;
  background: var(--horizon-accent);
  box-shadow: 0 0 18px var(--horizon-accent), 0 0 40px rgba(3,161,239,0.55);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--horizon-text-dim);
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  line-height: 1;
  font-size: 1.2rem;
}
.modal__close:hover { color: var(--horizon-text); background: var(--horizon-bg-hover); }

.modal__title-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--horizon-text-bright);
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-sans);
  outline: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--horizon-border);
  border-radius: 0;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}
.modal__title-input:focus { border-color: var(--horizon-accent); }

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal__section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--horizon-soft);
  margin-bottom: 0.5rem;
}

/* Description tabs */
.desc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--horizon-border);
  margin-bottom: 0.75rem;
}
.desc-tab {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  color: var(--horizon-text-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.desc-tab.is-active {
  color: var(--horizon-accent);
  border-color: var(--horizon-accent);
}

.desc-preview {
  min-height: 80px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--horizon-text);
}
.desc-preview h1,.desc-preview h2,.desc-preview h3 {
  font-family: var(--font-display);
  color: var(--horizon-text-bright);
  margin: 0.75rem 0 0.35rem;
}
.desc-preview p { margin: 0.4rem 0; }
.desc-preview code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--horizon-bg-overlay);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--horizon-accent-bright);
}
.desc-preview a { color: var(--horizon-accent); }
.desc-preview ul,.desc-preview ol { padding-left: 1.5rem; }

/* Labels in modal */
.modal__labels-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal-label-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-sans);
  transition: all 0.15s;
  background: transparent;
  color: var(--horizon-text-dim);
  border-color: var(--horizon-border);
}
.modal-label-btn.is-active {
  color: rgba(5, 9, 31, 0.9);
  border-color: transparent;
}
.modal-label-btn:hover { opacity: 0.85; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 0.4rem; }

.checklist__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.checklist__item:hover {
  background: var(--horizon-bg-hover);
}

.checklist__checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--horizon-accent);
  flex-shrink: 0;
  cursor: pointer;
}

.checklist__text {
  flex: 1;
  font-size: 0.875rem;
  color: var(--horizon-text);
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  cursor: text;
  padding: 0;
}
.checklist__text--done {
  text-decoration: line-through;
  color: var(--horizon-text-dim);
}

.checklist__delete {
  opacity: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--horizon-text-dim);
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  font-size: 0.9rem;
  line-height: 1;
  transition: all 0.15s;
}
.checklist__item:hover .checklist__delete { opacity: 1; }
.checklist__delete:hover { color: var(--horizon-warm); }

.checklist__progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.checklist__bar {
  flex: 1;
  height: 4px;
  background: var(--horizon-border);
  border-radius: 2px;
  overflow: hidden;
}
.checklist__bar-fill {
  height: 100%;
  background: var(--horizon-accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.checklist__bar-fill--done { background: var(--horizon-success); }

.checklist__add-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.checklist__add-input {
  flex: 1;
  padding: 0.45rem 0.6rem;
  background: var(--horizon-bg-overlay);
  border: 1px solid var(--horizon-border);
  border-radius: var(--radius-sm);
  color: var(--horizon-text-bright);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
}
.checklist__add-input:focus { border-color: var(--horizon-accent); }

/* Modal footer */
.modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  margin-top: 0.5rem;
  border-top: 1px dashed var(--horizon-border);
}

/* Label manager panel */
.label-manager {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(5, 9, 31, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.label-manager__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(19,26,56,0.97) 0%, rgba(13,18,41,0.99) 100%);
  border: 1px solid var(--horizon-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.label-manager__panel::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 68px; height: 2px;
  background: var(--horizon-accent);
  box-shadow: 0 0 18px var(--horizon-accent), 0 0 40px rgba(3,161,239,0.55);
}

/* New board modal */
.new-board-panel {
  max-width: 480px;
}
.new-board-section.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.new-board-labels-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem 0;
}

/* Confirm dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(5, 9, 31, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.confirm-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, rgba(19,26,56,0.97) 0%, rgba(13,18,41,0.99) 100%);
  border: 1px solid var(--horizon-border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem 1.5rem;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  text-align: center;
}
.confirm-box::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 68px; height: 2px;
  background: var(--horizon-warm);
  box-shadow: 0 0 18px var(--horizon-warm), 0 0 40px rgba(228,111,113,0.4);
}
.confirm-box__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--horizon-text-bright);
  margin-bottom: 0.5rem;
}
.confirm-box__text { color: var(--horizon-text-dim); font-size: 0.875rem; margin-bottom: 1.5rem; }
.confirm-box__actions { display: flex; gap: 0.75rem; justify-content: center; }

/* ── Login page ────────────────────────────────────────────────────────────── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

.login__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg,
    rgba(19, 26, 56, 0.82) 0%,
    rgba(13, 18, 41, 0.92) 100%);
  border: 1px solid var(--horizon-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem 2.25rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  animation: horizon-fade-up 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) both 0.1s;
}

.login__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 2px;
  background: var(--horizon-accent);
  box-shadow: 0 0 18px var(--horizon-accent), 0 0 40px rgba(3,161,239,0.55);
}

.login__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
  text-align: center;
}

.login__logo-mark {
  width: 48px;
  height: 48px;
}

.login__logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--horizon-text-bright);
  letter-spacing: -0.01em;
}

.login__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--horizon-soft);
  margin-top: 0.2rem;
}

.login__form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.login__error {
  display: none;
  padding: 0.7rem 1rem;
  background: var(--horizon-warm-glow);
  border: 1px solid var(--horizon-warm-dim);
  border-radius: var(--radius-md);
  color: var(--horizon-warm);
  font-size: 0.85rem;
}
.login__error.show { display: block; }

@media (max-width: 480px) {
  .login__card {
    padding: 2.25rem 1.75rem 1.75rem;
    border-radius: var(--radius-lg);
  }
  .login__logo-mark { width: 40px; height: 40px; }
}

/* ── No-board state ────────────────────────────────────────────────────────── */

.no-board {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: center;
  padding: 3rem;
  position: relative;
  z-index: 1;
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */

@media (max-width: 639px) {
  .app-header { padding: 0 1rem; }
  .app-header__logo-text { display: none; }
  .app-header__boards { gap: 0.25rem; }

  .board-area {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem;
    gap: 0.75rem;
    align-items: stretch;
  }

  .list {
    width: 100%;
    max-height: none;
    flex-shrink: 0;
  }

  .add-list-btn { width: 100%; }
  .modal { border-radius: var(--radius-lg); padding: 1.75rem 1.25rem; }
}
