/* ══════════════════════════════════════════════════════════════════
   task.4minuten.ch — Light & Clean theme
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  --bg:           #f5f1eb;
  --bg-card:      #ffffff;
  --bg-nav:       #ffffff;
  --text:         #1c1917;
  --text-muted:   #78716c;
  --accent:       #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: #eef2ff;
  --border:       #e7e2d9;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:       0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:    0 10px 20px rgba(0,0,0,.1),  0 4px 8px rgba(0,0,0,.07);
  --radius:       14px;
  --radius-sm:    8px;
  --note-w:       300px;
  --font:         'Nunito', system-ui, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c5bdb5; border-radius: 99px; }

/* ══════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fdf6ec 0%, #f0ebff 50%, #e8f4fd 100%);
  padding: 24px;
}

.login-card {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(99,102,241,.3);
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 7px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: #fafaf9;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  background: #fff;
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 4px 12px rgba(99,102,241,.35);
  margin-top: 8px;
}

.btn-primary:hover  { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(99,102,241,.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

/* ══════════════════════════════════════════════════════════════════
   BOARD — NAVBAR
   ══════════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  gap: 12px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -.3px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand .brand-dot {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 3px 8px rgba(99,102,241,.3);
}

.nav-spacer { flex: 1; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: white;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}

.nav-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.nav-btn.danger:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

/* Search bar */
.nav-search {
  flex: 0 1 200px;
}

.nav-search input {
  width: 100%;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: #fafaf9;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.nav-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  background: white;
}

.nav-search input::placeholder { color: var(--text-muted); }

.nav-user {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 5px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

/* ── Tabs ─────────────────────────────────────────────────────────── */
.tabs-bar {
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  height: 46px;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 4px;
  z-index: 99;
}

.tab-btn {
  padding: 5px 16px;
  border-radius: 99px;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  background: transparent;
  color: var(--text-muted);
}

.tab-btn.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}

.tab-btn:not(.active):hover { background: var(--accent-light); color: var(--accent); }

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(255,255,255,.3);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
}

.tab-btn:not(.active) .tab-badge {
  background: var(--border);
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   BOARD CANVAS
   ══════════════════════════════════════════════════════════════════ */
#board-wrapper {
  position: fixed;
  top: 102px;
  left: 0; right: 0; bottom: 0;
  overflow: auto;
}

#board-canvas {
  position: relative;
  width: 4000px;
  height: 3000px;
  background-color: var(--bg);
  background-image: radial-gradient(circle, #d1cac0 .8px, transparent .8px);
  background-size: 32px 32px;
}

/* ── FAB ──────────────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(99,102,241,.4);
  transition: transform .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  line-height: 1;
}

.fab:hover  { transform: scale(1.1); box-shadow: 0 8px 28px rgba(99,102,241,.5); }
.fab:active { transform: scale(0.95); }

/* ══════════════════════════════════════════════════════════════════
   STICKY NOTES
   ══════════════════════════════════════════════════════════════════ */
.note {
  position: absolute;
  width: var(--note-w);
  background: var(--note-color, #fef9c3);
  border-radius: 4px;
  box-shadow:
    2px 2px 6px rgba(0,0,0,.12),
    6px 8px 20px rgba(0,0,0,.14),
    12px 14px 32px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  user-select: none;
  transform: rotate(var(--rot, 0deg));
  transition: box-shadow .18s, transform .18s;
  will-change: transform;
  cursor: default;
}

.note:hover {
  box-shadow:
    2px 2px 8px rgba(0,0,0,.15),
    8px 10px 24px rgba(0,0,0,.17),
    14px 18px 40px rgba(0,0,0,.1);
}

.note.dragging {
  box-shadow:
    4px 4px 10px rgba(0,0,0,.18),
    14px 18px 40px rgba(0,0,0,.22),
    20px 24px 50px rgba(0,0,0,.12);
  transform: rotate(var(--rot, 0deg)) scale(1.04);
  z-index: 99999 !important;
  cursor: grabbing;
}

/* Header */
.note-header {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 14px 10px;
  background: rgba(0,0,0,.05);
  border-radius: 4px 4px 0 0;
  cursor: grab;
}

.note-header:active { cursor: grabbing; }

.note-drag-icon {
  font-size: 20px;
  color: rgba(0,0,0,.22);
  flex-shrink: 0;
  margin-top: 2px;
}

.note-title {
  flex: 1;
  font-size: 21px;
  font-weight: 700;
  color: rgba(0,0,0,.78);
  word-break: break-word;
  line-height: 1.3;
}

.note-edit-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,.1);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  color: rgba(0,0,0,.55);
}

.note-edit-btn:hover { background: rgba(0,0,0,.2); }

/* Body */
.note-body {
  padding: 10px 14px 8px;
  flex: 1;
}

.note-desc {
  font-size: 17px;
  color: rgba(0,0,0,.6);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.note-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.note-checklist li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  color: rgba(0,0,0,.65);
}

.note-checklist li.checked {
  text-decoration: line-through;
  color: rgba(0,0,0,.35);
}

.note-checklist li .mini-check {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1.5px solid rgba(0,0,0,.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.note-checklist li.checked .mini-check {
  background: rgba(0,0,0,.25);
  border-color: transparent;
  color: rgba(255,255,255,.9);
}

.note-more {
  font-size: 14px;
  color: rgba(0,0,0,.4);
  font-style: italic;
  margin-top: 2px;
}

/* Footer */
.note-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px 10px;
  background: rgba(0,0,0,.04);
  border-radius: 0 0 4px 4px;
}

.color-dots {
  display: flex;
  gap: 4px;
  flex: 1;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .12s, border-color .12s;
  flex-shrink: 0;
}

.color-dot:hover { transform: scale(1.25); }
.color-dot.active { border-color: rgba(0,0,0,.4); transform: scale(1.15); }

.note-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: none;
  background: rgba(0,0,0,.1);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  color: rgba(0,0,0,.55);
  flex-shrink: 0;
}

.note-action-btn:hover { background: rgba(0,0,0,.2); }
.note-action-btn.done-btn:hover  { background: #22c55e; color: white; }
.note-action-btn.del-btn:hover   { background: #ef4444; color: white; }
.note-action-btn.undo-btn:hover  { background: #f59e0b; color: white; }

/* Corner fold effect */
.note::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(225deg, rgba(0,0,0,.14) 45%, rgba(255,255,255,.2) 55%, transparent 60%);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════
   DONE TAB — masonry grid
   ══════════════════════════════════════════════════════════════════ */
#done-grid {
  display: none;
  padding: 122px 28px 100px;
  column-count: 4;
  column-gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

#done-grid.visible { display: block; }

#done-grid .note {
  position: static !important;
  transform: none !important;
  display: inline-block;
  width: 100%;
  max-width: var(--note-w);
  margin-bottom: 20px;
  break-inside: avoid;
  opacity: .82;
  filter: grayscale(15%);
  transition: opacity .2s, filter .2s, box-shadow .2s;
}

#done-grid .note:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.done-date {
  font-size: 14px;
  color: rgba(0,0,0,.4);
  padding: 4px 14px 6px;
  font-style: italic;
}

@media (max-width: 1200px) { #done-grid { column-count: 3; } }
@media (max-width: 900px)  { #done-grid { column-count: 2; } }
@media (max-width: 500px)  { #done-grid { column-count: 1; } }

/* ══════════════════════════════════════════════════════════════════
   VIEW TOGGLE BUTTON
   ══════════════════════════════════════════════════════════════════ */
.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: white;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}

.view-toggle-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.view-toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

.view-toggle-icon {
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  transition: color .15s;
}

.view-toggle-btn:hover .view-toggle-icon { color: var(--accent); }
.view-toggle-btn.active .view-toggle-icon { color: white; }

/* ══════════════════════════════════════════════════════════════════
   LIST VIEW
   ══════════════════════════════════════════════════════════════════ */
#list-view {
  display: none;
  padding: 118px 20px 100px;
  max-width: 900px;
  margin: 0 auto;
}

#list-view.visible { display: flex; flex-direction: column; gap: 8px; }

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  min-height: 52px;
}

.list-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.list-item-color {
  width: 6px;
  height: 36px;
  border-radius: 99px;
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.list-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.list-item-checklist-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 1px 7px;
  border-radius: 99px;
  flex-shrink: 0;
}

.list-item-colors {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.list-item-colors .color-dot {
  width: 14px;
  height: 14px;
}

.list-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}

.list-item:hover .list-item-actions { opacity: 1; }

.list-item-actions .note-action-btn {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

/* List empty state */
#list-view .empty-state {
  position: static;
  transform: none;
  padding: 80px 20px;
}

@media (max-width: 768px) {
  #list-view { padding: 16px 12px 100px; }
  .list-item-desc { max-width: 180px; }
  .list-item-actions { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: white;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95) translateY(10px);
  transition: transform .2s;
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-color-strip {
  width: 14px;
  height: 40px;
  border-radius: 99px;
  background: var(--modal-color, #fef9c3);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

.modal-title-input {
  flex: 1;
  font-family: var(--font);
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  border: none;
  outline: none;
  background: transparent;
  letter-spacing: -.3px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .15s;
  flex-shrink: 0;
}

.modal-close:hover { background: var(--border); }

.modal-body { padding: 16px 24px 0; }

.modal-desc-input {
  width: 100%;
  min-height: 80px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color .15s;
  background: #fafaf9;
  line-height: 1.5;
}

.modal-desc-input:focus { border-color: var(--accent); background: white; }

.modal-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin: 16px 0 8px;
}

/* Checklist in modal */
.modal-checklist { display: flex; flex-direction: column; gap: 6px; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #fafaf9;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}

.checklist-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.checklist-item-text {
  flex: 1;
  font-family: var(--font);
  font-size: 14px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
}

.checklist-item.checked .checklist-item-text { text-decoration: line-through; color: var(--text-muted); }

.checklist-del {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
  flex-shrink: 0;
}

.checklist-del:hover { background: #fee2e2; color: #dc2626; }

.add-checklist-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.add-checklist-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  background: transparent;
  color: var(--text);
  transition: border-color .15s;
}

.add-checklist-input:focus { border-color: var(--accent); border-style: solid; }

.add-checklist-btn {
  padding: 8px 14px;
  background: var(--accent-light);
  color: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.add-checklist-btn:hover { background: var(--accent); color: white; }

/* Color picker in modal */
.modal-colors {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0;
}

.modal-color-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .12s, border-color .12s, box-shadow .12s;
  outline: none;
}

.modal-color-btn:hover { transform: scale(1.15); }
.modal-color-btn.active { border-color: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,.2); transform: scale(1.1); }

/* Modal footer */
.modal-footer {
  padding: 18px 24px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid var(--border);
  margin-top: 18px;
}

.btn-save {
  padding: 10px 24px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 3px 10px rgba(99,102,241,.3);
}

.btn-save:hover  { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(99,102,241,.4); }
.btn-save:active { transform: translateY(0); }

.btn-danger {
  padding: 10px 16px;
  background: transparent;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.btn-danger:hover { background: #fef2f2; border-color: #dc2626; }

.btn-secondary {
  padding: 10px 16px;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

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

/* ══════════════════════════════════════════════════════════════════
   ADMIN MODAL
   ══════════════════════════════════════════════════════════════════ */
.user-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fafaf9;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}

.user-row .user-name {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
}

.user-row .user-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.user-row .user-badge.admin-badge {
  background: #fef3c7;
  color: #d97706;
}

/* ── Empty state ──────────────────────────────────────────────────── */
.empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text-muted); }
.empty-state p  { font-size: 14px; color: #a8a29e; margin-top: 4px; }

/* ── Toast notifications ──────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.toast {
  padding: 10px 20px;
  border-radius: 99px;
  background: var(--text);
  color: white;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  animation: toastIn .25s ease, toastOut .3s ease 2.2s forwards;
  white-space: nowrap;
}

@keyframes toastIn  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(10px); } }

/* ── Spinner ──────────────────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE — mobile nav
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px; }
  .nav-search { flex: 1 1 100%; order: 10; }
  .nav-btn span { display: none; }
  .tabs-bar { position: sticky; top: 0; z-index: 100; }
  #board-wrapper { position: relative; top: auto; min-height: calc(100vh - 160px); }
  #done-grid { padding-top: 16px; padding-left: 16px; padding-right: 16px; }
  :root { --note-w: 260px; }

  #list-view { padding-top: 16px; }
}
