/* ===== КАРТОЧКА ===== */
.card {
  background: var(--bg-card);
  border: 0.5px solid var(--gold-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  transition: transform 0.1s ease, border-color 0.1s ease;
}
.card:active { transform: scale(0.98); }
.card:hover { border-color: var(--gold-border2); }

/* ===== PILL ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pill-bg);
  border: 0.5px solid var(--gold-border2);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 14px;
  color: var(--white);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.pill.small { padding: 5px 12px; font-size: 12px; border-radius: 20px; }
.pill.tiny { padding: 3px 10px; font-size: 12px; border-radius: 20px; }
.pill.active {
  border-color: var(--gold);
  color: var(--gold);
}
.pill.inactive {
  border-color: var(--gold-border);
  color: var(--muted);
}

/* ===== MEDALLION ===== */
.medallion {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--pill-bg);
  border: 0.5px solid var(--gold-border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--muted);
  flex-shrink: 0;
}
.medallion.gold-border { border: 0.5px solid rgba(253,200,108,0.3); }

/* ===== CARD-TITLE ===== */
.card-title {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 10px 0;
}
.card-title.big { font-size: 22px; }
.badge-new {
  display: inline-block;
  background: var(--red-bright);
  color: var(--white);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== DROPDOWN ===== */
.dropdown {
  background: var(--pill-bg);
  border: 0.5px solid var(--gold-border2);
  border-radius: 24px;
  padding: 10px 16px;
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.dropdown span.caret { color: var(--muted); font-size: 10px; }

/* ===== TOGGLE / TABS ===== */
.toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.toggle button {
  background: var(--bg-card);
  border: 0.5px solid var(--gold-border);
  border-radius: 12px;
  padding: 10px;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
}
.toggle button.active {
  background: var(--pill-bg);
  border-color: var(--gold);
  color: var(--gold);
}

.tabs-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.tabs-2 button {
  background: var(--pill-bg);
  border: 0.5px solid var(--gold-border2);
  border-radius: 24px;
  padding: 10px;
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tabs-2 button.active {
  border-color: var(--gold);
  color: var(--gold);
}

.tabs-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.tabs-3 button {
  background: var(--pill-bg);
  border: 0.5px solid var(--gold-border2);
  border-radius: 24px;
  padding: 10px 8px;
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
}
.tabs-3 button.active {
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== INFO-LINE ===== */
.info-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--white);
  margin-bottom: 6px;
}
.info-line .ic { font-size: 16px; color: var(--muted); }

.rules-text {
  font-size: 14px;
  color: var(--white);
  line-height: 1.6;
  margin: 0;
}

.info-block {
  background: var(--red-dark);
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0;
}
.info-block .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-block .text {
  font-size: 14px;
  color: var(--white);
  line-height: 1.6;
  margin: 0;
}

/* ===== CTA BUTTON ===== */
.cta-btn {
  width: 100%;
  background: var(--white);
  color: var(--bg);
  border: none;
  border-radius: 24px;
  padding: 16px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 12px;
}
.cta-btn:active { transform: scale(0.98); }
.cta-btn.joined {
  background: var(--red-dark);
  color: var(--white);
}

/* ===== ADMIN LINK (in profile, opens /pages/admin.html in new tab) ===== */
.admin-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 16px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 12px;
  transition: background 0.15s, transform 0.1s;
}
.admin-link:active { transform: scale(0.98); }
.admin-link .ico {
  font-size: 1.2em;
  flex-shrink: 0;
}
.admin-link .arrow {
  margin-left: auto;
  font-size: 1.2em;
  opacity: 0.7;
}

/* ===== AVATAR ===== */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pill-bg);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.avatar.lg { width: 40px; height: 40px; }
.avatar.gold-border { border: 2px solid var(--gold); }
.avatar.blue { background: #1A3A5C; color: #A8C8E8; }
.avatar.red { background: #2A1A1A; color: #C08080; }
.avatar.brown { background: #3A2A1A; color: #D8B890; }

/* ===== MINI-CARD ===== */
.mini-card {
  background: var(--bg-card);
  border: 0.5px solid var(--gold-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.mini-card .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.mini-card .head .title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
  flex: 1;
  min-width: 0;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-card .head .counter {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.mini-card .pill { font-size: 13px; }
.mini-card > h4.title {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
  line-height: 1.1;
}

.progress-bar {
  height: 2px;
  background: rgba(253,200,108,0.1);
  border-radius: 1px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  background: var(--gold);
  width: 0%;
}

/* ===== HISTORY-CARD ===== */
.history-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 0.5px solid var(--gold-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}
.history-card .left .title {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 8px 0;
}
.history-card .left .row-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

/* ===== LESSON-CARD ===== */
.lesson-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 0.5px solid var(--gold-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s ease;
}
.lesson-card:active { transform: scale(0.98); }
.lesson-card:hover { border-color: var(--gold); }
.lesson-card .left .name {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 10px;
}

/* ===== MAP-CARD ===== */
.map-card {
  width: 100%;
  height: 200px;
  background: var(--bg-card);
  border: 0.5px solid var(--gold-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.1s ease;
}
.map-card:hover { border-color: var(--gold); }
.map-card .pin { font-size: 40px; color: var(--gold); }
.map-card .label { font-size: 14px; color: var(--muted); }

/* ===== EMPTY-STATE ===== */
.empty-state {
  text-align: center;
  color: var(--muted2);
  font-size: 14px;
  padding: 60px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.empty-state p {
  margin: 0;
  line-height: 1.5;
}
.empty-state .ico-lg {
  font-size: 48px;
  opacity: 0.5;
}

/* ===== Q&A ===== */
.qa-block {
  padding: 16px 0;
  border-bottom: 0.5px solid var(--gold-border);
}
.qa-block:first-of-type { padding-top: 0; }
.qa-block:last-of-type { border-bottom: none; }
.qa-block .q {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 10px 0;
}
.qa-block .a {
  font-size: 14px;
  color: var(--white);
  line-height: 1.7;
  margin: 0;
}

/* ===== SEARCH INPUT ===== */
.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 0.5px solid var(--gold-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}
.search-input::placeholder { color: var(--muted2); }
.search-input:focus { border-color: var(--gold); }
