@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --violet: #6c5ce7; --violet-deep: #5b21b6; --banner: #4f46a8;
  --teal: #1fb8ae; --gold: #e6c089; --gold-btn: #e7b063;
  --ink: #2d2a5a; --muted: #6b6790;
  --radius: 22px; --shadow: 0 12px 40px rgba(91,33,182,0.16);
}

html, body {
  font-family: 'Montserrat', sans-serif; color: var(--ink); font-weight: 400;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 8% -10%, #d7b6ff66, transparent 60%),
    radial-gradient(900px 500px at 112% 8%, #7be8dd55, transparent 55%),
    linear-gradient(160deg, #cfc7f0, #b9b0e8);
  background-attachment: fixed;
}
.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 40px; }

/* Стеклянная карточка */
.card, .glass {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 16px;
}
.card__title { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.section-label {
  font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: #8a84b3; margin-bottom: 14px;
}

/* Шапка-баннер */
.hero {
  background: linear-gradient(135deg, var(--violet), var(--banner));
  color: #fff; border-radius: var(--radius); padding: 22px 20px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.hero__team {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
  padding: 6px 14px; border-radius: 999px;
  background: linear-gradient(90deg, #f6e2bd, #e6c089);
  color: #8a6d33; font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.hero__title { font-size: 24px; font-weight: 900; line-height: 1.05; margin-bottom: 4px; }
.hero__sub { font-size: 14px; opacity: 0.95; }

/* Цель-карточка (фиолетовый градиент, золотая цифра, полоса) */
.goalcard {
  background: linear-gradient(135deg, var(--violet), var(--banner));
  border: none; color: #fff; text-align: center;
}
.goalcard .section-label { color: rgba(255,255,255,0.85); }
.gap-num {
  font-size: 46px; font-weight: 900; line-height: 1; display: block; margin: 6px 0 2px;
  background: linear-gradient(90deg, #fff, #ffe4b8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gap-unit { font-size: 13px; opacity: 0.9; }
.bar { height: 12px; border-radius: 99px; background: rgba(255,255,255,0.22); margin: 16px 0 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), #8ef0e6); box-shadow: 0 0 16px var(--teal); transition: width 0.5s ease; }
.goal-foot { font-size: 12px; opacity: 0.92; }

/* Карта-путь рангов (геймификация) */
.ladder { list-style: none; position: relative; padding-left: 4px; }
.ladder::before {
  content: ""; position: absolute; left: 18px; top: 16px; bottom: 16px;
  width: 3px; background: linear-gradient(var(--teal), #cabfe8);
}
.ladder li {
  display: flex; align-items: center; gap: 14px; padding: 9px 0;
  position: relative; font-size: 14px; font-weight: 600; color: var(--muted);
}
.ladder li .dot {
  width: 32px; height: 32px; border-radius: 50%; flex: none; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  background: #eae5f7; color: #b3a9d6; border: 2px solid #d9d3ee;
}
.ladder li.done { color: var(--ink); }
.ladder li.done .dot { background: var(--teal); color: #fff; border-color: var(--teal); }
.ladder li.current {
  color: var(--violet-deep); font-weight: 800; font-size: 15px;
}
.ladder li.current .dot {
  background: linear-gradient(135deg, var(--violet), var(--banner)); color: #fff;
  border-color: #fff; transform: scale(1.12); box-shadow: 0 0 0 4px rgba(108,92,231,0.22), 0 6px 18px rgba(91,33,182,0.35);
}
.ladder li.target { color: var(--violet-deep); font-weight: 800; }
.ladder li.target .dot { background: linear-gradient(135deg, #ffd98a, var(--gold)); color: #7a5a1e; border-color: #ffd98a; }

/* Квесты ступени (действия) */
.action {
  display: flex; gap: 13px; align-items: flex-start; padding: 13px;
  border-radius: 15px; margin-bottom: 10px;
  background: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.55);
  cursor: pointer; transition: transform 0.12s;
}
.action:active { transform: scale(0.99); }
.action.done { background: rgba(31,184,174,0.10); border-color: rgba(31,184,174,0.35); }
.action__check {
  width: 28px; height: 28px; border-radius: 9px; flex: none; margin-top: 1px;
  border: 2px solid #cabfe8; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 15px; font-weight: 900;
}
.action.done .action__check { background: var(--teal); border-color: var(--teal); }
.action__title { font-size: 15px; font-weight: 800; }
.action__desc { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

/* Квесты с чек-листами под-задач */
.quests-head {
  font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: #8a84b3; margin: 2px 4px 12px;
}
.quest { padding: 16px 18px; }
.quest__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.quest__title { font-size: 16px; font-weight: 800; }
.quest__count {
  font-size: 12px; font-weight: 800; color: var(--violet-deep);
  background: rgba(108,92,231,0.12); padding: 3px 11px; border-radius: 999px;
}
.quest__count.full { color: #0f8478; background: rgba(31,184,174,0.18); }
.qitem {
  display: flex; gap: 11px; align-items: center; padding: 9px 0;
  border-bottom: 1px solid rgba(45,42,90,0.07); cursor: pointer;
}
.qitem:last-child { border: none; }
.qcheck {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid #cabfe8;
  flex: none; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 900;
}
.qitem.done .qcheck { background: var(--teal); border-color: var(--teal); }
.qtext { font-size: 14px; font-weight: 600; }
.qitem.done .qtext { color: var(--muted); text-decoration: line-through; }

/* Формы */
label { display: block; font-size: 13px; font-weight: 700; margin: 10px 0 4px; }
input, select {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.7);
  border-radius: 13px; font-family: inherit; font-size: 15px; color: var(--ink);
  background: rgba(255,255,255,0.75);
}
input:focus, select:focus { outline: none; border-color: var(--violet); }

/* Кнопки */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; border: none; border-radius: 15px;
  background: linear-gradient(135deg, var(--violet), var(--banner)); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
  margin-top: 14px; text-decoration: none; transition: transform 0.12s, opacity 0.12s;
}
.btn:active { transform: scale(0.98); }
.btn--gold { background: linear-gradient(135deg, #ffd98a, var(--gold-btn)); color: #6a4a12; }
.btn--ghost { background: rgba(255,255,255,0.6); color: var(--violet-deep); box-shadow: var(--shadow); }
.btn--sm { min-height: 40px; font-size: 13px; width: auto; padding: 0 18px; margin: 0; }

.link { color: var(--violet-deep); font-weight: 700; text-decoration: none; }
.center { text-align: center; margin-top: 16px; font-size: 14px; color: var(--ink); }
.msg { font-size: 14px; margin-top: 12px; padding: 11px 13px; border-radius: 12px; }
.msg--err { background: #fde8ea; color: #b02a3a; }
.msg--ok { background: #e5f7f4; color: #0f8478; }
.hidden { display: none; }

/* Список заявок (модерация) */
.pending-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; border-radius: 14px; margin-bottom: 10px; gap: 10px;
  background: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.55);
}
.pending-row .who { font-size: 15px; font-weight: 800; }
.pending-row .meta { font-size: 12px; color: var(--muted); }
