/* =============================================
   Dashboard -- Sidebar + Folders + Playlist Grid
   ============================================= */

.dash-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ---- Welcome ---- */
.dash-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 28px;
}
.dash-greeting {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 4px;
}
.dash-email {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.dash-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.dash-action-primary {
  background: var(--primary);
  color: white;
}
.dash-action-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ---- Layout ---- */
.dash-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
}

/* ---- Sidebar ---- */
.dash-sidebar {
  background: white;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.dash-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-sidebar-btn {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #374151;
  transition: background 0.15s, color 0.15s;
}
.dash-sidebar-btn:hover { background: #f9fafb; }
.dash-sidebar-btn.active,
.dash-sidebar-folder-row.active .dash-sidebar-btn {
  background: #E3F1EE;
  color: #146356;
  font-weight: 600;
}
.dash-sidebar-count {
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
  padding: 0 5px;
  flex-shrink: 0;
}
.dash-sidebar-btn.active .dash-sidebar-count,
.dash-sidebar-folder-row.active .dash-sidebar-count {
  background: #146356;
  color: white;
}

.dash-sidebar-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 10px 0;
}

/* Folders section */
.dash-sidebar-folders-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 12px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}
.dash-sidebar-plus {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px dashed #d1d5db;
  background: transparent;
  color: #9ca3af;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.dash-sidebar-plus:hover {
  border-color: #146356;
  color: #146356;
  background: #E3F1EE;
}

/* Folder row */
.dash-sidebar-folder-row {
  display: flex;
  align-items: center;
  border-radius: 8px;
  transition: background 0.15s;
  padding-right: 8px;
}
.dash-sidebar-folder-row:hover { background: #f9fafb; }
.dash-sidebar-folder-row.active { background: #E3F1EE; }

.dash-sidebar-folder {
  flex: 1;
  min-width: 0;
  gap: 8px;
}
.dash-folder-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.dash-folder-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Folder form */
.dash-folder-form {
  padding: 10px;
  background: #f9fafb;
  border-radius: 8px;
  margin-top: 6px;
}
.dash-folder-input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.dash-folder-input:focus {
  border-color: #146356;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.dash-folder-input-sm {
  padding: 4px 8px;
  font-size: 0.85rem;
  width: 100%;
  min-width: 60px;
}
.dash-folder-colors {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.dash-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s;
}
.dash-color-dot:hover { transform: scale(1.15); }
.dash-color-dot.sel {
  border-color: #1f2937;
  box-shadow: 0 0 0 2px white, 0 0 0 3px rgba(0,0,0,0.2);
}
.dash-folder-form-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.dash-folder-save {
  flex: 1;
  padding: 7px 0;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #146356;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.dash-folder-save:hover { background: #146356; }
.dash-folder-save:disabled { opacity: 0.5; cursor: not-allowed; }
.dash-folder-cancel {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  background: white;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.15s;
}
.dash-folder-cancel:hover { background: #f3f4f6; }

/* ---- Main section ---- */
.dash-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dash-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}
.dash-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-btn-icon {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.dash-btn-icon-danger:hover {
  color: #B91C1C;
  border-color: #fecaca;
  background: #fef2f2;
}

/* Loading */
.dash-loading {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
}

/* Empty */
.dash-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.dash-empty svg { color: #d1d5db; margin-bottom: 16px; }
.dash-empty h3 { font-size: 1.1rem; color: #374151; margin: 0 0 8px; font-weight: 600; }
.dash-empty p { font-size: 0.9rem; color: #9ca3af; margin: 0 0 24px; }

/* ---- Projects Grid ---- */
.dash-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* Card */
.dash-card {
  background: white;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  border: 2px solid transparent;
  position: relative;
}
.dash-card:hover {
  border-color: #146356;
  box-shadow: 0 4px 16px rgba(79,70,229,0.1);
  transform: translateY(-2px);
}
.dash-card-sel {
  border-color: #146356 !important;
  background: #E3F1EE !important;
}
.dash-card-arch {
  opacity: 0.85;
  border-left: 3px solid #d97706;
}
.dash-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}
.dash-card-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

/* Badges */
.dash-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.dash-badge-type { background: #f1f5f9; color: #475569; }
.dash-badge-cached { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.dash-badge-arch { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
/* Seul badge qui reste coloré : avertissement réel (archivage imminent). */
.dash-badge-warn { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.dash-badge-folder {
  background: white;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-badge-folder .dash-folder-dot { width: 7px; height: 7px; }

/* Menu button */
.dash-menu-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #d1d5db;
  border-radius: 5px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-menu-btn:hover { color: #374151; background: #f3f4f6; }

.dash-card-query {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 6px;
  line-height: 1.4;
}
.dash-card-cert {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
  font-size: 0.78rem;
  color: #9ca3af;
}
.dash-card-code {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F2F8F7;
  color: #146356;
  font-size: 0.75rem;
}

/* Card match score */
.dash-card-score {
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
}
.dash-card-score.high { background: #dcfce7; color: #15803d; }
.dash-card-score.medium, .dash-card-score.low { background: #f3f4f6; color: #9ca3af; }

/* Checkbox */
.dash-card-cb-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}
.dash-card-cb {
  width: 18px;
  height: 18px;
  accent-color: #146356;
  cursor: pointer;
}

/* ---- Context Menu (fixed overlay) ---- */
.dash-ctx-menu {
  position: fixed;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14);
  padding: 6px;
  z-index: 1000;
  min-width: 180px;
  max-height: 360px;
  overflow-y: auto;
  animation: ctxFade 0.12s ease-out;
}
@keyframes ctxFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.dash-ctx-label {
  padding: 6px 12px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}
.dash-ctx-item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  transition: background 0.1s;
}
.dash-ctx-item:hover { background: #f3f4f6; }
.dash-ctx-item .dash-folder-dot { width: 8px; height: 8px; }
.dash-ctx-icon { color: #9ca3af; font-size: 0.9rem; width: 10px; text-align: center; }
.dash-ctx-danger { color: #B91C1C; }
.dash-ctx-danger:hover { background: #fef2f2; }
.dash-ctx-divider { height: 1px; background: #e5e7eb; margin: 4px 6px; }

/* ---- Selection Bar ---- */
.dash-sel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: #E3F1EE;
  border: 1px solid #BFE0D8;
  border-radius: 10px;
  margin-bottom: 16px;
}
.dash-sel-bar > span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #146356;
  flex: 1;
}
.dash-sel-move,
.dash-sel-delete,
.dash-sel-cancel {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.dash-sel-move { background: #146356; color: white; }
.dash-sel-move:hover:not(:disabled) { background: #146356; }
.dash-sel-move:disabled { opacity: 0.4; cursor: not-allowed; }
.dash-sel-delete { background: #B91C1C; color: white; }
.dash-sel-delete:hover:not(:disabled) { background: #b91c1c; }
.dash-sel-delete:disabled { opacity: 0.4; cursor: not-allowed; }
.dash-sel-delete-confirm {
  background: #991b1b !important;
  animation: pulse-d 1s infinite;
}
@keyframes pulse-d {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
}
.dash-sel-cancel { background: white; color: #374151; border: 1px solid #d1d5db; }
.dash-sel-cancel:hover { background: #f9fafb; }

.dash-btn-select {
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.15s;
}
.dash-btn-select:hover { background: #e5e7eb; }

/* =============================================
   Folder Cards Grid — Playlist-like layout
   ============================================= */

.dash-folder-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dash-folder-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  border: 2px solid transparent;
  position: relative;
}

.dash-folder-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.dash-folder-card-color {
  height: 4px;
  width: 100%;
}

.dash-folder-card-content {
  padding: 16px 20px;
}

.dash-folder-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.dash-folder-card-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.dash-folder-card-info .dash-folder-dot {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.dash-folder-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-folder-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dash-folder-card-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 3px 10px;
  border-radius: 12px;
}

.dash-folder-card-menu {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #d1d5db;
  border-radius: 5px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-folder-card-menu:hover { color: #374151; background: #f3f4f6; }

.dash-folder-card-date {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 6px;
}

/* Expanded folder projects */
.dash-folder-projects {
  padding: 12px 20px 16px;
  border-top: 1px solid #f3f4f6;
}

.dash-folder-projects .dash-projects-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.dash-folder-projects .dash-card {
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dash-folder-projects-empty {
  padding: 24px 20px;
  border-top: 1px solid #f3f4f6;
  text-align: center;
}

.dash-folder-projects-empty p {
  font-size: 0.85rem;
  color: #9ca3af;
  margin: 0;
  font-style: italic;
}

/* Folder card drag-over */
.dash-folder-card-dragover {
  border-color: #146356 !important;
  border-style: dashed !important;
  background: #F2F8F7;
  animation: dropPulse 1.5s infinite;
}

@keyframes dropPulse {
  0%, 100% { background: #F2F8F7; }
  50% { background: #E3F1EE; }
}

/* ---- "Sans dossier" section ---- */
.dash-unorganized-section {
  margin-top: 8px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.dash-unorganized-section.dash-folder-card-dragover {
  border-color: #146356 !important;
  border-style: dashed !important;
}

.dash-unorganized-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
}

.dash-unorganized-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-unorganized-section .dash-projects-grid {
  padding: 16px 20px;
}

/* ---- Create folder prompt ---- */
.dash-create-folder-prompt {
  text-align: center;
  padding: 32px 20px;
  margin-bottom: 20px;
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 14px;
}

.dash-create-folder-prompt p {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 16px;
}

/* =============================================
   Drag & Drop
   ============================================= */

/* Card being dragged */
.dash-card.dragging {
  opacity: 0.4;
  transform: scale(0.97) rotate(1deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Folder drop target highlight (sidebar) */
.dash-sidebar-folder-row.drag-over,
.dash-sidebar-btn.drag-over {
  background: #E3F1EE !important;
  outline: 2px dashed #146356;
  outline-offset: -2px;
  border-radius: 8px;
}

/* "En cours" drop target highlight */
.dash-sidebar-btn.drag-over-active {
  background: #E3F1EE !important;
  outline: 2px dashed #146356;
  outline-offset: -2px;
}

/* Folder reorder indicators */
.dash-sidebar-folder-row.drag-reorder-above {
  border-top: 2px solid #146356;
}

.dash-sidebar-folder-row.drag-reorder-below {
  border-bottom: 2px solid #146356;
}

/* Draggable folder cursor */
.dash-sidebar-folder-row[draggable="true"] {
  cursor: grab;
}

.dash-sidebar-folder-row[draggable="true"]:active {
  cursor: grabbing;
}

/* Draggable card cursor */
.dash-card[draggable="true"] {
  cursor: grab;
}

.dash-card[draggable="true"]:active {
  cursor: grabbing;
}

/* =============================================
   Folder Picker Modal
   ============================================= */

.dash-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pickerFadeIn 0.15s ease-out;
}

@keyframes pickerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dash-picker-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  width: 380px;
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: pickerSlideIn 0.2s ease-out;
}

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

.dash-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f3f4f6;
}

.dash-picker-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.dash-picker-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.15s;
  line-height: 1;
}
.dash-picker-close:hover { color: #374151; background: #f3f4f6; }

.dash-picker-list {
  overflow-y: auto;
  max-height: 300px;
  padding: 8px;
}

.dash-picker-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 0.88rem;
  color: #9ca3af;
}

.dash-picker-item {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #374151;
  transition: background 0.12s;
  font-family: inherit;
}

.dash-picker-item:hover {
  background: #f3f4f6;
}

.dash-picker-item .dash-folder-dot {
  width: 12px;
  height: 12px;
}

.dash-picker-item-name {
  flex: 1;
  font-weight: 500;
}

.dash-picker-item-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 10px;
}

.dash-picker-new {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px dashed #d1d5db;
  background: transparent;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: #6b7280;
  font-family: inherit;
  transition: all 0.15s;
}

.dash-picker-new:hover {
  border-color: #146356;
  color: #146356;
  background: #F2F8F7;
}

.dash-picker-inline-form {
  padding: 12px 8px 8px;
}

/* =============================================
   Save Button (floating, search results)
   ============================================= */

.search-save-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #146356;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 12px rgba(79,70,229,0.3);
  transition: all 0.2s;
  animation: fabAppear 0.3s ease-out;
}

.search-save-fab:hover {
  background: #146356;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,70,229,0.35);
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .dash-welcome {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 20px;
  }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .dash-sidebar-nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dash-sidebar-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 0.82rem;
  }
  .dash-sidebar-divider { display: none; }
  .dash-sidebar-folders { margin-top: 8px; }
  #dash-folders-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dash-sidebar-folder-row {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .dash-sidebar-folder-row .dash-sidebar-btn {
    font-size: 0.82rem;
    padding: 8px 12px;
  }
  .dash-projects-grid { grid-template-columns: 1fr; }
  .dash-folder-cards-grid { grid-template-columns: 1fr; }
  .dash-picker-modal { width: 95vw; }
}

/* Dashboard metrics strip */
.dash-metrics {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 28px;
}

.dash-metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dash-metric-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
}

.dash-metric-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
}

.dash-metric-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .dash-metrics { flex-wrap: wrap; gap: 16px 24px; }
  .dash-metric-sep { display: none; }
}
