:root {
  --panel: rgba(8, 17, 31, 0.76);
  --panel-strong: rgba(10, 22, 40, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f0e8;
  --muted: #9fb0c5;
  --gold: #f0b15f;
  --coral: #ff6f61;
  --teal: #4ed6c1;
  --mint: #bbf3de;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --headline: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
  --body: "Segoe UI", "Candara", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body);
  background:
    radial-gradient(circle at top left, rgba(255, 111, 97, 0.28), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(78, 214, 193, 0.24), transparent 28%),
    linear-gradient(160deg, #09121f 0%, #0a182c 48%, #102748 100%);
}

.hidden {
  display: none !important;
}

.background-orb {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.33;
  pointer-events: none;
}

.orb-left {
  top: -8rem;
  left: -8rem;
  background: rgba(255, 111, 97, 0.42);
}

.orb-right {
  right: -6rem;
  bottom: -7rem;
  background: rgba(78, 214, 193, 0.34);
}

.shell {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: 1.75rem;
}

.utility-shell {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: 1rem 1.3rem;
  margin-bottom: 1rem;
}

.user-toolbar {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.user-chip {
  display: grid;
  gap: 0.3rem;
  padding: 0.75rem 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.compact {
  min-width: 10rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 1.5rem;
  padding: 1.6rem;
  margin-bottom: 1rem;
}

.auth-box,
.auth-form,
.auth-modes,
.agency-toolbar,
.agency-form,
.agency-actions,
.chat-form {
  display: grid;
  gap: 0.85rem;
}

.auth-modes,
.chat-scopes {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.auth-box {
  align-content: start;
}

.field-stack {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  font: inherit;
}

input::placeholder {
  color: rgba(159, 176, 197, 0.7);
}

.small {
  padding: 0.8rem 1rem;
}

.agency-shell {
  display: grid;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
}

.agency-toolbar {
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.6fr) auto;
  align-items: end;
}

.agency-form {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.75fr) auto;
  align-items: end;
}

.app-shell {
  display: grid;
  gap: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  padding: 2rem;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -3rem -5rem auto;
  width: 16rem;
  height: 16rem;
  background:
    linear-gradient(145deg, rgba(240, 177, 95, 0.4), rgba(255, 111, 97, 0));
  transform: rotate(18deg);
  border-radius: 2rem;
}

.eyebrow,
.section-kicker,
.stat-label,
.talent-rarity {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-size: 0.75rem;
}

h1,
h2,
h3 {
  font-family: var(--headline);
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4.3rem);
  line-height: 0.95;
  max-width: 10ch;
}

.hero-text,
.section-note,
.talent-trait,
.stat-meta,
.activity-item p,
.release-meta,
.investment-copy p,
.chat-meta {
  color: var(--muted);
  line-height: 1.55;
}

.hero-actions {
  display: grid;
  gap: 0.85rem;
  align-content: center;
}

.hero-meta {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.agency-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(240, 177, 95, 0.12);
  border: 1px solid rgba(240, 177, 95, 0.22);
  color: var(--gold);
  font-size: 0.9rem;
}

button {
  border: 0;
  cursor: pointer;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
  font: inherit;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.primary-button,
.secondary-button,
.ghost-button {
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  font-weight: 600;
}

.primary-button {
  background: linear-gradient(135deg, var(--coral), #ff9e70);
  color: white;
  box-shadow: 0 12px 30px rgba(255, 111, 97, 0.32);
}

.secondary-button {
  background: linear-gradient(135deg, rgba(78, 214, 193, 0.2), rgba(78, 214, 193, 0.06));
  color: var(--mint);
  border: 1px solid rgba(78, 214, 193, 0.28);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  padding: 1.05rem 1.15rem;
  background: var(--panel-strong);
  border-radius: 1.25rem;
  border: 1px solid var(--line);
}

.stat-value {
  margin: 0.35rem 0;
  font-size: 1.85rem;
  font-weight: 700;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(340px, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.sidebar {
  display: grid;
  gap: 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.section-header.compact {
  margin-bottom: 0.75rem;
}

.talent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.talent-card {
  padding: 1.15rem;
  border-radius: 1.35rem;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    var(--panel-strong);
  border: 1px solid var(--line);
}

.talent-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.talent-name {
  margin-top: 0.25rem;
  font-size: 1.35rem;
}

.talent-genre {
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(240, 177, 95, 0.14);
  color: var(--gold);
  font-size: 0.8rem;
}

.talent-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem 0;
}

.stat-pill {
  padding: 0.65rem 0.8rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-pill strong {
  display: block;
  font-size: 1.05rem;
  margin-top: 0.15rem;
}

.talent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.mini-button {
  padding: 0.7rem 0.85rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.mini-button.accent {
  background: rgba(78, 214, 193, 0.12);
  color: var(--mint);
}

.mini-button.primary {
  background: linear-gradient(135deg, rgba(255, 111, 97, 0.85), rgba(240, 177, 95, 0.85));
  color: white;
}

.agenda-list,
.investment-list,
.leaderboard-list,
.activity-list,
.release-list,
.chat-list {
  display: grid;
  gap: 0.75rem;
}

.agenda-item,
.investment-item,
.leaderboard-item,
.activity-item,
.release-item,
.chat-item,
.chat-empty {
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.04);
}

.agenda-item,
.investment-item,
.chat-empty {
  padding: 0.95rem;
}

.agenda-topline,
.chat-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.agenda-progress {
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin: 0.6rem 0;
}

.agenda-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--coral), var(--gold));
}

.reward-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(78, 214, 193, 0.12);
  color: var(--mint);
  font-size: 0.82rem;
}

.investment-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.investment-copy h3,
.release-title {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.investment-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.8rem;
}

.leaderboard-item,
.activity-item,
.release-item,
.chat-item {
  padding: 0.9rem 1rem;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.leaderboard-item.self {
  border-color: rgba(240, 177, 95, 0.38);
  background: rgba(240, 177, 95, 0.08);
}

.rank-pill {
  display: inline-flex;
  min-width: 2rem;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.activity-item p,
.release-meta,
.section-note,
.chat-meta,
.chat-text {
  margin: 0;
}

.release-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.release-badge {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(78, 214, 193, 0.12);
  color: var(--mint);
  white-space: nowrap;
}

.chat-list {
  max-height: 22rem;
  overflow: auto;
}

.chat-form {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.chat-text {
  margin-top: 0.35rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  background: rgba(6, 10, 19, 0.92);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  transition: transform 220ms ease;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .auth-shell,
  .agency-toolbar,
  .agency-form,
  .hero,
  .main-grid,
  .utility-shell {
    grid-template-columns: 1fr;
  }

  .utility-shell {
    display: grid;
    align-items: stretch;
  }

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

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1rem, 100%);
    padding-top: 1rem;
  }

  .agency-shell,
  .auth-shell,
  .hero,
  .panel {
    border-radius: 1.4rem;
  }

  .agency-shell,
  .auth-shell,
  .hero {
    padding: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .agency-form,
  .chat-form,
  .talent-actions,
  .talent-stats,
  .release-item {
    grid-template-columns: 1fr;
  }

  .release-item {
    align-items: start;
  }
}
