:root {
  --bg: #f5fbf0;              /* Honeydew tint */
  --surface: #ffffff;
  --text: #263a20;            /* Forest green ink */
  --text-soft: #5a7a4e;       /* Soft forest */
  --border: #ddefd4;          /* Green line */
  --accent: #8ab872;          /* Pistachio */
  --accent-strong: #6a9a56;   /* Forest green */
  --accent-dark: #5a8a48;     /* Deep green */
  --accent-soft: #e7ffce;     /* Nyanza tint */
  --accent-text: #ffffff;     /* Chữ trắng */
  --success: #5e7a42;
  --danger: #b84333;
  --shadow-sm: 0 1px 2px rgba(36, 58, 30, .04);
  --shadow-md: 0 8px 24px rgba(36, 58, 30, .08);
  --shadow-lg: 0 16px 40px rgba(36, 58, 30, .14);
  --radius: 20px;
  --radius-sm: 12px;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Josefin Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(560px 300px at 88% -30px, rgba(164, 119, 100, .14), transparent 62%),
    radial-gradient(480px 280px at -8% 16%, rgba(227, 199, 187, .22), transparent 58%),
    var(--bg);
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 74px;
  animation: fadeIn .35s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar { padding: 12px 16px; }
.topbar-brand {
  display: flex;
  justify-content: center;
  padding-top: 26px;
  padding-bottom: 4px;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
}
.topbar-title {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}
.topbar-spacer { width: 30px; }

.wordmark { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.wm-core {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.02em;
  color: var(--accent-strong);
}
.wm-sub {
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 5px;
  margin-left: 0.42em; /* cân lại khoảng cách chữ */
}

.btn-back {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
}
.btn-back:active { background: var(--accent-soft); }

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

.hero { margin: 6px 0 8px; }
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 10px;
  font-weight: 600;
}
.title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.12;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.title em { font-style: italic; color: var(--accent-strong); }
.subtitle { color: var(--text-soft); margin: 0; font-size: 14px; line-height: 1.5; }

/* ---------- Section + step ---------- */
.section { margin-top: 24px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.section-title { font-weight: 600; font-size: 15px; flex: 1; }
.section-meta { font-size: 13px; color: var(--text-soft); }

/* ---------- Date selector ---------- */
.date-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}
.date-scroll::-webkit-scrollbar { display: none; }

.date-chip {
  flex: 0 0 auto;
  width: 58px;
  padding: 11px 0 9px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
}
.date-chip .dow { font-size: 11px; display: block; letter-spacing: .04em; }
.date-chip .day { font-size: 19px; font-weight: 600; display: block; margin-top: 1px; }
.date-chip:active { transform: scale(.97); }
.date-chip.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(140, 101, 91, .30);
  transform: translateY(-1px);
}

/* ---------- PT list ---------- */
.pt-list { display: flex; flex-direction: column; gap: 10px; }

.pt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.pt-card:active { transform: scale(.99); }
.pt-card.selected {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1.5px var(--accent-strong), var(--shadow-md);
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), #f9f3ef);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1.5px rgba(164, 119, 100, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.03em;
  flex: 0 0 auto;
}
.avatar-lg { width: 74px; height: 74px; font-size: 24px; }

.pt-info { flex: 1; min-width: 0; }
.pt-name { font-weight: 600; font-size: 16px; }
.pt-title { color: var(--accent-strong); font-size: 12px; font-weight: 600; margin-top: 1px; letter-spacing: .01em; }
.pt-bio {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pt-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex: 0 0 auto;
  transition: all .18s ease;
}
.pt-check svg { width: 14px; height: 14px; }
.pt-card.selected .pt-check {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

/* ---------- Slots ---------- */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.slot-chip {
  padding: 12px 0;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all .15s ease;
}
.slot-chip:active { transform: scale(.96); }
.slot-chip.selected {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  box-shadow: 0 5px 14px rgba(140, 101, 91, .30);
}
.slot-chip.disabled {
  color: #cfc5bd;
  border-color: #eee9e3;
  box-shadow: none;
  cursor: not-allowed;
  text-decoration: line-through;
  background: #fbf9f6;
}

/* ---------- Footer action ---------- */
.footer-action {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(247, 246, 240, 0), var(--bg) 40%);
}
.btn-primary {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #ad806d, #8c655b);
  color: var(--accent-text);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(140, 101, 91, .28);
  transition: background .15s, transform .1s, box-shadow .15s;
  font-family: var(--font-sans);
}
.btn-primary:active { transform: translateY(1px); background: #8c655b; }
.btn-primary:disabled {
  background: #d8cec7;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--surface);
  color: var(--accent-strong);
  border: 1.5px solid var(--accent-strong);
  box-shadow: none;
}
.btn-secondary:active { background: var(--accent-soft); }

/* ---------- Confirm screen ---------- */
.confirm-pt {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 18px;
}
.confirm-pt-info { min-width: 0; }
.confirm-pt-name { font-family: var(--font-serif); font-size: 22px; font-weight: 600; }
.confirm-pt-role { color: var(--accent-strong); font-size: 13px; font-weight: 600; margin-top: 2px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.summary-card { margin-bottom: 20px; }
.summary-row { display: flex; align-items: flex-start; gap: 12px; }
.summary-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-soft), #faf3ee);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex: 0 0 auto;
  margin-top: 1px;
}
.summary-body { flex: 1; min-width: 0; }
.summary-main { font-weight: 600; font-size: 16px; line-height: 1.4; }
.summary-detail {
  color: var(--text-soft);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.5;
  white-space: pre-line;
}

.field { display: block; margin-bottom: 15px; }
.field span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 7px;
}
.field span small { font-weight: 400; color: #a8988e; }
.field input, .field textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: #b8aba2; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(164, 119, 100, .18);
}

/* ---------- Success screen ---------- */
.success-wrap {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
}
.success-check {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 22px;
  box-shadow: 0 14px 32px rgba(47, 158, 95, .35);
}
.success-wrap .title { font-size: 26px; }
.success-wrap .subtitle { max-width: 300px; }
.success-wrap .summary-card {
  text-align: left;
  width: 100%;
  margin-top: 22px;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.nav-item {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  font-family: var(--font-sans);
}
.nav-item.active { color: var(--accent-strong); font-weight: 600; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--accent-text);
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  max-width: 88%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Thông tin phòng tập ---------- */
.gym-info {
  margin-top: 30px;
  padding: 22px 20px;
  background: linear-gradient(180deg, var(--accent-soft), #fff 45%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.gi-title { font-family: var(--font-serif); font-size: 19px; font-weight: 600; margin: 0 0 8px; }
.gi-about { color: var(--text-soft); font-size: 13.5px; line-height: 1.65; margin: 0 0 16px; }
.gi-grid { display: flex; flex-direction: column; gap: 12px; }
.gi-item { display: flex; align-items: flex-start; gap: 12px; }
.gi-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: var(--accent); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
}
.gi-item b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); font-weight: 700; margin-bottom: 2px; }
.gi-item span { font-size: 14px; line-height: 1.45; word-break: break-word; }
.gi-item a { color: var(--accent-strong); text-decoration: none; font-weight: 600; }
