:root {
  --ink: #172b28;
  --green: #184d40;
  --green-soft: #e9f1eb;
  --muted: #687972;
  --paper: #f6f7f3;
  --line: #e0e6de;
  --lime: #d7ef86;
  --red: #a62c2c;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 0;
  border-radius: 9px;
  padding: 11px 19px;
  background: var(--green);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover {
  background: #25624f;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1.5;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
.secondary,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 17px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #cbd5cc;
  border-radius: 7px;
  padding: 11px 12px;
  margin-top: 7px;
  background: #fff;
  color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #8cb5a2;
  outline-offset: 1px;
}
textarea {
  min-height: 132px;
  resize: vertical;
}
.login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-card {
  max-width: 430px;
  width: 100%;
  margin: auto;
  padding: 44px 28px;
}
.brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--green);
  color: var(--lime);
  font-weight: 800;
  font-size: 19px;
  font-style: italic;
  letter-spacing: -2px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  margin: 30px 0 15px;
  color: var(--muted);
}
#login-form {
  margin: 32px 0 24px;
}
#login-form button {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
#login-error,
#dialog-error {
  color: var(--red);
  font-size: 13px;
  margin: 12px 0;
  min-height: 18px;
}
.login-art {
  background: var(--green);
  color: var(--lime);
  position: relative;
  overflow: hidden;
  padding: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.art-word {
  font-size: clamp(32px, 5vw, 75px);
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1.14;
  z-index: 1;
}
.login-art p {
  margin-top: 30px;
  color: #c4d8cd;
  z-index: 1;
}
.court-line {
  position: absolute;
  border: 1px solid #aecbb64a;
  width: 80%;
  height: 75%;
  left: 10%;
  top: 12%;
  transform: rotate(-12deg);
}
.court-line.two {
  height: 35%;
  top: 32%;
}
.workspace {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  text-decoration: none;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 21px;
  font-weight: 700;
  margin: 0 7px 40px;
}
.brand small {
  display: block;
  font-weight: 400;
  margin-top: 4px;
  letter-spacing: 1px;
}
.nav-caption {
  font-size: 11px;
  color: #95a198;
  letter-spacing: 1px;
  margin-left: 14px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  padding: 13px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
nav a:hover,
nav a.active {
  background: var(--green-soft);
  color: var(--green);
}
nav a.active {
  font-weight: 700;
}
nav a span {
  font-size: 17px;
  width: 21px;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  padding: 20px 14px 0;
  color: var(--muted);
}
.sidebar-bottom p {
  font-size: 11px;
  color: #96a49c;
  margin: 12px 0 0;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #669f76;
  margin-right: 6px;
}
main {
  min-width: 0;
}
.topbar {
  height: 79px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  font-size: 12px;
  color: var(--muted);
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.text-button {
  background: none;
  color: var(--muted);
  padding: 7px;
  font-size: 12px;
}
.text-button:hover {
  background: var(--green-soft);
  color: var(--green);
}
#content {
  padding: 35px 40px;
  min-height: calc(100vh - 140px);
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 29px;
}
.page-heading h1 {
  margin: 0 0 6px;
  font-size: 28px;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 30px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  white-space: nowrap;
}
.pill.muted {
  background: #f0f1ee;
  color: #7d887f;
}
.pill.warn {
  background: #faf0d8;
  color: #85651b;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 25px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 23px;
}
.stat.featured {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.stat p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 17px;
}
.stat.featured p,
.stat.featured small {
  color: #b9d0c5;
}
.stat strong {
  font-size: 36px;
  font-weight: 600;
  display: block;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.panels {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  padding: 24px;
  margin-bottom: 24px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.panel-head h2 {
  font-size: 16px;
  margin: 0;
}
.chart {
  height: 210px;
  display: flex;
  align-items: flex-end;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 20px 10px 0;
  margin-bottom: 34px;
}
.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  font-size: 11px;
  color: var(--muted);
}
.bar {
  background: #b9d1bd;
  width: 80%;
  max-width: 40px;
  border-radius: 5px 5px 0 0;
  min-height: 3px;
  margin-top: 7px;
}
.bar-group:last-child .bar {
  background: var(--green);
}
.bar-group small {
  position: absolute;
  bottom: -24px;
  white-space: nowrap;
}
.status-row {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #f0f2ed;
  font-size: 13px;
}
.status-row:last-child {
  border: 0;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar input,
.toolbar select {
  width: auto;
  margin: 0;
  min-width: 180px;
}
.toolbar input {
  flex: 1;
  max-width: 360px;
}
.secondary-button {
  border: 1px solid #cbd5cc;
  background: white;
  color: var(--green);
}
.secondary-button:hover {
  background: var(--green-soft);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: #f7f9f5;
  white-space: nowrap;
}
th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid #edf0e9;
  vertical-align: middle;
}
td .sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
td button {
  font-size: 11px;
  padding: 7px 11px;
  margin: 3px 3px 3px 0;
}
td.actions {
  min-width: 125px;
}
code {
  font-size: 11px;
  background: #f2f4ef;
  padding: 3px 5px;
  border-radius: 4px;
  word-break: break-all;
}
.empty {
  padding: 48px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
footer {
  padding: 0 40px 25px;
  color: #94a096;
  font-size: 11px;
}
#notice {
  margin: 18px 40px 0;
  padding: 12px 17px;
  background: var(--green-soft);
  border: 1px solid #c5d8c7;
  border-radius: 8px;
  font-size: 13px;
}
#notice.error {
  background: #fdf0ec;
  border-color: #e8bdb0;
  color: var(--red);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 25px 80px #09291c30;
  padding: 26px;
  width: min(560px, calc(100vw - 28px));
  max-height: 90vh;
}
dialog::backdrop {
  background: #10251e66;
}
.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.dialog-head h2 {
  margin-bottom: 20px;
}
.dialog-actions {
  justify-content: flex-end;
  margin-top: 20px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.result-box {
  background: #f5f7f2;
  padding: 14px;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}
.integration-note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  border-left: 3px solid #d1dfbb;
  padding-left: 16px;
  margin-bottom: 24px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: 185px 1fr;
  }
  .sidebar {
    padding: 25px 12px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  #content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .panels {
    grid-template-columns: 1fr;
  }
  .login-art {
    padding: 40px;
  }
}
@media (max-width: 680px) {
  .login-wrap {
    display: block;
  }
  .login-art {
    display: none;
  }
  .login-card {
    padding-top: 50px;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 15px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin: 0 0 15px;
    font-size: 17px;
  }
  .brand small,
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
  }
  nav a {
    white-space: nowrap;
    padding: 10px;
    font-size: 12px;
    margin: 0;
  }
  nav a span {
    display: none;
  }
  .topbar {
    height: 55px;
    padding: 0 17px;
    font-size: 11px;
  }
  #content {
    padding: 22px 16px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading button {
    padding: 10px 12px;
    font-size: 12px;
  }
  .page-heading p {
    line-height: 1.6;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 28px;
  }
  .panel {
    padding: 17px;
  }
  .toolbar input,
  .toolbar select {
    min-width: 130px;
    max-width: 100%;
  }
  .chart {
    gap: 8px;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  #notice {
    margin: 15px 16px 0;
  }
  footer {
    padding: 0 16px 24px;
  }
  .topbar #identity {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.store-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  font-size: 12px;
}
.store-picker select {
  width: 220px;
}
.scope-option {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scope-option input {
  width: auto;
}

.marketing-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.marketing-tabs button {
  min-width: 110px;
}
.marketing-copy {
  max-width: 260px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.marketing-thumb {
  width: 112px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}
.marketing-poster {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
  margin: 12px 0;
}
.marketing-preview article {
  background: #f4f6f1;
  border: 1px solid #dbe4d9;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.marketing-preview p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
