/* ── Dashboard ────────────────────────────────────────────────────────────────── */

/* Nebula bg animation */
.nebula-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.nebula-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: nebula-rotate linear infinite;
}

.nebula-blob-1 {
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(123,47,190,0.18) 0%, transparent 70%);
  top: -100px;
  right: -150px;
  animation-duration: 45s;
}

.nebula-blob-2 {
  width: 500px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(224,86,253,0.08) 0%, transparent 70%);
  bottom: 0;
  left: -100px;
  animation-duration: 65s;
  animation-direction: reverse;
}

.nebula-blob-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(90,31,150,0.12) 0%, transparent 70%);
  top: 40%;
  left: 40%;
  animation-duration: 80s;
}

/* ── Quick Launch ───────────────────────────────────────────────────────────── */

.quick-launch-card {
  background: linear-gradient(135deg, rgba(123,47,190,0.14), rgba(224,86,253,0.05));
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  max-width: 820px;
  box-shadow: 0 0 50px rgba(123,47,190,0.1);
}

.ql-layout-v2 {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.ql-left-pane {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.quick-launch-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quick-launch-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 16px rgba(224,86,253,0.35);
}

.quick-launch-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.quick-launch-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.quick-launch-input {
  width: 100%;
  min-height: 90px;
  font-size: 0.95rem;
  resize: vertical;
  font-family: inherit;
}

/* Timer presets + on-topic-sites link share one row under the textbox. */
.ql-preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

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

.ql-pill {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.ql-pill:hover {
  border-color: rgba(224,86,253,0.4);
  color: var(--text);
}

.ql-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 14px rgba(224,86,253,0.3);
}

.ql-add-topic-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.ql-add-topic-link:hover {
  color: var(--text);
}

/* Right pane: selected timer summary + launch button */
.ql-right-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  min-width: 200px;
  border-left: 1px solid var(--card-border);
  padding-left: 1.25rem;
}

.ql-selected-timer-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.ql-selected-timer-value {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
}

.ql-selected-timer-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.ql-launch-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .ql-layout-v2 { grid-template-columns: 1fr; }
  .ql-right-pane { border-left: none; border-top: 1px solid var(--card-border); padding-left: 0; padding-top: 1rem; }
  .ql-preset-row { flex-direction: column; align-items: flex-start; }
}

/* Custom timer modal — the shared .timer-toggle/.timer-toggle-btn (flow.css)
   size themselves to fit three buttons' natural (uppercase, wide-tracking)
   width, which is fine in a full-width page but overflows this modal's
   narrower content area — the Stopwatch button in particular got clipped by
   .timer-toggle's overflow:hidden. Force it to actually fill the available
   width instead of sizing to content, and trim each button enough to fit. */
#ql-timer-modal .timer-toggle {
  width: 100%;
}

#ql-timer-modal .timer-toggle-btn {
  padding: 0.6rem 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

/* Duration input's text-align inherits the modal's centered text-align — the
   number itself reads fine centered, but left-align the label/helper so they
   don't look like stray floating fragments above a centered field. */
#ql-timer-modal .form-label,
#ql-timer-modal .form-helper {
  text-align: left;
}

/* ── Extension notice banner ───────────────────────────────────────────────── */

/* Hides banner instantly when the extension is installed (set at document_start) */
html[data-taskgalaxy-ext] #ext-notice { display: none !important; }

.ext-notice {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(224, 86, 253, 0.07);
  border: 1px solid rgba(224, 86, 253, 0.28);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.ext-notice-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.ext-notice-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ext-notice-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.ext-notice-sub {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.ext-notice-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(123, 47, 190, 0.15);
  border: 1px solid rgba(123, 47, 190, 0.35);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  cursor: not-allowed;
  opacity: 0.75;
}

.ext-notice-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
  transition: color 0.15s;
}

.ext-notice-dismiss:hover { color: var(--text); }

.ext-notice-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

.ext-notice-soon {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(224, 86, 253, 0.12);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}

/* Page layout */
.dashboard-page {
  padding: clamp(2rem, 5vw, 3rem) 0 4rem;
}

.dashboard-header {
  margin-bottom: 1.5rem;
}

.greeting {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.dashboard-title {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.dashboard-header-left {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  width: 100%;
}

/* ── Thin dashboard section nav (Home / History / Analytics) ──────────────── */
.dashboard-nav {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.75rem;
}

.dashboard-nav-item {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}

.dashboard-nav-item:hover {
  color: var(--text);
  background: rgba(123,47,190,0.1);
}

.dashboard-nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

/* Quick Launch + Stats share a row. align-items is flex-start (not stretch) —
   Quick Launch's height varies with its own content (on-topic chips wrapping,
   the customize panel opening) and none of that should ripple into Stats and
   spread its rows apart to match. */
.ql-stats-row {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.ql-stats-row .quick-launch-card {
  flex: 2.6;
  max-width: none;
  margin-bottom: 0;
  padding: 1.7rem 1.9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Stats — compact column, beside Quick Launch */
.stats-compact-card {
  flex: 1;
  min-width: 220px;
  background: linear-gradient(135deg, rgba(123,47,190,0.1), rgba(224,86,253,0.04));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats-compact-card .stat-card-label { font-size: 0.62rem; margin-bottom: 0.15rem; }
.stats-compact-card .stat-card-value { font-size: 1.1rem; }
.stats-compact-card .stat-card-sub { font-size: 0.68rem; }

@media (max-width: 900px) {
  .ql-stats-row { flex-direction: column; }
}

.stat-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  position: relative;
  transition: opacity var(--transition);
}

.stat-card:hover {
  opacity: 0.85;
}

.stat-card-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.stat-card-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--text), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-value.accent {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-card-value.accent-green {
  background: linear-gradient(135deg, #34d399, #6ee7b7);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-card-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* Section headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Active session banner */
.active-banner {
  background: linear-gradient(135deg, rgba(123,47,190,0.2), rgba(224,86,253,0.12));
  border: 1px solid rgba(224,86,253,0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(16px);
  animation: glow-pulse 3s ease-in-out infinite;
  flex-wrap: wrap;
}

.active-banner-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.active-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow);
  animation: scan-pulse 1.2s ease-in-out infinite;
}

.active-banner-text strong {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.active-banner-text p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  max-width: 100%;
}

/* Session cards */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.session-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(12px);
  transition: all var(--transition);
  cursor: default;
}

.session-card:hover {
  border-color: rgba(123,47,190,0.4);
  background: rgba(123,47,190,0.12);
}

.session-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(123,47,190,0.25), rgba(224,86,253,0.15));
  border: 1px solid rgba(123,47,190,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.session-card-body { flex: 1; min-width: 0; }

.session-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.session-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.session-card-actions {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.session-points {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.empty-state p { font-size: 0.875rem; max-width: 32ch; margin: 0 auto; }

/* Flow cards (My Flows) */
.flows-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* Flow folder cards (Flow -> Orbits) */
.flow-folder-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.4rem;
  backdrop-filter: blur(12px);
  transition: all var(--transition);
}

.flow-folder-card:hover {
  border-color: rgba(123,47,190,0.4);
}

.flow-folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  text-decoration: none;
  color: var(--text);
}

.flow-folder-name {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-folder-topic {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-folder-view {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: color var(--transition);
}

.flow-folder-arrow {
  display: inline-block;
  transition: transform var(--transition);
}

.flow-folder-header:hover .flow-folder-view {
  color: var(--accent);
}

.flow-folder-header:hover .flow-folder-arrow {
  transform: translateX(3px);
}

.flow-folder-tasks {
  margin-bottom: 1rem;
}

.flow-folder-new-task {
  text-align: center;
}

/* Blocked sites */
.blocks-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
}

.blocks-add-form {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.blocks-add-form .form-control { flex: 1; min-height: 44px; }

.block-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 240px;
  overflow-y: auto;
}

.block-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: rgba(123,47,190,0.08);
  border: 1px solid rgba(123,47,190,0.15);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  gap: 0.75rem;
}

.block-domain { color: var(--text); font-weight: 500; }

.block-remove {
  background: none;
  border: none;
  color: var(--subtle);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
  flex-shrink: 0;
}

.block-remove:hover { color: var(--danger); }

.blocks-empty {
  color: var(--subtle);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.25rem;
}

/* ── On-topic site picker ──────────────────────────────────────────────────── */
.site-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.site-picker-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(123,47,190,0.18);
  background: rgba(123,47,190,0.04);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.site-picker-item:hover {
  background: rgba(123,47,190,0.1);
  border-color: rgba(224,86,253,0.4);
  transform: translateY(-1px);
}

.site-picker-item:has(input:checked) {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(123,47,190,0.22), rgba(224,86,253,0.1));
  box-shadow: 0 0 18px rgba(224,86,253,0.16);
}

/* Custom checkbox — gradient-fill + checkmark to match the site's toggle-pill look */
.site-picker-item input[type="checkbox"] {
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  margin: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(123,47,190,0.45);
  background: rgba(6,0,15,0.4);
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
}

.site-picker-item input[type="checkbox"]:hover {
  border-color: var(--accent);
}

.site-picker-item input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 0 10px rgba(224,86,253,0.5);
}

.site-picker-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.site-picker-favicon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

.site-picker-domain {
  font-size: 0.85rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--transition), font-weight var(--transition);
}

.site-picker-item:has(input:checked) .site-picker-domain {
  color: #fff;
  font-weight: 600;
}

.on-topic-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.on-topic-chips {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.on-topic-chips:empty { display: none; }

.on-topic-add-btn {
  align-self: flex-start;
  background: none;
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--transition), color var(--transition);
}

.on-topic-add-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ── Focus Shield preset rows ──────────────────────────────────────────────── */
.blocks-presets-section { margin-bottom: 1.25rem; }

.blocks-sub-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-bottom: 0.55rem;
}

.db-preset-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.db-preset-row {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(123,47,190,0.04);
  transition: border-color 0.15s;
}
.db-preset-row:hover { border-color: rgba(123,47,190,0.3); }

.db-preset-row-header {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.55rem 0.35rem 0.7rem;
  gap: 0.4rem;
}

.db-preset-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--subtle);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.3rem;
  border-radius: 6px;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.db-preset-toggle-btn:hover { background: rgba(123,47,190,0.07); color: var(--text); }
.db-preset-toggle-btn.active  { color: var(--accent); }
.db-preset-toggle-btn.partial { color: #f59e0b; }

.db-preset-count {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  color: var(--subtle);
  flex-shrink: 0;
  white-space: nowrap;
}
.db-preset-count.active  { background: rgba(123,47,190,0.15); color: var(--accent); }
.db-preset-count.partial { background: rgba(245,158,11,0.12);  color: #f59e0b; }

.db-preset-expand-btn {
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--subtle);
  cursor: pointer;
  padding: 0.3rem 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.12s, border-color 0.12s;
}
.db-preset-expand-btn:hover { color: var(--text); border-color: rgba(123,47,190,0.4); }
.db-preset-expand-btn.open  { color: var(--accent); border-color: rgba(123,47,190,0.4); }
.db-preset-expand-btn svg   { transition: transform 0.2s; }
.db-preset-expand-btn.open svg { transform: rotate(180deg); }

.db-preset-body {
  border-top: 1px solid var(--card-border);
  padding: 0.75rem 0.85rem;
  background: rgba(6,0,15,0.3);
}

.db-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
  max-height: 90px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(123,47,190,0.25) transparent;
}
.db-preset-chips::-webkit-scrollbar       { width: 3px; }
.db-preset-chips::-webkit-scrollbar-thumb { background: rgba(123,47,190,0.3); border-radius: 2px; }

.db-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 0.15rem 0.35rem 0.15rem 0.55rem;
  font-size: 0.775rem;
  color: var(--subtle);
  transition: border-color 0.12s;
}
.db-preset-chip.blocked {
  background: rgba(123,47,190,0.12);
  border-color: rgba(123,47,190,0.35);
  color: var(--accent);
}

.db-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--subtle);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 0.1rem;
  transition: color 0.12s;
  flex-shrink: 0;
}
.db-chip-remove:hover { color: var(--danger); }

.db-add-preset-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.db-add-preset-row .form-control {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  min-height: 36px;
}
.db-add-preset-row .btn { white-space: nowrap; }

/* Dashboard layout — single column; Focus Shield stacks below the workspace */
.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}


@media (max-width: 480px) {
  .active-banner { flex-direction: column; align-items: flex-start; }
}

/* Rank banner */
.rank-banner {
  background: linear-gradient(135deg, rgba(123,47,190,0.16), rgba(224,86,253,0.07));
  border: 1px solid rgba(123,47,190,0.28);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 260px;
}

.rank-badge-section {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.rank-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.rank-label-text {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.rank-name-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rank-progress-section {
  flex: 1;
  min-width: 180px;
}

.rank-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  gap: 0.5rem;
}

.rank-progress-bar {
  height: 5px;
  background: rgba(123,47,190,0.2);
  border-radius: 999px;
  overflow: hidden;
}

.rank-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.rank-max-text {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.usage-banner {
  background: linear-gradient(135deg, rgba(123,47,190,0.12), rgba(224,86,253,0.05));
  border: 1px solid rgba(123,47,190,0.24);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.usage-banner--full {
  background: linear-gradient(135deg, rgba(230,110,60,0.16), rgba(230,110,60,0.06));
  border-color: rgba(230,110,60,0.35);
}

.usage-banner-info { flex: 1; min-width: 220px; }

.usage-banner-label {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.usage-progress-bar {
  height: 6px;
  background: rgba(123,47,190,0.18);
  border-radius: 999px;
  overflow: hidden;
}

.usage-banner--full .usage-progress-bar { background: rgba(230,110,60,0.2); }

.usage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.usage-banner--full .usage-progress-fill { background: linear-gradient(90deg, #e67e22, #e65e3c); }

.usage-banner-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.usage-banner--full .usage-banner-meta { color: #e65e3c; font-weight: 600; }

@media (max-width: 600px) {
  .rank-banner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .rank-progress-section { max-width: 100%; width: 100%; }
}

/* Streak stat card extras */
.streak-stat-card { position: relative; }

.streak-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(224, 86, 253, 0.1);
  border: 1px solid rgba(224, 86, 253, 0.25);
  border-radius: 99px;
  padding: 0.15rem 0.55rem;
}

/* Goals grid */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.875rem;
}

.goal-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  backdrop-filter: blur(12px);
  transition: border-color var(--transition);
}

.goal-card:hover { border-color: rgba(123,47,190,0.4); }

.goal-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.goal-info { flex: 1; min-width: 0; }

.goal-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.goal-type-badge {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  width: fit-content;
}

.goal-type-streak { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
.goal-type-time   { background: rgba(123,47,190,0.15); color: var(--primary-light); border: 1px solid rgba(123,47,190,0.3); }
.goal-type-points { background: rgba(224,86,253,0.1); color: var(--accent); border: 1px solid rgba(224,86,253,0.25); }

.goal-reward {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.goal-delete-btn {
  background: none;
  border: none;
  color: var(--subtle);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
  flex-shrink: 0;
}

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

.goal-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.goal-progress-bar {
  height: 4px;
  background: rgba(123,47,190,0.2);
  border-radius: 99px;
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px;
  transition: width 0.6s ease;
}

.goal-empty-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 96px;
  background: none;
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-lg);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  width: 100%;
}

.goal-empty-slot:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(224,86,253,0.05);
}

.goal-empty-icon {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
}

/* Goal picker list (modal) */
.goal-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.goal-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(123,47,190,0.2);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  background: none;
  font-family: inherit;
  color: var(--text);
  width: 100%;
  transition: all var(--transition);
}

.goal-picker-item:hover {
  border-color: var(--accent);
  background: rgba(224,86,253,0.08);
}

.goal-picker-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.goal-picker-item-target {
  font-size: 0.75rem;
  color: var(--muted);
}

.goal-picker-empty {
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

/* "Are you ready?" modal */
.ready-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 0, 15, 0.85);
  backdrop-filter: blur(14px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fade-in 0.2s ease forwards;
}

/* The site picker is opened from inside the "Start a new run" modals
   (#qs-modal, #start-modal), which use an inline z-index of 1000 — well
   above --z-modal (200). Without this override the picker rendered behind
   whichever modal launched it, making it effectively unreachable. */
#site-picker-modal { z-index: 1100; }

/* Opened from the same "Start a new run" modals as the site picker above. */
#prestart-tips-modal { z-index: 1100; }

.pretask-tips-list {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pretask-tips-list li {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  padding-left: 1.4rem;
  position: relative;
}

.pretask-tips-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

.pretask-tips-dontshow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 1.25rem;
}

.ready-modal {
  background: rgba(17, 8, 32, 0.96);
  border: 1px solid rgba(123,47,190,0.4);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(123,47,190,0.2);
  animation: fade-in 0.25s ease forwards;
}

.ready-modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.ready-modal-sub {
  font-size: 0.88rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.ready-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Import Tasks checklist ─────────────────────────────────────────────────── */

.import-task-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
}

.import-task-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(123,47,190,0.2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.import-task-item:hover {
  border-color: var(--accent);
  background: rgba(224,86,253,0.07);
}

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

.import-task-name {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-task-location {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(123,47,190,0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

/* ── + New dropdown button ─────────────────────────────────────────────────── */

.new-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.new-btn-caret {
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 0.2s;
}

.new-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: rgba(17, 8, 32, 0.98);
  border: 1px solid rgba(123,47,190,0.4);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 200;
  overflow: hidden;
  animation: fade-in 0.12s ease;
}

.new-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.875rem 1.1rem;
  text-decoration: none;
  color: var(--text);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(123,47,190,0.15);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
  transition: background 0.15s;
}

.new-dropdown-item:last-child { border-bottom: none; }

.new-dropdown-item:hover {
  background: rgba(123,47,190,0.15);
}

.new-dropdown-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(123,47,190,0.15);
  border-radius: var(--radius-sm);
}

.new-dropdown-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.new-dropdown-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* ── Workspace column layout ───────────────────────────────────────────────── */

.workspace-col { display: flex; flex-direction: column; }

.workspace-section { /* nothing extra needed — uses section-header already */ }

/* ── Mission Queue: Tasks + Pods split workspace ───────────────────────────── */

.mission-queue-split {
  display: flex;
  align-items: stretch;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(123,47,190,0.09), rgba(224,86,253,0.03));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.85rem;
}

.workspace-half {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: flex 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-half-body {
  min-width: 0;
  max-height: 4000px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 280ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 200ms ease;
}

.workspace-half.minimized .workspace-half-body {
  max-height: 0;
  opacity: 0;
  transition: max-height 280ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 150ms ease;
}

.workspace-half.minimized {
  /* Fixed basis, not auto — the collapsed body's max-height:0 only clips its
     height, not its content's intrinsic width, so flex:0 0 auto still sized
     this to its (still-present, just hidden) content and could end up wider
     than expected instead of shrinking. */
  flex: 0 0 200px;
  overflow: hidden;
}

.workspace-half-divider {
  width: 2px;
  align-self: stretch;
  background: rgba(123,47,190,0.35);
  border-radius: 2px;
  flex-shrink: 0;
}

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

.workspace-half-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.workspace-half-count {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--subtle);
  background: rgba(123,47,190,0.12);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

.workspace-half-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Hide "+ New" while minimized — only the toggle button (not .btn-classed)
   stays visible so the user can still expand back out. */
.workspace-half.minimized .workspace-half-actions .btn {
  display: none;
}

.half-toggle-btn {
  background: rgba(123,47,190,0.1);
  border: 1px solid rgba(123,47,190,0.3);
  color: var(--muted);
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 7px;
  font-size: 0.75rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.half-toggle-btn:hover {
  color: var(--text);
  background: rgba(123,47,190,0.2);
  border-color: rgba(123,47,190,0.55);
}

@media (max-width: 900px) {
  .mission-queue-split { flex-direction: column; }
  .workspace-half-divider { width: 100%; height: 1px; }
  /* Stacked layout is flex-direction:column here, so flex-basis governs
     height, not width — the fixed 200px basis from the desktop rule would be
     wrong; let height follow the already-collapsed body instead. */
  .workspace-half.minimized { flex-basis: auto; }
}

/* ── Goals + Focus Shield, leveled side by side ────────────────────────────── */
.dashboard-bottom-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .dashboard-bottom-split { grid-template-columns: 1fr; }
}

/* ── Task cards (dashboard flat list) ─────────────────────────────────────── */

.standalone-tasks-list,
.pod-tasks {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.task-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  backdrop-filter: blur(12px);
  transition: border-color var(--transition), background var(--transition);
}

.task-card:hover {
  border-color: rgba(123,47,190,0.4);
  background: rgba(123,47,190,0.08);
}

.task-card--pod {
  border-radius: var(--radius);
  background: rgba(123,47,190,0.04);
  border-color: rgba(123,47,190,0.12);
}

.task-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(123,47,190,0.25), rgba(224,86,253,0.15));
  border: 1px solid rgba(123,47,190,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.task-card-body { flex: 1; min-width: 0; }

.task-card-name {
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* ── Pod folder (collapsible) ──────────────────────────────────────────────── */

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

.pod-folder {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: border-color var(--transition);
}

.pod-folder:hover {
  border-color: rgba(123,47,190,0.35);
}

.pod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
  transition: background 0.15s;
}

.pod-header:hover {
  background: rgba(123,47,190,0.07);
}

.pod-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.pod-folder-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.pod-name {
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pod-desc {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pod-header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.pod-meta-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  border-radius: 99px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

.pod-open-btn {
  white-space: nowrap;
}

.pod-chevron {
  flex-shrink: 0;
  color: var(--subtle);
  transition: transform 0.22s ease;
}

.pod-chevron--open {
  transform: rotate(180deg);
}

.pod-body {
  border-top: 1px solid transparent;
  padding: 0 1.1rem;
  background: rgba(6,0,15,0.2);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.32s ease, opacity 0.26s ease, padding-top 0.32s ease, border-color 0.32s ease;
}

.pod-body.pod-body--open {
  border-top-color: var(--card-border);
  padding-top: 0.85rem;
  opacity: 1;
}

.pod-empty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: var(--muted);
  padding: 0.5rem 0 0.85rem;
}

/* ── Completed tasks (collapsible) ─────────────────────────────────────────── */

.completed-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.completed-toggle:hover {
  border-color: rgba(74,222,128,0.3);
  background: rgba(74,222,128,0.05);
}

.completed-chevron {
  flex-shrink: 0;
  color: var(--subtle);
  transition: transform 0.22s ease;
}

.completed-chevron--open {
  transform: rotate(180deg);
}

.session-card--completed,
.task-card--completed {
  opacity: 0.72;
}

.task-card--completed {
  cursor: default;
}

.pod-footer {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(123,47,190,0.1);
  margin-top: 0.75rem;
  text-align: center;
}

/* ── Inline empty state ────────────────────────────────────────────────────── */

.empty-state-inline {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.2rem 1.4rem;
  background: rgba(123,47,190,0.04);
  border: 1px dashed rgba(123,47,190,0.2);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.empty-state-inline-icon {
  font-size: 1.5rem;
  opacity: 0.5;
  flex-shrink: 0;
}

.empty-state-inline-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.text-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: opacity 0.15s;
}

.text-link:hover { opacity: 0.75; }

/* ── Drag-and-drop: move tasks into pods ───────────────────────────────────── */

.task-card[draggable="true"] {
  cursor: grab;
  user-select: none;
}

.task-drag-handle {
  flex-shrink: 0;
  width: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0;
  cursor: grab;
  transition: opacity 0.15s;
}

.task-card:hover .task-drag-handle { opacity: 0.4; }
.task-card.is-dragging .task-drag-handle { opacity: 0; }

.task-card.is-dragging {
  opacity: 0.32;
  pointer-events: none;
}

.pod-folder.drag-over {
  border-color: rgba(123,47,190,0.65);
  background: rgba(123,47,190,0.07);
  box-shadow: 0 0 0 2px rgba(123,47,190,0.18) inset;
}

#standalone-section {
  border-radius: var(--radius-lg);
  transition: box-shadow 0.15s, background 0.15s;
}

#standalone-section.drag-over {
  background: rgba(123,47,190,0.05);
  box-shadow: 0 0 0 2px rgba(123,47,190,0.25) inset;
}

.drag-hint-text {
  font-size: 0.72rem;
  color: var(--subtle);
  margin: -0.35rem 0 0.75rem;
  letter-spacing: 0.01em;
}
