/* ============================================================
   Wildlife Park Planning OS -- Styles
   Dark mode first, glassmorphism, premium dashboard aesthetic
   ============================================================ */

:root {
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.15);
  --accent-glow: rgba(16, 185, 129, 0.35);

  --bg-base: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-surface: rgba(255, 255, 255, 0.04);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-glass-hover: rgba(255, 255, 255, 0.09);
  --bg-input: rgba(0, 0, 0, 0.25);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.62);
  --text-muted: rgba(255, 255, 255, 0.38);

  --sidebar-w: 248px;
  --topnav-h: 64px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-base: #f4f5f7;
  --bg-elevated: #ffffff;
  --bg-surface: rgba(0, 0, 0, 0.02);
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-hover: rgba(255, 255, 255, 0.9);
  --bg-input: rgba(0, 0, 0, 0.04);

  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);

  --text: rgba(0, 0, 0, 0.88);
  --text-secondary: rgba(0, 0, 0, 0.58);
  --text-muted: rgba(0, 0, 0, 0.38);

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
}

/* ─── Reset & Base ─── */

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

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.55;
  overflow: hidden;
  height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, var(--accent-soft), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(99, 102, 241, 0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
}

textarea { resize: vertical; }

/* ─── Icons ─── */

.icon, .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon svg, .brand-icon svg {
  width: 100%;
  height: 100%;
}

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

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

/* ─── Sidebar ─── */

.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--bg-glass-hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-version {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─── Main Wrap ─── */

.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

/* ─── Top Navigation ─── */

.topnav {
  height: var(--topnav-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}

.topnav-left { flex-shrink: 0; }

.page-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.topnav-center {
  flex: 1;
  max-width: 480px;
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-size: 0.88rem;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.search-results.open { display: block; }

.search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  transition: background var(--transition);
}

.search-result:hover { background: var(--bg-glass-hover); }

.search-result-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.search-result-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.search-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.progress-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.progress-pill-bar {
  width: 48px;
  height: 4px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.progress-pill-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 400ms ease;
}

.phase-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent-soft);
  border-radius: 20px;
  font-size: 0.8rem;
}

.phase-label {
  color: var(--text-muted);
  font-weight: 500;
}

.phase-value {
  font-weight: 600;
  color: var(--accent);
}

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.theme-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-strong);
}

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

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ─── Content Area ─── */

.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 48px;
  scroll-behavior: smooth;
}

.page {
  display: none;
  animation: fadeIn 300ms ease;
}

.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.page-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

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

.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.glass-card:hover {
  border-color: var(--border-strong);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
  gap: 12px;
}

.card-header h3 {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body {
  padding: 14px 22px 22px;
}

/* ─── Grids ─── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sections-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

.stat-card {
  padding: 20px 22px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.stat-card .stat-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  color: var(--accent);
  margin-bottom: 14px;
}

.stat-card .stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-value-sm {
  font-size: 1rem;
  font-weight: 600;
}

.stat-bar {
  margin-top: 12px;
  height: 3px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 500ms ease;
}

/* ─── Form Elements ─── */

.editable-area {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  line-height: 1.6;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 60px;
}

.editable-area:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.editable-area-lg {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
}

.input-field {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition);
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-sm {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  outline: none;
  font-size: 0.82rem;
  width: 100%;
  transition: border-color var(--transition);
}

.input-sm:focus { border-color: var(--accent); }

select.input-sm { cursor: pointer; }

/* ─── Buttons ─── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-strong);
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all var(--transition);
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: all var(--transition);
  flex-shrink: 0;
}

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

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-icon.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.file-btn {
  cursor: pointer;
}

/* ─── Badge ─── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ─── Checklist ─── */

.checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.88rem;
}

.check-item:hover { background: var(--bg-surface); }

.check-item input { display: none; }

.check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.check-box .check-icon {
  width: 12px;
  height: 12px;
  opacity: 0;
  color: #fff;
  transition: opacity var(--transition);
}

.check-item input:checked + .check-box {
  background: var(--accent);
  border-color: var(--accent);
}

.check-item input:checked + .check-box .check-icon { opacity: 1; }

.check-item input:checked ~ span:last-child {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ─── Quick Links ─── */

.quick-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* ─── Mood Board ─── */

.mood-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mood-slot {
  aspect-ratio: 4/3;
  background: var(--bg-input);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: border-color var(--transition);
}

.mood-slot:hover { border-color: var(--accent); }

/* ─── Data Tables ─── */

.data-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.data-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

/* ─── Asset Library ─── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.filter-chip {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: all var(--transition);
}

.filter-chip:hover { border-color: var(--border-strong); }

.filter-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.asset-table-wrap { overflow-x: auto; }

.asset-table { min-width: 900px; }

.asset-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr 1fr 1.5fr 40px;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.asset-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr 1fr 1.5fr 40px;
  gap: 8px;
  padding: 8px 16px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.asset-row:hover { background: var(--bg-surface); }

.asset-row:last-child { border-bottom: none; }

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

.prompt-card {
  position: relative;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.prompt-card .input-field { margin-bottom: 8px; }

.prompt-card .btn-danger {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  padding: 0;
}

/* ─── Kanban Board ─── */

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  min-height: 500px;
}

.kanban-column {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.kanban-cards {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
  transition: background var(--transition);
}

.kanban-cards.drag-over {
  background: var(--accent-soft);
  border-radius: 0 0 var(--radius) var(--radius);
}

.kanban-card {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: all var(--transition);
}

.kanban-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.kanban-card.dragging {
  opacity: 0.5;
  transform: scale(0.97);
}

.kanban-card-grip {
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.kanban-card-grip svg { width: 14px; height: 14px; }

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

.kanban-card-title {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  outline: none;
  word-break: break-word;
}

.kanban-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.priority-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.priority-critical { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.priority-high { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.priority-medium { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.priority-low { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }

.tag {
  font-size: 0.68rem;
  padding: 2px 6px;
  background: var(--bg-surface);
  border-radius: 4px;
  color: var(--text-muted);
}

.kanban-delete {
  width: 24px;
  height: 24px;
  opacity: 0;
  transition: opacity var(--transition);
}

.kanban-card:hover .kanban-delete { opacity: 1; }

/* ─── Journal ─── */

.journal-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.journal-entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px 0;
}

.journal-hours {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.journal-hours label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.input-hours { width: 64px; text-align: center; }

.journal-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 22px 22px;
}

.journal-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.journal-field:first-child {
  grid-column: 1 / -1;
}

/* ─── Charts ─── */

.chart-card .card-body {
  padding: 10px 16px 16px;
}

.chart-card canvas {
  width: 100%;
  display: block;
}

/* ─── Settings ─── */

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.setting-row:last-child { border-bottom: none; }

.setting-row label {
  font-size: 0.88rem;
  font-weight: 600;
}

.setting-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.danger-row label { color: #ef4444; }

.accent-swatches {
  display: flex;
  gap: 8px;
}

.accent-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.accent-swatch:hover { transform: scale(1.1); }

.accent-swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg-base);
}

/* ─── Scrollbar ─── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Responsive ─── */

@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban-board { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -260px;
    transition: left var(--transition);
    z-index: 50;
  }

  .sidebar.open { left: 0; }

  .main-wrap { margin-left: 0; }

  .grid-2 { grid-template-columns: 1fr; }

  .kanban-board { grid-template-columns: 1fr 1fr; }

  .topnav-center { display: none; }

  .journal-fields { grid-template-columns: 1fr; }

  .data-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 40px; }
  .topnav { padding: 0 16px; }
  .phase-pill .phase-label { display: none; }
}
