/* 沿用 demo 的黑金配色,簡化成生產用 */
:root {
  --bg: #0d0d0d;
  --panel: #1a1a1a;
  --panel-2: #222;
  --gold: #d4a44a;
  --gold-light: #e8c074;
  --text: #e6e6e6;
  --text-dim: #888;
  --border: #2a2a2a;
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
}

[v-cloak] { display: none; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  padding: 24px;
}

#app {
  max-width: 1400px;
  margin: 0 auto;
}

/* topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.brand { display: flex; gap: 16px; align-items: center; }
.brand .logo { color: var(--gold); font-size: 32px; }
.brand h1 { font-size: 22px; font-weight: 600; color: var(--gold-light); }
.brand .subtitle { color: var(--text-dim); font-size: 12px; margin-top: 2px; }

.status { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-dim);
}
.dot.live {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.status .next { color: var(--text-dim); margin-left: 8px; }

/* panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}
.panel h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gold-light);
}
.panel h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text);
}

.row-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.row-flex h2 { margin-bottom: 0; }

/* gold price card */
.price-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 480px;
}
.price-card {
  background: linear-gradient(135deg, #1f1a13, #2a2218);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 20px;
}
.price-card .metal { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.price-card .symbol {
  font-size: 24px; font-weight: 700; color: var(--gold);
  letter-spacing: 1px;
}
.price-card .name { color: var(--text-dim); font-size: 13px; }
.price-card .value {
  font-size: 32px; font-weight: 700; color: var(--gold-light);
  margin-bottom: 8px;
}
.price-card .unit { font-size: 14px; color: var(--text-dim); margin-left: 4px; }
.price-card .meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-dim); }
.price-card .updated { font-size: 11px; color: var(--text-dim); margin-top: 8px; }

/* settings grid */
.settings-grid {
  display: grid;
  grid-template-columns: 220px 320px 1fr;
  gap: 24px;
  align-items: start;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field input {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}
.field input:focus { border-color: var(--gold); outline: none; }

.formula-box code {
  display: block;
  background: var(--panel-2);
  padding: 12px;
  border-radius: 4px;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--gold-light);
  border-left: 3px solid var(--gold);
}
.hint { font-size: 12px; color: var(--text-dim); margin-top: 8px; }

/* buttons */
button {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  margin-right: 8px;
  transition: opacity 0.15s;
}
button:hover { opacity: 0.85; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}
.actions .hint { margin-left: auto; }

/* table */
.member-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.member-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.member-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.member-table tr.enabled-row { background: rgba(212, 164, 74, 0.05); }
.member-table tr:hover { background: rgba(255, 255, 255, 0.02); }
.member-table .title-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-table .price { color: var(--gold-light); font-weight: 600; }
.member-table .meta-cell { font-size: 11px; color: var(--text-dim); }
.member-table .empty { text-align: center; color: var(--text-dim); padding: 32px; }
.member-table code { font-family: "SF Mono", Consolas, monospace; font-size: 11px; color: var(--text-dim); }

.cell-input {
  width: 80px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 12px;
}
.cell-input:focus { border-color: var(--gold); outline: none; }

/* push log */
.push-summary {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: var(--panel-2);
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
}
.push-summary .ok { color: var(--green); }
.push-summary .warn { color: var(--yellow); }
.push-summary .fail { color: var(--red); }

.log {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  max-height: 400px;
  overflow-y: auto;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 1.7;
}
.log .empty { color: var(--text-dim); text-align: center; padding: 24px; }
.log-line {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 2px 0;
  flex-wrap: wrap;
}
.log-line .time { color: var(--text-dim); min-width: 140px; }
.log-line .method { color: var(--gold); font-weight: 600; min-width: 30px; }
.log-line .path { color: var(--text); min-width: 200px; }
.log-line .payload { color: var(--text-dim); min-width: 120px; }
.log-line .status-tag { font-weight: 600; min-width: 60px; }
.log-line.ok .status-tag { color: var(--green); }
.log-line.failed .status-tag { color: var(--red); }
.log-line.retrying .status-tag { color: var(--yellow); }
.log-line .err-msg { color: var(--red); font-size: 10px; flex: 1; }

.desc {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 12px;
}
.desc code { font-family: "SF Mono", Consolas, monospace; font-size: 12px; color: var(--gold-light); }

footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
footer p { margin-bottom: 4px; }
