:root {
  --bg: #0f1116;
  --panel: rgba(21, 25, 33, 0.92);
  --panel-strong: #181d26;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f1eb;
  --muted: #98a1ad;
  --red: #961326;
  --red-dark: #72101d;
  --gold: #d0a55b;
  --ok: #a8dfb8;
  --ok-strong: #24a05a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(760px 360px at 100% -8%, rgba(150, 19, 38, 0.28), transparent 58%),
    radial-gradient(620px 300px at -10% 8%, rgba(57, 66, 82, 0.32), transparent 60%),
    var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.hero {
  padding: 2.2rem 0 1rem;
}

.hero h1 {
  margin: 0.4rem 0 0;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1;
}

.hero p {
  margin: 0.85rem 0 0;
  max-width: 34rem;
  color: var(--muted);
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(208, 165, 91, 0.34);
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-mark.small {
  padding: 0.28rem 0.6rem;
  font-size: 0.68rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(24, 29, 38, 0.98), rgba(16, 19, 27, 0.98));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  padding: 1rem;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.42rem;
  font-size: 0.93rem;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 14, 0.72);
  color: var(--text);
  padding: 0.85rem 0.9rem;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.btn-primary {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
}

.btn-secondary {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(180deg, #394250, #252b36);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}

.btn-wide {
  width: 100%;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.error-line {
  min-height: 1.2rem;
  color: #ffb7b7;
  margin: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.topbar-user {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

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

.dash-card {
  text-align: left;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(33, 38, 49, 0.94), rgba(20, 23, 31, 0.94));
  color: var(--text);
  display: grid;
  gap: 0.32rem;
}

.dash-card strong {
  font-size: 1.02rem;
}

.dash-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.dash-card.active {
  border-color: rgba(208, 165, 91, 0.28);
  box-shadow: inset 0 0 0 1px rgba(208, 165, 91, 0.08);
}

.status-line {
  min-height: 1.3rem;
  color: var(--muted);
  margin: 0.75rem 0 1rem;
}

.status-line.is-error {
  color: #ffb7b7;
}

.tab {
  display: none;
}

.tab.active {
  display: grid;
  gap: 1rem;
}

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

.geo-tools {
  display: grid;
  gap: 0.45rem;
}

.geo-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.media-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.media-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.media-count {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.media-picker {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 14, 0.72);
  cursor: pointer;
  font-weight: 600;
}

.media-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

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

.crew-picker {
  padding-top: 0.2rem;
}

.muted-label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.list {
  margin-top: 0;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(20, 24, 32, 0.94);
  padding: 1rem;
}

.report-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.report-card p {
  margin: 0.24rem 0;
  color: #dce1e8;
}

.earnings-panel h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(2rem, 7vw, 3.2rem);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.3rem;
  transform: translateX(-50%) translateY(120%);
  min-width: min(320px, calc(100% - 1.4rem));
  max-width: 520px;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: linear-gradient(180deg, rgba(36, 160, 90, 0.98), rgba(22, 119, 66, 0.98));
  color: #fff;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
  z-index: 50;
}

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

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .dashboard,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .shell {
    width: min(100%, calc(100% - 0.9rem));
  }

  .panel {
    border-radius: 18px;
    padding: 0.9rem;
  }

  .topbar,
  .crew-bar {
    align-items: stretch;
    flex-direction: column;
  }
}
