:root {
  --bg: #0f172a;
  --panel: #111827;
  --muted: #94a3b8;
  --text: #e5e7eb;
  --accent: #22d3ee;
  --idea: #1e293b;
  --progress: #0b3b5b;
  --execute: #184e77;
  --scale: #1b4332;
  --card: #0b1220;
  --card-border: #334155;
  --ring: rgba(34, 211, 238, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 75% -10%, #0b1220, #0f172a 60%);
  color: var(--text);
  overflow: hidden;
}

.auth-container {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.6);
  z-index: 50;
  padding: 24px;
  height: 100vh;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-header h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 0.3px;
}
.auth-header .tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.auth-forms {
  background: var(--panel);
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  display: grid;
  gap: 24px;
}
.auth-form {
  margin: 0;
}
.auth-form h2 {
  margin: 0 0 16px;
  font-size: 20px;
  text-align: center;
}
.auth-form .field {
  margin-bottom: 16px;
}
.auth-form input {
  width: 100%;
  background: #0b1220;
  border: 1px solid #1f2937;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
}
.auth-form input:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

#newFunnelInline {
  background: #1e293b;
  margin: 12px 16px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #334155;
}

#newFunnelInline .field {
  margin: 0;
}

#newFunnelInline input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  color: white;
  padding: 10px 12px;
  border-radius: 6px;
}

#newFunnelInline .modal-footer {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}
#newFunnelInline .modal-footer button {
  flex: 1;
}
.auth-form button.primary {
  width: 100%;
  background: var(--accent);
  border: none;
  color: #042b2e;
  font-weight: 700;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.auth-message {
  text-align: center;
  color: var(--text);
  margin-top: 16px;
  font-size: 14px;
}
.auth-switch {
  text-align: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}
.auth-switch button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}
.auth-switch button:hover {
  text-decoration: underline;
}

.app-header {
  width: 100%;
  margin: 0;
  padding: 4px 12px;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap; /* Ensure side-by-side in desktop */
}
.header-center { flex: 1; display: flex; justify-content: center; }
#headerFunnelName {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  /*margin-left: auto;*/                /* THIS is the magic line if you have multiple items */
}
.funnel-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}
.app-header h1 { margin: 0 0 4px 0; font-size: 26px; letter-spacing: 0.3px; }
.app-header .tagline { margin: 0 0 4px 0; color: var(--muted); }
.completed-toggle, .logout-btn, .funnel-new-toggle, .funnel-selector-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #334155;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.completed-toggle .chev { opacity: 0.8; }
.logout-btn { margin-left: 8px; }
.add-idea { display: flex; gap: 8px; }
.add-idea input {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid #1f2937;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
}
.add-idea input:focus { outline: 2px solid var(--ring); outline-offset: 2px; }
.add-idea button {
  background: var(--accent);
  border: none;
  color: #042b2e;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.add-idea button:hover {
  filter: brightness(1.1);
}
.add-idea button:focus { outline: 2px solid var(--ring); outline-offset: 2px; }
.header-logo {
  height: 100%;              /* matches exact height of header-left */
  max-height: 60px;          /* optional: cap size so it doesn’t get huge */
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px; /* space between text and logo */
  flex-wrap: nowrap !important; /* allows mobile stacking if needed */
}
.header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 1;
  min-width: 0;
}

#shareBtn {
  background: var(--accent);
  border: none;
  color: #042b2e;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
#shareBtn:hover {
  filter: brightness(1.1);
}

#shareBtn:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 12px 24px 12px;
  height: calc(100vh - 72px);
  overflow: auto;
}

.funnel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
}
.funnel-item:hover {
  background: #5e5f5f;  /* Light hover for visibility */
}
.funnel-actions {
  display: flex;
  gap: 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.funnel-item:hover .funnel-actions {
  opacity: 1;
}
.funnel-edit, .funnel-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
}
.funnel-edit:hover { color: var(--accent); }
.funnel-delete:hover { color: #ef4444; }

.lane {
  width: 100%;
  max-width: none;
  background: var(--idea);
  border: 1px solid #1f2937;
  min-height: 80px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
  /*overflow: visible;*/
}

.lane-ideas { width: 100%; background: linear-gradient(180deg, #0f172a, #1e293b 80%); }
.lane-progress { width: 85%; background: linear-gradient(180deg, #0f172a, #0b3b5b 80%); }
.lane-execute { width: 70%; background: linear-gradient(180deg, #0f172a, #184e77 80%); }
.lane-scale { width: 55%; background: linear-gradient(180deg, #0f172a, #1b4332 80%); }
.lane-complete { max-width: 420px; background: linear-gradient(180deg, #0f172a, #1f2937 80%); }
.lane-complete .complete-drop-note { padding: 12px 14px; color: var(--muted); font-size: 12px; }

.lane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lane-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.lane-capacity { color: var(--muted); font-variant-numeric: tabular-nums; }

.editable-title {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
}
.editable-title:hover {
  background: rgba(255, 255, 255, 0.1);
  outline: 1px solid rgba(255, 255, 255, 0.2);
}
.editable-title:focus {
  background: rgba(255, 255, 255, 0.15);
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.editable-title:focus:not(:focus-visible) {
  outline: none;
}

.cards { list-style: none; margin: 0; padding: 12px; display: grid; gap: 10px; }
.lane-ideas .cards { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.lane-progress .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.lane-execute .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.lane-scale .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
  touch-action: auto; /*pan y*/  
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(34,211,238,0.15); transform: translateY(-2px); }
.card:active { cursor: grabbing; }
.card.dragging { 
  opacity: 0.7 !important; 
  transform: rotate(1deg) scale(1.01); 
  z-index: 9999;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.card .title { margin: 0; font-weight: 600; font-size: 14px; }
.card .meta { margin: 6px 0 0 0; font-size: 12px; color: var(--muted); }

.lane.drop-target { 
  background: rgba(59, 130, 246, 0.15);
  outline: 2px dashed var(--ring); 
  outline-offset: -6px; }
.lane.full { filter: grayscale(0.3) brightness(0.9); }
.completed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.completed-card { background: #0c1322; border: 1px solid #213047; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.completed-card .title { margin: 0; font-size: 13px; font-weight: 600; }
.completed-card .meta { margin: 4px 0 0 0; font-size: 11px; color: var(--muted); }

.progress {
  margin-top: 10px;
  height: 6px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 999px;
  overflow: hidden;
}
.progress > .fill {
  height: 100%;
  width: 0%;
  background: #10b981;
  transition: width 160ms ease;
}
.card .progress { margin-top: auto; }

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.submenu {
  background: #0f172a;
  border-radius: 12px;
  margin: 12px 16px;
  overflow: hidden;
  border: 1px solid #334155;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.submenu.hidden {
  display: none !important;
}

/* Optional: make it look exactly like your old dropdown */
.submenu .p-4 {
  padding: 1rem;
}

.submenu .border-b,
.submenu .border-t {
  border-color: #1f2937 !important;
}

.submenu h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.submenu #funnelsList {
  max-height: 400px;
  overflow-y: auto;
  padding: 0 1rem;
}

.submenu #planInfo,
.submenu #userEmail {
  font-size: 0.875rem;
}
.menu-item {
  width: 100%;
  max-width: 420px;
  margin: 12px auto;
  padding: 12px 16px;
  font-size: 15px;
  text-align: center;
  background: transparent;           /* ← your cyan accent */
  color: #e0e4e4;                       /* ← dark text */
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  font-weight: 500;
}
.menu-header {
  padding: 20px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu-header h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
}
.menu-list {
  list-style: none;           /* removes bullets */
  padding: 0;
  margin: 0;
}

.menu-list li {
  margin: 0;
  padding: 0;
}
.menu-list li::marker {
  display: none;              /* extra safety */
}
.menu-close {
  background: none;
  border: none;
  font-size: 2.2rem;
  color: #94a3b8;
  cursor: pointer;
}
.menu-item:hover,
.menu-item:focus-visible {
  background: #22d3ee !important;
  transform: translateY(-1px);
  /*box-shadow: 0 4px 12px rgba(34, 211, 238, 0.4);*/
}

.menu-item:active {
  transform: translateY(0);
}

.funnelDropdown {
  position: fixed;
  right: 16px; top: 60px; 
  width: 360px; 
  max-height: 60vh; 
  overflow: auto; 
  background: #0b1220; 
  border: 1px solid #1f2937; 
  border-radius: 10px; 
  box-shadow: 0 20px 40px rgba(0,0,0,0.4); 
  padding: 10px; 
  z-index: 60;
}
.funnelDropdown[hidden] { display: none !important; }

.completed-panel { 
  position: fixed; 
  right: 16px; top: 60px; 
  width: 360px; 
  max-height: 60vh; 
  overflow: auto; 
  background: #0b1220; 
  border: 1px solid #1f2937; 
  border-radius: 10px; 
  box-shadow: 0 20px 40px rgba(0,0,0,0.4); 
  padding: 10px; 
  z-index: 60; }
.completed-panel[hidden] { display: none !important; }

#completed-panel.submenu {
  display: block !important;
  background: #0f172a;
  border-radius: 12px;
  margin: 12px 16px;
  border: 1px solid #334155;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

#completed-panel.submenu.hidden {
  display: none !important;
}

#funnelDropdown.submenu {
  display: block !important;
  background: #0f172a;
  border-radius: 12px;
  margin: 12px 16px;
  border: 1px solid #334155;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

#funnelDropdown.submenu.hidden {
  display: none !important;
}

/* Make sure your items are visible */
#funnelsList .funnel-item {
  background: #1e293b;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

#funnelsList .funnel-info {
  cursor: pointer;
}

#funnelsList .funnel-actions button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
#funnelsList .funnel-actions button:hover {
  background: #334155;
}
.funnel-actions svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  display: block !important;
  stroke: currentColor !important;
  color: #9ca3af !important;
}

.funnel-edit:hover svg   { color: #22d3ee !important; }
.funnel-delete:hover svg { color: #ef4444 !important; }


/*
.funnel-selector-toggle {
  padding: 10px 16px;
  font-size: 15px;
  text-align: center;
  background: var(--accent);
  color: #042b2e;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: center;
}

.funnel-new-toggle {
  padding: 10px 16px;
  font-size: 15px;
  background: var(--accent);
  color: #042b2e;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  min-width: 130px;
}*/

/* Mobile-only and desktop-only classes */
.mobile-only { display: none; }
.desktop-only { display: inline-flex; }

#header-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 16px;                    /* space between name and burger */
  }
.header-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 16px;
}

/*
@media (max-width: 900px) {
  .mobile-only { display: block; }
  .desktop-only { display: none; }
  .lane-ideas { max-width: 100%; }
  .lane-progress { max-width: 92%; }
  .lane-execute { max-width: 84%; }
  .lane-scale { max-width: 76%; }
}*/

/* Position mobile hamburger top-right, aligned with title */
#hamburgerBtnMobile {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  margin: 0;
}

.inline-wrapper {
  margin: 0 0 12px 0;
  padding-left: 12px;
  padding-right: 12px;
}
.inline-edit,
.inline-delete {
  background: #0f172a;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.inline-edit:not(.hidden),
.inline-edit input {
  width: 100%;
  padding: 10px 14px;
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
}
.inline-edit input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}
.inline-delete:not(.hidden) {
  display: block !important;
}
.inline-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px 0 0 0;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .mobile-only { display: block; }
  .desktop-only { display: none; }
  .header-row {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }
  .hamburger-btn {
    background: transparent;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px;
    color: white;
    cursor: pointer;
    /*display: flex;*/
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    transition: all 0.2s ease;
  }
  .header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    position: relative;
    min-height: 48px;
    padding-right: 60px;
    gap: 16px;
    flex-wrap: nowrap !important;
  }
  .header-left h1 {
    font-size: 22px;
    margin: 0;
    display: block;
    line-height: 1.2;
    flex-shrink: 1;
    min-width: 0;
  }
  .main-menu {
    transform: translateY(-100%);
  }
  .main-menu.open {
    transform: translateY(0);
  }
  .header-left .tagline {
    font-size: 14px;
    width: 100%;
    text-align: left;
    margin: 6px 0 0;
    display: block;
    line-height: 1.2;
    flex-shrink: 1;
    min-width: 0;
  }
  #mainMenu {
  width: 100%;
  max-width: none;
  border-left: none;
  transform: translateY(-100%);
  }
  #mainMenu.open { transform: translateY(0); }
  .header-center {
    display: block;
    width: 100%;
    margin-top: 12px;
  }
  .add-idea {
    width: 100%;
  }
  /*#header-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 16px;                    /* space between name and burger
  }
  .header-right {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    margin-top: 12px;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 16px;
  }*/
  .completed-toggle {
    width: 100%;
    max-width: 420px;
    margin: 12px auto 0;
    padding: 10px 14px;
    font-size: 15px;
    text-align: center;
    background: var(--accent);
    color: #042b2e;
    border: none;
    border-radius: 8px;
    cursor: pointer;
  }
  .completed-toggle .chev {
    margin-left: 6px;
  }
  .completed-panel {
    position: static;
    width: 100%;
    max-width: 420px;
    margin: 12px auto;
    padding: 12px;
  }
  .funnel {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding-bottom: 60px;
  }
  .funnel-selector-toggle,
  .funnel-new-toggle {
    width: 100%;
    max-width: 420px;
    margin: 8px auto;
    display: block;
  }
  .lane-ideas, .lane-progress, .lane-execute, .lane-scale {
    width: 100% !important;
    max-width: 100% !important;
  }
  .cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
    min-height: auto;
  }
  .card {
    flex-shrink: 0;
  }
  .card .title { font-size: 16px; }
  .card .meta { font-size: 13px; }
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
  }
  .walkthrough-overlay { padding: 16px; align-items: flex-end; }
  .walkthrough-step { max-width: 100%; }
  body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .modal-body {
    overflow-y: auto;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.6);
  z-index: 50;
  padding: 24px;
}
.modal-overlay[hidden] { display: none !important; }

.newFunnelOverlay .modal {
  width: min(400px, 90%);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}
.modal.hidden {
  display: none !important;
}
.modal-content {
  background: #1e293b;
  color: white;
  padding: 32px;
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  position: relative;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: #e5e7eb; }

.modal-body { padding: 16px; display: grid; gap: 16px; flex: 1 1 auto; overflow: auto; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input[type="text"] {
  width: 100%;
  background: var(--panel);
  border: 1px solid #1f2937;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
}
.field input[type="text"]:focus { outline: 2px solid var(--ring); outline-offset: 2px; }

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
}
.add-check { display: flex; gap: 8px; }
.add-check input { flex: 1; min-width: 0; }
.add-check button {
  background: var(--accent);
  border: none;
  color: #042b2e;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #0a0f1c;
  border: 1px solid #1f2937;
  border-radius: 8px;
}
.check input[type="checkbox"] { width: 16px; height: 16px; }
.check .label-text { color: var(--text); }
.check.completed .label-text { color: #9ca3af; text-decoration: line-through; }
.check .completed-at { margin-left: 6px; color: #94a3b8; font-size: 11px; font-style: italic; text-decoration: none; }
.check .del { background: transparent; border: none; color: #ef4444; cursor: pointer; padding: 4px; }
.label-text[contenteditable]:focus {
  outline: 1px solid var(--accent);
  background: rgba(255,255,255,0.1);
}
.check.dragging {
  opacity: 0.7;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.checklist-container:hover {
  background: rgba(0,0,0,0.03);
}
.check.drop-placeholder {
  border: 2px dashed var(--muted);
  background: rgba(255,255,255,0.05);
}

.card.drop-placeholder {
  border: 2px dashed var(--ring);
  background: rgba(255,255,255,0.05);
  min-height: 80px; /* For empty lanes */
}

.inline-edit .inline-actions,
.inline-delete .inline-actions {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-top: 16px !important;
  align-items: center;
  padding: 0 6px !important;
}
.confirm-edit,
.confirm-delete {
  flex: none;
  max-width: 110px;
  background: var(--accent) !important;
  color: #042b2e !important;
  font-weight: 700 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 0.90rem !important;
  min-width: 60px;
}
.cancel-edit,
.cancel-delete {
  flex: none;
  max-width: 110px;
  background: #333 !important;
  color: #aaa !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  border: 1px solid #444 !important;
  cursor: pointer !important;
  font-size: 0.90rem !important;
  min-width: 60px;
}
.confirm-edit:hover { background: #22d3ee !important; }
.confirm-delete:hover { background: #ef4444 !important; color: white !important; }
.cancel-edit:hover,
.cancel-delete:hover { background: #444 !important; color: white !important; }

.history { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #334155; color: var(--muted); font-size: 12px; display: grid; gap: 6px; }
.history.hidden { display: none; }

.modal-footer {
  display: flex;
  justify-content: space-between; /* Changed from flex-end */
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.modal-footer .delete-btn {
  background: #ef4444 !important; /* Off-red */
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.modal-footer .primary { background: var(--accent); border: none; color: #042b2e; font-weight: 700; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.modal-footer button:not(.primary) { background: transparent; border: 1px solid #334155; color: var(--text); padding: 8px 12px; border-radius: 8px; cursor: pointer; }

.confirm-overlay {
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.6);
  z-index: 60;
}
.confirm-modal {
  width: min(400px, 90%);
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.confirm-modal .modal-body {
  padding: 16px;
  text-align: center;
}
.confirm-modal h3 {
  font-size: 16px;
  margin: 0 0 16px;
}
.confirm-buttons {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.confirm-buttons .delete-btn {
  background: #ef4444; /* Off-red */
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}
.confirm-buttons .primary {
  background: var(--accent); /* Dark blue */
  border: none;
  color: #042b2e;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.show-completed-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--muted);
  padding: 8px 0;
  margin: 12px 0 0;
  cursor: pointer;
  width: fit-content;
}
.show-completed-btn:hover {
  color: var(--accent);
}
.show-history-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--muted);
  padding: 8px 0;
  margin: 12px 0 0;
  cursor: pointer;
  width: fit-content;
}
.show-history-btn:hover {
  color: var(--accent);
}
.completed-checklist {
  display: none;
}
.completed-checklist:not([hidden]) {
  display: grid;
}
.completed-checklist.hidden { display: none; }

.hidden {
  display: none !important;
}

.hamburger-btn {
  background: transparent;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px;
  color: white;
  cursor: pointer;
  /*display: flex;*/
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  transition: all 0.2s ease;
}

.hamburger-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.main-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 90vw;
  height: 100vh;
  background: #0f172a;
  border-left: 1px solid #1e293b;
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.main-menu.open {
  transform: translateX(0);
}

/* Main Menu — Sidebar on desktop, full-screen on mobile */
#mainMenu {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 90vw;
  height: 100vh;
  background: #0f172a;
  border-left: 1px solid #1e293b;
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
#mainMenu.open {
  transform: translateX(0);
}

.walkthrough-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.8);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 24px;
}
.walkthrough-overlay[hidden] { display: none !important; }
.walkthrough-step {
  background: var(--panel);
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 16px;
  max-width: 400px;
  text-align: center;
  color: var(--text);
  z-index: 70;
}
.walkthrough-step[hidden] { display: none !important; }
.walkthrough-step p {
  margin: 0 0 12px;
  font-size: 16px;
}
.walkthrough-step button {
  background: var(--accent);
  border: none;
  color: #042b2e;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
}
.walkthrough-highlight {
  position: relative;
  z-index: 71;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
  border: 2px solid var(--accent);
  background: var(--panel);
}

/* A2HS Popup */
.a2hs-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 16px 20px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  z-index: 1000;
  animation: slideUp 0.4s ease-out;
}
.a2hs-popup p {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text);
}
.a2hs-popup button {
  background: var(--accent);
  border: none;
  color: #042b2e;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  margin: 0 6px;
  font-size: 14px;
}
.a2hs-popup button:last-child {
  background: transparent;
  border: 1px solid #334155;
  color: var(--text);
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

#toast {
  z-index: 9999 !important; /* Higher to avoid overlaps */
  transition: opacity 0.3s ease;
}
#toast.show {
  opacity: 1 !important;
  display: block !important;
}