/* ── Profile page — 2026 dashboard style ─────────────────────────── */
.prof-scroll-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-h) + 24px);
  min-height: 100%;
  background: var(--bg);
}

/* ── Hero v3: greeting layout ── */
.prof-hero-v3 {
  background: var(--surface);
  padding: 24px 20px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.prof-hero-left {
  flex: 1;
  min-width: 0;
}

.prof-greeting {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.prof-greet-wave { font-size: 1.3rem; line-height: 1; }

.prof-greet-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.prof-greet-name { color: var(--purple); }

.prof-name-edit-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 24px; height: 24px;
  font-size: 0.65rem;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.prof-name-edit-btn:hover { background: var(--border); }

.prof-name-input {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--purple);
  border-radius: 8px;
  padding: 4px 10px;
  font-family: inherit;
  outline: none;
  width: 180px;
  margin-bottom: 6px;
}

.prof-hero-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 3px;
}

.prof-hero-tagline {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.prof-avatar-sm {
  flex-shrink: 0;
  width: 58px; height: 58px;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border: 2px solid rgba(99,102,241,0.2);
  border-radius: 50%;
  font-size: 1.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
  line-height: 1;
}
.prof-avatar-sm:hover { transform: scale(1.06); }

/* ── Flat stats: 3 cột iOS-style ── */
.prof-flat-stats {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.prof-fstat {
  flex: 1;
  text-align: center;
}

.prof-fstat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.prof-fstat-lbl {
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.prof-fstat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Section group label ── */
.prof-group-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  padding: 14px 20px 6px;
  text-transform: uppercase;
  margin: 0;
}

/* ── Section cards ── */
.prof-section-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 0 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.prof-heatmap-card { padding: 14px 10px; overflow-x: auto; }

.prof-sec-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

/* ── Goal card (prominent) ── */
.prof-goal-card { padding: 18px; }

.prof-goal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.prof-goal-label { font-size: 0.85rem; color: var(--text-muted); }
.prof-goal-count { font-size: 1.3rem; font-weight: 800; }
.prof-goal-bar-wrap {
  background: var(--border); border-radius: 8px; height: 12px; overflow: hidden;
}
.prof-goal-bar { height: 100%; border-radius: 8px; transition: width 0.5s; min-width: 4px; }
.prof-goal-done {
  font-size: 0.82rem; color: var(--green); font-weight: 600;
  margin-top: 10px; text-align: center;
}

/* ── Weekly progress ── */
.prof-weekly-row { display: flex; align-items: center; }
.prof-weekly-item { flex: 1; text-align: center; }
.prof-weekly-val { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1; }
.prof-weekly-lbl { font-size: 0.66rem; color: var(--text-muted); margin-top: 4px; }
.prof-weekly-sep { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }

/* ── Heatmap streak footer ── */
.prof-heatmap-streak {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* ── Topics chips ── */
.prof-topic-chips { display: flex; flex-direction: column; gap: 8px; }

.prof-topic-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.prof-topic-chip--green  { background: #ECFDF5; color: #065F46; }
.prof-topic-chip--orange { background: #FFF7ED; color: #92400E; }
.prof-topic-chip--red    { background: #FEF2F2; color: #991B1B; }

.prof-topic-chip-name {
  font-weight: 600; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prof-topic-chip-pct {
  font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0; margin-left: 10px;
}

/* ── Hard words horizontal scroll tags ── */
.prof-hard-tags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.prof-hard-tags::-webkit-scrollbar { display: none; }

.prof-hard-tag {
  flex-shrink: 0;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 88px;
}
.prof-hard-tag-word  { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.prof-hard-tag-count { font-size: 0.66rem; color: #EF4444; font-weight: 600; }

/* ── Menu group (Xem thêm) ── */
.prof-menu-group {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 0 16px 4px;
  box-shadow: var(--shadow-sm);
}

.prof-menu-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.prof-menu-row:hover,
.prof-menu-row:active { background: rgba(99,102,241,0.05); }

.prof-row-divider {
  height: 1px;
  background: var(--border);
  margin-left: 62px;
}

.prof-row-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #EEF2FF;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}

.prof-row-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.prof-row-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.prof-row-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prof-row-chevron {
  color: var(--text-muted);
  opacity: 0.4;
  flex-shrink: 0;
}

/* ── Dark mode ── */
.dark-mode .prof-avatar-sm {
  background: linear-gradient(135deg, rgba(99,102,241,0.22) 0%, rgba(99,102,241,0.12) 100%);
  border-color: rgba(99,102,241,0.3);
}
.dark-mode .prof-topic-chip--green  { background: rgba(5,150,105,0.12);  color: #6EE7B7; }
.dark-mode .prof-topic-chip--orange { background: rgba(217,119,6,0.12);  color: #FCD34D; }
.dark-mode .prof-topic-chip--red    { background: rgba(220,38,38,0.12);  color: #FCA5A5; }
.dark-mode .prof-hard-tag           { background: rgba(220,38,38,0.08);  border-color: rgba(220,38,38,0.2); }
.dark-mode .prof-hard-tag-word      { color: var(--text); }
.dark-mode .prof-row-icon           { background: rgba(99,102,241,0.15); }
.dark-mode .prof-section-card       { background: var(--surface); }
