:root {
  --navy: #183149;
  --gold: #b88a44;
  --ink: #1f2933;
  --muted: #607080;
  --line: #d9e1e8;
  --bg: #f5f7fa;
  --card: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px 36px;
  background: var(--navy);
  color: white;
}

.admin-topbar h1,
.hero-card h2,
.panel h2,
.card h3 { margin: 0; }

.kicker {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
}

.front-link {
  color: white;
  border: 1px solid rgba(255,255,255,.35);
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
}

.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 32px auto;
}

.hero-card,
.panel,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(24,49,73,.08);
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 28px;
  padding: 28px;
  margin-bottom: 24px;
}

.hero-card p,
.card p,
.note {
  color: var(--muted);
  line-height: 1.55;
}

.status-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 8px;
  align-content: center;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #2ca66f;
}

.grid { display: grid; gap: 18px; }
.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.card { padding: 22px; }

.tag {
  display: inline-flex;
  margin-top: 8px;
  color: var(--navy);
  background: #eef3f7;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.panel { padding: 28px; }
.panel-header { margin-bottom: 18px; }

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

label span {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: #f9fbfd;
}

code {
  background: #eef3f7;
  padding: 2px 6px;
  border-radius: 6px;
}

@media (max-width: 850px) {
  .hero-card,
  .cards-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

.split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--navy);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.rate-group {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.rate-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.rate-group-header {
  margin-bottom: 16px;
}

.rate-group-header h3 {
  margin: 0 0 6px;
}

.rate-group-header p {
  margin: 0;
  color: var(--muted);
}

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

.rate-field {
  display: block;
}

.rate-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.rate-input-row small {
  color: var(--muted);
  white-space: nowrap;
}

.output {
  overflow: auto;
  max-height: 360px;
  padding: 18px;
  border-radius: 16px;
  background: #0f1f2e;
  color: #eef6ff;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 850px) {
  .split,
  .rate-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button.secondary {
  background: #eef3f7;
  color: var(--navy);
}

.publish-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef3f7;
  color: var(--muted);
  font-weight: 700;
}

.publish-status.success {
  background: #e7f6ef;
  color: #1f7a4d;
}

.publish-status.error {
  background: #fdecec;
  color: #a83232;
}

.card-link {
  display: inline-flex;
  margin-top: 8px;
  color: white;
  background: var(--navy);
  border-radius: 999px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.csv-editor {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  resize: vertical;
  background: #f9fbfd;
  color: var(--ink);
}
