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

:root {
  --primary: #2d5a3d;
  --primary-dark: #1e3d2a;
  --primary-light: #3d7a52;
  --secondary: #7c5e3f;
  --accent: #9fbd5f;
  --success: #4a9960;
  --warning: #d4a574;
  --danger: #c85a54;
  --dark: #1a1a1a;
  --dark-lighter: #2d2d2d;
  --light: #f8f9f7;
  --light-green: #e8f3ea;
  --border: #d4d9d0;
  --text: #2d2d2d;
  --text-muted: #6b7280;
  --shadow: rgba(45, 90, 61, 0.12);
  --shadow-hover: rgba(45, 90, 61, 0.18);
}

/* Dark Mode Overrides */
body.dark-mode {
  --primary: #9fbd5f;
  /* Swap to accent for better visibility */
  --primary-dark: #e8f3ea;
  --primary-light: #7c9b4a;
  --dark: #f8f9f7;
  --dark-lighter: #ffffff;
  --light: #1a1a1a;
  --light-green: #2d2d2d;
  --border: #444444;
  --text: #f8f9f7;
  --text-muted: #a0a0a0;
  --shadow: rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, #0f110f 0%, #1a1a1a 100%);
}

/* Specific component tweaks for Dark Mode */
body.dark-mode .header,
body.dark-mode .column,
body.dark-mode .board-info,
body.dark-mode .facilitator-controls,
body.dark-mode .modal {
  background: #242424;
  color: var(--text);
}

body.dark-mode .item {
  background: #2d2d2d;
  border-color: #444444;
}

body.dark-mode .add-item-input {
  background: #1a1a1a;
  color: white;
}

/* --- Inside body.dark-mode in style.css --- */

body.dark-mode .share-link-input,
body.dark-mode .timer-input,
body.dark-mode .column-name-input,
body.dark-mode .column-icon-select {
  background: #2a2a2a !important;
  color: #e0e0e0 !important;
  border-color: #555555 !important;
}

/* Better contrast for tool section inputs and textareas in dark mode */
body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode textarea {
  background: #2a2a2a !important;
  color: #e0e0e0 !important;
  border-color: #555555 !important;
}

body.dark-mode input[type="text"]::placeholder,
body.dark-mode input[type="number"]::placeholder,
body.dark-mode textarea::placeholder {
  color: #e0e0e0 !important;
}

/* Timer footer in dark mode - better contrast */
body.dark-mode .timer-footer {
  background: #1a1a1a !important;
  color: #ffffff !important;
  border-top: 1px solid #333333;
}

body.dark-mode .timer-status {
  color: #ffffff !important;
}

body.dark-mode .btn-timer-footer {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

body.dark-mode .btn-timer-footer:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* Keep warning and danger states visible in dark mode */
body.dark-mode .timer-footer.warning {
  background: #f1c40f !important;
  color: #1a1a1a !important;
}

body.dark-mode .timer-footer.danger {
  background: var(--danger) !important;
  color: #ffffff !important;
}

/* Ensure the presence dots don't disappear */
body.dark-mode .presence-dot {
  border-color: #242424 !important;
  /* Matches the new dark sub-header */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Fix for buttons that might have white backgrounds */
body.dark-mode .btn-secondary {
  background: #333333 !important;
  color: #f8f9f7 !important;
  border-color: #444444 !important;
}

body.dark-mode .btn-secondary:hover {
  background: #2d2d2d !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

body.dark-mode .btn-primary:hover {
  background: #7c9b4a !important;
  color: #1a1a1a !important;
}

body.dark-mode .btn-success:hover {
  background: #7c9b4a !important;
  color: #1a1a1a !important;
}

body.dark-mode .btn-accent:hover {
  background: #7c9b4a !important;
  color: #1a1a1a !important;
}

/* Fix for the modal and dialog boxes */
body.dark-mode .confirm-dialog-content {
  background: #242424 !important;
  color: #f8f9f7 !important;
  border: 1px solid #444444;
}

body.dark-mode .confirm-dialog-message {
  color: #a0a0a0 !important;
}

body.dark-mode .item-skeleton {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 2px dashed #555555 !important;
}

body.dark-mode .item-skeleton-text {
  color: #888888 !important;
}

body.dark-mode .header-logo,
body.dark-mode .home-logo img {
  filter: brightness(0) invert(1);
  /* Turns black logos white */
  opacity: 0.9;
}

/* --- Inside body.dark-mode in style.css --- */

body.dark-mode .energy-option span {
  color: var(--text) !important;
  /* Forces the light-gray/white text */
  font-weight: 600;
}

body.dark-mode .energy-option {
  background: #2d2d2d !important;
  /* Darker card background */
  border-color: #444444 !important;
}

body.dark-mode .energy-option:hover {
  background: #3d3d3d !important;
  border-color: var(--primary) !important;
}

body.dark-mode .tool-panel-header {
  /* Use a darker, more solid gradient for better text contrast */
  background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%) !important;
  border-bottom: 1px solid #444444;
}

body.dark-mode .tool-panel-header h4 {
  color: #ffffff !important;
  /* Force pure white for the title */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  /* Adds a subtle "lift" for visibility */
}

/* Ensure the focus (target) icon in the tool header is also visible */
body.dark-mode .focus-panel-btn {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .empty-state svg {
  opacity: 0.2;
  color: var(--text-muted);
}

body.dark-mode .notification {
  background: #333333 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

body.dark-mode .notification-message {
  color: #cccccc !important;
}

body.dark-mode #darkModeBtn {
  color: #f1c40f !important;
  /* Yellow light bulb */
}

#darkModeBtn:hover svg {
  transform: scale(1.1) rotate(10deg);
  transition: transform 0.2s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #e8f3ea 0%, #f5f2ed 50%, #e8e5df 100%);
  min-height: 100vh;
  color: var(--text);
  line-height: 1.6;
  animation: fadeIn 0.3s ease-out;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232d5a3d' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem;
  animation: fadeIn 0.5s ease-out;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  background: white;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-left: 4px solid var(--primary);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header h1 {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 0.625rem 1.125rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
}

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

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

.btn-danger:hover {
  background: #a84842;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #3d7d4e;
}

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

.btn-accent:hover {
  background: #8aa952;
}

.btn-text {
  margin-left: 0.25rem;
}

/* Setup Screen */
.setup-screen {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  max-width: 700px;
  margin: 4rem auto;
  box-shadow: 0 4px 24px var(--shadow);
  border-top: 4px solid var(--primary);
}

.setup-screen h2 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.75rem;
}

.setup-screen p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group label svg {
  width: 18px;
  height: 18px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.board-format-options {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

.board-format-option {
  padding: 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.board-format-option:hover {
  border-color: var(--primary);
  background: var(--light-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.board-format-option.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.board-format-option.selected h4,
.board-format-option.selected p {
  color: white;
  opacity: 1;
}

.board-format-option.selected svg {
  color: white;
  stroke: white;
}

.board-format-option h4 {
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.board-format-option h4 svg {
  width: 20px;
  height: 20px;
}

.board-format-option p {
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.8;
}

/* Board */
.board-info {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 2px 8px var(--shadow);
}

.board-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.board-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  align-items: center;
}

.board-meta>div {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.board-meta svg {
  width: 16px;
  height: 16px;
}

.timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  /* Fixed-width numbers */
}

.timer #timerValue {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  /* Monospaced for consistent width */
  min-width: 2.5rem;
  /* Prevents layout shift */
}

.timer.warning {
  color: var(--warning);
}

.timer.danger {
  color: var(--danger);
  font-weight: 700;
  animation: timer-urgent 0.6s ease-in-out infinite alternate;
}

@keyframes timer-urgent {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.05);
  }
}

/* Columns */
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.column {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px var(--shadow);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--primary);
  position: relative;
  overflow: hidden;
}

.column::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(45, 90, 61, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1.5px solid var(--border);
}

.column-title {
  font-size: 1.125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
}

.column-title svg {
  width: 20px;
  height: 20px;
}

.column-count {
  background: var(--light-green);
  color: var(--primary);
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.column-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.column-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  color: var(--text-muted);
  transition: all 0.2s;
  border-radius: 6px;
  display: flex;
  align-items: center;
}

.column-action-btn:hover {
  background: var(--light);
  color: var(--danger);
}

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

/* Column Colors */
.column.went-well {
  border-top-color: var(--success);
}

.column.went-well .column-count {
  background: #e8f4ed;
  color: var(--success);
}

.column.needs-improvement {
  border-top-color: var(--warning);
}

.column.needs-improvement .column-count {
  background: #fdf3e8;
  color: var(--warning);
}

.column.action-items {
  border-top-color: var(--danger);
}

.column.action-items .column-count {
  background: #fdecea;
  color: var(--danger);
}

.column.start {
  border-top-color: var(--success);
}

.column.start .column-count {
  background: #e8f4ed;
  color: var(--success);
}

.column.stop {
  border-top-color: var(--danger);
}

.column.stop .column-count {
  background: #fdecea;
  color: var(--danger);
}

.column.continue {
  border-top-color: var(--primary);
}

.column.continue .column-count {
  background: var(--light-green);
  color: var(--primary);
}

.column.mad {
  border-top-color: var(--danger);
}

.column.mad .column-count {
  background: #fdecea;
  color: var(--danger);
}

.column.sad {
  border-top-color: var(--warning);
}

.column.sad .column-count {
  background: #fdf3e8;
  color: var(--warning);
}

.column.glad {
  border-top-color: var(--success);
}

.column.glad .column-count {
  background: #e8f4ed;
  color: var(--success);
}

.column.liked {
  border-top-color: var(--danger);
}

.column.liked .column-count {
  background: #fdecea;
  color: var(--danger);
}

.column.learned {
  border-top-color: var(--primary);
}

.column.learned .column-count {
  background: var(--light-green);
  color: var(--primary);
}

.column.lacked {
  border-top-color: var(--warning);
}

.column.lacked .column-count {
  background: #fdf3e8;
  color: var(--warning);
}

.column.longed-for {
  border-top-color: var(--accent);
}

.column.longed-for .column-count {
  background: #f4f7e8;
  color: var(--accent);
}

.column.custom {
  border-top-color: var(--secondary);
}

.column.custom .column-count {
  background: #f5f0eb;
  color: var(--secondary);
}

/* Add Item Form */
.add-item-form {
  margin-bottom: 1rem;
}

.add-item-input {
  width: 100%;
  padding: 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.2s;
  font-family: inherit;
}

.add-item-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
  transform: translateY(-1px);
}

.add-item-input:focus+.add-item-actions .btn-primary {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(45, 90, 61, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(45, 90, 61, 0);
  }
}

.add-item-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.add-item-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Items */
.items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 10px 0;
  transition: all 0.3s ease;
  /* Added for smooth layout shifts */
}

.item {
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  /* Added transition for smooth card movement and fades */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease,
    box-shadow 0.2s ease;
  animation: slideIn 0.3s ease-out;
  position: relative;
  backface-visibility: hidden;
  -webkit-touch-callout: none;
  /* Disables the long-press popup menu on iOS */
  -webkit-user-select: none;
  /* Disables text highlighting while holding */
  user-select: none;
}

.item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 8px 8px 0 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.item:hover::before {
  opacity: 0;
  /* Disabled - using shadow lift instead */
}

.item.hidden-item {
  opacity: 0.4;
  background: #f9f9f9;
}

.item.hidden-item .item-text {
  filter: blur(4px);
  user-select: none;
}

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

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

.item:hover:not(.hidden-item) {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.625rem;
}

.item-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  background: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.item-author svg {
  width: 12px;
  height: 12px;
}

.item-actions {
  display: flex;
  gap: 0.375rem;
}

.item-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  color: var(--text-muted);
  transition: all 0.2s;
  border-radius: 6px;
  display: flex;
  align-items: center;
}

.item-action-btn:hover {
  background: white;
  color: var(--primary);
}

.item-action-btn.delete:hover {
  color: var(--danger);
}

.item-action-btn.hide:hover {
  color: var(--warning);
}

.item-action-btn svg {
  width: 16px;
  height: 16px;
}

.item-text {
  color: var(--text);
  margin-bottom: 0.625rem;
  line-height: 1.6;
  word-wrap: break-word;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
}

.vote-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vote-btn {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.375rem 0.625rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.2s;
  font-weight: 600;
}

.vote-btn svg {
  width: 14px;
  height: 14px;
}

.vote-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.vote-btn.voted {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.vote-count {
  font-weight: 700;
}

.item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.item-time svg {
  width: 12px;
  height: 12px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 500px;
  /* Slightly narrower for a tighter layout */
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.modal h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal h3 svg {
  width: 24px;
  height: 24px;
}

/* Help modal scroll - prettier scrollbar */
.help-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--light);
}

.help-scroll::-webkit-scrollbar {
  width: 8px;
}

.help-scroll::-webkit-scrollbar-track {
  background: var(--light);
  border-radius: 4px;
}

.help-scroll::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
  border: 2px solid var(--light);
}

.help-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.modal-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Settings */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  background: var(--light-green);
  border-radius: 12px;
  border: 1px solid rgba(45, 90, 61, 0.1);
  transition: all 0.2s;
}

.setting-item:hover {
  background: #e1efe4;
  border-color: rgba(45, 90, 61, 0.25);
}

.toggle {
  position: relative;
  width: 52px;
  height: 28px;
  background: #d4d9d0;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle.active {
  background: var(--success);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle.active .toggle-thumb {
  transform: translateX(24px);
}

/* Share Link */
.share-link-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.share-link-input {
  width: 100%;
  padding: 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  background: var(--light);
  box-sizing: border-box;
}

/* Column Management */
.custom-columns-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.custom-column-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.custom-column-info {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
}

.custom-column-info svg {
  width: 18px;
  height: 18px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  animation: fadeIn 0.5s ease-out;
}

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

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

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.3;
  stroke: currentColor;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Loading */
.loading {
  text-align: center;
  padding: 4rem;
  color: var(--primary);
}

.spinner {
  border: 4px solid var(--border);
  border-top: 4px solid var(--primary);
  border-right: 4px solid var(--accent);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Facilitator Controls */
.facilitator-controls {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
  border-left: 4px solid var(--accent);
}

.facilitator-controls h3 {
  margin-bottom: 1rem;
  color: var(--primary);
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.facilitator-controls h3 svg {
  width: 20px;
  height: 20px;
}

.phase-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timer-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.timer-presets {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  min-width: auto;
}

.timer-input {
  width: 80px;
  padding: 0.625rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}

/* Responsive */

.setup-screen {
  padding: 2rem 1.5rem;
}

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

/* Participant Chips */
.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: var(--light-green);
  border: 1.5px solid var(--primary);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.2s;
}

.participant-chip:hover {
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow);
}

.participant-chip svg {
  width: 14px;
  height: 14px;
}

.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.125rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  transition: all 0.2s;
  border-radius: 50%;
}

.chip-remove:hover {
  background: var(--danger);
  color: white;
}

.chip-remove svg {
  width: 12px;
  height: 12px;
}

/* Tools Modal - Large Size */
.modal-large {
  max-width: 900px;
  max-height: 85vh;
  /* FIX: Flex layout forces children to stay within 85vh */
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
  /* Keep the shell clipped */
  padding: 1.5rem;
  /* Reduced padding for mobile breathing room */
}

/* Tools Grid - Replaces Tabs */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 10px;
  /* Ensure the grid respects the parent's width */
  width: 100%;
  overflow: auto;
}

.tool-card {
  background: var(--light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.tool-card:hover {
  border-color: var(--primary);
  background: var(--light-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 12px;
}

.tool-card-icon svg {
  width: 28px;
  height: 28px;
}

.tool-card h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--primary);
}

.tool-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Collapsible Tool Panel on Main Board */
.collapsible-tool-panel {
  background: white;
  border: 2px solid var(--primary);
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px var(--shadow);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease-out;
  overflow: hidden;
  /* FIX: Ensure the panel itself never exceeds the mobile screen height */
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.collapsible-tool-panel.active {
  opacity: 1;
  transform: translateY(0);
}

.collapsible-tool-panel.minimized .tool-panel-content {
  max-height: 0;
  padding: 0 1.5rem;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s ease-out;
}

.tool-panel-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  /* Makes header clickable for expand/collapse */
}

.tool-panel-header h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
}

.tool-panel-actions {
  display: flex;
  gap: 0.5rem;
}

.tool-panel-header .btn-icon {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 0.5rem;
  color: white;
  transition: background 0.2s;
}

.tool-panel-header .btn-icon:hover {
  background: rgba(255, 255, 255, 0.3);
}

.tool-panel-content {
  padding: 1.5rem;
  overflow-y: auto !important;
  /* Force the scrollbar */
  flex: 1;
  /* Take up remaining space in the flex column */
  -webkit-overflow-scrolling: touch;
  background: white;
}

/* Energy Check */
.energy-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.energy-option {
  padding: 2rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.energy-option svg {
  width: 48px;
  height: 48px;
}

.energy-option:hover {
  border-color: var(--primary);
  background: var(--light-green);
  transform: translateY(-2px);
}

.energy-option[data-energy="low"] svg {
  color: var(--danger);
}

.energy-option[data-energy="medium"] svg {
  color: var(--warning);
}

.energy-option[data-energy="high"] svg {
  color: var(--success);
}

.energy-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.energy-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.energy-bar-label {
  min-width: 100px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.energy-bar {
  flex: 1;
  height: 24px;
  background: var(--light);
  border-radius: 12px;
  overflow: hidden;
}

.energy-bar-fill {
  height: 100%;
  transition: width 0.5s ease-out;
  border-radius: 12px;
}

.energy-bar-count {
  min-width: 30px;
  text-align: right;
  font-weight: 600;
  color: var(--primary);
}

/* Action Items */
.action-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.action-item {
  padding: 1rem;
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
}

.action-item.completed {
  opacity: 0.6;
}

.action-item.completed .action-item-text {
  text-decoration: line-through;
}

.action-item-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.action-checkbox {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.action-item-text {
  flex: 1;
  font-weight: 500;
}

.action-item-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: 2rem;
}

.action-item-meta svg {
  width: 14px;
  height: 14px;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

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

/* Parking Lot */
.parking-lot-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.parking-item {
  padding: 1rem;
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.parking-item.resolved {
  opacity: 0.5;
  border-color: var(--success);
}

.parking-item-content {
  flex: 1;
}

.parking-item-content p {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.parking-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.parking-item-meta svg {
  width: 14px;
  height: 14px;
}

.parking-item-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* Health Check */
.health-check-form {
  margin: 1.5rem 0;
}

.health-question {
  margin-bottom: 1.5rem;
}

.health-question label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

.health-slider {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  /* Safari/Chrome */
  appearance: none;
  /* Standard */
}

.health-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  /* Safari/Chrome */
  appearance: none;
  /* Standard */
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.health-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.health-value {
  display: inline-block;
  margin-left: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

.health-averages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.health-avg-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.health-avg-label {
  min-width: 120px;
  font-weight: 600;
}

.health-avg-bar {
  flex: 1;
  height: 20px;
  background: var(--light);
  border-radius: 10px;
  overflow: hidden;
}

.health-avg-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.5s ease-out;
  border-radius: 10px;
}

.health-avg-value {
  min-width: 50px;
  text-align: right;
  font-weight: 600;
  color: var(--primary);
}

/* Templates */
.templates-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.template-item {
  padding: 1rem;
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.template-info {
  flex: 1;
}

.template-info h5 {
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.template-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.template-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.template-actions {
  display: flex;
  gap: 0.5rem;
}

/* History */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.history-item {
  padding: 1.25rem;
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.history-header h5 {
  color: var(--primary);
}

.history-stats {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.history-summary p {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.empty-state-text {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-style: italic;
}


/* Tooltips */
.btn[data-tooltip] {
  position: relative;
}

.btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: var(--dark);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 1000;
}

.btn[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--dark);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  display: none;
  /* Hide the arrow */
}

.btn[data-tooltip]:hover::after,
.btn[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* Custom Notifications */
.notification-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
}

.notification {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid var(--primary);
}

.notification.success {
  border-left-color: var(--success);
}

.notification.error {
  border-left-color: var(--danger);
}

.notification.warning {
  border-left-color: var(--warning);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

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

.notification-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-icon svg {
  width: 20px;
  height: 20px;
}

.notification.success .notification-icon {
  color: var(--success);
}

.notification.error .notification-icon {
  color: var(--danger);
}

.notification.warning .notification-icon {
  color: var(--warning);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.notification-message {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.notification-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text-muted);
  transition: color 0.2s;
  flex-shrink: 0;
}

.notification-close:hover {
  color: var(--text);
}

.notification-close svg {
  width: 18px;
  height: 18px;
}

/* Confirm Dialog */
.confirm-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s;
}

.confirm-dialog-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s;
}

.confirm-dialog-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: var(--light-green);
  color: var(--primary);
}

.confirm-dialog-icon svg {
  width: 28px;
  height: 28px;
}

.confirm-dialog-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.5rem;
}

.confirm-dialog-message {
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.confirm-dialog-actions {
  display: flex;
  gap: 0.75rem;
}

.confirm-dialog-actions .btn {
  flex: 1;
  justify-content: center;
}


/* ---- NEW: Affinity Mapping & Drag and Drop ---- */
.item[draggable="true"] {
  cursor: grab;
}

.item[draggable="true"]:active {
  cursor: grabbing;
}

.item.drag-over {
  border-color: var(--primary);
  background: var(--light-green);
  box-shadow: 0 0 0 3px var(--primary);
}

.merged-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--primary-light);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  margin-left: 0.5rem;
}

.item-text.merged hr {
  border: 0;
  border-top: 1px dashed var(--border);
  margin: 0.75rem 0;
}

/* ---- NEW: Ready Pulse ---- */
.ready-pulse {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--light-green);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  transition: all 0.3s;
}

.ready-pulse svg {
  width: 16px;
  height: 16px;
}

.ready-pulse.active {
  background: var(--primary);
  color: white;
  animation: pulse-ready 2s infinite;
}

@keyframes pulse-ready {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 90, 61, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(45, 90, 61, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(45, 90, 61, 0);
  }
}

/* Ready button now uses standard btn-success/btn-secondary classes */

.webhook-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* Social sharing buttons */
.social-share-section {
  text-align: center;
}

.social-share-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-btn {
  background: white;
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted);
}

.social-btn:hover {
  background: var(--light-green);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.social-btn svg {
  width: 20px;
  height: 20px;
}

.board-share-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.social-btn-small {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted);
  padding: 0;
}

.social-btn-small:hover {
  background: white;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow);
}

.social-btn-small svg {
  width: 16px;
  height: 16px;
}


/* Tool card status indicators */
.tool-card {
  position: relative;
  overflow: visible;
}

.tool-card.active {
  border-color: var(--success);
  background: var(--light-green);
}

.tool-card.active-hidden {
  border-color: var(--warning);
  background: #fff8e1;
}

.tool-status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--success);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-card.active-hidden .tool-status-badge {
  background: var(--warning);
}

/* Board footer */
.board-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 2px solid var(--border);
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

/* Fix tooltip overflow on tool panels */
.tool-panel-header {
  position: relative;
  z-index: 10;
}

.tool-panel-header .btn-icon {
  position: relative;
}

/* Remove data-tooltip overflow - use title attribute instead */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  display: none;
  /* Disable custom tooltips, use native title */
}

/* Logo styles */
.home-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.home-logo img {
  max-width: 300px;
  height: auto;
}

.header-logo {
  max-height: 65px;
  width: auto;
  object-fit: contain;
}

.logo img {
  display: block;
}

/* Responsive logo */

/* Share modal social buttons */
.share-social-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Active users display */
.active-users {
  color: var(--primary);
  font-weight: 600;
  transition: all 0.2s;
}

.active-users:hover {
  color: var(--primary-light);
  transform: translateY(-1px);
}

.active-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
  max-height: 400px;
  overflow-y: auto;
}

.active-user-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--light);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.user-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-name {
  font-weight: 600;
  color: var(--primary-dark);
}

.user-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  background: var(--light-green);
  color: var(--primary);
  font-weight: 600;
}

.user-badge.facilitator {
  background: var(--primary);
  color: white;
}

/* Readonly participant chip for non-facilitators */
.participant-chip-readonly {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text);
}

.participant-chip-readonly svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

/* Column management list */
.column-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}


.column-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.column-item-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}


.column-icon {
  font-size: 1.25rem;
  min-width: 24px;
  text-align: center;
}

.column-name-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9375rem;
  background: white;
  font-weight: 600;
  color: var(--primary-dark);
}

.column-name-input:focus {
  outline: none;
  border-color: var(--primary);
}

.column-item-actions {
  display: flex;
  gap: 0.5rem;
}

/* Scrollable modal content */
.modal-scrollable-content {
  flex: 1;
  /* Essential: fills the space between header and footer */
  overflow-y: auto !important;
  /* The actual scroll fix */
  -webkit-overflow-scrolling: touch;
  /* Smooth inertia for mobile */
  padding-right: 0.5rem;
  min-height: 0;
  /* Prevents the 'rigid container' bug */
  overflow: hidden;

}

.modal-scrollable-content::-webkit-scrollbar {
  width: 8px;
}

.modal-scrollable-content::-webkit-scrollbar-track {
  background: var(--light);
  border-radius: 4px;
}

.modal-scrollable-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.modal-scrollable-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Column drag and drop */
.column-drag-handle {
  cursor: grab;
  padding: 0.5rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-right: 0.5rem;
}

.column-drag-handle:active {
  cursor: grabbing;
}

.column-item {
  transition: opacity 0.2s ease;
}

.column-item.dragging {
  opacity: 0.5;
  background: var(--light-green);
}

.column-item[draggable="true"] {
  cursor: move;
}

.column-item:not(.dragging) {
  transition: transform 0.2s ease;
}

/* Column icon selector */
.column-icon-select {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1.25rem;
  background: white;
  cursor: pointer;
  min-width: 60px;
  text-align: center;
}

.column-icon-select:focus {
  outline: none;
  border-color: var(--primary);
}

.column-icon-select:hover {
  border-color: var(--primary);
}

/* Mobile: Split header buttons into two rows when needed */

/* Enable touch dragging for cards on mobile */
.card {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}


/* ================================================ */
/*           MOBILE RESPONSIVE STYLES               */
/* ================================================ */
@media (max-width: 768px) {

  /* Header */
  .header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .header-left {
    justify-content: center;
  }

  /* Buttons - wrap into balanced rows */
  .header-actions {
    width: 100%;
    max-width: 210px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
  }

  .header-actions .btn {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0.625rem;
    justify-content: center;
  }

  .header-actions .btn .btn-text {
    display: none;
  }

  .header-actions .btn svg {
    margin: 0;
  }

  .board-info {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Tool Panels - FORCE scrolling */
  .collapsible-tool-panel {
    position: relative;
    max-height: 70vh;
    overflow: hidden;
  }

  .collapsible-tool-panel.minimized {
    max-height: none;
    overflow: visible;
  }

  .collapsible-tool-panel:not(.minimized) .tool-panel-content {
    max-height: calc(70vh - 60px);
    overflow-y: scroll !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .collapsible-tool-panel:not(.minimized) {
    position: relative;
    z-index: 100;
    margin-bottom: 1rem;
  }

  .tool-panel-content {
    max-height: 50vh;
    /* Slightly smaller on very small screens to keep context */
  }

  /* Facilitator controls - FULL WIDTH BUTTONS */
  .tools-grid {
    grid-template-columns: 1fr !important;
    /* One item per row */
  }

  .tool-card {
    display: flex !important;
    flex-direction: row !important;
    /* Icon on left, text on right */
    align-items: center;
    text-align: left;
    padding: 1rem !important;
    gap: 1rem;
  }

  .tool-card button {
    width: 100%;
    justify-content: flex-start;
  }

  .tool-card-icon {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0;
  }

  /* Columns */
  .columns {
    flex-direction: column;
  }

  .column {
    min-width: 100%;
  }

  /* Modals */
  .modal {
    width: 95%;
    max-width: 95%;
  }

  .modal-large {
    width: 95%;
  }

  .phase-controls {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    /* Use fraction units to stay contained */
    gap: 0.5rem;
    /* Tighten gap for mobile */
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Make the 'Clear All Items' button span both columns to keep it 2x2 above it */

  .phase-controls .btn {
    width: 100% !important;
    padding: 0.625rem 0.25rem !important;
    /* Reduce horizontal padding */
    font-size: 0.8rem !important;
    /* Slightly smaller text for fit */
    justify-content: center;
    white-space: normal !important;
    /* Allow text to wrap if name is long */
    text-align: center;
    min-width: 0;
    /* Allows buttons to shrink below content size */
  }

  .phase-controls .btn svg {
    flex-shrink: 0;
    /* Prevents icons from squishing */
    margin: 0;
  }

  .timer-controls {
    display: flex;
    justify-content: center;
    /* Centers the group */
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
  }

  .timer-input {
    width: 60px;
    /* Slimmer for mobile */
  }

  /* Ensures the Clear All button flows into the grid normally */
  .phase-controls .btn-danger {
    grid-column: auto !important;
    /* Removes the span */
    width: 100% !important;
    margin: 0 !important;
    justify-content: center !important;
  }
}

/* Touch dragging support */
.item {
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.timer-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  color: white;
  padding: 0.75rem 1.5rem;
  z-index: 2000;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  animation: slideUp 0.3s ease-out;
}

/* 1 Minute Warning: Bold Yellowish bar */
.timer-footer.warning {
  background: #f1c40f !important;
  color: var(--primary-dark) !important;
  transition: background 0.5s ease;
}

/* 10 Second Danger: Red + Shake */
.timer-footer.danger {
  background: var(--danger) !important;
  color: white !important;
  animation: timer-shake 0.2s infinite alternate;
}

/* Fix Button Contrast: Force solid dark buttons during Warning/Danger */
.timer-footer.warning .btn-timer-footer,
.timer-footer.danger .btn-timer-footer {
  background: var(--primary-dark) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timer-footer.warning .btn-timer-footer:hover,
.timer-footer.danger .btn-timer-footer:hover {
  background: #000000 !important;
}

@keyframes timer-shake {
  0% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(2px);
  }
}

.timer-footer-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
  justify-content: center;
}

.timer-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'SF Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
}

.timer-footer-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-timer-footer {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
}

.btn-timer-footer:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .timer-footer-content {
    gap: 1rem;
    flex-direction: column;
    /* Stack timer and buttons on small phones */
  }

  .timer-status {
    font-size: 1.25rem;
  }

  /* Padding adjustment for the board so content isn't hidden behind footer */
  .container {
    padding-bottom: 100px;
  }
}

/* Positioning the counter relative to the textarea */
.add-item-form {
  position: relative;
  display: flex;
  flex-direction: column;
}

.character-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.25rem;
  font-family: 'SF Mono', monospace;
  font-variant-numeric: tabular-nums;
}

.character-counter.warning {
  color: var(--warning);
  font-weight: 600;
}

.character-counter.error {
  color: var(--danger);
  font-weight: 700;
}

.typing-indicator-container {
  min-height: 20px;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  animation: fadeIn 0.3s ease-out;
}

.typing-indicator svg {
  width: 12px;
  height: 12px;
  animation: bounce 1s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.presence-bar {
  display: flex;
  align-items: center;
  /* Adjust margin to align with the board title */
  margin-left: 0.5rem;
  padding-left: 8px;
}

.presence-dot {
  width: 28px;
  /* Slightly smaller to fit the sub-header height better */
  height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  margin-left: -10px;
  /* Tighter overlap */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  cursor: help;
  position: relative;
}

/* Ensure the dots stand out against the white sub-header */
.presence-dot:not(.is-me) {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.presence-dot:hover {
  transform: translateY(-4px) scale(1.1);
  z-index: 10;
}

/* Facilitator Dot Distinction */
.presence-dot.is-fac {
  border: 2px solid #f1c40f !important;
  /* Gold border */
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.4);
  z-index: 5;
}

/* The Crown Icon styling */
.presence-dot.is-fac::after {
  content: '👑';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* Subtle animation to show "Leadership" status */
.presence-dot.is-fac.is-me {
  animation: facilitator-glow 3s infinite alternate;
}

@keyframes facilitator-glow {
  from {
    box-shadow: 0 0 5px rgba(241, 196, 15, 0.3);
  }

  to {
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.6);
  }
}

/* Skeleton Card Styling */
.item-skeleton {
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  animation: skeleton-pulse 1.5s infinite ease-in-out;
  pointer-events: none;
  /* User can't interact with it */
  user-select: none;
}

.item-skeleton-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

@keyframes skeleton-pulse {
  0% {
    opacity: 0.4;
    transform: scale(0.98);
  }

  50% {
    opacity: 0.7;
    transform: scale(1);
  }

  100% {
    opacity: 0.4;
    transform: scale(0.98);
  }
}

/* --- Dot Voting Styles --- */
.dot-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.5rem;
}

.vote-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Dots for your own votes look slightly different */
.vote-dot.is-mine {
  background: var(--accent);
  border: 1px solid var(--primary-dark);
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

/* Update the vote button to feel more like an "Add" action */
.vote-btn {
  transition: all 0.2s;
}

.vote-btn:active {
  transform: scale(0.9);
}

/* Focus Mode Pulse */
.item.focused-card {
  border-color: var(--accent) !important;
  outline: 3px solid rgba(159, 189, 95, 0.6);
  outline-offset: 2px;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Subtle glow pulse */
.item.focused-card {
  animation: focus-pulse 2s infinite;
}

@keyframes focus-pulse {
  0% {
    outline: 3px solid rgba(159, 189, 95, 0.4);
    outline-offset: 2px;
  }

  50% {
    outline: 3px solid rgba(159, 189, 95, 0.8);
    outline-offset: 5px;
  }

  100% {
    outline: 3px solid rgba(159, 189, 95, 0.4);
    outline-offset: 2px;
  }
}

/* Apply the pulse to tool items when focused */
.action-item.focused-card,
.parking-item.focused-card {
  border-radius: 8px;
  background: var(--light-green);
  border: 2px solid var(--accent) !important;
}

/* Ensure the pulse looks great on large tool panels */
.collapsible-tool-panel.focused-card {
  border: 3px solid var(--accent) !important;
  box-shadow: 0 0 30px rgba(159, 189, 95, 0.5);
  transition: all 0.4s ease;
}

.focus-panel-btn {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.focus-panel-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Network Status Indicator */
.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 10px;
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0;
  /* Prevent shrinking on mobile */
}

.status-indicator.online {
  background-color: #2ecc71;
  /* Emerald Green */
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
  animation: heartbeat 4s infinite ease-in-out;
}

.status-indicator.offline {
  background-color: var(--danger);
  box-shadow: 0 0 12px rgba(200, 90, 84, 0.8);
  animation: alert-blink 0.5s infinite alternate;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes alert-blink {
  from {
    opacity: 1;
    transform: scale(1.1);
  }

  to {
    opacity: 0.3;
    transform: scale(1);
  }
}

.tool-btn.active {
  background-color: var(--primary);
  color: white;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  border-color: var(--primary-dark);
}

.card.editing {
  box-shadow: 0 0 0 3px var(--primary);
  border-color: var(--primary);
}

.card.editing .item-text {
  background: var(--light-green);
  padding: 0.5rem;
  border-radius: 4px;
}

.export-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.export-options .btn {
  width: 100%;
  justify-content: center;
}

.timer-presets {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #4a9960;
    --primary-dark: #3d7d4e;
    --dark: #f8f9f7;
    --light: #1a1a1a;
    --text: #e5e5e5;
    --text-muted: #9ca3af;
    --border: #3d3d3d;
    --shadow: rgba(0, 0, 0, 0.3);
  }

  body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  }
}

/* Card Editing State */
.item.editing {
  box-shadow: 0 0 0 3px var(--primary);
  border-color: var(--primary);
  background: var(--light-green);
}

.item.editing .item-text {
  background: white;
  padding: 0.5rem;
  border-radius: 4px;
  outline: none;
}

.item.editing .item-text:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Fix hover area - ensure entire card is hoverable */
.item * {
  pointer-events: none;
}

.item {
  pointer-events: auto;
  cursor: pointer;
}

.item-action-btn,
.vote-btn,
button {
  pointer-events: auto;
  cursor: pointer;
}

/* ============================================================================
   ONBOARDING TUTORIAL STYLES
   ============================================================================ */

.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background removed - darkening handled by spotlight box-shadow */
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
  pointer-events: none;
  /* Let clicks pass through to spotlight/tooltip */
}

.onboarding-spotlight {
  position: absolute;
  background: none;
  border: 3px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85);
  transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.4s ease,
    height 0.4s ease;
  pointer-events: none;
  z-index: 10001;
}

.onboarding-tooltip {
  position: absolute;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 400px;
  width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10002;
  transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideUp 0.3s ease-out;
  pointer-events: auto;
  /* Tooltip needs to capture clicks */
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.onboarding-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.onboarding-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

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

.onboarding-close svg {
  width: 20px;
  height: 20px;
}

.onboarding-content {
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
  font-size: 0.9375rem;
}

.onboarding-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.onboarding-progress {
  flex: 1;
  text-align: center;
}

.onboarding-step-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* Dark mode support for onboarding */
body.dark-mode .onboarding-tooltip {
  background: #1a1a1a;
  color: #e5e5e5;
  border: 1px solid #444444;
}

body.dark-mode .onboarding-title {
  color: var(--primary);
}

body.dark-mode .onboarding-content {
  color: #e5e5e5;
}

body.dark-mode .onboarding-footer .btn-primary {
  color: #1a1a1a !important;
}

body.dark-mode .onboarding-spotlight {
  background: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.90);
}

/* Mobile responsive onboarding */
@media (max-width: 768px) {
  .onboarding-tooltip {
    max-width: calc(100vw - 2rem);
    padding: 1rem;
  }

  .onboarding-title {
    font-size: 1.125rem;
  }

  .onboarding-content {
    font-size: 0.875rem;
  }

  .onboarding-footer {
    flex-direction: column;
    gap: 0.75rem;
  }

  .onboarding-footer .btn {
    width: 100%;
  }

  .onboarding-progress {
    order: -1;
  }
}



/* ===================================
   FACILITATOR MANAGEMENT STYLES

/* Manage Facilitators Modal Styles */
.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.modal-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-body p {
  margin: 0 0 1rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.user-promote-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-promote-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.user-promote-item:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
}

.user-promote-item .user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-promote-item .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-promote-item .user-name {
  font-weight: 500;
  color: var(--text);
}

.badge-small {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.btn-modal-sm {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-primary {
  background: var(--primary);
  color: white;
}

.btn-modal-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

.btn-modal-secondary:hover {
  background: var(--border);
  border-color: var(--primary);
}

/* Dark mode support */
body.dark-mode .modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

body.dark-mode .modal-header {
  border-bottom-color: var(--border);
}

body.dark-mode .user-promote-item {
  background: var(--bg-secondary);
}

body.dark-mode .user-promote-item:hover {
  background: var(--bg-primary);
}

/* Crown badge for facilitators */
.crown-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.crown-badge svg {
  width: 100%;
  height: 100%;
}

/* --- EDIT MODE UX FIXES --- */

/* 1. Remove the grab/pointer hand from the card itself while editing */
.item.editing,
.item.editing[draggable="true"] {
  cursor: default !important;
}

/* 2. Force the text cursor and enable direct mouse clicks on the text area */
.item.editing .item-text {
  cursor: text !important;
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

#feedback-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  #feedback-btn {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    padding: 12px;
  }

  #feedback-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Hide the default floating badge */
.grecaptcha-badge {
  visibility: hidden !important;
}