/* ============================================================
   dee-fit Mini-Dee — Mockup Design System
   CI (from live app): primary #556F57 · secondary #FFEAB0 · heading-green #416645
   text #424242 · accent-dark #212121 · bg-warm #FCF5F0 · gray #757575
   Fonts: Nunito (body/UI), Abhaya Libre (headings, serif)
   ============================================================ */

:root {
  --primary: #556F57;
  --primary-dark: #416645;
  --secondary: #FFEAB0;
  --text: #424242;
  --accent-dark: #212121;
  --bg-warm: #FCF5F0;
  --bg-warm-2: #F3E7D8;
  --gray: #757575;
  --gray-light: #B9B2A9;
  --white: #ffffff;
  --border: #E8E0D4;
  --danger-bg: #FBEAEA;
  --danger-border: #D98C8C;
  --danger-text: #7A3232;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: var(--text);
  background: #E9E2D6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Abhaya Libre", Georgia, serif;
  color: var(--primary-dark);
  font-weight: 800;
  margin: 0 0 6px;
}

p { margin: 0 0 10px; line-height: 1.5; }

svg.icon { width: 20px; height: 20px; stroke: currentColor; flex-shrink: 0; }

/* ---------- Mobile device frame (for screenshotting) ---------- */
.frame-outer {
  width: 390px;
  min-height: 844px;
  margin: 0 auto;
  background: var(--bg-warm);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.statusbar {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--bg-warm);
  flex-shrink: 0;
}

.app-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-warm);
  flex-shrink: 0;
}
.app-header .brand { display: flex; align-items: center; gap: 8px; }
.app-header .brand img { height: 22px; }
.app-header .brand span { font-family: "Abhaya Libre", serif; font-weight: 800; color: var(--primary-dark); font-size: 15px; }
.app-header .icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(85,111,87,0.08); color: var(--primary);
  border: none;
}

.screen-title { padding: 0 20px 4px; }
.screen-title h1 { font-size: 21px; }
.screen-title .sub { color: var(--gray); font-size: 13px; }

.content { flex: 1; overflow: hidden; padding: 0 20px 16px; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  height: 66px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding-bottom: 6px;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--gray-light); font-size: 10px; font-weight: 700;
}
.nav-item.active { color: var(--primary); }
.nav-item svg { width: 21px; height: 21px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 14.5px;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 12px;
  border: 2px solid var(--primary);
  background: var(--primary);
  color: var(--secondary);
  cursor: pointer;
  width: 100%;
}
.btn-outline { background: transparent; color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: 12.5px; border-radius: 8px; width: auto; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--primary); padding: 8px 4px; }

/* ---------- Cards / tiles ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 12px;
}
.card-soft { background: var(--bg-warm-2); border: none; }

.tile {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.tile .tile-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(85,111,87,0.10); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.tile.locked { opacity: 0.5; }
.tile .tile-title { font-weight: 800; font-size: 13.5px; color: var(--accent-dark); }
.tile .tile-hint { font-size: 11px; color: var(--gray); }

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

.pill {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--white);
}
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.03em;
  padding: 4px 9px; border-radius: 999px;
  background: var(--secondary); color: var(--accent-dark);
}

/* ---------- Chat ---------- */
.chat-scroll { display: flex; flex-direction: column; gap: 10px; height: 100%; overflow: hidden; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble {
  max-width: 78%;
  padding: 11px 15px;
  font-size: 14px;
  line-height: 1.45;
}
.bubble-row:not(.mine) .bubble {
  background: var(--white);
  color: var(--text);
  border-radius: 16px 16px 16px 4px;
  border: 1px solid var(--border);
}
.bubble-row.mine .bubble {
  background: var(--primary);
  color: var(--white);
  border-radius: 16px 16px 4px 16px;
}
.bubble-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary-dark); color: var(--secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; margin-right: 6px; flex-shrink: 0;
}
.typing-dots { display: inline-flex; gap: 4px; align-items: center; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gray-light); display: inline-block;
}

.chat-input-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 8px 8px 16px;
}
.chat-input-bar input {
  border: none; outline: none; flex: 1; font-family: "Nunito"; font-size: 14px; background: transparent; color: var(--text);
}
.chat-input-bar input::placeholder { color: var(--gray-light); }
.send-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--primary); color: var(--secondary);
  display: flex; align-items: center; justify-content: center;
}
.reflection-pills { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.reflection-pills .pill { white-space: nowrap; background: var(--bg-warm-2); border-color: transparent; color: var(--primary-dark); }
.quota-hint { text-align: center; font-size: 11px; color: var(--gray); margin-bottom: 8px; }

.safety-card {
  background: var(--danger-bg); border: 1.5px solid var(--danger-border);
  color: var(--danger-text); border-radius: var(--radius-md);
  padding: 14px 16px; font-size: 13.5px; line-height: 1.5;
}
.safety-card strong { display: block; margin-bottom: 4px; font-size: 14px; }

.upsell-card {
  background: var(--primary-dark); color: var(--secondary);
  border-radius: var(--radius-md); padding: 14px 16px; margin-top: 8px;
}
.upsell-card p { color: var(--secondary); font-size: 13px; margin-bottom: 10px; }
.upsell-card .btn { background: var(--secondary); color: var(--primary-dark); border-color: var(--secondary); }

/* ---------- Forms ---------- */
.field { text-align: left; margin-bottom: 14px; }
.field label {
  display: block; font-size: 11px; font-weight: 700; color: var(--gray);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--border); font-family: "Nunito"; font-size: 14px;
  color: var(--text); background: var(--white);
}
.field input::placeholder { color: var(--gray-light); }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; color: var(--gray); line-height: 1.4; }
.checkbox-row a { color: var(--primary); font-weight: 700; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.muted { color: var(--gray); }
.section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray); margin: 18px 0 10px; }
.avatar-circle {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--secondary); color: var(--primary-dark); font-weight: 800; font-size: 13px;
}
.progress-dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 16px; }
.progress-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.progress-dots span.active { background: var(--primary); width: 18px; border-radius: 4px; }

.mockup-scaffold { display: flex; align-items: center; justify-content: center; padding: 30px 0; background: #DCD3C4; }
