/* Trang EXP / Level */

.hl-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  outline: none;
}

/* ====== HERO ====== */
.hl-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 184, 0, 0.25);
  border-radius: 14px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 184, 0, 0.1), transparent 55%),
    linear-gradient(135deg, var(--surface), var(--bg-elevated));
  margin-bottom: 1.25rem;
}

@media (min-width: 880px) {
  .hl-hero {
    grid-template-columns: 1.4fr 1fr;
    align-items: stretch;
  }
}

.hl-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.35);
  border-radius: 999px;
}

.hl-hero__left h1 {
  margin: 0.9rem 0 0.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
}

.hl-hero__left p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 560px;
}

.hl-hero__left p strong {
  color: var(--gold);
  font-weight: 700;
}

.hl-hero__right {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.hl-stat-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.hl-stat-box__label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.hl-stat-box__num {
  margin-top: 0.3rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold);
}

.hl-stat-box__num strong {
  font-weight: 800;
}

.hl-stat-box__num span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 0.25rem;
}

.hl-stat-box__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hl-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.hl-pill--gold {
  background: rgba(255, 184, 0, 0.12);
  border-color: rgba(255, 184, 0, 0.35);
  color: var(--gold);
}

.hl-pill--ok {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

/* ====== Level Box ====== */
.hl-stat-box--level {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.12), rgba(0, 0, 0, 0.25));
}

.hl-level-big {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.5rem 0 0.85rem;
}

.hl-level-big span {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.hl-level-big small {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* Progress bar */
.hl-progress__bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.hl-progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), #fcd34d);
  border-radius: 999px;
  transition: width 0.4s;
}

.hl-progress__lbl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text);
}

.hl-progress__lbl strong {
  color: var(--gold);
  font-weight: 700;
}

.hl-muted {
  color: var(--muted);
}

/* ====== Quota box ====== */
.hl-quota-counters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.hl-quota-counters__lbl {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
}

.hl-quota-counters strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}

.hl-pos { color: #4ade80; }
.hl-neg { color: #fca5a5; }

/* ====== Grid 2 cột ====== */
.hl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 940px) {
  .hl-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* ====== Panel chung ====== */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.1rem;
  margin-bottom: 1rem;
}

.panel-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.panel-card__head h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.panel-card__head svg {
  color: var(--gold);
}

/* ====== Nhiệm vụ ====== */
.hl-tasks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .hl-tasks {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hl-task {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.95rem;
  display: flex;
  flex-direction: column;
}

.hl-task__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hl-task__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
}

.hl-task__icon--gold {
  background: rgba(255, 184, 0, 0.14);
  color: var(--gold);
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.hl-task__icon--blue {
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.hl-task__icon--green {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.hl-task__head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  flex: 1;
}

.hl-task__reward {
  background: rgba(255, 184, 0, 0.14);
  color: var(--gold);
  border: 1px solid rgba(255, 184, 0, 0.3);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.hl-task__desc {
  margin: 0.6rem 0 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.hl-task__btn {
  margin-top: auto;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hl-task__btn:hover:not(:disabled) {
  border-color: rgba(255, 184, 0, 0.5);
  color: var(--gold);
}

.hl-task__btn--primary {
  background: var(--gold);
  color: #1a1304;
  border-color: var(--gold);
}

.hl-task__btn--primary:hover:not(:disabled) {
  filter: brightness(1.08);
  color: #1a1304;
}

.hl-task__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hl-task__progress {
  margin-top: auto;
  font-size: 0.82rem;
  color: var(--muted);
}

.hl-task__progress strong {
  color: var(--text);
  font-weight: 700;
}

/* ====== Tier / Roadmap list ====== */
.hl-tiers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 520px;
  overflow-y: auto;
}

.hl-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}

.hl-tier.is-current {
  border-color: rgba(255, 184, 0, 0.5);
  background: linear-gradient(135deg, var(--bg-elevated), rgba(255, 184, 0, 0.07));
}

.hl-tier.is-done {
  opacity: 0.6;
}

.hl-tier strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
}

.hl-tier p {
  margin: 0.15rem 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

/* ====== Lịch sử ====== */
.hl-history {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.hl-history th,
.hl-history td {
  padding: 0.65rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.hl-history th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  background: var(--bg-elevated);
}

.hl-history tr:last-child td {
  border-bottom: none;
}

.hl-history__amt {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.hl-history__empty {
  text-align: center !important;
  color: var(--muted);
  padding: 1.5rem 1rem !important;
}

/* Currency pill (đã là <a>) */
.currency-pill {
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.currency-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.currency-pill.is-active {
  border-color: var(--gold);
  color: var(--gold);
}

.currency-pill svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 0.7rem 1.1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.toast[data-type="err"] {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}
