:root {
  --nav: #172620;
  --nav-muted: #98aea3;
  --ink: #20352b;
  --muted: #7d8d85;
  --green: #247a57;
  --mint: #eaf5ee;
  --line: #e5eae6;
  --paper: #ffffff;
  --bg: #f6f8f5;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #80b699; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .5; }
svg { flex-shrink: 0; }
.boot { padding: 80px; text-align: center; color: var(--muted); }
.sidebar { width: 240px; position: fixed; inset: 0 auto 0 0; background: var(--nav); color: #f6fcf8; padding: 30px 20px 22px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 4px); gap: 3px; padding: 9px; border: 1px solid #496457; border-radius: 9px; }
.brand-mark i { width: 4px; height: 4px; border-radius: 1px; background: #c1e5cd; }
.brand-name { font-size: 20px; font-weight: 650; letter-spacing: -.6px; }
.brand-name small { display: block; font-size: 10px; font-weight: 400; letter-spacing: 2.2px; color: var(--nav-muted); }
.side-caption { font-size: 10px; letter-spacing: 1.7px; color: var(--nav-muted); margin: 35px 12px 11px; }
.app-card { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid #3d5146; border-radius: 10px; background: #20362b; }
.app-icon { width: 37px; height: 37px; border-radius: 10px; background: #dbeccb; color: #2d573d; display: grid; place-items: center; font: 650 24px/1 Georgia, serif; }
.app-card strong { font-size: 14px; font-weight: 550; }
.app-card small { display: block; font-size: 11px; color: #a4b8ab; }
.app-card .app-selected { margin-left: auto; font-size: 13px; color: #b7d7be; }
.app-switch-label { margin: 10px 2px 5px; color: var(--nav-muted); font-size: 11px; }
.app-switch { width: 100%; min-width: 0; flex-shrink: 0; }
.nav { display: grid; gap: 7px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: #b1c3b8; border-radius: 9px; font-size: 13px; }
.nav a:hover { background: #243b2f; color: #fff; }
.nav a.active { color: #e9ffef; background: #335140; }
.nav a.active::after { content: ""; width: 5px; height: 5px; background: #bfe2c7; border-radius: 50%; margin-left: auto; }
.sidebar-foot { margin-top: auto; padding: 24px 10px 0; }
.sidebar-foot button { color: #dbecdf; background: none; border: 0; padding: 8px 0; display: flex; gap: 10px; align-items: center; }
.sidebar-foot p { font-size: 10px; color: var(--nav-muted); margin: 18px 0 0; letter-spacing: .7px; }
.workspace { margin-left: 240px; }
.topbar { height: 72px; padding: 0 38px; background: rgba(255,255,255,.85); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.breadcrumb { font-size: 12px; color: var(--muted); display: flex; gap: 12px; align-items: center; }
.breadcrumb strong { color: #41594b; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.status { color: #61786a; background: #eff4ee; border: 1px solid #dfe7de; border-radius: 20px; display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; font-size: 11px; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; background: #a6b69f; border-radius: 50%; }
.status.live { background: #eaf6ee; color: #2a7651; }
.status.live::before { background: #3c9567; }
.status.error { background: #fff3ed; color: #a96746; border-color: #ecd9ca; }
.timezone { font: 11px/1.4 monospace; color: var(--muted); }
.avatar { border-radius: 50%; width: 30px; height: 30px; background: #e8eee7; display: grid; place-items: center; color: #59745f; font-size: 10px; font-weight: 650; }
.main { max-width: 1640px; margin: 0 auto; padding: 32px 38px 25px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; color: #809287; margin-bottom: 7px; }
h1 { font-size: 27px; margin: 0 0 6px; font-weight: 650; letter-spacing: -.7px; }
.page-head p { color: var(--muted); font-size: 12px; margin: 0; }
.actions { display: flex; gap: 9px; }
.btn { height: 36px; border: 1px solid #dce4dc; border-radius: 8px; background: #fff; color: #506757; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; font-size: 12px; white-space: nowrap; }
.btn:hover { background: #f1f6f0; border-color: #b7cabb; }
.btn.primary { background: #2b6c4e; color: #fff; border-color: #2b6c4e; }
.btn.primary:hover { background: #235a40; }
.btn.small { height: 29px; padding: 0 10px; font-size: 11px; }
.filterbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 0 21px; border-top: 1px solid var(--line); }
.filter-label { font-size: 11px; color: #758478; }
.presets { display: flex; gap: 3px; background: #eaf0e7; border-radius: 7px; padding: 3px; }
.presets button { font-size: 11px; border: 0; background: transparent; color: #718171; padding: 5px 11px; border-radius: 5px; }
.presets button.active { background: #fff; color: #34513b; box-shadow: 0 1px 4px #cfd8cd; }
.dates { display: flex; align-items: center; gap: 7px; color: #a3ada2; }
input[type=date], select { height: 31px; border: 1px solid #dce4d9; background: #fff; color: #556c5b; border-radius: 6px; padding: 0 8px; font-size: 11px; }
.filter-end { margin-left: auto; font-size: 10px; color: #929c90; }
.notice { display: flex; gap: 12px; align-items: center; padding: 14px 17px; background: #eef3e8; border: 1px solid #dfe7d5; border-radius: 10px; margin-bottom: 22px; }
.notice-icon { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #cfddc3; background: #e6eddc; color: #698455; border-radius: 9px; flex: 0 0 auto; }
.notice strong { display: block; font-size: 12px; font-weight: 550; color: #4d6342; }
.notice p { margin: 2px 0 0; font-size: 11px; color: #7b8b6f; }
.notice .btn { margin-left: auto; }
.notice.error { background: #fff3eb; border-color: #efdbcc; }
.notice.error strong { color: #926142; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 21px 15px; position: relative; min-height: 153px; }
.kpi.featured { background: #edf5ee; border-color: #d5e5d6; }
.kpi-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #718477; }
.kpi-label svg { color: #a7b6a6; }
.kpi-value { font-size: 33px; font-weight: 600; letter-spacing: -1px; margin: 12px 0 11px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-value small { margin-left: 5px; font-size: 11px; font-weight: 400; color: #8b9a8b; letter-spacing: 0; }
.kpi-foot { padding-top: 10px; border-top: 1px solid #edf0e9; font-size: 10px; color: #8a988b; }
.featured .kpi-foot { border-color: #dde9dc; }
.kpis.five { grid-template-columns: repeat(5,minmax(0,1fr)); }
.grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 20px; margin-bottom: 22px; align-items: stretch; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; margin-bottom: 22px; }
.grid > .panel { margin-bottom: 0; }
.panel-head { padding: 18px 21px 13px; display: flex; gap: 15px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.panel-head h2 { font-size: 13px; font-weight: 600; margin: 0; }
.panel-head p { font-size: 10px; color: #8c9c8e; margin: 3px 0 0; }
.panel-head .more { color: #758c76; font-size: 10px; display: inline-flex; gap: 5px; align-items: center; }
.tag { color: #7e8e7b; background: #f0f4ec; border: 1px solid #e6ebdf; border-radius: 5px; padding: 3px 7px; font-size: 9px; font-weight: 400; white-space: nowrap; }
.tag.admob { background: #edf3fc; color: #607da5; border-color: #e1e9f6; }
.tag.max { background: #f4effa; color: #8a72a1; border-color: #e9e1f1; }
.panel-body { padding: 3px 21px 21px; }
.chart-box { position: relative; height: 236px; width: 100%; }
.line-chart { width: 100%; height: 100%; display: block; }
.chart-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9baa97; gap: 8px; pointer-events: none; }
.chart-empty span { font-size: 11px; }
.chart-empty svg { opacity: .45; }
.legend { display: flex; gap: 13px; font-size: 10px; color: #8d9b8b; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.platform-list { display: grid; gap: 15px; padding-top: 11px; }
.platform-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.platform-brand { display: flex; align-items: center; gap: 9px; }
.platform-icon { width: 28px; height: 28px; background: #eff3f9; color: #6d83a5; border-radius: 7px; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.platform-icon.max { color: #8c71a8; background: #f2eef8; }
.platform-brand strong { font-size: 12px; font-weight: 550; }
.platform-brand small { display: block; font-size: 10px; color: #95a18f; }
.platform-value { text-align: right; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.platform-value small { display: block; font-size: 9px; color: #9ca697; font-weight: 400; }
.meter { height: 5px; border-radius: 5px; background: #eff2eb; overflow: hidden; margin-top: 9px; }
.meter i { display: block; height: 100%; border-radius: 5px; background: #789cba; }
.meter i.max { background: #ad99bd; }
.platform-total { display: flex; justify-content: space-between; border-top: 1px solid #edf0e7; padding-top: 14px; margin-top: 18px; font-size: 11px; color: #87967f; }
.platform-total strong { color: #426348; font-size: 14px; }
.table-scroll { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { text-align: left; font-weight: 500; color: #8b9988; font-size: 10px; padding: 11px 21px; background: #f8faf5; border-block: 1px solid #ecf0e7; white-space: nowrap; }
td { padding: 14px 21px; border-bottom: 1px solid #eef1eb; color: #58705c; white-space: nowrap; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcf9; }
td strong { color: #354e3a; font-weight: 550; }
.num { text-align: right; }
.point { display: inline-flex; align-items: center; gap: 8px; }
.point i { width: 6px; height: 6px; border-radius: 50%; background: #98b594; }
.point small { color: #9aa791; display: block; font-size: 9px; }
.empty-row td { text-align: center; height: 126px; color: #a0ac99; white-space: normal; }
.empty-row strong { display: block; font-weight: 400; color: #8b9c80; margin-bottom: 4px; }
.empty-row span { font-size: 10px; color: #a9b2a1; }
.table-foot { padding: 11px 21px; border-top: 1px solid #edf1e7; color: #9aa692; font-size: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ad-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.ad-filters label { font-size: 11px; color: #84917c; display: flex; gap: 7px; align-items: center; }
.ad-filters p { width: 100%; margin: 0; font-size: 10px; color: #9ba793; }
.quality { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; padding-top: 6px; }
.quality-item { border-left: 2px solid #dae6d3; padding-left: 12px; }
.quality-item strong { font-size: 12px; font-weight: 500; }
.quality-item p { margin: 5px 0 8px; font-size: 10px; color: #909e86; line-height: 1.7; }
.quality-item small { font-size: 10px; color: #789465; }
.search { border: 1px solid #dce4d6; border-radius: 6px; height: 31px; padding: 0 10px; width: 190px; color: #526d51; font-size: 11px; }
.pagination { display: flex; gap: 8px; align-items: center; }
.cell-ret { min-width: 100px; text-align: center; }
.cell-ret small { display: block; font-size: 9px; color: #92a086; margin-top: 3px; }
.cell-ret.complete { background: #eef7ed; color: #326442; }
.cell-ret.pending { color: #a2ad99; }
.ret-note { padding: 14px 21px; background: #f8faf5; border-top: 1px solid #e9eee3; font-size: 10px; color: #8c9b81; }
.footer { font-size: 10px; color: #9aa693; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 17px; border-top: 1px solid var(--line); }
.footer .dot { width: 4px; height: 4px; background: #a3b79a; border-radius: 50%; display: inline-block; margin-right: 5px; }
dialog { border: 1px solid #dce7d9; border-radius: 16px; width: min(720px,calc(100% - 30px)); max-height: 88vh; padding: 0; background: #fff; color: var(--ink); box-shadow: 0 24px 100px #142c2433; }
dialog::backdrop { background: #10231a66; backdrop-filter: blur(3px); }
.dialog-head { position: sticky; top: 0; padding: 21px 25px 17px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: space-between; z-index: 1; }
.dialog-head h2 { font-size: 17px; margin: 0; }
.dialog-body { padding: 20px 25px 25px; }
.dialog-body h3 { font-size: 13px; font-weight: 600; margin: 22px 0 8px; }
.dialog-body h3:first-child { margin-top: 0; }
.dialog-body p, .dialog-body li { font-size: 12px; color: #7a8d77; }
.dialog-body code { font: 11px/1.6 monospace; background: #f2f5ee; padding: 2px 4px; border-radius: 3px; }
.endpoint { display: flex; gap: 10px; align-items: center; padding: 12px; background: #f5f8f1; border-radius: 8px; overflow-wrap: anywhere; }
.endpoint span { background: #dcecd8; color: #4b7342; border-radius: 4px; padding: 2px 5px; font: 10px monospace; }
.endpoint code { word-break: break-all; }
.dialog-body input[type=password] { width: 100%; height: 37px; border: 1px solid #dce4d5; border-radius: 6px; padding: 0 10px; margin: 5px 0 9px; }
.dialog-body textarea { resize: vertical; min-height: 125px; width: 100%; padding: 12px; border: 1px solid #dce4d5; border-radius: 7px; color: #40593c; font: 11px/1.6 monospace; }
.import-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.file-label { display: flex; align-items: center; max-width: 70%; }
.file-label input { font-size: 11px; width: 100%; }
.form-result { min-height: 20px; font-size: 11px; margin-top: 9px; color: #557748; overflow-wrap: anywhere; }
.form-result.error { color: #ab6548; }
.toast { position: fixed; bottom: 24px; left: calc(50% + 120px); transform: translateX(-50%); background: #203c2d; border-radius: 8px; padding: 11px 18px; color: #e9f3e6; font-size: 12px; z-index: 100; max-width: calc(100% - 32px); display: none; }
.toast.visible { display: block; }
.loading { opacity: .55; pointer-events: none; }
@media (min-width:1600px) { .main { padding-top: 38px; } .kpi { min-height: 168px; } .chart-box { height: 272px; } }
@media (max-width:1200px) {
  .sidebar { width: 210px; padding-inline: 15px; }
  .workspace { margin-left: 210px; }
  .main { padding: 26px 24px; }
  .topbar { padding-inline: 24px; }
  .grid { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 16px; }
  .kpi { padding: 17px; }
  .kpi-value { font-size: 28px; }
  .kpis.five { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .toast { left: calc(50% + 105px); }
}
@media (max-width:980px) {
  .grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-end { width: 100%; margin-left: 0; }
  .quality { grid-template-columns: 1fr; gap: 20px; }
  .page-head { align-items: flex-start; }
}
@media (max-width:720px) {
  .sidebar { position: static; width: auto; padding: 15px 16px 0; display: block; }
  .brand { padding: 0; }
  .brand-name { font-size: 17px; }
  .brand-name small { display: none; }
  .side-caption, .app-card, .sidebar-foot { display: none; }
  .nav { display: flex; margin-top: 13px; overflow: auto; gap: 3px; padding-bottom: 8px; }
  .nav a { font-size: 11px; padding: 9px 10px; gap: 6px; white-space: nowrap; }
  .nav a.active::after { display: none; }
  .nav svg { width: 14px; }
  .workspace { margin-left: 0; }
  .topbar { height: 50px; padding: 0 16px; }
  .breadcrumb { font-size: 10px; gap: 7px; }
  .topbar-right { gap: 8px; }
  .timezone, .avatar { display: none; }
  .main { padding: 23px 16px; }
  h1 { font-size: 24px; }
  .page-head { display: block; }
  .actions { margin-top: 16px; }
  .filterbar { gap: 9px; }
  .dates { flex-wrap: wrap; }
  .notice { align-items: flex-start; padding: 12px; gap: 9px; flex-wrap: wrap; }
  .notice .btn { margin-left: 40px; }
  .kpis, .kpis.five { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .kpi { min-height: 141px; padding: 15px 13px; }
  .kpi-label { font-size: 11px; }
  .kpi-value { font-size: 27px; }
  .kpi-foot { font-size: 9px; }
  .panel-head { padding: 16px; }
  .panel-body { padding: 3px 16px 17px; }
  th, td { padding-inline: 16px; }
  .footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .toast { left: 50%; }
  .dialog-body, .dialog-head { padding-inline: 18px; }
  .search { width: 155px; }
}
@media (prefers-reduced-motion:no-preference) {
  .btn, .nav a { transition: background .15s, border-color .15s; }
}
