:root {
  color-scheme: dark;
  --page: #101114;
  --shell: #18191d;
  --surface: #222328;
  --surface-2: #2b2c32;
  --control: rgba(255, 255, 255, 0.07);
  --control-hover: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f5;
  --muted: #a1a3aa;
  --accent: #60aef0;
  --accent-soft: rgba(96, 174, 240, 0.14);
  --on-accent: #07111a;
  --green: #50d890;
  --green-soft: rgba(80, 216, 144, 0.13);
  --amber: #f4bd62;
  --amber-soft: rgba(244, 189, 98, 0.13);
  --red: #ff7a83;
  --red-soft: rgba(255, 122, 131, 0.13);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  --sidebar-width: 228px;
}

html[data-theme="light"] {
  color-scheme: light;
  --page: #e9eaed;
  --shell: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f1f2f5;
  --control: rgba(20, 28, 38, 0.055);
  --control-hover: rgba(20, 28, 38, 0.09);
  --line: rgba(20, 28, 38, 0.10);
  --line-strong: rgba(20, 28, 38, 0.18);
  --text: #1a1d21;
  --muted: #656a70;
  --accent: #1a6fb5;
  --accent-soft: rgba(26, 111, 181, 0.11);
  --on-accent: #ffffff;
  --green: #0f7a48;
  --green-soft: rgba(15, 122, 72, 0.10);
  --amber: #8a5a08;
  --amber-soft: rgba(138, 90, 8, 0.10);
  --red: #c02a37;
  --red-soft: rgba(192, 42, 55, 0.09);
  --shadow: 0 16px 44px rgba(28, 39, 53, 0.14);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --page: #e9eaed;
    --shell: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f1f2f5;
    --control: rgba(20, 28, 38, 0.055);
    --control-hover: rgba(20, 28, 38, 0.09);
    --line: rgba(20, 28, 38, 0.10);
    --line-strong: rgba(20, 28, 38, 0.18);
    --text: #1a1d21;
    --muted: #656a70;
    --accent: #1a6fb5;
    --accent-soft: rgba(26, 111, 181, 0.11);
    --on-accent: #ffffff;
    --green: #0f7a48;
    --green-soft: rgba(15, 122, 72, 0.10);
    --amber: #8a5a08;
    --amber-soft: rgba(138, 90, 8, 0.10);
    --red: #c02a37;
    --red-soft: rgba(192, 42, 55, 0.09);
    --shadow: 0 16px 44px rgba(28, 39, 53, 0.14);
  }
}

* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--page);
}
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font:
    14px/1.45 -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}
button, input, select, textarea {
  font: inherit;
  letter-spacing: 0;
}
button, select {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(100%, 380px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 8px;
  color: var(--on-accent);
  background: var(--accent);
}
.brand-mark.small {
  width: 34px;
  height: 34px;
  margin: 0;
}
.brand-mark svg {
  width: 24px;
  height: 24px;
}
.brand-mark.small svg {
  width: 19px;
  height: 19px;
}
.login-panel h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
}
.login-panel > .muted {
  margin: 7px 0 24px;
}
.login-panel label, .stack-form label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
}
textarea {
  min-height: 112px;
  padding: 11px 12px;
  resize: vertical;
}
input::placeholder {
  color: var(--muted);
  opacity: 0.78;
}

.primary-button, .secondary-button, .text-button, .icon-button, .load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  font-weight: 650;
}
.primary-button {
  color: var(--on-accent);
  background: var(--accent);
}
.secondary-button {
  color: var(--accent);
  background: var(--accent-soft);
}
.text-button {
  min-height: 32px;
  padding: 0 8px;
  color: var(--accent);
  background: transparent;
}
.icon-button {
  width: 38px;
  padding: 0;
  color: var(--text);
  background: var(--control);
}
.icon-button:hover, .secondary-button:hover, .load-more:hover {
  background: var(--control-hover);
}
.primary-button svg, .secondary-button svg, .icon-button svg, .api-link svg {
  width: 18px;
  height: 18px;
}
.login-panel .primary-button {
  width: 100%;
  margin-top: 22px;
  min-height: 44px;
}
.form-error {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--red);
  background: var(--red-soft);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: var(--shell);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 4px 19px;
}
.sidebar-brand div, .sidebar-footer div {
  min-width: 0;
}
.sidebar-brand strong,
.sidebar-brand span,
.sidebar-footer strong,
.sidebar-footer span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-brand span, .sidebar-footer span {
  color: var(--muted);
  font-size: 12px;
}
.side-nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 650;
  text-align: left;
}
.nav-item svg {
  width: 18px;
  height: 18px;
}
.nav-item:hover {
  color: var(--text);
  background: var(--control);
}
.nav-item.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}
.sidebar-footer {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.operator-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 750;
}

.workspace {
  min-width: 0;
  padding: 0 24px 32px;
}
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 12px 0;
  background: color-mix(in srgb, var(--shell) 92%, transparent);
  backdrop-filter: blur(18px);
}
.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}
.topbar-actions {
  display: flex;
  gap: 8px;
}
.page-view {
  max-width: 1420px;
  margin: 0 auto;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 4px 0 18px;
}
.metric {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.metric span, .metric small {
  display: block;
  color: var(--muted);
}
.metric strong {
  display: block;
  margin: 5px 0 2px;
  font-size: 26px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.metric-alert strong {
  color: var(--red);
}

.content-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.section-heading h2 {
  margin: 0;
  font-size: 18px;
}
.section-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.filters {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.4fr) repeat(3, minmax(130px, 0.7fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.filters label {
  min-width: 0;
}
.filters label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.search-field {
  position: relative;
  align-self: end;
}
.search-field svg {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.search-field input {
  padding-left: 38px;
}
.filters .secondary-button {
  height: 42px;
  padding: 0 15px;
}

.lead-table-wrap {
  min-height: 280px;
  overflow-x: auto;
}
.lead-table {
  width: 100%;
  border-collapse: collapse;
}
.lead-table th {
  height: 38px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}
.lead-table td {
  height: 62px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.lead-table tbody tr {
  cursor: pointer;
}
.lead-table tbody tr:hover {
  background: var(--control);
}
.lead-identity {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 170px;
}
.lead-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 750;
}
.lead-identity strong, .lead-identity span {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-identity span, .cell-muted {
  color: var(--muted);
  font-size: 12px;
}
.cell-stack {
  min-width: 0;
}
.cell-stack strong,
.cell-stack span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-stack span {
  color: var(--muted);
  font-size: 12px;
}
.balance-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 250px;
}
.balance-chip, .status-chip, .role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 8px;
  color: var(--text);
  background: var(--control);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.status-chip[data-tone="warning"] {
  color: var(--amber);
  background: var(--amber-soft);
}
.status-chip[data-tone="danger"] {
  color: var(--red);
  background: var(--red-soft);
}
.status-chip[data-tone="success"] {
  color: var(--green);
  background: var(--green-soft);
}
.table-arrow {
  color: var(--muted);
}
.load-more {
  width: calc(100% - 36px);
  margin: 12px 18px 16px;
  color: var(--accent);
  background: var(--control);
}
.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  min-height: 270px;
  color: var(--muted);
  text-align: center;
}
.empty-state svg {
  width: 28px;
  height: 28px;
}
.empty-state strong {
  color: var(--text);
  font-size: 16px;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.integration-grid .content-section {
  padding-bottom: 16px;
}
.integration-grid .content-section > h3 {
  margin: 20px 18px 8px;
  font-size: 14px;
}
.integration-grid .content-section:last-child {
  grid-column: 1 / -1;
}
.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  padding: 14px 18px;
}
.admin-user-form {
  grid-template-columns: repeat(3, minmax(120px, 1fr)) auto;
}
.stack-form {
  padding: 2px 18px 14px;
}
.stack-form .primary-button {
  width: 100%;
  margin-top: 16px;
}
.grouped-list {
  margin: 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.grouped-list:empty {
  display: none;
}
.group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 9px 12px;
}
.group-row + .group-row {
  border-top: 1px solid var(--line);
}
.group-row strong, .group-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-row span {
  color: var(--muted);
  font-size: 12px;
}
.asset-identity {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}
.asset-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 750;
}
.asset-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.secret-box {
  display: grid;
  gap: 7px;
  margin: 0 18px 14px;
  padding: 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
}
.secret-box span {
  color: var(--muted);
  font-size: 12px;
}
.secret-box code {
  overflow-wrap: anywhere;
  color: var(--text);
}
.api-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 18px 0;
  color: var(--accent);
  text-decoration: none;
  font-weight: 650;
}

.push-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(420px, 1.28fr);
  align-items: start;
  gap: 14px;
}
.push-form {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}
.push-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.push-form label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.push-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.audience-preview {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
}
.audience-preview > svg {
  width: 20px;
  height: 20px;
  margin: auto;
  color: var(--muted);
}
.audience-preview[data-state="ready"] {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: var(--green-soft);
}
.audience-preview[data-state="ready"] > svg {
  color: var(--green);
}
.audience-preview[data-state="empty"] {
  border-color: color-mix(in srgb, var(--red) 40%, var(--line));
  background: var(--red-soft);
}
.push-actions {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(170px, 1.3fr);
  gap: 9px;
}
.push-actions button {
  min-height: 42px;
  padding: 0 14px;
}
.push-history {
  min-width: 0;
}
.broadcast-list {
  display: grid;
}
.broadcast-item {
  display: grid;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.broadcast-item:last-child {
  border-bottom: 0;
}
.broadcast-heading, .broadcast-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.broadcast-heading .cell-stack {
  min-width: 0;
}
.broadcast-heading .cell-stack strong {
  font-size: 15px;
}
.broadcast-message {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.broadcast-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--control);
}
.broadcast-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 300ms ease;
}
.broadcast-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.broadcast-metrics .cell-stack {
  padding: 8px 9px;
  border-radius: 8px;
  background: var(--control);
}
.broadcast-metrics .cell-stack strong {
  font-variant-numeric: tabular-nums;
}
.broadcast-footer {
  min-height: 28px;
}
.broadcast-footer-actions,
.push-library-actions,
.recipient-devices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.push-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  margin-top: 14px;
}
.compact-push-form {
  border-bottom: 1px solid var(--line);
}
.automation-delay-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.7fr);
  gap: 8px;
}
.inline-check {
  display: flex !important;
  align-items: center;
  gap: 9px;
  color: var(--text);
}
.inline-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.inline-check > span {
  color: var(--text) !important;
}
.push-library-list,
.recipient-preview-list,
.recipient-dialog-list {
  display: grid;
}
.push-library-item,
.recipient-item {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.push-library-item:last-child,
.recipient-item:last-child {
  border-bottom: 0;
}
.push-library-heading,
.recipient-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.push-library-message,
.push-library-meta,
.recipient-meta,
.recipient-diagnostic {
  margin: 0;
  overflow-wrap: anywhere;
}
.push-library-message,
.recipient-meta {
  color: var(--muted);
}
.push-library-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.push-library-actions {
  justify-content: flex-end;
}
.danger-button {
  color: var(--red);
  background: var(--red-soft);
}
.automation-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.automation-metrics .cell-stack {
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--control);
}
.recipient-preview-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
}
.recipient-preview-list .recipient-item {
  padding: 11px 12px;
}
.recipient-more {
  justify-self: start;
}
.device-chip,
.recipient-delivery {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--control);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.device-chip[data-tone="success"],
.recipient-delivery[data-tone="success"],
.recipient-diagnostic.is-ok {
  color: var(--green);
  background: var(--green-soft);
}
.recipient-delivery[data-tone="warning"] {
  color: var(--amber);
  background: var(--amber-soft);
}
.recipient-delivery[data-tone="danger"],
.recipient-diagnostic.is-error {
  color: var(--red);
  background: var(--red-soft);
}
.recipient-diagnostic {
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12px;
}
.recipients-dialog {
  width: min(720px, calc(100vw - 28px));
}
.recipient-dialog-list {
  max-height: min(65vh, 680px);
  overflow: auto;
}

.drawer-scrim {
  position: fixed;
  z-index: 49;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
}
.lead-drawer {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(620px, calc(100vw - 40px));
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--shell);
  box-shadow: var(--shadow);
  overflow-y: auto;
}
.drawer-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--shell) 94%, transparent);
  backdrop-filter: blur(18px);
}
.drawer-header h2 {
  margin: 0;
  font-size: 19px;
}
.drawer-header div > span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-content {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.detail-section > h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail-field {
  min-width: 0;
  padding: 11px 14px;
}
.detail-field:nth-child(n+3) {
  border-top: 1px solid var(--line);
}
.detail-field:nth-child(even) {
  border-left: 1px solid var(--line);
}
.detail-field span, .timeline-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.detail-field strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.wallet-list, .timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.wallet-row, .timeline-item {
  display: grid;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 14px;
}
.wallet-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.wallet-row + .wallet-row, .timeline-item + .timeline-item {
  border-top: 1px solid var(--line);
}
.wallet-row strong, .wallet-row span {
  display: block;
}
.wallet-row > div:first-child span {
  color: var(--muted);
  font-size: 11px;
}
.wallet-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wallet-amount small {
  color: var(--muted);
}
.withdrawal-alert {
  margin: 12px;
  padding: 12px;
  border-radius: 8px;
  color: var(--amber);
  background: var(--amber-soft);
}
.withdrawal-alert.is-failed {
  color: var(--red);
  background: var(--red-soft);
}
.withdrawal-alert strong, .withdrawal-alert span {
  display: block;
}
.withdrawal-alert span {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.action-bar button {
  min-height: 34px;
}
.timeline-item {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}
.timeline-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
}
.timeline-icon svg {
  width: 16px;
  height: 16px;
}
.timeline-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-item time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.audit-details {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.action-dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.action-dialog::backdrop {
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
}
.action-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.action-dialog h2 {
  margin: 0;
  font-size: 19px;
}
.action-dialog .stack-form {
  padding-top: 8px;
}
.action-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.action-dialog footer button {
  padding: 0 15px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 18px 14px;
  color: var(--muted);
}
.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.action-dialog .form-error {
  margin: 0 18px 14px;
}
.field-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.quote-preview {
  padding: 11px;
  border-radius: 8px;
  background: var(--surface-2);
}
.quote-preview strong {
  display: block;
  font-size: 18px;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(460px, calc(100vw - 28px));
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  text-align: center;
}

@media (max-width: 1050px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }
  .filters {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
  .filters .search-field {
    grid-column: 1 / -1;
  }
  .filters .secondary-button {
    align-self: end;
  }
  .push-layout {
    grid-template-columns: 1fr;
  }
  .push-management-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar-width: 68px;
  }
  .sidebar {
    padding: 10px 8px;
  }
  .sidebar-brand {
    justify-content: center;
  }
  .sidebar-brand > div,
  .nav-item span,
  .sidebar-footer > div,
  .sidebar-footer .icon-button {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding: 0;
  }
  .sidebar-footer {
    display: flex;
    justify-content: center;
  }
  .workspace {
    padding: 0 12px 24px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .integration-grid {
    grid-template-columns: 1fr;
  }
  .integration-grid .content-section:last-child {
    grid-column: auto;
  }
  .admin-user-form {
    grid-template-columns: 1fr;
  }
  .lead-table th:nth-child(3),
  .lead-table td:nth-child(3),
  .lead-table th:nth-child(5),
  .lead-table td:nth-child(5) {
    display: none;
  }
}

@media (max-width: 520px) {
  .admin-shell {
    display: block;
    padding-bottom: 66px;
  }
  .sidebar {
    position: fixed;
    z-index: 40;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
  }
  .sidebar-brand, .sidebar-footer {
    display: none;
  }
  .side-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .nav-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 50px;
    font-size: 11px;
  }
  .nav-item span {
    display: block;
  }
  .topbar {
    min-height: 70px;
  }
  .topbar h1 {
    font-size: 19px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .metric {
    padding: 12px;
  }
  .metric strong {
    font-size: 23px;
  }
  .filters {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .filters .search-field {
    grid-column: auto;
  }
  .section-heading {
    padding: 14px;
  }
  .section-heading .text-button {
    display: none;
  }
  .lead-table th:nth-child(2),
  .lead-table td:nth-child(2),
  .lead-table th:nth-child(4),
  .lead-table td:nth-child(4) {
    display: none;
  }
  .lead-drawer {
    width: 100vw;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-field:nth-child(n+2), .detail-field:nth-child(even) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .inline-form {
    grid-template-columns: 1fr;
  }
  .push-filter-grid, .push-actions {
    grid-template-columns: 1fr;
  }
  .broadcast-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .automation-delay-field,
  .automation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .broadcast-footer,
  .push-library-heading,
  .recipient-heading {
    align-items: flex-start;
  }
}

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