:root {
  color-scheme: light;
  --background: #f3f8f3;
  --foreground: #153326;
  --foreground-soft: #25493a;
  --muted: #edf5ee;
  --muted-foreground: #60736a;
  --card: #ffffff;
  --card-strong: #fffef8;
  --card-tint: rgba(255, 255, 255, 0.78);
  --border: #d9e8df;
  --border-strong: #bfd8c8;
  --primary: #147647;
  --primary-strong: #0c4f31;
  --primary-deep: #083a28;
  --primary-soft: #dff4e8;
  --secondary: #eaf7ed;
  --accent: #edae32;
  --accent-strong: #a86005;
  --accent-soft: #fff1c7;
  --sky: #e2f5fb;
  --sky-strong: #197b97;
  --teal: #0f8f83;
  --lime: #8dcc54;
  --danger: #c24132;
  --warning: #a86605;
  --success: #1f7a42;
  --shadow: 0 24px 58px rgba(15, 79, 49, 0.14);
  --shadow-soft: 0 14px 34px rgba(18, 76, 48, 0.09);
  --shadow-tight: 0 10px 22px rgba(18, 76, 48, 0.08);
  --glow-green: 0 18px 44px rgba(20, 118, 71, 0.2);
  --glow-amber: 0 14px 32px rgba(237, 174, 50, 0.2);
  --gradient-primary: linear-gradient(135deg, #0b5637 0%, #148354 48%, #0f8f83 100%);
  --gradient-accent: linear-gradient(135deg, #fff7d8 0%, #f2c564 50%, #e99a22 100%);
  --gradient-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 247, 0.9));
  --radius: 12px;
  --radius-lg: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Geist, "Be Vietnam Pro", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-y: scroll;
  background: var(--background);
  color: var(--foreground);
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #fbfdf8 0%, #f4faf5 38rem, var(--background) 100%),
    var(--background);
}

#app {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
}

body.is-loading {
  cursor: progress;
}

body.is-loading::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 180% 100%;
  animation: loading-bar 900ms linear infinite;
}

@keyframes loading-bar {
  to {
    background-position: 180% 0;
  }
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(237, 174, 50, 0.48);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.fa-icon {
  display: inline-grid;
  place-items: center;
  width: 1em;
  line-height: 1;
}

.app-boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-card {
  width: min(100%, 360px);
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.boot-card p {
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  isolation: isolate;
  background:
    linear-gradient(145deg, rgba(246, 252, 246, 0.98) 0%, rgba(238, 248, 241, 0.94) 52%, rgba(245, 250, 246, 0.98) 100%);
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.app-shell::before {
  background:
    linear-gradient(118deg, transparent 0 56%, rgba(20, 118, 71, 0.055) 56% 56.35%, transparent 56.35% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 45%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 68%);
}

.app-shell::after {
  top: auto;
  height: 34svh;
  background: linear-gradient(180deg, transparent, rgba(255, 247, 216, 0.38));
}

.app-sidebar {
  display: none;
}

.app-frame {
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.app-main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  padding: 0 0 calc(86px + var(--safe-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(190, 214, 199, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 252, 247, 0.78));
  backdrop-filter: blur(18px) saturate(1.14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand img {
  width: 118px;
  height: auto;
}

.brand-title {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.avatar-button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(191, 216, 200, 0.82);
  border-radius: 14px;
  background: var(--gradient-surface);
  color: var(--foreground);
  box-shadow: var(--shadow-tight);
}

.avatar-button {
  border-color: rgba(20, 118, 71, 0.22);
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--glow-green);
}

.icon-button .fa-icon,
.avatar-button .fa-icon {
  width: 20px;
  height: 20px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 40;
  width: min(100%, 480px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  transform: translateX(-50%);
  padding: 8px 10px calc(8px + var(--safe-bottom));
  border-top: 1px solid rgba(191, 216, 200, 0.86);
  border-inline: 1px solid rgba(220, 232, 223, 0.78);
  border-radius: 20px 20px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 247, 0.94));
  box-shadow: 0 -18px 44px rgba(15, 79, 49, 0.14);
  backdrop-filter: blur(18px) saturate(1.12);
}

.nav-item {
  min-width: 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 16px;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item .fa-icon {
  width: 20px;
  height: 20px;
  font-size: 1.05rem;
}

.nav-item.is-active {
  background:
    linear-gradient(180deg, rgba(223, 244, 232, 0.95), rgba(255, 241, 199, 0.58));
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px rgba(20, 118, 71, 0.12);
}

.page {
  width: 100%;
  max-width: 1120px;
  min-height: calc(100svh - 64px - 86px - var(--safe-bottom));
  margin: 0 auto;
  padding: 18px 16px;
  animation: page-in 140ms ease-out;
}

@keyframes page-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.page-stack {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 18px;
}

.section {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.section-head {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-head > div {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title,
.page-title {
  margin: 0;
  color: var(--foreground);
  font-size: 1.2rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
}

.page-title {
  font-size: clamp(1.7rem, 7vw, 3.2rem);
}

.section-copy,
.page-copy {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  line-height: 1.58;
  overflow-wrap: break-word;
}

.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 24px 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(8, 58, 40, 0.96), rgba(20, 118, 71, 0.9) 52%, rgba(15, 143, 131, 0.84)),
    url("/hanhtrinh-reference/assets/hero-bg.png") center / cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.18) 0%, transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 54%);
  mix-blend-mode: screen;
}

.hero::after {
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
}

.hero > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero .eyebrow,
.hero .page-copy {
  color: rgba(255, 255, 255, 0.86);
}

.hero .page-title {
  color: #fff;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
}

.hero .card {
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 253, 247, 0.86));
  box-shadow: 0 18px 42px rgba(3, 33, 21, 0.16);
}

.hero .card .eyebrow {
  color: var(--primary);
}

.hero .button {
  background: var(--gradient-accent);
  color: var(--primary-deep);
  box-shadow: var(--glow-amber);
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.button-secondary,
.button-ghost {
  max-width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: normal;
}

.button {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--glow-green);
}

.button:active,
.button-secondary:active,
.button-ghost:active,
.chip:active,
.nav-item:active {
  transform: translateY(1px);
}

.button:disabled,
.button-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.button-secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(223, 244, 232, 0.86));
  color: var(--primary-strong);
  border-color: rgba(20, 118, 71, 0.16);
  box-shadow: var(--shadow-tight);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.card {
  min-width: 0;
  position: relative;
  border: 1px solid rgba(191, 216, 200, 0.78);
  border-radius: var(--radius-lg);
  background: var(--gradient-surface);
  box-shadow: var(--shadow-soft);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.card-pad {
  padding: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(191, 216, 200, 0.78);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 247, 0.9));
  box-shadow: var(--shadow-tight);
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 46%);
  pointer-events: none;
}

.metric-icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--glow-green);
}

.metric-icon .fa-icon,
.state-icon .fa-icon,
.earning-icon .fa-icon {
  width: 20px;
  height: 20px;
  font-size: 1rem;
}

.metric-value {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.05;
  font-weight: 900;
  color: var(--foreground);
}

.metric-label {
  position: relative;
  z-index: 1;
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 700;
}

.grid-list {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.event-card,
.campaign-card,
.tree-card,
.leader-card,
.timeline-item,
.badge-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(191, 216, 200, 0.78);
  border-radius: var(--radius-lg);
  background: var(--gradient-surface);
  box-shadow: var(--shadow-tight);
}

.event-card::before,
.campaign-card::before,
.tree-card::before,
.leader-card::before,
.timeline-item::before,
.badge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(20, 118, 71, 0.36), rgba(237, 174, 50, 0.26), transparent);
  opacity: 0.55;
}

.event-card h3,
.campaign-card h3,
.tree-card h3,
.leader-card h3,
.badge-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.28;
  overflow-wrap: break-word;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 700;
}

.tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(20, 118, 71, 0.14);
  background:
    linear-gradient(180deg, rgba(223, 244, 232, 0.98), rgba(255, 255, 255, 0.72));
  color: var(--primary-strong);
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 7px 16px rgba(20, 118, 71, 0.08);
}

.tag.warning {
  border-color: rgba(168, 102, 5, 0.18);
  background: linear-gradient(180deg, var(--accent-soft), rgba(255, 255, 255, 0.72));
  color: var(--accent-strong);
}

.tag.sky {
  border-color: rgba(25, 123, 151, 0.18);
  background: linear-gradient(180deg, var(--sky), rgba(255, 255, 255, 0.72));
  color: var(--sky-strong);
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(20, 118, 71, 0.08);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #8dcc54, var(--teal));
  box-shadow: 0 0 18px rgba(141, 204, 84, 0.42);
}

.split-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.split-line > * {
  min-width: 0;
}

.filter-bar {
  display: grid;
  gap: 10px;
}

.search-field,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(191, 216, 200, 0.88);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 253, 248, 0.92));
  color: var(--foreground);
  padding: 0 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-field textarea {
  min-height: 92px;
  padding-block: 12px;
  resize: vertical;
}

.search-field:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(23, 107, 58, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 107, 58, 0.1);
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(191, 216, 200, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: var(--shadow-tight);
}

.chip.is-active {
  border-color: rgba(20, 118, 71, 0.18);
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--glow-green);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  font-size: 0.84rem;
  font-weight: 800;
}

.field-error {
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-panel,
.empty-state,
.error-state,
.success-state {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(191, 216, 200, 0.78);
  background: var(--gradient-surface);
  box-shadow: var(--shadow-tight);
}

.empty-state {
  background: linear-gradient(135deg, #fff, var(--secondary), var(--sky));
}

.error-state {
  border-color: rgba(194, 65, 50, 0.22);
  background: #fff7f5;
}

.success-state {
  border-color: rgba(31, 122, 66, 0.2);
  background: #f1fbf3;
}

.state-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--glow-green);
}

.skeleton {
  display: grid;
  gap: 12px;
}

.skeleton-line,
.skeleton-card {
  border-radius: 12px;
  background: linear-gradient(90deg, #edf4ee, #f8fbf7, #edf4ee);
  background-size: 220% 100%;
  animation: shimmer 1.1s infinite linear;
}

.skeleton-line {
  height: 16px;
}

.skeleton-card {
  height: 120px;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

.map-panel {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(191, 216, 200, 0.82);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(135deg, #e4f7e9, #eefbfa 58%, #fff4d2);
  box-shadow: var(--shadow);
}

.map-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 45%);
  pointer-events: none;
}

.map-panel::after {
  content: none;
}

.map-pin {
  position: absolute;
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 999px 999px 999px 4px;
  background: var(--gradient-primary);
  color: #fff;
  transform: rotate(-45deg);
  box-shadow: 0 16px 32px rgba(20, 118, 71, 0.34);
  z-index: 2;
}

.map-pin.is-active {
  background: var(--gradient-accent);
  color: var(--primary-deep);
  transform: rotate(-45deg) scale(1.12);
  box-shadow: var(--glow-amber);
}

.map-pin span {
  transform: rotate(45deg);
  font-size: 0.72rem;
  font-weight: 900;
}

.map-sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 247, 0.86));
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: var(--shadow-soft);
}

.leader-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.podium-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid rgba(191, 216, 200, 0.78);
  border-radius: 18px;
  background: var(--gradient-surface);
  box-shadow: var(--shadow-tight);
}

.podium-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(223, 244, 232, 0.76));
  pointer-events: none;
}

.podium-rank {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--gradient-accent);
  color: var(--primary-deep);
  font-weight: 900;
  box-shadow: var(--glow-amber);
}

.podium-card:nth-child(2) {
  padding-top: 22px;
  background: linear-gradient(180deg, #fff8de, #fff);
}

.leader-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.rank-badge {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--muted), #fff);
  color: var(--primary-strong);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(20, 118, 71, 0.08);
}

.current-user {
  border-color: rgba(23, 107, 58, 0.35);
  background: linear-gradient(135deg, #fff, var(--primary-soft), rgba(255, 241, 199, 0.64));
}

.credit-pass {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.credit-pass h2,
.credit-pass p {
  margin: 0;
  color: #fff;
}

.credit-pass h2 {
  margin-top: 2px;
  font-size: 1.18rem;
  line-height: 1.18;
}

.credit-pass p:last-child {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.86rem;
  line-height: 1.45;
}

.credit-ring {
  --ring-size: 82px;
  width: var(--ring-size);
  height: var(--ring-size);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.96) 0 54%, transparent 55%),
    conic-gradient(var(--accent) calc(var(--value) * 1%), rgba(255, 255, 255, 0.22) 0);
  color: var(--primary-strong);
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    var(--glow-amber);
}

.achievement-card {
  min-height: 158px;
  align-content: start;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 247, 0.94));
}

.achievement-card.current-user {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(223, 244, 232, 0.98), rgba(255, 241, 199, 0.62));
}

.badge-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge-emblem {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--gradient-accent);
  color: var(--primary-deep);
  box-shadow: var(--glow-amber);
}

.badge-emblem.is-locked {
  background: linear-gradient(180deg, var(--muted), #fff);
  color: var(--muted-foreground);
  box-shadow: inset 0 0 0 1px rgba(99, 117, 107, 0.14);
}

.badge-emblem .fa-icon {
  width: 22px;
  height: 22px;
  font-size: 1.08rem;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.level-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid rgba(191, 216, 200, 0.78);
  border-radius: 18px;
  background: var(--gradient-surface);
  text-align: center;
  box-shadow: var(--shadow-tight);
}

.level-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54), transparent 48%);
  pointer-events: none;
}

.level-card.is-current {
  border-color: rgba(23, 107, 58, 0.46);
  background: linear-gradient(180deg, #fff, var(--primary-soft), rgba(255, 241, 199, 0.58));
  box-shadow: var(--glow-green);
}

.level-card.is-locked {
  color: var(--muted-foreground);
  background: rgba(238, 245, 238, 0.72);
}

.level-code {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(23, 107, 58, 0.16);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: var(--glow-green);
}

.level-card.is-locked .level-code {
  border-color: rgba(99, 117, 107, 0.18);
  background: var(--muted);
  color: var(--muted-foreground);
}

.level-card strong {
  position: relative;
  z-index: 1;
  font-size: 0.84rem;
  line-height: 1.22;
}

.level-card small {
  position: relative;
  z-index: 1;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 800;
}

.earning-list {
  display: grid;
  gap: 10px;
}

.earning-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(191, 216, 200, 0.78);
  border-radius: 18px;
  background: var(--gradient-surface);
  box-shadow: var(--shadow-tight);
}

.earning-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--primary), var(--teal));
  opacity: 0.72;
}

.earning-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--glow-green);
}

.earning-card span:nth-child(2) {
  position: relative;
  z-index: 1;
  min-width: 0;
  color: var(--foreground);
  font-size: 0.94rem;
  font-weight: 800;
}

.earning-card strong {
  position: relative;
  z-index: 1;
  justify-self: end;
  padding: 6px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-soft), #fff);
  color: var(--accent-strong);
  font-size: 0.74rem;
  line-height: 1.15;
  text-align: right;
}

.toast-root {
  position: fixed;
  z-index: 90;
  left: 12px;
  right: 12px;
  bottom: calc(88px + var(--safe-bottom));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  justify-self: center;
  width: min(100%, 420px);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(21, 51, 38, 0.96);
  color: #fff;
  box-shadow: var(--shadow);
}

.toast[data-type="error"] {
  background: rgba(150, 38, 28, 0.96);
}

.desktop-only {
  display: none;
}

.image-card {
  overflow: hidden;
  gap: 0;
  padding: 0;
  border-radius: 24px;
  background: var(--gradient-surface);
  box-shadow: var(--shadow-soft);
}

.image-card-media {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  display: block;
  background: linear-gradient(135deg, var(--secondary), var(--sky));
}

.image-card.compact .image-card-media {
  min-height: 148px;
}

.image-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(7, 42, 27, 0.34));
}

.image-card-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.image-card-body {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.floating-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(223, 244, 232, 0.88));
  color: var(--primary-deep);
  font-size: 0.76rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 22px rgba(15, 79, 49, 0.16);
}

.detail-hero {
  overflow: hidden;
  border: 1px solid rgba(191, 216, 200, 0.78);
  border-radius: 26px;
  background: var(--gradient-surface);
  box-shadow: var(--shadow);
}

.detail-hero-media {
  position: relative;
  min-height: 250px;
  background: linear-gradient(135deg, var(--secondary), var(--sky));
}

.detail-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(10, 45, 27, 0.5));
}

.detail-hero-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.back-pill {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-tight);
}

.detail-hero-content {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.detail-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.detail-facts > div {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(191, 216, 200, 0.5);
  background: linear-gradient(180deg, var(--secondary), rgba(255, 255, 255, 0.72));
}

.detail-facts span {
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 700;
}

.detail-cta {
  width: 100%;
}

.detail-body-grid {
  grid-template-columns: 1fr;
}

.rich-content p {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.check-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted-foreground);
  line-height: 1.55;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.35em;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: inset 0 0 0 5px var(--primary-soft);
}

.agenda-list {
  display: grid;
  gap: 10px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}

.agenda-item span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--warning);
  font-weight: 900;
}

.premium-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.18);
  min-height: 220px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.premium-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(7, 42, 27, 0.2));
  pointer-events: none;
}

.premium-panel img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  opacity: 0.88;
}

.premium-panel-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--foreground);
  backdrop-filter: blur(12px);
  z-index: 1;
  box-shadow: var(--shadow-tight);
}

.premium-panel-caption strong {
  font-size: 1.05rem;
}

.profile-plate {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: var(--glow-green);
}

.profile-plate .metric-value {
  font-size: 1.05rem;
  line-height: 1.18;
}

.quick-action-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(234, 247, 237, 0.88), rgba(255, 241, 199, 0.46)),
    var(--card);
}

.quick-action-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.quick-action-card h3,
.quick-action-card p {
  position: relative;
}

.qr-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(191, 216, 200, 0.68);
  background: linear-gradient(135deg, var(--secondary), #fff, var(--accent-soft));
  box-shadow: var(--shadow-tight);
}

.fake-qr {
  width: 116px;
  height: 116px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, var(--foreground) 8px, transparent 8px) 0 0 / 18px 18px,
    linear-gradient(var(--foreground) 8px, transparent 8px) 0 0 / 18px 18px,
    #fff;
  border: 8px solid #fff;
  box-shadow: inset 0 0 0 1px var(--border), 0 14px 26px rgba(21, 51, 38, 0.12);
}

.fake-qr span {
  border: 7px solid var(--foreground);
  border-radius: 6px;
  background: #fff;
}

.copy-line {
  margin-top: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 9px 10px;
  border: 1px dashed rgba(23, 107, 58, 0.38);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-head .button,
  .section-head .button-secondary,
  .section-head .button-ghost,
  .hero-actions .button,
  .hero-actions .button-ghost {
    width: 100%;
  }

  .credit-pass {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .qr-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .earning-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .earning-card strong {
    grid-column: 2;
    justify-self: start;
  }
}

@media (min-width: 768px) {
  .app-main {
    padding-bottom: 28px;
  }

  .bottom-nav {
    display: none;
  }

  .topbar {
    min-height: 72px;
    padding-inline: 28px;
  }

  .brand-title {
    display: grid;
    font-size: 0.82rem;
    color: var(--muted-foreground);
    font-weight: 700;
  }

  .page {
    min-height: calc(100svh - 72px);
    padding: 24px 28px 36px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
    align-items: end;
    padding: 32px;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grid-list.two-up,
  .form-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-list.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .image-card {
    min-height: 100%;
  }

  .image-card-media {
    min-height: 210px;
  }

  .detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  }

  .detail-hero-media {
    min-height: 100%;
  }

  .detail-hero-content {
    align-content: center;
    padding: 30px;
  }

  .detail-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-body-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  }

  .filter-bar {
    grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1fr);
    align-items: center;
  }

  .toast-root {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: 420px;
  }
}

@media (min-width: 1100px) {
  .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 20px;
    padding: 22px 18px;
    border-right: 1px solid rgba(191, 216, 200, 0.7);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 251, 245, 0.72));
    backdrop-filter: blur(20px) saturate(1.12);
    box-shadow: 18px 0 46px rgba(15, 79, 49, 0.06);
  }

  .topbar {
    display: none;
  }

  .side-nav {
    display: grid;
    align-content: start;
    gap: 6px;
  }

  .side-nav .nav-item {
    grid-template-columns: 22px 1fr;
    justify-items: start;
    min-height: 46px;
    padding: 0 12px;
    font-size: 0.9rem;
    border-radius: 15px;
  }

  .app-main {
    margin: 0;
    width: 100%;
  }

  .page {
    max-width: 1180px;
    min-height: 100svh;
    padding: 30px 36px 44px;
  }

  .desktop-only {
    display: block;
  }
}
