html.workspace {
  color-scheme: dark;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-brand: var(--font-sans);
  --bg: #1c1d21;
  --panel: #24262b;
  --panel2: #2d3036;
  --border: #383b43;
  --text: #f0f1f4;
  --muted: #a0a5b1;
  --danger: #c62828;
  --danger2: #ef7676;
  --brand-red: #fb233e;
  --brand-edge: color-mix(in srgb,var(--brand-red) 24%,var(--border));
  --accent: #c62828;
  --green: #99c7b0;
  --amber: #d4bb88;
  --shadow: 0 2px 10px rgba(0,0,0,.08);
  --radius: 10px;
  --workspace-hover: #34373e;
  --workspace-accent-hover: #b72424;
  --workspace-control-shadow: 0 2px 6px rgba(0,0,0,.16);
  --workspace-control-duration: 160ms;
  --workspace-popover-duration: 240ms;
  --workspace-ease: cubic-bezier(.2,.8,.2,1);
  --workspace-focus: #5788dc;
  --workspace-brand: var(--brand-red);
  --workspace-success-bg: #24362d;
  --workspace-pending-bg: #373125;
}

html.workspace.light {
  color-scheme: light;
  --bg: #faf9f7;
  --panel: #ffffff;
  --panel2: #efefec;
  --border: #e3e3df;
  --text: #26272b;
  --muted: #676b75;
  --danger2: #c62828;
  --green: #32664b;
  --amber: #795c24;
  --shadow: 0 2px 10px rgba(26,27,30,.04);
  --workspace-hover: #e8e8e5;
  --workspace-control-shadow: 0 2px 6px rgba(26,27,30,.08);
  --workspace-focus: #5788dc;
  --workspace-brand: var(--brand-red);
  --workspace-success-bg: #edf4ef;
  --workspace-pending-bg: #f5f0e5;
}

html.workspace, html.workspace body { touch-action: auto; }

html.workspace body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

html.workspace a {
  color: var(--text);
  text-underline-offset: 3px;
}

html.workspace :is(button, input, select, textarea, .workspaceClassic, .backLink, .avatarPreview, .linkBox) {
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  transition: background-color var(--workspace-control-duration) var(--workspace-ease),
    border-color var(--workspace-control-duration) var(--workspace-ease),
    color var(--workspace-control-duration) var(--workspace-ease),
    box-shadow var(--workspace-control-duration) var(--workspace-ease),
    transform var(--workspace-control-duration) var(--workspace-ease);
}

html.workspace .topbar {
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: var(--panel);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

html.workspace .brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.4px;
}

html.workspace .brand span {
  color: var(--workspace-brand);
  opacity: 1;
}

html.workspace .workspaceClassic,
html.workspace .backLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

html.workspace .topbar .workspaceClassic {
  margin-left: auto;
}

html.workspace .wrap {
  padding-top: 32px;
  padding-bottom: 64px;
}

html.workspace .workspace-account .wrap {
  max-width: 720px;
}

html.workspace .workspace-sales .wrap {
  max-width: 1140px;
}

html.workspace header {
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

html.workspace h1 {
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.6px;
  line-height: 1.25;
}

html.workspace .pageSub {
  margin-bottom: 28px;
  font-size: 14px;
}

html.workspace .card,
html.workspace .stat {
  min-width: 0;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

html.workspace .card {
  margin-bottom: 20px;
}

html.workspace .cardTitle,
html.workspace .card h2 {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.15px;
}

html.workspace .cardTitle {
  margin-bottom: 20px;
}

html.workspace .card .sub {
  margin-top: 6px;
  margin-bottom: 18px;
  line-height: 1.6;
}

html.workspace .field {
  margin-bottom: 18px;
}

html.workspace .field label,
html.workspace .themeToggleWrap > .muted {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

html.workspace .field input:not([type="checkbox"]):not([type="radio"]),
html.workspace .leadForm input,
html.workspace .leadForm textarea,
html.workspace select,
html.workspace .gate input {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel2);
  color: var(--text);
  color-scheme: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  padding: 10px 12px;
}

html.workspace input::placeholder,
html.workspace textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

html.workspace .field .checkboxRow {
  align-items: center;
  min-height: 44px;
  font-weight: 400;
}

html.workspace .field input[type="checkbox"] {
  accent-color: var(--workspace-focus);
}

html.workspace .btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  filter: none;
}

html.workspace :is(button, .btn):is(:disabled, [aria-disabled="true"]) {
  background: var(--panel2);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.55;
}

html.workspace .btn.primary,
html.workspace .workspace-sales .btn:not(.ghost) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

html.workspace .btn.ghost {
  background: transparent;
}

html.workspace :is(.btn, .backLink, .workspaceClassic, .avatarPickerTab, .emojiOption, .themeToggle, .del):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--workspace-hover);
  color: var(--text);
  box-shadow: var(--workspace-control-shadow);
  filter: none;
}

html.workspace .btn.primary:hover:not(:disabled):not([aria-disabled="true"]),
html.workspace .workspace-sales .btn:not(.ghost):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--workspace-accent-hover);
  color: #fff;
  border-color: var(--workspace-accent-hover);
}

html.workspace :is(button, .btn, .backLink, .workspaceClassic):active:not(:disabled):not([aria-disabled="true"]) {
  transform: scale(.97);
  box-shadow: none;
}

html.workspace :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--workspace-focus) !important;
  outline-offset: 3px;
}

html.workspace :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover:not(:disabled):not(:focus) {
  border-color: var(--muted);
}

html.workspace :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  border-color: var(--workspace-focus);
}

html.workspace .avatarPreview,
html.workspace .avatarPreviewBtn {
  border-radius: var(--radius);
}

html.workspace .avatarPreviewBtn:hover .avatarPreview,
html.workspace .emojiOption.selected {
  border-color: var(--workspace-focus);
  box-shadow: var(--workspace-control-shadow);
}

html.workspace .avatarEditBadge {
  background: var(--panel2);
  color: var(--text);
}

html.workspace .avatarPicker {
  width: 288px;
  max-width: calc(100vw - 72px);
  padding: 12px;
  border-radius: 12px;
  background: var(--panel);
  border-color: var(--border);
  box-shadow: var(--shadow), 0 12px 32px rgba(0,0,0,.12);
  opacity: 1;
  transform: none;
  transform-origin: top left;
  transition: opacity var(--workspace-popover-duration) var(--workspace-ease),
    transform var(--workspace-popover-duration) var(--workspace-ease);
}

@starting-style {
  html.workspace .avatarPicker {
    opacity: 0;
    transform: translateY(4px) scale(.98);
  }
}

html.workspace .avatarPickerTab,
html.workspace .emojiOption {
  min-height: 44px;
  min-width: 44px;
  border-radius: var(--radius);
}

html.workspace .avatarPickerTab,
html.workspace .emojiOption.noneOption {
  font-weight: 500;
}

html.workspace .emojiGrid {
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
}

html.workspace .themeToggle {
  width: 46px;
  height: 28px;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel2);
  overflow: visible;
}

html.workspace .themeToggle::after {
  content: "";
  position: absolute;
  inset: -8px 0;
}

html.workspace .themeToggle-thumb {
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f4f4f5;
  box-shadow: 0 1px 3px rgba(0,0,0,.16);
  transform: translateX(0);
  transition: transform var(--workspace-popover-duration) var(--workspace-ease),
    background-color var(--workspace-control-duration) var(--workspace-ease);
}

html.workspace.light .themeToggle { background: #747b87; border-color: transparent; }
html.workspace.light .themeToggle-thumb { transform: translateX(18px); background: #fff; }

html.workspace .hint {
  color: var(--text) !important;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel2);
}

html.workspace #accountOut[style*="rgb(254, 202, 202)"] {
  color: var(--danger2) !important;
  border-color: var(--danger2);
}

html.workspace .authGate a {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

html.workspace .grid {
  gap: 14px;
  margin-bottom: 24px;
}

html.workspace .stat {
  padding: 18px;
}

html.workspace .statLabel {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 500;
}

html.workspace .statValue {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
}

html.workspace .statValue.green { color: var(--green); }
html.workspace .statValue.amber { color: var(--amber); }

html.workspace .tag,
html.workspace .pill {
  border-radius: var(--radius);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

html.workspace .pill {
  padding: 4px 9px;
}

html.workspace .pill:is(.earned, .paid, .subscribed) {
  background: var(--workspace-success-bg);
  color: var(--green);
}

html.workspace .pill:is(.pending, .new, .contacted, .demo, .signed_up) {
  background: var(--workspace-pending-bg);
  color: var(--amber);
}

html.workspace .pill:is(.cancelled, .lost) {
  background: var(--panel2);
  color: var(--muted);
}

html.workspace .formMsg.err {
  color: var(--danger2);
  font-weight: 600;
}

html.workspace .linkBox {
  min-width: 0;
  max-width: 100%;
  padding: 12px;
  background: var(--panel2);
  border-radius: var(--radius);
}

html.workspace #customSlug {
  min-height: 44px;
  outline: none !important;
}

html.workspace .linkBox:focus-within {
  outline: 2px solid var(--workspace-focus);
  outline-offset: 3px;
}

html.workspace form.leadForm {
  gap: 12px;
}

html.workspace .leadForm textarea {
  min-height: 92px;
}

html.workspace .tableWrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

html.workspace th {
  background: var(--panel2);
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

html.workspace td {
  padding: 14px 12px;
  border-bottom-color: var(--border);
  overflow-wrap: anywhere;
}

html.workspace tbody tr:hover {
  background: var(--panel2);
}

html.workspace select.statusSel {
  min-height: 44px;
  font-size: 14px;
}

html.workspace .del {
  min-height: 44px;
  min-width: 44px;
  border-radius: var(--radius);
}

html.workspace .del:hover:not(:disabled):not([aria-disabled="true"]) {
  color: var(--danger2);
}

html.workspace .empty {
  padding: 18px 0;
}

html.workspace :is(#earnChart, #clickChart) {
  overflow-x: auto;
}

html.workspace :is(#earnChart, #clickChart) svg {
  min-width: 560px;
}

html.workspace :is(#earnChart, #clickChart) text {
  fill: var(--muted);
  font-family: var(--font-sans);
}

html.workspace #earnChart line {
  stroke: var(--border);
}

html.workspace #clickChart rect {
  fill: var(--workspace-focus);
}

html.workspace #earnChart rect:not([stroke]) {
  fill: var(--green);
}

html.workspace #earnChart rect[stroke] {
  fill: var(--workspace-pending-bg);
  stroke: var(--amber);
}

@media (max-width: 640px) {
  html.workspace .topbar {
    padding: 10px 16px;
    gap: 8px;
  }

  html.workspace .topbar .brand {
    flex-basis: 100%;
  }

  html.workspace .topbar .workspaceClassic {
    margin-left: 0;
  }

  html.workspace .wrap {
    padding: 24px 16px 48px;
  }

  html.workspace .card {
    padding: 18px;
    margin-bottom: 16px;
  }

  html.workspace .grid {
    gap: 10px;
  }

  html.workspace .stat {
    padding: 14px;
  }

  html.workspace .statValue {
    font-size: 24px;
  }

  html.workspace .who {
    flex-basis: 100%;
    margin-left: 0;
    overflow-wrap: anywhere;
  }

  html.workspace .subRow,
  html.workspace .leadForm .formFoot {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  html.workspace .linkRow > .linkBox {
    flex-basis: 100% !important;
  }

  html.workspace table {
    min-width: 560px;
  }

  html.workspace .avatarPicker {
    max-width: calc(100vw - 72px);
  }
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html.workspace {
    --portal-glass: rgba(35,39,48,.74);
    --portal-glass-heavy: rgba(28,32,40,.90);
    --portal-glass-border: rgba(196,212,241,.16);
    --portal-glass-sheen: linear-gradient(135deg,rgba(255,255,255,.095),transparent 44%,rgba(139,180,246,.035));
    --portal-glass-shadow: 0 10px 32px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.14);
  }
  html.workspace.light {
    --portal-glass: rgba(226,236,248,.60);
    --portal-glass-heavy: rgba(236,242,250,.90);
    --portal-glass-border: rgba(147,169,193,.42);
    --portal-glass-sheen: linear-gradient(135deg,rgba(255,255,255,.90),rgba(255,255,255,.24) 24%,rgba(208,225,247,.08) 52%,rgba(169,194,224,.26));
    --portal-glass-shadow: 0 14px 36px rgba(43,61,86,.09), 0 2px 6px rgba(43,61,86,.05), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(136,160,192,.24);
  }
  html.workspace :is(.card,.stat,.avatarPicker) {
    background-color: var(--portal-glass); background-image: var(--portal-glass-sheen); border-color: var(--portal-glass-border);
    -webkit-backdrop-filter: blur(20px) saturate(145%); backdrop-filter: blur(20px) saturate(145%); box-shadow: var(--portal-glass-shadow);
  }
  html.workspace .avatarPicker { background-color: var(--portal-glass-heavy); }
  html.workspace :is(.btn.ghost,.backLink,.workspaceClassic) { background-image: var(--portal-glass-sheen); border-color: var(--portal-glass-border); box-shadow: var(--portal-glass-shadow); }
}
html.workspace :is(.btn.ghost,.backLink,.workspaceClassic):hover:not(:disabled) { border-color: var(--brand-edge); }
html.workspace .avatarPickerTab.active { box-shadow: inset 0 -2px 0 var(--brand-red); }
@media (prefers-reduced-transparency: reduce) {
  html.workspace :is(.card,.stat,.avatarPicker,.btn.ghost,.backLink,.workspaceClassic) {
    background-color: var(--panel); background-image: none; border-color: var(--border);
    -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: var(--shadow);
  }
}
@media (forced-colors: active) {
  html.workspace :is(.card,.stat,.avatarPicker,.btn.ghost,.backLink,.workspaceClassic) {
    background-color: Canvas; background-image: none; border-color: ButtonText;
    -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.workspace,
  html.workspace *,
  html.workspace *::before,
  html.workspace *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  html.workspace :is(button, .btn, .backLink, .workspaceClassic, .avatarPicker, .themeToggle-thumb) {
    transform: none !important;
  }

  html.workspace.light .themeToggle-thumb {
    left: 21px;
  }
}
