:root {
  --bg: #0a0d12;
  --surface: #181c24;
  --surface-2: #1e232d;
  --surface-3: #242a35;
  --border: rgba(255, 255, 255, 0.06);
  --text: #f4f6f8;
  --muted: #9aa4b2;
  --teal: #19cfd0;
  --blue: #3d74ff;
  --violet: #8f6dff;
  --green: #5b9100;
  --amber: #ffcb49;
  --red: #ff4466;
  --radius: 10px;
  --shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 420px at 12% 2%, rgba(255, 35, 82, 0.26), transparent 42%),
    radial-gradient(960px 380px at 50% 20%, rgba(22, 191, 187, 0.24), transparent 46%),
    radial-gradient(980px 500px at 90% 30%, rgba(67, 100, 255, 0.2), transparent 47%),
    var(--bg);
}

.app-shell {
  min-height: 100vh;
}

.top-bar {
  height: 62px;
  background: linear-gradient(90deg, #191d27, #1b202a 45%, #1a1f29);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.top-left,
.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-left h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 600;
  transform: scale(0.28);
  transform-origin: left center;
  width: 118px;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.avatar {
  width: 114px;
  height: 30px;
  border-radius: 3px;
  background: linear-gradient(90deg, #5f646e, #4f545f 55%, #3b414c);
  opacity: 0.75;
}

.avatar-b {
  width: 132px;
  background: linear-gradient(90deg, #673944, #7a4a59 50%, #514355);
}

.divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #bcc4cf;
}

.status-pill .dot {
  width: 18px;
  height: 16px;
  border-radius: 4px;
  background: #ff4f64;
  position: relative;
}

.status-pill .dot::before,
.status-pill .dot::after {
  content: "";
  position: absolute;
  background: white;
}

.status-pill .dot::before {
  width: 2px;
  height: 5px;
  left: 5px;
  bottom: 4px;
}

.status-pill .dot::after {
  width: 2px;
  height: 8px;
  left: 9px;
  bottom: 4px;
}

.timeline {
  font-size: 13px;
  color: #d3d8de;
  font-weight: 600;
}

.icon-btn,
.lang-btn,
.card-icon,
.select-pill,
.nav-dot-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: #d9e0e8;
  border-radius: 7px;
  cursor: pointer;
  transition: 0.2s ease;
}

.icon-btn {
  width: 38px;
  height: 36px;
  font-size: 16px;
}

.icon-btn:hover,
.lang-btn:hover,
.card-icon:hover,
.select-pill:hover,
.nav-dot-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.dropdown {
  position: relative;
}

.lang-btn {
  height: 36px;
  padding: 0 12px;
  font-size: 21px;
  font-weight: 500;
  transform: scale(0.52);
  transform-origin: right center;
  width: 160px;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
}

.menu {
  position: absolute;
  right: 0;
  top: 44px;
  min-width: 150px;
  background: #1a1f29;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0;
  padding: 4px;
  list-style: none;
  display: none;
  box-shadow: var(--shadow);
}

.menu.open {
  display: block;
}

.menu li {
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  color: #ccd4dd;
}

.menu li.active,
.menu li:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.workspace {
  display: flex;
  gap: 14px;
  padding: 12px;
}

.side-rail {
  width: 58px;
  background: #1a1f28;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  height: calc(100vh - 86px);
  position: sticky;
  top: 74px;
}

.rail-item {
  width: 100%;
  min-height: 62px;
  border: none;
  background: transparent;
  color: #9da5af;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  gap: 4px;
  cursor: pointer;
  transition: 0.2s ease;
}

.rail-icon {
  font-size: 13px;
}

.rail-item.active {
  background: rgba(25, 207, 208, 0.16);
  color: #38d6d6;
}

.dashboard-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 356px minmax(700px, 1fr) 356px;
  gap: 14px;
}

.col-left,
.col-center,
.col-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: linear-gradient(180deg, rgba(27, 31, 40, 0.96), rgba(25, 30, 39, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
  position: relative;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 20px 0;
}

.card h2 {
  margin: 0;
  font-weight: 600;
  font-size: 36px;
  transform: scale(0.42);
  transform-origin: left top;
  width: 160px;
  color: #f2f5f8;
  letter-spacing: 0.2px;
}

.card-icon {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.card-icon.tiny {
  width: 30px;
  height: 30px;
}

.viewer-source {
  min-height: 236px;
}

.viewer-layout {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 20px;
  padding: 8px 20px 0;
}

.ring-wrap {
  display: grid;
  place-items: center;
}

.multi-ring {
  width: 108px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    var(--teal) 0deg 136deg,
    var(--blue) 136deg 210deg,
    var(--violet) 210deg 273deg,
    var(--green) 273deg 305deg,
    #c95dcb 305deg 322deg,
    #f2a13e 322deg 338deg,
    #7bb0de 338deg 360deg
  );
  position: relative;
}

.multi-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: #1b2029;
  border-radius: 50%;
}

.source-list {
  list-style: none;
  padding: 4px 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 30px;
  transform: scale(0.42);
  transform-origin: left center;
  color: #d3dbe5;
  width: 460px;
}

.source-list strong {
  margin-left: auto;
  font-weight: 600;
  color: #ecf0f4;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid currentColor;
}

.swatch.c1 {
  color: var(--teal);
}

.swatch.c2 {
  color: var(--blue);
}

.swatch.c3 {
  color: var(--violet);
}

.swatch.c4 {
  color: var(--green);
}

.more-btn {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 20px;
  border: none;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: #c0c6ce;
  cursor: pointer;
}

.performance-card {
  min-height: 242px;
}

.inline-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.select-pill {
  height: 30px;
  padding: 0 12px;
  color: #cdd5df;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.select-pill.active {
  background: rgba(255, 255, 255, 0.14);
}

.legend-row {
  display: flex;
  gap: 14px;
  padding: 8px 20px 4px;
  font-size: 11px;
  color: #a7b0bb;
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.line-swatch {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
}

.line-swatch.current {
  background: var(--teal);
}

.line-swatch.clicks {
  background: var(--blue);
}

#trendCanvas {
  width: calc(100% - 24px);
  margin: 0 12px;
  border-radius: 6px;
}

.axis-labels {
  padding: 0 20px 16px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #818b98;
}

.conversion-card {
  min-height: 284px;
  padding-bottom: 12px;
}

.conversion-card h2 {
  padding: 20px 20px 0;
}

.conversion-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 16px;
  column-gap: 12px;
  padding: 4px 20px 0;
  max-width: 170px;
}

.conversion-grid span {
  font-size: 12px;
  color: #9fa8b3;
}

.conversion-grid strong {
  font-size: 13px;
  font-weight: 600;
}

.funnel-wrap {
  position: absolute;
  right: 18px;
  top: 62px;
  width: 190px;
  height: 200px;
}

.funnel-top {
  height: 8px;
  width: 100%;
  background: var(--teal);
  border-radius: 2px;
}

.funnel-core {
  width: 100%;
  height: 96px;
  background: linear-gradient(to bottom, rgba(26, 211, 212, 0.2), rgba(26, 211, 212, 0.04));
  clip-path: polygon(0 0, 100% 0, 56% 100%, 44% 100%);
}

.funnel-tail {
  margin: 0 auto;
  width: 3px;
  height: 74px;
  background: linear-gradient(to bottom, rgba(26, 211, 212, 0.7), rgba(26, 211, 212, 0.15));
}

.funnel-numbers span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #78828f;
  font-size: 11px;
}

.hero-card {
  min-height: 336px;
  padding: 18px 28px 24px;
  overflow: hidden;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-card::before {
  background:
    radial-gradient(500px 230px at 12% 8%, rgba(255, 56, 98, 0.65), transparent 60%),
    radial-gradient(450px 260px at 74% 30%, rgba(36, 194, 182, 0.52), transparent 68%),
    radial-gradient(540px 260px at 35% 92%, rgba(14, 17, 25, 0.85), transparent 64%);
}

.hero-card::after {
  background: linear-gradient(180deg, rgba(4, 6, 11, 0.4), rgba(4, 6, 11, 0.2));
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.card-icon.float {
  position: absolute;
  top: 14px;
  right: 18px;
}

.hero-title {
  margin: 2px 0 0;
  text-align: center;
  font-size: 34px;
  transform: scale(0.46);
  color: #d6dce3;
}

.hero-value {
  margin: 4px auto 8px;
  width: fit-content;
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: #f4f7fa;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #d9e3ec;
  font-size: 34px;
  transform: scale(0.43);
  transform-origin: center;
}

.badge strong {
  color: #ffffff;
}

.badge em {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  font-style: normal;
  font-size: 11px;
}

.badge.sold em {
  background: #ffcb49;
  color: #1f232c;
}

.badge.viewers em {
  background: rgba(25, 207, 208, 0.18);
  color: #27d5d5;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 20px 24px;
}

.hero-metrics small {
  display: block;
  color: #c2c9d2;
  font-size: 13px;
  margin-bottom: 3px;
}

.hero-metrics strong {
  font-size: 42px;
  transform: scale(0.48);
  transform-origin: left center;
  display: inline-block;
  width: 112px;
  letter-spacing: 0.1px;
}

.hero-metrics b {
  font-size: 13px;
  color: #bac4cf;
  margin-left: 2px;
}

.product-card {
  min-height: 432px;
}

.product-head {
  align-items: center;
  padding-top: 14px;
}

.product-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-wrap {
  width: 266px;
  position: relative;
}

.search-wrap input,
.select-wrap select {
  width: 100%;
  height: 34px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: #d8e0e9;
  padding: 0 30px 0 12px;
  font-family: inherit;
  outline: none;
}

.search-wrap span {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca7b4;
}

.select-wrap {
  width: 85px;
}

.select-wrap.slim {
  width: 132px;
}

.select-wrap select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #c7ced8 50%), linear-gradient(135deg, #c7ced8 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 14px,
    calc(100% - 10px) 14px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.table-wrap {
  max-height: 356px;
  overflow: auto;
  margin: 6px 8px 8px;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

th {
  color: #a8b2be;
  font-weight: 600;
  position: sticky;
  top: 0;
  background: #1a1f29;
  z-index: 1;
  cursor: default;
}

th[data-sort] {
  cursor: pointer;
}

th[data-sort]::after {
  content: " \2195";
  color: #6f7a87;
  font-size: 11px;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 2px;
  background: linear-gradient(135deg, #d5c0c8, #748591 55%, #8d727f);
  position: relative;
}

.product-thumb::after {
  content: "\2197";
  position: absolute;
  right: -8px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #151a21;
  color: #d8dee7;
  font-size: 8px;
  display: grid;
  place-items: center;
}

.product-name {
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-wrap button {
  height: 22px;
  border: none;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  cursor: pointer;
  color: #dce4ec;
}

.pin-btn {
  background: #16999d;
}

.pin-btn.pinned {
  background: #444a53;
}

.script-btn {
  background: #3a3f47;
}

.live-card {
  min-height: 522px;
  padding: 10px;
}

.live-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.live-label {
  font-size: 32px;
  transform: scale(0.44);
  transform-origin: left center;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.comment-tag {
  font-size: 26px;
  transform: scale(0.44);
  transform-origin: right center;
  color: #d9dee6;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 5px 9px;
}

.live-video {
  height: 500px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(50, 21, 42, 0.45), rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, #c36a8a, #d58095 25%, #c0938f 50%, #da9aa8 72%, #f2d5de),
    repeating-linear-gradient(0deg, rgba(17, 10, 17, 0.24) 0 28px, rgba(255, 255, 255, 0.12) 28px 56px),
    repeating-linear-gradient(90deg, rgba(10, 10, 20, 0.24) 0 34px, rgba(255, 255, 255, 0.16) 34px 68px);
  background-blend-mode: overlay, normal, multiply, multiply;
  position: relative;
  overflow: hidden;
}

.live-video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.08) 40%, rgba(0, 0, 0, 0.26));
}

.live-video.has-source {
  background: #0f131a;
}

.live-video.has-source::before {
  display: none;
}

.live-video-media {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0f131a;
  object-fit: cover;
}

.live-video-footer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: flex-end;
  z-index: 2;
}

.live-video-message {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 11px;
  color: #c4ccd6;
  background: rgba(15, 19, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  padding: 6px 10px;
  z-index: 2;
}

.live-video-footer-center {
  justify-content: center;
  bottom: 56px;
}

.live-video-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(18, 23, 31, 0.82);
  color: #dce5ee;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.live-video-btn:hover {
  background: rgba(28, 36, 48, 0.92);
}

.live-video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 69, 103, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1px;
  padding: 4px 8px;
  z-index: 2;
}

.profile-card {
  min-height: 250px;
}

.followers-label {
  margin: 6px 20px 4px;
  color: #c4ccd6;
  font-size: 14px;
}

.profile-rings {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 20px 4px;
}

.ring-stat {
  text-align: center;
}

.single-ring {
  width: 100px;
  aspect-ratio: 1;
  border-radius: 50%;
  --percent: 70;
  --color: var(--teal);
  background: conic-gradient(var(--color) calc(var(--percent) * 1%), rgba(255, 255, 255, 0.08) 0);
  display: grid;
  place-items: center;
  position: relative;
}

.single-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #1a1f28;
}

.single-ring span {
  position: relative;
  z-index: 1;
  font-size: 34px;
  transform: scale(0.43);
  transform-origin: center;
  width: 98px;
}

.single-ring.teal {
  --color: var(--teal);
}

.single-ring.blue {
  --color: var(--blue);
}

.ring-stat p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #c0c9d3;
}

.carousel-nav {
  margin: 12px 20px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-dot-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.dot-row {
  display: flex;
  gap: 10px;
}

.dot-row button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.dot-row button.active {
  background: #d9dee7;
}

@media (max-width: 1700px) {
  .dashboard-grid {
    grid-template-columns: 310px minmax(620px, 1fr) 320px;
  }

  .hero-metrics {
    gap: 16px;
  }
}

@media (max-width: 1380px) {
  .workspace {
    flex-direction: column;
  }

  .side-rail {
    width: 100%;
    height: auto;
    flex-direction: row;
    position: static;
    justify-content: flex-start;
    padding: 6px;
  }

  .rail-item {
    width: 120px;
    min-height: 52px;
    flex-direction: row;
    gap: 6px;
    font-size: 11px;
  }

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

  .col-left,
  .col-center,
  .col-right {
    min-width: 0;
  }

  .live-card .live-video {
    height: 340px;
  }
}

@media (max-width: 900px) {
  .top-bar {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    gap: 10px;
  }

  .top-left {
    flex-wrap: wrap;
  }

  .top-right {
    width: 100%;
    justify-content: flex-end;
  }

  .timeline {
    font-size: 11px;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-wrap {
    width: 100%;
  }

  .select-wrap {
    width: 120px;
  }

  table {
    min-width: 620px;
  }
}
