/* The operational pages share the Entei palette without changing their workflows. */
:root {
  color-scheme: dark;
  --entei-obsidian: #211914;
  --entei-panel: #2a2019;
  --entei-raised: #34271e;
  --entei-line: #4d4131;
  --entei-line-soft: #373129;
  --entei-ink: #fffaf2;
  --entei-muted: #c0b5a5;
  --entei-gold: #d9b97b;
  --entei-lava: #e39959;
  --entei-action: #b8431f;
  --entei-action-hover: #9d3518;
  --entei-on-action: #ffffff;
  --bg: var(--entei-obsidian);
  --panel: var(--entei-panel);
  --border: var(--entei-line-soft);
  --muted: var(--entei-muted);
  --lime: var(--entei-gold);
  --ink: var(--entei-ink);
  background: var(--entei-obsidian);
  color: var(--entei-ink);
}
body {
  min-height: 100vh;
  color: var(--entei-ink);
  background: radial-gradient(ellipse at 92% 0, #71412420, transparent 42%), var(--entei-obsidian);
}
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ad663f 26%, var(--entei-gold) 52%, #ad663f 76%, transparent);
  pointer-events: none;
}
::selection { background: #edc576; color: #21170d; }
a { color: var(--entei-gold); }
a:hover { color: #ffe1a9; }
header { background: #15130f; border-color: var(--entei-line-soft); }
header.hero { background: transparent; }
nav, footer { border-color: var(--entei-line-soft); }
.brand { color: var(--entei-ink); }
.brand span { color: inherit; }
.brand .brand-r, .brand .blue { color: #72a5ff; }
.brand .brand-d, .brand .red { color: #ff7c83; }
h1, h2, h3, .customer-name, .ref { color: var(--entei-ink); }
p, dt, .hint, .help, .date, .order-meta, .queue-count,
.preview-label, .preview-more, .item-pricing, .item-subtotal small,
.detail-heading span, .notification, .small-ref, .email-notice,
.setup-steps, .history li, .history time, footer {
  color: var(--entei-muted);
}
.eyebrow { color: var(--entei-gold); }
label, .price-field label, .payment-fields label, .admin-filters label,
.photo-editor > fieldset > label, .chase-card-editor label,
.gallery-photo figcaption, .photo-preview figcaption {
  color: #ded3c2;
}
input, select, textarea, .admin-filters select, .new-product select {
  color: var(--entei-ink);
  background: #14120f;
  border-color: #76644b;
  accent-color: var(--entei-gold);
}
input::placeholder, textarea::placeholder { color: #a79b8b; opacity: 1; }
input::file-selector-button {
  padding: 8px 10px;
  margin-right: 10px;
  color: var(--entei-ink);
  background: #352c21;
  border: 1px solid #7d6849;
  border-radius: 5px;
  cursor: pointer;
}
button, .primary {
  background: var(--entei-action);
  color: var(--entei-on-action);
  border-color: #d98a64;
}
button:not(:disabled):where(:not(.view-tab, [aria-pressed])):hover, .primary:hover { background: var(--entei-action-hover); filter: none; }
button.secondary, button.incoming, .button {
  background: var(--entei-raised);
  color: var(--entei-ink);
  border-color: #766045;
}
button.secondary:not(:disabled):hover, button.incoming:not(:disabled):hover, .button:hover {
  background: #463124;
  color: var(--entei-ink);
}
button.danger, .danger, .gallery-remove {
  background: #43291f;
  color: #ffccbc;
  border-color: #9a5945;
}
button.danger:not(:disabled):hover, .gallery-remove:not(:disabled):hover { background: #593225; }
button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, a:focus-visible,
.admin-filters select:focus-visible, .new-product select:focus-visible,
.new-product summary:focus-visible, .photo-manager summary:focus-visible {
  outline: 2px solid #f4cb80;
  outline-offset: 4px;
}
.panel, .card, article, .payment-settings, .photo-manager, .filterbar {
  background: linear-gradient(130deg, #211d17, #191713);
  border-color: var(--entei-line);
  box-shadow: 0 10px 35px #00000012;
}
.panel > summary, .payment-settings summary, .photo-manager summary { color: #e7d8bf; }
.new-product { background: #282115; border-color: #8e7042; }
.new-product summary, .photo-first, .create-message, .cost-preview,
.manual, .photo-editor .gallery-message, .gallery-photo .cover-tag,
.address-summary-label, #owner-tools .owner-orders, #payment-message { color: var(--entei-gold); }
#message { color: var(--entei-gold); background: var(--entei-obsidian); }
.message { color: #e5d6ba; }
.cost-preview.negative, .error, .save-result.error { color: #ffc0b5; }
.pricing-preview, .visibility-note, .new-product .hint, .cost-note,
.private-label { color: var(--entei-muted); }
.discount-preview { color: #ffd7aa; background: #4a3020; }
.price-form, .quantity-form, .visibility-actions, .review-form,
.photo-manager[open] > summary, .detail, .items li, dl, .total,
.totals .order-total { border-color: var(--entei-line-soft); }
.photo-preview, .gallery-photo { background: #272119; border-color: #65513a; }
.gallery-photo.is-cover { border-color: var(--entei-gold); }
.photo-preview img, .gallery-photo img, .thumb { background: #efebe3; }
.thumb { border-color: #665641; }
.thumb .no-photo { color: #625747; }
.thumb-quantity { background: #201a12ef; }
.chase-manager summary, .quantity-preview, .draft-label,
.photo-editor .photo-draft-note { color: #ffd398; }
.access-options { background: #14120f; border-color: var(--entei-line); }
.access-options button { color: #d5c7b2; background: transparent; }
.access-options button[aria-pressed="true"] {
  color: #21170e;
  background: linear-gradient(125deg, #f0cf8c, #e7ac66);
}
.address-summary, .shipping, .order-note, #owner-tools {
  color: #dfd1bb;
  background: #282219;
  border-color: #5e4c33;
}
.address-summary p, .contact strong { color: #e7dccb; }
.history { border-color: #886946; }
.empty, .empty-panel { background: #1a1712; border-color: #776044; }
.empty strong { color: var(--entei-ink); }
.amount, .summary-total strong, .summary-total .expand-label,
.totals .order-total, .total, .total dt { color: #f5d294; }
.summary-total small, .order[open] .expand-label { color: var(--entei-muted); }
.order {
  background: linear-gradient(115deg, #241e16, #1a1713);
  border-color: var(--entei-line-soft);
  border-left-color: #d2a341;
}
.order.is-finished { background: #181613; border-left-color: #918474; }
.order-meta time, .item-subtotal { color: #e0d3bf; }
.queue-position { color: #bbaa90; }
.item-row, .contact { background: #15120f; border-color: var(--entei-line-soft); }
.sync-box { background: #221d17dd; color: #e4d6c0; border-color: var(--entei-line); }
.sync-dot { box-shadow: 0 0 12px #edc57640; }
.view-tab { background: #211c16; border-color: #51432e; color: #d6c6ae; }
.view-tab strong { color: var(--entei-ink); }
.view-tab[aria-pressed="true"] {
  background: #382b18;
  border-color: #c99b53;
  box-shadow: inset 0 0 0 1px #c99b53;
}
.view-tab[aria-pressed="true"] span, .view-tab[aria-pressed="true"] strong { color: #ffe2ad; }
.badge { background: #342c22; border-color: #796347; color: #e8d7bc; }
.badge.live { background: #402b1b; border-color: #ae7843; color: #ffdab2; }
.badge.seal { background: #302e28; border-color: #797565; color: #e4e0d3; }
.badge.finished { background: #2e2923; border-color: #716356; color: #dacfc2; }
.status.incoming { background: #40331e; color: #f5d69e; }
.notice { background: #27241d; border-color: #7d6b48; color: #e7dac2; }
/* Status colors remain distinct: paid green, pending amber, shipping blue, review red. */
@media (forced-colors: active) {
  body::before { display: none; }
  body, header, .panel, .card, article, .order, .filterbar, .view-tab,
  button, .primary, .button { background: Canvas; color: CanvasText; }
  .view-tab[aria-pressed="true"], .access-options button[aria-pressed="true"] {
    outline: 2px solid Highlight;
  }
}
