:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --ink: #142033;
  --muted: #65758c;
  --line: #dce4ef;
  --panel: #ffffff;
  --brand: #1f8a70;
  --brand-2: #2563eb;
  --danger: #c2410c;
  --ok: #15803d;
  --shadow: 0 18px 45px rgba(20, 32, 51, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
input, button, select {
  font: inherit;
}

.mobile-menu-button,
.sidebar-scrim {
  display: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px;
  background: #111827;
  color: #eef4ff;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo span, .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 800;
  font-size: 13px;
}
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a, .logout {
  color: #cbd5e1;
  padding: 11px 12px;
  border-radius: 8px;
}
.sidebar nav a.active, .sidebar nav a:hover, .logout:hover {
  color: white;
  background: rgba(255,255,255,.1);
}
.logout { margin-top: auto; }

.content {
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}
.eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}
h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: 32px; }
h2 { font-size: 20px; margin-bottom: 18px; }
.user-chip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.quick-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}
.quick-actions form {
  margin: 0;
}
.metric-grid article, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.metric-grid article { padding: 20px; }
.metric-grid span { color: var(--muted); display: block; }
.metric-grid strong { font-size: 34px; display: block; margin-top: 8px; }
.panel { padding: 22px; }
.split {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, 620px) minmax(320px, 520px);
  gap: 18px;
  align-items: start;
}
.narrow { max-width: 620px; }

.form-stack { display: grid; gap: 15px; }
.form-separator {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 0;
}
label { color: var(--muted); font-weight: 650; display: grid; gap: 7px; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
}
input:focus {
  outline: 3px solid rgba(37, 99, 235, .16);
  border-color: var(--brand-2);
}
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 18px; min-height: 18px; }
.button, button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 750;
}
.button.primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.button.secondary {
  width: 100%;
  color: var(--brand-2);
  background: #eaf2ff;
}
.button.danger {
  color: #fff;
  background: var(--danger);
}
.help-text {
  color: var(--muted);
  font-size: 13px;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.status-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  padding: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.guide-modal {
  width: min(720px, 100%);
}
.guide-intro {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}
.setup-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.setup-steps[hidden] {
  display: none !important;
}
.simple-connect-guide {
  display: grid;
  gap: 12px;
}
.simple-connect-guide > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.simple-connect-guide > div > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  background: var(--brand-2);
  font-weight: 800;
}
.simple-connect-guide p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.simple-connect-guide strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}
.facebook-onboarding {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 20px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}
.facebook-onboarding strong,
.facebook-onboarding span {
  grid-column: 1;
}
.facebook-onboarding span {
  color: var(--muted);
}
.facebook-onboarding .button {
  grid-column: 2;
  grid-row: 1 / 3;
}
.facebook-center-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.facebook-center-head h2,
.facebook-center-head p {
  margin: 0;
}
.facebook-center-head p {
  margin-top: 5px;
  color: var(--muted);
}
.badge.info {
  color: #1d4ed8;
  background: #dbeafe;
}
.facebook-connection-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.connection-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 18px 18px 18px 0;
}
.connection-step + .connection-step {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.connection-step > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  background: #94a3b8;
  font-weight: 850;
}
.connection-step.current > span {
  background: var(--brand-2);
}
.connection-step.done > span {
  background: #059669;
}
.connection-step strong,
.connection-step small {
  display: block;
}
.connection-step small {
  margin-top: 3px;
  color: var(--muted);
}
.connection-step.pending {
  color: var(--muted);
}
.facebook-primary-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}
.facebook-primary-action strong,
.facebook-primary-action span {
  display: block;
}
.facebook-primary-action span {
  margin-top: 4px;
  color: var(--muted);
}
.facebook-config-actions {
  display: flex;
  gap: 20px;
  margin-top: 14px;
}
.facebook-config-actions a,
.facebook-config-actions button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.facebook-config-actions button {
  color: #b45309;
}
.facebook-pages-heading {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.facebook-pages-heading h3 {
  margin: 0;
}
.facebook-advanced {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.facebook-advanced summary {
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.facebook-advanced p {
  margin: 12px 0;
  color: var(--muted);
}
.facebook-advanced-actions {
  display: flex;
  gap: 12px;
}
.simple-setup {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.simple-setup p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.simple-setup a {
  color: var(--brand-2);
  font-weight: 750;
  text-decoration: underline;
}
.guided-setup {
  display: grid;
  margin: 8px 0 20px;
  border-top: 1px solid var(--line);
}
.guided-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.guided-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  background: var(--brand-2);
  font-weight: 850;
}
.guided-step h3 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: 17px;
}
.guided-step p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}
.guided-step .guided-reminder {
  margin-bottom: 0;
  color: var(--ink);
}
.copy-value-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.copy-value-action button {
  min-width: 76px;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  color: #1d4ed8;
  background: #eaf1ff;
  font-weight: 800;
  cursor: pointer;
}
.copy-value-action button.copied {
  color: #047857;
  background: #ecfdf5;
}
.page-choice-list {
  display: grid;
  gap: 10px;
}
.page-choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.page-choice input {
  width: 18px;
  min-height: 18px;
}
.page-choice span,
.page-choice strong,
.page-choice small {
  display: block;
}
.page-choice strong {
  color: var(--ink);
}
.page-choice small {
  margin-top: 3px;
  color: var(--muted);
}
.setup-steps details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.setup-steps summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.setup-steps summary::-webkit-details-marker {
  display: none;
}
.setup-steps summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 22px;
  font-weight: 500;
}
.setup-steps details[open] summary::after {
  content: "−";
}
.setup-steps summary > span {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  background: var(--brand-2);
  font-size: 13px;
}
.setup-step-body {
  padding: 0 18px 18px 54px;
  color: var(--muted);
  line-height: 1.5;
}
.setup-step-body p {
  margin: 0 0 12px;
}
.setup-step-body strong {
  color: var(--ink);
}
.setup-step-body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.setup-step-body a {
  display: inline-flex;
  color: var(--brand-2);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.setup-step-body code {
  color: var(--ink);
  background: #eef2f7;
  border-radius: 4px;
  padding: 2px 5px;
}
.copy-value {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}
.guide-note {
  display: grid;
  gap: 4px;
  margin-top: 20px;
  padding: 14px;
  border-left: 4px solid #d97706;
  background: #fffbeb;
  color: #92400e;
}
.secret-code {
  display: block;
  margin: 10px 0;
  font-size: 18px;
  letter-spacing: 1px;
}
.totp-qr {
  display: grid;
  place-items: center;
  width: min(180px, 100%);
  aspect-ratio: 1;
  margin: 12px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 6px;
  overflow: hidden;
}
.totp-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}
.totp-qr span {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.code-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.code-list code {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
  text-align: center;
  font-weight: 800;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.panel-heading h2 {
  margin-bottom: 0;
}
.panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.button.compact {
  min-height: 40px;
  padding-inline: 16px;
}
.button.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #eef2f7;
}
.reveal-toggle {
  justify-self: start;
  color: var(--brand-2);
  background: #eaf2ff;
}
.reveal-fields[hidden] {
  display: none !important;
}
.title-filter-fields {
  display: grid;
  gap: 6px;
}
.destination-picker {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.destination-picker legend {
  padding: 0 6px;
  color: var(--ink);
  font-weight: 800;
}
.destination-picker > .help-text {
  margin: 0 0 14px;
}
.destination-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.destination-groups > div {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.facebook-actions {
  min-width: 346px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
td small { display: block; color: var(--muted); margin-top: 4px; max-width: 620px; overflow-wrap: anywhere; }
td small.error-text { color: var(--danger); font-weight: 700; }
.feed-icon-col {
  width: 42px;
  min-width: 42px;
  padding-right: 4px;
}
.feed-icon-wrap {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
}
.favicon-fallback,
.feed-favicon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.favicon-fallback {
  display: grid;
  place-items: center;
  background: #eaf2ff;
  color: var(--brand-2);
  font-weight: 850;
  font-size: 11px;
  line-height: 1;
}
.feed-favicon {
  position: absolute;
  inset: 0;
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
  padding: 2px;
}
.feed-title-block strong {
  display: block;
}
.schedule-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.actions {
  min-width: 468px;
  text-align: right;
  white-space: nowrap;
}
.actions form {
  display: inline-flex;
  align-items: center;
  width: 102px;
  margin: 0;
  margin-left: 20px;
  vertical-align: middle;
}
.actions form:first-child { margin-left: 0; }
.actions button {
  width: 100%;
  background: #fff3ed;
  color: var(--danger);
}
.actions button.soft-action {
  background: #ecfdf5;
  color: var(--brand);
}
.actions button.test-action {
  background: #eaf2ff;
  color: var(--brand-2);
}
.actions a,
.action-link {
  width: 102px;
  margin-left: 20px;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  vertical-align: middle;
}
.edit-action {
  color: #92400e;
  background: #fef3c7;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-weight: 750;
  font-size: 12px;
}
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #ffedd5; color: var(--danger); }
.badge-button {
  border: 0;
  cursor: pointer;
}
.modal-row > td {
  border: 0;
  padding: 0;
}
.table-wrap tr.modal-row {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}
.alert {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #e0f2fe;
  color: #075985;
}
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.success { background: #dcfce7; color: #166534; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .45);
}
.modal-backdrop[hidden] {
  display: none !important;
}
.modal-backdrop.open {
  display: flex;
}
.modal-panel {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .22);
  padding: 24px;
}
.modal-panel-small {
  width: min(420px, 100%);
}
.modal-copy {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}
.modal-head,
.modal-actions,
.field-grid {
  display: flex;
  gap: 16px;
}
.modal-head {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-head h2 {
  margin-bottom: 0;
}
.modal-close {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
}
.field-grid > label {
  flex: 1;
}
.modal-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(140deg, rgba(31,138,112,.18), transparent 36%),
    linear-gradient(320deg, rgba(37,99,235,.18), transparent 38%),
    var(--bg);
}
.login-shell { width: min(440px, calc(100% - 32px)); }
.login-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px;
}
.login-panel h1 { margin-top: 16px; }
.login-panel p { color: var(--muted); }

@media (max-width: 900px) {
  body.menu-open {
    overflow: hidden;
  }
  .mobile-menu-button {
    position: sticky;
    top: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: 24px auto;
    grid-template-rows: repeat(3, 5px);
    align-items: center;
    column-gap: 12px;
    width: 100%;
    min-height: 58px;
    padding: 12px 18px calc(12px + env(safe-area-inset-top, 0px));
    border-radius: 0;
    color: white;
    background: #111827;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .18);
  }
  .mobile-menu-button span {
    display: block;
    grid-column: 1;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }
  .mobile-menu-button span:nth-child(1) { grid-row: 1; }
  .mobile-menu-button span:nth-child(2) { grid-row: 2; }
  .mobile-menu-button span:nth-child(3) { grid-row: 3; }
  .mobile-menu-button strong {
    grid-column: 2;
    grid-row: 1 / 4;
    font-size: 15px;
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(15, 23, 42, .44);
  }
  body.menu-open .sidebar-scrim {
    display: block;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(320px, 86vw);
    padding: calc(20px + env(safe-area-inset-top, 0px)) 18px calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-104%);
    transition: transform .2s ease;
    overflow-y: auto;
  }
  body.menu-open .sidebar {
    transform: translateX(0);
  }
  .sidebar nav {
    grid-template-columns: 1fr;
  }
  .sidebar nav a,
  .logout {
    min-height: 46px;
    display: flex;
    align-items: center;
  }
  .content {
    margin-left: 0;
    padding: 22px 16px calc(42px + env(safe-area-inset-bottom, 0px));
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .user-chip {
    padding: 8px 12px;
  }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .field-grid { flex-direction: column; }
  .destination-groups { grid-template-columns: 1fr; }
  .table-wrap {
    overflow-x: visible;
  }
  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
  }
  .table-wrap thead {
    display: none;
  }
  .table-wrap tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 12px;
    margin-bottom: 12px;
  }
  .table-wrap td {
    border-bottom: 0;
    padding: 8px 0;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .table-wrap td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }
  .table-wrap td.feed-icon-col {
    width: auto;
    min-width: 0;
    padding-right: 0;
  }
  .feed-icon-wrap {
    width: 28px;
    height: 28px;
  }
  .favicon-fallback,
  .feed-favicon {
    width: 28px;
    height: 28px;
  }
  .actions {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-columns: auto;
    gap: 10px;
    justify-content: stretch;
    min-width: 0;
    text-align: left;
    white-space: normal;
  }
  .actions form,
  .actions a {
    margin-left: 0;
  }
  .actions form,
  .actions a,
  .actions button {
    width: 100%;
  }
  .schedule-note {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .metric-grid { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
  h2 { font-size: 19px; }
  .panel, .login-panel { padding: 20px; }
  .panel-heading,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .panel-heading {
    gap: 12px;
  }
  .panel-heading-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .panel-heading-actions .button {
    width: 100%;
  }
  .button.compact {
    width: 100%;
  }
  .quick-actions,
  .quick-actions form,
  .quick-actions button {
    width: 100%;
  }
  .actions {
    gap: 10px;
    grid-template-columns: 1fr;
  }
  .modal-backdrop {
    align-items: flex-end;
    padding: 10px;
  }
  .modal-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 20px;
  }
  .setup-step-body {
    padding: 0 14px 16px;
  }
  .facebook-onboarding {
    grid-template-columns: 1fr;
  }
  .facebook-onboarding strong,
  .facebook-onboarding span,
  .facebook-onboarding .button {
    grid-column: 1;
    grid-row: auto;
  }
  .facebook-center-head {
    align-items: flex-start;
  }
  .facebook-connection-steps {
    grid-template-columns: 1fr;
  }
  .connection-step {
    padding: 16px 0;
  }
  .connection-step + .connection-step {
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .facebook-primary-action {
    grid-template-columns: 1fr;
  }
  .facebook-primary-action .button {
    width: 100%;
  }
  .facebook-config-actions,
  .facebook-advanced-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .code-list {
    grid-template-columns: 1fr;
  }
  .guided-step {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }
  .guided-step-number {
    width: 28px;
    height: 28px;
  }
  .copy-value-action {
    grid-template-columns: 1fr;
  }
  .copy-value-action button {
    width: 100%;
  }
}
