:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --line: #dbe1e8;
  --line-strong: #c8d0da;
  --text: #151922;
  --muted: #626d7c;
  --subtle: #8791a0;
  --primary: #1769e0;
  --primary-dark: #0f55bc;
  --primary-soft: #e8f1ff;
  --nav-active: #242936;
  --success: #16833d;
  --success-soft: #e8f6ee;
  --warning-soft: #fff4db;
  --warning: #8a5a00;
  --danger-soft: #fdecec;
  --danger: #b42318;
  --shadow: 0 12px 34px rgba(20, 27, 39, 0.1);
  --small-shadow: 0 4px 14px rgba(20, 27, 39, 0.06);
  --radius: 8px;
  --sidebar-width: 280px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

button {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  white-space: normal;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.28);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

.app-root {
  min-height: 100vh;
}

.ads-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 18px 16px;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 20;
}

.brand-logo-slot {
  min-width: 0;
}

.brand-logo-button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 8px;
  gap: 10px;
  color: var(--text);
  text-align: left;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.brand-logo-button:hover {
  background: #f1f5f9;
}

.brand-logo-placeholder {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--surface);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  background: #364152;
  border-radius: 6px;
}

.brand-logo-image {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.brand-logo-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.brand-logo-copy strong,
.brand-logo-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo-copy strong {
  font-size: 14px;
}

.brand-logo-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.account-switcher {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.account-switcher select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sidebar-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 40px;
  min-width: 0;
  padding: 0 12px;
  color: #4b5563;
  border-radius: var(--radius);
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover {
  background: #f1f4f8;
}

.nav-item.active {
  color: #ffffff;
  background: var(--nav-active);
  box-shadow: inset 3px 0 0 #5d6b82;
}

.main-shell {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 14px 28px;
  background: rgba(243, 245, 247, 0.92);
  border-bottom: 1px solid rgba(219, 225, 232, 0.82);
  backdrop-filter: blur(10px);
  z-index: 15;
}

.topbar-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.topbar-copy p {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.topbar-copy strong {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.primary-button,
.secondary-button,
.text-button,
.date-actions button,
.section-heading button,
.preset-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 0 14px;
  line-height: 1.15;
}

.primary-button {
  color: #ffffff;
  background: var(--primary);
  box-shadow: var(--small-shadow);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button,
.date-actions button {
  color: #334155;
  background: var(--surface);
  border: 1px solid var(--line);
}

.secondary-button:hover,
.date-actions button:hover,
.preset-row button:hover {
  background: #eef3f8;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  font-weight: 800;
  background: #475569;
  border-radius: 999px;
}

.page {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 26px 28px 40px;
}

.page-payment {
  width: min(100%, 1460px);
}

.payment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.payment-header h1 {
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
}

.account-pill {
  max-width: min(360px, 100%);
  min-height: 50px;
  padding: 0 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--small-shadow);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-pay-banner,
.payment-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--small-shadow);
}

.auto-pay-banner {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  margin-bottom: 22px;
  border-left: 5px solid #6356b7;
}

.banner-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #5749a8;
  font-size: 24px;
  line-height: 1;
}

.auto-pay-banner h2 {
  font-size: 18px;
  line-height: 1.22;
}

.auto-pay-banner p {
  margin-top: 7px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 600px);
  gap: 22px;
  align-items: start;
}

.payment-main,
.payment-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.payment-card {
  padding: 18px;
  overflow: hidden;
}

.payment-card h2 {
  font-size: 18px;
  line-height: 1.22;
}

.payment-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.payment-card-heading strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.compact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  flex: 0 0 auto;
}

.compact-actions .icon-button {
  width: 56px;
}

.payment-method-summary {
  display: grid;
  gap: 12px;
  padding-top: 18px;
}

.payment-method-summary h3 {
  font-size: 16px;
  line-height: 1.2;
}

.method-line {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.method-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #ffffff;
  background: #79b9ad;
  border-radius: 4px;
}

.method-line p,
.payment-methods-card p,
.receipt-card p {
  margin-top: 7px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.ok-line {
  position: relative;
  padding-left: 12px;
}

.ok-line::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 999px;
}

.text-link {
  justify-self: end;
  min-height: 30px;
  padding: 0;
  color: #334155;
  background: transparent;
}

.payment-methods-card .section-heading {
  margin-bottom: 22px;
}

.info-dot {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  margin-left: 4px;
  color: #ffffff;
  font-size: 11px;
  background: var(--nav-active);
  border-radius: 999px;
  vertical-align: middle;
}

.payment-table {
  display: grid;
  gap: 0;
  margin-top: 14px;
  overflow-x: auto;
}

.payment-table-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.9fr) minmax(130px, 1fr) minmax(110px, 0.8fr) minmax(90px, 0.7fr);
  gap: 12px;
  min-width: 560px;
  padding: 12px 0;
  border-bottom: 1px solid #ecf0f4;
}

.payment-table-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payment-status {
  color: var(--success);
  font-weight: 800;
}

.receipt-card,
.help-card {
  display: grid;
  gap: 14px;
}

.download-receipt {
  justify-content: flex-start;
  min-height: 42px;
  padding: 0;
  color: var(--primary);
  background: transparent;
  font-size: 18px;
}

.download-receipt span {
  display: inline-grid;
  width: 28px;
  place-items: center;
  color: #243142;
  font-size: 28px;
}

.download-receipt:disabled {
  color: var(--subtle);
  cursor: not-allowed;
}

.meta-receipt-wrap {
  display: grid;
  gap: 12px;
}

.meta-receipt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meta-receipt-toolbar h2 {
  font-size: 18px;
}

.meta-receipt-preview {
  position: relative;
  display: grid;
  min-height: 620px;
  padding: 32px 36px 28px;
  color: #121826;
  background: #ffffff;
  border: 1px solid #d8dee8;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  aspect-ratio: 595 / 842;
  overflow: hidden;
}

.meta-receipt-header,
.meta-receipt-summary,
.meta-receipt-campaign-head,
.meta-receipt-line-item,
.meta-receipt-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.meta-receipt-header {
  align-items: flex-start;
}

.meta-receipt-header h3 {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.25;
}

.meta-receipt-header p,
.meta-receipt-paid p,
.meta-receipt-campaign p {
  margin: 0;
}

.meta-receipt-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
}

.meta-receipt-logo span {
  width: 30px;
  height: 18px;
  border: 4px solid #1166d8;
  border-radius: 999px;
}

.meta-receipt-rule,
.meta-receipt-campaign,
.meta-receipt-campaign-head {
  border-top: 1px solid #c3cad5;
}

.meta-receipt-rule {
  height: 1px;
  margin: 14px 0 38px;
}

.meta-receipt-summary {
  align-items: flex-start;
}

.meta-receipt-facts {
  display: grid;
  gap: 20px;
  margin: 0;
}

.meta-receipt-facts div,
.meta-receipt-footer div {
  display: grid;
  gap: 3px;
}

.meta-receipt-facts dt {
  font-weight: 700;
}

.meta-receipt-facts dd {
  margin: 0;
  font-weight: 800;
}

.meta-receipt-paid {
  display: grid;
  justify-items: end;
  gap: 12px;
  text-align: right;
}

.meta-receipt-paid strong {
  font-size: 18px;
}

.meta-receipt-paid span {
  font-size: 36px;
  letter-spacing: 0;
}

.meta-receipt-campaign {
  margin-top: 50px;
  padding-top: 28px;
}

.meta-receipt-campaign h4 {
  margin: 0 0 16px;
  font-size: 16px;
}

.meta-receipt-campaign-head {
  align-items: center;
  padding: 12px 0;
}

.meta-receipt-line-item {
  padding: 14px 0 12px;
  border-top: 1px dashed #c3cad5;
  border-bottom: 1px solid #c3cad5;
}

.meta-receipt-line-item span:nth-child(2) {
  margin-left: auto;
}

.meta-receipt-footer {
  align-items: end;
  margin-top: auto;
  color: #8b93a4;
}

.meta-receipt-footer div:last-child {
  justify-items: end;
  text-align: right;
}

.meta-receipt-empty {
  display: grid;
  gap: 8px;
}

.help-card button {
  justify-content: flex-start;
  min-height: auto;
  padding: 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
  white-space: normal;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.dashboard-header h1 {
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
}

.dashboard-header p {
  margin-top: 6px;
  color: var(--muted);
}

.date-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--small-shadow);
}

.metric-card {
  position: relative;
  display: grid;
  min-height: 164px;
  min-width: 0;
  padding: 15px;
  overflow: hidden;
  background: var(--surface-muted);
  border: 1px solid #e4e9ef;
  border-radius: var(--radius);
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.metric-card strong {
  margin-top: 8px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.metric-card small {
  display: grid;
  gap: 10px;
  align-self: end;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.metric-card small::before {
  content: "+12.4%";
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
  background: var(--success-soft);
  border-radius: 999px;
}

.metric-card small::after {
  content: "";
  display: block;
  width: min(92px, 100%);
  height: 26px;
  border-bottom: 2px solid rgba(22, 131, 61, 0.78);
  background:
    linear-gradient(135deg, transparent 0 22%, rgba(22, 131, 61, 0.16) 22% 28%, transparent 28% 43%, rgba(22, 131, 61, 0.16) 43% 50%, transparent 50%),
    linear-gradient(to top, rgba(22, 131, 61, 0.12), transparent);
  border-radius: 4px;
}

.metric-card::after {
  content: "More";
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.recent-ads,
.suggestions,
.funds-card,
.recharge-panel,
.success-panel,
.create-ad-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--small-shadow);
}

.recent-ads {
  min-width: 0;
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h2,
.suggestions h2,
.funds-card h2 {
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-heading button {
  min-height: 36px;
  color: var(--primary);
  background: var(--primary-soft);
}

.recent-ad-list {
  display: grid;
  gap: 10px;
}

.recent-ad {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.85fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid #e3e8ef;
  border-radius: var(--radius);
}

.recent-ad-main {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.recent-ad-status {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.recent-ad-status span {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  color: #17603a;
  font-size: 12px;
  font-weight: 800;
  background: var(--success-soft);
  border-radius: 999px;
  overflow-wrap: anywhere;
}

.status-paused .recent-ad-status span,
.status-draft .recent-ad-status span {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-insufficient_balance .recent-ad-status span {
  color: var(--danger);
  background: var(--danger-soft);
}

.recent-ad-status small {
  color: var(--subtle);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.creative-preview {
  min-width: 0;
}

.creative-preview strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.creative-preview p {
  display: -webkit-box;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.creative-preview small {
  display: block;
  margin-top: 6px;
  color: var(--subtle);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.recent-ad-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(56px, 1fr));
  gap: 8px;
  min-width: 0;
}

.recent-ad-metrics div,
.funds-card dl div,
.receipt-list div {
  min-width: 0;
}

.recent-ad-metrics dt,
.funds-card dt,
.receipt-list dt {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.recent-ad-metrics dd {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.text-button {
  min-width: 92px;
  min-height: 34px;
  padding: 0 10px;
  color: var(--primary);
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.dashboard-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.suggestions,
.funds-card {
  padding: 18px;
}

.suggestions {
  display: grid;
  gap: 12px;
}

.suggestion-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid #e5eaf0;
  border-radius: var(--radius);
}

.suggestion-card strong,
.suggestion-card p,
.funds-card p {
  overflow-wrap: anywhere;
}

.suggestion-card strong {
  font-size: 14px;
}

.suggestion-card p,
.funds-card p {
  color: var(--muted);
  font-size: 13px;
}

.funds-card {
  display: grid;
  gap: 14px;
}

.funds-card dl,
.receipt-list {
  display: grid;
  gap: 10px;
}

.funds-card dl div,
.receipt-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ecf0f4;
}

.funds-card dd,
.receipt-list dd {
  font-weight: 850;
  text-align: right;
  overflow-wrap: anywhere;
}

.funds-card .primary-button {
  width: 100%;
}

.funds-actions {
  display: grid;
  gap: 10px;
}

.funds-actions .primary-button,
.funds-actions .secondary-button,
.funds-actions .download-receipt {
  justify-content: center;
  width: 100%;
  min-height: 40px;
}

.funds-actions .download-receipt {
  padding: 0 12px;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
}

.page-recharge,
.page-success {
  display: grid;
  min-height: calc(100vh - 70px);
  place-items: center;
  padding-top: 34px;
  padding-bottom: 48px;
}

.recharge-panel,
.success-panel {
  width: min(100%, 560px);
  padding: 28px;
}

.recharge-panel h1,
.success-panel h1 {
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
}

.recharge-panel > p,
.success-panel > p {
  margin-top: 8px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.recharge-panel form,
.create-ad-card form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.recharge-panel label,
.create-ad-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.recharge-panel input,
.create-ad-card input,
.create-ad-card textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.create-ad-card textarea {
  min-height: 104px;
  resize: vertical;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preset-row button {
  color: #334155;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.recharge-panel form > p,
.create-ad-card form > p {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.recharge-panel .primary-button,
.success-actions .primary-button,
.success-actions .secondary-button,
.create-ad-card .primary-button {
  min-height: 44px;
}

.success-panel {
  position: relative;
  padding-top: 78px;
}

.success-panel::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 28px;
  width: 34px;
  height: 34px;
  background:
    linear-gradient(45deg, transparent 48%, #ffffff 48% 56%, transparent 56%),
    var(--success);
  border-radius: 999px;
}

.receipt-list {
  margin-top: 22px;
}

.success-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.create-ad-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
}

.create-ad-backdrop {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  background: rgba(16, 24, 40, 0.46);
  border-radius: 0;
}

.create-ad-card {
  height: 100vh;
  max-height: 100vh;
  padding: 20px;
  overflow-y: auto;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  animation: drawer-in 180ms ease-out;
}

@keyframes drawer-in {
  from {
    transform: translateX(28px);
    opacity: 0.72;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.create-ad-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.create-ad-heading h2 {
  font-size: 20px;
  line-height: 1.2;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  padding: 0;
  color: #475569;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

@media (max-width: 1100px) {
  .ads-shell {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .sidebar {
    padding: 14px 8px;
  }

  .brand-logo-button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px;
  }

  .brand-logo-copy,
  .account-switcher span,
  .account-switcher select {
    font-size: 0;
  }

  .brand-logo-copy {
    display: none;
  }

  .account-switcher {
    display: none;
  }

  .nav-item {
    min-height: 44px;
    height: 44px;
    justify-content: center;
    padding: 5px 6px;
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: anywhere;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    grid-template-columns: 1fr;
  }

  .payment-layout {
    grid-template-columns: 1fr;
  }

  .recent-ad {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .recent-ad-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .text-button {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 13px;
  }

  .ads-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-logo-button {
    grid-template-columns: 44px minmax(0, 1fr);
    justify-items: stretch;
  }

  .brand-logo-copy {
    display: flex;
  }

  .brand-logo-copy strong,
  .brand-logo-copy span {
    white-space: normal;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-item {
    height: auto;
    justify-content: flex-start;
    min-height: 38px;
    padding: 0 10px;
    font-size: 12px;
    text-overflow: clip;
    white-space: normal;
  }

  .topbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding: 14px;
  }

  .topbar-copy strong {
    white-space: normal;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
  }

  .topbar-actions .secondary-button,
  .topbar-actions .primary-button {
    width: 100%;
    min-height: 40px;
    padding: 0 8px;
  }

  .page {
    padding: 16px 12px 28px;
  }

  .dashboard-header {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-header,
  .payment-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .account-pill {
    width: 100%;
  }

  .compact-actions {
    flex-direction: row;
    align-items: stretch;
  }

  .compact-actions .secondary-button {
    flex: 1 1 auto;
  }

  .auto-pay-banner {
    grid-template-columns: 1fr;
  }

  .dashboard-header h1,
  .payment-header h1,
  .recharge-panel h1,
  .success-panel h1 {
    font-size: 24px;
  }

  .date-actions {
    justify-content: stretch;
  }

  .date-actions button {
    flex: 1 1 140px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .metric-card {
    min-height: 146px;
  }

  .dashboard-side,
  .success-actions,
  .preset-row {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading button {
    width: 100%;
  }

  .recent-ads,
  .suggestions,
  .funds-card,
  .payment-card,
  .auto-pay-banner,
  .recharge-panel,
  .success-panel {
    padding: 14px;
  }

  .recent-ad-main,
  .recent-ad-metrics {
    grid-template-columns: 1fr;
  }

  .recent-ad {
    padding: 12px;
  }

  .text-button {
    width: 100%;
  }

  .funds-card dl div,
  .receipt-list div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .funds-card dd,
  .receipt-list dd {
    text-align: left;
  }

  .success-panel {
    padding-top: 62px;
  }

  .success-panel::before {
    top: 16px;
    left: 14px;
  }

  .create-ad-panel {
    grid-template-columns: 1fr;
  }

  .create-ad-backdrop {
    display: none;
  }

  .create-ad-card {
    width: 100%;
    border-left: 0;
  }
}

@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;
  }
}

.summary-shell {
  grid-template-columns: 454px minmax(0, 1fr);
  background:
    radial-gradient(circle at 6% 6%, rgba(250, 226, 234, 0.7), transparent 28%),
    radial-gradient(circle at 98% 78%, rgba(226, 248, 241, 0.88), transparent 25%),
    linear-gradient(135deg, #fbf7fa 0%, #f4f7ff 54%, #f7fbfb 100%);
}

.summary-shell .sidebar {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: transparent;
  border-right: 0;
  overflow: hidden;
}

.side-rail {
  display: grid;
  grid-template-rows: 86px 70px minmax(0, 1fr);
  align-items: start;
  height: 100vh;
  padding: 26px 10px 18px;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid #e3e8ef;
}

.loop-logo {
  color: #2d63d8;
  font-size: 58px;
  font-weight: 800;
  line-height: 0.72;
  text-align: center;
  letter-spacing: 0;
}

.account-bubble {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: 6px auto 0;
  color: #2870d9;
  font-weight: 850;
  background: #dff4ff;
  border: 1px solid #b8e1f3;
  border-radius: 999px;
}

.rail-icons {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin-top: 20px;
}

.rail-icon {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #26333f;
  font-size: 24px;
  font-weight: 800;
  border-radius: 8px;
}

.rail-icon.active {
  color: #ffffff;
  background: #25303a;
}

.rail-icon.has-dot::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: #a22b2b;
  border-radius: 999px;
}

.sidebar-panel {
  min-width: 0;
  height: 100vh;
  padding: 32px 32px 22px 42px;
  overflow-y: auto;
}

.summary-shell .brand-logo-slot {
  display: none;
}

.sidebar-page-title h1 {
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.sidebar-page-title p {
  margin-top: 4px;
  color: #1f2933;
  font-size: 20px;
  line-height: 1.28;
}

.summary-shell .sidebar-nav {
  gap: 14px;
  margin-top: 32px;
}

.mobile-function-links {
  display: none;
}

.summary-shell .nav-item {
  justify-content: flex-start;
  min-height: 52px;
  padding: 0 16px;
  color: #1f2933;
  font-size: 22px;
  font-weight: 820;
  border-radius: 5px;
}

.summary-shell .nav-item.active {
  color: #ffffff;
  background: #26343f;
  box-shadow: none;
}

.sidebar-kicker {
  display: block;
  margin: 18px 0 4px;
  color: #1f2933;
  font-size: 16px;
}

.summary-shell .topbar {
  position: static;
  justify-content: flex-end;
  min-height: 92px;
  padding: 28px 42px 10px;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.summary-shell .topbar-copy {
  display: none;
}

.summary-shell .topbar-actions {
  gap: 14px;
}

.summary-shell .secondary-button,
.summary-shell .primary-button,
.summary-shell .date-range-button,
.summary-shell .filter-button,
.summary-shell .outline-button,
.summary-shell .performance-button {
  min-height: 48px;
  border: 1px solid #b9c5d2;
  border-radius: 5px;
  font-size: 18px;
}

.summary-shell .partner-help {
  padding: 0 18px;
  color: #1f2933;
  background: rgba(255, 255, 255, 0.8);
}

.summary-shell .primary-button {
  padding: 0 22px;
  background: #3f73bd;
  border-color: #3f73bd;
}

.summary-shell .avatar {
  width: 52px;
  height: 52px;
  background: #eef3fa;
  color: #2b63cf;
  border: 1px solid #d9e1ea;
}

.page-summary {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px 42px 48px 10px;
}

.ads-page-title {
  margin: -72px 0 26px;
  max-width: 720px;
}

.ads-page-title h1 {
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.ads-page-title p {
  margin-top: 4px;
  color: #1f2933;
  font-size: 20px;
}

.ads-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 22px;
  align-items: start;
}

.ads-dashboard-main,
.dashboard-side {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.summary-panel,
.recent-ads,
.suggestions,
.funds-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e0e6ee;
  border-radius: 7px;
  box-shadow: 0 18px 42px rgba(31, 41, 51, 0.08);
}

.summary-panel {
  grid-column: 1 / -1;
  padding: 16px;
}

.summary-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.summary-panel h2,
.recent-ads h2,
.suggestions h2,
.funds-card h2 {
  font-size: 24px;
  line-height: 1.2;
}

.summary-panel-head p {
  margin-top: 2px;
  color: #1f2933;
  font-size: 19px;
}

.summary-panel .date-actions {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
}

.summary-panel .date-range-button {
  min-width: 468px;
  padding: 0 18px;
  color: #1f2933;
  background: #ffffff;
  white-space: nowrap;
}

.summary-panel .filter-button {
  width: 54px;
  padding: 0;
  color: #1f2933;
  background: #ffffff;
  font-size: 24px;
}

.summary-panel .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.summary-panel .metric-card {
  min-height: 252px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #ccd6e3;
  border-radius: 5px;
}

.summary-panel .metric-card h3 {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #1f2933;
  font-size: 18px;
  line-height: 1.2;
}

.summary-panel .metric-card::after,
.summary-panel .metric-card small::before,
.summary-panel .metric-card small::after {
  content: none;
}

.metric-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
  color: #1f2933;
  font-size: clamp(36px, 3.1vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.metric-number span {
  color: #2f7658;
  font-size: 18px;
}

.summary-panel .sparkline {
  width: 100%;
  height: 58px;
  margin-top: 18px;
}

.summary-panel .sparkline polyline {
  fill: none;
  stroke: #3d7d88;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-empty {
  display: flex;
  align-items: center;
  min-height: 84px;
  color: #1f2933;
  font-size: 42px;
  font-weight: 800;
}

.outline-button {
  width: 100%;
  margin-top: auto;
  color: #1f2933;
  background: #ffffff;
}

.recent-ads {
  padding: 18px 20px;
}

.recent-ads .section-heading {
  margin-bottom: 18px;
}

.recent-ads .section-heading button {
  display: none;
}

.recent-ad-list {
  gap: 16px;
}

.recent-ad {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 18px;
  border: 1px solid #cfd8e5;
  border-radius: 9px;
}

.recent-ad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.recent-ad-status {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.recent-ad-status span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  color: #a92323;
  font-size: 15px;
  background: #fdecec;
  border-radius: 999px;
}

.status-paused .recent-ad-status span,
.status-draft .recent-ad-status span {
  color: #526070;
  background: #f3f5f7;
  border: 1px solid #ccd6e3;
}

.recent-ad-status small {
  color: #1f2933;
  font-size: 15px;
}

.performance-button {
  padding: 0 16px;
  color: #1f2933;
  background: #ffffff;
}

.recent-ad-divider {
  height: 1px;
  margin: 20px 0;
  background: #cfd8e5;
}

.recent-ad-body {
  display: grid;
  grid-template-columns: 76px minmax(240px, 1fr) minmax(420px, 1.25fr);
  gap: 20px;
  align-items: center;
}

.ad-thumb {
  width: 66px;
  height: 66px;
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.32) 0 10%, transparent 10% 20%, rgba(255, 255, 255, 0.32) 20% 30%, transparent 30%),
    linear-gradient(135deg, #243448 0%, #243448 44%, #f5cc4e 45%, #f5cc4e 64%, #e36e63 65%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.creative-preview p {
  color: #1f2933;
  font-size: 14px;
  -webkit-line-clamp: unset;
}

.creative-preview strong {
  margin-top: 8px;
  color: #1f2933;
  font-size: 19px;
  text-decoration: underline;
}

.creative-preview small {
  color: #657386;
  font-size: 14px;
}

.summary-shell .recent-ad-metrics {
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 22px;
}

.summary-shell .recent-ad-metrics dd {
  color: #1f2933;
  font-size: 23px;
  font-weight: 500;
}

.summary-shell .recent-ad-metrics dt {
  color: #657386;
  font-size: 16px;
  font-weight: 500;
}

.dashboard-side .suggestions {
  min-height: 242px;
  padding: 20px;
}

.suggestion-card {
  min-height: 170px;
  place-items: center;
  align-content: center;
  text-align: center;
  background: transparent;
  border: 0;
}

.done-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #2f7658;
  font-size: 21px;
  font-weight: 900;
  border: 2px solid #2f7658;
  border-radius: 999px;
}

.suggestion-card strong {
  font-size: 24px;
}

.suggestion-card p {
  max-width: 330px;
  color: #657386;
  font-size: 18px;
}

.summary-shell .funds-card {
  padding: 18px;
}

.summary-shell .funds-card p {
  color: #657386;
  font-size: 16px;
  line-height: 1.42;
}

.summary-shell .funds-actions .download-receipt {
  min-height: 48px;
  color: #1f2933;
  background: #ffffff;
  border-color: #b9c5d2;
  border-radius: 5px;
  font-size: 18px;
}

.assistant-float {
  position: fixed;
  right: 28px;
  bottom: 20px;
  width: 66px;
  height: 66px;
  min-height: 66px;
  padding: 0;
  color: #8547e6;
  font-size: 42px;
  line-height: 1;
  background: #ffffff;
  border: 1px solid #dbe1e8;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(35, 42, 54, 0.18);
}

@media (max-width: 520px) {
  .summary-shell {
    grid-template-columns: 360px minmax(0, 1fr);
  }

  .sidebar-panel {
    padding-right: 20px;
    padding-left: 24px;
  }

  .ads-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .summary-panel .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .summary-shell {
    display: block;
  }

  .summary-shell .sidebar {
    position: static;
    grid-template-columns: 1fr;
    height: auto;
  }

  .side-rail {
    display: none;
  }

  .sidebar-panel {
    height: auto;
    padding: 12px;
  }

  .summary-shell .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-function-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
  }

  .mobile-function-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 10px;
    color: #1f2933;
    font-size: 12px;
    font-weight: 800;
    background: #ffffff;
    border: 1px solid #cfd8e5;
    border-radius: 6px;
  }

  .summary-shell .nav-item {
    min-height: 42px;
    font-size: 14px;
  }

  .summary-shell .topbar {
    padding: 14px;
  }

  .summary-shell .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 52px;
    width: 100%;
  }

  .page-summary {
    padding: 14px;
  }

  .ads-page-title {
    margin: 0 0 16px;
  }

  .summary-panel-head,
  .recent-ad-head {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-panel .date-actions {
    flex-wrap: wrap;
  }

  .summary-panel .date-range-button {
    min-width: 0;
    width: 100%;
  }

  .summary-panel .metric-grid,
  .recent-ad-body,
  .summary-shell .recent-ad-metrics {
    grid-template-columns: 1fr;
  }
}

.ads-shell.summary-shell {
  grid-template-columns: 530px minmax(0, 1fr);
  background: linear-gradient(90deg, #ffffff 0 530px, #eef4fb 530px 100%);
}

.summary-shell .sidebar,
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 530px;
  height: 100vh;
  padding: 34px 20px 0;
  overflow-y: auto;
  background: #ffffff;
  border-right: 1px solid #edf1f7;
}

.meta-brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  padding: 2px 12px 0;
  color: #1f2933;
}

.meta-mark {
  width: 54px;
  height: 44px;
  flex: 0 0 auto;
}

.meta-mark path {
  stroke: #4d73e6;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meta-brand strong {
  font-size: 44px;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

.account-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 24px;
  width: 100%;
  min-height: 118px;
  margin-top: 50px;
  margin-bottom: 40px;
  padding: 0 26px 0 28px;
  color: #111827;
  text-align: left;
  background: #ffffff;
  border: 1px solid #ccd4df;
  border-radius: 8px;
}

.account-avatar-stack {
  position: relative;
  display: block;
  width: 78px;
  height: 76px;
}

.account-placeholder,
.account-image {
  position: absolute;
  top: 2px;
  left: 18px;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(224, 247, 251, 0.9), rgba(191, 225, 236, 0.9)),
    radial-gradient(circle at 30% 30%, #f6ffff, #b9dce7);
  box-shadow: 0 0 0 1px #c9dbe4;
}

.account-placeholder::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.38);
}

.account-image {
  object-fit: cover;
  background: #ffffff;
}

.instagram-badge,
.facebook-badge {
  position: absolute;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 0 4px #ffffff;
}

.instagram-badge {
  right: 0;
  top: 26px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 32% 106%, #ffd76f 0 15%, transparent 16%),
    linear-gradient(135deg, #6d5dfb, #d831a8 54%, #ff6a3d);
}

.instagram-badge::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 3px solid #ffffff;
  border-radius: 6px;
}

.instagram-badge::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 999px;
}

.facebook-badge {
  left: 28px;
  bottom: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #4378f2;
  font-family: Arial, sans-serif;
  font-size: 31px;
  line-height: 1;
}

.account-name {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chevron {
  width: 34px;
  height: 34px;
  color: #26333f;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-shell .sidebar-nav,
.sidebar-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 0;
}

.menu-link,
.summary-shell .menu-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  min-height: 88px;
  padding: 0 20px 0 28px;
  color: #26333f;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.15;
}

.menu-link:hover {
  background: #f2f5f8;
}

.menu-link.active {
  color: #ffffff;
  background: #2d3944;
}

.menu-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-dot {
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex: 0 0 auto;
  background: #a32926;
  border-radius: 999px;
}

.menu-link kbd {
  margin-left: auto;
  padding: 8px 15px;
  color: #65707b;
  background: #f0f2f5;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 28px;
  line-height: 1.1;
}

.menu-help {
  margin-top: 8px;
  background: #f1f3f6;
}

.mobile-function-links {
  display: none;
}

@media (max-width: 520px) {
  .ads-shell.summary-shell {
    grid-template-columns: 430px minmax(0, 1fr);
    background: linear-gradient(90deg, #ffffff 0 430px, #eef4fb 430px 100%);
  }

  .summary-shell .sidebar,
  .sidebar {
    width: 430px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .meta-brand strong {
    font-size: 36px;
  }

  .account-card {
    min-height: 100px;
    margin-top: 34px;
    margin-bottom: 28px;
  }

  .account-name,
  .menu-link {
    font-size: 28px;
  }

  .menu-link {
    min-height: 72px;
    gap: 22px;
  }

  .menu-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .menu-link kbd {
    font-size: 22px;
  }
}

@media (max-width: 520px) {
  .ads-shell.summary-shell {
    display: block;
    background: #eef4fb;
  }

  .summary-shell .sidebar,
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 18px 14px;
    border-right: 0;
    border-bottom: 1px solid #edf1f7;
  }

  .meta-brand strong {
    font-size: 30px;
  }

  .meta-mark {
    width: 44px;
    height: 36px;
  }

  .account-card {
    grid-template-columns: 70px minmax(0, 1fr) 30px;
    min-height: 78px;
    margin-top: 20px;
    margin-bottom: 18px;
    padding: 0 14px;
  }

  .account-avatar-stack {
    transform: scale(0.76);
    transform-origin: left center;
  }

  .account-name,
  .menu-link {
    font-size: 18px;
  }

  .summary-shell .sidebar-nav,
  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .menu-link {
    min-height: 48px;
    gap: 10px;
    padding: 0 12px;
    border-radius: 8px;
  }

  .menu-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .menu-dot {
    width: 8px;
    height: 8px;
  }

  .menu-link kbd {
    padding: 4px 7px;
    font-size: 12px;
  }
}

:root {
  --suite-sidebar-width: clamp(280px, 22vw, 320px);
  --suite-sidebar-pad-x: 14px;
  --suite-brand-font-size: 27px;
  --suite-menu-font-size: 19px;
  --suite-shortcut-font-size: 13px;
  --suite-menu-height: 50px;
  --suite-icon-size: 24px;
  --suite-account-height: 68px;
}

.ads-shell.summary-shell {
  grid-template-columns: var(--suite-sidebar-width) minmax(0, 1fr);
  background: linear-gradient(90deg, #ffffff 0 var(--suite-sidebar-width), #eef4fb var(--suite-sidebar-width) 100%);
}

.summary-shell .sidebar,
.sidebar {
  width: var(--suite-sidebar-width);
  padding: 16px var(--suite-sidebar-pad-x) 0;
}

.meta-brand {
  gap: 8px;
  padding: 0 5px;
}

.meta-mark {
  width: 36px;
  height: 28px;
}

.meta-brand strong {
  font-size: var(--suite-brand-font-size);
  line-height: 1;
}

.account-card {
  grid-template-columns: 50px minmax(0, 1fr) 24px;
  gap: 12px;
  min-height: var(--suite-account-height);
  margin-top: 20px;
  margin-bottom: 16px;
  padding: 0 14px;
}

.account-avatar-stack {
  width: 50px;
  height: 48px;
}

.account-placeholder,
.account-image {
  left: 8px;
  width: 38px;
  height: 38px;
}

.instagram-badge {
  width: 20px;
  height: 20px;
}

.facebook-badge {
  width: 23px;
  height: 23px;
  font-size: 19px;
}

.account-name {
  font-size: var(--suite-menu-font-size);
}

.account-chevron {
  width: 24px;
  height: 24px;
}

.summary-shell .sidebar-nav,
.sidebar-nav {
  grid-template-columns: 1fr;
  gap: 5px;
}

.menu-link,
.summary-shell .menu-link {
  min-height: var(--suite-menu-height);
  gap: 14px;
  padding: 0 16px;
  font-size: var(--suite-menu-font-size);
}

.menu-icon {
  width: var(--suite-icon-size);
  height: var(--suite-icon-size);
  flex-basis: var(--suite-icon-size);
}

.menu-dot {
  width: 8px;
  height: 8px;
}

.menu-link kbd {
  padding: 4px 8px;
  font-size: var(--suite-shortcut-font-size);
}

@media (max-width: 900px) {
  :root {
    --suite-sidebar-pad-x: 12px;
    --suite-brand-font-size: 27px;
    --suite-menu-font-size: 19px;
    --suite-shortcut-font-size: 13px;
    --suite-menu-height: 50px;
    --suite-icon-size: 24px;
    --suite-account-height: 68px;
  }

  .ads-shell.summary-shell {
    display: grid;
    grid-template-columns: var(--suite-sidebar-width) minmax(0, 1fr);
    background: linear-gradient(90deg, #ffffff 0 var(--suite-sidebar-width), #eef4fb var(--suite-sidebar-width) 100%);
  }

  .summary-shell .sidebar,
  .sidebar {
    position: sticky;
    top: 0;
    width: var(--suite-sidebar-width);
    height: 100vh;
    min-height: 0;
    padding: 16px var(--suite-sidebar-pad-x) 0;
    border-right: 1px solid #edf1f7;
    border-bottom: 0;
  }

  .summary-shell .sidebar-nav,
  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .main-shell {
    min-width: 0;
    width: 100%;
  }

  .summary-shell .topbar {
    min-height: 68px;
    padding: 12px 8px 6px;
  }

  .summary-shell .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 6px;
  }

  .summary-shell .secondary-button,
  .summary-shell .primary-button,
  .summary-shell .date-range-button,
  .summary-shell .filter-button,
  .summary-shell .outline-button,
  .summary-shell .performance-button {
    min-height: 38px;
    font-size: 14px;
  }

  .page-summary {
    padding: 12px 8px 24px;
    overflow-x: hidden;
  }

  .ads-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    min-width: 0;
  }

  .summary-panel,
  .recent-ads,
  .suggestions,
  .funds-card {
    width: 100%;
    min-width: 0;
    padding: 10px;
  }

  .summary-panel-head {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
  }

  .summary-panel h2,
  .recent-ads h2,
  .suggestions h2,
  .funds-card h2 {
    font-size: 19px;
  }

  .summary-panel-head p {
    font-size: 13px;
    line-height: 1.35;
  }

  .summary-panel .date-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .summary-panel .date-range-button {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
    padding: 0 10px;
    white-space: normal;
  }

  .summary-panel .filter-button {
    width: 42px;
    font-size: 18px;
  }

  .summary-panel .metric-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .summary-panel .metric-card {
    min-height: 0;
    padding: 10px;
  }

  .summary-panel .metric-card h3 {
    font-size: 14px;
  }

  .metric-number {
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 24px;
  }

  .metric-number span {
    font-size: 13px;
  }

  .summary-panel .sparkline {
    height: 32px;
    margin-top: 8px;
  }

  .recent-ad-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .summary-shell .recent-ad-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 520px) {
  :root {
    --suite-sidebar-pad-x: 8px;
    --suite-brand-font-size: 22px;
    --suite-menu-font-size: 16px;
    --suite-shortcut-font-size: 11px;
    --suite-menu-height: 42px;
    --suite-icon-size: 20px;
    --suite-account-height: 58px;
  }

  .meta-mark {
    width: 30px;
    height: 24px;
  }

  .account-card {
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 0 10px;
  }

  .account-avatar-stack {
    transform: none;
    width: 40px;
    height: 40px;
  }

  .account-placeholder,
  .account-image {
    left: 6px;
    width: 31px;
    height: 31px;
  }

  .instagram-badge {
    top: 16px;
    width: 17px;
    height: 17px;
  }

  .facebook-badge {
    left: 15px;
    width: 19px;
    height: 19px;
    font-size: 16px;
  }

  .menu-link,
  .summary-shell .menu-link {
    gap: 10px;
    padding: 0 12px;
  }
}

.create-ad-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  padding: 24px;
  background: rgba(17, 24, 39, 0.44);
}

.create-ad-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.create-ad-card {
  position: relative;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  height: auto;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  animation: create-modal-in 160ms ease-out;
}

@keyframes create-modal-in {
  from {
    transform: translateY(14px);
    opacity: 0.72;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.create-ad-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #e4e9f1;
}

.create-ad-heading h2 {
  font-size: 22px;
  line-height: 1.18;
}

.create-ad-heading p {
  margin-top: 5px;
  color: #647184;
  font-size: 13px;
  line-height: 1.35;
}

.create-ad-form {
  display: grid;
  gap: 0;
  margin: 0;
  max-height: calc(100vh - 122px);
  overflow-y: auto;
}

.create-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 22px;
  background: #f7f9fc;
  border-bottom: 1px solid #e4e9f1;
}

.create-tab {
  min-height: 38px;
  padding: 0 14px;
  color: #334155;
  background: transparent;
  border: 1px solid transparent;
}

.create-tab.is-active {
  color: #0f55bc;
  background: #ffffff;
  border-color: #bfd6f7;
  box-shadow: 0 6px 18px rgba(23, 105, 224, 0.1);
}

.create-tab-panel {
  display: grid;
  gap: 14px;
  padding: 18px 22px 20px;
}

.create-tab-panel[hidden],
.ai-result[hidden],
.ai-empty[hidden],
.ai-loading[hidden] {
  display: none !important;
}

.create-section {
  min-width: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
}

.create-section-heading {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.create-section-heading > span {
  display: grid;
  min-height: 34px;
  place-items: center;
  color: #0f55bc;
  font-size: 12px;
  font-weight: 850;
  background: #e8f1ff;
  border-radius: 6px;
}

.create-section-heading h3,
.ai-preview h3 {
  color: #111827;
  font-size: 16px;
  line-height: 1.22;
}

.create-section-heading p,
.ai-preview p,
.upload-box p,
.create-footer p,
.ai-empty {
  color: #647184;
  font-size: 13px;
  line-height: 1.38;
}

.create-field-grid,
.ai-summary-grid,
.ai-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.create-field-grid label,
.ai-summary-grid label,
.ai-copy-grid label,
.field-group {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #546174;
  font-size: 12px;
  font-weight: 800;
}

.create-ad-card input,
.create-ad-card select,
.create-ad-card textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.create-ad-card textarea {
  min-height: 96px;
  resize: vertical;
}

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

.field-group {
  padding: 0;
  margin: 0;
  border: 0;
}

.field-group legend {
  padding: 0;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  cursor: pointer;
}

.choice-pill input {
  width: 14px;
  min-height: 14px;
  padding: 0;
  accent-color: #1769e0;
}

.switch-field {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  background: #f8fafc;
  border: 1px solid #d7dee8;
  border-radius: 8px;
}

.switch-field input {
  width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: #1769e0;
}

.budget-preview {
  margin-top: 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
}

.budget-preview h4,
.ai-result h4 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 14px;
}

.budget-preview dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.budget-preview div {
  min-width: 0;
}

.budget-preview dt {
  color: #647184;
  font-size: 12px;
}

.budget-preview dd {
  margin-top: 3px;
  color: #111827;
  font-size: 15px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.upload-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #f9fbfd;
  border: 1px dashed #aebbd0;
  border-radius: 8px;
}

.add-material-button {
  margin-top: 12px;
}

.ai-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(320px, 1.04fr);
  gap: 14px;
  align-items: start;
}

.ai-steps {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ai-step {
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.ai-generate-button {
  min-height: 44px;
  width: min(240px, 100%);
}

.ai-loading {
  margin-top: 10px;
  color: #0f55bc;
  font-weight: 800;
}

.ai-preview {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  background: linear-gradient(180deg, #eef6ff, #ffffff 42%);
  border: 1px solid #c9dcf7;
  border-radius: 8px;
}

.ai-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-preview-head span {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: #17603a;
  font-size: 12px;
  font-weight: 850;
  background: #e8f6ee;
  border-radius: 999px;
}

.ai-empty {
  display: grid;
  min-height: 86px;
  place-items: center;
  padding: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed #b8cae5;
  border-radius: 8px;
}

.ai-result {
  display: grid;
  gap: 14px;
}

.ai-copy-grid {
  grid-template-columns: 1fr;
}

.budget-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #ffffff;
}

.budget-plan-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 12px;
}

.budget-plan-table th,
.budget-plan-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #edf1f6;
}

.budget-plan-table th {
  color: #546174;
  font-weight: 850;
  background: #f8fafc;
}

.budget-plan-table td:nth-child(3) {
  color: #111827;
  font-weight: 850;
}

.material-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.material-plan-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
}

.material-plan-grid strong,
.material-plan-grid p,
.material-plan-grid small,
.material-plan-grid span {
  overflow-wrap: anywhere;
}

.material-plan-grid small {
  color: #111827;
  font-size: 12px;
}

.material-plan-grid span {
  color: #0f55bc;
  font-size: 12px;
  font-weight: 850;
}

.create-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 20%);
}

.create-footer > div {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.create-footer button {
  min-height: 42px;
}

.create-ad-card button:disabled {
  color: #94a3b8;
  background: #e8edf3;
  box-shadow: none;
  cursor: not-allowed;
}

.app-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 130;
  max-width: min(380px, calc(100vw - 32px));
  padding: 12px 14px;
  color: #111827;
  font-weight: 800;
  background: #ffffff;
  border: 1px solid #c8d6e8;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
}

@media (max-width: 900.98px) {
  .create-ad-panel {
    align-items: stretch;
    padding: 12px;
  }

  .create-ad-card {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .ai-workspace {
    grid-template-columns: 1fr;
  }

  .budget-preview dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .create-ad-panel {
    padding: 0;
  }

  .create-ad-card {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .create-ad-heading,
  .create-tabs,
  .create-tab-panel {
    padding-right: 14px;
    padding-left: 14px;
  }

  .create-tabs,
  .create-footer,
  .create-footer > div {
    flex-direction: column;
    align-items: stretch;
  }

  .create-tab {
    width: 100%;
  }

  .create-field-grid,
  .ai-summary-grid {
    grid-template-columns: 1fr;
  }

  .budget-preview dl {
    grid-template-columns: 1fr;
  }

  .create-section-heading {
    grid-template-columns: 34px minmax(0, 1fr);
  }
}
