:root {
  --primary: #6D3CFF;
  --secondary: #8B5CF6;
  --success: #22C55E;
  --warning: #F59E0B;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --soft: #F8FAFC;
  --card: #FFFFFF;
  --shadow: 0 24px 70px rgba(15, 23, 42, .10);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 34px 40px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(109, 60, 255, .10), transparent 32rem),
    linear-gradient(180deg, #fff 0%, var(--soft) 100%);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.theme-dark {
  --ink: #F8FAFC;
  --muted: #94A3B8;
  --line: rgba(148, 163, 184, .22);
  --soft: #111827;
  --card: #182235;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  background:
    radial-gradient(circle at top left, rgba(109, 60, 255, .18), transparent 32rem),
    linear-gradient(180deg, #070B16 0%, #101827 100%);
}

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

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

body.auth-checking .admin-sidebar,
body.auth-checking .admin-shell,
body.auth-locked .admin-sidebar,
body.auth-locked .admin-shell {
  display: none;
}

.auth-lock {
  min-height: calc(100vh - 68px);
  grid-column: 1 / -1;
}

.auth-screen {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 900px);
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .10);
  text-align: left;
}

.auth-intro,
.auth-qr-panel {
  min-width: 0;
}

.auth-logo {
  display: block;
  width: 170px;
  height: auto;
  margin: 0 0 22px;
}

.auth-card h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.04;
  letter-spacing: 0;
}

.auth-card p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.auth-qr-panel {
  display: grid;
  justify-items: center;
}

.auth-qr-wrap {
  width: 100%;
  min-height: 310px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #F8FAFC;
}

.auth-qr {
  width: min(100%, 280px);
  height: auto;
  display: block;
}

.auth-loading {
  color: var(--muted);
  font-weight: 800;
}

.auth-meta {
  margin-top: 16px;
}

.auth-expiry {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-weight: 900;
}

.auth-error {
  min-height: 22px;
  margin-top: 12px;
  color: #B42318;
  font-weight: 800;
}

.auth-steps {
  display: grid;
  gap: 10px;
  margin: 24px 0 22px;
  text-align: left;
}

.auth-steps span {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: #475569;
  font-weight: 800;
}

.auth-store-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-store-buttons a {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.auth-store-buttons a:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 60, 255, .28);
  box-shadow: 0 14px 30px rgba(109, 60, 255, .14);
}

.auth-store-buttons small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.store-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #F1F5F9;
}

.store-icon::before {
  content: "";
  display: block;
}

.store-icon-ios::before {
  width: 15px;
  height: 18px;
  border-radius: 8px 8px 10px 10px;
  background: #0F172A;
  box-shadow: 5px -7px 0 -4px #0F172A;
}

.store-icon-android::before {
  width: 18px;
  height: 16px;
  border-radius: 8px 8px 5px 5px;
  background: var(--success);
  box-shadow: -8px 5px 0 -6px var(--success), 8px 5px 0 -6px var(--success);
}

.admin-sidebar {
  position: sticky;
  top: 34px;
  z-index: 20;
  width: auto;
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 34px 26px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 34px 0 0 34px;
  background: #F8FAFC;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0;
  color: var(--ink);
}

.brand-logo {
  display: block;
  width: 154px;
  max-width: 100%;
  height: auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 24px rgba(109, 60, 255, .28);
}

.brand-mark span {
  width: 14px;
  height: 14px;
  border: 3px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.brand-mark span::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -3px;
  width: 7px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.admin-sidebar nav {
  display: grid;
  gap: 13px;
  margin-top: 28px;
}

.admin-sidebar nav a {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 18px;
  border-radius: 16px;
  color: #475569;
  font-size: 18px;
  font-weight: 800;
  transition: color .2s ease, background .2s ease;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  color: var(--primary);
  background: #F1EDFF;
}

.nav-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: inline-grid;
  place-items: center;
  color: #475569;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: currentColor;
}

.admin-sidebar nav a:hover .nav-icon,
.admin-sidebar nav a.active .nav-icon {
  color: var(--primary);
}

.admin-note {
  margin-top: auto;
  padding: 16px;
  border-radius: 18px;
  background: #FFF7ED;
  color: #9A3412;
}

.admin-note span {
  font-weight: 900;
}

.admin-note p {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.admin-shell {
  width: auto;
  min-width: 0;
  min-height: calc(100vh - 68px);
  margin-left: 0;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 0 34px 34px 0;
  background: rgba(255, 255, 255, .96);
  box-shadow: 28px 28px 80px rgba(15, 23, 42, .08);
}

.admin-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 11px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  font-size: 12px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(109, 60, 255, .28);
  box-shadow: 0 16px 38px rgba(109, 60, 255, .13);
}

.theme-toggle-track {
  width: 42px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: #E2E8F0;
}

.theme-toggle-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 12px rgba(15, 23, 42, .16);
  transition: transform .2s ease, background .2s ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-track {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(14px);
  background: #0F172A;
}

.primary-button,
.ghost-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 28px rgba(109, 60, 255, .28);
}

.ghost-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.full {
  width: 100%;
}

.no-screens-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(109, 60, 255, .2);
  border-radius: 26px;
  padding: 22px;
  background:
    radial-gradient(circle at 12% 20%, rgba(0, 178, 255, .12), transparent 28%),
    linear-gradient(135deg, rgba(109, 60, 255, .1), rgba(5, 197, 167, .08)),
    var(--card);
  box-shadow: var(--shadow-soft);
}

.no-screens-banner h2 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.no-screens-banner p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

body.no-screens-attached .top-performance,
body.no-screens-attached [data-overview-current-runs] {
  opacity: .72;
}

.attach-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(14px);
}

.attach-screen-overlay[hidden] {
  display: none;
}

.attach-screen-dialog {
  position: relative;
  width: min(100%, 460px);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  background: var(--card);
  box-shadow: var(--shadow-strong);
  text-align: center;
}

.attach-screen-dialog h2 {
  margin: 6px 0;
  color: var(--ink);
  font-size: 28px;
}

.attach-screen-dialog p {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.attach-screen-qr {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  color: var(--muted);
  font-weight: 900;
  background: #fff;
}

.attach-screen-qr img {
  display: block;
  width: min(100%, 300px);
  height: auto;
  border-radius: 16px;
}

.attach-screen-status {
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 900;
}

.attach-screen-status strong {
  color: var(--ink);
  letter-spacing: .08em;
}

.admin-account {
  position: relative;
}

.account-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: rgba(109, 60, 255, .28);
  box-shadow: 0 16px 38px rgba(109, 60, 255, .13);
}

.account-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.account-copy {
  min-width: 0;
  display: grid;
  text-align: left;
}

.account-copy strong {
  max-width: 150px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.account-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748B;
  border-bottom: 2px solid #64748B;
  transform: rotate(45deg) translateY(-2px);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 230px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, .14);
}

.account-dropdown-name {
  display: grid;
  gap: 2px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line);
}

.account-dropdown-name strong {
  font-size: 14px;
  font-weight: 900;
}

.account-dropdown-name span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-dropdown button {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: #F8FAFC;
  color: #B42318;
  cursor: pointer;
  font-weight: 900;
  text-align: left;
  padding: 0 10px;
}

.account-dropdown button:hover {
  background: #FEF3F2;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

body.theme-dark .admin-shell,
body.theme-dark .auth-card,
body.theme-dark .hero-panel,
body.theme-dark .metric-grid article,
body.theme-dark .panel {
  background: rgba(24, 34, 53, .88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

body.theme-dark .admin-sidebar {
  background: rgba(12, 18, 31, .92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}

body.theme-dark .theme-toggle,
body.theme-dark .account-button,
body.theme-dark .account-dropdown,
body.theme-dark .ghost-button,
body.theme-dark .menu-button,
body.theme-dark .screen-picker {
  background: #101827;
  color: var(--ink);
}

body.theme-dark .account-dropdown button,
body.theme-dark .auth-qr-wrap,
body.theme-dark .tab-bar,
body.theme-dark .performance-chart-card,
body.theme-dark .payout-card,
body.theme-dark .sample-card,
body.theme-dark .download-row,
body.theme-dark .tips-list p,
body.theme-dark .action-list a,
body.theme-dark .ad-detail-grid div,
body.theme-dark .overlay-card input,
body.theme-dark .overlay-card select,
body.theme-dark .settings-grid input,
body.theme-dark .inventory-range input,
body.theme-dark .inventory-create-form input,
body.theme-dark .inventory-screen-cell input,
body.theme-dark .inventory-mini-grid input,
body.theme-dark .inventory-select select,
body.theme-dark .inventory-stats span,
body.theme-dark .inventory-advertiser,
body.theme-dark .screen-name-edit-button,
body.theme-dark .screen-name-edit input,
body.theme-dark .payout-schedule-grid div {
  background: rgba(15, 23, 42, .9);
}

body.theme-dark .account-dropdown button:hover,
body.theme-dark .action-list a:hover {
  background: rgba(109, 60, 255, .18);
}

body.theme-dark .chart-grid line {
  stroke: rgba(148, 163, 184, .2);
}

body.theme-dark .chart-dots circle {
  fill: #101827;
}

body.theme-dark .tag.neutral {
  color: #CBD5E1;
  background: rgba(148, 163, 184, .18);
}

body.theme-dark .screen-detail-metrics article {
  background: linear-gradient(180deg, rgba(24, 34, 53, .94), rgba(15, 23, 42, .9));
}

body.theme-dark .danger-mini-button {
  border-color: rgba(248, 113, 113, .28);
  background: rgba(127, 29, 29, .28);
  color: #FCA5A5;
}

body.theme-dark .ad-review-detail-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, .92), rgba(49, 46, 129, .34));
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: center;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
}

.hero-panel p {
  max-width: 690px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  margin-bottom: 18px;
  padding: 0 12px;
  border-radius: 999px;
  color: #15803D;
  background: #DCFCE7;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-card {
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #17132f, var(--primary));
}

.hero-card span,
.hero-card a {
  color: rgba(255, 255, 255, .76);
  font-weight: 800;
}

.hero-card strong {
  display: block;
  margin: 10px 0 22px;
  font-size: 28px;
  line-height: 1.1;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 18px 0;
}

.top-performance {
  margin-bottom: 18px;
}

.metric-grid article,
.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
}

.metric-grid article {
  padding: 20px;
}

.metric-grid span,
.payout-card span,
.sample-card span,
.download-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-grid strong,
.payout-card strong {
  display: block;
  margin: 8px 0;
  font-size: 32px;
}

.metric-grid em {
  color: #15803D;
  font-style: normal;
  font-weight: 900;
}

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

.panel {
  padding: 22px;
}

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

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

.panel-heading h2 {
  margin: 0;
  font-size: 24px;
}

.panel-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.account-buy-manual {
  flex-basis: 100%;
  width: 100%;
}

.account-buy-manual label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-buy-manual input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(109, 60, 255, .32);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

.tab-bar {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.tab-bar button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.tab-bar button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 24px rgba(109, 60, 255, .22);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

td {
  font-weight: 800;
}

.ad-creative {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 260px;
}

.ad-creative strong,
.ad-creative em {
  display: block;
}

.ad-creative strong {
  line-height: 1.15;
}

.ad-creative em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.creative-thumb {
  width: 62px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(109, 60, 255, .16);
  border-radius: 14px;
  background: #F8FAFC;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
  overflow: hidden;
  position: relative;
}

.creative-thumb.image.rental {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .08), rgba(109, 60, 255, .22)),
    linear-gradient(160deg, #E0F2FE 0 42%, #FFFFFF 42% 48%, #C4B5FD 48% 100%);
}

.creative-thumb.image.restaurant {
  background:
    radial-gradient(circle at 72% 28%, #FDE68A 0 9px, transparent 10px),
    linear-gradient(135deg, #DCFCE7 0 45%, #FFFFFF 45% 51%, #A7F3D0 51% 100%);
}

.creative-thumb.image::after {
  content: "";
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  position: absolute;
  left: 10px;
  bottom: 9px;
}

.creative-thumb.video::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid currentColor;
}

.creative-thumb.video {
  color: #fff;
  background: linear-gradient(135deg, #312E81, var(--primary));
}

.creative-thumb.interactive::before,
.creative-thumb.website::before {
  color: currentColor;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}

.creative-thumb.interactive {
  color: var(--primary);
  background: #F1EDFF;
}

.creative-thumb.interactive::before {
  content: "INT";
}

.creative-thumb.website {
  color: #0369A1;
  background: #E0F2FE;
}

.creative-thumb.website::before {
  content: "WEB";
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions a,
.table-actions button,
.mini-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.table-actions a {
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 20px rgba(109, 60, 255, .18);
}

.screen-title-link {
  color: inherit;
  text-decoration: none;
  font-weight: 900;
}

.screen-title-link:hover {
  color: var(--primary);
}

.screen-name-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.screen-name-edit-button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.screen-name-edit-button:hover {
  border-color: rgba(109, 60, 255, .32);
  box-shadow: 0 10px 20px rgba(109, 60, 255, .14);
  transform: translateY(-1px);
}

.screen-name-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.screen-name-edit input {
  width: min(240px, 100%);
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
  outline: none;
}

.screen-name-edit input:focus {
  border-color: rgba(109, 60, 255, .55);
  box-shadow: 0 0 0 4px rgba(109, 60, 255, .12);
}

.screen-name-status {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.screen-id {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.screen-empty {
  padding: 32px 12px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

[data-refresh-screens][disabled] {
  cursor: wait;
  opacity: .68;
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 210px;
}

.mini-button.approve {
  color: #fff;
  border-color: transparent;
  background: var(--success);
}

.mini-button.deny {
  color: #fff;
  border-color: transparent;
  background: #EF4444;
}

.ad-review-open {
  overflow: hidden;
}

.ad-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(16px);
}

.ad-review-overlay[hidden] {
  display: none;
}

.ad-review-dialog {
  position: relative;
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, .92fr) minmax(420px, 1.08fr);
  gap: 22px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 32px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 38px 110px rgba(15, 23, 42, .32);
}

.ad-review-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.ad-review-copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 12px 12px 6px;
}

.ad-review-copy h2 {
  margin: 10px 0;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.ad-review-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.ad-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.ad-review-meta span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #4C1D95;
  background: #F3E8FF;
  font-size: 12px;
  font-weight: 900;
}

.ad-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ad-review-actions[hidden] {
  display: none;
}

.ad-review-actions .mini-button {
  min-height: 36px;
}

.ad-review-actions .mini-button.disabled {
  opacity: .45;
  pointer-events: none;
}

.ad-review-actions .replace {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.ad-review-actions .replace input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ad-review-action-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ad-review-action-status[data-tone="success"] {
  color: #047857;
}

.ad-review-action-status[data-tone="error"] {
  color: #D9364F;
}

.ad-review-feedback {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 16px;
  border: 2px solid rgba(217, 54, 79, .34);
  border-radius: 20px;
  background: linear-gradient(135deg, #FFF1F2, #FFF7ED);
  box-shadow: 0 14px 32px rgba(217, 54, 79, .12);
}

.ad-review-feedback[hidden] {
  display: none;
}

.ad-review-feedback strong {
  color: #9F1239;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ad-review-feedback p {
  margin: 0;
  color: #7F1D1D;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.5;
  white-space: pre-line;
}

.ad-review-detail-card {
  min-height: 0;
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(109, 60, 255, .16);
  border-radius: 22px;
  background: linear-gradient(180deg, #F8FAFC, #F4F0FF);
}

.ad-review-detail-card span {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #4C1D95;
  background: #EDE9FE;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ad-review-detail-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.ad-review-detail-card p {
  max-height: 350px;
  overflow: auto;
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  white-space: pre-line;
}

.ad-review-screen {
  min-height: 370px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 14px solid #0F172A;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 30%, rgba(124, 58, 237, .95), transparent 36%),
    linear-gradient(135deg, #111827 0%, #312E81 58%, #6D3CFF 100%);
  box-shadow: 0 24px 60px rgba(76, 29, 149, .28);
}

.ad-review-screen-top,
.ad-review-screen-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  color: rgba(255, 255, 255, .82);
  font-weight: 900;
}

.ad-review-screen-top strong {
  color: #fff;
}

.ad-review-media {
  min-height: 360px;
  flex: 1;
  margin: 0 22px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: rgba(15, 23, 42, .72);
}

.ad-review-media img,
.ad-review-media video,
.ad-review-media iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  border: 0;
}

.ad-review-media img,
.ad-review-media video {
  object-fit: contain;
  background: #020617;
}

.ad-review-media iframe {
  background: #fff;
}

.ad-review-media.empty,
.ad-review-media.link {
  min-height: 360px;
  padding: 18px;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.ad-review-media.link a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.tag.success {
  color: #15803D;
  background: #DCFCE7;
}

.tag.warning {
  color: #92400E;
  background: #FEF3C7;
}

.tag.neutral {
  color: #475569;
  background: #F1F5F9;
}

.tag.live {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.screen-detail-metrics {
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.screen-detail-metrics article {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .92));
}

.screen-detail-metrics article span {
  color: #64748B;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
}

.screen-detail-metrics article strong {
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.screen-detail-metrics article em {
  width: fit-content;
  margin-top: 2px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #047857;
  background: #D1FAE5;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
}

.screen-status-card {
  position: relative;
}

.danger-mini-button {
  width: fit-content;
  min-height: 34px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid rgba(239, 68, 68, .22);
  border-radius: 999px;
  background: #FEF2F2;
  color: #B91C1C;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.danger-mini-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(185, 28, 28, .12);
}

.danger-mini-button:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
  box-shadow: none;
}

.screen-detail-metrics article .screen-action-status {
  min-height: 0;
  margin-top: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.screen-detail-metrics article .screen-action-status[data-tone="success"] {
  color: #047857;
}

.screen-detail-metrics article .screen-action-status[data-tone="error"] {
  color: #B91C1C;
}

.orientation-card {
  align-content: start;
}

.orientation-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #F8FAFC;
}

.orientation-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: #64748B;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.orientation-toggle button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 24px rgba(109, 60, 255, .18);
}

.orientation-toggle button:disabled {
  cursor: wait;
  opacity: .72;
}

[data-orientation-status][data-tone="error"] {
  color: #B91C1C;
  background: #FEE2E2;
}

.batch-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.batch-item,
.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border-radius: 18px;
  background: #F8FAFC;
}

.batch-item {
  display: grid;
}

.batch-item.active {
  color: var(--primary);
  background: #F1EDFF;
}

.batch-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sample-card {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #F8FAFC;
}

.sample-card a {
  display: block;
  margin-top: 5px;
  color: var(--primary);
  font-weight: 900;
  word-break: break-word;
}

.screen-preview {
  padding: 20px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #17132f, #4325a8 58%, var(--primary));
}

.preview-top,
.preview-services {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.preview-top {
  margin-bottom: 26px;
  font-size: 13px;
  font-weight: 900;
}

.screen-preview h3 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1;
}

.screen-preview p {
  color: rgba(255, 255, 255, .78);
  font-weight: 700;
}

.preview-services span {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .13);
  font-size: 12px;
  font-weight: 900;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  padding: 14px 14px 14px 42px;
  border-radius: 16px;
  background: #F8FAFC;
  font-weight: 800;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  transform: translateY(-50%);
}

.check-list .done::before {
  border-color: var(--success);
  background: var(--success);
}

.payout-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: #F8FAFC;
}

.payout-summary-bottom {
  max-width: 640px;
}

.payout-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

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

.payout-schedule-grid div {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
}

.payout-schedule-grid span,
.payout-schedule-grid strong {
  display: block;
}

.payout-schedule-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.payout-schedule-grid strong {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.2;
}

.screen-picker {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.screen-picker select {
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
  outline: none;
}

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

.action-list {
  display: grid;
  gap: 12px;
}

.action-list a {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.action-list a:hover {
  border-color: rgba(109, 60, 255, .35);
  background: #F1EDFF;
  transform: translateY(-2px);
}

.action-list strong {
  font-size: 16px;
}

.action-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.tips-list {
  display: grid;
  gap: 14px;
}

.tips-list p {
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  background: var(--soft);
}

.tips-list strong,
.tips-list span {
  display: block;
}

.tips-list strong {
  margin-bottom: 6px;
  font-size: 17px;
}

.tips-list span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.overlay-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.overlay-card input,
.overlay-card select,
.overlay-card textarea {
  min-height: 44px;
  width: 100%;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #F8FAFC;
  font-weight: 800;
  outline: none;
}

.overlay-card textarea {
  min-height: 104px;
  padding-top: 12px;
  resize: vertical;
  line-height: 1.35;
}

.form-status {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.form-status[data-tone="success"] {
  color: #03834B;
}

.form-status[data-tone="error"] {
  color: #D9364F;
}

.inventory-range,
.inventory-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.inventory-create-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-range label,
.inventory-create-form label,
.inventory-screen-cell label,
.inventory-mini-grid label,
.inventory-select {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.inventory-range input,
.inventory-create-form input,
.inventory-screen-cell input,
.inventory-mini-grid input,
.inventory-select select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #F8FAFC;
  font-size: 14px;
  font-weight: 850;
  outline: none;
}

.inventory-table-wrap table {
  min-width: 1060px;
}

.inventory-screen-cell {
  min-width: 220px;
  display: grid;
  gap: 10px;
}

.inventory-mini-grid {
  min-width: 220px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.inventory-mini-grid.pricing {
  min-width: 250px;
}

.inventory-select {
  margin-top: 8px;
}

.inventory-stats {
  min-width: 150px;
  display: grid;
  gap: 8px;
}

.inventory-stats span {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: #F8FAFC;
  font-size: 12px;
  font-weight: 900;
}

.inventory-stats strong {
  color: var(--ink);
  font-size: 15px;
}

.inventory-stats .good {
  color: #047857;
  background: #D1FAE5;
}

.inventory-stats .warn {
  color: #B42318;
  background: #FEF3F2;
}

.inventory-advertisers {
  min-width: 190px;
  display: grid;
  gap: 8px;
}

.inventory-advertiser {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 14px;
  background: #F8FAFC;
}

.inventory-advertiser strong {
  font-size: 13px;
}

.inventory-advertiser em,
.inventory-muted {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.inventory-actions {
  min-width: 110px;
  display: grid;
  gap: 10px;
}

.inventory-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 999px;
  background: #F1EDFF;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.inventory-toggle input {
  accent-color: var(--primary);
}

.ad-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ad-detail-grid.highlight {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.ad-detail-grid div {
  padding: 15px;
  border-radius: 18px;
  background: #F8FAFC;
}

.ad-detail-grid.highlight div:nth-child(2) {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 28px rgba(109, 60, 255, .22);
}

.ad-detail-grid.highlight div:nth-child(2) span {
  color: rgba(255, 255, 255, .72);
}

.ad-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ad-detail-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.performance-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: stretch;
}

.top-performance .performance-chart-layout {
  grid-template-columns: minmax(0, 1fr);
}

.performance-chart-card {
  min-width: 0;
  padding: 18px 18px 10px;
  border-radius: 22px;
  background: #F8FAFC;
}

.chart-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.chart-card-heading strong {
  display: block;
  font-size: 20px;
}

.chart-card-heading span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chart-card-heading em {
  padding: 8px 12px;
  border-radius: 999px;
  color: #15803D;
  background: #DCFCE7;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.performance-line-chart {
  width: 100%;
  min-height: 240px;
}

.chart-grid line {
  stroke: #E2E8F0;
  stroke-width: 1;
}

.chart-area {
  fill: url(#adminChartFill);
}

.earnings-chart-area {
  fill: url(#earningsChartFill);
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 6;
  stroke-linecap: round;
}

.chart-dots circle {
  fill: #fff;
  stroke: var(--primary);
  stroke-width: 5;
}

.chart-labels text {
  fill: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.performance-kpis {
  display: grid;
  gap: 12px;
}

.performance-kpis div {
  display: grid;
  align-content: center;
  padding: 16px;
  border-radius: 18px;
  background: #F8FAFC;
}

.performance-kpis span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.performance-kpis strong {
  display: block;
  margin-top: 7px;
  font-size: 27px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.settings-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.settings-grid input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #F8FAFC;
  font-weight: 800;
}

@media (max-width: 1100px) {
  body {
    display: block;
    padding: 18px;
  }

  .admin-shell {
    width: 100%;
    min-height: auto;
    margin-left: 0;
    padding: 22px;
    border-radius: 28px;
  }

  .admin-sidebar {
    position: fixed;
    inset: 78px 18px auto;
    width: auto;
    min-height: auto;
    border-right: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .2s ease, transform .2s ease;
  }

  .nav-open .admin-sidebar {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-button {
    display: inline-block;
  }

  .hero-panel,
  .no-screens-banner,
  .metric-grid,
  .admin-grid,
  .settings-grid,
  .payout-schedule-grid,
  .inventory-range,
  .inventory-create-form,
  .ad-review-dialog,
  .ad-detail-grid.highlight,
  .performance-chart-layout,
  .ad-detail-grid {
    grid-template-columns: 1fr;
  }

  .ad-review-copy {
    padding-right: 48px;
  }
}

@media (max-width: 820px) {
  .auth-card {
    width: min(100%, 470px);
    grid-template-columns: 1fr;
    text-align: center;
  }

  .auth-logo {
    margin-inline: auto;
  }

  .auth-card p {
    margin-inline: auto;
  }
}

@media (max-width: 680px) {
  body {
    padding: 14px;
  }

  .admin-shell {
    width: 100%;
    margin-left: 0;
    padding: 16px;
  }

  .admin-header,
  .header-actions,
  .panel-heading,
  .batch-item,
  .download-row,
  .screen-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions .ghost-button,
  .header-actions .primary-button,
  .panel-actions,
  .panel-actions .ghost-button,
  .admin-account,
  .account-button {
    width: 100%;
  }

  .account-dropdown {
    left: 0;
    right: auto;
    width: 100%;
  }

  .screen-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 18px;
  }

  .screen-detail-metrics article {
    min-height: 0;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
  }

  .screen-detail-metrics article:nth-child(4),
  .screen-detail-metrics article:nth-child(5) {
    grid-column: 1 / -1;
  }

  .screen-detail-metrics article span {
    font-size: 11px;
  }

  .screen-detail-metrics article strong {
    font-size: 21px;
    line-height: 1.08;
  }

  .screen-detail-metrics article em {
    padding: 5px 8px;
    font-size: 11px;
  }

  .ad-review-overlay {
    align-items: start;
    overflow-y: auto;
    padding: 14px;
  }

  .ad-review-dialog {
    padding: 18px;
    border-radius: 24px;
  }

  .ad-review-screen {
    min-height: 320px;
  }

  .ad-review-media,
  .ad-review-media img,
  .ad-review-media video,
  .ad-review-media iframe,
  .ad-review-media.empty,
  .ad-review-media.link {
    min-height: 260px;
  }
}

@media (max-width: 430px) {
  .screen-detail-metrics {
    grid-template-columns: 1fr;
  }

  .screen-detail-metrics article:nth-child(4) {
    grid-column: auto;
  }
}
