@font-face {
  font-family: "Geist";
  src: url("/geist-fonts/Geist-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("/geist-fonts/Geist-Medium.ttf") format("truetype");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("/geist-fonts/Geist-Bold.ttf") format("truetype");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("/geist-fonts/Geist-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --app-bg-root: #030404;
  --app-bg-wash-start: #020303;
  --app-bg-wash-mid: #0d100f;
  --app-bg-wash-quarter: #050706;
  --app-bg-radial-center: rgba(63, 154, 110, 0.014);
  --app-bg-radial-soft: rgba(63, 154, 110, 0.002);
  --app-bg-side-glow-strong: rgba(63, 154, 110, 0.026);
  --app-bg-side-glow-soft: rgba(63, 154, 110, 0.007);
  --app-header-bg-rgb: 3, 4, 4;
  --app-card: rgba(11, 13, 12, 0.97);
  --app-card-radius: 24px;
  --app-card-shadow: 0 4px 7px rgba(26, 18, 11, 0.11);
  --app-green-gradient: linear-gradient(
    90deg,
    #3f9a6e 0%,
    #3da488 50%,
    #3caca2 100%
  );
  --app-green-gradient-diagonal: linear-gradient(
    135deg,
    #3f9a6e 0%,
    #3da488 50%,
    #3caca2 100%
  );
  --app-green-border: rgba(63, 154, 110, 0.55);
  --app-green-hover: rgba(63, 154, 110, 0.18);
  --app-card-top-bar: linear-gradient(
    90deg,
    rgba(63, 154, 110, 0) 0%,
    rgba(63, 154, 110, 0.024) 22%,
    rgba(61, 164, 136, 0.042) 50%,
    rgba(60, 172, 162, 0.024) 78%,
    rgba(60, 172, 162, 0) 100%
  );
  --app-card-glass-wash: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.0272) 0%,
    rgba(255, 255, 255, 0.00768) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  --app-card-background:
    var(--app-card-top-bar) no-repeat 22px 0 / calc(100% - 44px) 1.5px,
    var(--app-card-glass-wash), var(--app-card);
  --app-card-rim: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.1) 100%
  );
  --bg: var(--app-bg-root);
  --surface: var(--app-card);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: #2d2c36;
  --text: #e5e5e5;
  --text-muted: #888;
  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --green: #34c759;
  --orange: #ff9f0a;
  --red: #ff453a;
  --blue: #0a84ff;
  --pink: #ff375f;
  --radius: 12px;
}

body {
  font-family:
    "Geist",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background-color: var(--app-bg-root);
  background-image:
    radial-gradient(
      ellipse 62% 48% at 52% 38%,
      rgba(184, 192, 204, 0.026) 0%,
      rgba(184, 192, 204, 0.008) 42%,
      rgba(184, 192, 204, 0) 100%
    ),
    radial-gradient(
      ellipse 194px 132px at 50% 55%,
      var(--app-bg-radial-center) 0%,
      var(--app-bg-radial-soft) 34%,
      rgba(119, 145, 218, 0) 100%
    ),
    linear-gradient(
      90deg,
      var(--app-bg-side-glow-strong) 0%,
      var(--app-bg-side-glow-soft) 42%,
      rgba(119, 145, 218, 0) 100%
    ),
    linear-gradient(
      270deg,
      var(--app-bg-side-glow-strong) 0%,
      var(--app-bg-side-glow-soft) 42%,
      rgba(119, 145, 218, 0) 100%
    ),
    linear-gradient(
      90deg,
      rgba(16, 15, 20, 0.38) 0%,
      rgba(21, 20, 27, 0.15) 46%,
      rgba(21, 20, 27, 0) 100%
    ),
    linear-gradient(
      270deg,
      rgba(16, 15, 20, 0.38) 0%,
      rgba(21, 20, 27, 0.15) 46%,
      rgba(21, 20, 27, 0) 100%
    ),
    linear-gradient(
      135deg,
      var(--app-bg-wash-start) 0%,
      var(--app-bg-wash-quarter) 28%,
      var(--app-bg-wash-mid) 52%,
      var(--app-bg-wash-quarter) 76%,
      var(--app-bg-wash-start) 100%
    );
  background-position:
    center,
    center,
    left top,
    right top,
    left top,
    right top,
    center;
  background-repeat: no-repeat;
  background-size:
    100% 100%,
    388px 388px,
    228px 100%,
    228px 100%,
    clamp(96px, 28vw, 170px) 100%,
    clamp(96px, 28vw, 170px) 100%,
    100% 100%;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.dashboard-scroll-locked {
  overflow: hidden;
  touch-action: none;
}

body.admin-dashboard-page {
  --dashboard-sidebar-width: clamp(204px, 19vw, 248px);
  --dashboard-sidebar-expanded-width: clamp(204px, 19vw, 248px);
  --dashboard-sidebar-collapsed-width: 64px;
  padding-left: 0;
}

body.admin-dashboard-page.dashboard-menu-collapsed {
  --dashboard-sidebar-width: var(--dashboard-sidebar-collapsed-width);
}

body.admin-dashboard-page.dashboard-menu-dragging {
  cursor: ew-resize;
  user-select: none;
}

.dashboard-menu,
.dashboard-menu-scroll,
.table-scroll,
.notification-errors-table-wrap,
.attribution-table-expand-scroll,
.creator-top-time-controls {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dashboard-menu::-webkit-scrollbar,
.dashboard-menu-scroll::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar,
.notification-errors-table-wrap::-webkit-scrollbar,
.attribution-table-expand-scroll::-webkit-scrollbar,
.creator-top-time-controls::-webkit-scrollbar {
  display: none;
}

[hidden] {
  display: none !important;
}

header {
  position: sticky;
  top: 0;
  z-index: 11000;
  background: linear-gradient(
    180deg,
    rgba(var(--app-header-bg-rgb), 1) 0%,
    rgba(var(--app-header-bg-rgb), 1) 55%,
    rgba(var(--app-header-bg-rgb), 0.94) 76%,
    rgba(var(--app-header-bg-rgb), 0.42) 90%,
    rgba(var(--app-header-bg-rgb), 0) 100%
  );
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-menu-toggle {
  position: absolute;
  top: 14px;
  left: max(16px, calc((100vw - 1280px) / 2 - 52px));
  z-index: 11002;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(13, 13, 13, 0.94);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.dashboard-menu-toggle[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.dashboard-menu-toggle span {
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display: block;
}

.dashboard-menu-toggle:hover,
.dashboard-menu-toggle[aria-expanded="true"] {
  background: rgba(36, 36, 36, 0.98);
  border-color: rgba(167, 139, 250, 0.45);
  transform: translateY(-1px);
}

.dashboard-menu-toggle:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(13, 13, 13, 0.95),
    0 0 0 4px rgba(124, 92, 252, 0.75);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  height: 32px;
  width: auto;
  display: block;
}

header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dashboard-page-title {
  margin: 0;
}

.accent {
  background: var(--app-green-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

#admin-auth-btn,
#refresh-btn,
.dashboard-auth-btn,
.dashboard-refresh-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

#admin-auth-btn,
.dashboard-auth-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
}

#admin-auth-btn.is-authenticated,
.dashboard-auth-btn.is-authenticated {
  border-color: rgba(52, 199, 89, 0.35);
  color: var(--green);
}

#refresh-btn:hover,
.dashboard-refresh-btn:hover {
  background: var(--surface-hover);
}

#admin-auth-btn:hover,
.dashboard-auth-btn:hover {
  background: var(--surface-hover);
}

#refresh-btn,
.dashboard-refresh-btn {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

#admin-auth-status {
  max-width: min(420px, 48vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  display: none;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid transparent;
  background: transparent;
  color: #b8b8c2;
  border-radius: 12px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    color 0.15s,
    border-color 0.15s,
    transform 0.15s ease;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.nav-tab:focus-visible {
  box-shadow:
    0 0 0 2px rgba(13, 13, 13, 0.95),
    0 0 0 4px rgba(124, 92, 252, 0.75);
}

.nav-tab.is-active {
  background: var(--app-green-gradient-diagonal);
  color: #ffffff;
  border-color: var(--app-green-border);
  box-shadow:
    0 10px 24px rgba(63, 154, 110, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-tab.is-active:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.dashboard-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 11001;
  width: min(336px, calc(100vw - 44px));
  height: 100dvh;
  max-height: 100vh;
  padding: 78px 20px max(22px, env(safe-area-inset-bottom));
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 11, 0.98);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
  transform: translateX(-104%);
  visibility: hidden;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    visibility 0s linear 0.24s;
  box-shadow:
    0 0 0 rgba(0, 0, 0, 0),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-menu-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  flex-shrink: 0;
}

.dashboard-menu-brand-accent {
  color: #3da488;
}

.dashboard-menu-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.dashboard-menu-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 14px;
}

.dashboard-menu.is-open {
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
  box-shadow:
    24px 0 70px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dashboard-menu-open .header-inner,
body.dashboard-menu-open main {
  pointer-events: none;
}

.dashboard-menu-header {
  padding: 0 6px 14px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-menu-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.dashboard-menu-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(167, 139, 250, 0.45);
  transform: translateY(-1px);
}

.dashboard-menu-close:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(13, 13, 13, 0.95),
    0 0 0 4px rgba(124, 92, 252, 0.75);
}

.dashboard-menu-section {
  margin: 0 0 28px;
  padding: 0;
}

.dashboard-menu-section--plain {
  margin-top: 2px;
}

.dashboard-menu-section-title {
  padding: 0 6px 12px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.menu-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.01em;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.menu-tab-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: 0.74;
  filter: invert(100%) sepia(7%) saturate(174%) hue-rotate(52deg)
    brightness(95%) contrast(91%);
  transition:
    opacity 0.15s ease,
    filter 0.15s ease;
}

.menu-tab span {
  min-width: 0;
}

.menu-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transform: translateX(2px);
}

.menu-tab:hover .menu-tab-icon {
  opacity: 0.94;
}

.menu-tab.is-active {
  background: var(--app-green-gradient-diagonal);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(63, 154, 110, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.menu-tab.is-active .menu-tab-icon {
  opacity: 1;
  filter: brightness(0) invert(1);
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

body.admin-dashboard-page header {
  z-index: 100;
  margin-left: 0;
  width: 100%;
}

body.admin-dashboard-page .header-inner {
  max-width: none;
  width: calc(100% - var(--dashboard-sidebar-width));
  margin: 0 0 0 var(--dashboard-sidebar-width);
  padding: 18px clamp(18px, 2vw, 28px);
  transition:
    width 0.18s ease,
    margin-left 0.18s ease;
}

body.admin-dashboard-page header {
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

body.admin-dashboard-page main {
  max-width: none;
  width: calc(100% - var(--dashboard-sidebar-width));
  margin: 0 0 0 var(--dashboard-sidebar-width);
  padding: 24px clamp(18px, 2vw, 28px);
  transition:
    width 0.18s ease,
    margin-left 0.18s ease;
}

body.admin-dashboard-page .dashboard-menu {
  width: var(--dashboard-sidebar-width);
  padding: 24px 16px max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  transform: none;
  visibility: visible;
  transition:
    width 0.18s ease,
    padding 0.18s ease;
  box-shadow:
    1px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.admin-dashboard-page.dashboard-menu-dragging .header-inner,
body.admin-dashboard-page.dashboard-menu-dragging main,
body.admin-dashboard-page.dashboard-menu-dragging .dashboard-menu {
  transition: none;
}

body.admin-dashboard-page.dashboard-menu-collapsed .dashboard-menu {
  padding-inline: 8px;
  cursor: e-resize;
}

body.admin-dashboard-page .dashboard-menu-toggle,
body.admin-dashboard-page .dashboard-menu-close {
  display: none;
}

body.admin-dashboard-page .dashboard-menu-header {
  padding-bottom: 20px;
}

body.admin-dashboard-page.dashboard-menu-collapsed .dashboard-menu-brand {
  justify-content: center;
  padding-inline: 0;
}

body.admin-dashboard-page.dashboard-menu-collapsed .dashboard-menu-brand span,
body.admin-dashboard-page.dashboard-menu-collapsed .dashboard-menu-header,
body.admin-dashboard-page.dashboard-menu-collapsed
  .dashboard-menu-section-title {
  display: none;
}

body.admin-dashboard-page.dashboard-menu-collapsed .dashboard-menu-section {
  margin-bottom: 14px;
}

body.admin-dashboard-page.dashboard-menu-collapsed .menu-tab {
  justify-content: center;
  gap: 0;
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
}

body.admin-dashboard-page.dashboard-menu-collapsed .menu-tab span {
  width: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
}

body.admin-dashboard-page.dashboard-menu-collapsed .menu-tab-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

body.admin-dashboard-page.dashboard-menu-collapsed .menu-tab:hover {
  transform: none;
}

body.admin-dashboard-page.dashboard-menu-collapsed .dashboard-menu-scroll {
  padding-bottom: 0;
}

body.admin-dashboard-page.dashboard-menu-collapsed
  .dashboard-menu-admin-profile {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding: 14px 0 0;
}

body.admin-dashboard-page.dashboard-menu-collapsed
  .dashboard-menu-admin-person {
  justify-content: center;
  gap: 0;
}

body.admin-dashboard-page.dashboard-menu-collapsed .dashboard-menu-admin-photo {
  width: 34px;
  height: 34px;
}

body.admin-dashboard-page.dashboard-menu-collapsed .dashboard-menu-admin-copy,
body.admin-dashboard-page.dashboard-menu-collapsed
  .dashboard-menu-admin-signout {
  display: none;
}

.dashboard-menu-edge {
  position: absolute;
  top: 0;
  right: -11px;
  z-index: 2;
  width: 18px;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: ew-resize;
}

.dashboard-menu-edge::after {
  content: "";
  position: absolute;
  inset: 0 7px 0 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0;
  transition:
    opacity 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.dashboard-menu:hover .dashboard-menu-edge::after,
.dashboard-menu-edge:focus-visible::after {
  opacity: 0.8;
}

.dashboard-menu-edge:hover::after,
.dashboard-menu-edge:focus-visible::after,
body.admin-dashboard-page.dashboard-menu-dragging .dashboard-menu-edge::after {
  background: rgba(61, 164, 136, 0.86);
  box-shadow: 0 0 24px rgba(61, 164, 136, 0.5);
  opacity: 1;
}

body.admin-dashboard-page .dashboard-menu-section {
  margin-bottom: 24px;
}

.dashboard-menu-admin-profile {
  flex-shrink: 0;
  margin-top: 14px;
  padding: 14px 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-menu-admin-person {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.dashboard-menu-admin-photo {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  object-fit: cover;
  flex-shrink: 0;
}

.dashboard-menu-admin-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-menu-admin-copy span {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-menu-admin-copy small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-menu-admin-signout {
  width: 100%;
  min-height: 36px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.dashboard-menu-admin-signout:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(63, 154, 110, 0.38);
  color: #ffffff;
}

.dashboard-tab {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.dashboard-tab[hidden] {
  display: none !important;
}

.attribution-page-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: capitalize;
}

/* Summary Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cards--compact {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.cards--compact .card {
  padding: 12px 14px;
  gap: 4px;
}

.cards--compact .card-label {
  font-size: 11px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cards--compact .card-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.attribution-summary-layout {
  --attribution-summary-card-height: 130px;
  --attribution-summary-gap: 20px;
  --attribution-summary-height: calc(
    var(--attribution-summary-card-height) * 3 +
      var(--attribution-summary-gap) * 2
  );
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: var(--attribution-summary-gap);
  align-items: start;
}

.cards.cards--attribution-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, var(--attribution-summary-card-height));
  gap: var(--attribution-summary-gap);
}

.cards--attribution-summary .card {
  justify-content: center;
  gap: 12px;
  min-width: 0;
  padding: 20px 22px;
}

.cards--attribution-summary .card-label {
  line-height: 1.25;
}

.cards--attribution-summary .card-value {
  line-height: 1;
}

.attribution-summary-charts {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--attribution-summary-gap);
  height: var(--attribution-summary-height);
}

.chart-card--summary-chart {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px;
}

.chart-card--summary-chart h2 {
  margin-bottom: 12px;
}

.summary-inline-chart-frame {
  flex: 1;
  min-height: 0;
  position: relative;
}

.chart-card.chart-card--summary-chart canvas {
  height: 100% !important;
  max-height: none;
}

.screen-load-progress {
  align-self: stretch;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto 18px;
  padding: 14px 18px;
  min-width: 0;
  border: 1px solid rgba(124, 92, 252, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(124, 92, 252, 0.13), rgba(10, 132, 255, 0.06)),
    var(--surface);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.24),
    0 0 28px rgba(124, 92, 252, 0.22),
    0 0 46px rgba(10, 132, 255, 0.1);
}

.screen-load-progress[hidden] {
  display: none;
}

.screen-load-track {
  display: block;
  width: 100%;
  min-width: 0;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 12px rgba(124, 92, 252, 0.24),
    0 0 22px rgba(124, 92, 252, 0.24);
}

.screen-load-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue), var(--green));
  box-shadow:
    0 0 18px rgba(124, 92, 252, 0.62),
    0 0 30px rgba(10, 132, 255, 0.34),
    0 0 42px rgba(52, 199, 89, 0.18);
  transition: width 0.16s ease-out;
}

.onboarding-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 8px;
}

.onboarding-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--accent));
}

.onboarding-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 220px);
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.onboarding-breakdown-row:last-child {
  border-bottom: 0;
}

.onboarding-breakdown-row strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.onboarding-breakdown-row span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.onboarding-breakdown-meter {
  display: grid;
  grid-template-columns: minmax(60px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.onboarding-debug-panel {
  margin-top: 12px;
  border-color: rgba(124, 92, 252, 0.28);
  background: rgba(124, 92, 252, 0.08);
}

.onboarding-debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.onboarding-debug-panel pre {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
}

.card-subtitle {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-rate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.offer-rate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.offer-rate-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
}

.offer-rate-card--control {
  border-color: rgba(10, 132, 255, 0.5);
}

.offer-rate-card--control::before {
  background: radial-gradient(circle at top right, #0a84ff, transparent 55%);
}

.offer-rate-card--treatment {
  border-color: rgba(52, 199, 89, 0.5);
}

.offer-rate-card--treatment::before {
  background: radial-gradient(circle at top right, #34c759, transparent 55%);
}

.offer-rate-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.offer-rate-note {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

.offer-rate-conversions {
  min-width: 112px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: right;
}

.offer-rate-conversions span {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.offer-rate-conversions small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.offer-rate-value {
  position: relative;
  z-index: 1;
  font-size: clamp(48px, 8vw, 78px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.offer-rate-track {
  position: relative;
  z-index: 1;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.offer-rate-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.25s ease;
}

.offer-rate-card--control .offer-rate-fill {
  background: var(--blue);
}

.offer-rate-card--treatment .offer-rate-fill {
  background: var(--green);
}

.offer-snapshot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.offer-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.offer-snapshot-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.offer-metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  min-width: 0;
}

.offer-metric-row strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
  min-width: 0;
}

.offer-snapshot-panel--config .offer-metric-row {
  align-items: flex-start;
}

.offer-snapshot-panel--config .offer-metric-row strong {
  max-width: 68%;
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.offer-metric-row small {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.offer-mini-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.offer-mini-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.25s ease;
}

.offer-mini-fill--control {
  background: var(--blue);
}

.offer-mini-fill--treatment {
  background: var(--green);
}

.offer-snapshot-large {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.offer-snapshot-note {
  color: var(--text-muted);
  font-size: 12px;
}

.offer-decision-card .subtitle {
  margin-top: 6px;
  max-width: 900px;
}

.offer-decision-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.offer-decision-stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
}

.offer-decision-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.offer-decision-stat .card-label {
  font-size: 10px;
  line-height: 1.25;
}

.offer-decision-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-top: 8px;
}

.offer-decision-delta,
.metric-delta {
  color: var(--text-muted);
}

.offer-decision-delta {
  font-size: 12px;
  margin-top: 6px;
}

.offer-decision-value.is-positive,
.offer-decision-delta.is-positive,
.metric-delta.is-positive {
  color: var(--green);
}

.offer-decision-value.is-negative,
.offer-decision-delta.is-negative,
.metric-delta.is-negative {
  color: var(--red);
}

.metric-delta {
  font-weight: 700;
}

.secondary-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  white-space: nowrap;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.notification-section-title {
  font-size: 28px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--text) !important;
}

.notification-section-header {
  align-items: flex-end;
}

.notification-title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.notification-status {
  font-size: 13px;
  color: var(--text-muted);
  min-height: 18px;
}

.notification-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-left: auto;
}

.notification-window-field select {
  height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  min-width: 170px;
}

.notification-window-field input.table-search {
  height: 44px;
  min-width: 210px;
}

.creator-top-time-controls {
  position: sticky;
  top: 82px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(14, 14, 18, 0.92);
  backdrop-filter: blur(16px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.creator-segmented-control {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.creator-segmented-control--scale {
  margin-left: auto;
}

.creator-segment {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.creator-segment:first-child {
  border-left: 0;
}

.creator-segment:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.creator-segment.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.creator-dashboard-page .creator-segment:hover:not(:disabled) {
  background: var(--app-green-hover);
  color: #ffffff;
}

.creator-dashboard-page .creator-segment.is-active {
  background: var(--app-green-gradient-diagonal);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(63, 154, 110, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.creator-segment:disabled,
.creator-custom-range-fields input:disabled,
.creator-custom-range-fields button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.creator-dashboard-page .creator-segment.is-active:disabled {
  opacity: 0.9;
}

.creator-custom-range-fields {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.creator-custom-range-fields[hidden] {
  display: none;
}

.creator-custom-range-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.creator-custom-range-fields input,
.creator-custom-range-fields button {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
}

.creator-custom-range-fields input {
  padding: 0 10px;
}

.creator-custom-range-fields button {
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
}

.creator-custom-range-fields button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

#creator-metrics-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface-hover);
}

.icon-btn--lg {
  width: 44px;
  height: 44px;
  font-size: 20px;
  border-radius: 10px;
}

/* Charts */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.charts-grid--stacked {
  grid-template-columns: 1fr;
}

.charts-grid--stacked .chart-card canvas {
  max-height: 320px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.chart-card h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.chart-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  margin: -6px 0 16px;
}

.chart-wrap--feature-retention {
  height: 280px;
  margin: 14px 0 16px;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-card-header h2 {
  margin-bottom: 0;
}

.chart-card-status {
  font-size: 13px;
  color: var(--text-muted);
}

.chart-card-status--ok {
  color: #34c759;
}

.chart-card-status--warn {
  color: #ff9f0a;
}

.chart-card--full {
  width: 100%;
}

.chart-card--full canvas {
  max-height: 320px;
}

.traffic-source-chart-frame {
  position: relative;
  width: min(100%, 760px);
  height: 320px;
  margin: 0 auto;
}

.onboarding-dropoff-chart-card {
  overflow: hidden;
}

.onboarding-dropoff-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.onboarding-dropoff-header-actions .creator-form-field {
  margin: 0;
  min-width: 170px;
}

.onboarding-dropoff-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: -4px 0 10px;
  color: var(--text-muted);
  font-size: 11px;
}

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

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot--main {
  background: #a78bfa;
}

.legend-dot--conditional {
  background: #64d2ff;
}

.legend-dot--nutrition {
  background: #6fdd87;
}

.onboarding-dropoff-chart-frame {
  height: 370px;
  min-width: 0;
}

.onboarding-dropoff-chart-frame canvas {
  display: block;
  max-height: none;
}

.notification-iteration-health-card {
  margin-top: 16px;
}

.sub-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.sub-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(124, 92, 252, 0.06);
  border-radius: 6px;
  font-size: 13px;
}

.sub-breakdown-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text);
  word-break: break-all;
  margin-right: 12px;
}

.sub-breakdown-value {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.sub-breakdown-row--bar {
  position: relative;
  background: rgba(124, 92, 252, 0.06);
  overflow: hidden;
}

.sub-breakdown-list--striped .sub-breakdown-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.sub-breakdown-list--striped
  .sub-breakdown-row:nth-child(even)
  .sub-breakdown-bar-fill {
  opacity: 0.78;
}

.sub-breakdown-bar-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(
    90deg,
    rgba(124, 92, 252, 0.32),
    rgba(124, 92, 252, 0.18)
  );
  border-radius: 6px;
  transition: width 0.3s ease;
  z-index: 0;
}

.sub-breakdown-row--bar .sub-breakdown-label,
.sub-breakdown-row--bar .sub-breakdown-value {
  position: relative;
  z-index: 1;
}

.sub-breakdown-value-percent {
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
}

.sub-breakdown-value-count {
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sub-empty-row {
  padding: 12px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.feature-use-breakdown-card .sub-breakdown-list {
  max-height: 680px;
}

.col-reason--warn {
  color: #d8385e;
}

.notification-errors-card {
  margin-top: 16px;
}

.notification-errors-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.notification-errors-header h2 {
  margin: 0;
}

.notification-errors-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.notification-errors-count {
  font-size: 12px;
  color: var(--text-muted);
}

.notification-errors-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.notification-errors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.notification-errors-table thead {
  background: rgba(255, 255, 255, 0.02);
}

.notification-errors-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.notification-errors-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  color: var(--text);
}

.notification-errors-table tbody tr:last-child td {
  border-bottom: none;
}

.notification-errors-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.notification-errors-table .col-time {
  width: 110px;
  white-space: nowrap;
}

.notification-errors-table .col-reason {
  word-break: break-word;
}

.notification-errors-table .col-user {
  width: 160px;
}

.notification-errors-table .col-job {
  width: 180px;
}

.error-time-absolute {
  display: block;
  font-weight: 500;
}

.error-time-relative {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.error-kind-tag {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(124, 92, 252, 0.18);
  color: var(--accent-light);
  border-radius: 4px;
}

.copyable-cell {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.copyable-cell:hover {
  color: var(--text);
}

.copyable-cell--copied {
  color: var(--green);
}

.notification-errors-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.ai-inquiry-list {
  display: flex;
  flex-direction: column;
  max-height: 520px;
  overflow-y: auto;
}

.ai-inquiry-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.ai-inquiry-row:last-child {
  border-bottom: none;
}

.ai-inquiry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.ai-inquiry-time {
  color: var(--text);
  font-weight: 500;
}

.ai-inquiry-status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.ai-inquiry-status--success {
  background: rgba(52, 199, 89, 0.15);
  color: #6fdd87;
}

.ai-inquiry-status--warn {
  background: rgba(255, 159, 10, 0.15);
  color: #ffb547;
}

.ai-inquiry-status--error {
  background: rgba(255, 69, 58, 0.15);
  color: #ff7a72;
}

.ai-inquiry-status--neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.ai-inquiry-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.ai-inquiry-feedback {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 7px;
}

.ai-inquiry-feedback--helpful {
  background: rgba(52, 199, 89, 0.15);
  color: #6fdd87;
}

.ai-inquiry-feedback--unhelpful {
  background: rgba(255, 69, 58, 0.15);
  color: #ff7a72;
}

.ai-inquiry-user {
  margin-left: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.ai-inquiry-toggle {
  margin-left: auto;
  background: rgba(124, 92, 252, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ai-inquiry-toggle:hover {
  background: rgba(124, 92, 252, 0.28);
}

.ai-inquiry-preview {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-inquiry-expanded {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.ai-inquiry-block-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ai-inquiry-classifier {
  font-size: 12px;
  color: var(--accent-light);
  margin-bottom: 6px;
}

.ai-inquiry-block-body {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 360px;
  overflow-y: auto;
}

.chart-card canvas {
  display: block;
  width: 100% !important;
  height: 280px !important;
  max-height: 280px;
}

#chart-by-code {
  height: 280px !important;
}

.chart-card .traffic-source-chart-frame canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: none;
}

.chart-card .onboarding-dropoff-chart-frame canvas {
  height: 370px !important;
  max-height: none;
}

/* Tables */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.table-card h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.paid-ad-spend-form {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(130px, 1fr)) minmax(180px, 1.5fr)
    auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0 10px;
}

.paid-ad-spend-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.paid-ad-spend-form input,
.paid-ad-spend-form select {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
}

.paid-ad-spend-form button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.paid-ad-spend-form button:hover:not(:disabled) {
  background: var(--surface-hover);
}

.paid-ad-spend-form button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.paid-ad-spend-notes {
  min-width: 0;
}

.paid-ad-spend-delete {
  border-color: rgba(255, 69, 58, 0.25);
  color: #ff9b90;
}

.offer-projects-card {
  padding: 0;
  overflow: hidden;
}

.offer-projects-summary {
  width: 100%;
  min-height: 56px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  list-style: none;
}

.offer-projects-summary::-webkit-details-marker {
  display: none;
}

.offer-projects-summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.offer-projects-card[open] .offer-projects-summary {
  border-bottom: 1px solid var(--border);
}

.offer-projects-card[open] .offer-projects-summary::after {
  content: "-";
}

.offer-projects-summary-hint {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.offer-projects-content {
  padding: 20px;
}

.offer-projects-content .notification-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 10px;
}

.offer-project-action-btn {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.offer-project-action-btn:hover {
  background: var(--surface-hover);
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--surface-hover);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-active {
  background: rgba(52, 199, 89, 0.15);
  color: var(--green);
}

.badge-other {
  background: rgba(136, 136, 136, 0.15);
  color: var(--text-muted);
}

.code-cell {
  font-family: "SF Mono", SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  color: var(--accent-light);
}

.uid-cell {
  font-family: "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text-muted);
}

/* Section headers */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-header-row h2 {
  margin-bottom: 0;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.subtitle {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
}

.stat-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 159, 10, 0.15);
  color: var(--orange);
}

.table-search {
  min-width: 240px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.table-search::placeholder {
  color: var(--text-muted);
}

.table-search:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.notice-banner {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(10, 132, 255, 0.25);
  background: rgba(10, 132, 255, 0.08);
  color: #b7d6ff;
  font-size: 13px;
}

.notice-banner.notice-warning {
  border-color: rgba(255, 159, 10, 0.25);
  background: rgba(255, 159, 10, 0.08);
  color: #ffd9a3;
}

.creator-form {
  margin-top: 16px;
  margin-bottom: 16px;
}

.creator-form fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.creator-form fieldset[disabled] {
  opacity: 0.65;
}

.creator-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.creator-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.creator-form-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.creator-form-field input,
.creator-form-field textarea,
.creator-form-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.creator-form-field input:-webkit-autofill,
.creator-form-field input:-webkit-autofill:hover,
.creator-form-field input:-webkit-autofill:focus {
  border-color: var(--border);
  box-shadow: 0 0 0 1000px #191919 inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

.creator-form-field textarea {
  resize: vertical;
  min-height: 92px;
}

.creator-form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.creator-form-field input:focus,
.creator-form-field textarea:focus,
.creator-form-field select:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.creator-form-field input[readonly] {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: not-allowed;
}

.creator-form-field-wide {
  grid-column: 1 / -1;
}

.creator-profile-admin-form {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(124, 92, 252, 0.22);
  border-radius: var(--radius);
  background: rgba(124, 92, 252, 0.06);
}

.creator-profile-admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.creator-profile-admin-heading h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.creator-referral-code-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.creator-referral-code-search-row input {
  flex: 1;
}

.creator-code-suggestions {
  border: 1px solid rgba(124, 92, 252, 0.22);
  border-radius: 12px;
  background: rgba(124, 92, 252, 0.08);
  padding: 12px;
}

.creator-code-suggestion-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.creator-code-suggestion-header small,
.creator-code-suggestion-note {
  color: var(--text-muted);
  font-size: 12px;
}

.creator-code-suggestion-note.is-error {
  color: #ff9b90;
}

.creator-code-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.creator-code-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
}

.creator-code-suggestion:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 252, 0.14);
}

.creator-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.creator-form-actions button {
  position: relative;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    min-width 0.18s ease,
    transform 0.18s ease;
}

.creator-form-actions button:hover {
  background: var(--surface-hover);
}

.creator-form-actions button.is-save-complete {
  min-width: 44px;
  border-color: rgba(52, 199, 89, 0.58);
  background: rgba(52, 199, 89, 0.18);
  color: var(--green);
  font-size: 20px;
  line-height: 1;
  animation: creator-save-check-pop 0.42s cubic-bezier(0.2, 1.35, 0.34, 1);
}

.creator-form-actions .button-danger {
  border-color: rgba(255, 69, 58, 0.25);
  color: #ff9b90;
}

.creator-form-status {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.creator-form-status.is-error {
  color: #ff9b90;
}

.creator-form-status.is-success {
  color: var(--green);
}

.creator-form-status.is-prominent {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(52, 199, 89, 0.24);
  border-radius: 12px;
  background: rgba(52, 199, 89, 0.1);
  color: var(--green);
  font-size: 18px;
  font-weight: 800;
}

@keyframes creator-save-check-pop {
  0% {
    transform: scale(0.84);
  }
  58% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

.action-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.action-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.status-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

a.action-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 26px;
}

.section-toggle-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.lifetime-access-form {
  margin-top: 16px;
  margin-bottom: 16px;
}

.lifetime-access-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.lifetime-access-form fieldset[disabled] {
  opacity: 0.6;
}

.signin-wall {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 32px 20px;
}

.signin-wall[hidden],
#dashboard-content[hidden],
#creator-metrics-content[hidden] {
  display: none !important;
}

.signin-card {
  width: 100%;
  max-width: 440px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.signin-card h2 {
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 600;
}

.signin-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.signin-card button {
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.signin-card button:hover:not(:disabled) {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.dashboard-auth-btn:hover,
.dashboard-refresh-btn:hover,
.secondary-btn:hover,
.creator-form-actions button:hover,
.creator-code-suggestion:hover {
  background: var(--app-green-hover);
  border-color: var(--app-green-border);
}

.signin-card button,
.creator-tracking-form button[type="submit"] {
  border-color: var(--app-green-border);
  background: var(--app-green-gradient-diagonal);
  color: #ffffff;
}

.signin-card button:hover:not(:disabled),
.creator-tracking-form button[type="submit"]:hover:not(:disabled) {
  border-color: rgba(60, 172, 162, 0.72);
  background: linear-gradient(135deg, #48a979 0%, #45b596 50%, #43bbb0 100%);
}

.signin-card button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.signin-wall-status {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 13px;
  color: var(--red);
}

.signin-wall-status.is-info {
  color: var(--text-muted);
}

.signin-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.creator-tracking-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  text-align: left;
}

.creator-tracking-form[hidden] {
  display: none !important;
}

.creator-tracking-copy {
  text-align: left;
}

.creator-tracking-copy h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text);
}

.creator-tracking-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.creator-tracking-form small {
  color: var(--text-muted);
  font-size: 11px;
}

.creator-tracking-form button[type="submit"] {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(124, 92, 252, 0.55);
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lifetime-access-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.lifetime-access-field {
  flex: 1 1 280px;
  min-width: 220px;
}

.lifetime-access-row button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.lifetime-access-row button:hover:not(:disabled) {
  background: var(--surface-hover);
}

.lifetime-access-row button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.lifetime-history-header {
  margin-top: 20px;
}

.creator-feedback-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.creator-feedback-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.creator-feedback-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.creator-feedback-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.creator-feedback-title {
  font-weight: 600;
  color: var(--text);
}

.creator-feedback-subtext {
  font-size: 12px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.creator-feedback-message {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
}

.user-feedback-status-filter {
  min-width: 140px;
  cursor: pointer;
}

.creator-feedback-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.creator-feedback-card.is-addressed {
  border-color: rgba(52, 199, 89, 0.35);
  background: rgba(52, 199, 89, 0.05);
}

.action-button.user-feedback-done-btn.is-done {
  border-color: rgba(52, 199, 89, 0.45);
  background: rgba(52, 199, 89, 0.15);
  color: var(--green);
}

.action-button.user-feedback-done-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 600;
  color: var(--text);
}

.user-subtext {
  font-size: 12px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.badge-yes {
  background: rgba(52, 199, 89, 0.15);
  color: var(--green);
}

.badge-no {
  background: rgba(255, 69, 58, 0.12);
  color: #ff9b90;
}

/* Variant tags */
.variant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.variant-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.variant-tag .variant-count {
  font-weight: 700;
  color: var(--orange);
}

.variant-tag.is-canonical {
  background: rgba(124, 92, 252, 0.15);
  color: var(--accent-light);
}

.variant-tag.is-canonical .variant-count {
  color: var(--accent-light);
}

.creator-profile-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.creator-approval-progress-banner {
  padding: clamp(22px, 4vw, 36px);
  border-radius: var(--app-card-radius);
  background:
    linear-gradient(135deg, rgba(255, 159, 10, 0.2), rgba(63, 154, 110, 0.12)),
    var(--surface);
  color: #fff4d6;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-align: center;
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.28),
    0 0 34px rgba(255, 159, 10, 0.16);
}

.creator-code-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.creator-approval-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.creator-portal-access-form {
  margin: 16px 0;
}

.creator-portal-access-lookup {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.creator-portal-access-lookup .creator-form-field {
  flex: 1 1 520px;
  max-width: 760px;
}

.creator-portal-access-lookup .creator-form-field input {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text);
}

.creator-portal-access-lookup-button {
  min-height: 42px;
  min-width: 168px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.creator-portal-access-lookup-button:hover {
  background: var(--surface-hover);
}

.creator-access-grid {
  align-items: end;
  column-gap: 12px;
  margin-top: 18px;
  row-gap: 18px;
}

.creator-access-primary-action {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  grid-column: 2 / -1;
}

.creator-access-action-button {
  min-height: 42px;
  min-width: 220px;
  padding: 0 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.creator-access-action-button-wide {
  min-width: 280px;
}

.creator-access-clear-button {
  min-width: 120px;
  padding: 0 18px;
  font-weight: 700;
}

.creator-access-grid-spacer,
.creator-access-primary-spacer {
  display: none;
}

.creator-access-action-button:hover {
  background: var(--surface-hover);
}

.creator-access-action-button.is-danger {
  border-color: rgba(255, 69, 58, 0.25);
  color: #ff9b90;
}

.creator-access-action-button.is-danger:hover:not(:disabled) {
  background: rgba(255, 69, 58, 0.1);
}

.creator-access-history-action {
  border-radius: 10px;
}

.button-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--text);
  border-radius: 999px;
  animation: creator-button-spin 0.8s linear infinite;
}

.creator-portal-access-lookup-button,
.creator-access-action-button {
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.creator-portal-access-lookup-button.is-loading,
.creator-access-action-button.is-loading {
  display: inline-flex;
  cursor: progress;
}

.creator-portal-access-lookup-button:not(.is-loading),
.creator-access-action-button:not(.is-loading) {
  display: inline-flex;
}

.creator-portal-access-lookup-button.is-loading .button-spinner,
.creator-access-action-button.is-loading .button-spinner {
  display: inline-block;
}

@keyframes creator-button-spin {
  to {
    transform: rotate(360deg);
  }
}

.creator-portal-access-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.creator-approval-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card,
.chart-card,
.table-card,
.offer-rate-card,
.offer-snapshot-card,
.signin-card,
.creator-feedback-card,
.creator-approval-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--app-card-background);
  border: 0;
  border-color: transparent;
  border-radius: var(--app-card-radius);
  box-shadow: var(--app-card-shadow);
}

.card::after,
.chart-card::after,
.table-card::after,
.offer-rate-card::after,
.offer-snapshot-card::after,
.signin-card::after,
.creator-feedback-card::after,
.creator-approval-card::after {
  content: "";
  position: absolute;
  inset: 0.75px;
  z-index: 2;
  pointer-events: none;
  border: 1px solid transparent;
  border-radius: var(--app-card-radius);
  background: var(--app-card-rim) border-box;
  -webkit-mask:
    linear-gradient(#ffffff 0 0) padding-box,
    linear-gradient(#ffffff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#ffffff 0 0) padding-box,
    linear-gradient(#ffffff 0 0);
  mask-composite: exclude;
}

.creator-autofill-panel {
  border: 1px solid rgba(124, 92, 252, 0.22);
  border-radius: 12px;
  background: rgba(124, 92, 252, 0.08);
  padding: 12px;
}

.creator-autofill-panel.is-warning {
  border-color: rgba(255, 159, 10, 0.25);
  background: rgba(255, 159, 10, 0.08);
}

.creator-autofill-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.creator-autofill-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent-light);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  white-space: nowrap;
}

.creator-autofill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.creator-autofill-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.creator-autofill-value,
.creator-autofill-note,
.creator-autofill-notes {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.creator-autofill-note,
.creator-autofill-notes p {
  margin: 8px 0 0;
}

.creator-autofill-muted {
  color: var(--text-muted);
  font-size: 12px;
}

.creator-approval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.mistype-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
}

/* User attribution — full table overlay */
.attribution-table-expand-overlay[hidden] {
  display: none !important;
}

.attribution-table-expand-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 24px);
  box-sizing: border-box;
  overflow: hidden;
  overscroll-behavior: contain;
}

.attribution-table-expand-backdrop {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.attribution-table-expand-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.attribution-table-expand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.attribution-table-expand-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
}

.attribution-table-expand-close {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.attribution-table-expand-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.attribution-table-expand-scroll {
  flex: 1;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.attribution-table-expand-trigger {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.attribution-table-expand-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
}

#attribution-expand-table {
  width: 100%;
  border-collapse: collapse;
}

#attribution-expand-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
  header {
    position: sticky;
  }
  .dashboard-menu-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
  }
  .header-inner {
    padding-left: 62px;
  }
  .cards:not(.cards--compact) {
    grid-template-columns: repeat(2, 1fr);
  }
  .attribution-summary-layout {
    grid-template-columns: 1fr;
  }
  .cards.cards--attribution-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .attribution-summary-charts {
    height: 320px;
  }
  .cards--compact {
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .paid-ad-spend-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .offer-rate-grid,
  .offer-decision-hero {
    grid-template-columns: 1fr;
  }
  .header-inner {
    align-items: flex-start;
    gap: 12px;
  }
  .header-meta {
    flex-shrink: 0;
  }
  .header-nav {
    padding: 0 24px 16px;
  }
}

@media (max-width: 520px) {
  body {
    min-width: 0;
  }
  .cards:not(.cards--compact) {
    grid-template-columns: 1fr;
  }
  .cards.cards--attribution-summary {
    grid-template-columns: 1fr;
  }
  .attribution-summary-charts {
    height: auto;
    grid-template-rows: none;
  }
  .chart-card--summary-chart {
    height: 252px;
  }
  .cards--compact {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  }
  .paid-ad-spend-form {
    grid-template-columns: 1fr;
  }
  main {
    padding: 12px max(12px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    gap: 16px;
  }
  .header-inner {
    padding: max(12px, env(safe-area-inset-top)) 16px 12px 62px;
    flex-direction: column;
    align-items: stretch;
  }
  .header-nav {
    padding: 0 16px 12px;
    gap: 8px;
  }
  header h1 {
    font-size: 22px;
    line-height: 1.25;
  }
  .header-meta {
    justify-content: space-between;
    width: 100%;
  }
  #admin-auth-status,
  #creator-auth-status {
    max-width: 100%;
    white-space: normal;
  }
  .dashboard-menu {
    width: min(88vw, 340px);
    padding-top: max(72px, calc(env(safe-area-inset-top) + 64px));
  }
  .dashboard-menu-close,
  .dashboard-menu-toggle,
  #admin-auth-btn,
  #refresh-btn,
  .dashboard-auth-btn,
  .dashboard-refresh-btn,
  .secondary-btn,
  .action-button,
  .attribution-table-expand-trigger,
  .offer-project-action-btn,
  .creator-form-actions button {
    min-height: 44px;
  }
  .creator-top-time-controls {
    top: 0;
    margin-inline: -12px;
    padding: 8px 12px;
    border-inline: 0;
    border-radius: 0;
  }
  .creator-custom-range-fields {
    align-items: stretch;
  }
  .creator-custom-range-fields input,
  .creator-custom-range-fields button {
    min-height: 44px;
  }
  .screen-load-progress {
    margin-inline: 0;
  }
  .screen-load-progress-header,
  .notification-controls,
  .notification-errors-header,
  .offer-rate-header,
  .offer-metric-row {
    align-items: stretch;
    flex-direction: column;
  }
  .notification-controls,
  .notification-window-field,
  .notification-window-field select,
  .notification-window-field input.table-search {
    width: 100%;
    min-width: 0;
  }
  .card,
  .chart-card,
  .table-card {
    padding: 16px;
    border-radius: var(--app-card-radius);
  }
  .card-value {
    font-size: 28px;
  }
  .chart-card h2,
  .table-card h2 {
    font-size: 14px;
    line-height: 1.35;
  }
  .chart-card canvas {
    height: 220px !important;
    max-height: 220px;
  }
  #chart-by-code {
    height: 220px !important;
  }
  .traffic-source-chart-frame {
    height: 260px;
  }
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .creator-form-grid {
    grid-template-columns: 1fr;
  }

  .creator-referral-code-search-row {
    align-items: stretch;
    flex-direction: column;
  }
  .nav-tab {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }
  .table-actions,
  .table-search {
    width: 100%;
    min-width: 0;
  }
  .table-scroll {
    overflow-x: visible;
  }
  .notification-errors-table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }
  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody {
    display: grid;
    gap: 10px;
  }
  tbody tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px 0;
    background: rgba(255, 255, 255, 0.02);
  }
  tbody tr:last-child td {
    border-bottom: 1px solid var(--border);
  }
  tbody tr:last-child td:last-child {
    border-bottom: none;
  }
  tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: right;
  }
  tbody td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
  }
  tbody td:not([data-label]) {
    display: block;
    text-align: left;
  }
  tbody td:not([data-label])::before {
    content: none;
  }
  .notification-errors-table {
    min-width: 640px;
  }
  .notification-errors-table,
  .notification-errors-table thead,
  .notification-errors-table tbody,
  .notification-errors-table tr,
  .notification-errors-table th,
  .notification-errors-table td {
    width: auto;
  }
  .notification-errors-table {
    display: table;
  }
  .notification-errors-table thead {
    display: table-header-group;
  }
  .notification-errors-table tbody {
    display: table-row-group;
  }
  .notification-errors-table tr {
    display: table-row;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }
  .notification-errors-table th,
  .notification-errors-table td {
    display: table-cell;
    text-align: left;
  }
  .notification-errors-table td::before {
    content: none;
  }
  .attribution-table-expand-overlay {
    align-items: stretch;
    padding: max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }
  .attribution-table-expand-panel {
    width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 12px;
  }
  .attribution-table-expand-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }
  .attribution-table-expand-close {
    width: 100%;
    min-height: 44px;
  }
  .variant-list {
    justify-content: flex-end;
    gap: 4px;
  }
  .uid-cell,
  .code-cell {
    overflow-wrap: anywhere;
  }
  .variant-list {
    gap: 4px;
  }
  .variant-tag {
    font-size: 10px;
    padding: 2px 6px;
  }

  /* Keep expand dialog as a readable table — avoid stacked-card table rules below */
  #attribution-expand-table {
    display: table !important;
    width: 100%;
  }

  #attribution-expand-table thead {
    display: table-header-group !important;
  }

  #attribution-expand-table tbody {
    display: table-row-group !important;
    gap: 0;
  }

  #attribution-expand-table thead tr,
  #attribution-expand-table tbody tr {
    display: table-row !important;
    padding: 0;
    border: none !important;
    background: transparent;
    border-radius: 0 !important;
  }

  #attribution-expand-table th,
  #attribution-expand-table td {
    display: table-cell !important;
    text-align: inherit;
    justify-content: initial !important;
    width: auto;
    gap: unset;
    border-bottom: 1px solid var(--border) !important;
  }

  #attribution-expand-table tbody td::before {
    display: none !important;
    content: none !important;
  }
}
