/* tarfket app — blue workspace */
body.app {
  --bg: #f5f8fd;
  --panel: #fff;
  --panel-2: #f7f9fc;
  --text: #111827;
  --ink: #111827;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e5eaf1;
  --line-2: #cfd8e6;
  --green: #2f67f5;
  --green-dim: #7ca2ff;
  --green-dark: #dce8ff;
  --accent: #2f67f5;
  --accent-bright: #2f67f5;
  --accent-soft: #eaf2ff;
  --display: "Manrope", sans-serif;
  --font: "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
}

.app-shell {
  background:
    radial-gradient(circle at 75% 0, rgba(94, 145, 255, 0.09), transparent 30%),
    var(--bg);
}

.side {
  width: auto;
  padding: 22px 14px;
  background: linear-gradient(180deg, #0d1730, #0a1227);
  border-color: rgba(255, 255, 255, 0.07);
}

.side-logo {
  padding: 3px 11px 25px;
  font-size: 1.22rem;
}

.side-logo img {
  width: 32px;
  height: 32px;
  filter: none;
}

.side-nav {
  gap: 5px;
}

.side-nav a {
  position: relative;
  padding: 11px 12px;
  border-radius: 11px;
  color: #8996ae;
  font-size: 0.85rem;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.side-nav a.active {
  color: #fff;
  background: linear-gradient(
    90deg,
    rgba(47, 103, 245, 0.3),
    rgba(47, 103, 245, 0.1)
  );
  box-shadow: inset 0 0 0 1px rgba(102, 147, 255, 0.18);
}

.side-nav a.active::before {
  content: "";
  position: absolute;
  left: -14px;
  width: 3px;
  height: 22px;
  border-radius: 0 5px 5px 0;
  background: #4b7cff;
  box-shadow: 0 0 18px #4b7cff;
}

.side-nav a.active .si {
  color: #7ca2ff;
}

.side-user {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.ava {
  background: linear-gradient(135deg, #5082ff, #2859dc);
}

.topbar {
  padding: 17px 30px;
  background: rgba(245, 248, 253, 0.84);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.balance-pill,
.icon-btn {
  border-color: var(--line);
  box-shadow: 0 4px 15px rgba(37, 68, 110, 0.035);
}

body.app .btn {
  border-radius: 10px;
  font-family: var(--font);
  font-weight: 700;
}

body.app .btn-primary {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #2f67f5;
  box-shadow: 0 10px 24px -12px rgba(47, 103, 245, 0.75);
}

body.app .btn-primary:hover {
  background: #2459dc;
}

body.app .btn-primary::after {
  content: "";
  position: absolute;
  inset: -2px auto -2px -45%;
  width: 35%;
  transform: skewX(-20deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  transition: left 0.5s ease;
}

body.app .btn-primary:hover::after {
  left: 120%;
}

body.app .btn-outline {
  border-color: #d8e0ec;
  background: #fff;
}

body.app .btn-outline:hover {
  color: #2f67f5;
  border-color: #9fb8f3;
}

.app-body {
  max-width: 1440px;
  width: 100%;
  padding: 28px 30px 42px;
  gap: 18px;
}

.stat-card,
.panel,
.pf-stat,
.profile-hero {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 26px rgba(37, 68, 110, 0.045);
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 20px;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -45px;
  top: -45px;
  border-radius: 50%;
  background: #edf3ff;
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: #bfd0f4;
  box-shadow: 0 16px 32px rgba(37, 68, 110, 0.1);
}

.stat-card:hover::after {
  transform: scale(1.25);
}

.sc-ic {
  position: relative;
  z-index: 1;
  color: #2f67f5;
  background: #eaf2ff;
}

.sc-value {
  font-family: var(--display);
  font-size: 1.75rem;
}

.sc-delta.up,
.money,
.panel-head a,
.cm-rate {
  color: #2f67f5;
}

.panel {
  border-radius: 16px;
}

.panel-head {
  padding: 18px 20px;
}

.panel-head h2 {
  font-family: var(--display);
  font-weight: 750;
}

.panel-body {
  padding-inline: 20px;
}

.tbl tbody tr {
  transition: background 0.16s;
}

.tbl tbody tr:hover {
  background: #f8faff;
}

.tbl-thumb {
  color: #fff;
  background: linear-gradient(145deg, #7ea5ff, #2f67f5);
}

.st-live {
  color: #2f67f5;
  background: #eaf2ff;
}

.st-paid {
  color: #147d64;
  background: #e9f8f3;
}

.mini-chart {
  gap: 8px;
}

.mini-chart span {
  transform-origin: bottom;
  background: linear-gradient(180deg, #79a0ff, #2f67f5);
  animation: growBar 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.mini-chart span:nth-child(2n) {
  animation-delay: 0.05s;
}

.mini-chart span:nth-child(3n) {
  animation-delay: 0.1s;
}

@keyframes growBar {
  from {
    transform: scaleY(0.05);
    opacity: 0.2;
  }
  to {
    transform: scaleY(1);
    opacity: 0.92;
  }
}

.cm-a,
.cm-b,
.cm-c {
  color: #fff;
  background: linear-gradient(135deg, #79a2ff, #2f67f5);
}

.cm-b {
  background: linear-gradient(135deg, #a78bfa, #7256dc);
}

.cm-c {
  background: linear-gradient(135deg, #55c7e8, #2189c9);
}

.profile-hero {
  border-radius: 18px;
}

.pf-cover {
  height: 175px;
  background: linear-gradient(120deg, #0c1834, #1d4fbf 60%, #5590ff);
}

.pf-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 75% 25%,
    rgba(255, 255, 255, 0.18) 0 1px,
    transparent 2px
  );
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent, #000);
}

.pf-cover::after {
  background: radial-gradient(
    400px 220px at 72% 0,
    rgba(139, 180, 255, 0.45),
    transparent 70%
  );
}

.pf-ava {
  border-color: var(--bg);
  box-shadow: 0 12px 30px rgba(17, 37, 76, 0.2);
}

.verified {
  color: #2f67f5;
}

.pf-name {
  font-family: var(--display);
  font-weight: 750;
}

.chip {
  background: #f0f4fa;
}

.chip-demo {
  color: #2f67f5;
  background: #eaf2ff;
}

.pf-stat {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  transition: 0.2s ease;
}

.pf-stat:hover {
  transform: translateY(-3px);
  border-color: #bfd0f4;
}

.pf-stat dd {
  font-family: var(--display);
  font-size: 1.55rem;
}

.accent {
  color: #2f67f5 !important;
}

.pf-clip {
  border: 0;
  background: linear-gradient(165deg, #8bb0ff, #244fc0 78%);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.pf-clip:nth-child(3n + 2) {
  background: linear-gradient(165deg, #77d8ef, #1670a7 78%);
}

.pf-clip:nth-child(3n) {
  background: linear-gradient(165deg, #b29bff, #6045b8 78%);
}

.pf-clip:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 16px 30px rgba(31, 64, 130, 0.2);
}

.pf-clip-play {
  transition: transform 0.2s;
}

.pf-clip:hover .pf-clip-play {
  transform: translate(-50%, -50%) scale(1.12);
}

.pf-clip-earn {
  color: #dce8ff;
}

.social-chip {
  background: #f7f9fc;
}

.app-empty {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.app-empty-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  border-radius: 19px;
  color: #2f67f5;
  background: #eaf2ff;
  font-size: 1.4rem;
  box-shadow: 0 0 0 9px rgba(234, 242, 255, 0.65);
  animation: emptyFloat 3.4s ease-in-out infinite;
}

.app-empty h3 {
  font-size: 1.05rem;
}

.app-empty p {
  max-width: 390px;
  margin: 7px auto 18px;
  color: var(--faint);
  font-size: 0.8rem;
}

.app-empty-models {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.app-empty-models span {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafcff;
  font-size: 0.75rem;
  font-weight: 700;
}

.app-empty-models i {
  display: block;
  color: #2f67f5;
  font-style: normal;
  font-size: 1rem;
  margin-bottom: 3px;
}

@keyframes emptyFloat {
  50% {
    transform: translateY(-7px);
    box-shadow: 0 12px 28px rgba(47, 103, 245, 0.18);
  }
}

@media (max-width: 900px) {
  .side {
    width: 264px;
  }
  .app-body {
    padding: 22px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .app-empty-models {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-body {
    padding: 16px;
  }
  .topbar {
    padding: 12px 15px;
  }
  .top-actions .btn-primary {
    padding-inline: 12px;
  }
  .stat-card {
    padding: 18px;
  }
  .pf-cover {
    height: 125px;
  }
  .pf-ava {
    width: 76px;
    height: 76px;
    margin-top: -38px;
  }
  .pf-stats {
    gap: 10px;
  }
  .pf-stat {
    padding: 15px;
  }
  .pf-stat dd {
    font-size: 1.3rem;
  }
  .pf-name {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mini-chart span,
  .app-empty-icon {
    animation: none !important;
  }
}

/* dark / mint workspace */
body.app {
  --bg: #07090c;
  --panel: #0e1215;
  --panel-2: #11171a;
  --text: #f2f6f5;
  --ink: #f2f6f5;
  --muted: #9aa6a3;
  --faint: #6f7d79;
  --line: #222a2d;
  --line-2: #354043;
  --green: #a78bfa;
  --green-dim: #7c5ce5;
  --green-dark: #211936;
  --accent: #a78bfa;
  --accent-bright: #a78bfa;
  --accent-soft: #211936;
  color-scheme: dark;
  background: #07090c;
}

body.app .app-shell {
  background:
    radial-gradient(
      circle at 76% 0,
      rgba(167, 139, 250, 0.07),
      transparent 30%
    ),
    #07090c;
}

.side {
  background: linear-gradient(180deg, #090c0f, #050607);
}

.side-nav a.active {
  background: linear-gradient(
    90deg,
    rgba(167, 139, 250, 0.18),
    rgba(167, 139, 250, 0.04)
  );
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.13);
}

.side-nav a.active::before {
  background: #a78bfa;
  box-shadow: 0 0 18px #a78bfa;
}

.side-nav a.active .si {
  color: #a78bfa;
}

.ava {
  color: #100b1d;
  background: linear-gradient(135deg, #d8b4fe, #7c5ce5);
}

body.app .topbar {
  background: rgba(7, 9, 12, 0.84);
  border-color: #20272a;
}

.balance-pill,
.icon-btn {
  border-color: #293234;
  background: #101519;
  color: #a5b0ad;
}

.topbar .sub {
  color: #6f7d79;
}

body.app .btn-primary {
  color: #100b1d;
  background: #a78bfa;
  box-shadow: 0 12px 27px -12px rgba(167, 139, 250, 0.5);
}

body.app .btn-primary:hover {
  color: #100b1d;
  background: #c4b5fd;
}

body.app .btn-outline {
  color: #dce3e1;
  border-color: #303a3d;
  background: #111619;
}

body.app .btn-outline:hover {
  color: #a78bfa;
  border-color: #6e58a1;
}

body.app .stat-card,
body.app .panel,
body.app .pf-stat,
body.app .profile-hero {
  border-color: #222a2d;
  background: rgba(14, 18, 21, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

body.app .stat-card::after {
  background: #211936;
}

body.app .stat-card:hover,
body.app .pf-stat:hover {
  border-color: #5d488d;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

body.app .sc-ic {
  color: #a78bfa;
  background: #211936;
}

body.app .sc-delta.up,
body.app .money,
body.app .panel-head a,
body.app .cm-rate {
  color: #a78bfa;
}

body.app .panel-head,
body.app .tbl th,
body.app .tbl td {
  border-color: #222a2d;
}

body.app .tbl tbody tr:hover {
  background: #11171a;
}

.tbl-thumb {
  color: #100b1d;
  background: linear-gradient(145deg, #d8b4fe, #7c5ce5);
}

.st-live {
  color: #a78bfa;
  background: #211936;
}

.mini-chart span {
  background: linear-gradient(180deg, #c4b5fd, #7c5ce5);
}

body.app .app-empty-icon {
  color: #a78bfa;
  background: #211936;
  box-shadow: 0 0 0 9px rgba(33, 25, 54, 0.62);
}

body.app .app-empty-models span {
  border-color: #263033;
  background: #11171a;
}

body.app .app-empty-models i {
  color: #a78bfa;
}

body.app .pf-cover {
  background: linear-gradient(120deg, #100b1d, #2b1e4f 58%, #7c5ce5);
}

body.app .pf-cover::after {
  background: radial-gradient(
    420px 220px at 72% 0,
    rgba(167, 139, 250, 0.32),
    transparent 70%
  );
}

body.app .verified {
  color: #a78bfa;
}

body.app .chip {
  color: #aeb9b6;
  background: #151c1f;
}

body.app .chip-demo {
  color: #a78bfa;
  background: #211936;
}

body.app .accent {
  color: #a78bfa !important;
}

body.app .pf-clip {
  background: linear-gradient(165deg, #a78bfa, #3c2866 78%);
}

body.app .pf-clip:nth-child(3n + 2) {
  background: linear-gradient(165deg, #7e6fe3, #33267d 78%);
}

body.app .pf-clip:nth-child(3n) {
  background: linear-gradient(165deg, #3b8999, #16404a 78%);
}

body.app .pf-clip-earn {
  color: #ede9fe;
}

body.app .social-chip {
  border-color: #263033;
  background: #11171a;
}

/* workspace motion */
body.app .stats-row .stat-card {
  animation: appCardIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.app .stats-row .stat-card:nth-child(2) {
  animation-delay: 0.07s;
}

body.app .stats-row .stat-card:nth-child(3) {
  animation-delay: 0.14s;
}

body.app .stats-row .stat-card:nth-child(4) {
  animation-delay: 0.21s;
}

body.app .grid-2 > .panel,
body.app .profile-hero,
body.app .pf-stats,
body.app .pf-grid {
  animation: appPanelIn 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}

body.app .sc-ic svg {
  animation: appIconFloat 3.2s ease-in-out infinite;
}

body.app .stat-card:nth-child(2) .sc-ic svg {
  animation-delay: -0.8s;
}

body.app .stat-card:nth-child(3) .sc-ic svg {
  animation-delay: -1.6s;
}

body.app .pf-cover::after {
  background: linear-gradient(
    110deg,
    transparent 15%,
    rgba(167, 139, 250, 0.16) 42%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 72%
  );
  background-size: 220% 100%;
  animation: coverSweep 8s ease-in-out infinite;
}

@keyframes appCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes appPanelIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes appIconFloat {
  50% {
    transform: translateY(-3px);
  }
}

@keyframes coverSweep {
  0%,
  20% {
    background-position: 130% 0;
  }
  75%,
  100% {
    background-position: -80% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.app .stat-card,
  body.app .grid-2 > .panel,
  body.app .profile-hero,
  body.app .pf-stats,
  body.app .pf-grid,
  body.app .sc-ic svg,
  body.app .pf-cover::after {
    animation: none !important;
  }
}

/* dashboard views */
.app-view[hidden] {
  display: none !important;
}

.app-view.active {
  animation: viewIn 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.side-nav a:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.side-workspace-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 3px 18px;
  padding: 9px;
  border: 1px solid #272d36;
  border-radius: 11px;
  color: #d8dbe2;
  background: #101318;
  text-decoration: none;
}

.side-workspace-switch > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #100b1d;
  background: #a78bfa;
  font-weight: 800;
}

.side-workspace-switch div {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.side-workspace-switch b {
  font-size: 0.68rem;
}

.side-workspace-switch small {
  color: #6f7581;
  font-size: 0.625rem;
}

.side-workspace-switch i {
  color: #777e8a;
  font-size: 0.72rem;
  font-style: normal;
}

.side-workspace-switch:hover {
  border-color: #514171;
}

.view-intro {
  max-width: 760px;
  padding: 8px 0 14px;
}

.view-kicker {
  display: block;
  margin-bottom: 8px;
  color: #a78bfa;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.view-intro h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: -0.045em;
}

.view-intro p {
  margin-top: 9px;
  color: var(--faint);
  font-size: 0.88rem;
}

.opportunity-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.workspace-card {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  transition: 0.22s ease;
}

.workspace-card:hover {
  transform: translateY(-4px);
  border-color: #5d488d;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.workspace-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #a78bfa;
  background: #211936;
  font-size: 1.1rem;
  font-weight: 800;
}

.workspace-card small {
  color: #a78bfa;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.workspace-card h3 {
  margin: 5px 0 8px;
  font-size: 1rem;
}

.workspace-card p {
  color: var(--faint);
  font-size: 0.75rem;
}

.soon-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 9px;
  border: 1px solid #3b3156;
  border-radius: 99px;
  color: #a78bfa;
  background: #171222;
  font-size: 0.625rem;
  font-weight: 750;
}

.workspace-card > .soon-pill {
  position: absolute;
  left: 92px;
  bottom: 22px;
}

.compact-stats .stat-card {
  min-height: 118px;
}

.workspace-split {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
}

.metric-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px;
}

.metric-stack span {
  display: flex;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.metric-stack small {
  color: var(--faint);
  font-size: 0.66rem;
}

.metric-stack b {
  margin-top: 5px;
  font-size: 1.25rem;
}

.payout-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px;
  border: 1px solid #3b3156;
  border-radius: 18px;
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(167, 139, 250, 0.16),
      transparent 34%
    ),
    linear-gradient(135deg, #171222, #0e1115);
}

.payout-hero small {
  color: #a99ec4;
  font-size: 0.7rem;
}

.payout-hero strong {
  display: block;
  margin: 4px 0;
  font-size: 2.5rem;
}

.payout-hero p {
  color: var(--faint);
  font-size: 0.75rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.settings-list {
  display: grid;
  padding: 8px 20px 20px;
}

.settings-list span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.settings-list span:last-child {
  border: 0;
}

.settings-list i {
  color: var(--faint);
  font-size: 0.72rem;
  font-style: normal;
}

.settings-list b {
  font-size: 0.76rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.settings-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.settings-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.settings-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background: var(--panel-2);
}

.settings-form input:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.settings-form .btn {
  justify-self: start;
}

.toggle-list {
  display: grid;
  padding: 8px 20px 20px;
}

.toggle-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.toggle-list label:last-child {
  border: 0;
}

.toggle-list span {
  display: flex;
  flex-direction: column;
}

.toggle-list b {
  font-size: 0.78rem;
}

.toggle-list small {
  color: var(--faint);
  font-size: 0.66rem;
}

.toggle-list input {
  width: 34px;
  height: 18px;
  accent-color: #a78bfa;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .opportunity-types,
  .workspace-split,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .workspace-card > .soon-pill {
    position: static;
    grid-column: 2;
  }
  .payout-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .payout-hero .btn {
    width: 100%;
  }
}

/* functional UI */
.alert-toggle {
  cursor: pointer;
}

.alert-toggle.active {
  color: #100b1d;
  border-color: #a78bfa;
  background: #a78bfa;
}

.workspace-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.wm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(7px);
}

.wm-panel {
  position: relative;
  width: min(500px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid #343044;
  border-radius: 18px;
  background: #101318;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.wm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 21px;
  border-bottom: 1px solid var(--line);
}

.wm-head h3 {
  font-size: 1rem;
}

.wm-head button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--muted);
  background: #181c22;
  font-size: 1.3rem;
}

.wm-form {
  display: grid;
  gap: 16px;
  padding: 21px;
}

.wm-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.wm-form input,
.wm-form select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background: #171b21;
}

.wm-form input:focus,
.wm-form select:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.wm-form .check-line {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
}

.wm-form .check-line input {
  width: 17px;
  height: 17px;
  accent-color: #a78bfa;
}

.wm-form .btn {
  margin-top: 4px;
}

.app-toast {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  padding: 12px 16px;
  border: 1px solid #403657;
  border-radius: 11px;
  color: #f4f1ff;
  background: #191421;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
  font-size: 0.78rem;
  font-weight: 650;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.22s ease;
}

.app-toast.show {
  opacity: 1;
  transform: none;
}

.app-toast.error {
  border-color: #6e343d;
  color: #ffb4bd;
  background: #251217;
}

.content-list,
.affiliate-list,
.transaction-list {
  display: grid;
  padding: 8px 20px 20px;
}

.content-list article {
  display: grid;
  grid-template-columns: 42px 1fr auto auto 30px;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.content-list article:last-child,
.affiliate-list article:last-child {
  border: 0;
}

.content-play {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #100b1d;
  background: #a78bfa;
  font-size: 0.7rem;
}

.content-list article > div {
  display: flex;
  flex-direction: column;
}

.content-list small,
.affiliate-list small {
  color: var(--faint);
  font-size: 0.67rem;
}

.content-list a {
  color: #a78bfa;
  font-size: 0.7rem;
  font-weight: 700;
}

.content-list article > button,
.affiliate-list article > button:last-child {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--faint);
  background: #171b20;
}

.affiliate-list article {
  display: grid;
  grid-template-columns: 1fr auto 30px;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.affiliate-list article > div {
  display: flex;
  flex-direction: column;
}

.affiliate-list [data-copy] {
  padding: 8px 11px;
  border: 1px solid #3a3151;
  border-radius: 8px;
  color: #a78bfa;
  font-size: 0.67rem;
}

.transaction-list span {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.transaction-list small {
  color: var(--faint);
}

@media (max-width: 640px) {
  .content-list article {
    grid-template-columns: 40px 1fr 28px;
  }
  .content-list .badge-st,
  .content-list a {
    display: none;
  }
  .app-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .wm-panel {
    border-radius: 15px;
  }
  .affiliate-list article {
    grid-template-columns: 1fr auto;
  }
  .affiliate-list article > button:last-child {
    display: none;
  }
}

/* Dashboard appearance switch. Dark remains the default; light is opt-in. */
.theme-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 3px 12px;
  padding: 4px;
  border: 1px solid #272d36;
  border-radius: 12px;
  background: #0b0e12;
}

.theme-switch button {
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #69717c;
  background: transparent;
  transition: 0.2s ease;
}

.theme-switch button:hover {
  color: #c4b5fd;
  background: #15121d;
}

.theme-switch button.active {
  color: #100b1d;
  background: #a78bfa;
  box-shadow: 0 6px 16px rgba(167, 139, 250, 0.18);
}

.theme-switch svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="light"] body.app {
  --bg: #fff;
  --panel: #fff;
  --panel-2: #f4f3ff;
  --text: #16151d;
  --ink: #16151d;
  --muted: #6b6877;
  --faint: #8a8695;
  --line: #e5e3ec;
  --line-2: #cbc7d6;
  --green: #5b4ff5;
  --green-dim: #7b70f7;
  --green-dark: #f4f3ff;
  --accent: #5b4ff5;
  --accent-bright: #5b4ff5;
  --accent-soft: #f4f3ff;
  color-scheme: light;
  color: #16151d;
  background: #fff;
}

html[data-theme="light"] body.app .app-shell {
  background:
    radial-gradient(circle at 76% 0, rgba(91, 79, 245, 0.065), transparent 30%),
    #fff;
}

html[data-theme="light"] body.app .side {
  border-color: #e5e3ec;
  background: linear-gradient(180deg, #fbfaff, #f4f3ff);
}

html[data-theme="light"] body.app .side-logo {
  color: #16151d;
}

html[data-theme="light"] body.app .side-nav a {
  color: #6b6877;
}

html[data-theme="light"] body.app .side-nav a:hover {
  color: #4938e8;
  background: #efedff;
}

html[data-theme="light"] body.app .side-nav a.active {
  color: #4938e8;
  background: linear-gradient(
    90deg,
    rgba(91, 79, 245, 0.13),
    rgba(91, 79, 245, 0.045)
  );
  box-shadow: inset 0 0 0 1px rgba(91, 79, 245, 0.13);
}

html[data-theme="light"] body.app .side-nav a.active::before {
  background: #5b4ff5;
  box-shadow: 0 0 16px rgba(91, 79, 245, 0.42);
}

html[data-theme="light"] body.app .side-nav a.active .si {
  color: #5b4ff5;
}

html[data-theme="light"] body.app .side-label {
  color: #9691a0;
}

html[data-theme="light"] body.app .side-sep {
  background: #e5e3ec;
}

html[data-theme="light"] body.app .side-workspace-switch {
  color: #34313c;
  border-color: #dfdce8;
  background: #fff;
}

html[data-theme="light"] body.app .side-workspace-switch > span {
  color: #fff;
  background: #5b4ff5;
}

html[data-theme="light"] body.app .side-workspace-switch small,
html[data-theme="light"] body.app .side-workspace-switch i {
  color: #8a8695;
}

html[data-theme="light"] body.app .side-workspace-switch:hover {
  border-color: #aaa4f7;
  background: #f8f7ff;
}

html[data-theme="light"] body.app .side-user {
  border-color: #dfdce8;
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] body.app .su-name {
  color: #16151d;
}

html[data-theme="light"] body.app .su-role {
  color: #8a8695;
}

html[data-theme="light"] body.app .ava {
  color: #fff;
  background: linear-gradient(135deg, #7b70f7, #4938e8);
}

html[data-theme="light"] body.app .theme-switch {
  border-color: #dfdce8;
  background: #fff;
}

html[data-theme="light"] body.app .theme-switch button {
  color: #8a8695;
}

html[data-theme="light"] body.app .theme-switch button:hover {
  color: #4938e8;
  background: #f4f3ff;
}

html[data-theme="light"] body.app .theme-switch button.active {
  color: #fff;
  background: #5b4ff5;
  box-shadow: 0 6px 16px rgba(91, 79, 245, 0.2);
}

html[data-theme="light"] body.app .topbar {
  border-color: #e5e3ec;
  background: rgba(255, 255, 255, 0.86);
}

html[data-theme="light"] body.app .topbar .sub {
  color: #8a8695;
}

html[data-theme="light"] body.app .balance-pill,
html[data-theme="light"] body.app .icon-btn {
  color: #6b6877;
  border-color: #dfdce8;
  background: #fff;
}

html[data-theme="light"] body.app .btn-primary {
  color: #fff;
  background: #5b4ff5;
  box-shadow: 0 12px 27px -12px rgba(91, 79, 245, 0.5);
}

html[data-theme="light"] body.app .btn-primary:hover {
  color: #fff;
  background: #4938e8;
}

html[data-theme="light"] body.app .btn-outline {
  color: #34313c;
  border-color: #d8d5e0;
  background: #fff;
}

html[data-theme="light"] body.app .btn-outline:hover {
  color: #4938e8;
  border-color: #aaa4f7;
  background: #f8f7ff;
}

html[data-theme="light"] body.app .stat-card,
html[data-theme="light"] body.app .panel,
html[data-theme="light"] body.app .pf-stat,
html[data-theme="light"] body.app .profile-hero {
  border-color: #e5e3ec;
  background: #fff;
  box-shadow: 0 12px 32px rgba(44, 39, 82, 0.06);
}

html[data-theme="light"] body.app .stat-card::after {
  background: #f4f3ff;
}

html[data-theme="light"] body.app .stat-card:hover,
html[data-theme="light"] body.app .pf-stat:hover {
  border-color: #aaa4f7;
  box-shadow: 0 18px 38px rgba(44, 39, 82, 0.1);
}

html[data-theme="light"] body.app .sc-ic,
html[data-theme="light"] body.app .app-empty-icon,
html[data-theme="light"] body.app .workspace-icon {
  color: #5b4ff5;
  background: #f4f3ff;
}

html[data-theme="light"] body.app .sc-delta.up,
html[data-theme="light"] body.app .money,
html[data-theme="light"] body.app .panel-head a,
html[data-theme="light"] body.app .cm-rate,
html[data-theme="light"] body.app .view-kicker {
  color: #5b4ff5;
}

html[data-theme="light"] body.app .panel-head,
html[data-theme="light"] body.app .tbl th,
html[data-theme="light"] body.app .tbl td {
  border-color: #e5e3ec;
}

html[data-theme="light"] body.app .tbl tbody tr:hover {
  background: #faf9ff;
}

html[data-theme="light"] body.app .tbl-thumb {
  color: #fff;
  background: linear-gradient(145deg, #7b70f7, #5b4ff5);
}

html[data-theme="light"] body.app .st-live {
  color: #5b4ff5;
  background: #f4f3ff;
}

html[data-theme="light"] body.app .mini-chart span {
  background: linear-gradient(180deg, #9d96ff, #5b4ff5);
}

html[data-theme="light"] body.app .app-empty-icon {
  box-shadow: 0 0 0 9px rgba(244, 243, 255, 0.8);
}

html[data-theme="light"] body.app .app-empty-models span,
html[data-theme="light"] body.app .metric-stack span {
  border-color: #e5e3ec;
  background: #faf9ff;
}

html[data-theme="light"] body.app .app-empty-models i {
  color: #5b4ff5;
}

html[data-theme="light"] body.app .workspace-card {
  border-color: #e5e3ec;
  background: #fff;
}

html[data-theme="light"] body.app .workspace-card:hover {
  border-color: #aaa4f7;
  box-shadow: 0 16px 34px rgba(44, 39, 82, 0.1);
}

html[data-theme="light"] body.app .workspace-card small {
  color: #5b4ff5;
}

html[data-theme="light"] body.app .soon-pill {
  color: #5b4ff5;
  border-color: #d4d0fc;
  background: #f4f3ff;
}

html[data-theme="light"] body.app .payout-hero {
  color: #16151d;
  border-color: #d4d0fc;
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(91, 79, 245, 0.12),
      transparent 34%
    ),
    linear-gradient(135deg, #f4f3ff, #fff);
}

html[data-theme="light"] body.app .payout-hero small,
html[data-theme="light"] body.app .payout-hero p {
  color: #6b6877;
}

html[data-theme="light"] body.app .settings-form input {
  color: #16151d;
  border-color: #dfdce8;
  background: #faf9ff;
}

html[data-theme="light"] body.app .settings-form input:focus {
  border-color: #5b4ff5;
  box-shadow: 0 0 0 3px rgba(91, 79, 245, 0.1);
}

html[data-theme="light"] body.app .toggle-list input {
  accent-color: #5b4ff5;
}

html[data-theme="light"] body.app .wm-backdrop {
  background: rgba(22, 21, 29, 0.42);
}

html[data-theme="light"] body.app .wm-panel {
  border-color: #dedbe7;
  background: #fff;
  box-shadow: 0 28px 80px rgba(44, 39, 82, 0.18);
}

html[data-theme="light"] body.app .wm-head button {
  color: #6b6877;
  background: #f4f3ff;
}

html[data-theme="light"] body.app .wm-form input,
html[data-theme="light"] body.app .wm-form select {
  color: #16151d;
  border-color: #dfdce8;
  background: #faf9ff;
}

html[data-theme="light"] body.app .wm-form input:focus,
html[data-theme="light"] body.app .wm-form select:focus {
  border-color: #5b4ff5;
  box-shadow: 0 0 0 3px rgba(91, 79, 245, 0.1);
}

html[data-theme="light"] body.app .app-toast {
  color: #4938e8;
  border-color: #d4d0fc;
  background: #f4f3ff;
  box-shadow: 0 16px 38px rgba(44, 39, 82, 0.13);
}

html[data-theme="light"] body.app .content-play {
  color: #fff;
  background: #5b4ff5;
}

html[data-theme="light"] body.app .content-list a {
  color: #5b4ff5;
}

html[data-theme="light"] body.app .content-list article > button,
html[data-theme="light"] body.app .affiliate-list article > button:last-child {
  color: #8a8695;
  background: #f4f3ff;
}

html[data-theme="light"] body.app .affiliate-list [data-copy] {
  color: #5b4ff5;
  border-color: #d4d0fc;
  background: #faf9ff;
}

html[data-theme="light"] body.app .alert-toggle.active {
  color: #fff;
  border-color: #5b4ff5;
  background: #5b4ff5;
}

html[data-theme="light"] body.app .pf-cover {
  background: linear-gradient(120deg, #f4f3ff, #d8d4ff 58%, #7b70f7);
}

html[data-theme="light"] body.app .pf-cover::after {
  background: linear-gradient(
    110deg,
    transparent 15%,
    rgba(91, 79, 245, 0.09) 42%,
    rgba(255, 255, 255, 0.48) 50%,
    transparent 72%
  );
  background-size: 220% 100%;
}

html[data-theme="light"] body.app .verified,
html[data-theme="light"] body.app .accent {
  color: #5b4ff5 !important;
}

html[data-theme="light"] body.app .chip {
  color: #5e5a68;
  background: #f2f0f7;
}

html[data-theme="light"] body.app .chip-demo {
  color: #5b4ff5;
  background: #f4f3ff;
}

html[data-theme="light"] body.app .pf-ava {
  border-color: #fff;
  box-shadow: 0 12px 30px rgba(44, 39, 82, 0.16);
}

html[data-theme="light"] body.app .pf-clip {
  background: linear-gradient(165deg, #8f86ff, #4938e8 78%);
}

html[data-theme="light"] body.app .pf-clip:nth-child(3n + 2) {
  background: linear-gradient(165deg, #7b70f7, #3d30b6 78%);
}

html[data-theme="light"] body.app .pf-clip:nth-child(3n) {
  background: linear-gradient(165deg, #aea8ff, #5b4ff5 78%);
}

html[data-theme="light"] body.app .pf-clip-earn {
  color: #eeecff;
}

html[data-theme="light"] body.app .social-chip {
  color: #34313c;
  border-color: #e5e3ec;
  background: #faf9ff;
}

/* Labeled weekly activity chart */
.weekly-chart {
  height: 178px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  gap: 18px;
  padding-top: 10px;
}

.weekly-chart .week-column {
  min-width: 0;
  display: grid;
  grid-template-rows: 128px auto;
  gap: 9px;
}

.weekly-chart .day-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  border-bottom: 1px solid #252c30;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 31px,
    rgba(255, 255, 255, 0.04) 31px 32px
  );
}

.weekly-chart .day-bars span {
  flex: 1;
  min-width: 5px;
  border-radius: 5px 5px 2px 2px;
  cursor: help;
}

.weekly-chart .day-label {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.weekly-chart .day-label b {
  color: var(--text);
  font-size: 0.7rem;
}

.weekly-chart .day-label small {
  color: var(--faint);
  font-size: 0.625rem;
  letter-spacing: 0.025em;
}

html[data-theme="light"] body.app .weekly-chart .day-bars {
  border-color: #e5e3ec;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 31px,
    rgba(91, 79, 245, 0.06) 31px 32px
  );
}

@media (max-width: 700px) {
  .weekly-chart {
    height: auto;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .weekly-chart .week-column {
    grid-template-columns: 82px 1fr;
    grid-template-rows: 76px;
    gap: 10px;
  }
  .weekly-chart .day-bars {
    grid-column: 2;
    grid-row: 1;
    gap: 5px;
  }
  .weekly-chart .day-label {
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    white-space: normal;
  }
  .weekly-chart .day-label b {
    font-size: 0.76rem;
  }
  .weekly-chart .day-label small {
    font-size: 0.625rem;
    line-height: 1.35;
  }
  .chart-legend span:nth-child(2) {
    display: none;
  }
}
