@import url("https://fonts.googleapis.com/css2?family=Prompt:wght@200;300;400;500;600&display=swap");

:root {
  --black: #0A0A0A;
  --navy: #3C546C;
  --navy-deep: #22303E;
  --white: #FFFFFF;
  --gray: #E8ECF0;
  --gold: #CC9B2F;

  --text-primary: rgba(255, 255, 255, 0.85);
  --text-secondary: rgba(255, 255, 255, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--text-primary);
  font-family: "Prompt", sans-serif;
  font-weight: 300;
  min-height: 100vh;
}

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.header {
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header .brand {
  font-weight: 400;
  font-size: 20px;
  color: var(--white);
  letter-spacing: 0.5px;
}
.header .brand .dot { color: var(--gold); }
.header .user-name { font-size: 12px; color: var(--text-secondary); }

/* ---------- Nav tabs ---------- */
.tabbar {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tabbar button {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 300;
  padding: 12px 4px;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}
.tabbar button.active { color: var(--white); font-weight: 400; }
.tabbar button.active::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--gold);
}

/* ---------- Content ---------- */
.content { padding: 20px; flex: 1; }

/* ---------- Cards ---------- */
.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  transition: border-color 0.4s ease;
}
.card-title {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-family: "Prompt", sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.4s ease;
  width: 100%;
}
.btn:hover { background: rgba(204,155,47,0.1); }
.btn-solid { background: var(--gold); color: var(--black); font-weight: 500; }
.btn-solid:hover { background: #b98d29; }
.btn-ghost { border-color: rgba(255,255,255,0.15); color: var(--text-secondary); }
.btn-danger { border-color: #8a4a4a; color: #d98080; }
.btn-small { width: auto; padding: 8px 14px; font-size: 12px; }

/* ---------- Forms ---------- */
label { display: block; margin-bottom: 14px; }
label .label-text {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--white);
  font-family: "Prompt", sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { min-height: 70px; resize: vertical; }

/* ---------- Capsule motif (brand element) ---------- */
.capsule {
  width: 22px; height: 32px;
  border-radius: 11px;
  border: 1.5px solid rgba(255,255,255,0.15);
  position: relative;
  display: inline-block;
  transition: all 0.4s ease;
}
.capsule.filled { background: var(--gold); border-color: var(--gold); }
.capsule::before, .capsule::after {
  content: "";
  position: absolute;
  top: 7px; bottom: 7px;
  width: 2px;
  background: rgba(255,255,255,0.25);
  border-radius: 1px;
}
.capsule::before { left: 7px; }
.capsule::after { right: 7px; }
.capsule.filled::before, .capsule.filled::after { background: var(--navy-deep); }

/* ---------- Exercise / list items ---------- */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.list-item:last-child { border-bottom: none; }
.list-item img {
  width: 44px; height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .name { font-size: 14px; color: var(--white); }
.list-item .info .meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ---------- Run session ---------- */
.run-stage {
  text-align: center;
  padding: 40px 20px;
}
.run-stage .exercise-name {
  font-size: 22px;
  color: var(--white);
  font-weight: 400;
  margin-bottom: 8px;
}
.run-stage .exercise-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}
.run-timer {
  font-family: "Prompt", sans-serif;
  font-weight: 500;
  font-size: 64px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 30px;
}
.run-phase-label {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.login-mask {
  width: 64px; height: 64px;
  border-radius: 28px;
  background: var(--gray);
  margin: 0 auto 20px;
  position: relative;
  box-shadow: 0 0 40px rgba(204,155,47,0.15);
}
.login-mask::before, .login-mask::after {
  content: "";
  position: absolute;
  top: 16px; bottom: 16px;
  width: 7px;
  background: var(--black);
  border-radius: 4px;
}
.login-mask::before { left: 20px; }
.login-mask::after { right: 20px; }
.login-title { font-size: 26px; color: var(--white); margin-bottom: 4px; }
.login-tagline { font-size: 12px; color: var(--gold); letter-spacing: 2px; margin-bottom: 30px; }
.error-msg { color: #d98080; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ---------- Misc ---------- */
.empty-state {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 30px 20px;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 16px;
}
.section-label {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 20px 0 10px;
}
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.checkline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}
.checkline .box {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}
.checkline.done .box { background: var(--gold); border-color: var(--gold); }
.checkline.done .box::after { content: "✓"; color: var(--black); font-size: 13px; }
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary);
}
.badge-gold { border-color: var(--gold); color: var(--gold); }
