/* ============================================================
   FitVida Â· Design System
   Identidad: acento teal (#0E7C86), superficies claras, foco en
   legibilidad y accesibilidad. Mobile-first.
   ============================================================ */

:root {
  --accent: #0E7C86;
  --accent-dark: #0A5A61;
  --accent-soft: #E6F2F3;
  --bg: #F7F8F9;
  --surface: #FFFFFF;
  --border: #E3E6E8;
  --text: #1A1A1A;
  --text-muted: #667085;
  --danger: #C0392B;
  --warning: #B9770E;
  --success: #1E8E5A;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg: 0 8px 24px rgba(16,24,40,.12);
  --maxw: 640px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 16px 16px 88px; }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent-dark); font-size: 20px; text-decoration: none; min-height: 44px; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* ---- Bottom nav (isla de navegaciÃ³n mÃ³vil) ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0));
}
.bottom-nav a { flex: 1; text-align: center; text-decoration: none; color: var(--text-muted); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav .nav-ico { width: 22px; height: 22px; }

/* ---- Cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.card-sub { color: var(--text-muted); font-size: 13px; margin: 0; }

/* ---- Hero / greeting ---- */
.hero { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; border-radius: var(--radius); padding: 22px 20px; margin-bottom: 16px; }
.hero h1 { margin: 0 0 4px; font-size: 22px; }
.hero p { margin: 0; opacity: .9; font-size: 14px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-size: 15px; font-weight: 600; padding: 12px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--accent-dark); border-color: var(--border); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Badges / status ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge-ok { background: #E6F5EE; color: #147347; }
.badge-caution { background: #FCF3E3; color: #8A5A0B; }
.badge-suspend { background: #FBEAE8; color: #A32115; }

/* ---- Safety banner (crÃ­tico para la UX de seguridad) ---- */
.safety-banner { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; display: flex; gap: 12px; align-items: flex-start; }
.safety-banner .s-ico { flex: none; width: 24px; height: 24px; }
.safety-banner.is-caution { background: #FCF3E3; border: 1px solid #F0D9A8; color: #6b4c0e; }
.safety-banner.is-suspend { background: #FBEAE8; border: 1px solid #F0BDB6; color: #7a241a; }
.safety-banner.is-success { background: #E6F5EE; border: 1px solid #B8E0CB; color: #1E6B47; }
.safety-banner h3 { margin: 0 0 2px; font-size: 14px; }
.safety-banner p { margin: 0; font-size: 13px; }

/* ---- Utility ---- */
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; }
.row-between { justify-content: space-between; align-items: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 700; margin: 20px 0 10px; }
.empty { text-align: center; color: var(--text-muted); padding: 32px 16px; }

/* ---- Offline indicator (de la PWA) ---- */
.is-offline .offline-dot { display: inline-block; }
.offline-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warning); margin-left: 6px; }

/* ===== Branding Dr. GymIA ¡ª agregar al FINAL de assets/css/app.css ===== */
.brand { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.brand-logo { height: 32px; width: auto; display: block; }
/* la marca vieja de texto (.brand-mark) ya no se usa; si qued¨®, la ocultamos */
.brand-mark { display: none; }
