﻿:root {
  --bg-1: #f4f9ff;
  --bg-2: #edf5ff;
  --line: #d9e5f4;
  --text: #0f172a;
}

* {
  box-sizing: border-box;
}

body.app-body {
  font-family: "Sora", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, #dff0ff 0%, transparent 35%),
    radial-gradient(circle at 85% 20%, #e6f3ff 0%, transparent 35%),
    linear-gradient(180deg, var(--bg-1), #f8fbff 35%, var(--bg-2));
}

.sidebar-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  padding: 1rem;
  height: fit-content;
  position: sticky;
  top: 5.5rem;
}

.nav-group-title {
  color: #64748b;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.nav-link {
  width: 100%;
  text-align: left;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  color: #334155;
  transition: all 0.15s ease;
}

.nav-link:hover {
  background: #eff6ff;
  border-color: #c7ddf5;
  color: #1d4b86;
}

.nav-link.active {
  background: #dff0ff;
  border-color: #9ac7f3;
  color: #174274;
  font-weight: 600;
}

.screen {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.screen-title {
  font-size: 1.45rem;
  font-weight: 600;
  color: #0f172a;
}

.screen-subtitle {
  margin-top: 0.35rem;
  color: #475569;
  font-size: 0.86rem;
}

.metric-card {
  border: 1px solid #d7e6f8;
  border-radius: 0.8rem;
  background: linear-gradient(180deg, #fafdff, #f2f8ff);
  padding: 0.75rem;
}

.primary-btn,
.secondary-btn,
.chip,
.vote-btn {
  border-radius: 0.7rem;
  transition: all 0.15s ease;
}

.primary-btn {
  border: 1px solid #2d7ed7;
  background: linear-gradient(180deg, #3c95f4, #2b7fd8);
  color: white;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.55rem 0.9rem;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(47, 129, 218, 0.2);
}

.secondary-btn {
  border: 1px solid #c6dbf3;
  background: #f6fbff;
  color: #1f4f88;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem 0.85rem;
}

.secondary-btn:hover,
.chip:hover,
.vote-btn:hover {
  background: #e8f3ff;
  border-color: #9ac7f3;
}

.chip {
  border: 1px solid #d4e4f6;
  background: #f7fbff;
  color: #305377;
  font-size: 0.73rem;
  padding: 0.34rem 0.58rem;
  font-weight: 500;
}

.chip-active {
  background: #dff0ff;
  border-color: #9ac7f3;
  color: #11457e;
}

.status-pill {
  border-radius: 999px;
  background: #dff1ff;
  color: #11508c;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
}

.field-label {
  display: block;
  font-size: 0.76rem;
  margin-bottom: 0.3rem;
  color: #475569;
  font-weight: 600;
}

.field-input {
  width: 100%;
  border: 1px solid #cfdef0;
  border-radius: 0.78rem;
  padding: 0.58rem 0.75rem;
  background: #fefeff;
  font-size: 0.84rem;
  color: #1e293b;
}

.field-input:focus {
  outline: none;
  border-color: #71aeea;
  box-shadow: 0 0 0 3px rgba(113, 174, 234, 0.18);
}

.list-row,
.toggle-row,
.mentor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.badge {
  border-radius: 999px;
  border: 1px solid #b8d5f3;
  background: #eff7ff;
  color: #164478;
  padding: 0.3rem 0.58rem;
  font-weight: 600;
}

.badge-stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1rem;
}

.trophy-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.32rem;
  padding: 0;
  background: transparent;
  border: none;
  color: #1e3a5f;
  font-weight: 600;
  text-align: center;
  width: 6.5rem;
  line-height: 1.2;
}

.trophy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border: none;
  background: transparent;
}

.trophy-icon-svg {
  width: 2.96rem;
  height: 2.96rem;
  stroke-width: 1.9;
}

.trophy-badge-gold {
  color: #7a5a12;
}

.trophy-badge-gold .trophy-icon-svg {
  color: #b45309;
}

.trophy-badge-silver {
  color: #42566f;
}

.trophy-badge-silver .trophy-icon-svg {
  color: #475569;
}

.trophy-badge-blue {
  color: #1b4f89;
}

.trophy-badge-blue .trophy-icon-svg {
  color: #1d4ed8;
}

.vote-btn {
  border: 1px solid #bed6f0;
  background: #f4f9ff;
  color: #1d4b86;
  padding: 0.38rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.vote-btn.upvoted {
  border-color: #79b4e9;
  background: #dff1ff;
  color: #0f4f8f;
}

.unlock-item {
  border: 1px solid #dde8f6;
  border-radius: 0.72rem;
  background: #f8fbff;
  padding: 0.55rem 0.7rem;
}

.unlock-item.unlocked {
  border-color: #bde0c6;
  background: #f3fbf6;
}

.message-item {
  width: 100%;
  border: 1px solid #d7e6f8;
  border-radius: 0.75rem;
  background: #f8fbff;
  padding: 0.5rem 0.65rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-bubble {
  max-width: 78%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid #d5e5f7;
}

.chat-in {
  background: #f7fbff;
}

.chat-out {
  margin-left: auto;
  background: #e5f3ff;
  border-color: #a9d1f6;
}

.pricing-card {
  border: 1px solid #d4e4f6;
  border-radius: 1rem;
  background: #fbfdff;
  padding: 1rem;
}

.pricing-card h2 {
  font-weight: 700;
  color: #0f172a;
}

.pricing-card.featured {
  border: 2px solid #67aee9;
  background: linear-gradient(180deg, #f4faff, #edf6ff);
}

.price {
  margin-top: 0.6rem;
  font-size: 2rem;
  font-weight: 700;
  color: #1d4b86;
}

.price span {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

.bar-row {
  display: grid;
  grid-template-columns: 96px 1fr 45px;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #334155;
}

.bar-row > div {
  border-radius: 999px;
  background: #eaf3ff;
  border: 1px solid #d0e2f5;
  overflow: hidden;
  height: 0.55rem;
}

.bar-row em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #65ace9, #2d82db);
}

.rep-topbar-shell {
  position: sticky;
  top: 4.35rem;
  z-index: 35;
  margin-top: 0.45rem;
}

.rep-topbar {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(4px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
}

.rep-main {
  min-width: 0;
}

.rep-title {
  border: 0;
  background: none;
  color: #0f4f8f;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.rep-title:hover {
  color: #1f74cd;
}

.rep-stats {
  margin-top: 0.2rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.rep-stat {
  border: 1px solid #d7e6f8;
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  font-size: 0.67rem;
  line-height: 1;
  padding: 0.2rem 0.42rem;
  white-space: nowrap;
}

.rep-stat strong {
  color: #0f172a;
  font-weight: 700;
}

.rep-stat-activity {
  font-size: 0.7rem;
  padding: 0.24rem 0.5rem;
}

.rep-stat.rep-positive strong {
  color: #047857;
}

.rep-progress-track {
  margin-top: 0.3rem;
  height: 0.26rem;
  border-radius: 999px;
  border: 1px solid #d0e2f5;
  background: #eaf3ff;
  overflow: hidden;
}

.rep-progress-fill {
  display: block;
  height: 100%;
  width: 74%;
  background: linear-gradient(90deg, #65ace9, #2d82db);
}

.rep-side {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.rep-side-title {
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rep-unlocks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
}

.rep-unlock {
  border: 1px solid #dde8f6;
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  font-size: 0.64rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  white-space: nowrap;
}

.rep-unlock.unlocked {
  border-color: #bde0c6;
  background: #f3fbf6;
  color: #166534;
}

.member-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.member-name-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
}

.member-name-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  stroke-width: 2;
}

.member-name-icon-gold {
  color: #d97706;
}

.member-name-icon-silver {
  color: #64748b;
}

.member-name-icon-blue {
  color: #2563eb;
}

.has-reputation-topbar .sidebar-panel {
  top: 8rem;
}

@media (max-width: 1023px) {
  .rep-topbar-shell {
    top: 4.15rem;
    margin-top: 0.4rem;
  }

  .rep-topbar {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
  }

  .rep-side {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .rep-unlocks {
    justify-content: flex-start;
  }

  .sidebar-panel {
    position: fixed;
    z-index: 30;
    top: 4.4rem;
    left: 0.8rem;
    right: 0.8rem;
    max-height: calc(100vh - 6rem);
    overflow: auto;
    transform: translateY(-18px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.18s ease;
  }

  .has-reputation-topbar .sidebar-panel {
    top: 6.9rem;
    max-height: calc(100vh - 8.4rem);
  }

  .sidebar-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}
