/*
 * ADS global UI consistency pass
 *
 * This is a layout-safe final cascade. It standardizes alignment and visual
 * rhythm without assigning one fixed width to controls that serve different
 * pages. Page-specific sizing remains authoritative; shared components only
 * receive containment, alignment and responsive fallbacks here.
 */

:root {
  --auc-line: rgba(60, 60, 67, .12);
  --auc-soft-line: rgba(60, 60, 67, .07);
  --auc-surface: rgba(255, 255, 255, .96);
  --auc-surface-muted: rgba(248, 248, 250, .92);
  --auc-ink: #1d1d1f;
  --auc-muted: #6e6e73;
  --auc-blue: #007aff;
  --auc-blue-soft: rgba(0, 122, 255, .08);
  --auc-radius: 14px;
  --auc-control-radius: 9px;
  --auc-pagination-height: 42px;
}

/* Every flexible workspace can shrink before one child forces page overflow. */
#app-shell #view,
#app-shell #view .fixed-page,
#app-shell #view .panel,
#app-shell #view .fixed-list-panel,
#app-shell #view .table-wrap,
#app-shell #view .fixed-table-scroll,
#app-shell #view .user-account-list {
  min-width: 0;
}

/*
 * Header alignment intentionally stays page-specific. Text headers remain
 * left aligned, numeric headers remain right aligned, and selection/action
 * columns keep their existing local rules. Do not normalize alignment here.
 */

/* Directory semantics use the system palette: blue data labels, green owners. */
#app-shell #view .shopify-directory-panel .store-chip {
  border-color: rgba(0, 122, 255, .18) !important;
  background: var(--auc-blue-soft) !important;
  color: #0868c5 !important;
}

#app-shell #view .shopify-directory-panel .member-count-button {
  border-color: rgba(16, 185, 129, .24) !important;
  background: rgba(16, 185, 129, .08) !important;
  color: #08784a !important;
}

/*
 * One pagination component, contained by its own panel. Children keep their
 * natural sizes and may wrap; nothing is stretched to a global width.
 */
#app-shell #view .pagination,
#modal-root .pagination {
  position: relative;
  z-index: 8;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: var(--auc-pagination-height) !important;
  display: flex !important;
  align-items: center !important;
  align-content: center !important;
  flex: 0 0 auto !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  overflow: visible !important;
  border-top: 1px solid var(--auc-line) !important;
  background: var(--auc-surface) !important;
  color: var(--auc-ink) !important;
}

#app-shell #view .pagination > *,
#modal-root .pagination > * {
  min-width: 0;
  flex: 0 0 auto;
  align-self: center;
}

#app-shell #view .pagination :where(.pagination-summary, .pagination-size, .pagination-jump),
#modal-root .pagination :where(.pagination-summary, .pagination-size, .pagination-jump) {
  min-height: 30px;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  line-height: 1 !important;
  white-space: nowrap;
}

#app-shell #view .pagination-pages,
#modal-root .pagination-pages {
  min-width: 0;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
}

#app-shell #view .pagination :where(.pagination-page, .pagination-arrow),
#modal-root .pagination :where(.pagination-page, .pagination-arrow) {
  box-sizing: border-box;
  min-width: 28px !important;
  width: auto !important;
  height: 30px !important;
  min-height: 30px !important;
  padding-inline: 7px !important;
  border-radius: 8px !important;
}

#app-shell #view .pagination .pagination-page.active,
#modal-root .pagination .pagination-page.active {
  border-color: var(--auc-blue) !important;
  background: var(--auc-blue) !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 122, 255, .24) !important;
}

#app-shell #view .pagination .pagination-summary,
#modal-root .pagination .pagination-summary {
  margin-right: 2px !important;
  font-weight: 560;
}

#app-shell #view .pagination .pagination-arrow:disabled,
#modal-root .pagination .pagination-arrow:disabled {
  color: rgba(60, 60, 67, .28) !important;
  opacity: 1 !important;
}

#app-shell #view .pagination .custom-select-wrap,
#modal-root .pagination .custom-select-wrap {
  width: 84px !important;
  min-width: 0 !important;
  max-width: 84px !important;
}

#app-shell #view .pagination :where(select, .custom-select-trigger, .pagination-jump input),
#modal-root .pagination :where(select, .custom-select-trigger, .pagination-jump input) {
  box-sizing: border-box;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: var(--auc-control-radius) !important;
}

#app-shell #view .pagination-jump input,
#modal-root .pagination-jump input {
  width: 46px !important;
  min-width: 46px !important;
}

/* Fixed list panels keep table scrolling separate from the footer. */
#app-shell #view .fixed-list-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#app-shell #view .fixed-list-panel > :where(.table-wrap, .fixed-table-scroll, .user-account-list) {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

#app-shell #view .fixed-list-panel > .pagination {
  flex: 0 0 auto !important;
}

/*
 * Facebook account management was missing its list-card layout entirely.
 * This creates a real flex container so the table scrolls and pagination
 * remains inside the card instead of falling beyond the page boundary.
 */
#app-shell #view .facebook-account-directory-card {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--auc-line);
  border-radius: var(--auc-radius);
  background: var(--auc-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025), 0 10px 30px rgba(15, 23, 42, .035);
}

#app-shell #view .facebook-account-directory-card > :where(.facebook-account-tabs, .facebook-account-toolbar, .facebook-account-bulkbar, .pagination) {
  flex: 0 0 auto;
}

#app-shell #view .facebook-account-directory-card .facebook-account-tabs {
  box-sizing: border-box;
  min-width: 0;
  margin-top: 0;
  padding-inline: 10px;
}

#app-shell #view .facebook-account-directory-card .facebook-account-toolbar {
  box-sizing: border-box;
  min-width: 0;
  flex-wrap: wrap;
  padding: 7px 10px;
  border-bottom: 1px solid var(--auc-soft-line);
}

#app-shell #view .facebook-account-directory-card .facebook-account-search {
  min-width: min(360px, 100%);
  max-width: 100%;
}

#app-shell #view .facebook-account-directory-card .facebook-account-bulkbar {
  margin: 6px 10px;
}

#app-shell #view .facebook-account-directory-card .facebook-account-table {
  min-width: 0;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  border-width: 0;
  border-radius: 0;
}

#app-shell #view .facebook-account-directory-card > .pagination {
  border-radius: 0 0 calc(var(--auc-radius) - 1px) calc(var(--auc-radius) - 1px);
}

/* The users list uses a wide internal grid, never a page-wide overflow. */
#app-shell #view .users-fixed-page #users-list {
  min-width: 0;
  overflow: hidden;
}

#app-shell #view .users-fixed-page .user-account-list {
  overflow-x: auto !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
}

#app-shell #view .users-fixed-page #users-list > .pagination {
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 1180px) {
  #app-shell #view .pagination,
  #modal-root .pagination {
    row-gap: 4px !important;
  }

  #app-shell #view .facebook-account-directory-card .facebook-account-toolbar-actions {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  #app-shell #view .pagination,
  #modal-root .pagination {
    padding-inline: 9px !important;
  }

  #app-shell #view .facebook-account-directory-card .facebook-account-search {
    min-width: 100%;
    flex-basis: 100%;
  }

  #app-shell #view .facebook-account-directory-card .facebook-account-search input {
    min-width: 0;
  }
}

@media (prefers-reduced-transparency: reduce) {
  #app-shell #view :where(.pagination, .facebook-account-directory-card),
  #modal-root .pagination {
    background: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (prefers-contrast: more) {
  #app-shell #view :where(.pagination, .facebook-account-directory-card),
  #modal-root .pagination {
    border-color: rgba(29, 29, 31, .34) !important;
  }
}

/* Page-specific table geometry: keep headers and values on the same axis. */
#app-shell #view #ad-automation-content .automation-list-table {
  min-width: 1060px !important;
  table-layout: fixed !important;
}

#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(1) {
  width: 18% !important;
  min-width: 0 !important;
  text-align: left !important;
}

#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(2) {
  width: 8% !important;
  text-align: left !important;
}

#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(3) { width: 10% !important; }
#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(4) { width: 10% !important; }
#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(5) { width: 8% !important; }
#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(6) { width: 11% !important; }
#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(7) { width: 8% !important; }
#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(8) { width: 11% !important; }
#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(9) { width: 16% !important; }

/* Sticky collapsed headers can hide this divider; keep the actions boundary visible. */
#app-shell #view #ad-automation-content .automation-list-table thead th:nth-child(9) {
  border-left: 1px solid var(--apple-table-column-line) !important;
  box-shadow: inset 1px 0 0 var(--apple-table-column-line) !important;
}

#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(n + 3):nth-child(-n + 7) {
  text-align: right !important;
}

#app-shell #view #ad-automation-content .automation-list-table th:nth-child(n + 3):nth-child(-n + 7) .sort-header {
  justify-content: flex-end !important;
  text-align: right !important;
}

#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(8),
#app-shell #view #ad-automation-content .automation-list-table :is(th, td):nth-child(9) {
  text-align: center !important;
}

#app-shell #view #ad-automation-content .automation-list-table .automation-row-actions {
  justify-content: center !important;
}

#app-shell #view #ad-automation-content .automation-list-table .automation-row-actions.compact {
  min-width: 0 !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
}

#app-shell #view #ad-automation-content .automation-list-table .automation-view-button {
  min-width: 48px !important;
}

#app-shell #view #ad-automation-content .automation-list-table .automation-row-actions .button {
  white-space: nowrap !important;
}

/* Assigned operators are labels, not a numeric measure. Center the header over its badge. */
#app-shell #view #stores-list .store-settings-table :is(th, td):nth-child(7) {
  text-align: center !important;
}

#app-shell #view #stores-list .store-settings-table th:nth-child(7) .sort-header {
  justify-content: center !important;
  text-align: center !important;
}

#app-shell #view #stores-list .store-settings-table th:nth-child(3) .sort-header,
#app-shell #view #stores-list .store-settings-table th:nth-child(4) .sort-header,
#app-shell #view #stores-list .store-settings-table th:nth-child(5) .sort-header,
#app-shell #view #stores-list .store-settings-table th:nth-child(6) .sort-header {
  justify-content: center !important;
  text-align: center !important;
}

/* Keep the selector compact and share the remaining report width evenly between data columns. */
#app-shell #view #ad-reports-content .ad-report-table {
  min-width: 1040px !important;
  table-layout: fixed !important;
}

#app-shell #view #ad-reports-content .ad-report-table.has-team-columns col.ad-report-col-select { width: 4% !important; }
#app-shell #view #ad-reports-content .ad-report-table.has-team-columns :is(col.ad-report-col-date, col.ad-report-col-member, col.ad-report-col-name, col.ad-report-col-number, col.ad-report-col-spend, col.ad-report-col-status) { width: 16% !important; }

#app-shell #view #ad-reports-content .ad-report-table.no-team-columns col.ad-report-col-select { width: 4% !important; }
#app-shell #view #ad-reports-content .ad-report-table.no-team-columns :is(col.ad-report-col-date, col.ad-report-col-name, col.ad-report-col-number, col.ad-report-col-spend, col.ad-report-col-status) { width: 19.2% !important; }

#app-shell #view #ad-reports-content .ad-report-table th.metric-date .sort-header,
#app-shell #view #ad-reports-content .ad-report-table th.metric-member .sort-header,
#app-shell #view #ad-reports-content .ad-report-table th.metric-accountNumber .sort-header {
  justify-content: center !important;
  text-align: center !important;
}

#app-shell #view #ad-reports-content .ad-report-table th.metric-accountName .sort-header {
  justify-content: center !important;
  text-align: center !important;
}

#app-shell #view #ad-reports-content .ad-report-table th.metric-spendValue .sort-header {
  justify-content: flex-end !important;
  text-align: right !important;
}

#app-shell #view #ad-reports-content .ad-report-table :is(.ad-report-date-cell, .ad-report-member-cell, .ad-report-number-cell) {
  text-align: center !important;
}

#app-shell #view #ad-reports-content .ad-report-table .ad-report-name-cell,
#app-shell #view #ad-reports-content .ad-report-table .ad-report-name-cell .cell-main {
  text-align: center !important;
}

#app-shell #view #ad-reports-content .ad-report-table .ad-report-spend-cell {
  text-align: right !important;
}

#app-shell #view #ad-reports-content .ad-report-table :is(th, td):last-child {
  text-align: center !important;
}

/* Login, boot, and route-loading surfaces share one exact Apple-like system. */
.login-shell,
.boot-shell {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -2%, rgba(0, 122, 255, .14), transparent 31%),
    radial-gradient(circle at 18% 82%, rgba(87, 149, 255, .06), transparent 30%),
    linear-gradient(180deg, #f8faff 0%, #f2f4f8 100%) !important;
}

.login-shell::before,
.boot-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 48%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, 0));
}

.login-card,
.boot-card {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, .82) !important;
  box-shadow:
    0 30px 80px rgba(31, 43, 66, .14),
    0 8px 24px rgba(31, 43, 66, .07),
    inset 0 1px 0 rgba(255, 255, 255, .94) !important;
  -webkit-backdrop-filter: blur(28px) saturate(155%) !important;
  backdrop-filter: blur(28px) saturate(155%) !important;
  animation: apple-surface-enter 220ms cubic-bezier(.16, 1, .3, 1) both;
}

.login-card::before,
.boot-card::before,
.app-loading-state::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, .48), transparent 42%);
}

.login-card {
  width: min(100%, 428px) !important;
  padding: 40px 40px 34px !important;
  text-align: center;
}

.login-card > .auth-brand-lockup,
.boot-card > .auth-brand-lockup {
  display: block;
  width: 204px;
  max-width: 68vw;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  image-rendering: auto;
  transform: none;
}

.login-card .login-tagline {
  margin: 12px 0 0;
  color: #7c838f !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .085em;
}

.login-card .stack {
  gap: 14px;
  margin-top: 30px !important;
  text-align: left;
}

.login-card .stack label {
  gap: 7px;
  color: #31343b;
  font-size: 13px;
  font-weight: 650;
}

#login-screen #login-form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
  height: 48px !important;
  min-height: 48px !important;
  border-color: rgba(76, 85, 105, .25);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .025);
  transition: border-color 160ms cubic-bezier(.16, 1, .3, 1), box-shadow 160ms cubic-bezier(.16, 1, .3, 1), background 160ms cubic-bezier(.16, 1, .3, 1);
}

#login-screen #login-form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus {
  border-color: rgba(0, 122, 255, .7);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, .1), inset 0 1px 2px rgba(15, 23, 42, .025);
}

.login-card .stack .button {
  height: 48px !important;
  min-height: 48px !important;
  margin-top: 4px;
  border-radius: 12px;
  background: #0071e3 !important;
  box-shadow: 0 8px 18px rgba(0, 113, 227, .18) !important;
  transition: transform 160ms cubic-bezier(.16, 1, .3, 1), filter 160ms cubic-bezier(.16, 1, .3, 1), box-shadow 160ms cubic-bezier(.16, 1, .3, 1);
}

.login-card .stack .button:hover {
  filter: brightness(1.035);
  box-shadow: 0 10px 22px rgba(0, 113, 227, .22) !important;
}

.login-card .stack .button:active {
  transform: scale(.985);
  filter: brightness(.97);
  box-shadow: 0 5px 13px rgba(0, 113, 227, .18) !important;
}

.login-card .form-error {
  min-height: 16px;
  margin: 0;
  text-align: center;
  font-size: 11px;
}

.boot-card {
  width: min(100%, 360px) !important;
  min-width: 0;
  max-width: 360px;
  min-height: 236px;
  gap: 0;
  padding: 34px 36px 30px !important;
}

.boot-card > .auth-brand-lockup {
  width: 188px;
  margin-bottom: 24px;
}

.boot-card > strong {
  margin-top: 14px;
  color: #1d1d1f !important;
  font-size: 16px;
  font-weight: 690;
  letter-spacing: -.018em;
}

.boot-card > span:last-child {
  margin-top: 6px;
  color: #7b8290 !important;
  font-size: 12px;
}

.apple-loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 122, 255, .04), rgba(0, 122, 255, .22) 35%, #007aff 92%, rgba(0, 122, 255, .04));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  animation: apple-loading-spin .82s linear infinite;
}

.app-loading-state {
  position: relative;
  box-sizing: border-box;
  width: 320px !important;
  min-width: 0 !important;
  max-width: 320px !important;
  height: 156px !important;
  min-height: 156px !important;
  flex: 0 0 auto !important;
  align-self: center !important;
  justify-self: center !important;
  display: grid;
  place-items: center;
  gap: 9px;
  margin: auto;
  padding: 27px 30px 25px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .83);
  box-shadow: 0 24px 64px rgba(31, 43, 66, .13), 0 6px 18px rgba(31, 43, 66, .06), inset 0 1px 0 rgba(255, 255, 255, .94);
  color: #1d1d1f;
  text-align: center;
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
  animation: apple-surface-enter 200ms cubic-bezier(.16, 1, .3, 1) both;
}

#app-shell #view .fixed-page {
  position: relative;
}

.fixed-page > .app-loading-state {
  position: absolute;
  inset: 48% auto auto 50%;
  transform: translate(-50%, -50%);
  animation-name: apple-fixed-surface-enter;
}

#app-shell #view .app-loading-state {
  width: 320px !important;
  min-width: 0 !important;
  max-width: 320px !important;
  height: 156px !important;
  min-height: 156px !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
}

#app-shell #view .panel > .app-loading-state,
#app-shell #view .fixed-page-section > .app-loading-state,
#app-shell #view .fixed-list-panel > .app-loading-state {
  margin: auto !important;
}

.app-loading-state strong {
  font-size: 15px;
  font-weight: 690;
  letter-spacing: -.015em;
}

.app-loading-state small {
  color: #7b8290;
  font-size: 12px;
}

@keyframes apple-surface-enter {
  from { opacity: 0; transform: translateY(6px) scale(.992); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes apple-fixed-surface-enter {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 5px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes apple-loading-spin {
  to { transform: rotate(360deg); }
}

/* Keep the Facebook account switch inside the list card with breathing room. */
#app-shell #view .facebook-account-directory-card .facebook-account-tabs {
  margin: 9px 10px 1px !important;
  padding-inline: 0 !important;
}

@media (max-width: 640px) {
  .login-card {
    width: min(100%, 400px) !important;
    padding: 34px 25px 28px !important;
    border-radius: 24px !important;
  }

  .login-card > .auth-brand-lockup { width: 204px; }

  .login-card .login-tagline { margin-top: 10px; }

  .login-card .stack { margin-top: 28px !important; }

  .boot-card {
    width: min(100%, 340px) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 40px) !important;
    padding: 32px 26px 28px !important;
  }

  .app-loading-state,
  #app-shell #view .app-loading-state {
    width: min(320px, calc(100vw - 40px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 40px) !important;
  }

  .app-loading-state,
  #app-shell #view .app-loading-state {
    height: 156px !important;
  }
}

@media (prefers-contrast: more) {
  .login-card,
  .boot-card,
  .app-loading-state {
    border-color: rgba(45, 55, 72, .28) !important;
    background: #fff !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .login-card,
  .boot-card,
  .app-loading-state {
    background: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apple-loading-spinner { animation-duration: 1.8s; }
  .login-card,
  .boot-card,
  .app-loading-state { animation: none; }
}

/* Apple-style global feedback: replaces dark toasts and browser confirm boxes. */
body .toast {
  position: fixed !important;
  z-index: 2600 !important;
  top: auto !important;
  right: max(18px, calc(env(safe-area-inset-right) + 14px)) !important;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px)) !important;
  left: auto !important;
  box-sizing: border-box !important;
  width: min(390px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 32px) !important;
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 11px 14px 11px 12px !important;
  border: 1px solid rgba(255, 255, 255, .80) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .84) !important;
  box-shadow: 0 18px 48px rgba(31, 43, 66, .16), 0 4px 14px rgba(31, 43, 66, .07), inset 0 1px 0 rgba(255, 255, 255, .92) !important;
  color: #1d1d1f !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(9px) scale(.985) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%) !important;
  backdrop-filter: blur(26px) saturate(180%) !important;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.16, 1, .3, 1), visibility 0s linear 220ms !important;
}

body .toast.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  transition-delay: 0s !important;
}

body .toast.error {
  border-color: rgba(255, 69, 58, .18) !important;
  background: rgba(255, 248, 248, .90) !important;
}

body .toast .toast-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 122, 255, .10);
  color: #007aff;
}

body .toast.error .toast-icon {
  background: rgba(255, 59, 48, .10);
  color: #ff3b30;
}

body .toast .toast-icon svg,
.apple-confirm-symbol svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body .toast .toast-copy {
  min-width: 0;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 590;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

#modal-root .apple-confirm-backdrop {
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .34);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}

#modal-root .apple-confirm-dialog {
  box-sizing: border-box;
  width: min(380px, calc(100vw - 40px));
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 22px 20px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 22px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .24), 0 8px 24px rgba(15, 23, 42, .10), inset 0 1px 0 rgba(255, 255, 255, .96);
  color: #1d1d1f;
  text-align: center;
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
  animation: apple-confirm-enter 220ms cubic-bezier(.16, 1, .3, 1) both;
}

.apple-confirm-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 50%;
  background: rgba(0, 122, 255, .10);
  color: #007aff;
}

.apple-confirm-symbol.danger {
  background: rgba(255, 59, 48, .10);
  color: #ff3b30;
}

.apple-confirm-dialog h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -.025em;
}

.apple-confirm-dialog p {
  margin: 9px 0 0;
  color: #3a3a3c;
  font-size: 14px;
  font-weight: 540;
  line-height: 1.5;
}

.apple-confirm-dialog small {
  margin-top: 6px;
  color: #7b8290;
  font-size: 12px;
  line-height: 1.45;
}

.apple-confirm-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 21px;
}

.apple-confirm-button {
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(60, 60, 67, .13);
  border-radius: 11px;
  background: rgba(118, 118, 128, .10);
  color: #1d1d1f;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 100ms ease, filter 140ms ease, background 140ms ease;
}

.apple-confirm-button.primary {
  border-color: #007aff;
  background: #007aff;
  color: #fff;
}

.apple-confirm-button.danger {
  border-color: #ff3b30;
  background: #ff3b30;
  color: #fff;
}

.apple-confirm-button:hover { filter: brightness(.97); }
.apple-confirm-button:active { transform: scale(.975); }
.apple-confirm-button:focus-visible { outline: 3px solid rgba(0, 122, 255, .24); outline-offset: 2px; }

@keyframes apple-confirm-enter {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-transparency: reduce) {
  body .toast,
  body .toast.error,
  #modal-root .apple-confirm-dialog {
    background: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (prefers-contrast: more) {
  body .toast,
  #modal-root .apple-confirm-dialog { border-color: rgba(29, 29, 31, .32) !important; }
}

@media (prefers-reduced-motion: reduce) {
  body .toast { transition: opacity 100ms linear, visibility 0s linear 100ms !important; transform: none !important; }
  #modal-root .apple-confirm-dialog { animation: none; }
  .apple-confirm-button { transition: none; }
}

/* 素材管理沿用广告数据的单行筛选、分段切换和分页语言。 */
#app-shell #view #creative-assets-content .creative-assets-toolbar {
  position: relative;
  z-index: 20;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  height: 44px;
  max-height: 44px;
  display: flex !important;
  flex: 0 0 44px;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 4px 16px !important;
  overflow: visible;
  border-bottom: 1px solid #e6ebf2;
  background: #fff;
  box-shadow: none !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#app-shell #view #creative-assets-content .creative-assets-kind-switch {
  flex: 0 0 auto !important;
}

#app-shell #view #creative-assets-content .creative-assets-kind-switch > button {
  min-width: 82px !important;
  padding-inline: 12px !important;
}

#app-shell #view #creative-assets-content .creative-assets-head-filters {
  width: auto;
  max-width: none;
  flex: 0 1 auto;
  gap: 10px;
  overflow: visible;
}

#app-shell #view #creative-assets-content .creative-assets-operator-filter {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  flex: 0 0 220px;
  grid-template-columns: 32px minmax(0, 1fr);
}

#app-shell #view #creative-assets-content .creative-assets-status-filter {
  flex: 0 0 230px;
}

#app-shell #view #creative-assets-content .creative-assets-member-choice-popover {
  right: 0;
  left: auto;
  width: min(460px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}

#app-shell #view #creative-assets-content .creative-assets-member-choice-popover .store-choice-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app-shell #view #creative-assets-content .creative-assets-pager {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--auc-pagination-height) !important;
  height: auto !important;
  display: flex;
  flex: 0 0 auto !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  border-top: 1px solid var(--auc-line) !important;
  background: rgb(246, 247, 250) !important;
  color: #3f3f46;
  font-size: 13px;
}

@media (max-width: 1280px) {
  #app-shell #view #creative-assets-content .creative-assets-toolbar {
    height: auto;
    max-height: none;
    flex-wrap: wrap;
    flex-basis: auto;
    padding-block: 7px !important;
  }

  #app-shell #view #creative-assets-content .creative-assets-head-filters {
    min-width: min(100%, 620px);
    flex: 1 1 620px;
  }

}

@media (max-width: 760px) {
  #app-shell #view #creative-assets-content .creative-assets-toolbar,
  #app-shell #view #creative-assets-content .creative-assets-head-filters {
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch !important;
  }

  #app-shell #view #creative-assets-content .creative-assets-kind-switch,
  #app-shell #view #creative-assets-content .creative-assets-status-filter,
  #app-shell #view #creative-assets-content .creative-assets-operator-filter {
    width: 100% !important;
    min-width: 0;
    max-width: none;
  }

  #app-shell #view #creative-assets-content .creative-assets-kind-switch > button {
    min-width: 0 !important;
  }

  #app-shell #view #creative-assets-content .creative-assets-member-choice-popover {
    position: fixed;
    inset: 64px 8px auto 8px;
    width: auto;
    max-width: none;
  }

  #app-shell #view #creative-assets-content .creative-assets-member-choice-popover .store-choice-list {
    grid-template-columns: minmax(0, 1fr);
  }

  #app-shell #view #creative-assets-content .creative-assets-pager {
    min-height: 0;
    height: auto;
    flex: 0 0 auto;
    flex-wrap: wrap;
    padding: 10px 8px !important;
  }
}

/* V16: one restrained summary language across advertising data, reports and automation. */
#app-shell #view .ad-metric-summary-head {
  height: 46px !important;
  min-height: 46px !important;
  box-sizing: border-box;
  align-items: center !important;
  gap: 12px !important;
  padding: 4px 12px !important;
}

#app-shell #view .ad-metric-strip {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

#app-shell #view .ad-metric-strip::-webkit-scrollbar {
  display: none;
}

#app-shell #view .ad-metric-strip > span {
  min-width: max-content;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid #e3e9f2;
  border-radius: 7px;
  background: #f9fbfe;
  color: #748299;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

#app-shell #view .ad-metric-strip strong {
  color: #173766 !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1;
}

#app-shell #view .ad-data-overview-summary-head .ad-metric-strip {
  flex: 0 0 auto;
}

#app-shell #view .ad-metric-summary-head > .table-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

@media (max-width: 760px) {
  #app-shell #view .ad-metric-summary-head {
    height: auto !important;
    align-items: stretch !important;
    flex-wrap: wrap;
  }

  #app-shell #view .ad-metric-strip {
    width: 100%;
    flex-basis: 100%;
  }
}
