:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --storefront-action-accent: #f3c969;
  --storefront-action-accent-hover: #e2b84e;
  --storefront-action-accent-border: #b47d16;
  --storefront-action-accent-text: #000000;
  --storefront-action-focus: #8a6112;
  --storefront-action-accent-rgb: 243, 201, 105;
  --storefront-action-shadow-rgb: 138, 97, 18;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: #1a2433;
}

a {
  color: var(--storefront-link-color, #2057d4);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: #eef2f7;
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.page--admin {
  max-width: 1680px;
  padding: 32px 24px 72px;
}

.hero {
  padding: 32px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 35, 67, 0.08);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 2rem;
}

.hero p {
  margin: 0;
  max-width: 760px;
  line-height: 1.6;
}

.toolbar,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.card,
.panel,
.subpanel {
  padding: 24px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 35, 67, 0.04);
}

.panel--narrow {
  max-width: 560px;
}

.subpanel {
  padding: 20px;
  background: #f9fbfd;
  box-shadow: inset 0 0 0 1px #e6ebf2;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7787;
}

.metric {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.metric--small {
  font-size: 1rem;
  line-height: 1.45;
}

.status-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section {
  margin-top: 32px;
}

.hero--admin {
  background:
    radial-gradient(circle at top right, rgba(32, 87, 212, 0.14), transparent 30%),
    #ffffff;
}

.section h2,
.subpanel h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e4e8ef;
  text-align: left;
  vertical-align: top;
}

.table th {
  font-size: 0.85rem;
  color: #526173;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

time.js-local-datetime {
  white-space: nowrap;
}

.text-truncate-inline,
.text-truncate-block {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
  max-width: 100%;
}

.text-truncate-inline {
  max-width: min(18rem, 100%);
}

.text-truncate-inline--wide {
  max-width: min(28rem, 100%);
}

.text-truncate-block {
  display: block;
  max-width: min(24rem, 100%);
}

.text-truncate-block--wide {
  max-width: min(36rem, 100%);
}

@media (max-width: 720px) {
  .page--admin {
    padding: 24px 16px 56px;
  }
}

.text-clamp-3,
.text-clamp-5 {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
}

.text-clamp-3 {
  -webkit-line-clamp: 3;
}

.text-clamp-5 {
  -webkit-line-clamp: 5;
}

.muted {
  color: #6b7787;
}

.stack {
  display: grid;
  gap: 16px;
}

.stack--tight {
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
  gap: 16px;
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

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

.field__label {
  font-weight: 600;
}

.field__hint {
  font-size: 0.92rem;
  color: #6b7787;
  line-height: 1.45;
}

.field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d3dae5;
  border-radius: 10px;
  background: #ffffff;
  color: #1a2433;
  font: inherit;
}
.field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d3dae5;
  border-radius: 10px;
  background: #ffffff;
  color: #1a2433;
  font: inherit;
}
.field textarea {
  width: 100%;
  min-height: 120px;
  padding: 11px 13px;
  border: 1px solid #d3dae5;
  border-radius: 10px;
  background: #ffffff;
  color: #1a2433;
  font: inherit;
  resize: vertical;
}

.field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus {
  outline: 2px solid rgba(32, 87, 212, 0.18);
  border-color: #2057d4;
}
.field select:focus {
  outline: 2px solid rgba(32, 87, 212, 0.18);
  border-color: #2057d4;
}
.field textarea:focus {
  outline: 2px solid rgba(32, 87, 212, 0.18);
  border-color: #2057d4;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-actions--full {
  grid-column: 1 / -1;
}

.inline-form {
  display: inline-flex;
}

.sync-launcher-form {
  display: grid;
  gap: 14px;
  flex: 1 1 100%;
  min-width: min(100%, 360px);
}

.sync-launcher-form__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.sync-launcher-form__submit {
  flex-shrink: 0;
}

.sync-mode-picker__field {
  display: grid;
  gap: 8px;
  flex: 1 1 420px;
  min-width: min(100%, 320px);
}

.sync-mode-picker__select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #d3dae5;
  border-radius: 14px;
  background: #ffffff;
  color: #1a2433;
  font: inherit;
}

.sync-mode-picker__select:focus {
  outline: 2px solid rgba(32, 87, 212, 0.18);
  border-color: #2057d4;
}

.sync-mode-picker__note {
  margin: 0;
  max-width: 78ch;
}

.sync-mode-picker__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.sync-mode-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #dbe5f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 10px 24px rgba(15, 35, 67, 0.04);
}

.sync-mode-card strong {
  color: #0f2a52;
}

.sync-mode-card p {
  margin: 0;
  line-height: 1.45;
}

.sync-mode-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-error-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-error-copy-status {
  margin: 16px 0 0;
}

.admin-error-copy-payload {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
