@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap');

:root {
  --bg: #fdf7f5;
  --card: #ffffff;
  --ink: #2e2326;
  --muted: #8a777b;
  --line: #f0e3e0;
  --blush: #e8a5b0;
  --blush-deep: #c9677a;
  --nude: #f3e1d8;
  --gold: #b8894a;
  --ok: #3f9a6b;
  --bad: #c9474f;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(120, 70, 80, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--blush-deep); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 18px 96px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 0 20px;
  border: 0; border-radius: 14px;
  font: inherit; font-weight: 600; font-size: 18px;
  background: var(--blush-deep); color: #fff; cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn.secondary { background: var(--nude); color: var(--ink); }
.btn.gold { background: var(--gold); }
.btn:disabled { opacity: .45; cursor: default; }

label { display: block; font-weight: 500; margin: 14px 0 6px; }
input {
  width: 100%; min-height: 52px; padding: 0 14px;
  font: inherit; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
}
input:focus { outline: none; border-color: var(--blush); }

.error { color: var(--bad); min-height: 1.5em; margin: 10px 0 0; font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .card { width: 100%; max-width: 400px; }
.brand { text-align: center; margin-bottom: 18px; }
.brand .logo { font-size: 44px; }
.brand h1 { font-size: 26px; margin: 4px 0 0; }
.brand h1 span { color: var(--gold); }

/* Dashboard */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.top h1 { font-size: 22px; margin: 0; }
.streak { background: #fff4e3; color: var(--gold); font-weight: 700; border-radius: 999px; padding: 6px 14px; font-size: 15px; }

.hero { background: linear-gradient(135deg, var(--blush-deep), var(--blush)); color: #fff; }
.hero .big { font-size: 40px; font-weight: 700; line-height: 1; }
.hero .btn { background: #fff; color: var(--blush-deep); margin-top: 16px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 24px; }
.stat { text-align: center; padding: 14px 8px; }
.stat b { display: block; font-size: 24px; }
.stat span { font-size: 13px; color: var(--muted); }

.section-title { font-size: 18px; margin: 8px 0 12px; }
.tracks { display: grid; gap: 10px; }
.track { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.track .badge {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 700; color: var(--gold); background: #fff4e3;
}
.track .info { flex: 1; min-width: 0; }
.track .info b { display: block; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--blush-deep); border-radius: 99px; }

/* Bottom nav */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around;
  background: #fff; border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.nav a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: 12px; }
.nav a .ic { display: block; font-size: 22px; }
.nav a.on { color: var(--blush-deep); font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 15px;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }
