:root {
  color-scheme: dark;
  --bg: #06101e;
  --bg-soft: #0a1728;
  --surface: rgba(13, 29, 49, 0.78);
  --surface-strong: rgba(14, 33, 57, 0.96);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(185, 218, 255, 0.13);
  --line-strong: rgba(185, 218, 255, 0.22);
  --text: #f5f9ff;
  --muted: #93a6bd;
  --cyan: #54e4d4;
  --cyan-soft: rgba(84, 228, 212, 0.16);
  --blue: #5a8cff;
  --violet: #8a74ff;
  --green: #5de69b;
  --red: #ff7d8f;
  --amber: #ffc66d;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  position: relative;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(64, 110, 191, 0.26), transparent 34%),
    linear-gradient(180deg, #07111f 0%, #071421 48%, #06101e 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body.sheet-open {
  overflow: hidden;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(84, 228, 212, 0.34);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.18;
  pointer-events: none;
}

.ambient-one {
  top: 8%;
  left: -120px;
  background: var(--cyan);
}

.ambient-two {
  right: -135px;
  bottom: 12%;
  background: var(--violet);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(16px, env(safe-area-inset-top))
    14px
    max(28px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.logo {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  background: linear-gradient(135deg, var(--cyan), var(--blue) 58%, var(--violet));
  box-shadow: 0 10px 28px rgba(54, 137, 214, 0.3);
  color: #06121d;
  font-size: 20px;
  font-weight: 950;
}

.logo::after {
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  content: "";
}

.logo-large {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 21px;
  font-size: 27px;
}

.brand h1 {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand p {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 198, 109, 0.2);
  border-radius: 999px;
  background: rgba(255, 198, 109, 0.11);
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
}

.status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  content: "";
}

.status.active {
  border-color: rgba(93, 230, 155, 0.22);
  background: rgba(93, 230, 155, 0.11);
  color: var(--green);
}

.status.inactive {
  border-color: rgba(255, 125, 143, 0.22);
  background: rgba(255, 125, 143, 0.11);
  color: var(--red);
}

.status-overview,
.grid,
.traffic,
.tabs,
.panel {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.status-overview {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 168px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 23px 21px;
  border-radius: 26px;
  background:
    linear-gradient(125deg, rgba(37, 76, 109, 0.82), rgba(21, 39, 71, 0.92)),
    var(--surface-strong);
}

.status-overview::before {
  position: absolute;
  z-index: -1;
  top: -75px;
  right: -58px;
  width: 205px;
  height: 205px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 116, 255, 0.42), transparent 68%);
  content: "";
}

.status-overview::after {
  position: absolute;
  z-index: -1;
  bottom: -100px;
  left: -45px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(84, 228, 212, 0.2), transparent 70%);
  content: "";
}

body[data-status="active"] .status-overview {
  background:
    linear-gradient(125deg, rgba(16, 85, 79, 0.84), rgba(19, 45, 70, 0.94)),
    var(--surface-strong);
}

.status-copy {
  min-width: 0;
}

.eyebrow {
  display: block;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.status-copy h2 {
  max-width: 250px;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(21px, 6vw, 27px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.status-copy p {
  max-width: 245px;
  margin-top: 10px;
  color: #b6c5d7;
  font-size: 13px;
  line-height: 1.5;
}

.signal-orb {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(84, 228, 212, 0.88), rgba(90, 140, 255, 0.8));
  box-shadow:
    0 16px 40px rgba(53, 148, 191, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
  color: #06121d;
  font-size: 31px;
}

.signal-orb::before,
.signal-orb::after {
  position: absolute;
  border: 1px solid rgba(84, 228, 212, 0.17);
  border-radius: 31px;
  content: "";
}

.signal-orb::before {
  inset: -9px;
}

.signal-orb::after {
  inset: -17px;
  opacity: 0.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.metric {
  position: relative;
  min-width: 0;
  min-height: 92px;
  overflow: hidden;
  padding: 15px 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
}

.metric::after {
  position: absolute;
  right: -18px;
  bottom: -26px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--cyan-soft);
  filter: blur(7px);
  content: "";
}

.metric:nth-child(2)::after,
.metric:nth-child(4)::after {
  background: rgba(138, 116, 255, 0.18);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 15px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.metric-action {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.metric-action:active {
  transform: scale(0.98);
}

.metric-action:focus-visible {
  border-color: rgba(84, 228, 212, 0.58);
  outline: 2px solid rgba(84, 228, 212, 0.18);
  outline-offset: 2px;
}

.metric-arrow {
  position: absolute;
  z-index: 2;
  right: 13px;
  bottom: 13px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(84, 228, 212, 0.1);
  color: var(--cyan);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.traffic {
  margin-top: 12px;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.traffic-head,
.traffic-values {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.traffic-head strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-weight: 850;
}

.traffic-head > b {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.bar {
  height: 10px;
  margin: 17px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(177, 211, 242, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
  box-shadow: 0 0 18px rgba(84, 228, 212, 0.42);
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.traffic-values {
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.traffic-values b {
  margin-left: 3px;
  color: #d9e5f2;
  font-weight: 850;
}

.primary {
  position: relative;
  width: 100%;
  min-height: 54px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 17px;
  background: linear-gradient(115deg, #3bcfbe, #4885f5 58%, #7c67ed);
  box-shadow:
    0 15px 34px rgba(58, 119, 220, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: #f9fcff;
  font-size: 16px;
  font-weight: 900;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.primary::after {
  position: absolute;
  top: -45px;
  left: -65px;
  width: 48px;
  height: 140px;
  transform: rotate(22deg);
  background: rgba(255, 255, 255, 0.2);
  content: "";
  transition: left 450ms ease;
}

.primary:active {
  transform: scale(0.985);
}

.primary:active::after {
  left: 110%;
}

.connect-main {
  min-height: 59px;
  margin-top: 14px;
  border-radius: 19px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 25px;
  padding: 6px;
  border-radius: 17px;
  background: rgba(13, 29, 49, 0.72);
  backdrop-filter: blur(18px);
}

.tab {
  min-height: 43px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.tab.active {
  background: linear-gradient(135deg, rgba(84, 228, 212, 0.17), rgba(90, 140, 255, 0.2));
  box-shadow: inset 0 0 0 1px rgba(117, 198, 241, 0.13);
  color: var(--text);
}

.tab:active {
  transform: scale(0.98);
}

.panel {
  margin-top: 11px;
  padding: 15px;
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.panel-heading {
  padding: 4px 3px 9px;
}

.panel-heading h2 {
  margin-top: 5px;
  color: var(--text);
  font-size: 18px;
  font-weight: 880;
  letter-spacing: -0.025em;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  color: #dfe9f6;
  text-align: left;
  font-size: 14px;
  font-weight: 780;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.row:not(:disabled):active {
  transform: scale(0.985);
  border-color: rgba(84, 228, 212, 0.28);
  background: rgba(84, 228, 212, 0.08);
}

.row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row b {
  flex: 0 0 auto;
  margin-left: 12px;
  color: var(--cyan);
  font-size: 21px;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

.auth-screen {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 20%, rgba(72, 133, 245, 0.22), transparent 35%),
    rgba(6, 16, 30, 0.96);
  backdrop-filter: blur(24px);
}

.auth-box {
  width: min(100%, 370px);
  padding: 30px 24px 25px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-box h1 {
  margin-top: 7px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.auth-box p {
  margin: 11px auto 20px;
  color: var(--muted);
  line-height: 1.55;
}

.connect-sheet,
.subscriptions-sheet,
.plans-sheet,
.referral-sheet,
.payment-sheet,
.invoices-sheet,
.info-sheet {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: end center;
  padding-top: max(18px, env(safe-area-inset-top));
  background: rgba(2, 8, 16, 0.76);
  backdrop-filter: blur(12px);
  animation: fade-in 180ms ease both;
}

.connect-card,
.subscriptions-card,
.plans-card,
.referral-card,
.payment-card,
.invoices-card,
.info-card {
  position: relative;
  display: flex;
  width: min(100%, 440px);
  max-height: min(90vh, 780px);
  max-height: min(90dvh, 780px);
  flex-direction: column;
  overflow: hidden;
  padding: 10px 14px max(12px, env(safe-area-inset-bottom));
  border: 1px solid rgba(185, 218, 255, 0.18);
  border-bottom: 0;
  border-radius: 29px 29px 0 0;
  background:
    radial-gradient(circle at 90% -10%, rgba(138, 116, 255, 0.22), transparent 30%),
    #0b1a2c;
  box-shadow: 0 -25px 70px rgba(0, 0, 0, 0.42);
  animation: sheet-up 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.subscriptions-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 1px 8px;
  scrollbar-color: rgba(84, 228, 212, 0.42) transparent;
  scrollbar-width: thin;
}

.subscriptions-lead {
  margin: 2px 3px 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.subscriptions-list {
  display: grid;
  gap: 10px;
}

.subscription-choice {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(90, 140, 255, 0.15), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  color: var(--text);
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.subscription-choice:active {
  transform: scale(0.985);
}

.subscription-choice.active {
  border-color: rgba(84, 228, 212, 0.48);
  background:
    radial-gradient(circle at 100% 0%, rgba(90, 140, 255, 0.2), transparent 44%),
    linear-gradient(145deg, rgba(84, 228, 212, 0.15), rgba(90, 140, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(17, 111, 146, 0.12);
}

.subscription-choice-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(84, 228, 212, 0.2);
  border-radius: 14px;
  background: rgba(84, 228, 212, 0.1);
  color: var(--cyan);
  font-size: 19px;
}

.subscription-choice-copy {
  min-width: 0;
}

.subscription-choice-copy strong,
.subscription-choice-copy small {
  display: block;
}

.subscription-choice-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-choice-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.subscription-choice-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
}

.subscription-choice.active .subscription-choice-mark {
  border-color: rgba(84, 228, 212, 0.4);
  background: var(--cyan);
  color: #07111f;
}

.subscriptions-empty {
  padding: 24px 16px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.plans-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 1px 8px;
  scrollbar-color: rgba(84, 228, 212, 0.42) transparent;
  scrollbar-width: thin;
}

.plans-lead {
  margin: 2px 3px 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.plans-list {
  display: grid;
  gap: 10px;
}

.plan-card {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    radial-gradient(circle at 100% 0%, rgba(90, 140, 255, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  color: var(--text);
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.plan-card:nth-child(2n) {
  background:
    radial-gradient(circle at 100% 0%, rgba(138, 116, 255, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
}

.plan-card:active {
  transform: scale(0.985);
  border-color: rgba(84, 228, 212, 0.3);
}

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

.plan-main strong {
  display: block;
  overflow: hidden;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-main span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.plan-price {
  align-self: start;
  color: var(--cyan);
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.plan-meta {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px;
}

.plan-meta span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #afc1d4;
  font-size: 11px;
  font-weight: 800;
}

.custom-plan {
  margin-top: 13px;
  padding: 17px;
  border: 1px solid rgba(84, 228, 212, 0.19);
  border-radius: 21px;
  background:
    radial-gradient(circle at 90% 0%, rgba(84, 228, 212, 0.14), transparent 38%),
    rgba(255, 255, 255, 0.035);
}

.custom-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.custom-plan-head h3 {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.custom-plan-head > strong {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 950;
}

.custom-plan label {
  display: block;
  margin: 17px 0 8px;
  color: #c9d7e6;
  font-size: 12px;
  font-weight: 800;
}

.custom-input {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(3, 12, 23, 0.68);
}

.custom-input:focus-within {
  border-color: rgba(84, 228, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(84, 228, 212, 0.08);
}

.custom-input input {
  min-width: 0;
  height: 100%;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
}

.custom-input input::placeholder {
  color: #5f748b;
}

.custom-input span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.custom-plan > p {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.custom-plan .primary {
  min-height: 50px;
  margin-top: 13px;
  border-radius: 15px;
  font-size: 14px;
}

.referral-body,
.payment-body,
.invoices-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 1px 8px;
  scrollbar-color: rgba(84, 228, 212, 0.42) transparent;
  scrollbar-width: thin;
}

.referral-hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(84, 228, 212, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 18%, rgba(84, 228, 212, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(30, 94, 99, 0.72), rgba(25, 51, 82, 0.92));
}

.referral-hero > span {
  color: #b9d8dc;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.referral-hero > strong {
  display: block;
  margin-top: 6px;
  color: var(--cyan);
  font-size: 38px;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.referral-hero p {
  max-width: 290px;
  margin-top: 8px;
  color: #c6d8e4;
  font-size: 13px;
  line-height: 1.5;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.referral-stats article {
  min-width: 0;
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.referral-stats span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.referral-stats strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.referral-label {
  display: block;
  margin: 18px 3px 8px;
  color: #c9d7e6;
  font-size: 12px;
  font-weight: 800;
}

.referral-link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.referral-link-box input {
  min-width: 0;
  height: 50px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: rgba(3, 12, 23, 0.68);
  color: #cfe0f2;
  font-size: 12px;
}

.referral-link-box button {
  padding: 0 13px;
  border: 1px solid rgba(84, 228, 212, 0.22);
  border-radius: 14px;
  background: rgba(84, 228, 212, 0.1);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
}

.referral-body > .primary {
  min-height: 50px;
  margin-top: 9px;
  border-radius: 15px;
  font-size: 14px;
}

.payment-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(138, 116, 255, 0.18), transparent 43%),
    rgba(255, 255, 255, 0.04);
}

.payment-plan span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.payment-plan div > strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  font-weight: 900;
}

.payment-plan > strong {
  color: var(--cyan);
  font-size: 22px;
  font-weight: 950;
}

.payment-plan p {
  grid-column: 1 / -1;
  color: #aebed0;
  font-size: 12px;
}

.payment-provider {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 11px;
  padding: 14px;
  border: 1px solid rgba(84, 228, 212, 0.21);
  border-radius: 18px;
  background: rgba(84, 228, 212, 0.07);
}

.provider-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #06121d;
  font-size: 19px;
  font-weight: 950;
}

.payment-provider strong,
.payment-provider span {
  display: block;
}

.payment-provider strong {
  font-size: 14px;
  font-weight: 900;
}

.payment-provider span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.payment-provider > b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--cyan);
  color: #06121d;
  font-size: 13px;
}

.payment-status {
  min-height: 41px;
  margin: 13px 3px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.payment-status.success {
  color: var(--green);
}

.payment-status.error {
  color: var(--red);
}

.payment-body > .primary {
  min-height: 52px;
  border-radius: 15px;
  font-size: 14px;
}

.payment-check {
  width: 100%;
  margin-top: 8px;
}

.invoices-body {
  overflow-y: auto;
}

.invoices-lead {
  margin: 2px 3px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.invoices-refresh {
  width: 100%;
  min-height: 44px;
  margin-bottom: 10px;
  border-radius: 14px;
}

.invoices-list {
  display: grid;
  gap: 10px;
}

.invoice-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(90, 140, 255, 0.13), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.invoice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.invoice-title {
  min-width: 0;
}

.invoice-title span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.invoice-title strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(255, 198, 109, 0.25);
  border-radius: 999px;
  background: rgba(255, 198, 109, 0.1);
  color: var(--amber);
  font-size: 10px;
  font-weight: 900;
}

.invoice-status.paid {
  border-color: rgba(93, 230, 155, 0.26);
  background: rgba(93, 230, 155, 0.1);
  color: var(--green);
}

.invoice-status.unpaid {
  border-color: rgba(255, 125, 143, 0.24);
  background: rgba(255, 125, 143, 0.09);
  color: var(--red);
}

.invoice-amount {
  margin-top: 12px;
  color: var(--cyan);
  font-size: 21px;
  font-weight: 950;
}

.invoice-meta {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: #aebed0;
  font-size: 11px;
  line-height: 1.45;
}

.invoice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.invoice-actions button {
  min-height: 42px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 850;
}

.invoice-actions button:only-child {
  grid-column: 1 / -1;
}

.invoice-empty {
  padding: 26px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.info-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 1px 10px;
  scrollbar-color: rgba(84, 228, 212, 0.42) transparent;
  scrollbar-width: thin;
}

.info-open {
  width: 100%;
  min-height: 50px;
  margin-top: 13px;
  border-radius: 15px;
}

.info-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 2px auto 13px;
  place-items: center;
  border: 1px solid rgba(84, 228, 212, 0.2);
  border-radius: 21px;
  background: linear-gradient(135deg, rgba(84, 228, 212, 0.2), rgba(90, 140, 255, 0.2));
  box-shadow: 0 13px 30px rgba(36, 102, 145, 0.2);
  font-size: 28px;
}

.info-intro {
  max-width: 340px;
  margin: 0 auto 15px;
  color: #b9c8d8;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  white-space: pre-line;
}

.info-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-bottom: 12px;
}

.info-copy input {
  min-width: 0;
  height: 50px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: rgba(3, 12, 23, 0.68);
  color: #cfe0f2;
  font-size: 12px;
}

.info-copy button {
  padding: 0 13px;
  border: 1px solid rgba(84, 228, 212, 0.22);
  border-radius: 14px;
  background: rgba(84, 228, 212, 0.1);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
}

.info-content {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: #adbed0;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-line;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: rgba(185, 218, 255, 0.22);
}

.sheet-heading {
  min-height: 57px;
  padding: 4px 52px 12px;
  text-align: center;
}

.sheet-heading h2 {
  margin-top: 3px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.sheet-close {
  position: absolute;
  top: 18px;
  right: 15px;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #cfe0f2;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.device-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(4, 15, 28, 0.47);
}

.device-tab {
  min-height: 44px;
  padding: 0 7px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.device-tab.active {
  background: linear-gradient(135deg, rgba(84, 228, 212, 0.2), rgba(90, 140, 255, 0.24));
  box-shadow: inset 0 0 0 1px rgba(117, 198, 241, 0.14);
  color: var(--text);
}

.sheet-body {
  margin: 12px -2px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 2px 16px;
  scrollbar-color: rgba(84, 228, 212, 0.42) transparent;
  scrollbar-width: thin;
}

.step-indicator {
  display: grid;
  grid-template-columns: 28px minmax(30px, 76px) 28px;
  align-items: center;
  justify-content: center;
  margin: 3px auto 12px;
}

.step-indicator span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.step-indicator span.active {
  border-color: rgba(84, 228, 212, 0.38);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 6px 18px rgba(75, 167, 208, 0.27);
  color: #06121d;
}

.step-indicator i {
  height: 1px;
  background: var(--line-strong);
}

.connect-step {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.connect-step h3 {
  margin: 0 0 11px;
  color: var(--text);
  font-size: 18px;
  font-weight: 880;
  letter-spacing: -0.025em;
}

.connect-step p {
  margin: 0 0 14px;
  color: #aebed0;
  font-size: 14px;
  line-height: 1.58;
}

.connect-step p b {
  color: #e8f2ff;
}

.download-list {
  display: grid;
  gap: 2px;
}

.subscription-url {
  width: 100%;
  min-height: 78px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(3, 12, 23, 0.7);
  color: #cfe0f2;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  resize: vertical;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 9px;
  padding-top: 11px;
  border-top: 1px solid rgba(185, 218, 255, 0.08);
  background: #0b1a2c;
}

.sheet-actions .primary {
  min-height: 52px;
  margin: 0;
  border-radius: 15px;
}

.ghost {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  color: #adbed0;
  font-weight: 850;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 16px;
  max-width: 390px;
  min-height: 46px;
  margin: 0 auto;
  padding: 13px 16px;
  transform: translateY(28px);
  border: 1px solid rgba(84, 228, 212, 0.22);
  border-radius: 15px;
  background: rgba(12, 31, 48, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  color: #eaf6ff;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheet-up {
  from { transform: translateY(38px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (hover: hover) {
  .primary:hover {
    filter: brightness(1.08);
  }

  .row:not(:disabled):hover {
    border-color: rgba(84, 228, 212, 0.23);
    background: rgba(84, 228, 212, 0.07);
  }
}

@media (max-width: 350px) {
  .app-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .status-overview {
    min-height: 154px;
    padding: 19px 16px;
  }

  .signal-orb {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    font-size: 24px;
  }

  .status-copy h2 {
    font-size: 20px;
  }

  .metric {
    min-height: 86px;
    padding: 13px 11px;
  }

  .metric strong {
    font-size: 14px;
  }

  .device-tab {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Theme switcher and the full connection guide */

:root {
  --guide-page: #101114;
  --guide-card: #18191c;
  --guide-card-soft: #202125;
  --guide-line: #34363b;
  --guide-text: #f2f2f3;
  --guide-muted: #92949a;
  --guide-green: #1dcc68;
  --guide-green-soft: rgba(29, 204, 104, 0.16);
  --guide-blue: #38bdf8;
  --guide-blue-soft: rgba(56, 189, 248, 0.12);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f3f8;
  --bg-soft: #e9edf5;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(17, 35, 56, 0.045);
  --line: rgba(32, 52, 78, 0.11);
  --line-strong: rgba(32, 52, 78, 0.18);
  --text: #131a24;
  --muted: #858d9a;
  --cyan: #0a9d92;
  --cyan-soft: rgba(10, 157, 146, 0.12);
  --blue: #3987f5;
  --violet: #7164eb;
  --green: #18a84f;
  --red: #dc4d62;
  --amber: #d58a00;
  --shadow: 0 14px 40px rgba(38, 52, 73, 0.08);
  --guide-page: #f0f2f7;
  --guide-card: #ffffff;
  --guide-card-soft: #f7f8fb;
  --guide-line: #e1e4ea;
  --guide-text: #13171d;
  --guide-muted: #9298a2;
  --guide-green: #18ad52;
  --guide-green-soft: #e2f7e9;
  --guide-blue: #2685ff;
  --guide-blue-soft: #e9f3ff;
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.theme-toggle {
  position: relative;
  display: grid;
  width: 59px;
  height: 34px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.theme-toggle::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 198, 109, 0.2);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  transform: translateX(25px);
  content: "";
  transition: transform 180ms ease, background 180ms ease;
}

.theme-toggle.is-light::before {
  transform: translateX(0);
  background: #ffffff;
}

.theme-toggle span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.guide-sheet {
  position: fixed;
  z-index: 65;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 8, 16, 0.78);
  backdrop-filter: blur(12px);
  animation: fade-in 180ms ease both;
}

.guide-card {
  position: relative;
  display: flex;
  width: min(100%, 440px);
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  background: var(--guide-page);
  color: var(--guide-text);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.28);
  animation: sheet-up 250ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.guide-header {
  z-index: 2;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding:
    max(10px, env(safe-area-inset-top))
    14px
    10px;
  border-bottom: 1px solid var(--guide-line);
  background: var(--guide-page);
  background: color-mix(in srgb, var(--guide-page) 92%, transparent);
  backdrop-filter: blur(16px);
}

.guide-kicker {
  display: block;
  color: var(--guide-green);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-header h2 {
  margin-top: 2px;
  color: var(--guide-text);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.guide-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.guide-theme-toggle {
  border-color: var(--guide-line);
  background: var(--guide-card-soft);
}

.guide-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--guide-line);
  border-radius: 50%;
  background: var(--guide-card-soft);
  color: var(--guide-muted);
  font-size: 25px;
  line-height: 1;
}

.guide-scroll {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 7px max(76px, calc(22px + env(safe-area-inset-bottom)));
  scrollbar-color: rgba(73, 145, 255, 0.32) transparent;
  scrollbar-width: thin;
}

.guide-section {
  width: 100%;
  border: 1px solid var(--guide-line);
  border-radius: 25px;
  background: var(--guide-card);
  box-shadow: 0 10px 30px rgba(32, 45, 63, 0.05);
  color: var(--guide-text);
}

.guide-subscription {
  padding: 17px 18px 15px;
}

.guide-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--guide-line);
}

.guide-section-title h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.guide-status {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 125, 143, 0.12);
  color: var(--red);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.guide-status.active {
  background: var(--guide-green-soft);
  color: var(--guide-green);
}

.guide-account-grid,
.guide-expiry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guide-account-grid {
  margin-top: 12px;
}

.guide-account-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--guide-line);
  border-radius: 17px;
  background: var(--guide-card-soft);
}

.guide-account-grid span,
.guide-expiry span {
  display: block;
  overflow: hidden;
  color: var(--guide-muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.guide-account-grid strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-expiry {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(65, 151, 255, 0.28);
  border-radius: 17px;
  background: var(--guide-blue-soft);
}

.guide-expiry > div:last-child {
  text-align: right;
}

.guide-expiry strong {
  display: block;
  margin-top: 5px;
  color: var(--guide-blue);
  font-size: 16px;
  font-weight: 600;
}

.guide-expiry > div:last-child strong {
  color: var(--guide-text);
  font-size: 13px;
}

.guide-steps {
  overflow: hidden;
}

.guide-section-label {
  display: block;
  padding: 15px 17px 12px;
  color: var(--guide-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.guide-step {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 16px 15px;
  border-top: 1px solid var(--guide-line);
}

.guide-step:not(.guide-step-last)::after {
  position: absolute;
  z-index: 0;
  top: 51px;
  bottom: -17px;
  left: 31px;
  width: 1px;
  background: var(--guide-line);
  content: "";
}

.guide-step-number {
  z-index: 1;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--guide-line);
  border-radius: 50%;
  background: var(--guide-card);
  color: var(--guide-muted);
  font-size: 11px;
  font-weight: 850;
}

.guide-step-content {
  min-width: 0;
}

.guide-step-content > h3,
.guide-share > h3 {
  color: var(--guide-text);
  font-size: 14px;
  font-weight: 600;
}

.guide-step-content > p,
.guide-share > p {
  margin-top: 4px;
  color: var(--guide-muted);
  font-size: 11px;
  line-height: 1.45;
}

.client-selector,
.platform-selector {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 4px;
  border: 1px solid var(--guide-line);
  border-radius: 17px;
  background: var(--guide-card-soft);
}

.client-selector {
  grid-template-columns: 1fr 1fr;
}

.platform-selector {
  grid-template-columns: repeat(3, 1fr);
}

.client-option,
.platform-option {
  min-width: 0;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--guide-muted);
  font-size: 10px;
  font-weight: 850;
}

.client-option {
  display: grid;
  grid-template-columns: 38px auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.client-option.active,
.platform-option.active {
  border-color: rgba(33, 180, 91, 0.32);
  background: var(--guide-green-soft);
  box-shadow: 0 4px 16px rgba(28, 174, 84, 0.08);
  color: var(--guide-green);
}

.client-logo {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: #0d1118;
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
}

.incy-logo {
  background: #101b16;
  color: #26cf67;
}

.platform-option span,
.platform-option strong {
  display: block;
}

.platform-option span {
  width: 36px;
  height: 36px;
  margin: 0 auto 4px;
  padding-top: 9px;
  border-radius: 12px;
  background: var(--guide-card-soft);
  background: color-mix(in srgb, var(--guide-muted) 12%, transparent);
  color: var(--guide-text);
  font-size: 16px;
}

.platform-option.active span {
  background: rgba(33, 180, 91, 0.14);
  color: var(--guide-green);
}

.guide-downloads {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.guide-download {
  display: grid;
  width: 100%;
  min-height: 57px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--guide-line);
  border-radius: 15px;
  background: var(--guide-card);
  color: var(--guide-text);
  text-align: left;
}

.guide-download-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--guide-card-soft);
  font-size: 15px;
}

.guide-download strong,
.guide-download small {
  display: block;
}

.guide-download strong {
  font-size: 12px;
  font-weight: 850;
}

.guide-download small {
  margin-top: 3px;
  color: var(--guide-muted);
  font-size: 9px;
}

.guide-download b {
  color: var(--guide-muted);
  font-size: 17px;
}

.guide-primary,
.guide-secondary {
  width: 100%;
  min-height: 45px;
  margin-top: 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 900;
}

.guide-primary {
  background: var(--guide-green);
  box-shadow: 0 10px 23px rgba(24, 173, 82, 0.18);
  color: #ffffff;
}

.guide-secondary {
  margin-top: 8px;
  border: 1px solid rgba(60, 147, 255, 0.28);
  background: var(--guide-blue-soft);
  color: var(--guide-blue);
}

.guide-qr {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--guide-line);
  border-radius: 17px;
  background: var(--guide-card-soft);
  text-align: center;
}

#guideQrCode {
  display: grid;
  min-height: 184px;
  place-items: center;
  color: var(--guide-muted);
  font-size: 11px;
  line-height: 1.5;
}

#guideQrCode img,
#guideQrCode canvas {
  max-width: 184px;
  border: 9px solid #ffffff;
  border-radius: 9px;
}

.guide-qr p {
  margin-top: 9px;
  color: var(--guide-muted);
  font-size: 10px;
}

.guide-tv,
.guide-support {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 16px 13px;
  text-align: left;
}

.guide-tv-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--guide-blue-soft);
  font-size: 17px;
}

.guide-tv strong,
.guide-tv small,
.guide-support strong,
.guide-support small {
  display: block;
}

.guide-tv strong,
.guide-support strong {
  color: var(--guide-text);
  font-size: 13px;
  font-weight: 600;
}

.guide-tv small,
.guide-support small {
  margin-top: 4px;
  color: var(--guide-muted);
  font-size: 10px;
}

.guide-tv > b,
.guide-support > b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--guide-card-soft);
  color: var(--guide-muted);
  font-size: 18px;
}

.guide-share {
  padding: 0 15px 17px;
}

.guide-share .guide-section-label {
  padding-right: 0;
  padding-left: 0;
}

.share-tip {
  display: grid;
  width: 100%;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(61, 148, 255, 0.25);
  border-left: 4px solid var(--guide-blue);
  border-radius: 15px;
  background: var(--guide-blue-soft);
  color: var(--guide-text);
  text-align: left;
}

.share-tip > span:first-child {
  color: var(--guide-blue);
  font-size: 19px;
}

.share-tip strong,
.share-tip small {
  display: block;
}

.share-tip strong {
  font-size: 11px;
  font-weight: 600;
}

.share-tip small {
  margin-top: 4px;
  color: var(--guide-muted);
  font-size: 9px;
  line-height: 1.45;
}

.guide-link {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding: 0 12px;
  border: 1px solid var(--guide-line);
  border-radius: 15px;
  background: var(--guide-card-soft);
  color: var(--guide-text);
  text-align: left;
}

.guide-link span {
  overflow: hidden;
  font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-link b {
  color: var(--guide-blue);
  font-size: 9px;
}

.guide-support {
  grid-template-columns: minmax(0, 1fr) auto;
  background: var(--guide-card);
  background: color-mix(in srgb, var(--guide-blue-soft) 55%, var(--guide-card));
}

.guide-support strong {
  color: var(--guide-blue);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 50% -15%, rgba(88, 139, 231, 0.14), transparent 35%),
    linear-gradient(180deg, #eef1f8 0%, #f5f6fa 100%);
}

html[data-theme="light"] .ambient {
  opacity: 0.09;
}

html[data-theme="light"] .logo {
  border-color: rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .status-overview {
  background:
    radial-gradient(circle at 90% 10%, rgba(113, 100, 235, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff, #edf5ff);
}

html[data-theme="light"] body[data-status="active"] .status-overview {
  background:
    radial-gradient(circle at 90% 10%, rgba(33, 180, 91, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff, #edf9f3);
}

html[data-theme="light"] .status-copy p,
html[data-theme="light"] .traffic-values b,
html[data-theme="light"] .row,
html[data-theme="light"] .plan-meta span,
html[data-theme="light"] .custom-plan label,
html[data-theme="light"] .referral-label,
html[data-theme="light"] .payment-plan p,
html[data-theme="light"] .invoice-meta,
html[data-theme="light"] .info-intro,
html[data-theme="light"] .info-content,
html[data-theme="light"] .connect-step p,
html[data-theme="light"] .connect-step p b {
  color: #526176;
}

html[data-theme="light"] .tabs,
html[data-theme="light"] .device-tabs {
  background: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .metric,
html[data-theme="light"] .row,
html[data-theme="light"] .plan-card,
html[data-theme="light"] .custom-plan,
html[data-theme="light"] .referral-stats article,
html[data-theme="light"] .payment-plan,
html[data-theme="light"] .invoice-card,
html[data-theme="light"] .info-content,
html[data-theme="light"] .connect-step,
html[data-theme="light"] .ghost {
  background: rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .connect-sheet,
html[data-theme="light"] .subscriptions-sheet,
html[data-theme="light"] .plans-sheet,
html[data-theme="light"] .referral-sheet,
html[data-theme="light"] .payment-sheet,
html[data-theme="light"] .invoices-sheet,
html[data-theme="light"] .info-sheet,
html[data-theme="light"] .guide-sheet {
  background: rgba(43, 53, 68, 0.38);
}

html[data-theme="light"] .connect-card,
html[data-theme="light"] .subscriptions-card,
html[data-theme="light"] .plans-card,
html[data-theme="light"] .referral-card,
html[data-theme="light"] .payment-card,
html[data-theme="light"] .invoices-card,
html[data-theme="light"] .info-card {
  border-color: rgba(32, 52, 78, 0.12);
  background:
    radial-gradient(circle at 90% -10%, rgba(113, 100, 235, 0.1), transparent 31%),
    #f8f9fc;
  box-shadow: 0 -25px 70px rgba(48, 61, 80, 0.16);
}

html[data-theme="light"] .subscription-choice {
  background:
    radial-gradient(circle at 100% 0%, rgba(90, 140, 255, 0.11), transparent 44%),
    rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .subscription-choice.active {
  border-color: rgba(17, 155, 145, 0.34);
  background:
    radial-gradient(circle at 100% 0%, rgba(90, 140, 255, 0.13), transparent 44%),
    rgba(75, 211, 196, 0.11);
}

html[data-theme="light"] .sheet-actions {
  border-color: rgba(32, 52, 78, 0.08);
  background: #f8f9fc;
}

html[data-theme="light"] .sheet-close,
html[data-theme="light"] .ghost,
html[data-theme="light"] .custom-input,
html[data-theme="light"] .referral-link-box input,
html[data-theme="light"] .info-copy input,
html[data-theme="light"] .subscription-url {
  background: #ffffff;
  color: #26364a;
}

html[data-theme="light"] .sheet-close,
html[data-theme="light"] .ghost {
  color: #526176;
}

html[data-theme="light"] .auth-screen {
  background:
    radial-gradient(circle at 50% 20%, rgba(72, 133, 245, 0.13), transparent 35%),
    rgba(241, 243, 248, 0.97);
}

html[data-theme="light"] .toast {
  border-color: rgba(34, 112, 198, 0.16);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 45px rgba(45, 58, 77, 0.18);
  color: #1d2a3a;
}

@media (min-width: 441px) {
  .guide-card {
    height: min(94vh, 900px);
    height: min(94dvh, 900px);
    border: 1px solid var(--guide-line);
    border-radius: 28px;
  }
}

@media (max-width: 350px) {
  .topbar-actions {
    gap: 4px;
  }

  .topbar > .topbar-actions .theme-toggle {
    width: 34px;
  }

  .topbar > .topbar-actions .theme-toggle::before {
    display: none;
  }

  .topbar > .topbar-actions .theme-toggle span:first-child {
    display: none;
  }

  .guide-step {
    grid-template-columns: 30px minmax(0, 1fr);
    padding-right: 11px;
    padding-left: 11px;
  }

  .guide-step:not(.guide-step-last)::after {
    left: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-sheet,
  .guide-card {
    animation: none;
  }

  .theme-toggle::before {
    transition: none;
  }
}

/* Photo-matched connection controls */

.guide-card,
.guide-card button {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.guide-steps {
  border-radius: 24px;
  box-shadow: none;
}

.guide-section-label {
  padding: 16px 17px 13px;
  color: #85868b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.guide-step {
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
  padding: 18px 13px 19px;
}

.guide-step:not(.guide-step-last)::after {
  top: 49px;
  bottom: -18px;
  left: 25px;
  background: #33353a;
}

.guide-step-number {
  width: 24px;
  height: 24px;
  border-color: #45474d;
  background: #18191c;
  color: #a6a7ab;
  font-size: 11px;
  font-weight: 400;
}

.guide-step-content > h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.guide-step-content > p {
  max-width: 310px;
  margin-top: 3px;
  color: #94959a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.client-selector,
.platform-selector {
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border-color: #34363b;
  border-radius: 18px;
  background: #202125;
}

.client-option,
.platform-option {
  position: relative;
  min-height: 79px;
  overflow: hidden;
  border-radius: 15px;
  color: #96979b;
  font-size: 11px;
  font-weight: 600;
  transition:
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease,
    transform 180ms ease,
    box-shadow 220ms ease;
}

.client-option {
  display: flex;
  grid-template-columns: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.client-option.active,
.platform-option.active {
  border-color: rgba(29, 204, 104, 0.52);
  background: rgba(26, 96, 56, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(29, 204, 104, 0.05),
    0 0 0 4px rgba(29, 204, 104, 0.035);
  color: #2ae977;
}

.client-logo,
.platform-option span {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: 1px solid #34363b;
  border-radius: 11px;
  background: #2a2b2f;
  color: #f3f3f3;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease,
    background 220ms ease;
}

.client-option.active .client-logo,
.platform-option.active span {
  transform: scale(1.04);
  border-color: rgba(29, 204, 104, 0.32);
  background: rgba(12, 81, 42, 0.82);
  box-shadow:
    0 0 0 7px rgba(29, 204, 104, 0.07),
    0 0 19px rgba(29, 204, 104, 0.16);
  color: #33ec7d;
}

.platform-option span {
  margin-bottom: 5px;
  padding-top: 8px;
}

.client-option.choice-pop,
.platform-option.choice-pop {
  animation: guide-choice-pop 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.guide-downloads {
  gap: 7px;
  margin-top: 12px;
  transform-origin: 50% 0;
}

.guide-downloads.swap-forward {
  animation: guide-list-up 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.guide-downloads.swap-backward {
  animation: guide-list-down 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.guide-download {
  min-height: 57px;
  grid-template-columns: 36px minmax(0, 1fr) 28px;
  gap: 9px;
  padding: 8px 10px;
  border-color: #34363b;
  border-radius: 15px;
  background: #1d1e21;
  transition:
    transform 150ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.guide-download:active {
  transform: scale(0.985);
  border-color: rgba(29, 204, 104, 0.42);
  background: #222529;
}

.guide-download-icon {
  width: 34px;
  height: 34px;
  border: 1px solid #3a3c41;
  border-radius: 10px;
  background: #292a2e;
  color: #f4f4f5;
  font-size: 13px;
  font-weight: 800;
}

.guide-download strong {
  color: #f0f0f1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.guide-download small {
  margin-top: 3px;
  color: #94959a;
  font-size: 10px;
  font-weight: 400;
}

.guide-download-arrow {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #696b71;
  font-size: 16px;
  font-weight: 400;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.guide-download:hover .guide-download-arrow,
.guide-download:active .guide-download-arrow {
  transform: translateY(-1px) rotate(-35deg);
  border-color: rgba(29, 204, 104, 0.28);
  background: rgba(29, 204, 104, 0.08);
  color: #29de72;
}

.guide-download.opening .guide-download-arrow {
  animation: guide-arrow-orbit 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.guide-primary {
  min-height: 48px;
  border: 1px solid rgba(29, 204, 104, 0.75);
  border-radius: 16px;
  background: #1dcc68;
  box-shadow:
    0 0 0 6px rgba(29, 204, 104, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: #092714;
  font-size: 13px;
  font-weight: 600;
}

.guide-secondary {
  display: block;
  width: auto;
  min-width: 156px;
  min-height: 39px;
  margin: 13px auto 0;
  padding: 0 17px;
  border-color: rgba(56, 189, 248, 0.38);
  border-radius: 999px;
  background: rgba(18, 72, 101, 0.36);
  color: #46c5ff;
  font-size: 12px;
  font-weight: 600;
}

html[data-theme="light"] .guide-step:not(.guide-step-last)::after {
  background: var(--guide-line);
}

html[data-theme="light"] .guide-step-number {
  border-color: var(--guide-line);
  background: var(--guide-card);
}

html[data-theme="light"] .client-selector,
html[data-theme="light"] .platform-selector {
  border-color: var(--guide-line);
  background: var(--guide-card-soft);
}

html[data-theme="light"] .client-option.active,
html[data-theme="light"] .platform-option.active {
  background: #e2f7e9;
}

html[data-theme="light"] .client-logo,
html[data-theme="light"] .platform-option span,
html[data-theme="light"] .guide-download-icon {
  border-color: #e1e4ea;
  background: #eef0f4;
  color: #18202a;
}

html[data-theme="light"] .client-option.active .client-logo,
html[data-theme="light"] .platform-option.active span {
  border-color: rgba(24, 173, 82, 0.26);
  background: #d7f4e1;
  color: #169a49;
}

html[data-theme="light"] .guide-download {
  border-color: var(--guide-line);
  background: #ffffff;
}

html[data-theme="light"] .guide-download strong {
  color: var(--guide-text);
}

html[data-theme="light"] .guide-download small {
  color: var(--guide-muted);
}

html[data-theme="light"] .guide-primary {
  color: #073618;
}

@keyframes guide-choice-pop {
  0% { transform: scale(0.96); }
  62% { transform: scale(1.018); }
  100% { transform: scale(1); }
}

@keyframes guide-list-up {
  from {
    transform: translateY(13px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes guide-list-down {
  from {
    transform: translateY(-13px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes guide-arrow-orbit {
  0% {
    transform: translateY(3px) rotate(0deg);
    border-color: rgba(29, 204, 104, 0);
  }
  45% {
    transform: translateY(-3px) rotate(180deg);
    border-color: rgba(29, 204, 104, 0.52);
    color: #29de72;
  }
  100% {
    transform: translateY(0) rotate(360deg);
    border-color: rgba(29, 204, 104, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .client-option.choice-pop,
  .platform-option.choice-pop,
  .guide-downloads.swap-forward,
  .guide-downloads.swap-backward,
  .guide-download.opening .guide-download-arrow {
    animation: none;
  }
}

/* One typography and visual language for the dashboard and installation guide */

body,
button,
input,
textarea,
.guide-card,
.guide-card button {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

.logo,
.brand h1,
.status,
.eyebrow,
.status-copy h2,
.metric span,
.metric strong,
.traffic-head strong,
.traffic-head > b,
.traffic-values b,
.primary,
.tab,
.panel-heading h2,
.row,
.auth-box h1,
.plan-main strong,
.plan-main span,
.plan-price,
.plan-meta span,
.custom-plan-head h3,
.custom-plan-head > strong,
.custom-plan label,
.custom-input input,
.custom-input span,
.referral-hero > span,
.referral-hero > strong,
.referral-stats span,
.referral-stats strong,
.referral-label,
.referral-link-box button,
.payment-plan span,
.payment-plan div > strong,
.payment-plan > strong,
.provider-mark,
.payment-provider strong,
.invoice-title span,
.invoice-title strong,
.invoice-status,
.invoice-amount,
.invoice-actions button,
.info-copy button,
.sheet-heading h2,
.device-tab,
.step-indicator span,
.connect-step h3,
.ghost,
.toast,
.guide-step-number,
.platform-option,
.client-logo,
.guide-download strong,
.guide-download-icon {
  font-weight: 600;
}

:root {
  --guide-page: var(--bg);
  --guide-card: var(--surface);
  --guide-card-soft: var(--surface-soft);
  --guide-line: var(--line);
  --guide-text: var(--text);
  --guide-muted: var(--muted);
  --guide-green: var(--cyan);
  --guide-green-soft: var(--cyan-soft);
  --guide-blue: var(--blue);
  --guide-blue-soft: rgba(90, 140, 255, 0.13);
}

html[data-theme="light"] {
  --guide-page: var(--bg);
  --guide-card: var(--surface);
  --guide-card-soft: var(--surface-soft);
  --guide-line: var(--line);
  --guide-text: var(--text);
  --guide-muted: var(--muted);
  --guide-green: var(--cyan);
  --guide-green-soft: var(--cyan-soft);
  --guide-blue: var(--blue);
  --guide-blue-soft: rgba(57, 135, 245, 0.1);
}

.guide-card {
  background:
    radial-gradient(circle at 50% -15%, rgba(64, 110, 191, 0.26), transparent 34%),
    linear-gradient(180deg, #07111f 0%, #071421 48%, #06101e 100%);
}

.guide-header {
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg) 91%, transparent);
}

.guide-scroll {
  gap: 12px;
  padding-right: 14px;
  padding-left: 14px;
}

.guide-section {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.guide-subscription {
  background:
    linear-gradient(125deg, rgba(37, 76, 109, 0.48), rgba(21, 39, 71, 0.54)),
    var(--surface);
}

.guide-account-grid > div,
.client-selector,
.platform-selector,
.guide-download,
.guide-link,
.guide-theme-toggle,
.guide-close,
.guide-tv > b,
.guide-support > b {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.guide-expiry,
.share-tip {
  border-color: rgba(90, 140, 255, 0.28);
  background: rgba(90, 140, 255, 0.11);
}

.guide-step:not(.guide-step-last)::after {
  background: var(--line);
}

.guide-step-number {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  color: var(--muted);
}

.client-option,
.platform-option {
  color: var(--muted);
}

.client-option.active,
.platform-option.active {
  border-color: rgba(84, 228, 212, 0.4);
  background: rgba(84, 228, 212, 0.13);
  box-shadow:
    inset 0 0 0 1px rgba(84, 228, 212, 0.06),
    0 6px 18px rgba(38, 158, 176, 0.08);
  color: var(--cyan);
}

.client-option.active .client-logo,
.platform-option.active span {
  border-color: rgba(84, 228, 212, 0.3);
  background: rgba(24, 92, 99, 0.78);
  box-shadow:
    0 0 0 7px rgba(84, 228, 212, 0.06),
    0 0 19px rgba(84, 228, 212, 0.14);
  color: var(--cyan);
}

.guide-download {
  color: var(--text);
}

.guide-download:active {
  border-color: rgba(84, 228, 212, 0.35);
  background: rgba(84, 228, 212, 0.08);
}

.guide-download-icon {
  border-color: var(--line);
  background: var(--surface-soft);
}

.guide-download strong {
  color: var(--text);
}

.guide-primary {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(115deg, #3bcfbe, #4885f5 58%, #7c67ed);
  box-shadow:
    0 15px 34px rgba(58, 119, 220, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: #f9fcff;
  font-weight: 600;
}

.guide-secondary {
  border-color: rgba(84, 228, 212, 0.3);
  background: rgba(84, 228, 212, 0.1);
  color: var(--cyan);
  font-weight: 600;
}

.guide-support {
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
}

.guide-support strong {
  color: var(--blue);
}

html[data-theme="light"] .guide-card {
  background:
    radial-gradient(circle at 50% -15%, rgba(88, 139, 231, 0.14), transparent 35%),
    linear-gradient(180deg, #eef1f8 0%, #f5f6fa 100%);
}

html[data-theme="light"] .guide-subscription {
  background:
    linear-gradient(125deg, rgba(214, 231, 250, 0.72), rgba(232, 238, 250, 0.82)),
    var(--surface);
}

html[data-theme="light"] .guide-account-grid > div,
html[data-theme="light"] .client-selector,
html[data-theme="light"] .platform-selector,
html[data-theme="light"] .guide-download,
html[data-theme="light"] .guide-link,
html[data-theme="light"] .guide-theme-toggle,
html[data-theme="light"] .guide-close {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.guide-steps {
  display: block !important;
  min-height: 1px;
  visibility: visible !important;
  opacity: 1 !important;
}

.guide-steps > .guide-step {
  display: grid;
}

.guide-subscription,
.guide-tv,
.guide-share,
.guide-support {
  display: none !important;
}

.guide-scroll {
  display: block;
  padding-top: 14px;
}

.guide-steps {
  display: block !important;
  width: 100%;
  height: auto !important;
  min-height: max-content;
  max-height: none !important;
  flex: none;
  contain: none;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: hidden;
}

.guide-steps > .guide-step {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.guide-steps {
  width: 100%;
}

/* Final guide treatment: neutral cards and real application icons. */

:root {
  --guide-page: #101114;
  --guide-card: #18191c;
  --guide-card-soft: #202125;
  --guide-line: #34363b;
  --guide-text: #f2f2f3;
  --guide-muted: #92949a;
  --guide-green: #1dcc68;
  --guide-green-soft: rgba(29, 204, 104, 0.16);
  --guide-blue: #38bdf8;
  --guide-blue-soft: rgba(56, 189, 248, 0.12);
}

html[data-theme="light"] {
  --guide-page: #f0f2f7;
  --guide-card: #ffffff;
  --guide-card-soft: #f7f8fb;
  --guide-line: #e1e4ea;
  --guide-text: #13171d;
  --guide-muted: #9298a2;
  --guide-green: #18ad52;
  --guide-green-soft: #e2f7e9;
  --guide-blue: #2685ff;
  --guide-blue-soft: #e9f3ff;
}

.guide-card {
  background: var(--guide-page);
}

.guide-header {
  border-color: var(--guide-line);
  background: color-mix(in srgb, var(--guide-page) 94%, transparent);
}

.guide-scroll {
  display: grid;
  gap: 14px;
  overflow-anchor: none;
  scroll-behavior: auto;
  padding: 14px 7px max(76px, calc(22px + env(safe-area-inset-bottom)));
}

.guide-section {
  border-color: var(--guide-line);
  background: var(--guide-card);
  box-shadow: none;
  backdrop-filter: none;
}

.guide-subscription {
  display: none !important;
}

.guide-tv,
.guide-support {
  display: grid !important;
}

.guide-share {
  display: block !important;
}

.guide-account-grid > div,
.client-selector,
.platform-selector,
.guide-download,
.guide-link,
.guide-theme-toggle,
.guide-close,
.guide-tv > b,
.guide-support > b {
  border-color: var(--guide-line);
  background: var(--guide-card-soft);
}

.guide-step:not(.guide-step-last)::after {
  background: var(--guide-line);
}

.guide-step-number {
  border-color: var(--guide-line);
  background: var(--guide-card);
  color: var(--guide-muted);
}

.client-option,
.platform-option {
  color: var(--guide-muted);
}

.client-option.active,
.platform-option.active {
  border-color: rgba(29, 204, 104, 0.5);
  background: var(--guide-green-soft);
  box-shadow:
    inset 0 0 0 1px rgba(29, 204, 104, 0.05),
    0 0 0 4px rgba(29, 204, 104, 0.035);
  color: var(--guide-green);
}

.client-logo,
.platform-option span,
.client-option.active .client-logo,
.platform-option.active span {
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.client-option.active .client-logo,
.platform-option.active span {
  filter: drop-shadow(0 0 9px rgba(29, 204, 104, 0.24));
}

.client-logo img,
.platform-option span img,
.guide-download-icon img,
.guide-tv-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.client-logo img,
.platform-option span img {
  border-radius: 11px;
}

.guide-download {
  border-color: var(--guide-line);
  background: var(--guide-card);
  color: var(--guide-text);
}

.guide-download:active {
  border-color: rgba(29, 204, 104, 0.42);
  background: color-mix(in srgb, var(--guide-green) 7%, var(--guide-card));
}

.guide-download-icon {
  overflow: hidden;
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.guide-download strong {
  color: var(--guide-text);
}

.guide-download-arrow img,
.guide-tv > b img,
.guide-support > b img {
  display: block;
  width: 16px;
  height: 16px;
}

.guide-download:hover .guide-download-arrow,
.guide-download:active .guide-download-arrow {
  transform: translateX(2px);
  border-color: transparent;
  background: transparent;
}

.guide-primary,
.guide-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.guide-primary {
  border-color: rgba(29, 204, 104, 0.75);
  background: var(--guide-green);
  box-shadow:
    0 0 0 6px rgba(29, 204, 104, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #072616;
}

.guide-primary img,
.guide-secondary img {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.guide-secondary {
  border-color: rgba(56, 189, 248, 0.38);
  background: var(--guide-blue-soft);
  color: var(--guide-blue);
}

.guide-tv-icon {
  overflow: hidden;
  padding: 0;
  background: transparent;
}

.share-tip > span:first-child {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

.share-tip > span:first-child img {
  display: block;
  width: 22px;
  height: 22px;
}

.guide-support {
  background: color-mix(in srgb, var(--guide-blue) 8%, var(--guide-card));
}

.guide-support strong {
  color: var(--guide-blue);
}

html[data-theme="light"] .guide-card {
  background: var(--guide-page);
}

html[data-theme="light"] .guide-account-grid > div,
html[data-theme="light"] .client-selector,
html[data-theme="light"] .platform-selector,
html[data-theme="light"] .guide-download,
html[data-theme="light"] .guide-link,
html[data-theme="light"] .guide-theme-toggle,
html[data-theme="light"] .guide-close {
  border-color: var(--guide-line);
  background: var(--guide-card-soft);
}

html[data-theme="light"] .client-option.active,
html[data-theme="light"] .platform-option.active {
  background: var(--guide-green-soft);
}

html[data-theme="light"] .client-logo,
html[data-theme="light"] .platform-option span,
html[data-theme="light"] .guide-download-icon,
html[data-theme="light"] .client-option.active .client-logo,
html[data-theme="light"] .platform-option.active span {
  border-color: transparent;
  background: transparent;
}

html[data-theme="light"] .guide-download {
  background: var(--guide-card);
}

html[data-theme="light"] .guide-primary {
  background: var(--guide-green);
  color: #073618;
}

/* Keep guide sections in a strict vertical flow. */

.guide-scroll {
  display: flex !important;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
  overflow-y: auto;
}

.guide-scroll > .guide-section {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
}

.guide-steps {
  display: flex !important;
  width: 100%;
  height: auto !important;
  min-height: 0;
  max-height: none !important;
  flex: 0 0 auto;
  flex-direction: column;
  overflow: hidden;
}

.guide-steps > .guide-section-label,
.guide-steps > .guide-step {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
}

.guide-steps > .guide-step {
  display: grid !important;
}

/* Guide uses the same visual system as the dashboard. */

:root,
html[data-theme="light"] {
  --guide-page: var(--bg);
  --guide-card: var(--surface);
  --guide-card-soft: var(--surface-soft);
  --guide-line: var(--line);
  --guide-text: var(--text);
  --guide-muted: var(--muted);
  --guide-green: var(--cyan);
  --guide-green-soft: var(--cyan-soft);
  --guide-blue: var(--blue);
  --guide-blue-soft: rgba(90, 140, 255, 0.13);
}

.guide-card {
  background:
    radial-gradient(circle at 50% -15%, rgba(64, 110, 191, 0.26), transparent 34%),
    linear-gradient(180deg, #07111f 0%, #071421 48%, #06101e 100%);
}

.guide-header {
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.guide-section {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.guide-section-label,
.guide-kicker {
  color: var(--cyan);
}

.guide-step:not(.guide-step-last)::after {
  background: var(--line);
}

.guide-step-number {
  border-color: rgba(84, 228, 212, 0.28);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.guide-step-content > h3,
.guide-download strong,
.guide-tv strong,
.guide-share > h3 {
  color: var(--text);
}

.guide-step-content > p,
.guide-download small,
.guide-tv small,
.guide-share > p {
  color: var(--muted);
}

.client-selector,
.platform-selector,
.guide-download,
.guide-link,
.guide-tv > b,
.guide-support > b {
  border-color: var(--line);
  background: var(--surface-soft);
}

.client-option,
.platform-option {
  color: var(--muted);
}

.client-option.active,
.platform-option.active {
  border-color: rgba(84, 228, 212, 0.42);
  background:
    linear-gradient(135deg, rgba(84, 228, 212, 0.16), rgba(90, 140, 255, 0.17));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 25px rgba(36, 123, 196, 0.12);
  color: var(--cyan);
}

.client-option.active .client-logo,
.platform-option.active span {
  filter: drop-shadow(0 0 10px rgba(84, 228, 212, 0.32));
}

.guide-download:active {
  border-color: rgba(84, 228, 212, 0.35);
  background: rgba(84, 228, 212, 0.08);
}

.guide-primary {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(115deg, #3bcfbe, #4885f5 58%, #7c67ed);
  box-shadow:
    0 15px 34px rgba(58, 119, 220, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: #f9fcff;
}

.guide-primary img {
  filter: brightness(0) invert(1);
}

.guide-secondary {
  border-color: rgba(84, 228, 212, 0.3);
  background: rgba(84, 228, 212, 0.1);
  color: var(--cyan);
}

.guide-tv,
.guide-support {
  background: var(--surface);
}

.guide-support {
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
}

.guide-support strong {
  color: var(--blue);
}

.share-tip {
  border-color: rgba(90, 140, 255, 0.28);
  border-left-color: var(--cyan);
  background: rgba(90, 140, 255, 0.11);
}

html[data-theme="light"] .guide-card {
  background:
    radial-gradient(circle at 50% -15%, rgba(88, 139, 231, 0.14), transparent 35%),
    linear-gradient(180deg, #eef1f8 0%, #f5f6fa 100%);
}

html[data-theme="light"] .guide-section {
  border-color: var(--line);
  background: var(--surface);
}

html[data-theme="light"] .client-selector,
html[data-theme="light"] .platform-selector,
html[data-theme="light"] .guide-download,
html[data-theme="light"] .guide-link {
  border-color: var(--line);
  background: var(--surface-soft);
}

/* Android TV Web Import */

.tv-send-sheet {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: end center;
  background: rgba(2, 8, 16, 0.82);
  backdrop-filter: blur(12px);
  animation: fade-in 180ms ease both;
}

.tv-send-card {
  position: relative;
  width: min(100%, 440px);
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  padding:
    28px
    21px
    max(24px, calc(18px + env(safe-area-inset-bottom)));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(64, 110, 191, 0.25), transparent 38%),
    linear-gradient(180deg, #0a1728 0%, #07111f 100%);
  box-shadow: 0 -25px 80px rgba(0, 0, 0, 0.42);
  color: var(--text);
  text-align: center;
  animation: sheet-up 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tv-send-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 125, 143, 0.22);
  border-radius: 50%;
  background: rgba(255, 125, 143, 0.13);
  color: var(--red);
  font-size: 23px;
  line-height: 1;
}

.tv-send-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 40px;
}

.tv-send-heading h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.tv-send-icon {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.tv-send-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.tv-send-copy {
  max-width: 350px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tv-send-copy strong {
  color: var(--text);
}

.tv-example-label {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
}

.tv-code-example {
  display: flex;
  width: 200px;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 9px auto 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  text-align: left;
}

.tv-code-example small,
.tv-code-example strong {
  display: block;
}

.tv-code-example small {
  color: var(--muted);
  font-size: 8px;
}

.tv-code-example strong {
  margin-top: 7px;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.tv-code-example img {
  width: 48px;
  height: 48px;
  padding: 6px;
  border-radius: 8px;
  background: #ffffff;
}

.tv-send-form {
  display: grid;
  gap: 10px;
}

.tv-send-form label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tv-send-form input {
  width: 100%;
  height: 59px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-align: center;
  text-transform: uppercase;
}

.tv-send-form input::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.tv-send-status {
  min-height: 19px;
  color: var(--muted);
  font-size: 12px;
}

.tv-send-status.success {
  color: var(--green);
}

.tv-send-status.error {
  color: var(--red);
}

.tv-send-submit {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  background: linear-gradient(115deg, #3bcfbe, #4885f5 58%, #7c67ed);
  box-shadow:
    0 15px 34px rgba(58, 119, 220, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-weight: 600;
}

html[data-theme="light"] .tv-send-sheet {
  background: rgba(43, 53, 68, 0.46);
}

html[data-theme="light"] .tv-send-card {
  background:
    radial-gradient(circle at 50% -15%, rgba(88, 139, 231, 0.16), transparent 36%),
    linear-gradient(180deg, #f8f9fc 0%, #eef1f8 100%);
}

html[data-theme="light"] .tv-code-example,
html[data-theme="light"] .tv-send-form input {
  background: rgba(255, 255, 255, 0.82);
}

@media (min-width: 520px) {
  .tv-send-sheet {
    place-items: center;
    padding: 24px;
  }

  .tv-send-card {
    border-bottom: 1px solid var(--line);
    border-radius: 28px;
  }
}
