/* === Fambot Dashboard — Clean, Card-First Layout === */
:root {
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --border: #e1e3e6;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --primary: #0071e3;
  --primary-hover: #0066cc;
  --wellness: #34c759;
  --health: #34c759;
  --finance: #ff9500;
  --admin: #5ac8fa;
  --activities: #af52de;
  --ask: #0071e3;
  --upload: #ff2d55;
  --urgent: #ff3b30;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.dashboard-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.dashboard-header h1 { font-size: 24px; font-weight: 700; }
.last-updated { font-size: 13px; color: var(--text-secondary); }

/* Sections (generic card) */
.section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* === WELLNESS TRACKER === */
.wellness-section h2 { border-bottom-color: var(--wellness); }
.wellness-date { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.wellness-emoji-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.wellness-btn {
  font-size: 32px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wellness-btn:hover { border-color: var(--wellness); transform: scale(1.1); }
.wellness-btn.active { border-color: var(--wellness); background: #e8f8ed; transform: scale(1.05); box-shadow: 0 0 0 3px rgba(52,199,89,0.2); }
.wellness-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.wellness-input-row input[type="text"] {
  flex: 1;
  min-width: 150px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}
.wellness-feedback { font-size: 13px; color: var(--text-secondary); }
.chart-container { max-height: 220px; margin-top: 8px; }

/* === FAMBOT SUMMARY === */
.summary-section h2 { border-bottom-color: var(--primary); }
.timely-updates { margin-bottom: 12px; }
.timely-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff3cd;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 14px;
}
.timely-item .badge {
  background: var(--urgent);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
details.recent-toggle { margin-top: 8px; }
details.recent-toggle summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--primary);
  font-size: 14px;
}
.activity-feed { margin-top: 8px; }
.activity-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.activity-item .ts { color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }

/* === CARDS GRID (2×3) === */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .cards-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards-grid { grid-template-columns: 1fr; } }

.card-section { margin-bottom: 0; }
.card-content { font-size: 14px; }
.card-content .empty { color: var(--text-secondary); font-style: italic; }
.card-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.card-item:last-child { border-bottom: none; }
.card-item .title { font-weight: 500; }
.card-item .meta { display: flex; gap: 8px; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.status-badge {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 500;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-in_progress { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }
.priority-high { color: var(--urgent); font-weight: 600; }
.priority-normal { color: var(--text-secondary); }

/* Card section header colors */
#healthSection h2 { border-bottom-color: var(--health); }
#financesSection h2 { border-bottom-color: var(--finance); }
#adminSection h2 { border-bottom-color: var(--admin); }
#activitiesSection h2 { border-bottom-color: var(--activities); }

/* === ASK FAMBOT PANEL === */
.ask-section h2 { border-bottom-color: var(--ask); }
.ask-form { display: flex; gap: 10px; align-items: flex-start; }
.ask-form textarea {
  flex: 1;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.ask-form textarea:focus { outline: none; border-color: var(--ask); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); }
.ask-feedback { font-size: 13px; margin-top: 6px; min-height: 1.4em; }
.recent-asks { margin-top: 10px; }
.recent-asks summary { cursor: pointer; font-size: 13px; color: var(--primary); font-weight: 500; }
.ask-item {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.ask-item .ask-meta { font-size: 11px; color: var(--text-secondary); }
.ask-item .replied-badge { color: var(--wellness); font-weight: 500; }
.ask-item .pending-badge { color: var(--urgent); font-weight: 500; }

/* === FILE DROP PANEL === */
.upload-section h2 { border-bottom-color: var(--upload); }
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--upload);
  background: #fff0f3;
}
.drop-zone .drop-icon { font-size: 36px; margin-bottom: 8px; }
.drop-zone .drop-text { font-size: 14px; color: var(--text-secondary); }
.drop-zone .drop-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.drop-zone input[type="file"] { display: none; }
.upload-feedback { font-size: 13px; margin-top: 8px; min-height: 1.4em; }
.recent-files { margin-top: 10px; }
.recent-files summary { cursor: pointer; font-size: 13px; color: var(--primary); font-weight: 500; }
.file-item {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.file-item .file-meta { font-size: 11px; color: var(--text-secondary); }
